teleren/devto huggingface dataset:
A Streamer's viewpoint on coding vs videogames
Published: 2019-09-09 16:31:02

I've been seeing some posts on Dev about streaming coding so I've decided to collect my thoughts about it.
I've actually done streaming of both video games and coding, though if I'm honest, I've racked up more hours on gaming.
My game of choice is Starcraft 2, but that's beside the point.
I've been thinking about the similarities and differences between streaming coding and gaming.
I'd say that gaming is much easier for the viewer. In many video games, you can appreciate the basics of what's happening on your first time watching.
Starcraft is something of an exception here. While the battles are self-explanatory, much of the game time is spent on more mundane tasks like collecting resources and building a base. Moreover, small actions taken at one moment can have a major import 5 to 10 minutes later in a non-obvious manner.
But I digress. The point is games are more exciting to watch.
Not that coding can't be exciting it's just hard to convey that excitement through a Twitch stream.
I do think there is value in streaming coding. To start with, I've personally benefitted from it. Once when I was streaming CodeWars challenges, some people stopped by and gave advice, showing me a few new coding techniques.
I think it's also good practice to put your working process out in the open. It makes you see your own process from a different perspective. And it's even better if you can explain what you're doing as you go along. Clarifying your thoughts into words can actually help you better understand a problem or your approach to it.
This is especially helpful if you expect to go through a technical interview.
The benefit to the viewer is less clear. It takes effort to watch coding. Is the effort worth it?
I think it is, if you find the right stream and approach it with the right attitude.
If you could run code circles around the person you're watching, it's a good chance to sharpen your communication skills. You may have to examine some concepts that you've long since internalized. It's good practice to review, and with the benefit of experience, you may discover new insights on material that you just memorized before.
Also, if you have ambitions of moving into a manager role, your ability to explain your code and concepts to people with less knowledge than you is a key skill.
But if you're being left in the dust by what you're seeing on screen, it's a great time to ask questions. It might seem intimidating to ask a question to someone at a higher skill level, but hopefully, they will be kind and understanding and good at explaining things. I do think that's fairly likely.
So both the streamer and viewer can benefit from this. I recommend you give it a try, either as a streamer or viewer. After all, the streaming scene needs both.
3 Useful bookmarklets I use (almost) daily
Tags: webdev, productivity, javascript
Published: 2019-09-09 15:57:38


> <small><b>Note: </b>Dev.to doesn't allow javascript in links, so to install these bookmarklets please go to <a href="https://loftie.com/post/3-useful-bookmarklets-i-use-almost-daily">https://loftie.com/post/3-useful-bookmarklets-i-use-almost-daily</a></small>

Bookmarklets are small javascript snippetes that you can use to perform simple tasks.  Below are 3 simple bookmarklets that I find myself using regularly while browsing or doing web development.


### 1: SaneColor

> Changes the font and background to readable colors

<img src="https://res.cloudinary.com/ximg/image/upload/w_732,h_500,c_limit/f_auto/whoami/8e65b3bb/post/bNslCUUHuGqNdbb8.png"><figcaption></figcaption>

Often during browsing or reading articles I get to pages that I find really hard to read due to bad contrast or just hard to read colors. This bookmarklet changes the colors of the background and font to something readable, and works without having to reload the page.

### 2: jQuerify


> Injects jQuery for usage in the console on any site

<img src="https://res.cloudinary.com/ximg/image/upload/w_732,h_500,c_limit/f_auto/whoami/8e65b3bb/post/qv7TL7ighH4DUvCk.png"><figcaption></figcaption>

These days I dont use jQuery as often, but I still find myself wanting to quickly check some things out on a page using its syntax. This bookmarklet makes jQuery available on any page with the click of a button.

Based on a modified (to work on any site) version of this ancient post: [https://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet](https://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet)

### 3: Make Editable


> Makes any page editable from the browser

<img src="https://res.cloudinary.com/ximg/image/upload/w_732,h_500,c_limit/f_auto/whoami/8e65b3bb/post/Hdiu8EM9ZyvbRZUY.png"><figcaption></figcaption>

Often during designing it can be nice to simply edit content directly to see what it would look like. This bookmarklet simply sets `contenteditable` for the whole page.

This can even be useful on pages to remove annoying blinking/distracting elements for the session.

---

Do you have any other useful bookmarklets? Let me know in the comments :)
About James Weatherstone
Tags: jamesweatherstone
Published: 2019-09-09 15:32:09

