teleren/devto huggingface dataset:
There is a saying...
Tags: node, beginners, javascript, webdev
Published: 2021-02-13 15:42:17

> *In learning you will teach, and in teaching you will learn.*

Let's use this post to learn and to teach. We never know what new we will learn and whom we will inspire.

Our Industry is highly based on the realm of community contribution (stackoverflow etc.)
Let's do it here:)

If you have any queries related to #javascript #react #nodejs #typescript #webdev, put it in the comments section. 

If you are reading the comment section and find something that you can help with, please do it.

Thanks and Happy Learning!
The Other Side of Fear
Tags: beginners, career
Published: 2021-02-13 15:11:43

   In life there will be many moments where you have to choose to either, stay comfortable and remain where you are or take a leap of faith into the unknown. Applying to Flatiron School was what I like to consider my leap of faith. There are many scary things about taking on a new challenge that you have no knowledge about. It's the unknown that not everybody will choose to venture out into. I choose to not stay comfortable with where I was at and to challenge myself to something that I know can potentially change my life by throwing myself into the unknown, into the fear.
   

Fear stops many people from doing risky or unfamiliar things. It almost stopped me from applying for the coding bootcamp because I was fearful that I wouldn't be any good, fearful that I wouldn't belong and fearful that I would let myself down. I came to the conclusion that I had to face that fear and just throw myself into it and embrace it. Now, I'm two weeks into my program at Flatiron School, in no way am I an expert, but I have really surprised myself with how much I was capable of learning in just two weeks. If I would have let that fear stop me, I wouldn't be in the position I am today, about to go on a journey that is going to change my life for the better. As Will Smith once said, "God placed the Best Things in Life on the Other Side of Fear!". So far the view from the other side is looking amazing.
The struggle of faking data
Tags: fakedata, advice, database, data
Published: 2021-02-13 15:17:50

Who must test applications by creating fake data for invented users can often get through the day with a serious **lack of imagination**.
Of course, we often work with frameworks or libraries that offer tools to, for example, **populate DBs** with very realistic data. But other times to test small applications you have to rely on the imagination only. This can be annoying and can also affect the speed of work at times.
For these cases and to avoid entering names like John Doe, Foo, Asd or even 123, I point out one of the many sites that **creates fake data for free**.
This one is very complete: it gives you even coordinates, zodiac sign, credit card data, etc. and let you choose many options like nationality, age range and so on. Hope it will be useful :)
If you know similar websites feel free to suggest me.

