teleren/devto huggingface dataset:
Lockdown Breathes Life into Old Projects
Tags: webdev, productivity, codenewbie, programming
Published: 2020-03-29 18:52:21

I started my first job (yeay!) a few months ago and in the process one of my personal projects fell to the wayside. I work remotely so the stay at home order has not actually changed my life or daily pattern much. However, it has changed for many of the educators out there.


The main project I was working on had to do with increasing exposure for kids who are deaf and hard-of-hearing to English literacy. I have been working with a teacher of the deaf (and possibly more in the future) to release a website that has her reading and signing books so her students can follow along. With the lockdown in place many of her students do not have the same access to language so the past two weekends I have been working to get the site ready for deployment.


You could say why not just keep the videos on Youtube and let them search through her channel? 

We thought this would make it easier for the kids to navigate and it allows for filtering. We can also control the content they are exposed to and there are no ads.


It was built with the intention of increasing accessibility so it has large easy to find buttons to help those with multiple disabilities and also it also has goes straight to fullscreen and autoplays (on most devices) when a video is clicked. This prevents accidentally playing all the videos at once. It also has a responsive design since many students do not have access to computers at home.


I have a lot to learn still and there are a lot of features we want to  add including multiple sign languages to increase accessibility. It is a work in progress but I am proud of it, and am excited to get better at my craft.

This is my first app that is fully loaded on heroku. There were a few problems involving Youtube API call limitations that I believe I have found a solution to (so this is a test to see if I really fixed it =D).

It is currently available at [seesignstories.herokuapp.com](seesignstories.herokuapp.com)
What technology would be suitable for region-based, serverless backend solution on AWS?
Tags: help, aws, react, serverless
Published: 2020-03-29 18:36:59

I am currently planning the development of the backend for my personal website. In short, the front-end is written in React and at the current stage is essentially ready to consume backend. It is hosted on AWS using the S3 bucket set up for website hosting and exposed using CloudFront distribution. This means that the access to the website itself is cheap in terms of latency, regardless of the location, as the results of querying that website are stored in CloudFront's cache. 

Now, I'm planning on providing the content for that website using some sort of serverless-enabled document database (considering MongoDB with Atlas and DynamoDB with Global Tables). My only worry is that at the moment, not many of these solutions provide an out-of-the-box region-based routing that optimises the location from which resources are served. MongoDB Atlas has some nice VPC-peering options which integrate really well with AWS, but seem to lack any region replication; DynamoDB on the other hand has global tables which does exactly that, but does not expose a single endpoint which would route requests to the closest database (or at least I could not find a way to set it up like so). One thing that I could think of is to setup the manual routing to the databases via Lambda@Edge, which would be both serverless and region-based, but that [sounds like a lot of hassle and manual setup to find the best database server](https://stackoverflow.com/questions/55524218/how-to-select-the-correct-region-with-dynamodb-global-tables-and-lambdaedge) and just seems flaky.

Another way is to use a static site generator, or perhaps even a script that would compile a JSON from the database with website. Together with DynamoDB streams (or any other db hooks) this could allow me to deploy new version of my website with updated data. Considering features like comments etc. this obviously seems inefficient as the website would have to be re-deployed with every change to the database and that takes few minutes.

Finally, I'm wondering whether [exposing a single database endpoint in just one region via Lambda@Edge](https://aws.amazon.com/lambda/edge/#Dynamic_Web_Application_at_the_Edge) and using it as part of the CloudFront distribution viewer request would be a viable solution for my use case.

Overall, the setup is a bit overkill for the traffic I am expecting and I don't suppose that a second of delay for someone on the other half of the world will make a difference. Then again, we live in the world where all of that server(less) infrastructure is essentially free, so why not go for it and learn something in the process.

Any answers, opinions or questions are very welcome!
Fun Compiler Facts
Published: 2020-03-29 18:36:21

