teleren/devto huggingface dataset:
Go language data types
Tags: go, beginners
Published: 2020-03-03 00:30:20

In the <a href="https://golang.org/">Go programming language</a>, data types are used to declare functions and variables. 

A <a href="https://golangr.com/variables/">variable</a> can be a boolean (True/False), a number (1,2,3), text etc. The Go language needs to know what kinds of data you want to store.

There are several types of data by category:

No. | Type and Description
--- | ---
1 | **Boolean** Boolean values ​​can only be constants true or false. A simple example: var b bool = true.
2 | **numeric** type Int integer and floating-point float, Go language support integer and floating point numbers, and native support complex, wherein the position calculation using complement.
3 | **string type:** Character string is a string of fixed length connecting the character sequence. Go strings are connected by a single byte. Go byte language string using UTF-8 encoding of a Unicode text identifier. 
4 | **derived types:** pointer, an array, struct, Union, function, slice, interface, map, channel

## numeric type

Go is also based on the type of architecture, such as: int, uint and uintptr.

No. | Type and Description
--- | ---
1 | **uint8** Unsigned 8-bit integers (0 to 255)
2 | **uint16** Unsigned 16-bit integers (0 to 65535)
3 | **uint32** Unsigned 32-bit integers (0 to 4,294,967,295)
4 | **uint64** 64-bit unsigned integer (0-18446744073709551615)
5 | **int8** Signed 8-bit integer (-128 to 127)
6 | **int16** Signed 16-bit integer (-32768 to 32767)
7 | **int32** Signed 32-bit integer (-2147483648 to 2147483647)
8 | **int64** Signed 64-bit integer (-9223372036854775808 to 9223372036854775807)
  
Float:

No. | Type and Description
--- | ---
1 | **float32** IEEE-754 32-bit floating point number
2 | **float64** IEEE-754 64-bit floating point number
3 | **complex64** 32-bit real and imaginary
4 | **complex128** 64-bit real and imaginary
  
## other numeric types

Here are more of the other types of numbers:

No. | Type and Description
--- | ---
1 | **byte** Similar uint8
2 | **rune** Similar int32
3 | **uint** 32 or 64
4 | **int** And the same size as uint
5 | **uintptr** Unsigned int, for storing a pointer
Let's make remote work mainstream! Remote work for synchronous, verbal-communication-based teams
Tags: remote, productivity, startup, zoom
Published: 2020-03-03 01:23:49

Hello all!

