teleren/devto huggingface dataset:
My experience at LHD
Tags: mlh, majorleaguehacking, localhackday
Published: 2021-01-11 19:14:23

In this post I discuss the currently ongoing Local Hack Day: Build event conducted by Major League Hacking community.

#Guilds
So, my absolute favorite thing about LHD so far has been the guild system. Everyone is supposed to join a guild, which is basically just a group of programmers and noobs alike, and has to complete some given tasks to earn points for their guilds. More on these challenges later. I love the enthusiasm this guild system invokes in all the members of a guild. Of course everyone wants to see their guild rise the ranks!

#Challenges
We are assigned a set of daily challenges (which change every day) and a set of week-long challenges. Completing them earns you and your guild points! And it doesn't matter if you don't know how to program because there are non-coding related challenges too! ((( including one that asks you submit a post on dev.to )))

#Events
In addition to all the events, LHD also including live events which are hosted on twitch! In some of them you just get to have fun and hang out with other developers, in others you learn new skills and see their hosts use them to you in real time!

<br>
So at the end of the day LHD is an amazing event for especially for those who have never attended a hackathon before to get to interact with an amazing and helpful community and to get more skills under your belt!
I HATE CODING, CHANGE MY MIND.
Tags: career, computerscience, programming, productivity
Published: 2021-01-11 19:09:15

I am like seasonal coder, I was never regular and because of it I forget most of the stuff. it feels guilty to me if I don't code. I like building products which is useful to everyday life. its interesting, I agree, but I am not giving enough efforts, at the end of the day, I don't find any improvement in myself. that frustrates me. 
need some help friends. seems like I am messed up.
Undefined name 'ScaffoldMessenger'. Try correcting the name to one that is defined, or defining the name.
Published: 2021-01-11 18:54:40

1. Check channel of flutter using `flutter channel` - This gives a result like 

> Flutter channels:
  master
  dev
  beta
  stable

2. In my instance the branch used was stable, for new and unrealeased features use dev or master `flutter channel ChannelName `

3. Then type `flutter upgrade` to update changes in your project sdk

Here is a better explanation about the different branches in flutter
>master

>The current tip-of-tree, absolute latest cutting edge build. Usually functional, though sometimes we accidentally break things.

>dev

>The latest fully-tested build. Usually functional, but see Bad Builds for a list of known "bad" dev builds. We continually try to roll master to dev. Doing so involves running many more tests than those that we run during master development, which is why this is not actually the same to master.

>beta

>Every month, we pick the "best" dev build of the previous month or so, and promote it to beta. These builds have been tested with our codelabs.

>stable

>When we believe we have a particularly good build, we promote it to the stable channel. We intend to do this more or less every quarter, but this may vary. We recommend that you use this channel for all production app releases. We may ship hotfixes to the stable channel for high-priority bugs, although our intent is to do this rarely.
Nuxt SSR head meta attributes Correct Format
Tags: nuxt, vue, vuemeta, nuxtssr
Published: 2021-01-11 18:26:43

#### Wrong Format
```
data: () => {
    return {
      title: 'Page Title',
    }
  },
  head: () => {
    return {
      title: this.title
    }
  },
```

#### Correct Format
```
data: () => {
    return {
      title: 'Page Title',
    }
  },
  head() {
    return {
      title: this.title
    }
  },
```
Loops in python
Tags: python, programming, beginners, tutorial
Published: 2021-01-11 18:12:00

Have you ever felt like you are doing certain tasks again and again in life?
Well, I'm no expert in helping with your life!
Although, if you would ever face the same situation in a programming language I can help you with that.

In programming, we can repeat certain tasks using loops.
Let's go through them one by one.

## `for` loop
* `for` loop in python repeats over each item of a given sequence (a list or a string), in the order that they appear in the sequence.

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

Output:
```
I want to watch a movie directed by James Cameron
I want to watch a movie directed by Christopher Nolan
I want to watch a movie directed by Steven Spielberg
```

* But, let's say you are a programmer who needs to iterate over a sequence of numbers, given the limit you want. Well, then you can make use of the built-in function range() which generates arithmetic progressions:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0dmso0beomdrne8oui29.png)

Output:
```
0
1
2
3
4
```


## while loop
* `while` loop in python repeats any given set of code until the give condition returns true.

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

Output:
```
0
1
1
2
3
5
8
```

### Best Resources