[Fake Name Generator](https://www.fakenamegenerator.com/advanced.php)
Day 14: HTML Markup Generator
Tags: 100daysofcode, java
Published: 2021-02-13 15:15:27

Convert a paragraph into a properly formatted basic html file.

```java
import java.util.Scanner;
import java.io.*;

public class Day14 {

    public static void main(String[] args) {
        //string to store the first half of the HTML code
        String TopHalf = "<!DOCTYPE html>\n<html>\n<head>\n<title></title>\n</head>\n\n<body>\n<p>" ;
        //string to store the second half of the HTML code
        String Bottom = "</p>\n</body>\n</html>" ;
        //empty string that will later accept the user's input
        String Paragraph = "";

        //setup a way to get user input
        Scanner input = new Scanner(System.in);

        //get a name for the file
        System.out.println("Please name your file: ");
        System.out.println("(.html is automatically appended)");
        String fileName = input.nextLine();

        //get the paragraph
        System.out.print("Please enter your paragraph: ");
        Paragraph = input.nextLine();

        //create and write to the file
        try (Writer writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(fileName + ".html")))) {
            writer.write(TopHalf + Paragraph + Bottom);
        } catch (IOException ex){
            System.err.println("Problem writing to the file " + fileName + ".html");
        }
    }
}
```
Why I've started using namespaces in Typescript
Tags: typescript
Published: 2021-02-13 15:15:13

Typescript has these things called namespaces. To cut to the chase, namespaces offer a way to group things up. You can find out some information about what they are and how to use them [here](https://www.typescriptlang.org/docs/handbook/namespaces.html).

I've known about their existence for quite some time but until recently, I didn't think I had a reason to use them. There are already so many other ways you can group things up.

**You can group things up using objects:**

```typescript
export const CustomMath = {
  add(a: number, b: number) {},
  subtract(a: number, b: number) {},
}
```

**You can group things up using classes:**

```typescript
export class CustomMath {
  public static add(a: number, b: number) {}

  public static subtract(a: number, b: number) {}
}
```

**You can group things up using wildcard imports:**

```typescript
// customMath.ts
export function add(a: number, b: number): void {}

export function subtract(a: number, b: number): void {}

export type Range = { lower: number; upper: number }

// anotherFile.ts
import * as CustomMath from './customMath'

const myRange: CustomMath.range = { ... }
```

With this solution, you can also include types/interfaces within the grouping. As far as I'm aware that isn't possible with the previous 2 methods.

One thing I don't like about wildcard imports is that it's still possible to import each of those functions individually. There's nothing in place to stop people from doing this. Straggler functions (and types) that seem like they would be better off being logically grouped annoy me a bit.

<hr/>

### Namespaces

```typescript
// customMath.ts
export namespace CustomMath {
  export function add(a: number, b: number): void {}

  export function subtract(a: number, b: number): void {}

  export type Range = { lower: number; upper: number }
}

// anotherFile.ts
import { CustomMath } from './customMath'

const myRange: CustomMath.range = { ... }
```

You can still access functions, constants, types and interfaces that are exported from your namespace, but now they're grouped nicely under a single import. Bliss.

There are drawbacks to using namespaces, some of which have been mentioned [here](https://stackoverflow.com/a/45499628/5362826). There are also other ways to avoid the minor annoyances I've mentioned in this post. One way is to [make better use of `index` files](https://medium.com/unsplash/named-namespace-imports-7345212bbffb). This is something I've done in personal projects and it works well for me, however it seems like too much of a manual effort to convince my colleagues to try this. Namespaces will be my go-to in situations where objects or classes aren't more appropriate.
Code-Server with Dart and Flutter Web On VPS
Tags: codeserver, dart, flutter
Published: 2021-02-13 15:04:18

In this section, I explain How to create a Develop environment for flutter for web on cloud.

and, 
you can use vscode plugin too.


## Run Code-server on vps


```
$ apt-get update
$ curl -fsSL https://code-server.dev/install.sh | sh
$ systemctl enable --now code-server@root
// Created symlink /etc/systemd/system/default.target.wants/code-server@root.service → /lib/systemd/system/code-server@.service.
```

## Setup password (Optional) 

```
$ vi /root/.config/code-server/config.yaml
```

```
bind-addr: 0.0.0.0:8080
auth: password
password: MyFlutter-0213f
cert: false                                                     
```

```
$ systemctl restart code-server@root
```

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/fhlxi2nm098l88j1f8hu.png)


# Install Flutter

https://flutter.dev/docs/get-started/install/linux

```
$ apt-get install curl -y
$ apt-get install git -y
$ apt-get install unzip -y
$ apt-get install zip -y
$ git clone https://github.com/flutter/flutter.git
$ export PATH="$PATH:`pwd`/flutter/bin"
$ flutter doctor
```

# Install Flutter Web

https://flutter.dev/docs/get-started/web

```
$ flutter channel beta
$ flutter upgrade
$ flutter config --enable-web
$ flutter devices
```


# Run Sample Program

```
$ flutter create myapp
$ cd myapp
$ flutter build web
$ flutter run -d web-server  --web-port=18080 --web-hostname=0.0.0.0
```


![](https://dev-to-uploads.s3.amazonaws.com/i/lm1yyzrvsz0w2tr5j58z.png)
Why did you decide to study Software Engineering?
Published: 2021-02-13 14:52:54

Ever since I was a little kid back in Ecuador I always thought I was destined for success, daydreaming about rockets and technology. My elementary school teacher used to tell me I was brilliant in Mathematics, my high school teacher was very impressed because I was the very first student to ever graduate high school with a perfect score in Mathematics and Physics. They both told me "I can't wait to see where do you ended up".

I studied civil engineering in college but unfortunately I had to drop out and move here to the USA because my girlfriend got pregnant and I wanted to be a responsible man.

Here in the USA I got so much energy and inspiration from NYC and technology entrepreneurs especially Elon Musk. I wanted to be the next "dropout self-made millionaire" so bad that I started educating myself in Economics, Programing, Stock Trading, Marketing, Graphic design and yes even English by just watching South Park ("Goddamnit") and reading books. 

In the following years I partnered up with a friend and set up a delivery service for small businesses in NYC, I launched a website and app for printing photos from social media accounts, I launched a website that helps small businesses grow their exposure in social media, I launched an online clothing store, I opened a Star Wars themed pizzeria in Ecuador, I opened one of the best SkateShops in Ecuador and some other projects. I thought I was doing great, drunk in this "take risk mindset" but then my delivery service lost our main client and everything collapsed from there. I realized I was just subsidizing my side projects, I tried to save them so bad but I lost everything and ended up with over $100k in debt in my mid twenties.

"Fear incentives my creativity"
I went though dark times, I had to promise my wife I would give up on my entrepreneurial dreams and start fresh, I ended up working in Bloomberg LP and soon after I was creating automation solutions for my team and my goal now is to work in the Engineering department but I don't even have a college degree. My mentor advised me to enroll this Software Engineering program here in Flatiron School so I can get the right skills. He again just like my school teacher told me: "I can't wait to see where do you ended up".

I always thought I was destined for success, then I lost almost a decade on my journey. I always wanted to be an inventor, an entrepreneur, create something from scratch, I know I promised my wife I would give up on my dreams, but deep inside I still have that flame eager to conquer the world. This is why I decided to study Software Engineering.
HandsOn Microservices Tutorial - Episode 1
Tags: microservices, java, csharp, opensource
Published: 2021-02-13 14:47:35

First Microservice Episode Is Out. 

We take a step by step practical approach on the microservice architecture.

Learn how to build enterprise applications using microservice architecture. We demistify fundamental topics that are associated with microservices. 

We cover topics such as CQRS, Event Sourcing, API Gateways, Load Balancing, CI/CD Pipelines, Authentication & Many More.

And best part of it is we're going to use OpenSource tools for this!! 🙂

Link :- https://cutt.ly/introduction-to-microservices
Are you on Clubhouse yet?🗣 📣
Tags: discuss, watercooler, javascript
Published: 2021-02-13 14:29:09

---
title: Are you on Clubhouse yet?🗣 📣
published: true
description: let's follow each other and let the party begin
tags: discuss, watercooler, JavaScript 
---

Hey, guys just created an event on Clubhouse and sending you the invitation on very short notice. 😅

{% twitter 1360580199780257799 %}

Even if you were not able to Join let's connect on Clubhouse anyways. You can find me @sarthology. Party Time. 🥳 


![](https://media.giphy.com/media/26tP8iEKax3wd8c48/giphy.gif)
How a discomfort sparked an idea
Tags: productivity, mentalhealth
Published: 2021-02-13 13:50:13

I’ve been coding and building projects for more than 5 years. This week I officially launched my first product on product hunt.

On a typical day, I take my phone along with me as I go to work. In transit, I read articles on my mobile phone. When I arrive at my office, I switch to my computer and finish up the article before proceeding with the work of the day.

One day, on arriving at my office, I wanted to open the article on my computer, so I checked the link to the article and discovered it had a long url. On a typical day I would have either copied down the url on a sheet of paper then transfer it to my computer, memorize the link and copy it part by part or searched for the title on Google. These approaches took time and broke my concentration and flow.

This time I decided to do things differently. I created [ShareTXT](http://sharetxt.live), a web application that allowed me to share text between browsers in real time. All I needed to do was to visit the website on both my devices then paste the link. The text appears automatically on the other device where it can be copied. The app uses web sockets so the data transfer happens in real time.

After it was complete, I reached out to some people and they were super excited about the app. They contributed and left insightful feedback. You can check out the list of contributors [here]( https://github.com/rexthonyy/sharetxt#people)

I’m incredibly excited to say that ShareTXT [launched on product hunt](https://www.producthunt.com/posts/share-txt) on the 13th of Feb 2021

Enjoy!
Real Estate Landing Page
Published: 2021-02-13 13:29:18

Hi, This time we have a PSD to HTML beautiful Landing Page for a Real Estate, the design is simplt but it's cool.

The page is not responsive yet,it was a quicky coding session, but tomorow we will work on that and push to github.

github repo for the page code: https://github.com/kotaid/Real-Estate-Landing-Page

If you want any Psd to Html work i would Like You pust me in mind or suggest me: this is my Fiver link: https://www.fiverr.com/khalil_kotaid

credit for the design: https://www.uidesigndaily.com/posts/photoshop-real-estate-landing-page-day-159.

Thank you for checking the post.
Installing Curl on Windows
Tags: curl, windows, tutorial, api
Published: 2021-02-13 13:25:22

## Download the latest zipped binary

You can download it at [https://curl.se/windows/](https://curl.se/windows/), choose either 64-bit or 32-bit, depends on your machine preference.

## Extract and Move to Program Files Directory

Program Files directory is a good place for any program directory, so let's create a folder inside `C:\Program Files` named `Curl` and extract the zip to this folder.

![Curl Directory](https://dev-to-uploads.s3.amazonaws.com/i/osbg967g665ocdnosvti.png)

## Add Path For Executable Curl

Hit the `Windows` icon on the keyboard and type `edit the system environment variables` and the menu. The `System Properties` window will popped-up. Click the `environment variables` button and the environment variables window will popped-up. In the `User variables for <your-user>`, find and choose `Path` and then hit the `Edit` button. The `Edit environment variable` window will popped-up and click the `New` button and add `C:\Program Files\Curl\bin` and then hit OK for all windows.

![Environment Variables Windows](https://dev-to-uploads.s3.amazonaws.com/i/jwwywuwisicksh8dy8ep.png)

## Test the Curl

Open new CMD/CommandPrompt instance and try to type `curl --help` and enter. If you see the list of commands usage, then it already works.

```
C:\Users\dendi>curl --help
Usage: curl [options...] <url>
     --abstract-unix-socket <path> Connect via abstract Unix domain socket
     --anyauth       Pick any authentication method
 -a, --append        Append to target file when uploading
     --basic         Use HTTP Basic Authentication
     --cacert <CA certificate> CA certificate to verify peer against
     --capath <dir>  CA directory to verify peer against
 -E, --cert <certificate[:password]> Client certificate file and password

...

```

## Hit an Open API

try it like this:

```sh
curl -X GET "https://swapi.dev/api/people"
```

See it it succeed retrieving the data
Easily upgrade or downgrade your Node.js version
Tags: node
Published: 2021-02-13 13:07:04

Sometimes, when you are working on a project which uses a different version of Node.js than what's installed on your dev machine, you may want to change to the Node.js version required by the project.

All you have to do is install a package called [n](https://www.npmjs.com/package/n), which caches node versions on your dev machine.

Install n using npm
```
npm install -g n
```

After executing the above command, you may receive a series of npm warnings followed by npm ERR! You can execute these three commands which are also mentioned [here](https://www.npmjs.com/package/n).

```
# make cache folder (if missing) and take ownership
sudo mkdir -p /usr/local/n
sudo chown -R $(whoami) /usr/local/n
# take ownership of node install destination folders
sudo chown -R $(whoami) /usr/local/bin /usr/local/lib /usr/local/include /usr/local/share
```

Now, you can install any version of Node.js you want.
Executing as `n <version>` you can download and install a version of Node.js. If the `<version>` has already been downloaded, n will install from its cache.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/rv886hepsgo3mdwyosyl.png)

To change to the latest version of node

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ioei43feqy84d811pm5i.png)

You can also check the versions of node your <i>n</i> package has, by simply executing the following command `n`

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8ilpmnuyll5lfh9i6fin.png)

Executing the above command provides the versions cached.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ardjg7a5s1kfncykmz6f.png)

I hope this post helps you switch between different Node.js versions. Please like this post and follow me for more such posts.

References
[1] https://www.npmjs.com/package/n
Daily Developer Jokes - Saturday, Feb 13, 2021
Tags: jokes, dailydeveloperjokes
Published: 2021-02-13 13:00:16

---
title: "Daily Developer Jokes - Saturday, Feb 13, 2021"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Saturday%2C%20Feb%2013%2C%202021"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258884db70.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ What do you call a busy waiter?

___A:___ A server.
 -->
AWS Lambda C#
Published: 2021-02-13 12:49:50

##Como escrever sua primeira função AWS Lambda 'C#'
(https://adamtheautomator.com/aws-lambda-example/)

##Projeto básico do AWS Lambda
(https://docs.aws.amazon.com/pt_br/toolkit-for-visual-studio/latest/user-guide/lambda-creating-project-in-visual-studio.html)
Ferramentas Online Úteis
Published: 2021-02-13 12:45:36


##Favicon Generator
[Favicon Generator](https://realfavicongenerator.net/)

##Convert JSON to PHP Array Online
[Convert JSON to PHP Array Online](https://wtools.io/convert-json-to-php-array)

##PNG to ICO file converter
[PNG to ICO file converter](https://convertico.com/)

##QR Code Generator
[QR Code Generator](https://www.the-qrcode-generator.com/)

##XML to JSON Converter
[XML to JSON Converter](https://www.freeformatter.com/xml-to-json-converter.html#ad-output)

##Online Database Schema Design and Modeling Tool
[dbdesigner](https://www.dbdesigner.net/)

##GEOGRAPHIC LOCATION OF YOUR WEBSITE'S VISITORS
[geolocation-db](https://geolocation-db.com/documentation)
Number one skill you need to go from a good dev to a great developer
Tags: beginners, webdev, productivity, codenewbie
Published: 2021-02-13 12:20:46

Hey there 🤟, today let's talk about what is the most logical and practical skill you need to be a great developer. Here are some of the things I found on the web. 

- **Curiosity**:  the will to explore more aka  WANDERLUST. 
- **Technical Skills**: if you don't have then you can always learn them.
- **Love of learning**: where's Php now? if you don't learn your gonna be in trouble.
- **Communication skills**: a must if you wanna do anything in life.
- **Positive attitude**: if you don't have this you won't last long in this industry.
- **Good time and task management**: it's a superpower to have this, complete one week of work in one day.
- **Good team player**: don't play blame games, take ownership

 These are pretty obvious things that we have been hearing for ages. So which is the number one skill you need? **It's patiently reading stuff online**. 

How ? lemme explain. Throughout your software dev journey, no matter how many jobs you change, no matter how many startups you work in, no matter what you do you cannot ignore one thing and that is bugs. You cannot ignore these no matter what, even if you code in HTML  you will have bugs. Things will not work as they are supposed to work. Something unexpected will definitely happen and to make it work you will use Google (or Bing if you're a complete newbie).  So how will you solve that bug?  Googling, reading articles online, copy-pasting code from stack overflow, reading documentation, etc. If you patiently read each and everything related to your bug you will grow exponentially, although it will take time to read stuff, but it is worth it. It will give you complete insights on what was the mistake that you're making unless it was a typo. It is the number one thing that has helped me grow and will definitely help you too 

If you liked what you just read consider liking the post or leaving a comment or maybe do both xD.
Do you even Refactor? 001
Tags: codenewbie, beginners, python, algorithms
Published: 2021-02-13 12:16:51

Code refactoring is crucial but often overlooked. It can improve the design and performance of existing code.

The Python code below takes about 12 seconds to execute. Refactor the `getData` function to make it run in less than 1 second. Post your answer in the comments.

```py
import time

def getData():
  arr = []
  for i in range(1000*1000*100):
    arr.append(5)
  return arr


def timed(func):
  def run():
    Tstart = time.time()
    func()  
    Tend = time.time()
    Tdt = round(Tend - Tstart, 2)
    print(Tdt, 'seconds')
  return run

@timed
def main():
  print(len(getData()))

main()
```