I just wrote an article: [How remote work is done at my company](https://gumroad.com/l/fatcPp).

Before joining this company, I'd tried a simple remote experiment in one of my previous companies and it's failed catastrophically.

It's now common knowledge that **remote work** is (1) hard to mix with non-remote teams, and (2) for **asynchronous, writing-heavy teams**. [My article](https://gumroad.com/l/fatcPp) **challenges the second point**.

So, go [give it a read](https://gumroad.com/l/fatcPp) and tell me your thoughts, please.

This is not to take from asynchronous, writing-based communication. But some people with their current skill set, and some use-cases like baby startups perhaps?, are perhaps better suited for **synchronous, verbal, screen-share communication**. And they don't have to pay the cost of commute!

[This article](https://gumroad.com/l/fatcPp) is the cultivation of my ~8-9 months of remote work, and a **couple-of-years remote experience** of my team. Sincerely hope [it](https://gumroad.com/l/fatcPp) helps!

So, if you want to know how to **work remotely successfully** with a **synchronous, verbal-communication-based team** -- a team that dislikes writing and asyncronity, **read [this article](https://gumroad.com/l/fatcPp): [How remote work is done at my company](https://gumroad.com/l/fatcPp)**.

# Update

Due to current events, the article is now free: https://gumroad.com/l/fatcPp
Nouveau sürücüsünü pasif yapma
Tags: nouveau, nvidia, modprobe
Published: 2020-03-03 06:30:36

Bazı durumlarda nvidia sürücüsünden kaynaklı kernel hataları ile karşılaşılabilmektedir. Örneğin USB üzerinde çalışma yapılırken /var/log/syslog üzerinde anlamsız KERNEL hataları ile karşılaşabilirsiniz.

İlgili hata kaydında genellikle ekran kartı ibaresine benzer ifadelerin yer alması bu konuda problemin ekran kartı ile ilgili olabileceğini gösterebilir.

Çözüm olarak Linux üzerindeki varsayılan sürücü'nün kullanılması ve dağıtımlar ile gelen Nouveau'nun kara listeye alınması önerilebilir. Tabi yükselerek gelen Nvidia'nın kendi sürücünün kurulması için de bu adımlarım yapmak önşart gibi düşünülebilir.

Ubuntu 18.04, Debian 9 ve 10, Pardus 17.x ve 19.x'te çalışmaktadır.

Özet ile çalışmada aşağıdaki iki satır modprobe altında blacklist oluşturmalıdır. Yapılan iş özetle nouveau modeset'ini 0'a çekmek ve nouveau'yu blacklist'e eklemektir.

```bash
sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
```

Bu adımdan sonra initramfs'in tekrar güncellenmesi gerekmektedir. Bu adım olmazsa grub ekranında elle kapatmanız gerekir ki bu otomatik bir sistem için mantıksızdır.

```bash
sudo update-initramfs -u
```

İşlemin geçerli olabilmesi için sistemi yeniden başlatmanız gerekli ve yeni ayarlara sahip initramfs ile sistemin başlatılmasıdır.

```bash
sudo reboot
```

Sistem bu adımdan sonra nouveau olmadan başlatılacaktır. Bu nedenle çözünürlük ile ilgili problemler yaşamanız olasıdır. Bu gibi durumlar için nvidia'nın sürücüsünü kurmanız gerekmekte.

Ex nihilo nihil fit
What is UI Design?
Tags: uiweekly, ux, typescript
Published: 2020-03-04 05:39:59

UI is the design or visual graphics that help in the interaction between humans and devices.

https://bit.ly/2vdBrcq

It is also one of the ways which help users to interact with an application or a website. UI is a mixture of graphics and typography.

The main objective of UI design is to make communication with users very smoothly and efficiently and by fulfilling the user’s contentment.

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

A top-notch UI design helps in accomplishing any task easily without causing any unnecessary glitch.

The design of UI must be done with the utmost care, by balancing all the technical and visual elements precisely to produce a system that is usable and adaptable rather than being only operational.

Please Like, Share & Comment: https://bit.ly/2vdBrcq
Modern data practice and the SQL tradition
Tags: todayilearned, database, sql
Published: 2020-03-05 13:00:09

*TL;DR notes from articles I read today.*

### [Modern data practice and the SQL tradition](xhttp://bit.ly/2OBGkSl)

- Beware the schemaless nature of NoSQL systems, which can easily lead to sloppy data modeling at the outset. Start with an RDBMS in the first place, preferably with a JSON data type and indices on expressions, so you can have a single database for both structured and unstructured data and maintain ACID compliance.
- Bring ETL closer to the data and be wary of decentralized data cleaning transformation. Push data cleaning to the database level wherever possible - use type definitions, set a timestamp with timezone policy to enable ‘fail fast, fairly early’, use modern data types such as date algebra or geo algebra instead of leaving that for Pandas and Lambda functions, employ triggers and stored procedures.
- Create more features at the query level to gain flexibility with different feature vectors, so that model selection and evaluation are quicker. 
- Distributed systems like MongoDB and ElasticSearch can be money-hungry (both in terms of technology and human resources), and deployment is harder to get right with NoSQL databases. Relational databases are cheaper, especially for transactional and read-heavy data, more stable and perform better out of the box.
- Be very meticulous as debugging is quite difficult for SQL, given its declarative nature. Also, be mindful of clean code and maintainability. 

*[Full post here](http://bit.ly/2OBGkSl), 13 mins read*

---

### [Eventual vs strong consistency in distributed databases](http://bit.ly/32G5FRR)

- Ensure you replicate data for storage - in the case of databases, redundancy introduces reliability.
- For consistency across multiple database replicas, a write request to any node should trigger write requests for all replicas.
- In an ‘eventual consistency’ model, you can achieve low latency for read requests by delaying the updates to replicas, but you will risk returning stale data to read requests from some nodes if the update has not reached them yet.
- With a ‘strong consistency’ model, write requests to replicas will be triggered immediately. However, they will delay subsequent read/write requests to any of the databases until the consistency is reached. 

*[Full post here](http://bit.ly/32G5FRR), 4 mins read*

---

*[Get these notes directly in your inbox every weekday by signing up for my newsletter, in.snippets().](https://mailchi.mp/appsmith/insnippets?utm_source=devto&utm_medium=post08&utm_campaign=is)*
Listado con Bootstrap estilo Masonry sin JS
Tags: spanish, bootstrap, css, beginners
Published: 2020-03-06 16:01:37

<p>El HTML está maquetado con el preprocesador "Pug" y la hoja de estilos con "SCSS", no necesita JS. Las clases utilizadas son por defecto de Bootstrap, excepto la clase <code>.card-block</code> que la he creado para realizar el efecto en el :hover. También he utilizado la clase <code>.stretched-link</code> en el link para que sea "clicable" la tarjeta completa.</p>
<p>Espero que sea de ayuda. Cualquier comentario será bienvenido 👍</p>

<a href="https://codepen.io/badiali/full/qBdPooX" target="_blank">![Listado  con Bootstrap 4 estilo Masonry sin JS](https://assets.codepen.io/268001/internal/screenshots/pens/qBdPooX.default.png?format=auto&ha=false&height=720&quality=75&v=1&version=1594971043&width=1279)</a>

<p>📎 <em>Puedes cambiar el zoom de CodePen a 0.5x para ver la versión de escritorio</em></p>

{% codepen https://codepen.io/badiali/pen/qBdPooX default-tab=result %}
Anna still codes
Tags: wecoded, learning, career
Published: 2020-03-08 15:33:09


Last year in March I shared my story about how I got into development:

{% link https://dev.to/lightalloy/nevertheless-anna-buianova-coded-39e9 %}

This year I still code and do other things related to software development. Here are some of my accomplishments since that time:

- with {% user latefebruary %} and the team we organized the first [RailsGirls event](https://vk.com/railsgirls_spb) in Saint Petersburg. It was the second in Russia and the first within the last 5 years. And we are preparing for a new one in April!
- started public speaking. I gave a short talk at our RailsGirls event and then a [longer one](https://www.youtube.com/watch?v=mGxslHrOJ58&) at the Pyladies meetup this year.
- I wrote a series at DEV about reading and technical books

{% link https://dev.to/lightalloy/learning-to-love-software-development-books-5e4 %}

- I started writing more consistently [in Russian](https://t.me/light_codes) about it and work-related topics

- I continued to learn, as usual :)

I have more technical accomplishments this year too but they seem less noticeable to me comparing to the "brand new" stuff that I did during this time.
I have spent many years in IT already and through these years I was feeling burned out at times. But later I discovered that there are many opportunities to grow in our field besides improving our technical skills. We can teach, write, give talks, and do many other things while still staying technical. Helping others is a great motivation to grow ourselves ✨ It also helps with burnout (as long with other measures, like limiting our working time!)

Happy international women's day! Let's support each other, learn to be more compassionate to others, while not forgetting to be more self-compassionate as well.
Arrow Function and "this" keyword
Tags: javascript, beginners, webdev, typescript
Published: 2020-03-09 06:45:29

#Arrow Function#
Arrow function expression are a more concise syntax for writing function expressions although without its own bindings to the this, arguments, super, or new.target keywords. They utilize a new token, =>, that looks like a fat arrow. Arrow functions are anonymous and change the way this binds in functions.

Code samples:
{% runkit %}
//ES5 example for function
var multiplyFunction = function(x, y) {
  return x * y;
};

// ES6 arrow function much concise syntax
const multiplyArrowfunction = (x, y) => { return x * y };
{%endrunkit%}




Following are the examples about arrow function
Examples:
{% runkit %}

let sumofNumber = (a, b) => a + b;

/* This arrow function is a shorter form of:

let sumofNumber = function(a, b) {
  return a + b;
};
*/

alert( sumofNumber (1, 2) ); // 3
{%endrunkit%}


**In case if you have one argument only,then parentheses around parameters can be avoided,making that even shorter ans simpler syntactically**.
{% runkit %}
let multiplybytwo = n => n * 2;
// roughly the same as: let multiplybytwo = function(n) { return n * 2 }

alert( multiplybytwo (3) ); // 6
{%endrunkit%}


#this keyword #

Execution context for an execution is global — which means if a code is being executed as part of a simple function call, then this refers to a global object.
Arrow functions do not bind their own this, instead, they inherit the one from the parent scope, which is called "lexical scoping".In code with multiple nested functions, it can be difficult to keep track of and remember to bind the correct this context. In ES5, you can use workarounds like the .bind method.Because arrow functions allow you to retain the scope of the caller inside the function, you don’t need to use bind.

{% runkit %}

function printWindow () {
console.log("Simple function call")	
	console.log(this === window); 
}

printWindow();	//prints true on console
console.log(this === window) //Prints true on console.
{%endrunkit%}
A countdown clock? In an email?? In this economy?!
Tags: email
Published: 2020-03-10 09:08:52

---
title: A countdown clock? In an email?? In this economy?!
published: true
description: How would you implement a countdown clock in an html email?
tags: email
---

Yesterday, I got an email from Memrise, a popular language learning tool.

The email had an animated countdown clock in it, which unfortunately I didn't think to capture with a screen recorder. Nevertheless, here is what it looks like now:

![Memrise Email Countdown Clock](https://dev-to-uploads.s3.amazonaws.com/i/xpf3id7nedredm1s8ae3.png)

Having worked on HTML emails in the past, I was impressed.

Email is the Wild West of web development. Best practices for email would make most of us cry. You can never use javascript, you have to do layouts with tables, and most of your fancy CSS just won't work.

I wanted to know how they did this countdown magic.

First, I notice that the countdown clock was an image. Duh. It had to be!

So then I followed the source of the image and saw it was a url without a file extension. I.e., there was no `.png` or `.jpeg` at the end of the url. It was just `https://gen.sendtric.com/countdown/zkihae5gaj`.

I opened this url and inspected the headers to see what was going on:

```
HTTP/1.1 200 OK
Pragma: no-cache
Content-Type: image/gif
Transfer-Encoding: Identity
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0
ETag: 14126387014612041038
Date: Tue, 10 Mar 2020 08:51:54 GMT
Content-Encoding: gzip
Expires: -1
Vary: Accept-Encoding
```

Right! It's a gif.

But... how'd they get the gif to work like a countdown?

This part is just guesswork, but I'd imagine that this endpoint programmatically sends back a non-looping gif depending on the server time.

That is, the server calculates how many seconds are left until Memrise's sale finishes, then it sends back a gif that animates a new frame every second, starting from the time until sale expires and finishing at `00:00:00:00`.

Now, when I download and inspect the gif, it is only one frame, `00:00:00:00`.

I wish I had time to try to recreate this... but unfortunately, I just got to work!

If you have an alternative theory about how this magical countdown clock works, I'd love to hear it in the comments :grinning:
My first Vue.js project: A Pathfinding Visualizer
Tags: vue, webdev
Published: 2020-03-09 14:37:47

Hello community members!!

Recently I have made a project using Vue.js. This is my first web project. I have written an article about it on Medium. If you are interested, here is a friend link to it.
https://medium.com/@tinku.kvs/my-first-vue-js-project-a-pathfinding-visualizer-7229f7c3b017?source=friends_link&sk=b9dc3cd99c8f14877fa8467d71df017b

The project is called Pathfinding Visualizer. Here is the website
https://tinku10.github.io/pathfinding-visualizer/

Consider giving a star on Github if you like it. It would really help me a lot.
Usando o operador de coalescência nula do ES2020 no JavaScript
Tags: nullcoalescing, operators, javascript
Published: 2020-03-10 12:33:01

---
title: Usando o operador de coalescência nula do ES2020 no JavaScript
published: true
date: 2020-03-10 12:30:51 UTC
tags: null-coalescing,operators,javascript
canonical_url: 
---

#### Entendendo e utilizando o operador de coalescência nula que foi introduzido no ES2020

![](https://cdn-images-1.medium.com/max/800/1*UD0TMy5p2jQtYEGqGJqDuw.jpeg)<figcaption>Photo by <a href="https://www.freeimages.com/photographer/hossein_kh-53992">hossein khosravi</a> from <a href="https://freeimages.com/">FreeImages</a></figcaption>

Foi introduzido um novo operador para gerenciar valores indefinidos ou nulos no ECMAScript 2020. A sintaxe do novo operador são dois pontos de interrogação seguidos “??”. O operador irá retornar o valor do lado direito quando o valor do lado esquerdo for nulo ou indefinido.

Atualmente a [proposta](https://github.com/tc39/proposal-nullish-coalescing) de adicionar este operador está no estágio 4, que significa que está pronto para ser incluído. Você pode testar essa funcionalidade nas versões mais recentes do Chrome e Firefox.

A utilização é bem simples:

{% gist https://gist.github.com/omarkdev/5c49eef26805d5b4a22ed8d343a0238f %}

### Bem parecido como antigamente

A similaridade com os outros operador && e || é bem grande, mas por que não utilizar os operadores antigos? Esses operadores são utilizados para manipular valores _truthy_ e _falsy_. Os valores _falsy_ são: null, undefined, false, número 0, NaN e string vazia. Já os valores _truthy_, são todos os outros valores não _falsy_.

A particularidade dos operadores && e || algumas vezes pode nos induzir a alguns erros. Imagine que um valor null ou undefined para você é algo que você tenha que se preocupar, mas o número 0 não, se você optar por utilizar esses operadores pode ser que você seja induzido ao erro.

{% gist https://gist.github.com/omarkdev/0aed498600d96ebed7980801959f2740 %}

Com o operador ||, o valor da direita é retornado pois o valor da esquerda é um valor _falsy_, na qual no nosso caso é um problema. Utilizando o novo operador de coalescência nula, fica mais simples essa abordagem.

{% gist https://gist.github.com/omarkdev/4f7d2be1d6a15369bedb10991fdc3bb0 %}

E como já foi dito, o valor se preocupa apenas com undefined e null, todos os outros valores _falsy_ são considerados como “verdadeiro”.

{% gist https://gist.github.com/omarkdev/191b3b0eccf5640a2be20ecbfb65c052 %}

Esse operador é algo extremamente simples e útil, com a evolução da especificação estamos cada vez mais prontos para lidar com essas divergências de valores.

Espero que isso te ajude de alguma forma.

**Twitter**: [_https://twitter.com/omarkdev_](https://twitter.com/omarkdev)  
**Github**: [_https://github.com/omarkdev_](https://github.com/omarkdev)

* * *
Custom Errors extend, new and rethrows
Tags: javascript
Published: 2020-03-09 15:01:56

##### Create new Class
```javascript
  class TypedError extends Error {
    constructor(message,_type,_severity = 0) {
      super(message);
      this.type = _type;
      this.severity = _severity;
    }
  };
```
unlike the standard *Error* that you can throw like so
```javascript
throw Error("Wunderbar")
```
the extended class should be called with ** new ** keyword
```javascript
throw new TypedError(error.message,"CustomerOnboardFailed",2)
```

and if you want to rethrow the CustomError in the trycatch block you should pass the customError object in the rethrow statement

```javascript
function gonnaThrow(){
    throw new TypedError("CustomError message","InsufficientBalance",9);
  };

  function gonnaRethrow(){
    try {
      gonnaThrow();
    } catch (error) {
      throw error;
    };
  };

  function main(){
    try {
      gonnaRethrow();
    } catch (error) {
      const {name,message,stack,type,severity} = error;
      console.log({name,message,stack,type,severity});
    };
  };
```
Today no women developer showed up at work (Mexico)
Tags: women, humanism, wecoded
Published: 2020-03-09 17:35:52

---
title: Today no women developer showed up at work (Mexico)
published: true
description: 
tags: women, humanism, shecoded
---

Many **women in Mexico** didn't show up at work today (Neither my *female developer/software engineer co-workers*). The number of reported femicides is **increasing**.

Women are **tired** of **living scared** of being *harassed, assaulted, denigrated, beaten, and murdered* at **home, school, work, in the streets, at any place, at any time**, so they decided to disappear for **1 day** after protesting in the streets yesterday, to make everybody think more about this problem. 

As a man, son, brother, boyfriend, and friend, **I feel horrible that they don't feel safe**. It's a nightmare to say goodbye to them in the morning because we never know if they will come back at night.

Maybe this way of acting is not the right one, but **they are trying to make their voice be heard**. They demand *justice, security, safeness, and equal rights* (Everything they deserve as a human being).

**Today**, we **remember** their **value**, **great abilities**, **effort**, and **power**. 

Without them, we wouldn't have had what we have. All women have the same value as any other recognized one. When I see my **female co-workers**, I see the next **Grace Hopper, Margaret Hamilton, Sally Kristen, etc.**

**Thanks to all the people who write in dev.to**, for creating a place where **women** can **learn** and **give their opinion** freely in the stuff they are passionate about.
Mechanical Keyboards
Published: 2020-03-09 22:22:16

---
title: Mechanical Keyboards
published: true
description: 
tags: 
---

I have some Amazon vouchers and was looking at purchasing a mechanical keyboard. I did some research and bought this Corsair [keyboard](https://www.amazon.co.uk/gp/product/B07DNSTH51/ref=ppx_yo_dt_b_asin_title_o05_s00?ie=UTF8&psc=1) with the Cherry MX Red, but having plugged it in and setup after an hour of use I decided I wasn't keen on the noise and sent it back. 

Any recommendations or suggestions?