teleren/devto huggingface dataset:
How is GraphQL different from the old days?
Tags: discuss, graphql, restful, webdev
Published: 2020-02-23 17:21:04

In the old days we have API to get data, and then later we have RESTful, and then now we have GraphQL. 

In the old days, we have custom-made query, to get exactly what we wanted, no more, no less.

And then, we have RESTful, and it was somehow treated like a gospel. And then, it was said that it was overfetching data, and underfetching data at the same time, and the exact data is wanted instead, no more, no less.

And then we have GraphQL... it just seem we are back to the old days, except in the old days, the backend team wrote the SQL queries for us, and use table join to give us exactly what we wanted. But now, the full stack or front end engineers can write it. How is GraphQL different from the old days?
Be more productive 🚀, less robotic 🤖 when inbox need too much attention
Tags: productivity, management, python, imap
Published: 2020-02-23 17:14:15

I worked in a french company that is using iTop internally.
This project was born out of a specific need which hinted at the possibility of a much more open and generic case. 

A company may face this problem:

How to manage an interoperability of services with others based solely on mails ?

At first they were using 'incoming mail' embedded module. Defined by *Combodo/iTop* as "This extension runs in the background to scan the defined mail inbox(es) and either create or update tickets based on the content of the incoming emails".

With the old solution (Incoming Mail):
  - Identification is very limited and restricted
  - It is mandatory to create IMAP files for each task
  - Scanner actions are limited to simple operations

Hermes offers a complete solution to what iTop/Incoming Mail cannot provide. A better way to identify mail and a more versatile way to react to it.

There is absolutely no need to know how to code in order to get started.

Right now, it is available in french only. It is open source and free to use. This project is "i18n ready", that mean it can be translated as easily as iTop was. That does not mean it is not translatable by Google. 

It is as easy as typing `docker-compose up` in shell to get started !

