teleren/devto huggingface dataset:
Upload Files to Cloudinary with Node.js in 1 minute
Tags: javascript, tutorial, webdev, node
Published: 2022-04-18 19:33:57

Hi guys! Today I bring you a package that allows you to `upload`, `list` and `delete` files with various cloud services [Cloudinary](https://github.com/Filesrocket/filesrocket-cloudinary), [Amazon S3](https://github.com/Filesrocket/filesrocket-amazons3)

## ❤️ Follow me

- 🐦 [**twitter**](https://twitter.com/thebug404)
- 🐙 [**github**](https://github.com/thebug404)

## ⚙️ Setup

Before you start using [**Filesrocket**](https://github.com/Filesrocket/filesrocket) you need to set up a simple Node.js project

Create project

```
mkdir my-filesrocket-app

cd my-filesrocket-app

code .
```

Initialize project

```
npm i typescript ts-node -g

npm init -y

tsc --init --target es2018
```

## 🚀 Get started

But before continuing you need to create a cloudinary account. If you don't have an account yet, click [here](https://cloudinary.com/documentation/node_integration#configuration) and follow all the steps.

To start using Filesrocket it is necessary to install the dependencies.

```
npm i express filesrocket filesrocket-cloudinary

npm i @types/express -D
```

Create `src/index.ts` file and copy the following content

```ts
import express from "express";

import { Filesrocket } from "filesrocket";
import { CloudinaryFileService } from "filesrocket-cloudinary";

// Initialize Filesrocket
const filesrocket = new Filesrocket();

// Setting service.
const service = new CloudinaryFileService({
  pagination: { default: 15, max: 50 },
  cloud_name: "<Your CLOUDNAME>",
  api_key: "<Your API KEY>",
  api_secret: "<Your API SECRET>"
});

// Register your service.
filesrocket.register("cloudinary", service);

const app = express();

// Register your endpoint
app.post("/files", async (req, res) => {
  const controller = filesrocket.controller("cloudinary");

  const files = await controller?.create(req, {
    extnames: [".jpg", ".png", ".jpeg"]
  });

  res.status(200).json(files);
});

app.listen(3030, () => {
  console.log("App execute in port:3030");
});
```

With this simple example you can upload files to cloudinary. But remember that this is only the beginning, there is still more to discover, if you are interested I recommend you click [here](https://github.com/Filesrocket/filesrocket) to visit the official documentation.

## ❤️ Follow me

- 🐦 [**twitter**](https://twitter.com/thebug404)
- 🐙 [**github**](https://github.com/thebug404)
Open Source Project - Self Healing Cloud Infrastructure Solution
Published: 2022-04-18 19:10:15

Are you passionate about Open Source Tools and Giving back to the community? How about a CLOUD ANOMALY DETECTION SOLUTION? Well, you are reading the right post! 

We are working on an open-source solution called Matos. Matos is designed to help detect anomalies, configuration, and policy drifts. Matos interacts with native cloud service’s APIs and third-party tools to obtain current metadata and stats of underlying resources. In this manner, Matos is able to represent, for each use case, the current security and compliance posture. We support AWS and GCP, allow users to get real-time resource information and metadata, and we’re purpose-built to identify anomalies and policy/configuration drifts.This is a project we are extremely passionate about and this is an opportunity for us to give back to our community. There is not much user activity on it and that is why I am here for you to try it out and let us know your feedback, input, or contribution to the project. Even better a partnership in making this BIG!! 

Here is the link to the project https://github.com/cloudmatos/matos 

Product website https://www.cloudmatos.com/ 

User testimonial-
https://www.indiehackers.com/post/any-suggestions-for-cloud-anomaly-detection-open-sourced-solution-163d5f50fa

Looking forward to some great participation and feedback for the open-source solution and giving back to the community.

#DevSecOps #Automation #cloudinfrastructure #hardening #secops #devops #cloudautomation #remediation #compliance #cloudcompliance #python #opensource
Weekly 008
Tags: weeklyretro
Published: 2022-04-18 19:09:57

### Monday

This morning I was tired because yesterday I ran my first marathon in Zurich 🙂

I started the morning with our first “look back meeting” with all my team. It’s a 25 minutes call with a kind of retrospective of the two weeks before.
It seemed good from my point of view.
I didn’t have feedbacks from the other guys.

In the morning I blogged about my setting for the Logitech Brio.

{% embed https://dev.to/kasuken/best-settings-for-logitech-brio-4k-j2b %}

### Tuesday

Finally today I finished a big refactoring of Red Origin. I have a lot of naming for database entities.
I postponed this activity for a lot of months, but on Friday I started to work on it.
More or less 12 hours of work.

In the afternoon I also created a document with a lot of screenshots for Red Origin. A customer ask them for an internal presentation.
Fingers crossed. 🤞

In the late evening I worked on the startup Oscar.
I implemented the new UI for a lot of new sections of the app.

### Wednesday

Woke up early in the morning tried to catch up on some of the backlog. Failed 🙂

Worked on two new features for Red Origin but the tasks are more hard than I thought at the beginning.

### Thursday

Nothing special.
After lunch I had our retro meeting for Red Origin. A lot of news and lot of stuff to do in the future.

I thought from the next week I will start to stream on Twitch again while I will work on Red Origin.
I will share my screen time to time, but not for the entire morning.

### Friday

Holiday 🙂
export import module
Published: 2022-04-18 18:58:38

html file
type="module"
```html
    <script src="Person.js" type="module"></script>
    <script src="helpers.js" type="module"></script>
    <script src="modules.js" type="module"></script>
```

Person.js
```js
export class Person {
    constructor(name) {
        this.name = name;
    }

    sayHello() {
        console.log(`Hi, this is ${this.name}`);
    }
}
```

helpers.js
```js
function algoExpert() {
    console.log('AlgoExpert is the best!');
}

export function fronendExpert() {
    console.log('fronendExpert is the best!');
}
```

module.js
```js
import * as helpers from './helpers.js';
import * as person from './Person.js';

helpers.fronendExpert();

const conner = new person.Person('Conner');
conner.sayHello();
```
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i5olyw36ynvc9mlsd9n7.png)

## other way to import 

```js
import { fronendExpert, algoExpert } from './helpers.js';
import {Person} from './Person.js';

fronendExpert();
algoExpert();

const conner = new Person('Conner');
conner.sayHello();
```
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ntydrnd0x088q285ic8.png)

## use as for change 
```js
import { fronendExpert, algoExpert as algo } from './helpers.js';
import {Person} from './Person.js';

fronendExpert();
algo();

const conner = new Person('Conner');
conner.sayHello();
```

## another way to export 
```js
function algoExpert() {
    console.log('AlgoExpert is the best!');
}

function fronendExpert() {
    console.log('fronendExpert is the best!');
}

export {algoExpert, fronendExpert};
```

## export default 

```js
export default function algoExpert() {
    console.log('AlgoExpert is the best!');
}

export function fronendExpert() {
    console.log('fronendExpert is the best!');
}
```
```js
import algoExpert, { fronendExpert } from './helpers.js';
import {Person} from './Person.js';

fronendExpert();
algoExpert();

const conner = new Person('Conner');
conner.sayHello();
```

## other way ( use **await** keyword )
```js
// we don't need this anymore 
// import { fronendExpert } from './helpers.js';

const shouldSayFrontend = true; 

if (shouldSayFrontend) {
    const { fronendExpert } = await import('./helpers.js')
    fronendExpert();
}
```
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kygww7xxyd49kdiy25x1.png)
Code Smell 130 - AddressImpl
Tags: codenewbie, tutorial, webdev, java
Published: 2022-04-18 18:51:24

*It is nice to see a class implementing Interfaces. It is nicer to understand what it does*

![Code Smell 130 - AddressImpl](paula-hayes-Eeee5H-yuoc-unsplash.jpg)

> TL;DR: Name your classes after real-world concepts.

# Problems

- [Bijection](https://dev.to/mcsee/the-one-and-only-software-design-principle-3086) Fault

- [Bad Names](https://dev.to/mcsee/what-exactly-is-a-name-part-ii-rehab-20gd)

# Solutions

1. Find the correct name using the [MAPPER](https://dev.to/mcsee/what-is-wrong-with-software-5pa)

# Context

Some languages bring idioms and common usages against good model naming.

We should pick our names carefully.

# Sample Code

## Wrong

[Gist Url]: # (https://gist.github.com/mcsee/f1f4d16d6f90c682f540cd2c0c2cc5f2)
```java
public interface Address extends ChangeAware, Serializable {

    /**
     * Gets the street name.
     *
     * @return the street name
     */
    String getStreet();
    //...
}

//Wrong Name - There is no concept 'AddressImpl' in real world
public class AddressImpl implements Address {
    private String street;
    private String houseNumber;
    private City city;
    //..
}
```

## Right

[Gist Url]: # (https://gist.github.com/mcsee/6cf15d798176fd83cbe00e207d8351fc)
```java
//Simple
public class Address {
    private String street;
    private String houseNumber;
    private City city;
    //..
}


//OR
//Both are real-world names
public class Address implements ContactLocation {
    private String street;
    private String houseNumber;
    private City city;
    //..
}
```

# Detection

[X] Automatic 

Since this is a naming smell. 

We can search using regular expressions and rename these concepts.

# Tags

- Naming

# Conclusion

We should pick class names according to essential bijection and not follow accidental implementation.

Do not call *I* to your interfaces.

# Relations

{% post https://dev.to/mcsee/code-smell-65-variables-named-after-types-9da %}

{% post https://dev.to/mcsee/code-smell-38-abstract-names-34ng %}

# More Info

- [What's in a Name: Part II: Rehab](https://dev.to/mcsee/what-exactly-is-a-name-part-ii-rehab-20gd)

# Credits

Photo by [Paula Hayes](https://unsplash.com/@phayes007) on [Unsplash](https://unsplash.com/s/photos/mailbox)  

* * *

> Encoded names are seldom pronounceable and are easy to miss-type.

_Robert C. Martin_
 
{% post https://dev.to/mcsee/software-engineering-great-quotes-26ci %}

* * *

This article is part of the CodeSmell Series.

{% post https://dev.to/mcsee/how-to-find-the-stinky-parts-of-your-code-1dbc %}
B2B SSO for SaaS applications - Don't Build. No-Code It
Tags: saas, security, b2b, webdev
Published: 2022-04-18 18:35:41

Datawiza is a new No-Code platform for authentication and authorization. The platform integrates with any identity providers, like Microsoft, Okta/Auth0, to enable Single Sign-On (SSO), MFA and fine-grained authorization for apps and APIs.

In this webinar, you will learn:

- Why SaaS companies need to enable SSO for their customers.
- How SaaS companies typically implement SSO for their customers.
- Datawiza's new No-Code strategy to enable SSO, which helps organizations speed up time-to-market, free up developers and save cost.

Register: https://us02web.zoom.us/meeting/register/tZIqde2uqjwqHdP47GWRXkfsYP3oZq0IBRvH

Learn more: https://www.datawiza.com/blog/industry/no-code-solution-to-democratize-single-sign-on-for-b2b-saas-vendors/
Temos vagas!
Tags: react, braziliandevs, career
Published: 2022-04-18 18:31:33

Conhecendo e aprendendo sempre sobre desenvolvimento, decidi trazer uma das vagas que trabalho na empresa para cá.
Estamos com vagas de **Desenvolvedor ReactJs Pleno e Sênior** para atuar em uma grande empresa de tecnologia, que tem crescido cada vez mais.

Ficou interessado? Entre nesse link: https://amcom.gupy.io/
Javascript Queue data structure
Tags: javascript, queue, datastructure, programming
Published: 2022-04-18 18:23:18

**QUEUE**:
Queue is also one type of data structure and works like a stack but it follows a first in first out(FIFO) order.
Example: When you are in a line to pay a bill at the counter, we should follow the sequence like first in first out, queue also works same.

**Internal design of queue:**

```
const Queue = function() {
    let collections = [];
    this.add = function(item) {
        return collections.push(item);
    }
    this.size = function() {
        return collections.length;
    }
    this.isEmpty = function() {
        retun(collections.length == 0)
    }
    this.enqueue = function(item) {
        return collections.push(item)
    }
    this.dequeue = function(item) {
        return collections.shift();
    }
    this.front = function() {
        return collections[0];
    }
}

let queue = new Queue();
console.log(queue.size())
queue.enqueue("1");
queue.enqueue("2");
console.log(queue.size())
console.log(queue.front());
queue.dequeue();
console.log(queue.size())
```
> _Any comments or suggestions are welcome._
I don't know how to use an attribute of a JSON
Tags: javascript, json, beginners, dotnet
Published: 2022-04-18 18:18:27


I was looking for access an JSON attribute in JavaScript, that come from an aspnet (so for that is the dotnet tag).


![This is the JSON from the API](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uzqwljs8c9dl6wlsb2ht.jpg)

The connection with js and aspnet is this:

```
function PostAsociado()
{
    const sePuedeCargar = AsociadoCanPost(); 
    const AsociadoObject = SetAsociadoObject();
    var htmlState = document.getElementById('StateExecution');

    const response = fetch(urlAsociado,
        {
            method : 'POST',
            headers: 
            {
            'accept' : 'application/json',
            'Content-Type' : 'application/json',    
            },
            body : JSON.stringify(AsociadoObject) 
        })
        .then(response => response.json())

        alert(response.executionSuccessful);
        
    if(response.executionSuccessful)
    {
        htmlState.innerHTML = "El asociado " +asociado.Nombre + " "+ asociado.Apellido  +" se ha cargado exitosamente.";
        htmlState.style.color = "green"; htmlState.style.display = "inherit"; 
    }
    else
    {
        htmlState.innerHTML = "El dni ya fue ingresado.";
        htmlState.style.color = "red"; htmlState.style.display = "inherit";
    }
}

```

This is the response class, the language used is C#, (each class have their own file, I just display in that way because is more easy to understand):

```
    public abstract class Response
    {
        public bool ExecutionSuccessful {get; set;}
        public string? ErrorMessage {get;set;}
    }

  public class AsociadoPostResponse: Response
    {
        public Asociado? asociado {get; set;}
    }


```
TexCreate v2.1 Released!
Tags: programming, tex, news
Published: 2022-04-18 18:04:19

TexCreate hasn't seen some change in a little while, and that was mostly me not realizing errors in the flags, but what are the changes?

### Added Template 
I haven't added a new template in a while, so what is this new template? Well it's a modified version of the Lachaise template, with added colors for the graphics, and some less noticeable changes like no more rounded corners. 

I do want to add in other templates like resumes, newspapers, etc.

### Force Build 
In TexCreate there are several error checkers for things like missing fields, beamer not having a beamer document class, invalid templates, and such. The force flag is used to ignore the error checker, and force the project to be built. 

To do this, use the `--force` flag on the `build` command:
```
$ texcreate build --force
```

## Concepts Being Considered  
- Custom templates 
   - I really want to add this, but currently considering how to implement it effectively 
- TexCreate script interpreter 

As usual feel free to comment features or changes you'd like, or create a new Issue on [texcreate](https://github.com/MKProj/texcreate)
90 Days are all you need to get a web developer job
Tags: frontend, webdev, beginners
Published: 2022-04-18 17:52:54

🚶‍♂️🚶‍♀️ A step by step guide to escape tutorial hell

It's a summary of my journey in the frontend world from not knowing how to style a button to design full blowing enterprise apps.

✅ This guide is your step-by-step plan to getting real at learning web development and getting a real job in 3 months.

## Roadmap 
👇
![Roadmap](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/khm88q8llh4f2g1apbrc.png)

## Summary 

### Step 1: Do these things consistently
If you're serious let's start with the less relative things yet effective:

🛌 Sleep at least 7 hours a day and wake up early typically 6 AM everyday.
🥤 Drink a lot of water. Your brain is swimming in water and needs a lot of it to function properly.
🍎 Have natural sugars like fruits.
🤸‍♂️ Do some light exercises in the morning.
🔥 Most importantly you have to work at least 12 hours a day for 90 days and take Fridays off.

### Step 2: Learn the absolute basics
Before diving into HTML/CSS/JS and such you should learn the absolute basics first:

#### Days 1 - 2 : Web Concepts

**Tip**: Don't just watch 45 mins videos, instead read some blog posts and grasp the general concepts.

🌐 What is web?
🖱️ What is a HTTP request?
✅ What is HTTP methods and headers?
✅ How the browser works?
🧱 What is HTML and how it works?


#### Days 3 - 5: HTML Basics
🧱 Learn HTML basics including. (what is the difference between form id and class).
🧱 Why some HTML elements doesn't have closing tag?
🌳 Basics of HTML DOM tree. (Important!)

#### Apply
🏗️ Build simple HTML page include all of what you have learned in it.

#### Days 6 - 10: CSS Basics
✅ Learn VS Code basics. A basic crash course will do.
✅ Learn about Chrome dev-tools.
🎨 What is CSS?
🎨 CSS basics.
🎨 What is CSS media query?
🎨 CSS selectors.
🎨 CSS basic best practices.
 
[Read more
](https://ahmednagi.com/90-days-to-web-dev-job/)
The Future of Debugging
Tags: javascript, discuss, watercooler, productivity
Published: 2022-04-18 17:51:22

---
title: The Future of Debugging
published: true
description: Debugging is a big part of software engineering/development. What kind of debuggers do we have?
tags: javascript, discuss, watercooler, productivity
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0rxtewiafxo41yvrf9iz.png
---

**Update**

[Talk: The Future of Debugging](https://www.youtube.com/watch?v=LhM01DL9dLc)

**Original**

(Ignore this ↓, this is not well written jibbajabba - the talk is quite a bit more coherent, and has pretty pictures!)

Recently I have found myself really enjoying asking all kinds of new types of questions (questions I have not considered in the past), like...

1. While trying to find a bug: "What might be three possible 'good' next steps? Which one should I pick and why?"
1. After I fixed a "difficult" bug:
   * "Had I known what I know now, would it have taken just as long?"
   * "Which step was the hardest? Why?"
   * "What can I do to make that hardest step easier for me (or for the next dev) next time around?"
   * "If there is such a thing, what kind of tool or method of dynamic analysis could have saved me the most time or pain?"
1. When working on a "difficult" piece of code, even before the first bug rears its ugly head:
   * "How debuggable is this code? Should I make it more debuggable?"
   * "What kind of tool could help analyze such code without having to change the code?"

...and so on.

I guess, I have only started asking these types of questions because I have been working on a [new type of debugger](https://github.com/Domiii/dbux/) (called "Dbux") over the past few years. At the same time, I'm thinking: what is going on in other people's heads?
 
1. Do you talk about debugging at work (or with other teammates, if any)?
1. What happens in your debugging sessions?
1. What kind of opinions do you have about debugging or debuggers?
1. Are there types of codebases or industries that are more in need of better debugging tools than others?
1. If code is not well tested, does debugging not deserve being talked about? If so, at what point does the topic start to deserve our attention, if ever?
1. Do you have questions about debugging you would like someone to answer?


## But Why...?

I am posting this with two goals in mind:

1. I am genuinely wondering about what is going in people's heads on this topic (and reply to the best of my ability).
2. This post also serves to let people know about my [talk on this very topic this Thursday](https://www.codementor.io/events/developer-growth-summit) (it's free). I want to extend an invitation to my fellow debuggerheads, as well as to those who are just a little curious. The talk covers what we can expect of debugging, debugging tools and its good friend, the rarely discussed field of "dynamic analysis", as well as the types of questions they can (or maybe will be able to) help us answer. Maybe I'll see a few of you there (or maybe not). Either way, thanks for reading all the way to down here!
What are some things that you don't like about git?
Tags: git, discuss
Published: 2022-04-18 17:48:54

Git has been in the making since 2005, and probably 90% developers use it everyday
What are some pain-points that you face with git everyday or have encountered occasionally?

_Leaving the classic, Hitler uses git meme for some gags:)_
{% youtube https://www.youtube.com/watch?v=CDeG4S-mJts %}
Database introduction for Newbie Web Developers
Tags: database, beginners, tutorial, webdev
Published: 2022-04-18 17:47:48

Databases are used to store data efficiently and securely. 

You will hear about different databases like Cassandra, MongoDB, CouchDB etc.

But the two types of DB are

1. SQL based - Based on SQL (MySql and PostgreSQL)
2. NoSQL based - not based on SQL (MongoDB and Redis)

## SQL based (Relational Databases)
- Data is grouped into tables
- Inflexible in some cases (has NULL on all the places where data is missing)
- Structured, Old and reliable
- Requires a Schema
- Scales vertically

## NoSQL based (Non-relational databases)
- JSON based storage (Document structure)
- Key value pairs for storing data
- More flexible (Not bound to particular structure)
- Not good with complex relationships with data
- Scales horizontally
- Shiny and New

Thanks for reading