I want to write a short article on compilers, simply because I am gonna be gone for SEVERAL hours because of... well you read [Ubuntu Lumina - Devlog 1.2](https://dev.to/kailyons/ubuntu-lumina-devlog-1-2-march-28th-2020-22l5) right? Well anyways let me tell you a few cool facts that I learned about compilers.

1 - Interpreters are compilers
So I can see people disagreeing here but give me a moment to explain. Interpreters still compile to byte code but do not compile into a file, rather running automatically. Some say there is a "translation step", this is known as compiling. Compiling in short means takes the crap you threw into a file and turn it into executable 1's and 0's. Anyways cool.

2 - Languages that have compilers made with themselves...
Well, this one is hard to put in a short title. What I mean is that languages like V and Crystal for example, which use their language to make the compiler originate from a... let's call it prototype compiler. This prototype compiles the "new" compiler into byte code. That then gets used to make new features into the byte code, by running the new binaries. Let's put it into example.

Language x is born in someone's mind, and they want to use it to make the language x compiler. What they do is then take an existing language, let's say C++, to create the prototype compiler, they then rewrite that compiler the exact same way with language x. Then the developer tests to get the same results. After completing the basic compiler in the new language, they then start adding features using language X, and to change the existing code changes what is written in language X and compile it with the existing binary.

3 - Compilers don't always translate to byte code.
They can also translate to other languages, where their compiler/interpreter can then run it. Cool.

4 - I might be wrong?
If I messed any of this up, please tell me, I am always open to talk about my stupid mistakes.
Web components for Beginners
Published: 2020-03-29 18:17:45

Hello everyone, I am Noah but my YouTube name is Tech4Beginners. Today I am going to discuss web components and why they are useful. For those that do not know, web components consist of three separated technologies that are used together. These three technologies are custom elements, shadow DOM, and HTML templates. Custom elements are valid HTML elements with custom templates, behaviors, and tag names that are made with a set of JavaScript APIs. Shadow DOM is capable of isolating CSS and JavaScript. HTML templates are user-defined templates in HTML that are not rendered until called upon. These three components combined are what make up the web components specification. Some sources do include a fourth aspect to web components, that being HTML imports, while others tend to leave this out. The web imports allow you to include HTML documents into one another using HTML imports. These three or four components work together but can also be used separately if desired. Web components are typically available in all major browsers other than Microsoft Edge and Internet Explorer 11, although these have a substitute, that being polyfills. Referring to any of these as web components is typically accurate because the term can be a bit overloaded. What web components actually allow you to do is create new, custom, reusable, encapsulated HTML tags to use in web pages and apps. Thank you for reading, I hope you were able to learn something here and would be interested in checking out my YouTube video linked below, thanks!

For more information on this topic check out my YouTube video at the following link: 
https://www.youtube.com/watch?v=sIUSgjpBjso

OR

Check out one of the following links that are the sources for my article and provide more insight on web components: 
https://css-tricks.com/an-introduction-to-web-components/
https://coherent-labs.com/posts/web-components/
What did your onboarding documentation look like when you started your job?
Tags: discuss, career, onboarding
Published: 2020-03-29 18:14:29

---
title: What did your onboarding documentation look like when you started your job?
published: true
description: I'm curious - tell me about what documentation you were provided to help you during onboarding, or just in general.
tags: discuss, careers, onboarding
---

I'd love to know what onboarding materials were provided to you when you started your job. 

What does good documentation look like for getting started with a codebase? For getting started building features?

It's common to receive documentation around getting your dev environment set up, and the basics of building/running/testing/deploying the software you'll be working on.

But has anyone been provided with anything further? I'm imagining some "this is how we build stuff" documentation, detailing preferred patterns, or giving an introduction to the codebase, useful shared components, etc.

How about "this is how we work" documentation - i.e. who approves PRs, how to ask for review, how long is acceptable to wait, how work gets assigned, etc. Has anyone ever been issued useful documentation around _process_?

If so, I'd love to hear

- What the project was (language, framework, basic function)

- What general areas the documentation covered

- How useful the documentation was

- If you have been involved in maintaining the documentation, how you have found that.
WebComponets: The Next Choice 
Published: 2020-03-29 18:14:27

Web componets should be your employer's next technology adoption idea. We componets play a very significant role in the technology world. They are a set of features that provide a platform that allow you to create custom HTML tags to use for web pages. Web componets are an advancement of prior limited HTML tags. I played around with Web componets, and as a beginner in coding HTML, I was able to easily navigate the platform and use web componets effectively. I was able to learn on the go through the app and realized how important web componets can be for front end development. 

There are several benefits to using web componets. For example, the platform provides reusable HTML elements. This allows for the user to have a simpler and faster experience. Custom elements are a conerstone of web componets. The custom elements aspect allows users to create new tags and expand on previous ones. 

Web componets are also very beneficial to the development experience. Web componets make it easier to manage the project and increase efficiency. It also allows for easier collaboration amongst people. The code will be easier consumed and easier to share. 

Youtube video: https://www.youtube.com/watch?v=WYn11uX0lc8
Algorithm
Tags: software, computerscience, devops, devlive
Published: 2020-03-29 18:11:58

### What is an algorithm?

**In summary, we can define an algorithm as a set of instructions or rules defined, ordered and finite that allows solve a problem.** In reality, the human being performs algorithms daily. But it happens, that being routine actions, our brain performs them automatically, almost without us being aware of them.

An example of this is, when in the morning we get up and prepare for breakfast. We do it automatically, but certain “instructions” are occurring in our brain that cause our body to move to perform these actions:

-   **Start**
    1.  We open our eyes
    2.  We get out of bed
    3.  We put on sandals or house shoes.
    4.  We go to the bathroom
    5.  We brush our teeth
    6.  We take a shower
    7.  We get dressed
    8.  We go to the kitchen
    9.  We prepare breakfast.
-   **End**

In the same way it happens with a computer system. In this case, since the machines at this moment do not think for themselves, we will be their brain. We, through a programming language, will give her instructions, step by step and in a logical way, of what we want her to do. These instructions are what we call algorithm.

For example, if we want an algorithm that allows us to know if a number is even or odd, we can create this flow diagram where we can visualize it. We will always have a beginning and an end.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/9pde4drsfoiyruita4rr.jpg)

