teleren/devto huggingface dataset:
Beware This Sneaky Waterfall Question
Tags: agile, backlog, requirements, waterfall
Published: 2019-11-19 03:19:11

I often am asked the question "When do you need us to start [or finish] gathering requirements so that the development team can deploy on Date X?"

For years it never occurred to me how underhanded this question turns out to be. Essentially, there is no way to answer this question. It's got circular reference and infinite loop written all over it.

Hiding in the question is the notion that we know how long it will take to build something random. Something as-yet-to-be-defined. That somehow no matter **what** those requirements contain, as long as they're "delivered" by the date I say we need requirements, then if the development team ends up being late, well that's on them.

The only proper answer to this question is "today", along with a prioritized backlog of features needed on or around Date X. And while you're "gathering requirements", please also gather a list of contingency plans. Then we'll talk.
5 exemplos de documentações REST para inspiração
Tags: dev, documentation, documentacao, github
Published: 2019-11-20 01:09:20

---
title: 5 exemplos de documentações REST para inspiração
published: true
date: 2019-11-19 03:05:42 UTC
tags: Dev,docs,documentacao,github
canonical_url: https://marquesfernandes.com/2019/11/19/5-exemplos-de-excelentes-documentacoes-rest/
---

Procurando por exemplos de documentações REST online? Separei 5 documentações de APIs que recentemente me ajudaram como inspiração.

