teleren/devto huggingface dataset:
Understand complex business data through simply connecting Google Analytics
Tags: googleanalytics, machinelearning, ux
Published: 2019-09-08 15:40:53

It's really important to have at hand, the main KPIs of your online business to act in real-time restricting potential losses or create marketing strategies that bring greater results.

For this reason, I decided to create a simple product that can meet these needs, but above all to be able to have suggestions in real-time concerning the data represented.

I created a simple MVP that represents in 4 slides, the most important KPIs represented in different graphs in the main areas of an online business:
- Overview
- Marketing
- Customers
- Products

I created a landing page to allow sharing of the dashboard and to be able to ask for feedback on where to use it.

If you are interested in being able to use a product in early stage, then, once created, maybe use it lifetime for you and your customers, subscribe to the following link:

[Intelligence Dashboard - Request Beta Access](https://www.subscribepage.com/intelligence-dashboard?utm_source=devto&utm_medium=article&utm_campaign=broadcast)
Unit Tests and Snapshots are Fake News
Tags: discuss
Published: 2019-09-08 15:24:08

---
title: Unit Tests and Snapshots are Fake News
published: true
tags: discuss
---

Alright, I've been told many times that I'm wrong on this but I can't help but feel the same way every time I write or update one of these things.

When writing a unit test I end up stubbing out an entirely fake environment for a given function to run in. This fake environment yields the results I expect every time because I mocked it to do so. So the test passes or fails as expected.

Same is true for snapshots. When I update a React component's render method. Of course, the snapshots will need to be updated. With this one I can at least see that _maybe_ if I update something not clearly referenced in the render method that it might update a snapshot inadvertently.

To me though these "tests" seem fake and not a true measure of if an app is well tested.

Again, I know I'm wrong but I'd love to hear from others on this because I honestly just don't see the value of these things.
Type-Checking for Python and Ruby is becoming a thing
Tags: python, ruby
Published: 2019-09-08 15:10:12

It looks like type-checking is becoming the thing to do for Python and Ruby. Prototype quickly, grow your product or service, and then start adding type-checking to ensure higher quality code and keep a competitive edge in terms of bug fixing and delivering more features.

* [Stripe created Sorbet for static type checking of their Ruby code](https://sorbet.org/).
* [Dropbox type-checked 4 million lines of Python code](https://blogs.dropbox.com/tech/2019/09/our-journey-to-type-checking-4-million-lines-of-python/).

When I was coding in [Common Lisp about a decade ago, what I really enjoyed about the SBCL compiler was that it had optional types](http://www.sbcl.org/manual/index.html#Declarations-as-Assertions).

So you could iterate quickly with prototypes and later on add types. What I especially enjoyed though was that the type-checking was used by the Common Lisp compiler to create more optimal code.

Nice to see other languages catching on to a great idea.
How do you store the pictures that users have uploaded in your website?
Tags: discuss
Published: 2019-09-08 14:32:38

---
title: How do you store the pictures that users have uploaded in your website?
published: true
tags: discuss
---

I did a training on Node.js in a company and the trainer there showed us how to convert an image to Base64 and store it into the database. What do you all think about that? Also how do you handle image uploaded to your website?
Concepts of Distributed Systems – Part 0
Tags: distributedsystems
Published: 2019-09-08 14:28:05


<p>Distributed systems are a norm now. And they are complex. As software engineers and architects, we need to have a technically accurate and precise understanding of various technologies and the trade-offs associated with them in order to build robust applications. Fortunately, there are enduring principles that apply to distributed systems. An understanding of the principles and their correct application helps in understanding, designing and developing robust distributed systems.</p>



<p>This multi-part series will cover the principles, algorithms and technologies which most real world distributed systems comprise of. It is not catered to the use of any specific software packages, since there is already plenty of documentation about those things. Instead, it covers the principles and trade-off’s of distributed systems and the design choices that specific use cases warrant. We do not cover deployment, operations, security, management and other such areas, which are complex and important topics, but would dilute the content and we would be unable to do justice to those topics.</p>



<p>This post broadly outlines the topics which we would be covering in the series.  Each topic listed below would most probably be further broken down.  At a high level the topics we would be covering as part of this series are </p>



<ul><li>What are distributed systems ?</li><li>System models for distributed systems<ul><li>Timing models<ul><li>Synchronous</li><li>Asynchronous</li><li>Semi-synchronous</li></ul></li><li>Inter Process Communication mechanism<ul><li>Message Passing</li><li>Shared Memory</li></ul></li><li>Failure modes<ul><li>Crash stop</li><li>Crash recovery</li><li>Omission faults</li><li>Byzantine faults</li></ul></li></ul></li><li>Properties of distributed Systems<ul><li>Safety</li><li>Liveness</li></ul></li><li>CAP Theorem/Brewers conjecture</li><li>Distributed Storage<ul><li>Reliability, Scalability, Maintainability</li><li>Data Models and Query languages</li><li>Storage Engine Design</li><li>Data Encoding</li><li>Replication<ul><li>Leader and Leaderless Replication</li><li>Replication Lag and Consistency Guarantees</li></ul></li><li>Partitioning/Sharding</li></ul></li><li>Distributed Compute And Messaging<ul><li>Batch Processing</li><li>Streaming</li><li>Data-flows</li></ul></li><li>Consensus Algorithms - RAFT</li><li>Membership Algorithms - SWIM</li></ul>
Daily Challenge #61 - Evolution Rate
Tags: challenge
Published: 2019-09-08 14:10:29

---
title: Daily Challenge #61 - Evolution Rate
published: true
series: Daily Challenge
description: A challenge from user @aminnairi
tags: challenge
---

Write a function getEvolutionRateMessage which takes two numbers before & after. The before value is the initial value of the evolution. The after value is the value after its evolution. An evolution can be calculated as follows:

`evolution = (after - before) / before * 100`

This function will return a string such that there are three possible outputs:
"A positive evolution of X%."
"A negative evolution of Y%."
"No evolution."

Examples:

getEvolutionRateMessage 11.29 45.79
getEvolutionRateMessage 95.12 66.84
getEvolutionRateMessage 0 27.35
getEvolutionRateMessage 41.26 0
getEvolutionRateMessage 1.26 1.26

"A positive evolution of 306%."
"A negative evolution of 30%."
"A positive evolution of 2735%."
"A negative evolution of 4126%."
"No evolution." 

***
_This challenge comes from [aminnairi](https://dev.to/aminnairi) here on DEV. Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
What is the biggest mistake new developers make when learning CSS?
Tags: css, css3, beginners, discuss
Published: 2019-09-08 13:18:43

---
title: What is the biggest mistake new developers make when learning CSS?
published: true
description: CSS is something every web developer learns but what are some big mistakes when you're starting out?
tags: css,css3,beginners,discuss
---
When I speak with some developers they often describe CSS as if they are fighting a battle. They managed to outmanoeuvre CSS and come out on top. 

![Peter Griffin from family guy trying to adjust blinds](https://media.giphy.com/media/13XW2MJE0XCoM0/giphy.gif)

CSS can be challenging when your just starting but it's even difficult for long time programmers. Read about what [I think some challenges are here](https://dev.to/darthknoppix/why-css-is-difficult-to-get-right-5a8e).

The biggest challenge I found when learning was positioning elements. It's gotten much simpler with the advent of Flexbox and Grid and I'm happy about that. The mix of `position: relative` and `float: left` spanning multiple elements was *very* hard to get right as a beginner.

**What do you think the biggest mistake new developers make when learning CSS?**
Go in VSCode: Showing code coverage after saving your code
Tags: vscode, go, codecoverage, testing
Published: 2019-09-08 11:12:35

## Requisites
- Vscode, installed Go extesion, of course.
- Install needed go packages: https://github.com/microsoft/vscode-go/wiki/Go-tools-that-the-Go-extension-depends-on 

Note: you don't need all packages in above wiki, but everything is good for your Golang development process on vscode, except `gometalinter` because it already archived on github

## Configuration
Add some configs into *User settings*, like below:

```json
{
    "go.coverOnSave": true,
    "go.coverageDecorator": {
        "type": "gutter",
        "coveredHighlightColor": "rgba(64,128,128,0.5)",
        "uncoveredHighlightColor": "rgba(128,64,64,0.25)",
        "coveredGutterStyle": "blockgreen",
        "uncoveredGutterStyle": "blockred"
    },
    "go.coverOnSingleTest": true
}
```
Instead "**gutter**" on type, you can try with "**highlight**".

You can take a look on available options vscode-go supports for **gutter** style here https://github.com/microsoft/vscode-go/blob/master/src/goCover.ts#L39

## Example

I'm having this file

```go
// filename: services/person.go
package services

type Person struct {
	name string
}

func (person *Person) Name() string {
	return person.name
}

func (person *Person) Foo() string {
	return person.name
}


```

Here is my testing code

```go
// filename: services/person_test.go
package services

import (
	"testing"
)

func TestPeople_Name(t *testing.T) {
	tests := []struct {
		name   string
		person *Person
		want   string
	}{
		{"should return a name", &Person{"Vuong"}, "Vuong"},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			if got := tt.person.Name(); got != tt.want {
				t.Errorf("DecisionMaker.Name() = %v, want %v", got, tt.want)
			}
		})
	}
}


```

Every time I've done to saving my code, the result of code coverage on `services/person.go` will be shown like the below one.

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


Happy coding!
My story of setting up Let’s Encrypt SSL on SiteGround
Tags: webhosting, let039sencrypts, security, veerotechvssitegro
Published: 2019-09-09 12:35:49

---
title: My story of setting up Let’s Encrypt SSL on SiteGround
published: true
tags: Web Hosting,Let&#039;s Encrypt S,security,VeeroTech vs SiteGro
canonical_url: https://kevinhq.com/my-story-of-setting-up-lets-encrypt-ssl-on-siteground/
---

This happens on the GrowBig account this weekend. Their documentation says the Let’s Encrypt SSL (without wildcard) should take effect immediately. Here’s the link to the doc which says it. It’s doesn’t work It’s doesn’t work in my case. The popup says the Let’s Encrypt SSL has successfully installed. But after waiting for almost 24… [Continue reading »My story of setting up Let’s Encrypt SSL on SiteGround](https://kevinhq.com/my-story-of-setting-up-lets-encrypt-ssl-on-siteground/) ![](http://feeds.feedburner.com/~r/kevinhq/~4/a21X6ERr7NE)
With Firefox69 Privacy Is the Default
Tags: privacy, browser, news
Published: 2019-09-08 10:23:41

**Privacy** is not an option in [Firefox69](https://www.mozilla.org/en-US/firefox/new/) browser version. It is _default by default_. With the new release of the browser, these are the new features it prsents for its users:

1. [Block Third-Party Tracking Cookies (by default)](#block-third-party-tracking-cookies).
2. [Block Cryptominers (by default)](#block-cryptominers).
3. [Block Fingerprinting (on strict mode - you have to enable it,and I'm going to show you how)](#block-fingerprinting).
4. [Block autoplay video's audio (by default)](#block-autoplay-video's-audio).

---

### Block Third-Party Tracking Cookies

As mentioned in [mozilla blog post](https://blog.mozilla.org/blog/2019/09/03/todays-firefox-blocks-third-party-tracking-cookies-and-cryptomining-by-default/), the new feature works behind-the-scenes to keep a company from forming a profile of you based on their tracking of your browsing behavior across websites — often without your knowledge or consent. Those profiles and the information they contain may then be sold and used for purposes you never knew or intended.

Here is how to see the blocked list for a website:

![Click on info icon beside address bar.](https://thepracticaldev.s3.amazonaws.com/i/w4ceomvhcwpkby9glnhf.png)
<figcaption>Click on info icon beside address bar.</figcaption>
<br />
![Click on Cookies.](https://thepracticaldev.s3.amazonaws.com/i/kuuixsjtwrpd7st5kysz.png)
<figcaption>Click on Cookies.</figcaption>

---

### Block Cryptominers

[Cryptominers](https://www.techopedia.com/definition/33729/cryptomining) access your CPU without your knowledge, make excessive computational operations and this leads to slowing down your machine, and drain your batteries. Allof these for creating cryptocurrency not for you but for them. Firefox blocks them by default. 

---

### Block Fingerprinting

Fingerprinting scripts have the ability to take a snapshot of your machine's configuration when you visit a website. This snapshot can then be used to track you accross the web. Firefox blocks fingerprinting by enabling _strict mode_.

To turn on strict mode, you will have to go to **options**, then chose **Privacy & Security**, and check **Strict**.

![How to enable strict mode](https://thepracticaldev.s3.amazonaws.com/i/ydc0r2tvjivq8lcvhz1f.png)
<figcaption>How to enable strict mode</figcaption>

---

### Block autoplay video's audio

You have three options with videos in Firefox:

1. Allow audio and video autoplay.
2. Block audio only(default).
3. Block audio and video until you press the play button.

You can alter the setting easily by going to **Privacy & Security**, then at **Permissions** locate the **Autoplay** settings.

---

As you see the new Firefox treats user _privacy_ as a first priority and this is really a win to this browser, and its users.
What are the most important things to teach a complete novice dev (and how)?
Tags: help, discuss, beginners
Published: 2019-09-08 08:37:38

A year ago I gave my brother a book on how to write Minecraft plugins in Java. It's a beginner book starting at the absolute basics in a fun context. He played a lot Minecraft (maybe a bit too much) and I was hoping to turn that into something useful.

Now about a year later (he's 16 now) he actually picked it up and started asking me all kinds of questions. Whilst  I'm psyched that started learning on his own I do have the impression that many of his questions could be answered by reading more thoroughly while others just seem trivial to me (I am aware that they might not be for a beginner though). When I look at his code I'm kinda horrified and at the same time not sure if it makes any sense to teach naming conventions etc. at this point.

My current approach for answering questions/giving tips is to just give the solution in case of language specific questions (like that you need to compare strings with `equals` in Java) and try to give hints in case of command/data flow issues in his program and have him google the answer in case of simple knowledge questions (like what the `%` operator does). The intention here is that he learns how to find answers and find errors by himself whilst not getting demotivated by stupid little issues that you just kinda learn with time.

So my question/topic what you think of my approach and how much in the direction of best practices like naming conventions I should try to teach at this point.
For all answers I'm also interested in what your current status is i.e. if your a beginner yourself, have mentored before or just sharing thoughts.
Scratching the macOS App Itch
Tags: macos, swift, productivity
Published: 2019-09-08 08:13:32

[Originally appeared on PeterWitham.com](https://peterwitham.com/swift-archives/scratching-the-macos-app-itch/)

Originally I was going to wait until SwiftUI arrived, but I have decided to start work on a macOS application that I need right now. When iPadOS and macOS Catalina arrive then sure I might refactor to make it cross-platform, I have a need for that as well.

I think I’m also going to develop this app in public and share the journey, partly as a record for me and partly as fun for you.

### So what is the application you ask?

Well anytime I do something with repetition I look to either automate or speed up the workflow. I have such a problem, every time I start a new blog post for my Gatsby based site, I need to add the same frontmatter to the markdown files and change the same fields…every time, I know how tedious right?

That’s where the app idea comes in. If I can create an app to solve the problem and learn something at the same time then it’s a win.

So the minimal viable product is simple, just needs to do a few things to be immediately usable by me at least.

1. Provide entry fields for me to fill in the metadata.

2. Give me a list of my templated post formats, I have several for different post types like Podcasts, Swift, etc.

3. Format the data into the specification I need for the markdown file to be usable by Gatsby.

4. Give me the option to copy it all to the clipboard after checking it is correct.

5. Give me the option to save it all to a new file ready for me to fill in the content.

Show us what you made already

OK, so after around 5 hours of work, I have achieved the list above without much fanfare right now. Which is fine, from here I can iterate the app and may even make it usable for others if there is interest.

### The interface is dead simple.

![](https://peterwitham.com/wp-content/uploads/2019/09/metamaker-screen1.png)
![](https://peterwitham.com/wp-content/uploads/2019/09/metamaker-screen2.png)
![](https://peterwitham.com/wp-content/uploads/2019/09/metamaker-screen3.png)


So that’s the start, let’s see where it goes from here. Next up is the configuration for things like the template so that others can use it possibly.
Akka Cluster, Kubernetes and More
Tags: kubernetes, akka, actors, distributedsystems
Published: 2019-09-08 07:12:04

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/3uxcuwnuwm6s6qdo1mi8.jpg)

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/036qq87n5vtlblmr1a7j.jpg)

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

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

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/1of35naido0pvofvkr17.jpg)

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

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

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/3zi68fnc371rih4fp4sz.jpg)

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

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

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

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

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

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

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

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

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

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/2kj1ubc4naikzl500et1.jpg)
JavaScript Iterators and Generators: Asynchronous Iterators
Tags: javascript, intermediates, asynchronous, iterators
Published: 2019-09-08 07:12:02

---
title: JavaScript Iterators and Generators: Asynchronous Iterators
published: true
description: All you should need to know about JavaScript Asynchronous Iterators
tags: javascript, intermediates, asynchronous, iterators
series: JavaScript Iterators and Generators
cover_image: https://thepracticaldev.s3.amazonaws.com/i/y7miaec5b2w8d2cg1y3r.png
---

Hi, nice to meet you 😄!
You can find this article in my personal blog [here](https://andreasimonecosta.dev/series/javascript-iterators-and-generators/).
Getting Started with Flask
Tags: flask, python, api, tutorial
Published: 2019-09-08 06:26:57

---
title: Getting Started with Flask
published: true
description: Get started with Flask, a web application python library
tags: flask, python, api, tutorial
---

 Hello there. Today we are going to take a look at Flask, which is a lightweight web application framework and it's really easy and quick to get started. Flask is really great for building APIs and Webapp's backend. So, first of all, you are going to need to have Python and Pip installed on your computer. If you don't have them installed, you can do so giving a look at the [oficial website](https://www.python.org/).

 Now we need to install Flask. We can install it with Pip:
`pip install Flask`

 Now that we have Flask installed, we can now create a folder to hold our project. In this project, we'll create a file named `main.py`. This file will be the heart and body of our flask application.

 To build a Flask application, we are first going to import our dependencies and then instantiate our flask application:
```python
from flask import Flask, request, jsonify
import time

app = Flask(__name__)
```

After all, we'll start to define our application's routes. In Flask, we define routes using the decorator `@app.route()` above a function and passing two arguments: the path and the allowed methods. In this case, we are providing `'/'` (root) as path and allowing only the GET method in this route. The function init, will then return `H3ll0 W0rld` which is exactly the request's response.
```python
@app.route('/', methods=['GET'])
def init():
    return 'H3ll0 W0rld'
```

After all the routes, we must now start to run the application. It can be done with the `run()` method of the application instance.
```python
if __name__ == '__main__':
    app.run(debug=True)
```

Now we can finally run our flask app and test out the routes. Save the file and run the script: `python main.py`. We can then open our browser and access `localhost:5000` to see the output.
![accessing '/' route](https://thepracticaldev.s3.amazonaws.com/i/veq5hqdpptcwnyp5bp7h.png)

We can also return HTML code and pages when handling a request:
```python
@app.route('/link', methods=['GET'])
def link():
    return '<a href="#">Link to nowhere</a>'
```
![Link to nowhere](https://thepracticaldev.s3.amazonaws.com/i/md8i1fqp9vazyo9y56hw.png)

It's only that for today. Just like Python, Flask is very expressive and easy to get into. You don't need to learn much to start applying it in real problems and solutions. You can learn more at [flask docs](https://flask.palletsprojects.com/en/1.1.x/). Thank you for reading until the end!