This algorithm will be written in a programming language using a code editing tool. The code undergoes a series of transformations to finally get the program that will be executed on a computer.

### Execution

In the execution it is necessary that the program is stored in the internal and volatile memory of the computer, so the processor will read each order of the program, solving it and executing it.

If necessary, internal memory is accessed to manipulate variables, input, output, or storage peripherals. Then, it does the necessary calculations and solves the logical expressions, until the last instruction completes successfully or an error occurs.

This is an example of the algorithm encoded in the programming language  **Java (Left**) and  **JavaScript (Right)**

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

What the system returns to us, in the case of n being the number 6, is that 6 is an even number.

In conclusion, algorithms allow us to think logically about the order in which our programs will be developed and executed to obtain the best results and solve problems optimally.
Buying a game console in 2020
Tags: watercooler, gaming
Published: 2020-03-29 17:47:31

So I have an XBox 360, which is ten years old. I’ve been able to get games via online classifieds and Amazon sometimes, but I’m realizing they’re harder to find and starting to become more expensive than probably just buying a new console.

I’m not a huge gamer, so I have no idea what is the best console out there. PS 4? XBox One? Switch? etc.

For all the gamers out there, what’s your gaming console recommendations?
SIR.js . An epidemic simulation library in JS.
Tags: javascript, opensource, simulation
Published: 2020-03-29 16:53:33

---
title: SIR.js . An epidemic simulation library in JS.
published: true
description: 
tags: #javascript, #opensource, #simulation
---

During the last days, I see more and more projects related to epidemic simulations, SIR Modeling etc. It is obvious that the COVID-19 pandemic has motivated developers around the world to offer projects and solutions that try to predict the evolution of the pandemic in the following weeks or months.

Probably the simplest model someone can use to model an epidemic is the SIR model.

# But how is the SIR model defined?

> (From WolframMathworld)
An SIR model is an epidemiological model that computes the theoretical number of people infected with a contagious illness in a closed population over time. The name of this class of models derives from the fact that they involve coupled equations relating the number of susceptible people **S(t)**, number of people infected **I(t)**, and number of people who have recovered **R(t)**. 

The model needs the initial values of the Susceptible persons in a population **(S0)**, Infected **(I0)** and Recovered **(R0)**. It also needs **beta** factor which is a constant determining how often a susceptible-infected contact results in a new infection and **gamma** factor which is the rate an infected person recovers and moves into the resistant phase.

The simulation runs for **N** iterations (which represent the time span of the simulation).

# Installation and example

