teleren/devto huggingface dataset:
LeetCode vs Projects (Hedgehog or Fox)
Tags: career, beginners, programming, productivity
Published: 2022-02-14 00:06:05

What would you do to get hired, Litecode or work on projects?

To me, it seems to be the exploitation vs exploration tradeoff. You can specialize and become very good at solving algorithmic challenges. You can even get hired for this in FAANG. 

However, building projects and solving your problems with the software will be more rewarding in the long game. It will teach you the experience needed to build and maintain projects as well as you are going to have an opportunity to make money out of it. :moneybag: It'll be easier for you to answer technical questions at the interviews since you will talk about challenges you encountered when working on your project.

As you will be working on your projects, you are likely to run into problems that will require some algorithmic solution. No worries, you will learn how to solve those once you start Googling and researching how to do what you want to do.

TLDR: Litecode will teach you one thing, working on your own projects will teach you many.
Arrow function vs Regular function
Tags: javascript, webdev, beginners, programming
Published: 2022-02-13 23:31:01


**A**rrow function and regular function ( function expression) are used interchangeably in our code without knowing the difference between them which could cause some confusing behavior, in this article I will mention 3 important differences between arrow function and regular function.

##1. This value

The value of ***this*** depends on how function is invoked, in javascript there are 4 ways to invoke a function.

###1. Simple invocation


 ```javascript
 const foo = function(){
  console.log(this) // global object
}  
foo()  
```

###2. Method invocation
 

```javascript
const obj = {
 foo(){
 console.log(this) // { foo: [Function: foo] }

}
}
obj.foo()
 ``` 

###3. Indirect invocation


```javascript
const obj =  {
  name : "javascript"
}
const foo = function(){
 console.log(this) // { name: 'javascript' }

}

foo.call(obj)
```

###4. Constructor function

```javascript
const Language = function(name){
 this.name = name
}

new Language("javascript") // {name:javascript}
```

For the arrow function the behavior of ***this*** differs from the regular function, the arrow function doesn’t have its binding to ***this*** but it establishes ***this*** based on the lexical scope the arrow function defined within. this difference could cause a strange behavior when we use arrow functions as methods, so it’s better to avoid using arrow functions as methods.

```javascript
const obj = {
 foo :()=>{
 console.log(this) // window
}
}
obj.foo()
```

##2. Constructors


Arrow function cannot be used as constructors, if you try to invoke arrow function’s prefix with new keyword, javascript throws an error.
```javascript
 const Language = (name)=>{
 this.name = name
}

new Language("javascript") // TypeError : Language is not a constructor
```

##3. Arguments object


Inside the body of a regular function, arguments is an array-like object containing the function invocation arguments.
```javascript
function myFunction() {
  console.log(arguments);
}
myFunction('a', 'b'); // { 0: 'a', 1: 'b', length: 2 }
```
on the other side there is no special arguments keyword inside the arrow function, but it accesses arguments from the outer function 
```javascript
function RegularFunction() {
  const ArrowFunction = () => {
    console.log(arguments);
  }
  ArrowFunction('c', 'd');
}
RegularFunction('a', 'b');  logs { 0: 'a', 1: 'b', length: 2
```



##Conclusion 


We have discussed in this article about 3  differences between arrow functions and regular functions which is : 
- This value
- constructors
- arguments object

*What other differences between arrow and regular functions do you know?*
Front-end developer
Tags: frontend, frontenddeveloper, developer, webdeveloper
Published: 2022-02-13 23:12:41

Conteúdos sobre desenvolvimento front-end no Instagram: <a href="https://www.instagram.com/ana.tech.dev/"><img alt="Instagram" src="https://img.shields.io/badge/ana.tech.dev-%23E4405F.svg?style=plastic&logo=Instagram&logoColor=white&color=blue"/></a>  <br>

<a href="https://www.instagram.com/ana.tech.dev/guide/desenvolvimento-web-front-end/18164552647134233/" target="_blank">Guia no Instagram</a> com 15 publicações.
<br><br>