After a 34 year long career as a professional actor, James Weatherstone graduated with his Master's Degree from Adelphi University in 2014. James Weatherstone’s focus of study was Social Work and he graduated with a 3.97, or summa cum laude. James Weatherstone now works as the Director of Social Services at Campbell Hall Rehabilitation Center helping over 100 residence regularly.  James is viewed in high regard by co-workers, administration and his family. James Weatherstone is known to be a hardworking and trustworthy individual and has been admired for his resilience, intelligence and generosity. In James’ spare time, he enjoys performing in the Foley Road Band of Warwick, NY where he plays the acoustic and electric guitar as well as shares the lead singing position in a musical duo.
Getting Started with the Google Maps API
Tags: javascript
Published: 2019-09-09 15:24:49

I've always wanted to learn how to incorporate the Google Maps API into one of my projects, as I think the layout and functionality look rather impressive. Being one prospective employee in a sea of many, I also want to diversify my portfolio and be as desirable to employers as possible. As such, my colleagues and I have decided to build out a road trip app, using the Google Maps API. Here's how you would get started:

1. Navigate to:
https://developers.google.com/maps/documentation/javascript/tutorial.

If you have never used the Google Maps API before, you will need to set up a billing account in order to receive the API key that is necessary. You will also be prompted to create a new project during this step.

2. Decide which API is best for your project. To learn more about how they are different, navigate to:

https://developers.google.com/maps/documentation/api-picker

As I am building out an app with JavaScript, I will be using the JavaScript API.

Once decided, you have to enable the API for your specific project. Navigate to the Google Cloud Platform Console, https://console.cloud.google.com, click the menu button, and select APIs & Services > Library. Select which API you will be using, and then click the Enable button.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/azx7lxe935ljfj8zkocn.png)

3. Get your API key. Back on the Google Cloud Platform Console, select APIs & Services > Credentials from the menu. Here, you can create your API key and add restrictions for its use (which are extremely important).

Congratulations! You can now use this API key in your application. To do so in Javascript, for example, you would simply add in your unique API key in the following code:

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/we8cmae8ry6d6jpc3d9a.png)

I am only starting to build out my application, but I am very excited with the functionality that the Google Maps API will bring. Happy coding!
[PT-BR] Aprendendo git e GitHub
Tags: ptbr, git, vim, diary
Published: 2019-09-09 15:06:56

Mais um dia se inicia e eu aqui aprendendo a codar como gente grande.
Status: 55% do curso de Git e Git Hub para Iniciantes do Willian Justen completos.
O que isso significa: que estou mais confortável em alternar entre terminal e VIM editor para editar arquivos. Também estou mais confortável trabalhando em .git localmente para depois passar para o remoto, no meu caso para a GitHub. E mais importante, estou notando que a melhor forma de aprender algo é o bom e velho botar a mão na massa.
De tempos em tempos dou uma parada nas video aulas e saio pesquisando na internet coisas que me vem à cabeça. Criei uma organização para meu grupo de hackathon, estava procurando entender o uso dos projetos na GitHub, e acabei caindo em um tópico sobre como deixar seu GitHub apresentável. Esse tópico me fez cair de volta no dev.to to Tiago Danin https://dev.to/tiagodanin/o-perfil-perfeito-no-github-5cco
Hora de organizar a bagunça formada no meu GitHub.
PS: ainda não entendi qual o uso prático do Projeto dentro da GitHub.
PollarBoy - Minimal link based polling app made for fun!
Tags: showdev, githunt, javascript, tools
Published: 2019-09-09 14:53:09

---
title: PollarBoy - Minimal link based polling app made for fun!
published: true
description: Minimal link based polling app made for fun!
tags: showdev , githunt , javascript , tools
cover_image: https://thepracticaldev.s3.amazonaws.com/i/826frrtrq1kf4k1tpcvz.png
---

Last Week, One of my friend created a Poll to see which game our friend circle likes most, PUBG or FreeFire. He used one of the free poll maker from internet. When I clicked the link he shared, It was bloated with ads, I literally took me a whole minute to figure out where to cast Vote 😕 . 

That's when I decided, I'll build my own Poll Maker! (Yet Another Way To Prove My Coolness 😎 To Show My Friend Circle 😅)

And So Here's the result : 

### 🌟 PollarBoy! 🌟