Every contribution and feedbacks are welcome.
Project available on GitHub : [https://github.com/Ousret/hermes](https://github.com/Ousret/hermes)

If needed, "Google-provided" [english translation](https://translate.google.fr/translate?sl=fr&tl=en&u=https%3A%2F%2Fgithub.com%2FOusret%2Fhermes)

![Web UI](https://dev-to-uploads.s3.amazonaws.com/i/gt7id1pppfeadqm3gl58.png)
Caps lock ışığı olmayan laptoplarda bildirim alma
Tags: capslock, laptop, bildirim
Published: 2020-02-23 17:05:45

Özellikle bir çok küçük boyutlu laptopta caps lock için ışık koymamaktalar. Dolayısı ile yazı yazarken büyük küçük harf için "caps lock" kullananlar için "en son büyükte mi kaldım yoksa küçükte mi?" sorusu önem taşımaktadır. 

Bu sorunun çözümü için uzun zamandır olan bir uygulama bulunmakta: "**indicator-keylock**"
https://launchpad.net/indicator-keylock

Bu uygulama ile birlikte caps lock, numlock veya scroll lock işlemleri için bildirim verilmesi sağlanmaktadır. İlgili uygulama kurulup gui üzerinden ayarları yapıldığında ilgili tuşa basıldığında aşağıdaki gibi bir bildirim ekranı gözükmekte.

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

Ayrıca talep edilmesi durumunda yine ayarlarda sistem çekmecesi içinde soluk ve aktif gözükecek şekilde bildirim ikonları da gözükebilmektedir.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/15aahm4cbdqm0a3iq5vf.png)
I Made a Chess Library in Java
Tags: projects, java, library
Published: 2020-02-24 01:35:49

---
title: I Made a Chess Library in Java
published: true
date: 2020-02-23 16:51:55 UTC
tags: Projects,Java,library,projects
canonical_url: 
---

One day I was feeling pretty bored, so I started making a chess library. I had originally named it ChessBored, but then I decided against...

The post [I Made a Chess Library in Java](https://jaeheonshim.com/i-made-a-chess-library-in-java/) appeared first on [Coding with Jaeheon Shim](https://jaeheonshim.com).
Question: How do you differentiate a Junior from a Senior? 
Tags: frontend, backend, python, javascript
Published: 2020-02-23 16:36:12

Recently I joined a company and they cataloged me as Junior Advanced (almost a semi-senior).

Although I know I'm not a senior, I feel like semi senior and I'd like to be re-cataloged soon. 

I know all these are non standardized levels and I want to make a presentation about how a Junior can become a Senior Developer. 

Can you give me ideas about this? 
I want to help others (and myself) to clarify this.
Be ok with failure. Software Engineer, aka 'Junior Machine Learning Engineer'
Tags: machinelearning
Published: 2020-02-23 16:16:39

I firmly believe the non-purist side of Machine Learning will be an additional skill of the Software Engineer in the future, if not already. We may not be able to interpret all the same math as a statistician can do (yet), but at minimum we'll be able to build and use tools that apply that math. The same way job descriptions list out all languages and frameworks preferred for a position, it will also include a list of ML algorithms. 

The same way you've learned other programming languages is the same way you should apply yourself to Machine Learning. Learn by doing. The first thing each language tutorial has you start is 'Hello World'. After that there is an entire website dedicated to learning how to build a TODO application in any number of languages and frameworks. (http://todomvc.com/). This is the basic building blocks of any web application, CRUD (create, read, update, delete). 

Start with the 'Hello World' of ML. Predict housing prices, predict stock prices, classify animals by feature. 

Once you have the bread and butter of ML algorithms in your skillset you can start finding ways to apply it to your applications. You'll start thinking about the data you need to record to 'fund' your experiments. 

And overall you need to be OK with failure. Un-similar to software engineering where almost all of our code is not thrown away, I find myself throwing away failed experiments all the time. I have spent a lot of my time exploring what algorithms work and do not work, what kinds of data I should be using, how I should extract more data from what I currently have. 

All this in hopes of getting more skilled at how to solve ML problems.
How I completed the first two projects on FreeCodeCamp
Published: 2020-02-23 16:15:48

I started to take interest in learning programming in 2017, but after doing the HTML and CSS challenges on freeCodeCamp, life got in the way and I abandoned the program to concentrate on some other ventures.

Fast forward to 2020, and I feel that was probably not the best decision I've ever made. So I've now resolved to restart the freeCodeCamp web development track and actually follow through this time till I achieve the success I want which is to become a professional developer.

I just completed the first two projects in the responsive web design section (Tribute page and Survery form) and I wanted to share a few thoughts on how I tackled each project to try to help anyone who is in a similar situation.

Looking through the sample projects was a bit scary for me because I wasn't sure how to create a similar output. But I remembered that I only need to use the bits and pieces of information gleaned from the challenges and bring them together in the projects.

So here's the process I used to complete each project:
<ul>
<li>I read through the user stories more than once.</li>
<li>I thought of the elements that would work for each user story.</li>
<li>I tried to visualise how the page will look like in my head. I did this even though I still have to look at the sample to see how the project looks like.</li>
<li>I start writing the code based on the user stories.</li>
<li>While I didn't look at the code of the sample project, I found other solutions online and compared with what I was doing.</li>
<li>I got the HTML part done first before moving to the CSS.</li>
<li>I always used Google whenever I got stuck on what element to use or how to apply CSS rules for an effect.</li>
<li>I didn't do anything extra apart from the user stories because I know there are more projects on the way, and so that I'm able to move fast.</li>
<li>I put my code on Codepen and submitted the link to freeCodeCamp.</li></ul>

I do feel the projects are becoming more challenging as I move from one to the other, but knowing that I can always break it down makes it much less daunting.
 
To view my completed projects, please visit the links below:

<a href="https://codepen.io/samivee/pen/ExjNvKK">Tribute page</a> 
<a href="https://codepen.io/samivee/pen/dyoOzMR">Survey form</a>

Feedback is welcome, and thanks for reading!
How to squash migrations in Django
Tags: django, migrations, webdev
Published: 2020-02-23 16:15:44

Today, when I was programming in a project with DRF, I had to create a new app with its respective model.
While I was creating my model, I had to make several changes (add fields, rename fields ...) so several migration files were also generated.
This can generate problems in the future because if for each change in our model a migration file is create, we can have a lot of migration files.

Django comes with a lot of different management commands that can be executed through the `manage.py` file that brings a lot of utilities.

The squashmigrations is one of these commands that can help us achieve just what we're looking for. It allows us to squash multiple migration files into a single one.
 
For example, if we have the following migration files:
```
./foo
    ./migrations
        0001_initial.py
        0002_project.py
        0003_article_project.py
        0004_auto_20200223_0123.py
```
We can squash all of them executing the next command:
`python manage.py squashmigrations <our_app> 0004`

That command generates a new file named `0001_squashed_0004_auto_<timestamp>.py`

And if you open this file, you can see:
* This file is marked as initial=True , meaning this is the new initial migration for your application.
* A new attribute named `replaces=[]` and added to the Migration class with a list of strings that represent the file names of all the migrations that were squashed.

![Alt img](https://media.giphy.com/media/lD76yTC5zxZPG/giphy.gif)

###Thanks for reading me!
What problem are you trying to solve with Machine Learning?
Tags: machinelearning
Published: 2020-02-23 16:11:53

Machine Learning is not a black box of magic with 100% success rate. We have to be OK with the idea that what we hope to achieve is not solvable due to any number of reasons.

Machine learning can learn from the data, yes, but figuring out what problems we can solve with Machine Learning is tough. Every post and tutorial you read is the highlight reel of someone's journey into Machine Learning. What isn't seen is what it took to get there. What isn't seen is all the failed experiments.

There are ways we can reduce the risk of failure. At a high level, saying you want to use ML to solve a problem is like saying you want to use a particular language or framework to build a web application. That doesn't inherently give you something to work with. You don't immediately go for the most complex and crazy sounding algorithms. You don't apply ML simply to include it in your marketing materials.

![wE uSe Ml In OuR aPPliCaTioN](https://dev-to-uploads.s3.amazonaws.com/i/pr4kx4eid35ejh8lo95c.jpeg)

You have to ask yourself:
What problem are you trying to solve?
What is the output you're trying to achieve?
What kind of data do you have to support your claim?
What has been done so far to try and solve this problem?

"As a user I want to see similar items to the one I just purchased."
^ An ML problem for sure, but say you're a small shop with only 50-100 items? Some simple code of checking the tags on the item selected and querying your list of items for similar tags will do. Only increase in complexity as you see this becoming unmaintainable.  Now you're at thousands of items, and your data is all tagged properly, and you have shopping behavior of your customers. Now you can run an ML algorithm to find what customers bought with, or next, or prior to, the item in question, along with the tags. You can then submit the customer's shopping history, along with the item itself, to an ML model to determine the next best item for them to purchase.

Put the question in a way that helps you think about what inputs you have and explicitly states what output you are trying to achieve. Thinking about the data you have acquired so far, and if in hindsight, thinking about the data that is not being recorded that you should start logging from now. "We can start recording what other items users viewed, that way we can build a network of similar items for purchased vs non-purchased similar items." "We can add referral links to see what items users shared with others and weigh that with a higher score for recommendation items."

ML is only tool. Only use it if it is the right tool for the job.
Compile Podcast Ep 6: Developer Health
Tags: podcast, workflow, health, career
Published: 2020-02-23 15:47:02

---
title: Compile Podcast Ep 6: Developer Health
published: true
description: A show where 2 programmers talk about anything and everything!
tags: podcast, workflow, health, career,
---

*This is reposted from [my personal site](https://nickwu007.github.io/).*

Hello everyone! Welcome to the Compile Podcast, a show where 2 programmers talk about anything and everything!

In this episode, we talk about Developer Health. We discuss the mindset towards health as developers and give coding and non-coding related tips.

{% youtube TjbIl0LZxpQ %}

Next week we will have a new topic to discuss! So subscribe and stay tuned!

[My Twitter](https://twitter.com/WujunaoNick)

This Podcast is also on:
 - [Google Play Music](https://play.google.com/music/listen#/ps/Ifd5mlxhgc5cmlsytadsglqfd4y)
 - [iTunes](https://podcasts.apple.com/gb/podcast/the-compile-podcast/id1436437367)
 - [Spotify](https://open.spotify.com/show/2UH9hK7VlS7ytjYdM8Vd78)

### Links in this episode:

["Why we sleep" book](https://www.amazon.co.uk/dp/0141983760/ref=cm_sw_r_tw_dp_U_x_DBBuEbY4M3E7A)

[My recommended audio book](https://www.amazon.com/Sherlock-Holmes-Treason-Audible-Original/dp/B084BT2LK4)
How do you help your teams manage tech debt?
Tags: discuss, debt, techdebt
Published: 2020-02-23 15:11:46

---
title: How do you help your teams manage tech debt?
published: true
description: I want to gather some details on how teams manage their technical debt
tags: discuss, debt, techdebt
---

Does your team struggle with technical debt? Or are you always on top of it with the full support of the business?

Are you a leader/product person on the team? Do you help the team with keeping on top of things? Or does the tech debt take a back seat?

Tell me your stories/ideas and experiences.

One of the tips I have and use for teams that use estimation is the following:
If you know that there is tech debt that needs addressing as it has been slowing you down a lot, you can always increase your estimates to allow for that time. As in theory developers use estimates to communicate how long certain features will take, so use the tools available to you to communicate technical debt.
Removendo propriedades de um objeto JavaScript usando destructuring e spread operator.
Tags: javascript, tip
Published: 2020-02-23 15:10:34

# O problema

Estou escrevendo testes unitários para um microserviço feito com TypeScript, testando funções que buscam dados no banco de dados, removem determinadas propriedades do objeto e o retorna para o cliente. Preciso ter certeza de que os dados estão sendo removidos, e para não reescrever todo o payload no meu arquivo de testes exceto pelas propriedades removidas, busquei uma solução mais simples.

# Exemplo

```js
// Função a ser testada

function fetchFromDatabase() {
  const payload = {
    id: 1,
    name: 'Vitor',
    secret: 'My secret'
  }

  delete payload.secret

  return payload
}

...

// Arquivo de teste (usando o chai, mas poderia ser qualquer lib de testes)

function testMyFunction() {
  const mock = {
    id: 1,
    name: 'Vitor',
    secret: 'My secret'
  }
  insertIntoDatabase(mock) // Exemplo adicionando um mock no banco de dados

  const result = fetchFromDatabase()

  const { secret, ...allowedProperties } = mock // Onde a mágica acontece.

  expect(result).to.be.eql(allowedProperties) // returns: true
}
```

# O que aconteceu?

Usamos o [destructuring](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) para selecionar as propriedades que *não* queremos, e com o [spread operator (`...`)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax) salvamos todo o resto (propriedades que queremos) dentro de `allowedProperties`.

# E o `delete`?

Na função que é testada é usada a keyword `delete`, mas poderia ser facilmente substituída pela nossa "técnica" de destructuring + spread operator.

No JavaScript temos a keyword [`delete`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete), que remove uma propriedade de um objeto. 

```js
const obj = { name: 'Vitor', role: 'Developer' }

delete obj.role

console.log(obj) // { name: 'Vitor' }
```

Entretanto, como podemos ver, ao usarmos o `delete` o nosso objeto é mutado. Particularmente, não é um comportamento que gosto de manter na minha base de código, pois pode dificultar os meus testes e criar side effects difíceis de debugar.
Why is Software/Tech such an attractive industry?
Published: 2020-02-23 14:56:23

**Symptoms of a good thing**

Things like remote-working and flexible hours are symptomatic of an industry that is good for workers, but you could stick those perks to an unattractive industry and not change it for the better. So...

**Causes**

Novelty. Engineering is not new, but the medium is. That's not to say that there are no old ideas holding practitioners back, but there's a lot of forward focus. Computing courses don't have modules on the Michelangelos and Da Vincis of programming, so we move forward, challenging current and old practices.

Possibility. If I were to begin a woodworking, blacksmithing, architectural, or pretty much any other making-things based project right now, I would have to make considerations for budget, materials, tools, and other limiting factors.
With my mid-range computer in front of me, it's more a 'the only limit is your imagination' kind of scenario, with notable exceptions like data science.
I can start my project on GitHub, use a free IDE to program in a free language and all of its free libraries, use some free (or free for the first thousand calls a day) web-services to host a website, keep a database, authenticate requests, and even do some machine learning tasks.

Accessibility. Do you have a computer? With an internet connection? Good enough. 
As well as having an open source community with all of the tools you need for a long time, there are blog posts guiding you through getting a website hosted for free in half an hour. There are many websites dedicated to teaching you how to program for free, with some high-quality paid courses for not a lot of money. Stuck on a problem? Ask Stack Overflow.

Intangibility. Like I said, this isn't woodworking, or anything physical (unless you want to work with RaspberryPi or another microprocessor), so the work is wherever you are. Want someone to help from the other side of the world? Timezones are your biggest barrier, big deal. No work in your city? Work remotely.
All of these things are easier said than done, but for many other industries these points are non-starters, or at best a Friday treat.

**Sum it up**

A new and unique combination of possibility, low barrier to entry, and minimal physical restrictions make for something that is only limited by the people within it, and they're usually willing to help.
Thoughts on Craft, Part 1
Tags: craft, craftsmanship
Published: 2020-02-23 14:56:08

A series tracking my thoughts on Software Craftsmanship as they develop.

**Get some words down there**

Hackathons, hackjams, meetups, conferences, and so on. Open Source communities, Hacker News, heated discourse on whether Agile actually works, stuff like that.

That's all stuff that makes me think that people care about what they do, and care about being better, however good they already are. I've attended talks from people who claim to exclusively pair-program, and others who love working with Clojure despite the fact that it's Clojure. There are a lot of talks generally, with lots of passion and ideas flowing.

**Boil it down, now**

What I'm getting at is that Software Development presents more as a vocation or a life choice than a career. There's a thriving community, where experienced professionals give up free time to learn and teach.

Nothing I've listed is unique to this industry, but it's all so pervasive that it makes a unique industry.
GH the new official Github CLI Tool (in beta) 
Tags: git, productivity, webdev, beginners
Published: 2020-02-23 14:33:15

Hi everyone,

Today's article is inspired by @rhymes comment on my previous article on hub.

You can read that article here [hub](https://dev.to/wolfiton/hub-the-github-wrapper-you-never-knew-1hdh)

Also, I got his/her permission to quote him/her.

So let's quote @rhymes:

> gh - The GitHub CLI tool

> gh is GitHub on the command line, and it's now available in beta. It brings pull requests, issues, and other GitHub concepts to the terminal next to where you are already working with git and your code.
![alt gh image](https://user-images.githubusercontent.com/98482/73286699-9f922180-41bd-11ea-87c9-60a2d31fd0ac.png)

> Comparison with hub(added this for clarity reasons- this is not in the original comment)

> For many years, hub was the unofficial GitHub CLI tool. gh is a new project for us to explore what an official GitHub CLI tool can look like with a fundamentally different design. While both tools bring GitHub to the terminal, hub behaves as a proxy to git and gh is a standalone tool.

Also, this whole article is taken from https://github.com/cli/cli

>The Github team needs our help to test and improve gh and to do that they need us to complete this small survey [gh Improvement Survey](https://forms.gle/umxd3h31c7aMQFKG7).

>**So if you have time **Dear Reader**, let's take gh for a test and help Github improve it and make a better tool for all of us.**

I hope to see you **Dear Reader** on the contributors' side to this project.

Together we can build better tools and we don't need advanced knowledge to do so. Any part when building a tool is important and can help the development go faster, with fewer bugs.

I hope you enjoyed this article and if you find it useful don't forget to share it on social.

Special Thanks to @rhymes for bringing this information in a comment on my previous article regarding hub and the GitHub Team who are building this new Github CLI Tool called gh.

Credits

@rhymes
https://github.com/cli/cli
Object lus in Python en Javascript (Dutch)
Tags: python, dutch, nederlands
Published: 2020-02-23 14:08:18

Het itereren over een object in <a href="https://python.org">Python</a> en <a href="https://www.javascript.com/">Javascript</a> is vergelijkbaar. Het enige verschil is de syntax.

Natuurlijk zijn de talen voor verschillende doeleinden gemaakt (met uitzondering op server side javascript). Toch zijn ze enigsinds vergelijkbaar.

Hier een voorbeeld. Het herhalen in Python (over een <a href="https://pythonbasics.org/dictionary/">dictionary</a>):

```python
obj = {
    'name': 'Victor'
}

for key in obj:
    print("key: %s, value: %s" % (key, obj[key]))
```

In Javascript als we hetzelfde doen:

```js
let obj = {
    name: 'Victor'
}

for (key in obj) {
    console.log(`Key: ${key}, value: ${obj[key]}`);
}
```

Python kan net als Javascript met <a href="https://pythonprogramminglanguage.com/python-json/">JSON</a> objecten werken. Dit is erg handig bij het bouwen van een web app in Python.