teleren/devto huggingface dataset:
Recomendação de artigo: Goodbye, Clean code
Published: 2020-02-06 17:55:33

Hoje eu li esse artigo, escrito por um dos devs que desenvolvem o React.js, o Dan Abramov. "Adeus, Código limpo" é o seu título. Nele, o Dan fala com um exemplo bem prático que Código Limpo não é um objetivo per se.


"Desenvolver software é uma jornada. Pense o quão longe você chegou desde sua primeira linha de código até onde está agora. Acho que foi uma alegria ver pela primeira vez como extrair uma função ou refatorar uma classe pode simplificar o código complicado. Se você se orgulha de seu ofício, é tentador buscar a limpeza no código." 


O artigo é bem curto, leitura de 5 minutos (pra quem lê inglês facilmente), e indico principalmente pra quem já escreveu algumas linhas de código anteriormente. 
 https://overreacted.io/goodbye-clean-code/
React Navigation Fix header height in iOS
Tags: reactnative
Published: 2020-02-20 13:54:11

---
title: React Navigation Fix header height in iOS
published: true
description: How to fix header height in iOS for Nested Navigators
tags: react-native
---

Have you ever faced large header height for iphones?? 

Like this one

![large-header](https://i.imgur.com/e8O7w3h.png)

Well then you can fix this easily with one line of code

In your navigator's default navigation options add this

`headerForceInset: { top: "never", bottom: "never" }`

So It will be something like

```js
const awesomeNavigator = createStackNavigator({
	// all screens
}, {
	defaultNavigationOptions: {
		headerForceInset: { top: "never", bottom: "never" }
	}
})
```

Now it changes to 

![normal-header](https://i.imgur.com/LRP8O6r.png)
Quick Apps On Firefox Nightly 
Tags: firefox, glitch, apps, nightly
Published: 2020-02-19 15:53:54


So I was trying out [Firefox Nightly](https://blog.nightly.mozilla.org/) shortly after creating a new react app using  [Glitch create-react-app](https://dev.to/glitch/create-react-app-and-express-together-on-glitch-28gi) for my site and ran into something pretty cool.

When I opened my site on Firefox Nightly the settings tab at the bottom right turned blue:

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


At first I thought I did something wrong of course, what warning is going to pop up I wondered as I opened the tab, behold it wasn't an issue but a feature to install the page as a react app

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


Unlike saving a web-page on a mobile browser (or to your phones home page) this nifty little feature actually wraps the react app into a box so no browser features are present and you can run your site like you would any other app.

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


Anyways I thought this was pretty cool and worth the time to post, maybe someone else will enjoy this cool little feature.
Chaskiq: The open source alternative to Intercom releases version 0.1.3
Tags: webhooks, api, rails, showdev
Published: 2020-02-19 19:27:16

---
title: Chaskiq: The open source alternative to Intercom releases version 0.1.3
published: true
description: Chaskiq releases version 0.1.3 with lots of fixes, redesign and a plugin system for conversations, editor blocks and dashboard items
tags: webhooks, api, rails, showdev
cover_image: https://user-images.githubusercontent.com/11976/74865420-d926fa00-532f-11ea-9c1f-1e1dcf3931af.png
---

Since our launching we have been working hard to bring many improvements and new features to our platform! we've just released [Chaskiq version 0.1.3](https://github.com/chaskiq/chaskiq)

---- 
> We expect to deliver more awesomeness in the next weeks. so, stay tuned to [Chaskiq's github repo](https://github.com/chaskiq/chaskiq)  

----

 

# Panel Redesign:

First things first, we've a panel redesign , so it's more cool than before :)

![alt](https://pbs.twimg.com/media/EQcOpcmW4A0NAx-?format=jpg&name=small)


# Pluggin system:

We have architectured a plugin system that handles third party API integrations. There are some categories of plugin that are worth to mention. Also we have already implemented some third party services on top of it.

## Plugin Categories

+ **Events**: This is the base and more generic kind of plugin. the configuration of this plugin can react on specific platform events. Like when a conversation is created, a message is added, an email is changed and so on. The integrations that we have made on this was conversation Sync for **Slack** and **Twitter** (Direct Messages)

+ **CRM**: in this category the integrated plugins will be enabled to receive and send contact information. Out very first CRM we've integrated is **Pipedrive** , Also the platform will handle external profiles that are sync-able from the panel.

+ **Dashboard**: This kind of plugin will display information in the main dashboard , you can have as many blocks with different information. The first Dashboard integration we have choosen was [Dailytics](Dailytics.com)

![](https://user-images.githubusercontent.com/11976/74865010-3a9a9900-532f-11ea-962d-79a9f2d44a68.png)

+ **Editor**: This kind of plugin has the ability to extend the text editor and send customized blocks or external blocks as a chat message. Our first integration was **Calendly**.

Editor plugins can be found in the editor menu

![image](https://user-images.githubusercontent.com/11976/74865763-71bd7a00-5330-11ea-89e2-8ea936318a93.png)

### Calendly example:

![image](http://g.recordit.co/YSH1neKDUE.gif)



# Webhooks Support:

Webhooks are an important part for platforms like Chaskiq if you need to keep track or listen events on other applications. Chaskiq provide a way to deliver specific events to specific URL provided by you.


![image](https://user-images.githubusercontent.com/11976/74866772-299f5700-5332-11ea-8530-0d7988785b4c.png)


We expect to deliver more awesomeness in the next weeks , so stay tuned

----


Check out the [github repo of Chaskiq](https://github.com/chaskiq/chaskiq)  we will be happy to help and answer your questions.
Be comfortable with being uncomfortable
Tags: beginners, career
Published: 2020-02-19 22:52:15

One piece of advise I often give to new developers or people who find it difficult to accept they don't know everything:

# be comfortable with being uncomfortable

I have been programming for over eight years now, I've given tech talks and built open source projects, and I've been a tech lead for two years.

I regularly, almost daily, do not know how to immediately solve the tasks I am given. Over the years I have learned tricks to help me discover a path to a solution, but I rarely have a solution jump up straight away.

This is a common situation for programmers: _we are problem solvers_. We don't just write lines of code. Problems are problems because they don't have easy solutions.

So when you're faced with a problem and you have no idea where to start remember: **that's okay, it's part of your role. You will figure it out.**

Get comfortable with being uncomfortable. Every time you learn a new technique to help you problem solve: remember it, and use it when you encounter a new problem.
What are some good web dev podcasts to follow?
Tags: webdev, podcast, javascript, react
Published: 2020-02-20 00:26:40

I am a fan of:

[JS Party](https://changelog.com/jsparty)

[React Podcast](https://reactpodcast.simplecast.fm/)


What are your favourites?


---

I love jotting down my thoughts on my blog [Ninja Academy](http://ngninja.com/).
Looking for feedback on a search app for NPM and Github
Tags: webdev, startup, discuss
Published: 2020-02-20 17:29:40

Whenever I look for an NPM package, I always search it in Google which would lead me to [NPM](https://www.npmjs.com/) where I'd find its documentation and downloads per week to know how popular it is but that doesn't suffice. Usually I'd also checkout its Github repo to find out the amount of times its been forked and number of stars and watchers. I'd also like to check out how many issues it has to judge its stability and how frequently commits happen to figure out that it's alive and not in limbo. That comes down to 5 steps and still I'll have to install it and try it out before I can confirm I can really use it.

What if you can cut off all these steps and do it with just 1 click. Introducing [LibStack](https://libstack.dev).

LibStack searches for packages across NPMJS registry and Github and provides results with consolidated info from both platforms. Here's the page you land into when you follow the above link:

![LibStack home page](https://dev-to-uploads.s3.amazonaws.com/i/27d3l5hokfdl9r9gz4e8.png)

Once you type a package name and submit, the app takes you to the search results page where for every result the app displays all the stats -- number of stars on Github, downloads per week, watchers, number of forks and bugs reported in Github.

![LibStack search page](https://dev-to-uploads.s3.amazonaws.com/i/bryxib67lzzbpho5615w.png)

As you click on one of the results, the app navigates to a detailed view which along with stats displays the documentation of the package. In addition to that it also opens up a coding playground with a snippet for the user to play with before downloading and installing the package. This code snippet is grabbed from the Github repo of the package.

![LibStack repo page](https://dev-to-uploads.s3.amazonaws.com/i/yfjtyoo2fzwxrygrg63e.png)

This summarizes all the features I've developed so far in LibStack. I'd like to keep working on LibStack and make it more usable but before I do that I'd like to get feedback from the people for whom this product is all about. 

Let me know your thoughts and suggestions and I'd make sure they get heard by myself 😄.
Developer Wisdom
Tags: discuss, computerscience, career, productivity
Published: 2020-02-20 03:41:52

Many things change every year in the world of software development. But there are certainly things that were true 10 years ago and will be true 10 years from now. 

What are some truths you've learned as it applies to the actual act of designing code, writing code, testing, debugging, refactoring and generally working hands on with code day to day?

Here are some of mine:

- There is no such thing as perfect bug-free code (there are just bugs that you haven't found yet or ones that don't really matter to the end user) 
- If some code 'works' but you don't understand *why* it works, there will come a time when you'll need to :)
- When debugging, start with the observable truth, the machine doesn't lie. If you can't believe what you're observing because all of your mental models point to 'this is impossible', believe it! Start with the facts and question your assumptions to find out which one is flawed. The machine doesn't lie, there is always a reason :)

I would love to hear wisdom from others!
Webstorm Plugins for React Developers
Tags: react, webdev, javascript, webstorm
Published: 2020-02-20 04:24:26

Programming React apps on Webstorm can be quite enjoyable.

Webstorm, out of the box has over 50 plugins pre-installed.

So hunting for new plugins wasn't entirely necessary given I still wrestle with Prettier from time to time. 

I created this video discussing 6 plugins for Webstorm. 

The thumbnail photo is a splice of 2 different themes from the Material UI Theme plugin: Palenite and Monokai. 

Material UI Theme is great so far offering some interesting UI updates like icons and overall a full system UI redesign including loading menus.

I did not know there was a Styled-components plugin, offering syntax highlighting for CSS inside templates!

Rainbow brackets I installed recently but I'm unsure if it will stay around. What this plugin does is color the matching parenthesis, brackets or <> differently, so if you have a bunch of nested HTML elements or arrow functions you should be able to read them easier. 

{% youtube 481A_U-0xZA %}

Next I'm interested in checking out VSCode's plugins. 

What are your favorite IDE Plugins?
DYNAMIC USER INTERFACES WITH GRAPHQL (React/GraphQL Conference Talk + Tutorial)
Tags: graphql, techtalks, tutorial, react
Published: 2020-02-20 20:39:09

> This video is a talk from *Byteconf GraphQL 2020*, a free, live-streamed GraphQL conference that aired on January 31st, 2020. [Visit our website](https://www.bytesized.xyz/graphql-2020) to sign up for the Byteconf GraphQL "swag bag", a free downloadable resource with everything you need to get started with GraphQL, as well as info about future Byteconf events!

Reduce development time and create consistent and dynamic front-end interfaces which are always up-to-date with your back-end GraphQL API by utilizing the introspection query to reveal an API's schema, automatically generate queries and mutations, and, ultimately, hydrate typed React components.

Thanks to [Greg Brimble](https://twitter.com/gregbrimble) who presented this talk at [Byteconf GraphQL 2020](https://www.bytesized.xyz/graphql-2020)!

{% youtube I31QyCll80w %}

If you enjoyed the video, give it a thumbs-up, and [subscribe to our channel](https://www.youtube.com/channel/UC046lFvJZhiwSRWsoH8SFjg?sub_confirmation=1) for more web dev content every week. We also have a newsletter where we send out what's new and cool in the web development world, every Tuesday – [join here](https://www.bytesized.xyz/newsletter)!
Considering a Lua Translation to D
Tags: lua, dlang
Published: 2020-02-29 04:51:54

{% github JesseKPhillips/lua no-readme %}

I want to play with the idea of converting Lua from C to D. The thought here is that [LuaD](https://code.dlang.org/packages/luad) is a nice wrapper to Lua. I kind of wonder if Lua being written in D would open new doors of integration, compile time Lua?

I don't actually expect to make it very far in this project. I will likely not get much further than having D as part of the compilation. 

# Old School Development

It is a little weird coming at these projects. Best I can tell the official source code is only available through zip packages on the website. 

Even though the code is open source, development is not in the open. I found a repository on github.com which provides updates through version control. 

# Being More Modern

Ultimately I want the transition to be completed incrementally, so that throughout the whole process there is a working build of Lua.

To help with this I added github actions. In this case I don't have a good conceptual understanding of what is happening, likely hindered by my knowledge with gitlab pipeline.

* it appears only the first job has access to the source code (automatically) 
* yaml steps seem overly hierarchical

It appears actions are very powerful, but the yaml format is not specified (each action gets its own properties).

I had originally tried to use a different job for testing than I did for building. It did not end well. I think the online action editor is going to be critical to navigating actions. 

But I now have a CI system running tests which I can use as part of my conversion.
Recursive React component in Typescript
Tags: react, typescript, recursive
Published: 2020-02-26 22:16:12

The titel says it all. A colluege wanted to know how to write a Recursive React component in Typescript. So i wrote a simple one with infinite depth.

{% gist  https://gist.github.com/MartinL83/35fdf71c6c23504687b602c800550662 %}

Might be usefull for someone.
Skip the IIFE brackets
Tags: javascript, todayilearned
Published: 2020-02-27 10:45:21

###Introduction

This article is about how you can skip the brackets while creating an IIFE (Immediately Invoked Function Expression).

As we know , this is how we call IIFE
```javascript
(function(){
   console.log('calling iife')
})()
//Output:  calling iife

```
It looks like those extra brackets tell the JavaScript parser, that the upcoming code is a Function Expression and not a Function. So, we can skip those extra brackets & still make a valid IIFE.

Let's give it a try:
```javascript
void function(){
   console.log('calling iife')
}()
//Output: calling iife
//        undefined

+ function(){
   console.log('calling iife')
}()
//Output: calling iife
//        NaN

- function(){
   console.log('calling iife')
}()
//Output: calling iife
//        NaN

! function(){
   console.log('calling iife')
}()
//Output: calling iife
//        true
```

As you can see , I have skipped the brackets and added operators to tell the parser that it is a function expression.

Cheers !!!
What do you do while waiting?
Tags: discuss, fun, share
Published: 2020-02-28 03:21:03

---
title: What do you do while waiting?
published: true
description: In times like slow npm installs, long-running Gradle builds and the likes, what do you do to pass time? Share with the Dev community
tags: discuss, fun, share
---

We've all been there and we'll never stop being there. Times like when `npm install` takes forever, long running test suites we hope all pass and the infamous Gradle builds that take longer than the Shawshank Redemption with commercials.

What do you do during these times?

- Play swords with a colleague?
- Surf dev.to?
- Watch Youtube videos?
- Pet your pet?
- Snapchat?
- Take a walk?

Share what you do in these wait times that holds you back from exploding with anxiety! Lets all learn and have fun. Someone might just adopt yours! 😉
Mockup Editor with Scene
Tags: codepen
Published: 2020-02-28 13:21:32

<p>This is a good start for your mockup editor. 
Inspired by <a href="https://mockupeditor.com/" target="_blank">https://mockupeditor.com/</a></p>

{% codepen https://codepen.io/chris_tudor/pen/JjdWZLO %}
What was a tech you recently tried and didn’t fully enjoy? Why? 
Tags: discuss, webdev
Published: 2020-03-03 15:14:07

---
title: What was a tech you recently tried and didn’t fully enjoy? Why? 
published: true
description: Taking into account all of the tech you have recently used, from frameworks to editors, what was one you realized you don’t enjoy?
tags: discuss, web-dev, meta
cover_image: https://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Cape_Disappointment_and_Cape_Disappointment_Light.jpg/1600px-Cape_Disappointment_and_Cape_Disappointment_Light.jpg
---
_image of Cape Disappointment by [Adbar](https://commons.wikimedia.org/w/index.php?curid=27188708)_

Taking into account all of the tech you have recently used, from frameworks to editors, what was one you realized you don’t enjoy? Were your expectations different?
Leveraging affiliate programs to sell more as an indie hacker.
Tags: affiliatemarketing, sales, indiehacker, solodeveloper
Published: 2020-02-28 19:43:55

---
title: Leveraging affiliate programs to sell more as an indie hacker.
published: true
description: Leveraging affiliate programs to sell more as an indie hacker.
tags: affiliate marketing, sales, indie hacker, solo developer
---

![](https://cdn-images-1.medium.com/max/2152/1*jOF9WdGzYLfTz-pwmlUcTA.png)

**Who is an indie hacker?**

This I believe was coined by Courtland Allen who runs [Indiehackers.com](https://www.indiehackers.com/). So I won’t stress myself to come up with a definition, I will just quote the about section of the site.
>  You’re an **indie hacker** if you’ve set out to make money independently. That means you’re generating revenue directly from your customers, not indirectly through an employer. Other than that, there are no requirements!

**What is an affiliate program?**

![](https://cdn-images-1.medium.com/max/2000/1*eiPRbUfHRtHlqCF5Q7I7Bw.png)

This is basically a program set up to reward people known as **affiliates** who bring in new customers or sales. These individuals are usually rewarded only when a sale is made. Think of it as a salesperson on commission only.

**Why might this benefit an Indie Hacker?**

![](https://cdn-images-1.medium.com/max/2000/1*MXmwXHPHzVk1dU_60PZmjQ.png)

As an Indie hacker, you already have a lot to do ie: product development, marketing, legal, sales, etc.

Also, sales might not be your strongest skill, more soo for the many developers who decide to go the Indie hacker route. By having an affiliate program in place, you might only have to pitch to get affiliates to join the program and sell through them.

This is a good strategy to boost your sales without having to be the only salesperson for your product.

With that being said I believe doing the initial sales yourself and continuing to do some sales even with affiliates, is important if your product is to be loved by your users. Not only do you get to understand what your users want, but you also get to become better at selling.
Question about Node.js and scraping websites

Tags: javascript
Published: 2020-02-29 08:13:01

Hello everyone,,
I am trying to learn Node.js through Udemy courses and wanted to attempt a project.

My end goal would be to scrape historical sports scores from 2 different websites, store it into a database, and be able to view the data all in one app. Each website will require their own login.
https://100001.onl/ https://1921681254.mx/ https://acc.onl/hotmail
Can someone outline or guide me on how you would approach this?

If the website does not have an API for me to work with, can I still scrape the website?

Are there specific libraries you would recommend I look into?
Inside Node.Js I/O 
Tags: node, javascript, asynchronous
Published: 2020-02-29 16:39:07

Node.Js introduces iteslf as a asynchronous event driven javascript runtime. To acheive this asynchronous nature , node uses a open source library called [libuv](libuv.org).

libuv even though built for Node , it is not exclusive to Node.js. There are plenty of other [projects](https://github.com/libuv/libuv/wiki/Projects-that-use-libuv) which uses libuv. 

While network i/o is asynchronous , same can't be said for disk i/o . 
libuv uses single threaded operation to use event loop and produce asynchronus network i/o . Mostly lib pool apis are not thread safe as it is designed to work in single threaded mode only. 

Disk i/o has some platform specific differences . Every majore APIs for disk I/O has it's own limitations, also this increases complexity. So libuv uses blocking disk operations using thread pool.
Trivia#5: The first word sent over the internet
Tags: watercooler, todayilearned, codenewbie, computerscience
Published: 2020-03-02 14:49:31

Welcome to my little CS trivia series. Every week I post a new trivia piece.

Today's question is...

---

## What was the first word sent over the internet?

The historic exchange took place 45 years ago, on October 29, on the ARPANET, or, what the first version of the Internet looked like. The programmers attempted to type in and transmit the word "login" from UCLA to Stanford Research Institute. 

![The log of the first message sent on the Internet.](https://dev-to-uploads.s3.amazonaws.com/i/6dchu9333ufzvax281x3.jpg)

However, the system crashed right after they typed in the "o." Therefore, the first word sent over the internet was "lo". The full word was transmitted an hour later.

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

While *lo* does not mean anything in English (maybe except for the phrase *lo and behold*), it does mean *it* in Spanish or *no* in Hebrew. This, of course, brings to my memory the show "Little Britain" and their famous "computer says no".