[Here's a sample poll on , If You Want To Live On Mars or not?](https://pollarboy.glitch.me/p/liveonmars)


# 🔮 Features : 
* Minimal
* No Bloating
* Ad Free
* No Limit on Responses
* Ofcourse Free

# 📐 Tools Used : 
* NodeJS
* Express
* Lowdb

# 📋 TODO : 
- [] Checkbox for Multiple Votie From Same User!
- [] Themes

# 📜 Source :

## GitHub : 
{% github bauripalash/pollarboy %}

## Glitch : 
{% glitch pollarboy app%}

## Feel Free To Find Bugs and/or Fix Them! ♥️

---
If You Like My Work (My Articles, Stories, Softwares, Researches and many more) Consider [Buying Me A Coffee ☕](https://www.buymeacoffee.com/palash) 🤗
How to block visitors from some countries on WordPress
Tags: wordpress
Published: 2019-09-10 13:20:51

---
title: How to block visitors from some countries on WordPress
published: true
tags: WordPress,wordpress
canonical_url: https://kevinhq.com/how-to-block-visitors-from-some-countries-on-wordpress/
---

There are some use cases that it makes sense to block visitors from particular countries because you don’t target them. Or, most of the visitors from those countries are mostly spambots. Or even worse, most of them are the source of your fake traffic or the unsolicited e-mails in your inbox? Or you want your… [Continue reading »How to block visitors from some countries on WordPress](https://kevinhq.com/how-to-block-visitors-from-some-countries-on-wordpress/) ![](http://feeds.feedburner.com/~r/kevinhq/~4/0P_bbrnKg_Q)
Google APIs connection for dummies
Tags: python, google, api
Published: 2019-09-09 14:46:47

---
title: Google APIs connection for dummies
published: true
description: 
tags: python, google, api, apis
---

I was suffering everytime I try to connect to googleapis services, specifically the access token which lasts for only 1 hour and I have to renew it again and again.

Here is when I created my project *goco* to save my time.

Highlights:

* Auto renewable access token.
* Easy connection to any google api service.

I published it with 100% build success for `python >= 3.4`

Repo: [goco](https://github.com/elmoiv/goco)

This is the first project I publish to [pypi](https://pypi.org)


Any contribution is highly encouraged and desired. :)

* Fork on Github.
* Make the changes
* Send a pull request.
フロントエンジニアのリーダブルコード #1 変数名で情報を伝える
Tags: javascript, jquery, readablecode
Published: 2019-09-09 14:35:42

この記事は、フロントエンジニア目線で書いています。フロントエンジニア、コーダーに参考になりそうなリーダブルコードテクニックをまとめました。参考コードは、JavaScriptで記述しています。

####リーダブルコードとは、
自分のコードを、他人が見たときに、理解しやすく、読みやすいコードのことです。優れたコードは、人それぞれで概念は掴みづらいですが、優れて**いない**コードの概念は掴みやすいです。

この記事では、優れていないコードを書かないための工夫を紹介していきます。優れていないコードの考え方や詳しい概要は説明しません。興味がある方は、今回参考にする書籍「[リーダブルコード ―より良いコードを書くためのシンプルで実践的なテクニック](https://www.oreilly.co.jp/books/9784873115658/)」を読んでみてください。

#### #1 変数名で情報を伝える
jQueryは、"$"(ドルマーク)を関数として扱います。"$"だけで呼び出した関数は、変数の頭文字に"$"をつけるというものです。

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/j61jcrcrp0go8xam5gfb.png)

このようにすれば、変数がjQueryのオブジェクトだと明確にわかります。JavaScriptでは、HTMLCollectionを返すgetElementbyIdや、NodeListを返すquerySelectorなどがあります。変数名を工夫することで、変数にどのような情報（ノード、要素）が入っているか短時間で認識することが出来ます。

JavaScriptには、DOMによる文字サイズの変更、ウェブページの読み込み時間（サイトパフォーマンスを）計測するNavigation Timing APIなどがあります。ピクセルやミリ秒など値に単位が関わる変数には、変数名の末尾に_px、_msなど単位を追加するとわかりやすいでしょう。

HTML、CSSでは、属性名を工夫することが出来ます。id名の区切り文字はアンダースコアを、class名の区切り文字をハイフンにするのが有力です。アンダースコア、ハイフンに何かしらの意味を持たせると理解しやすいコードになります。

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/8712vyl9qd4u97wqva0x.png)

大文字にも、意味を持たせることできます。JavaScriptでは、ES2015(ES6)からclass構文が追加されました。class構文は、関数名を先頭大文字にすることで意味を持たせています。JavaScript(ES6以前)は、class構文がなかったため、模倣的にコンストラクタ関数(new演算子とともに利用されることを前提とした関数)を作成していました。ES6以前から、コンストラクタ関数名には、先頭文字を大文字にするよう多くの著者が、提唱しています。ですので、先頭大文字は、コンストラクタ関数名以外では使用しない方が良いでしょう。

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/6xopxrzhyuwwixy2elfp.png)

全大文字変数は、定数、強い意味を持つ変数などに使用されています。稀に、HTML(DOM)を格納した変数も見かけます。JavaScriptは、ES6でconstが登場しました。再代入が不可能な定数です。しかし、IE10以前は、ES6が非対応です。全大文字変数にすることで、他の開発者に、書き換える（再代入する）べきではない意図を伝えることができるでしょう。

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/j8jm70g5vtxwk2719ngw.png)

省略形を変数名に使用する場合があります。JavaScriptでは、HTML要素にアクセスするのに、documentオブジェクトを使用します。書籍「[ハイパフォーマンスJavaScript](https://www.oreilly.co.jp/books/9784873114903/)」でも、グローバル関数にアクセスする回数を減らすため、documentをローカル関数に格納することを推奨しています。

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/5j02059af139ji913a4f.png)

この程度の関数だと、パフォーマンス効果は見られませんが、グローバル関数へのアクセスを3回から、1回に減らすことが出来ます。(本題の)省略形を使用するには、注意が必要です。その省略形は、**チームメイトが意味を理解できるでしょうか？**docや、stringの省略形strなどは、よく(エンジニア内では)使用されるので理解できますが、BackEndMangerの省略形BEManagerは、理解出来ません。省略形を使用する場合は、他人が見ても理解できるようにしましょう。

あくまでも、規約です。使うかどうかは、自分自身やプロジェクトメンバーで決めるといいと思います。どんな規約にしても、プロジェクトで***一貫性***を持たせることが重要です。
The 7 Most Popular DEV Posts from the Past Week
Tags: top7
Published: 2019-09-09 14:27:28

---
title: The 7 Most Popular DEV Posts from the Past Week
published: true
description: A round up of the most-read and most-loved contributions from the community this past week.
tags: icymi
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sfwcvweirpf2qka2lg2b.png
---
Every Monday we round up the previous week's top posts based on traffic, engagement, and a hint of editorial curation. The typical week starts on Monday and ends on Sunday, but don't worry, we take into account posts that are published later in the week. ❤️


#1. Much ❤️ for this CSS hack

Gajus shares a helpful CSS snippet that they have been copy-pasting for 5 years! 

{% link https://dev.to/gajus/my-favorite-css-hack-32g3 %}


#2. JavaScript Can Actually be FUN to Write!

Chris provides us with some good quick tips for making JavaScript fun.

{% link https://dev.to/chrisachard/es6-mini-crash-course-javascript-can-actually-be-fun-to-write-3b9l %}


#3. Getting the Most Out of Google

Gift offers up some helpful tips for using Google as a dev, plus shares some of her own googlings from the past week.

{% link https://dev.to/lauragift21/the-art-of-googling-4c04 %}


#4. Need-to-Know Interview Tips 

Need help prepping for an upcoming interview? Kayla has you covered with this quick soft skills of interviewing cheat sheet.

{% link https://dev.to/kaylasween/the-soft-skills-of-interviewing-cheat-sheet-edition-2ica %}


#5. Null, Null, Null

James shows us some examples of when null use goes "off the deep end."

{% link https://dev.to/jamesmh/unhealthy-code-null-checks-everywhere-2720 %}


#6. A Deep Dive Into BitTorrent

Ever wonder how BitTorrent works? Brandon walks us through the ins and outs, starting with the origins of the software before getting into the basics of the tech.

{% link https://dev.to/brandonskerritt/how-does-bittorrent-work-a-plain-english-guide-16a2 %}


#7. An Overview of Kubernetes and Virtual Kubelet

Adi walks us through how to take a web app and distribute it using Kubernetes (K8s) and Virtual Kubelet (VK).

{% link https://dev.to/adipolak/kubernetes-and-virtual-kubelet-in-a-nutshell-gn4 %}

_That's it for our weekly wrap up! Keep an eye on dev.to this week for daily content and discussions...and if you miss anything, we'll be sure to recap it next Monday!_
I've worked at fast-growing startups and Silicon Valley tech companies for the past seven years. AMA.
Tags: ama, career, siliconvalley
Published: 2019-09-09 13:58:07

I've been working at well-known tech companies since 2012, in London and Amsterdam: at Skype/Microsoft (when [Microsoft acquired Skype](https://www.cnet.com/news/microsoft-closes-8-5-billion-skype-acquisition/)), at Skyscanner (when [it became a unicorn](https://www.telegraph.co.uk/finance/newsbysector/retailandconsumer/12094993/Skyscanner-lands-unicorn-status-with-major-funding-round.html)) and at Uber [for the past three years](https://en.wikipedia.org/wiki/Uber#History). I've had many conversations with people online and offline on what it's like to work at places like this, compared to other environments: from what the work culture is, to how things get done, how things are tested or how much truth there is to some of the articles you might read online - and many more.

**Feel free to ask anything about work, career, engineering practices** or anything else you find interesting or are wondering about. 

As a disclosure, I can't talk on behalf of the companies themselves - they're all very large, so whatever my observation was, might not be true for all parts (and it might also be outdated knowledge). I can definitely share my experience, learnings, and patterns I've seen to hold across these kinds of places.
Active Decorator
Tags: ruby, rails
Published: 2019-09-14 19:32:41

---
title: Active Decorator
published: true
tags: [ruby, rails]
canonical_url: https://github.com/amatsuda/active_decorator
---

[Active Decorator](https://github.com/amatsuda/active_decorator)

I have been using this on [@howIVSCode](https://howivscode.com) over my normal goto, Draper.

So far it has been great. No special setup and it just works when the delegator exists.
Daily Challenge #62 - Josephus Survivor
Tags: challenge
Published: 2019-09-09 13:38:53

---
title: Daily Challenge #62 - Josephus Survivor
published: true
series: Daily Challenge
description: Write a function that returns the last survivor of a Josephus permutation.
tags: challenge
---
Josephus and his forty men were trapped in a cave by the Romans. Rather than reveal secrets or be captured, they opted for a mass suicide. They gathered in a circle and killed one man every three. The man who survived was supposed to end his own life.

Your challenge for today is to write a function that will return the winning survivor of a Josephus permutation. It should accept two parameters, the amount of people in total *n*, and the amount of steps between eliminations *k*.

*For example, with `n=7` and `k=3` `josephus_survivor(7,3)` should act this way:*
<pre>
josephus_survivor(7,3) => means 7 people in a circle;
one every 3 is eliminated until one remains
[1,2,3,4,5,6,7] - initial sequence
[1,2,4,5,6,7] => 3 is counted out
[1,2,4,5,7] => 6 is counted out
[1,4,5,7] => 2 is counted out
[1,4,5] => 7 is counted out
[1,4] => 5 is counted out
[4] => 1 counted out, 4 is the last element - the survivor!
</pre>

Good luck! Happy coding.

***
_Today's challenge comes from GiacomoSorbi on [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
Loading CSVs to elasticsearch like a pro (no Logstash needed)
Tags: elasticsearch, logstash, devops, database
Published: 2019-09-09 13:11:42

As an Elasticsearch user, I subscribed to elasticsearch groups and channels in many places (Twitter, Reddit, Facebook, StackOverflow) and I keep seeing people struggling to start with elasticsearch, especially loading bunch of CSV files into it.
```
Hey does anyone know how can i upload multiple CSV files to Kibana?
```
The first mistake as I see it is to use Logstash in order to load CSV files to elasticsearch.
I see Logstash as a streaming service to elasticsearch rather than a tool to load data to elasticsearch from a static source (like CSV).

## Using Elasticsearch Loader to load CSVs to Elasticsearch
I wrote a wrapper on top of Elasticsearch's bulk API in order to reduce the barrier in loading files into Elasticsearch.
The usage simple as running a command from your terminal.

### Install
`pip install elasticsearch-loader`

### Plugins
There are several plugins like Parquet, Redis, and S3 as input sources, read more about them in the [readme](https://github.com/moshe/elasticsearch_loader)

### Usage and examples
Load CSVs into elasticsearch running on localhost
`elasticsearch_loader --index incidents csv file1.csv file2.csv`

Load CSV from URL and specify id field
`elasticsearch_loader --index data --id-field state csv https://raw.githubusercontent.com/jakevdp/data-USstates/master/state-abbrevs.csv`

Read CSV data from stdin
`generate_data | elasticsearch_loader --index data csv -`

And much more, for more examples and documantaion please follow [elasticsearch-loader's README file](https://github.com/moshe/elasticsearch_loader)