[SIR.js](https://www.npmjs.com/package/sir.js) can be installed via npm by typing `npm install sir.js` .

Code is available in this [GitHub repo](https://github.com/petrosDemetrakopoulos/SIR.js) and you are welcome to contribute!

It is ultrasimple to set it up and use it:

```javascript
let SIRjs = require('sir.js');

let solution = SIRjs.solve({S0: 0.9, I0: 0.1, R0: 0.0, t:1, N: 500, beta: 0.35, gamma: 0.1});
SIRjs.printChart(solution);
```

It has only 2 functions: `solve()` and `printChart()`
`solve()` function takes an object argument with the following keys:
* S0: Initial S (Susceptible) value
* I0: Initial I (Infectious) value
* R0: Initial R (Recovered) value
* t: The time step
* N: The time span (in units of time) aka the length of the simulation
* beta: The parameter controlling how often a susceptible-infected contact results in a new infection
* gamma: The rate an infected recovers and moves into the resistant phase

It returns an array of objects that contain S,I and R values for each moment.

`printChart()` function prints an ASCII chart for each one of the S,I,R variables

You can then plot the results in any way you want.
Here, for example, I have plotted the results using Google Sheets
![SIR Chart](https://dev-to-uploads.s3.amazonaws.com/i/24u7xu4k8kcw26chubf4.png)

# That's all folks!

I hope you find it interesting and that it will be useful!
What the heck is Unpacking and Packing of Sequences in Python?
Tags: python, webdev, django
Published: 2020-03-29 16:52:18

If you are new to python or have been programming in python and you haven't started using **Packing** and **Unpacking** this article is for you.

Python provides additional convenience involving the treatments of tuples and other sequence types.
What the heck is **Packing**

In Python, a series of comma-separated objects without parenthesis are automatically packed into a single tuple. For example, the assignment 
```python
fruits = apple,orange,lemon
```
results in the variable fruits being assigned to the tuple (apple, orange, lemon). This behavior is called the automatic packing of a tuple.
Also, another common use of packing is when returning multiple values from a function. like so
```python
return x,y,z
```
this packs the return values into a single tuple object (x,y,z).

So what the heck is **Unpacking** in Python?

In the same light, Python can automatically unpack a sequence,
allowing one to assign a series of individual identifiers to the elements
of the sequence. As an example, we can write
```python
a, b, c, d = range(1, 5)
a, b, c, d = [1,2,3,4]
```
which has the effects of  a=1,b=2,c=3,d=4. For this syntax, the right-hand
side expression can be any iterable type, as long as the number of variables on the left-hand side is the same as the number of elements in the iteration.
if they aren't equal an error will be raised:
```python 
a, b, c = [1,2,3,4]
ValueError: not enough values to unpack (expected 3)
```
Unpacking can also be used to assign multiple values to  a series of identifiers at once
```python
a, b, c = 1, 2, 3
``` 
The right-hand-side is first evaluated i.e packed into a tuple before unpacking into the series of identifiers. This is also called a simultaneous assignment.

Another common usage of simultaneous assignment which can greatly improve code readability is when swapping the values of two variables like so:
```python
a, b = b, a
```
With this command, **a** will be assigned to the old value of **b**, and **b** will be assigned to the old value of **a**. Without a simultaneous assignment, a swap typically requires more delicate use of a temporary variable, such as
```python 
temp = a
a = b
b = temp
```
You can also get the rest of a list like so:
```python 
a, b, c, *d = [1, 2, 3, 4, 5, 6] 
a => 1
b => 2
c => 3
d => [4, 5, 6]

```
In conclusion, using packing and unpacking during development can greatly improve the readability of your code and also solve some common issues with sequence assignment.

If you have any questions, kindly leave your comments below.

Kindly follow me and turn on your notification. Thank you!
Happy coding! ✌
More About Hash
Tags: ruby, hash, documentation, github
Published: 2020-03-29 16:48:10

---
title: More About Hash
published: true
description: 
tags: ruby, hash, documentation, github
---
On my GitHub project <tt>AboutRuby</tt>, I have divided the documentation for class <tt>Hash</tt> into two pages:
* [Hash API](https://github.com/BurdetteLamar/AboutRuby/blob/master/core/Hash/api/markdown.md#hash-api):  API-related documentation only;  aspires to completeness, accuracy, and extensive code examples.
* [About Hash](https://github.com/BurdetteLamar/AboutRuby/blob/master/core/Hash/about/markdown.md#about-hash):  Other topics;  aspires to usefulness.

New topic: [Method Calls with Blocks](https://github.com/BurdetteLamar/AboutRuby/blob/master/core/Hash/about/markdown.md#method-calls-with-blocks).
100daysofcode Flutter
Tags: flutter, 100daysofcode
Published: 2020-03-29 16:45:57

day 20/100 of #100daysofcode #Flutter
Learning Flutter , courses Udemy from
@maxedapps

 Learning about Drawier, custom drawer,push and replace route, send data on pop
https://github.com/triyono777/100-days-of-code/blob/master/log.md
Finding Open Ports
Tags: linux, react, mac, showdev
Published: 2020-03-29 16:42:36

---
title: Finding Open Ports
published: true
description: how to find open ports in Linux
tags: #linux #react #mac #showdev
---

Finding Open Ports in your server or local machine is an essential task to figure out which service is running in, perhaps maybe there is an unknown application in running to trace, send your data, but you don't know. Let's find how can we find Open Ports.

`Open Ports: currently used by an application`
`Close Ports: free to use`

#Netstat

Open your terminal up and type:
`netstat -atu`



`-a`: socket connection
`-t`: TCP connection
`-u`: UPD connection

Socket connect two-node on the same network to communicate with each other.
TCP transfer file from one place to another with 100% guarantee, but TCP make handshake before connection, once the client sends the `SYN` to the server, server get back with `SYN ACK` if the server was alive, then the client send the `ACK` to the server and done.
UDP is same as TCP, but UPD doesn't make handshakes like TCP `SYN -> SYN ACK -> ACK`. it doesn't care about errors, UDP is faster than TCP.


once you run the command you'll get a list of services running. only keep Open these Port which is required, so nobody will be able to make a connection with your machine!