[Twitter API](https://dev.twitter.com/overview/api) 

![](https://marquesfernandes.com/wp-content/uploads/2019/09/07160155479276-1024x384.jpg)<figcaption>Twitter (inglês: [ˈtwɪtər]) é uma rede social e um servidor para microblogging, que permite aos usuários enviar e receber atualizações pessoais de outros contatos (em textos de até 280 caracteres, conhecidos como “tweets”), por meio do website do serviço, por SMS e por softwares específicos de gerenciamento.</figcaption>

[Github API](https://developer.github.com/v3/#parameters) 

![](https://marquesfernandes.com/wp-content/uploads/2019/09/what-is-github-1-1-1024x512.png)<figcaption>GitHub é uma plataforma de hospedagem de código-fonte com controle de versão usando o Git.</figcaption>

[Google Drive API](https://developers.google.com/drive/v2/reference/files#resource) 

![](https://marquesfernandes.com/wp-content/uploads/2019/09/Google-Drive-Apps-Main.png)<figcaption>Google Drive é um serviço de armazenamento e sincronização de arquivos que foi apresentado pela Google em 24 de abril de 2012.</figcaption>

[Paypal API](https://developer.paypal.com/docs/api/overview/) 

![](https://marquesfernandes.com/wp-content/uploads/2019/09/wpca-paypal-gateway-addon-815x458.jpg)<figcaption>PayPal é uma empresa de pagamentos online situada em São José, na Califórnia, Estados Unidos. Fundada em 1998 por Peter Thiel e Max Levchin, opera internacionalmente e é uma das maiores do ramo por ser capaz de realizar pagamentos rápidos e auxiliar em envios de dinheiro.</figcaption>

[VTEX Catalog API](https://documenter.getpostman.com/view/845/vtex-catalog-api/Hs44?version=latest) 

![](https://marquesfernandes.com/wp-content/uploads/2019/09/vtex-1-1024x576.png)<figcaption>VTEX é uma multinacional brasileira de tecnologia com foco em cloud commerce desenvolvedora da plataforma VTEX Cloud commerce, disponibilizada no mercado como SaaS com atuação global.</figcaption>

O post [5 exemplos de documentações REST para inspiração](https://marquesfernandes.com/2019/11/19/5-exemplos-de-excelentes-documentacoes-rest/) apareceu primeiro em [Henrique Marques Fernandes](https://marquesfernandes.com).
Day8:Common Collections - 100DayOfRust
Tags: rust
Published: 2019-11-19 02:44:13

## Common Collections

Heard some people complained that after learning the basics of Rust, they still don't know how to implement a linked list in Rust because of the complicated ownership system. While you can implement it with the `Box<>` pointer, the good news is, Rust has built-in collections you can use, just like C++'s STL, so you don't have to implement those by yourself.

Below are examples of usage of `Vector`, `VecDeque`, `LinkedList`, `HashMap`, `BTreeMap` and `HashSet`:

```rust
use std::collections::{
    VecDeque, 
    LinkedList,
    HashMap, 
    BTreeMap,
    HashSet,
};

fn main() {
    // Vector
    let mut v = Vec::new();
    v.push(1);
    v.push(2);
    println!("Vector: {:?}", v);
    v.pop();
    println!("Vector: {:?}", v);
    
    // Deque
    let mut vd = VecDeque::new();
    vd.push_back(1);
    vd.push_back(2);
    vd.push_back(3);
    println!("Deque: {:?}", vd);
    vd.pop_front();
    println!("Deque: {:?}", vd);
    
    // Linked List
    let mut list = LinkedList::new();
    list.push_back(1);
    list.push_back(2);
    list.push_back(3);
    println!("List: {:?}", list);
    list.pop_front();
    println!("List: {:?}", list);

    // HashMap
    let mut hm = HashMap::new();
    hm.insert("Alice", 90);
    hm.insert("Bob", 85);
    println!("HashMap: {:?}", hm);
    println!("Alice: {}", hm.get("Alice").unwrap());
    hm.remove("Alice");
    println!("Alice: {:?}", hm.get("Alice"));

    // BTreeMap
    let mut bm = BTreeMap::new();
    bm.insert("Alice", 90);
    bm.insert("Bob", 85);
    println!("BTreeMap: {:?}", bm);
    println!("Alice: {}", bm.get("Alice").unwrap());
    bm.remove("Alice");
    println!("Alice: {:?}", bm.get("Alice"));
    
    // HashSet
    let mut hs = HashSet::new();
    hs.insert("Alice");
    hs.insert("Bob");
    hs.insert("Alice");
    println!("HashSet: {:?}", hs);
    hs.remove("Alice");
    println!("HashSet: {:?}", hs);
}
```

Result:
```
Vector: [1, 2]
Vector: [1]
Deque: [1, 2, 3]
Deque: [2, 3]
List: [1, 2, 3]
List: [2, 3]
HashMap: {"Bob": 85, "Alice": 90}
Alice: 90
Alice: None
BTreeMap: {"Alice": 90, "Bob": 85}
Alice: 90
Alice: None
HashSet: {"Bob", "Alice"}
HashSet: {"Bob"}
```
Automate anything you see, with Sikuli
Tags: sikuli, automation, tutorial
Published: 2019-11-19 02:36:37

Sikuli is an open source GUI based automation tool. It uses the technique of 'Image Recognition' to interact with elements of the web page and windows popups. Sikuli is preferred when UI elements are stable and are not constantly changing.

What we did?
------------
Add the Sikuli dependency in pom.xml

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

Store all of the images inside project Image folder:

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

How it works?
-------------
Perform action on the images:

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

Read more about Sikuli commands and available methods from http://doc.sikuli.org/
How To Create a Great Blog Title
Tags: writing, meta
Published: 2019-11-19 01:58:18

This post was originally posted on my personal blog at [jwbaldwin.com](https://www.jwbaldwin.com/blog/how-to-create-a-great-blog-title/)

Writing a good blog title is an art. Here are some tips I use personally, that will help make **your blogs stand out from the rest**. We'll use the blog title *below* as a starting point, and see how we can make it something that might actually get clicked on.
  
  
**Our starting blog title for our awesome blog:**

`Generating websites with Elixir and Phoenix`


## 1. How To's and Listicles

These are the most common forms of blogs, and for good reason. They easily describe the contents of the artciles and pique people's interest. Don't be afraid to use this tried and true method!
  
  
Instead of: `Generating backends with Elixir and Phoenix Framework`  

Rephrase it just a bit to be: `How to generate a backend in a couple minutes with Elixir and Phoenix`  
  
  
This small shift allows you to tell your reader that you're going to teach them something useful, and it's catchy while not being false.

## 2. Provide value
This is the **#1 THING**

Blog titles should be all about communicating what value you provide to the reader as fast as possible. Keep it short and punchy with a clear value statement.  
  
  
Instead of: `How to generate a backend in a couple minutes with Elixir and Phoenix`  

Show the value with: `How to create your backend in 5 minutes with Elixir and Phoenix`
  
  
## 3. Keep it Short
People *don't have time* to read your long blog title. They will just gloss right over it.

![Keep it Short](https://img.ifunny.co/images/c378733edf08597d06b3727b30f638a8f24026cf7f25f19682a04b85382a6655_1.jpg)
  
  
Instead of: `How to create your backend in 5 minutes with Elixir and Phoenix`  

Drop the implied words: `Create your backend in 5 minutes with Elixir and Phoenix`
  
  
## 4. Conclusion

Basically, catch peoples attention with the **what** and **why**.

What are they clicking on.

Why should they read it.

If you put each blog title through these filters, and make sure it answers those questions, you're well on your way to a great blog title!

I hope this helps! Reach out to me with questions or comments :)
나에 대하여
Published: 2019-11-19 01:45:17

---
title: 나에 대하여
published: true
description: 
tags: 
---

걷기를 좋아하는 친구가 있었다. 작은 동네 곳곳을 걸어다니는 일은 그 친구의 일상이자 취미였다. 퇴근 후에는 언제나 1시간은 족히 걷다 집에 돌아가고 했다. 한 때는 성북구에서 시작해 서울 시내를 가로질러 집으로 걸어 돌아온 적도 있더랬다. 그 친구는 작은 동네 곳곳의 삶을 함께 했다. “한 때 이곳에는 어떤 가게가 있었어.”, “얼마 전까지 이런 곳이었는데, 최근에 이런 곳이 되었어”, “다음 달이면 이 곳도 이제 마지막이래”. 그 친구의 삶은 작고 느리고 단단했다. 작고 느리’지만’이 아니고. 작고 느리고 단단했다.

나는 좋음만 남겨놓고, 그 좋음 사이에 이유를 뒤늦게 깨닫는다. 그렇게 남겨놓은 좋음과 좋음의 이유들은 언제나 작고 느렸다. 꽤 자주 고기를 먹지 않고, 간간히 단식을 하고, 종종 요가의 시간에 나의 단단함을 찾아보고, 때론 걷고 때론 뛰다가, 그렇게 찾은 나의 단단함을 글로 남겨보기도 하고, 대부분은 혼자의 시간을 보내다, 전부에서 대부분을 뺀 시간의 대부분을 나를 깊게 내어주는 몇몇과의 시간을 보낸다.

나는 크고 빠르게 태어났거나 어쩌면 크고 빠른 삶으로 태어났어라는 생각을 가지고 자랐다. 그런 내가 오늘 손에 쥔 돌멩이들 사이에서 내일이 되어 이건 보석이었네 라는 것들을 남겨놓고 나니 남은 것들은 작고 느렸다. 그렇게 무의식적인 욕구들 사이에서 의식적으로 버려야 할 것들을 찾기 시작했다. 그래서 찾기 시작했던 것 같다. 내가 가진 작은 그릇에서 어떤 것들을 버려내야, 오늘은 돌이지만 내일은 보석인 것들만 남아 더 단단하고 더 깊게 담아낼 지.

얼마 전 우연히, 정말 우연히 들른 교보문고에서 걷기를 좋아했던 그 친구의 책을 보았다. 같은 제목과 같은 구성과 같은 목적이 담긴 책이지만 내 이야기이거나 혹은 나와의 이야기가 담긴 그 친구가 들려줬던 초안과는 꽤나 달랐다. 펼친 책은 오롯이 그 친구의 이야기로 시작해서 그 친구의 이야기로 끝났다. 당연한 간사함에 따라온 서운함을 곱씹어보다 나는 어딘가에서 나를 찾고 그 친구는 또 어딘가에서 그 친구를 찾았나보다 라고 결론을 내렸다.

나는 작고 천천히 가는 단단한 삶을 산다. 깊게 사랑하면서.
Como deletar todos o bancos do MongoDB exceto admin e local
Tags: dev, mongodb, mongoshell
Published: 2019-11-19 01:47:13

---
title: Como deletar todos o bancos do MongoDB exceto admin e local
published: true
date: 2019-11-19 01:43:00 UTC
tags: Dev,mongo,mongodb,mongoshell
canonical_url: https://marquesfernandes.com/2019/11/18/como-deletar-todos-o-bancos-do-mongodb-exceto-admin-e-local/
---

As vezes você simplesmente precisa deletar todos os bancos e começar do zero! Usando o shell do MongoDB isso fica muito fácil:

```
const dbs = db.getMongo().getDBNames(); for(let index in dbs){ db = db.getMongo().getDB(dbs[index]); const dbName = db.getName(); if(!['admin', 'local'].includes(dbName)) { print(`Deletando o banco ${dbName}`); db.dropDatabase(); } }
```

Esse código deleta de uma maneira segura todos os bancos mantendo apenas os bancos: **Local** e **Admin** , preservando todos os usuários e acessos previamente criado.

Como você pôde ver fazer scripts utilizando o [mongo shell](https://docs.mongodb.com/manual/mongo/) é bem simples e poderoso.

O post [Como deletar todos o bancos do MongoDB exceto admin e local](https://marquesfernandes.com/2019/11/18/como-deletar-todos-o-bancos-do-mongodb-exceto-admin-e-local/) apareceu primeiro em [Henrique Marques Fernandes](https://marquesfernandes.com).
Quick Note on System Design for Form Inputs
Tags: design, pim
Published: 2019-11-19 01:22:22

When designing systems that form a chain of communication, it may be described as a trade-off between allowing flexibility and creating standard inputs. Systems can be designed with user requirements in mind to allow certain free-form entry inputs, but the trade-off is a data hygiene problem in the long-term. Fields that may have once been designed to have no dependencies may suddenly be required for use in a downstream system. When those business requirements are being written up, not only does the data need to be sanitized, but the upstream system needs to be re-built to accomplish the goals for its dependents. I have seen a number of instances where this problem has really bitten the original creators and I have a couple best practices I have personally observed.

Firstly, when creating your schema, create a list of acceptable values pertaining to each field. Usually implemented for user input with a dropdown or radio buttons, make sure data is entered with these values consistent. I remember numerous headaches created by incorrect entry on the part of an upstream user or values that needed to be cleaned up. For instance, we couldn’t automate a feature display for a product line easily because users had been entering features like “Guide-Approved” as “Melissa Arnot” or “Mountain-Tested”. Its best if you nip any future problems in the bud and make the inputs standard.

Additionally, do not allow NULL values in inputs, even if it creates some false data. I would much rather have poorly described data to work with, rather than no data at all. 

Finally, consistency in field values should be uniform across all systems. Even if the field values in one system are standard, care must be taken to make sure all systems being developed have these same inputs. The biggest offender of this rule is when a business decision is made and there is only sufficient bandwidth to fix the most downstream system. Some of these discrepancies persisted for years! These cases can be unavoidable based on practicality, but tech debt can quickly build and become unmanageable.
Create and Deploy, React & Heroku: Magical Guide
Tags: react, heroku, javascript, beginners
Published: 2019-11-19 00:29:45


Hello my dearest noobs,


I would like to share with you the EASIEST and FASTEST steps to create and deploy your react app with Heroku...


~*cough*cough*~ even if you've already completed your project ~*cough*~


...this is p-u-r-e magic...



Please follow these wonderful steps :

1. Make a repository on GitHub
2. Open up your terminal
3. [ cd ] into folder
4. [ npx/npm/yarn create-react-app nameofapp ]
      - refer back to https://create-react-app.dev/docs/getting-started/
5. [ cd ] into that new file
6. [ git init ] -> [ git add . ] --> [ git commit -m "comment here" ] 
7. [ heroku create nameofurlyouwant ]
8. [ git remote add heroku --place-second-url-given-here-- ]
9. [ git push heroku master ]



...if it fails...
...perhaps you've saved yarn, you'll need to follow these additional steps...

10. [ yarn install ]
11. [ git add yarn.lock ]  
12. [ git commit -m "updated yarn lockfile" ]
13. [ git push heroku master ] 



...these next steps connect your GitHub repository...

14. Go to Heroku, click on the name you've set for this app
15. Click on "Deploy"
16. Go to "Deployment Method" and connect your GitHub
17. Scroll down & follow steps for "Automatic Deploys"



...last steps are optional, adding a buildpack...

For additional information refer to https://www.heroku.com/elements/buildpacks

18. Go to setting tabs on Heroku
19. Scroll down to "Buildpacks"
      - refer back to https://www.heroku.com/elements/buildpacks
      - do some additional research to see which you'd like best!



I really appreciate you stopping by to give this post a read! Often, I have struggled with the deployment process. I would always run into small issues and it would fail. This has been the most efficient way I have found to create a react app and deploy it on Heroku!



Again here are the websites to refer back to:

https://create-react-app.dev/docs/getting-started/
https://www.heroku.com/elements/buildpacks


Sincerely,
yOuR NoObNiNja
I built just the ultimate content aggregator with python3
Tags: python, productivity, contentaggregator, devops
Published: 2019-11-19 00:22:47

So I finally made my content aggregator on my bucket list with python and it was a fun project, I must say.

# So what does it do anyway?

Well for starters it fetches me the 

 -  News around my country
 -  Medium articles on programming
 -  Articles on python
 -  ......and finally some developer news
 - oh oh oh and stock exchange news of my favourite stocks

**I finally get it emailed to my myself with mutt.**

# Here's how it looks!
## The Python News
![pypy](https://thepracticaldev.s3.amazonaws.com/i/hainf57msgegu6vtj36p.png)

## The Daily Fresh News 
![the news](https://thepracticaldev.s3.amazonaws.com/i/myitm31j1yxlo4gn3t1u.png)


## Getting Started on how did I do it?


Well there are a bit of pip packages that are needed to be installed first hand

{% gist https://gist.github.com/thisisshub/b1d4ffdbe68f4a80ddec6c20b07a2b99 %}

## Then you finally code a bit.

The explanation stands in the comments, give it go!

{% gist https://gist.github.com/thisisshub/c409274eaf5c39af46e4a6822b3a702e %}

Now how do you export the output our little script to the text file which in fact we would need for the body of our email

## We write a shell script, AHA!!

Oh no wait please install mutt or any other cli email sender

    `sudo apt-get install mutt`

Setting up mutt would make you wanna kill yourself, here you go 
please don't die, we love you article, [a very easy tutorial to setup mutt](https://medium.com/@itsjefftong/mutt-gmail-59447a4bffef)

## cool and we're good to go

{% gist https://gist.github.com/thisisshub/5a18cb2f2dfd6df9cc18b82246484936 %}

### yup that's it. the script's that small. oh.


Now just run setup this script at your cloud and send it to yourself before you wake up.
Algebra data type vs Class
Tags: plt, scala, haskell
Published: 2019-11-24 12:02:52

---
title: Algebra data type vs Class
published: true
date: 2019-11-19 00:00:00 UTC
tags: plt,scala,haskell
canonical_url: https://dannypsnl.github.io/docs/algebra-data-type-vs-class/
---

I have a long time thought that algebra data type(ADT) is must need.

In `Haskell`, ADT looks like this:

```hs
data Term =
  Variable String
  | Lambda String Term
  | Application Term Term
```

And let’s see how to do the same thing in `Scala`.

```scala
sealed class Term
case class Variable(name: String) extends Term
case class Lambda(name: String, body: Term) extends Term
case class Application(func: Term, arg: Term) extends Term
```

Both of them are used to represent the `Term` of lambda calculus.

They look the same. I can’t say that is wrong, but two syntaxes actually have different: extendability.

Let’s say when we use these `Term` to do static analysis. When we report an error, we usually want to show where does the error happens, so we have to update our `Term` definition, in `Haskell`, it’s annoying.

```hs
data Term =
  Variable Location String
  | Lambda Location String Term
  | Application Location Term Term
# and when matching
case term of
  Variable loc name -> # ...
  Lambda loc parameter body -> # ...
  # ...
```

If you already use it everywhere, you would get crazy. Since you have to update every pattern-matching related to `Term`.

Oh, we can prevent this. But must do this from the beginning:

```hs
data Term =
  Term {location :: Location,
        value :: TermValue}
data TermValue =
  Variable String
  | Lambda String Term
  | Application Term Term
```

Otherwise when you want to change it later, good luck.

But in `Scala`, things different.

```scala
sealed class Term {
  val location: Location = new Location
}
case class Variable(name: String) extends Term
case class Lambda(name: String, body: Term) extends Term
case class Application(func: Term, arg: Term) extends Term
```

I’m not trying to show a full workable version(that anyway would be complex in any language). But showing that `class` help us to add a new field so easily. And proof that `class` can totally replace algebra data type.
The virtue of boring
Tags: development, management, process
Published: 2019-11-27 00:03:12

---
title: The virtue of boring
published: true
date: 2019-11-19 00:00:00 UTC
tags: development, management, process
canonical_url: https://emmas.site/blog/2019/11/19/the-virtue-of-boring
---

![Everyday african urbanism yasser booley 61198](https://upload.wikimedia.org/wikipedia/commons/thumb/e/ee/Everyday_african_urbanism_yasser_booley_61198.JPG/512px-Everyday_african_urbanism_yasser_booley_61198.JPG)

<small>Yasser Booley <a href="https://creativecommons.org/licenses/by-sa/3.0">CC BY-SA 3.0</a>, via <a href="https://commons.wikimedia.org/wiki/File:Everyday_african_urbanism_yasser_booley_61198.JPG">Wikimedia Commons</a></small>

At some point I’ll finish that essay on how toxic masculinity derailed the web, but [Robin Rendle’s essay on restraint in development](https://css-tricks.com/no-absolutely-not/) made a few things clear.

Rendle mentions diagnosing a performance problem that’s harming your users who can’t load your site to know if they will be affected by power cuts in part because of all the third party scripts it loads:

> But fixing that problem? It requires going through each script, talking to the marketing department, finding out who owns what script, why they use it, what data is ultimately useful to the organization and what is not. Then, finally, you can delete the script. The solution to the problem is boring as dirt and trying to explain why the work is important—even vital—will get you nowhere in many organizations.

This is not exciting work. It’s not work that gets solved with a single heroic pull request, replacing the site’s templating with a new JavaScript library, or a whole new feature.

Over the past few months [we’ve been cleaning up old metadata in Bugzilla](https://bugzilla.mozilla.org/show_bug.cgi?id=1476564). It takes video calls, emails, and working shared documents with long runs of comments to get to a consensus to turn off a field. But all those fields removed are that much more cognitive overhead removed from people reporting, triaging, planning, fixing, and verifying bugs.

It’s sorting the pantry so the cooking spices you use every day are always to-hand when you need them. Searching the pantry or the show bug page is gets in the way of getting work done. New cabinets and new UX might be engaging, but it’s expensive and not incremental.