- [Python Blog Series](https://dev.to/aswin2001barath/series/10416) : A Blog series where I will be learning and sharing my knowledge on each of the above topics.

- [Learn Python for Free, Get Hired, and (maybe) Change the World!](https://academy.zerotomastery.io/a/aff_tz1t0tpx/external?affcode=441520_dcwk-s8s) : A detailed roadmap blog by Jayson Lennon (a Senior Software Engineer) with links to free resources.

- **Zero To Mastery Course** - [Complete Python Developer](https://academy.zerotomastery.io/a/aff_9khypm7v/external?affcode=441520_dcwk-s8s) : A comprehensive course by Andrei Neagoie (a Senior Developer) that covers all of the above topics.

**Who Am I?**

I’m Aswin Barath, a Software Engineering Nerd who loves building Web Applications, now sharing my knowledge through [Blogging](https://medium.com/techsoftware) during the busy time of my freelancing work life. Here’s the link to all of my socials categorized by platforms under one place: https://linktr.ee/AswinBarath

**Thank you** so much for reading my blog🙂.
Pull remote branches
Tags: github, branches, versioncontrol, git
Published: 2021-01-11 18:11:40

When you pull a new repository , not all remote branches are pull

1. type `git fetch --all`
    This command fetches all remote branches from your repository
2. type `git branch -r` to view all your remote branches *The two commands do not automatically pull your remote branches, you have to create a local branch and pull from the remote branch*

3. Type `git checkout -b branchName origin/branchName` - Replace **branchName** with the name of the remote branch you 
   wish to pull
SEO Tutorial
Published: 2021-01-11 17:47:09

SEO is basically used for rank a website or webpage with the use of keywords on the search engine result page and for ranking that website you need content. If we want a website or webpage rank faster then we should have quality content which directly affects user need whatever it is information or product. If you are a beginner and you want to learn more then you can visit PHPTPOINT.  To get more information about it you should visit here. https://www.phptpoint.com/seo-tutorial/
👩‍💻Local Hack Day: Build Day 1
Published: 2021-01-11 17:47:05

[Local Hack Day: Build ](https://localhackday.mlh.io/build#hero)

So far, I've introduced myself to #introduce-yourself and my guild,  attended the live session "Set Up a Personal GitHub Page".
I updated my portfolio website on Github pages.
[Prtfolio](https://olg200492.github.io/)

Here go Day 2!!!
Why won't anything draw on my canvas?
Tags: javascript, help, webdev
Published: 2021-01-11 17:18:25

Whenever I try to draw a custom image in JS, it doesn't draw anything, when I try to log `X` or `Y` in the loop, it returns normal values, when I log the color, it's perfectly normal.

So, why won't it draw anything?
```javascript
const text = `Example`;



const makeColor = function makeColor(input, maxX=Infinity, maxY=Infinity) {
    let X = 0;
    let Y = 0;

    let peakX = -1;
    let peakY = -1;
    if(maxX < Infinity) maxX;



    const encode = function encode(input) {
        let estr = "";
        for(const chara of input) {
            estr += String(Number(chara.charCodeAt(0), 16));
        }
        return estr;
    };


    const colors = [];
    let color = "";
    let itr = 0;
    for(const chara of encode(input)) {
        color += chara;
        if(color.length >= 6) {
            itr += 1;
            colors.push(color);
            document.writeln(itr+": "+color+"<br/>");
            color = "";
        }
    }

    if(color.length < 6 && color.length > 0) {
        color += "0".repeat(6-color.length);
        colors.push(color);
        document.writeln(color+"<br/>");
        color = "";
    }



    Object.freeze(colors);


    try {
        const canvas = document.getElementById("result");
        const ctx = canvas.getContext("2d");

        try {
            for(const color of colors) {
                console.log(X, Y);
                ctx.fillStyle = "#"+color;
                if(X > maxX) {
                    if(peakX <= -1 || X > peakX) peakX = X-1;
                    X = 0; Y++; ctx.fillRect(X, Y, 1, 1); X++; continue;
                }
                if(Y > maxY) break;
                ctx.fillRect(X, Y, 1, 1); X++;
            }
            if(maxX >= Infinity) peakY = 1;
            canvas.style.width = canvas.width = peakX;
            canvas.style.height = canvas.height = peakY;
        } catch(err) {throw new Error();}
    } catch(err) {console.error("Could not draw image!");}
};



makeColor(text, 30);

```
#Day 24-27: Learning pygame and started Codechef journey
Tags: 100daysofcode
Published: 2021-01-11 17:16:56

Hello there!

I was quite busy due to my class work and could not postmy update here. 

As I know Python, I thought its application will be helpful. While looking for Pyhton related projects, pygame interested me. I saw various videos on Youtube and the one of 'Flappy Bird' by Clear Code seemed really beginner friendly. He has explained everything so well. I spent an entire day making pixel arts for sprites. I got an idea from the anime "Demon Slayer". There is a character called "Zenitsu" who is afraid of literally everything. XD So I have replaced Flappy bird and the pipes with Zenitsu and spiders respectively.
I will shared the result here once I have completed it fully well.

Also, today in order to get used to Codechef platform, I've started solving DSA learning Series.
Github Deprecates Password Authentication Part 1
Tags: github, opensource, git, ssh
Published: 2021-01-11 17:13:21

---
title: Github Deprecates Password Authentication Part 1
published: true
description: 
tags: github, opensource, git, ssh
//cover_image: https://direct_url_to_image.jpg
---

WTF Github, I ended up writing this whole blog post again. ugh.

It all started with an email github sent titled "Deprecation Notice".


![Deprecation Notice](https://thenerdsuperuser.xyz/assets/images/deprecation_mail.png "Scary, isn't it?")

Apparently, last month Github thought of [deprecating the password based authentication](https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/) for it's repositories. They switched to either of the two methods instead:   
1. [Personal Authentication Token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token)   
2. [SSH Authentication](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/connecting-to-github-with-ssh)   

Now this came as a shocker, even though the deadline is [August 13, 2021](https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/#:~:text=Beginning,2021). Although they have published it on their blog, not many people have come to know about it, atleast none of my friends. So more the need to bring it out to notice.

Now, why are we using an SSH/PAT based approach exactly? I mean, it was fine while we were using the usual password based authentication. Well, as we know, tokens have been used everywhere. Be it a django app, or a password reset form which I am pretty sure everyone reading this has filled, atleast twice.
> and if not, then wow, you have either a very good memory, or you need to update your passwords!

Coming back to PAT. The reasons it is preffered are:   
1. **Unique** – tokens are specific to GitHub and can be generated per use or per device.   
2. **Revocable** – tokens can can be individually revoked at any time without needing to update unaffected credentials.   
3. **Limited** – tokens can be narrowly scoped to allow only the access necessary for the use case.   
4. **Random** – tokens are not subject to the types of dictionary or brute force attempts that simpler passwords that you need to remember or enter regularly might be.   

This is a 3 part blog, where I will be showing you what the changes are, and how to enable SSH based auth and create Personal Authentication Tokens. 

Feel free to contact me over [twitter](https://twitter.com/vimoveremacs)!
The definition of Software and Characteristics of a Software
Tags: testing, devops, beginners
Published: 2021-01-11 17:12:14

**What is Software?**
Software is a series of instructions, data, or programs for operating computers and performing specific tasks. 
Example: **MS Word, MS Excel, Firefox, Chrome,  Microsoft PowerPoint, Skype, etc.**
![Post 1](https://dev-to-uploads.s3.amazonaws.com/i/ooi7vnu9wvddl0vj1y39.png)
 
There are **two major types of Software**:-

**Generic Software:**
Stand alone, sold on the open market, less expensive.Cannot accommodate future changes.
Example:**Microsoft Word, Microsoft PowerPoint, Microsoft Excel**

**Customized Software:**
For the specific customer, more expensive Can easily accommodate future changes
Example:**e-commerce, Microsites, Multiple user bases.**

**Good Software & Bad Software:** 
**Good software** is maintained, works well, and always available.
**Bad software** is discarded, difficult to use, and not always available.
![Post 2](https://dev-to-uploads.s3.amazonaws.com/i/tb992lg1zd0umrgxjhbl.png)
![Post 3](https://dev-to-uploads.s3.amazonaws.com/i/js0x8gcg2528gxd5jxel.png)
  
*Different Characteristics of a Software-*
![Post 4](https://dev-to-uploads.s3.amazonaws.com/i/f4txmgarw50fcj9ymrqz.png)
 

**Logical**: A logical element rather than a physical system.

**Engineered**: Software is developed or engineered but not manufactured. So, it does not require any raw material for its development.

Does not “**wearing out**”: Once-created software never wears out. It can be used for as long as possible, and the necessary changes can be made in the same software in case of need for any update, and then it can be further used with updated features.

**Intangible**: Because of its non-physical nature, Software is known as an intangible asset.

Like an “**Aging Factory**”: Programs get old, like humans. We can't stop aging, but we can consider its causes, and we can take action to minimize its effects.
5 canais no youtube para você se desenvolver mais em React Native
Tags: reactnative, mobile, programming, react
Published: 2021-01-11 17:01:19

Em nosso dia-a-dia em programação e louvável quando conseguimos criar todo o algoritmo de primeira, lembrando e aplicando todos os paradigmas da linguagem na ocasião. Mas normalmente até atingirmos esse ponto de maturidade precisamos passar por um longo caminho de descobertas, com isso, vejo que hoje a maior qualidade dos programadores mais experientes, além da execução, e uma ótima orientação de análise e pesquisa, isso fica cada vez mais claro ao longo do tempo onde vamos percebendo que a maior parcela do nosso trabalho se baseia em análise e pesquisa, com isso tendo boas referências, conseguimos otimizar muito nossas entregas.

Segue uma lista das referências que mais consumi no ano de 2019/2020 quando o assunto era [**React Native**](https://reactnative.dev).

### [**1. React Native School**](https://www.youtube.com/c/ReactNativeSchool/featured)

[![React Native School](https://dev-to-uploads.s3.amazonaws.com/i/q2wjd8zov2vksa57dw5g.png)](https://www.youtube.com/c/ReactNativeSchool/featured)

###[**2. Catalin Miron**](https://www.youtube.com/channel/UCTcH04SRuyedaSuuQVeAcdg)

[![Catalin Miron](https://dev-to-uploads.s3.amazonaws.com/i/co9a805o65lu80lemn7x.png)](https://www.youtube.com/channel/UCTcH04SRuyedaSuuQVeAcdg)

###[**3. Willian Candillon**](https://www.youtube.com/channel/UC806fwFWpiLQV5y-qifzHnA)

[![Willian Candillon](https://dev-to-uploads.s3.amazonaws.com/i/iiqka5ra4oae8zxllus6.png)](https://www.youtube.com/channel/UC806fwFWpiLQV5y-qifzHnA)

###[**4. Guilherme Rodz**](https://www.youtube.com/channel/UCbJAKfdCHqjrM63VgTNGYOA)

[![Guilherme Rodz](https://dev-to-uploads.s3.amazonaws.com/i/dv6etutukseiuus20qra.png)](https://www.youtube.com/channel/UCbJAKfdCHqjrM63VgTNGYOA)

###[**5. Geek Dev**](https://www.youtube.com/c/CanalGeekDev/videos)

[![Geek Dev](https://dev-to-uploads.s3.amazonaws.com/i/h7eetef27lrm52t9lgjf.png)](https://www.youtube.com/c/CanalGeekDev/videos)

## **Faixa Bônus**

Abri essa faixa bônus para destacar as principais referências que tive quando precisei me aprofundar no quesito `estrutura de dados` e `boas práticas`:

###[**1. Mango**](https://www.youtube.com/channel/UCabelTt5YHot17aKb19VRNA)

[![Mango](https://dev-to-uploads.s3.amazonaws.com/i/8u88qcw15nnqev7m9ntb.png)](https://www.youtube.com/channel/UCabelTt5YHot17aKb19VRNA)

###[**2. Willian Justen**](https://www.youtube.com/user/willjusten)

[![Willian Justen](https://dev-to-uploads.s3.amazonaws.com/i/7ztc2dvimyi9e9ufocuw.png)](https://www.youtube.com/user/willjusten)

###[**3. Rocket Seat**](https://www.youtube.com/channel/UCSfwM5u0Kce6Cce8_S72olg)

[![Rocket Seat](https://dev-to-uploads.s3.amazonaws.com/i/3wqm5u56bt0shxczbgws.png)](https://www.youtube.com/channel/UCSfwM5u0Kce6Cce8_S72olg)

---

<center>**Se puder, dê aquela moral =)**</center>

<a href="https://www.buymeacoffee.com/didisouzacosta"><img src="https://img.buymeacoffee.com/button-api/?text=Me pague um café&emoji=&slug=didisouzacosta&button_colour=FFDD00&font_colour=000000&font_family=Arial&outline_colour=000000&coffee_colour=ffffff"></a>
My First Experience with TypeScript
Tags: mlh, majorleaguehacking, localhackday, typescript
Published: 2021-01-11 16:56:30

I was going to start a challenge by [MLH: Local Hack Day](https://localhackday.mlh.io/build#schedule), and the challenge was to write **Hello World** in a new programming language, and I thought I have never ever worked or even saw a code in TypeScript, so I started exploring and learning about it, and I literally got shocked and amazed how it works. 
Don't judge, haha, I am a noob in TS. 

## Why I got amazed?

Since browsers natively does not understand typescript, but they understand javascript. So in order to run typescript codes, first it is transpiled to javascript.

And when I compiled the program, it created a new file with **.js**, as it should be. This was the most shocking, I really don't know why, because I have never seen such type of working in any other programming languages that I have used. It was cool.

I just started with TS, so created my first program.


## What is TypeScript?

> “TypeScript is JavaScript for application-scale development.”  

TypeScript is an open-source programming language. It is developed by Microsoft. 
It follows JavaScript syntactically but adds more features to it. It is a superset of JS. 

![TS and JS](https://qph.fs.quoracdn.net/main-qimg-1bb226be271cbb969e55513384f2401d.webp)

## Feature of TS

- Purely object-oriented, with features like classes, objects, and interfaces like Java
- TypeScript supports other JS libraries
- Any valid .js file can be renamed to .ts and compiled with other TypeScript files
- TypeScript is portable

## Running a TS code

**Browsers natively does not understand typescript, but they understand javascript. So in order to run typescript codes, first it is transpiled to javascript.**  
**tsc** : is a typescript compiler(transpiler) that converts typescript code into javascript.  
You can install tsc by running the following command:

```npm install -g typescript```

## Write your first program

- Create a file named "helloworld.ts".
- Add these lines of code.

```
var greet: string = "Greetings"; 
var message: string = "MLH Local Hack Day!"; 
console.log(greet + " from " + message); 
```
- To compile, run the following command:
```tsc helloworld.ts```

This command will generate a javascript file with name helloworld.js  

- Run the javascript file using the following command on the command line :

```node helloworld.js```

- Output:

```Greetings from MLH Local Hack Day!```

### GitHub repo for the same
{%github seema1711/typescript-hello-world no-readme%} 

Hit a ❤, if you are also new to TS. 

You can connect with me on:
🎥[YouTube](https://youtube.com/BashWoman)
⚒[LinkedIn](https://linkedin.com/in/seemasaharan)
🧵[Twitter](https://twitter.com/SeemaSaharan5)
✍[Hashnode](https://bashwoman.hashnode.dev)
📷[Instagram](https://instagram.com/bashwoman)
A 2 years old alternative to React server components
Tags: react, javascript, node, markdown
Published: 2021-01-11 16:54:32

Over the last almost two years, I and my friends have been using a custom framework for our daily freelances. 

Nullstack has the concept of server functions since day one and one of my favorite features of it is the fact that it only exposes the minimum required dependencies to the client bundle, but is still a fully capable SPA framework.

In the light of the recent posts about react server functions I decided to make a video explaining the solution we came up with.

This video is the last part of a playlist that describes the most used features of Nullstack in under 20 minutes.

{% youtube 8PExa5-G1As %}

The video shows step by step the mental process behind a demo with server components that works offline as well, but for those who just want to see some code, here is a quick example:

```jsx
import Nullstack from 'nullstack';
import {readFileSync} from 'fs';
import {Remarkable} from 'remarkable';

class About extends Nullstack {

  readme = '';

  static async getReadme() {
    const text = readFileSync('README.md', 'utf-8');
    const md = new Remarkable();
    return md.render(text);
  }

  async initiate() {
    this.readme = await this.getReadme();
  }
  
  render() {
    return (
      <article html={this.readme} />
    )
  }

}

export default About;
```

You can learn more about it in the [Nullstack Documentation](https://nullstack.app)
Heartify
Tags: dohackathon
Published: 2021-01-11 16:36:24

- What I built
The problem Heartify solves
This project aims to solve small heart check-ups related issues. if a person is in doubt after a report that he/she might have heart disease, they can check by using his app. This app will tell if they have heart disease or not
- Category Submission: 
Program for the People
- App Link
https://corona-api-rbl5v.ondigitalocean.app/

- Screenshots
![Corona-API](https://dev-to-uploads.s3.amazonaws.com/i/45uuwn27h0xhamtqx3wv.png)
 
- Description

- Link to Source Code
https://github.com/ShubhamPatel33/Corona-API
- Permissive License
MIT Licence

- Background
(What made you decide to build this particular app? What inspired you?)
I thought to make a webpage which provides you with the latest number of cases in each field.
I tried to do it using a API but was not successful after many trials as i didn't had any knowledge about JavaScript and still submitted the project cause it still have my efforts. 
- How I built it 
I had build it on HTML,CSS and JavaScript and used the Digital Ocean to Host it on the web.

-Aditional :
I will try to implement the APi thing in the app and then Update the LINK.