teleren/devto huggingface dataset:
Benford's Law in 2020 US Election
Tags: opensource, showdev, discuss, github
Published: 2020-11-08 23:35:51

In the on-going debate of fraud related allegations in US election results, the [Benford's law](https://en.wikipedia.org/wiki/Benford%27s_law) is playing a huge part. Discovered in 1881 and very recently popularized by the [Digits](https://www.imdb.com/title/tt12816822/) episode of the web series [Connected](https://www.imdb.com/title/tt12753692/), the law can also assist in forensic analysis against potential frauds.

With the various statistics being shared on the social media, it was interesting enough to fact-check them. The Node JS based fact-check project is available on [GitHub repo](https://github.com/paras20xx/benford-law-2020-us-election).

**Let's jump to the results first and then follow up with the explanations:**
* At the time of publishing this article, data from 7 of the locations was analyzed. The sample size of 3 of them (Chicago-Illinois, Milwaukee-Wisconsin and Washington) was large enough to attempt a probability compliance check.
* The data from [Chicago-Illinois](https://github.com/paras20xx/benford-law-2020-us-election#chicago-illinois) shows **major irregularities** as per the law.
* The data from [Milwaukee-Wisconsin](https://github.com/paras20xx/benford-law-2020-us-election#milwaukee-wisconsin) shows **major irregularities** as per the law.
* The data from [Washington](https://github.com/paras20xx/benford-law-2020-us-election#washington) shows **minor irregularities** as per the law.

Now, what are these major and minor irregularities and how do we interpret them?

Before moving further, one should understand that the Benford's law is applicable on naturally occurring collections of numbers and it tends to be most accurate when values are distributed across multiple orders of magnitude. For example, it would work on city population, but wouldn't work on human height.

Depending on the population of the state/county/precinct, the numbers may not **span across multiple orders of magnitude. To overcome that, the same data was tested by changing the base number (to 3, 4, 5, 6, 7, 8 and 9)**. This time, the results were surprising.

* For [Chicago](https://github.com/paras20xx/benford-law-2020-us-election#chicago-illinois) and [Milwaukee](https://github.com/paras20xx/benford-law-2020-us-election#milwaukee-wisconsin), the data for all the candidates matched, **except for the Democratic candidate (Joe Biden)**, where it didn't follow the expected pattern variations.
* For [Washington](https://github.com/paras20xx/benford-law-2020-us-election#washington), the data seemed to follow the expectedly possible variations for all the candidates.

**Conclusion:**
* The statistics indicate patterns which need to be examined for ascertaining fair play and transparency in the democratic processes.
* A central repository of detailed election reports from Government can help in running such analysis :-)

What is your opinion about it ?
Creating a Coding Interview Study Guide in Javascript
Tags: javascript, computerscience, beginners, career
Published: 2020-11-08 07:43:38

In this post I'm going to be compiling all of the computer science concepts I've learned to create a study guide on most of the general technical skills you would need to know. If there's anything I missed please let me know and I'll be sure to add it to the list. All of the code for this is going to be in Javascript. If I previously posted about a topic I'll be sure to link to it. Here we go.

You're going to need to know iteration and recursion, arrays and matrices, [linked lists](https://dev.to/123jackcole/learning-linked-lists-6bf), [queues](https://dev.to/123jackcole/learning-queues-4jnc), [stacks](https://dev.to/123jackcole/learning-the-stack-6n5), [heaps](https://dev.to/123jackcole/learning-heaps-in-javascript-1ocf), sets, hash maps, [trees](https://dev.to/123jackcole/learning-binary-trees-part-1-implementation-55bb), binary search, [graphs](https://dev.to/123jackcole/learning-graphs-part-1-implementation-4kpc), [traversals](https://dev.to/123jackcole/learning-graphs-part-2-traversal-3088) like [breadth-first search](https://dev.to/123jackcole/learning-binary-trees-part-2-breadth-first-search-454a) and [depth-first search](https://dev.to/123jackcole/learning-binary-trees-part-3-depth-first-search-2n8o), [tries](https://dev.to/123jackcole/learning-tries-in-javascript-5geg), and [sorting algorithms](https://dev.to/123jackcole/sorting-algorithms-in-javascript-5f4b) (particularly merge sort and quick sort). Also knowing some dynamic programming concepts could be helpful such as [memoization](https://dev.to/123jackcole/learning-memoization-1gp7) and [divide and conqueror](https://dev.to/123jackcole/divide-and-conqueror-1c4b).

The file with all of the code examples can be found [here](https://github.com/123JackCole/Tech-Interview-Cheatsheet). I'll be continuously updating this file in the future and plan on posting a similar cheatsheet with all of the code implemented in Ruby.
GDLJS (Talk): Grid systems and more

Published: 2020-11-08 23:20:52

# Grid systems and more

Pocos días después de haber escrito mi primer artículo, la comunidad de GDLS me abrió sus puertas para poder dar una quick talk de aproximadamente 20 minutos. En ella abordé algunos temas como:

- Que es un grid system
- Sus orígenes
- Funcionamiento básico
- Justificación de surgimiento 
- Evolución
- Estado actual
- Cómo se construye uno
- Cuando vale la pena usarlos

Y algunos otros temas complementarios como:

- Metodologías de CSS usadas en CSS Frameworks
- Sass mixins para generar un grid system o functional CSS
- Crear un simple grid system con web component en React
- CSS grid

Si algo de esto te llamó la atención te invito a verla en el siguiente enlace de [Twitch](https://www.twitch.tv/videos/784084881?t=01h20m09s).

Este enlace iniciará a reproducir mi charla desde el minuto 80 o 1 hr 20 minutos, ya que antes de mi Arath Jimenez (@arathjz) presentó una muy interesante charla de accesibilidad, así que te invito a darle una revisada tambien en el minuto [33](https://www.twitch.tv/videos/784084881?t=00h33m03s).
Print Files But Without the First Line at the Terminal
Tags: linux, terminal, awk, tail
Published: 2020-11-08 22:53:10

I had a bunch of CSV files I wanted to join together and they all had the same 'header' line at the start. I didn't want the header line repeating in my concatenation of the files so I wanted to get all *except* the first line for my concatenation process (using `cp`).

Turns out there are several ways to do this. Let's say you have a file `a.txt` containing such:

```
1
2
3
4
5
```

And your goal is to get:

```
2
3
4
5
```

You can't use `tail` in the standard way as you might not know how long the file is. But you can use it with a special `+` number to specify that `tail` is to *begin* on a certain line, like so:

```
tail -n +2 a.txt
```

You can also use `awk` to get the job done by specifying that it can return any lines where the line number count is larger than 1:

```
awk 'NR>1' a.txt
```

Or you could use `sed` to delete the first line before displaying the file:

```
sed '1d' a.txt
```

Each approach has various pros and cons mostly around which one you can remember in the moment or if you want to use `awk` or `sed` in other ways to make other adjustments, but it's handy to have options here.

To conclude, I took my CSV files and joined them like so:

```
cp 1.csv all.csv
tail -n +2 2.csv >> all.csv
tail -n +2 3.csv >> all.csv
tail -n +2 4.csv >> all.csv
```

There are smarter ways to do this all in one go, but I only had a few files to do anyway! :-)
12 Best Practices to build the "Scalable Angular Application"

Tags: angular, architecture, webdev, programming
Published: 2020-11-08 22:41:44

# Apply LIFT Principle: 

L - Locating our code is easy
I - Identify code at a glance
F - Flat structure as long as we can
T - Try to stay DRY (Don’t repeat yourself)

<hr/>

# Meaningful Names: 

-  Assign methods, variables and parameters names so easy to read and understand by name
-  Don't try to add any jargons or technical wordings into names. 

P.S: I personally struggled a lot but it'll improve with the practice only.

<hr/>

# Create 5-10 seconds Rule: 

If you can’t understand and explain your code in 5 to 10 seconds; probably need a refactor or rename the names.

Period.

<hr/>

# Component Design: 

What goes into components first? 

- Properties follow by methods (Input(), Output())
- Groups and sorted
- Variables

Don't define variables randomly. Follow the structure which will help on a long run.

<hr/>

# How to "Import components" into file: 

- External imports come first
- Give a blank line before the import files from our own app 

P.S An easy way to identify the external and app files.

<hr/>

# Components members sequences

- Public methods must be declared before private once
- Easy to read and find private vs public methods
- Define private method; if necessary

<hr/>

# Create Smaller Function (Must): 

Why ? 

- Easy to read and understand the purpose of a function
- If a function has more than 10-15 lines; ASK YOURSELF if it would be better to break it into smaller functions

P.S Kindly think about other developers in a team.

<hr/>

# Provide clarity through code: 

- Explain in code; No need of unnecessary comments 
Folded hands
- Write self-describing code 
- Replace technical terms with simple naming convention (Point 2)

<hr/>

# When to use comments? 

If you really want to add comments, only do for following:

- Explain “WHY” you do that?
- Any consequences of a method or function

<hr/>

# How to design services and components? 

- Don’t add any complex logic to components. NO!
- Keep components to receive and send requests
- No more than 2 to 5 line of complex logic in components
- Add API call, local storage, structure in services

<hr/>

# Symbol Naming: 

- Properties and methods must be camel case  (e.g. currentUser)
- Classes (components, services, directives) must be upper camel case, called Pascal case (e.g. UserComponent)

<hr/>

# Recommended CS Code Extensions: 

- @PrettierCode
- @geteslint
- @materialtheme
- Auto Import
- Angular 10 Snippets - Typescript
- Auto Rename Tag (Productivity)
- Auto Close Tag (Productivity)
- Bracket Pair Colorizer

P.S: I would recommend to try @WakaTime

{% twitter 1325558835738767360 %} 

[**PORTFOLIO**](https://vatsalshah.in) | [**GITHUB**](https://github.com/vatsal2210) | [**BLOG**](https://vatsalshah.in/blog)

If you like my stuff and hate spam, I can send my upcoming articles to your inbox. One-click unsubscribe anytime — [**Click here to join my newsletter**](https://vatsalshah.substack.com/subscribe) 💌

If you’re feeling generous today, you can [**buy me a coffee**](https://www.buymeacoffee.com/vatsalshah) ☕
Sunny-side Up: Making breakfast foods with CSS
Tags: css, html, beginners
Published: 2020-11-08 22:33:01

![Give me all the bacon and eggs you have.](https://media.giphy.com/media/8s1bWO7hckdW/giphy.gif)

## I built a CSS egg!
Being a developer that leans more towards the frontend, I wanted to explore CSS art this week. My goal was to build something simple, and slowly add on elements as I go.

The following are notes I jotted down for myself and concepts that I felt would be helpful for others that are just getting started with CSS or wanting to do some CSS art for fun!

Hope you enjoy :)

##Every element is a div
To elaborate, you are basically working with a plain HTML document, with nested divs. Then, you are adding style to those divs with CSS properties.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/wwl8cehbx421fvojls02.png)
##The Container Element
You'll want to make a div that acts as a container. This is super important because it will be the main div that your other elements get nested under.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/xvjmrha292b1dmg34hbc.png)

* Set the position to relative: This means you are setting your position relative to its normal position, the top left corner of the page.

##Nested Divs
Be mindful of the height and width of your parent div. What size does your child div need to be, in relation to the parent div?

* When nesting divs, set the position to absolute: This basically means that your position properties(top, left, width, height) will now be based on the main div element(in our case, it's called the container), not the body of the page.

* position: relative, display: block and margin: auto will automatically center your div.

* display: flex, justify-content: center, align-items: center does the same thing.

##The border-radius is what curves the shape.
* If you wanted to make a circle, you would set the border-radius to 50%
* If you don't set a border-radius the default shape is a square.

##The end result, my lil' fried egg
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/nq0vvgnn8c7gpap1drjl.png)

Stay tuned! My goal is to animate this before the week ends. If anyone has any pointers, things that they found helpful, feel free to comment below! I'm always open to feedback and discussion.



##Resources
* [w3schools](https://www.w3schools.com/cssref/default.asp)
* [CSS-Tricks](https://css-tricks.com/)
* [Flexbox Froggy](https://flexboxfroggy.com/)
* [Michael Mangialardi's Article, of course] (https://medium.com/coding-artist/a-beginners-guide-to-pure-css-images-ef9a5d069dd2)
Cloud reseller/affiliate options for the solo DEV?
Tags: cloud, help, healthydebate, discuss
Published: 2020-11-08 22:29:50

Hello,

When we get to decide where to host a client's service, we have a direct impact on the revenue of the chosen provider (i. e. AWS, Azure, GCP). Is there a way for us to monetize this decision? A reseller/partner program for solo developers?

What is your opinion about this?

I believe that developers have a significant impact on these decisions but are not monetarily incentivized by any of the well-known providers in any way.
Tips on how to get project ideas when trying out new tech
Published: 2020-11-08 21:24:09

---
title: Tips on how to get project ideas when trying out new tech
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
---

Often times when I'm looking to learn new tech or learn a new technique, I like to start a new project and build something practical that'll keep me motivated to finish it. Here are a few tips I've collected that help me get started.

## Keep a list

Sounds easy, right? Just keep a list! So simple!

Really, what I do is anytime I use an app and feel like it could be better, I write down the app idea of what I'm using. This could be a lot of different things depending on what the app is. Sometimes I just want to understand how things work (I love trying to figure stuff out without libraries if I can) and write that idea down. It could be as simple as just something that I feel like should exist and I can't find it easily.

A big part of why I got into programming was because I wanted to make tools to make life easier for others, as well as myself. So when I feel a tool can be improved upon, it goes on the list. I just rotate thru the list and the better I get at programming, the more feasible the 'harder' ideas become.

Here's a handful of ideas that I think would be fun to learn how to build:

* Reddit clone
 - This is kinda self explanatory but I always felt like the Reddit experience could be improved. It'd be a fun way to flex some CSS knowledge
* Coffee brewing timer w/recipes
 - I use an Aeropress to make coffee and feel like it's kinda hard to easily find other coffee setups and test them out, while keeping time (sometimes it's precise)
* Google Drive clone
 - I've bookmarked a couple of clones to see how they build it out but I'm always interested in decoupling my own dependency on external tools by building my own
* Destiny 2 apps
 - It's easy to look at things you spend a lot of time doing, for me it's video games, and try to make tools to make your life easier.

There's honestly a whole lot of room for apps to be improved upon or simplified that your list could always be expanding. Since I've been keeping track of stuff my list has grown to over 50 random ideas. So far I've built a handful of them and it's incredibly satisfying to build tools that you'll end up using.
5 success factors as a junior developer
Tags: beginners, codenewbie
Published: 2020-11-08 21:04:20

---
title: 5 success factors as a junior developer
published: true
description: During the last couple of years I've been working with different developers and many of them on a quite junior level. I’ve found some factors and behaviours that I think all junior developers would benefit from practicing.
canonical_url: https://langvad.dev/blog/five-success-factors-as-a-junior-developer
cover_image: https://images.unsplash.com/photo-1499750310107-5fef28a66643?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=3150&q=80
tags: beginners, codenewbie
---
During the last couple of years I've been working with different developers and many of them on a quite junior level. I’ve found some factors and behaviours that all junior developers would benefit from practicing.

-   **Focus on one thing at a time**. From time to time you might want to learn everything you hear about at once. This could be quite dangerous to pursue. I’d say you benefit more from focusing on learning one thing at a time - and learn it well. It gets easier if you tie it to your current project or task. Solve the issue in front of you in the best possible way and focus your learning efforts on that.

-   **Ask questions**. All the time. Don’t be afraid to ask any kind of question. Always make sure you understand. Do not say that you understand something when you don’t. It will only come back and bite you. Your colleagues and manager are probably more open to helping you than you think in that case. Be curious and ask people in your surroundings for advice and that they explain their solutions.

-   **Learn to handle imposter syndrome.** Every developer will sometime during their career have some degree of [imposter syndrome](https://en.wikipedia.org/wiki/Impostor_syndrome). Especially if you are new. When you start to learn new things and new concepts you will realise something that might feel overwhelming. Something that is also my favourite quote related to learning: _"the more you know, the more you realize you don’t know”_. Try to accept that you will never know everything and that every other developer have been in your shoes. We all have to start somewhere.

-   **Be proud of your work**. Celebrate milestones, personal achievements, team efforts, releases etc. Celebrate often and together. Celebrate small and large things. Try to show other colleagues, teams, stakeholders or family members of your work. It will make you feel good and it is always fun to show others what you have been working on.

-   **Take it easy**. Don’t rush things. Sometimes you might feel stressed over an important release or that you don’t know how to solve a specific issue. Take it easy and think about what is the worst thing that could happen? It usually isn't that bad. Ask for help and make sure you are solving the issue in a good way that you understand and can explain to others.

Don't forget to **Have fun!** Really important. You have the best job in the world and your possibilities are endless! Enjoy the ride and watch yourself grow for each year.
Media Queries and Responsive Magic
Tags: html, css, webdev, design
Published: 2020-11-08 20:55:24

I am brushing up on my CSS and currently taking a Frontend Udacity course.

It is nice to be able to go back over what we learned at Flatiron bootcamp, but also I realize, there is so much that I never knew about CSS.

Media queries are super cool!

A cardinal rule I learned about creating responsive web layouts, is to design for the smallest screen first. 

A media query is a rule you can add to your CSS that changes the style of CSS according to the screen size.

For example if I  want to create a layout for a small screen I can say ```@media(min-width:700px){body { background-color: blue;}```

Now when the screen width is greater than 700px it will change the background to blue.

In reality what media queries are useful for are changing font size, margins, and the display styles. 

It is important to think about how the screen size changes what you want the user to see.
Programmatically get a free Repl.it Hacker Plan
Tags: replit, hackerplan
Published: 2020-11-08 20:31:02

Hello! I’m Losh.

I recently found a way to get the repl.it hacker plan for free by mistake!

When you join a github classroom, and connect your repl account, the hacker plan is added to your account!

## What’s the hacker plan?
The repl.it hacker plan gives you:
Private repls
10x the storage (5 GB)
4x the memory (2 GB)
4x the speed (2 vCPUs)
Offline repls
Always-on repls
**And normally costs $7 a month!**

## What you need
1. A github account (get at https://github.com)
2. A repl.it account (get at https://repl.it)

## Steps
1. Go here: https://classroom.github.com/a/DuZ33Vzb. This is a classroom that I have made.
2. Click on “Accept this assignment”
3. Then it will bring you to a page. Refresh the page.
4. You’ll see a button at the bottom that says “Work in repl.it”, click on that.
5. Now, you’ll most likely have to authorize your with your GitHub account, if not, then go to the next step. Once your account is connected/authorized, close the page, go back to the GitHub classroom, and click the “Work in repl.it” button again.
6. Now, you’ll see a repl, and in the README.md it says “Welcome, you now have access to the repl.it hacker plan!”!
Go back to the home page on repl.it, and you’ll see you have the hacker plan (if you create a new repl, you’ll see you can make private ones!!). You now have the hacker plan!
<a href="https://www.buymeacoffee.com/Losh531" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/arial-blue.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>

*note due to github changes this may or may not still work
Kotlin in Graal, what have I got myself into.
Tags: docker, java
Published: 2020-11-08 20:29:52

# Preface
- I don't know Java
- I have not ever truly understood docker's reason for being
- I am frightened of new things

Imagine a developer with a gaping hole where his mouth should be and a glimmer in his eye, that was me around 5 seconds ago.

In my late 20's I started to become less excited about JavaScript my goto language and started to focus on concepts and ideas from other communities, what it means to be a programmer today? Why so many languages and standards.
I learned lots of other languages (bits of and bobs), but today, finally I get it, I get what it is to be polyglot developer. You see, like most great advice, we tend to put it down and leave it for a year, then this weekend I googled GraalVM, It has got my mind racing, what could I do with this thing, its quite state of the art, maybe I could take it and revolutionise the JavaScript build ecosystem which is a mess at this point.

No lets make an app, but while we learn to use Graal lets learn Java / Kotlin and docker while i'm at it. I just managed to get the following working, and I don't know squat:

- A graalVM container
- Quarkus web framework
- Livereloading
- Kotlin

Im just about to burst, how cool is that, so much new things, I know what your thinking, "hipster" alright, yeah maybe, but Graal could well be a viable enterprise solution in the future and I am tired of feeling helpless in not knowing Java, what better way to learn than starting at the top of the tree and working my way down.