💻 [Tutorial para devs](https://www.instagram.com/p/CUOdgw1gKrM/)
<br>
### Referências Front-end:
🌐 [MDN Web Docs](https://developer.mozilla.org/pt-BR/) <br>
🌐 [W3C](https://www.w3c.br/) <br>
🌐 [Can I use](https://caniuse.com/) <br>
🌐 [CSS-Tricks](css-tricks.com) <br>
🌐 [Referências para desenvolvedores front-end](https://www.instagram.com/p/CRY2ZUaD9kS/) <br>
<br>
### Repositórios recomendados:
💻 [Repositórios para favoritar no GitHub](https://www.instagram.com/p/CTf72KfDN0n/) <br>
💻 [WoMakersCode / Front-end Challenges](https://github.com/WoMakersCode/challenges-front-end) <br>
💻 [Front-end Brasil - O mundo frontender dentro do GitHub](https://github.com/frontendbr) <br>
💻 [Felipe Fialho / Frontend Challenges](https://github.com/felipefialho/frontend-challenges) <br>
💻 [Felipe Fialho / Frontend Feed](https://github.com/felipefialho/frontend-feed) <br>
<br>
### Tutoriais em posts:
💻 [Tutorial Front-end com Front in Sampa @frontinsampa](https://www.instagram.com/p/CVTy0aMDOMW/) <br>
💻 [Post com e-books e materiais](https://www.instagram.com/p/CZpwv9hlTV_/) <br>
💻 [Cursos, eventos, materiais e referências front-end](https://www.instagram.com/p/CXpJkvDgYv1/) <br>
<br>
### Repositório de Tutoriais do Github:
💻 [github.com/anamariasilva/github](https://github.com/anamariasilva/github) <br>
<br>
### Artigos Front-end:
🔗 [Artigos de Front-end da Alura](https://www.alura.com.br/artigos/front-end) <br>
<br>
### Sites de consulta:
🔗 [Frontend Developer Roadmap](https://roadmap.sh/frontend) <br>
🔗 [Site do Maujor](https://www.maujor.com/) <br>
🔗 [Stack Overflow em Português](https://pt.stackoverflow.com/) <br>
🔗 [W3Schools](https://www.w3schools.com/) <br>
<br>
### Livros e e-books:
📘 [Livros de Front-end - Casa do Código](https://www.casadocodigo.com.br/collections/livros-de-front-end) <br>
📘 [Livros do Maujor](https://livrosdomaujor.com.br/) <br>
<br>
### Links complementares:
🎧 [Playlist no Spotify: Podcasts Tech para Devs](https://open.spotify.com/playlist/2grGG2vgZOOE0RjuWVV5iv?si=7uR86uv2S_aOOJ2bO0aygA&dl_branch=1&nd=1)

<br>
__<br>
Ana Maria Silva | <a href="https://www.anamaria.dev.br" target="_blank">www.anamaria.dev.br</a><br>
<a href="https://github.com/anamariasilva" target="_blank">github.com/anamariasilva</a><br>
<a href="https://github.com/anatechdev" target="_blank">github.com/anatechdev</a>
Contatos Ana Maria Silva
Tags: braziliandevs, womenintech
Published: 2022-02-13 23:07:14

`Hello World, DEV.to da Ana Maria`

💻 Cientista da Computação
💻 Desenvolvedora Front-end

🌐 Criadora de conteúdo no Instagram [@ana.tech.dev](https://www.instagram.com/ana.tech.dev) sobre Tecnologia e Desenvolvimento Front-end.

Por mais mulheres na tecnologia!

## Contatos:
[Instagram](https://www.instagram.com/ana.tech.dev)
[GitHub](https://github.com/anamariasilva)
[X](https://twitter.com/_anamariasilva_/)

🌐 [www.anamaria.dev.br](https://www.anamaria.dev.br/)
I've tested VPS from different providers with Geekbench and disk speed
Tags: geekbench, cloud, vps, devops
Published: 2022-02-13 23:03:44

[LINK TO A TABLE WITH SCORES](https://docs.google.com/spreadsheets/d/1FeGJ73Xtr1IPHsEEYJMKHMLV5H2i86ol/edit#gid=431223058)

Once in a while, I'm busy finding out if I should switch a provider with my projects. And this time, I spent some time and money on nine providers' small VPS "2CPU 4GB". Of course, most of them are more than VPS and provide much infrastructure.
But my stack is several VPS + Load balancer + S3 storage, so I'm not that demanding on options. Of course, I want a money/performance balance with a more significant weight on money.
The test was simple. It's just a Geekbench CPU test and copy files Disk test.

```
wget https://cdn.geekbench.com/Geekbench-5.4.4-Linux.tar.gz
tar xf Geekbench-5.4.4-Linux.tar.gz
cd Geekbench-5.4.4-Linux/
./geekbench5

dd if=/dev/zero of=/tmp/output conv=fdatasync bs=384k count=10k; rm -f /tmp/output
```

I tested three times and computed an average score. I was not surprised about big Cloud providers. They are x2-x3 times expensive and are not providing the same performance. Mainly I was surprised by Google Cloud, where they give two threads instead of 2 CPUs.
Alwyzon is a small provider in Austria. I saw amazing scores online and wanted to test them by myself. 
I'm currently using Digital Ocean, and I guess I will stay with it because Vultr has slow disks. I had a bad experience with OVH, and I'm not sure about the reliability of Hetzner.
Python 101 - Ultimate Python Guide
Tags: beginners, python, journey
Published: 2022-02-13 21:42:53

## Introduction To Modern Python

Python is an high level language, easy to learn but powerful as well. It uses the Object Oriented Programming approach. It can be used in a series of application such as application development, machine learning, artificial intelligence, automation and more. 

## Installation Process

It is simpler to use, and available for major operating system platforms such as Windows, Mac, Linux etc whose installation files can be found on [Python download](https://www.python.org/downloads/).

### Download the installer file 
This can be obtained from the python official site stated above. Ensure to download the latest stable version.

### Run the installer
please ensure to check the box that says *add python 3 x to path* this ensures that the installer places the interpretor in an execution path.

### Confirm installation
After the installation is complete, launch the command prompt on your PC and type `python3 --version` to ascertain the version of python that is been installed.

### Write your first line of codes
Create a directory on the command prompt, create a file, launch the file in a text editor.

![CMD File Creation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/596r7l5smfwlwh6bnhkn.png)

write your first line of code

```
message = "Hello World"

print(message)

```

to test these lines of code, return to your CMD and type `python3 <filename>`

There you go, your first python code running. Explore more and appreciate its wonders.

### You should also know
The program can also be splitted into reusable forms called **MODULES**

Just like every other programming language, python  uses the string, numeric, boolean, arays/list data types. using similar control flows such as if, elif(else if), while loop, for loops, functions and more. You can also use packages that can be imported directly into the code structure.

All python files saved into a text editor must end with the extension .py. There are a few interpreters that can be used alongside to test our code these includes; Jupyter notebook, Pycharm, Anaconda etc.

It is easily identified by this image 
![Python Logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kwhl6csrtl6hyw49sh6b.png)

#### **Please Note**
When writing python codes, indentation is very important, else one may run into errors. 

Follow this space for more.
Score A Field Goal In AR 🏈
Tags: augmentedreality, ar, gamedev, 3d
Published: 2022-02-13 21:14:16

![](https://miro.medium.com/max/1400/1*REyHAtfktBdmOntkSig9Cg.png)

Today is Super Bowl LVI! You don’t have to be an all star athlete to play on the field today. Build this quick AR demo launching the ball into the field goal.

(Psst…Turn your audio on for the best experience. You might have more fans than you think!) 📣

Versions Used
=============

**For AR-supported Android devices**

*   Unity 2019.4.0f1
*   [ARFoundation 3.1.0](https://www.youtube.com/watch?v=0mpsiO2lCx0)
*   ARCore XR Plugin 3.1.0
*   Android Build Support (with most updated versions ofAndroid SDK & NDK Tools, OpenJDK)

Register
============

Don’t have an API key? Make sure to register for FREE at [echo3D](https://www.echo3d.co/).

Run
=======

*   Clone [this repo](https://github.com/echo3Dco/SuperbowlAR).
*   [Add images](https://docs.echo3d.co/quickstart/add-a-3d-model) to the console from the Models folder in FieldGoalFolder/Models.
*   Set the API keys on all 3 game objects in the hierarchy: `echo3D_fieldgoal Variant`, `echo3D_football Variant`,`echo3D_turf Variant`
*   [Configure Player Settings for AR Foundation](https://developers.google.com/ar/develop/unity-arf/getting-started-ar-foundation#configure_player_settings)
*   [Build and run the AR application](https://docs.echo3d.co/unity/adding-ar-capabilities#4.-build-and-run-the-ar-application).

Learn More
==========

Refer to our [documentation](https://docs.echo3d.co/unity/) to learn more about how to use Unity and echo3D.

Support
=======

Feel free to reach out at [support@echo3D.co](mailto:support@echo3D.co) or join our support channel on [Slack](https://echo3d.slack.com/ssb/redirect).

Screenshots
===========

![](https://miro.medium.com/max/960/1*HXp0jc8AoRvDA9tDzn4mOA.png)![](https://miro.medium.com/max/960/1*Un9VeUALUYUGo0RJ-H-bmQ.png)![](https://miro.medium.com/max/960/1*cbGc8ccbP5Mz55BMmbsHBg.png)
Introduction To Modern Python
Tags: beginners, python, programming
Published: 2022-02-13 21:09:23

Python is currently being used for

- Data analysis

- Data science

- Scripting

- Embedded development

- Server-side development

## WHY CHOOSE PYTHON FOR PROGRAMMING?

**1. Easy to learn and use**
Python language is incredibly easy to use and learn for new beginners and newcomers. Due to its ease of learning and usage, python codes can be easily written and executed much faster than other programming languages.

**2. Many frameworks and libraries**
 python has excellent libraries that you can use to select and save your time and effort on the initial cycle of development such as Django,Numpy and matplotib

**3. Versatility, Efficiency, Reliability, and Speed**
 The python language is efficient, reliable, and much faster than most modern languages. The  best thing about versatility of python language is that it can be used in many varieties of environments such as mobile applications, desktop applications, web development, hardware programming, and many more. 

 **4. Automation**
 It is incredible to know that one can reach an advanced level of automation easily by just using necessary python codes. Python is the best performance booster in the automation of software testing also. One will be amazed at how much less time and few numbers of lines are required to write codes for automation tools.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kcktewvq3fkkl1otn5k8.png)

 _For beginners here_ is the official python site to  download python to you device[(https://www.python.org/)].Ensure to download the right python for your device and operating system.

You will need a code editor like[(https://code.visualstudio.com/)] that is open source and allows you download extensions.

Here is a link to a tutorial from beginner to Pro [(https://youtu.be/p15xzjzR9j0)]
Easy Way to Make a Div in HTML (using VS Code)
Tags: beginners, html, div
Published: 2022-02-13 21:07:49

Although I am new to web development, I can 100% appreciate a shortcut for writing code.

While I was watching a tutorial video, I saw someone use this shortcut for making a div with a class name or id name in VS code. It blew my mind and I just had to share!

Instead of writing out the complete div tag plus the class or id name, write the class name with a period in front of it, or the id name with a pound symbol in front of it. Press enter and you're done.

**To make a div with a class name:**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9jqprourjcndlvv8awgd.png)

*press enter*

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tf1ytgzl35os4n93fpac.png)

**To make a div with an id name:**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bmhgzqmf0i3ngqj91kub.png)

*press enter* 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d9jcy160v12h0lql3agh.png)


P.S. I hate to admit it, but I feel 10x cooler when I make my divs this way!
Export Medium Stories to Markdown format
Tags: medium, markdown, export
Published: 2022-02-13 20:54:42

## Introduction
If you are like me, I mean a frequent tech blogger. You would like to keep all your blog posts in Markdown format. If you have not thought about this until now, then I invite you to give a serious thought. 

Nothing could beat, a blog post in Markdown format. It is a simple format that is easy to read and write. It is also a very good format for blogs, and brownie points to store those in a git repository.

I have been writing on Medium for a while now, and was using its inbuilt editor. Lately I have started to use hashnode and dev.to. I thought, why not move my Medium blog posts to dev.to and hashnode (both of them supports markdown). However, there was no easy way provided by Medium to export them to markdown.

## mediumexporter to the rescue
- Install node on your computer
- Then install mediumexporter node package
```
npm install -g mediumexporter
```
- Finally, export your medium stories to Markdown format using mediumexporter

```
mediumexporter https://ksingh7.medium.com/kubernetes-endpoint-object-your-bridge-to-external-services-3fc48263b776 > exported-blog.md
```
- This will create `exported-blog.md` file in your present working directory, which is the markdown file you were looking for.

### Summary
Like everything, this is not a perfect solution. But it is a good start. You might want to review the code/image formatting, before you can re-port this blog to other platforms.

Special Thanks to the creator of  `markdownexporter` that I used to export my Medium stories to Markdown format. Thanks a lot and well done my friend :)
Difference between em and rem - CSS
Tags: css
Published: 2022-02-13 20:40:41

## What are they?
Both of them are CSS relative measurement units. Unlike for example, Pixels, which are fixed measurement.
What is the main difference between them?
ems will take the rems, that unlike ems, are consistent. They don’t depend on the values set by the parents of the current element. They set the size relative to the root element of the page, HTML in this case.

## How do you use them?
An ems unit is equal to the computed font-size for the element to which the em is applied. If no font size is defined anywhere in the CSS, the em unit will be equal to the browser’s default font size for the document, which is usually 16px.

**_1em = 16px
em size = pixel size/16_**

We can calculate rems by the following formula if the font-size of the body element is 16px:

**_rem = pixels/16_**

On pxtoem.com you can convert Pixels to em easily, even customising your em needs.

## Conclusion:
Using either of them would be better than pixel units because using it prevents the browser settings to make any size adjustments.
Both of them give us flexibility in our design working similarly. Still, it’s important to be able to differentiate them because it is how the browser will determine the px value they translate into. Use one of the other will depend on what your needs are.
My turn to be Sherriff 
Tags: opensource
Published: 2022-02-13 17:43:04

## Sheriff roles
- Planning on Tuesday
- Triage on Thursday 
- Assign Issue
- Review PR
- Make sure everyone is on track

## Experience being a Sheriff
This is the first time I manage such a large group. On Tuesday, the meeting was more of an open-ended discussion about a current issue. I and Joel were leading the meeting. It was pretty hard, especially discussing a topic where I'm not familiar. I feel lost, and not worth enough to be the sheriff. This is also the first time that I'm able to speak that long. I usually spoke around 0-10 minutes in a 1-2 hours meeting. This time I spoke for the whole meeting. On Thursday, Joel was leading the triage meeting and I was taking note of all important stuff discussed during the meeting. 
One thing I learned is that no one knows every part of telescope, if we don't know a part of telescope, we should know who in the call has expertise on that part. So we can directly ask for detail, such as what is this issue about, how long it will probably take...
Off meeting, we have to monitor slack and Github. Not gonna lie, it was pretty tough this week for me. I had one of my group members in PRJ that got Covid, and I was the only one in that week to implement most of the features for the frontend part. I feel this time I didn't do my job as a sheriff well enough compared to the others. But it's okay, we learn from mistakes and grow up. 
Also, this was the best time to practice my English skill for speaking part. 

Some of the issues I'm working 
[Issue #2732](https://github.com/Seneca-CDOT/telescope/issues/2732) - Still ongoing, discover some limitations with Apple restriction. 
[Issue #2791](https://github.com/Seneca-CDOT/telescope/issues/2791) - Almost done, just needed to figure out why Kong container crashed.
[Issue #2801](https://github.com/Seneca-CDOT/telescope/issues/2801) - PR in draft mode
#31 - Sequences and Series CodeWars Kata (6 kyu)
Tags: javascript, webdev, tutorial, 100daysofcode
Published: 2022-02-13 20:27:51

##Instructions
Have a look at the following numbers.

>  n | score
> ---+-------
>  1 |  50
>  2 |  150
>  3 |  300
>  4 |  500
>  5 |  750

Can you find a pattern in it? If so, then write a function getScore(n)/get_score(n)/GetScore(n) which returns the score for any positive number n.

Note Real test cases consists of 100 random cases where 1 <= n <= 10000

---

##My solution:

```javascript
function getScore(n) {
  let r = 0; 
  for(let i = 1; i<=n; i++){
    r += i*50
  }
  return r
}
```
---

##Explanation
First I had to identify the pattern, I saw that every score is equal to the sum of each number by 50, I did a for loop that iterated until "i" is equal to "n", and in each iteration I summed the "r" actual value plus the result of "i" by 50, that way I can get the last result.

>   let r = 0; 
>   for(let i = 1; i<=n; i++){
>     r += i*50
>   }

at the end of the for loop I just returned "r"

> return r


---

**What do you think about this solution? 👇🤔**

[My Github](https://github.com/Cesardlr)
[My twitter](https://twitter.com/cesar__dlr)
[Solve this Kata](https://www.codewars.com/kata/5254bd1357d59fbbe90001ec)
beamco.de: A new code snippet creator is in town 🌈
Tags: javascript, webdev, tooling, productivity
Published: 2022-02-13 20:16:44

When the sun was shining I could hardly read my own Code Snippets shared on Twitter as they lacked contrast and thickness. 

I know there is carbon and ray but those didn't exactly fit my needs of a fancy theme, _simplicity_ and readability.

So I decided to go and create a new one and here we go:

**[beamco.de](https://beamco.de)**

![Sample image containing code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/siad9w2hoaldm37q1w98.png)
 
If you have constructive feedback and ideas for improvement please reach out to me.