teleren/devto huggingface dataset:
A little trick to left align last row's items with Flexbox
Tags: css, flexbox, html, webdev
Published: 2018-11-20 21:29:13

---
title: A little trick to left align last row's items with Flexbox
published: true
description: 
tags: #css, #flexbox, #html, #webdev
cover_image: https://thepracticaldev.s3.amazonaws.com/i/7hunn4l9qsjh5fph1yzq.jpg
---

For my first article here I wanted to share with you a little trick I have learned few months ago. 

For those who, like me, loves working with Flexbox, you have probably encountered in the past the problem of items in the last row who don't behave quite well. Meaning by that, they don't have a left align : 

![first_picture](https://thepracticaldev.s3.amazonaws.com/i/tdmtp7ujku6nkkbk7221.png)

Very unsatisfying isn't it ?

Well, there is a very simple way to have a perfect left alignment with a simple html property: **aria-hidden** 

This property will indicate that the element as well as its children will not be visible nor perceivable by the user or the reader. [For more informations you can go on the W3 website ](https://www.w3.org/WAI/PF/aria/states_and_properties#aria-hidden).

So here some simple html to create those beautiful blue squares up there : 
![second_picture](https://thepracticaldev.s3.amazonaws.com/i/5rvl05llgdidc291ulpb.png)

As you can see I have six empty divs to create the squares and below three `<i>` tags with the aria-hidden property sets to "true".

These `<i>` tags correspond to the square elements I might need to complete the last row. To be clearer, my rows are made up of four elements. If you don't know how many elements you will have in your rows, you can however know that you will have at least one element in the last row. So, you'll need as many `<i>` tags as there is places in your row, minus one.

Now, we need some css :
![third_picture](https://thepracticaldev.s3.amazonaws.com/i/g6g75tui2kx08n5syxu0.png)

Here, I gave to the container of my rows different Flexbox properties including `justify-content: center`. But this trick works with others values like `space-between` or `space-around`.

Look at my items. I gave them a `width and an height of 250px` as well as `margins of 20px`.

The important thing here is that you have to give to your `<i>` tags the same width, height and margins as your items.

And finally, TADAAA!!! A perfect left align ;)
![fourth_picture](https://thepracticaldev.s3.amazonaws.com/i/wesyl6ew5uqi4e9sy5pd.png)
A short list of Data Science resources #3
Tags: python, datascience
Published: 2018-11-20 19:09:30

---
title: A short list of Data Science resources #3
published: true
description: 
tags: #python #datascience
---

Also this week I decided to gather some interesting blog posts, related to data science and Python, that I found in the last days. I hope that can be useful for someone else.

- A curated glossary of machine learning terms
https://semanti.ca/blog/?glossary-of-machine-learning-terms
- On the importance of starting from a baseline model in data science https://blog.insightdatascience.com/always-start-with-a-stupid-model-no-exceptions-3a22314b9aaa
- An excellent introduction to Python decorators: https://realpython.com/primer-on-python-decorators/
- Some Python handy tricks (not all of them aim of increasing your productivity) https://medium.freecodecamp.org/an-a-z-of-useful-python-tricks-b467524ee747

If you have any feedback or cool resources, please share them in the comments!
How do you manage your bookmarks?
Tags: discuss, help
Published: 2018-11-20 18:49:18

---
title: How do you manage your bookmarks?
published: true
tags: discuss, help
---

Especially the relevant ones, not yet read, not to be buried or forget about, worthy of future review but that, for any reason, can not be read immediately.

Browser extensions, external apps, custom tools, paper and pencil, etc?
How would you deploy a simple web application to a single VM?
Tags: discuss, devops, deployment
Published: 2018-11-20 18:13:52

---
title: How would you deploy a simple web application to a single VM?
published: true
description: 
tags: discussion, DevOps, deployment
---

When deploying a simple web application to a virtual machine, how do you go about setting it up?

- Do you install the required runtime, if any, (like Python, Ruby, NodeJS) directly on the VM? Do you create systemd unit files to launch the application on startup?
- Do you use vagrant?
- Do you use Docker
- Do you do something completely different

Why do you choose that particular way of deploying?
Password manager recommendations?
Tags: discuss, security
Published: 2018-11-20 18:05:06

Password managers are one of those tools that people don't tend to swap around because it can be a real pain. I have _hundreds_ of credentials and going through the process of setting up new passwords is something I don't have time for, and only consider when my password manager has an outage. Like today. 


We set up our password manager years ago and now I'm wondering if it's time to switch to something else. What are your suggestions? 

Below are two open source password managers I'm looking into:

{% github https://github.com/buttercup/buttercup-desktop %}

{% github https://github.com/bitwarden/core %}
The Compile-To-JS Zoo
Tags: healthydebate, discuss, webdev
Published: 2018-11-20 17:37:48

---
title: The Compile-To-JS Zoo
published: true
description: Tell me your favorite compile-to-JS tool
tags: healthydebate, discuss, webdev
cover_image: http://www.alux.com/wp-content/uploads/2014/08/Zoo-Parc-de-Beauval-France-Savana-Animals.jpg
---

There are *lots* of tools that promise to let you write your client-side code without touching an ounce of JavaScript.

Which ones does the Dev.to community use?  Why should we drop everything and run towards your tool of choice?  What are we gaining over just using ECMAscript?

My personal number 1 choice is [Re-Frame](https://github.com/Day8/re-frame).  The minimal (750 SLOC!) structure it imposes makes perfect sense, and it lets you avoid rolling your own architecture.  Defining UI with Clojure vectors via Reagent couldn't feel more natural, and interop is so seamless you barely notice you're doing it.  Once you learn where everything goes, you've got everything you need to build performant, scalable real-world applications.

Next on my list to try is [Halogen](https://github.com/slamdata/purescript-halogen), but I haven't managed to get my head around it quite yet beyond a "hello world" application.  PureScript is fascinating tech, though, and I'd love to dedicate more time to learning how to use it.

The easiest one I've used so far is [ReasonReact](https://reasonml.github.io/reason-react/).  If you've used React, you can already use this tool and reap the benefits of the underlying OCaml compiler to check your code.

There's dozens I haven't mentioned - that's your job!  Sell me on something nifty.

I'd also love to hear opinions about why this is all hogwash and we should just stick with what's already right in front of us.  ES6/7/next/infinite is an expressive, robust tool in its own right, drawing inspiration in many cases directly from these tools - make your case below.
Getting Trellis to work
Tags: wordpress, trellis, tipstrics
Published: 2018-11-13 19:57:05

---
title: Getting Trellis to work
published: true
description: What kind of things I needed to get Trellis to work
tags: Wordpress, trellis, tips&trics
---

![Trellis in Granada. We have that too](https://thepracticaldev.s3.amazonaws.com/i/3cy0u89pq3zivpmn79hl.jpg)


[Trellis](https://roots.io/trellis/docs/local-development-setup/) is a set of scripts and tools, based in Vagrant and Ansible, that allow you to *cough* _easily_ set up a [Wordpress](https://wordpress.com) site.

However, I bumped into several problems. 

## Problem 1: `vagrant up` does not do anything

[`vagrant up` stopped after the set up of the private key](https://github.com/roots/trellis/issues/46#issuecomment-438390835). Curiously enough, the machine had been created and an additional `vagrant up` actually booted the machine. But I could do nothing else with it. 

*Solution*: upgrade VirtualBox. I had an old, Ubuntu-repoed version. So I went to install a new version, in the 5.x range. However, next problem showed up.

## Problem 2: `virtualbox-5.2 : Entra en conflicto: virtualbox`

I uninstalled Virtualbox from the repos, got a new one, added the new repos, but this problem is the one that showed up. I erased everything, purged, did the whole nine yards, nothing. 

*Solution*: When downloading the package and installing it, I eventually got an informative error: there were several processes still running from the old virtualbox. Killed the processes, got the new version of VirtualBox installed. 

However, we were back to problem 1

## Problem 1 redux: `vagrant up` does not do anything

Exactly the same problem. What gives?

*Solution*: somehow the installed machine had some faulty installation. Destroyed the machine with `vagrant destroy default` (which is the name of the installed machine), and tried again.

However, a new problem showed up now. And a weird one.

## Problem 4: `in 'stat': No such file or directory @ rb_file_s_stat - /etc/exports (Errno::ENOENT)`

This one was really hairy. Checked the vagrant version, and it was up to date. I really couldn't figure that out

*Solution*: Just google the error, and [this issue](https://github.com/hashicorp/vagrant/issues/9970) shows up. And [here's the solution](https://github.com/hashicorp/vagrant/issues/9970#issuecomment-420240587): install the `nfs-kernel-server`.

I was happy as happy could be. But then I had another error:

## Problem 5: `name 'unicode' is not defined` and many others issued by Ansible.

So... `Ansible failed to complete successfully`. 

*Solution*: this one was easy. Whenever something or other about unicode shows up in a Python error, it's got to be related to the Python version. Y use `pyenv` for managing versions (and you should too), so I changed the global version to 2.x. Problem solved.

## That's it

Baseline is: I'm not sure [these install requirements of Trellis](https://roots.io/trellis/docs/installing-trellis/) are up to date. I needed:

* Virtualbox 5.2. It *definitely* didn't work with 4.3 (mine was 4.4) as stated.
* Vagrant 2.2
* Python 2.x
Build and Secure APIs with Scala and the Play Framework
Tags: java, scala, playframework, api
Published: 2018-11-20 17:06:02

---
title: Build and Secure APIs with Scala and the Play Framework
published: true
description: Learn how to build APIs with Scala and the Play Framework, and secure them using access tokens.
tags: #java #scala #playframework #api
canonical_url: https://auth0.com/blog/build-and-secure-a-scala-play-framework-api/
---

In this article we're using to use Scala and the Play Framework to build an API that serves blog posts and comments, and then secure the API using access tokens.

[Read on 🏄🏾‍♂️](https://auth0.com/blog/build-and-secure-a-scala-play-framework-api/?utm_source=dev&utm_medium=sc&utm_campaign=scala_play)

![Build and Secure APIs with Scala and the Play Framework](https://thepracticaldev.s3.amazonaws.com/i/xu3vd2ljvdi5caxgwmm5.png)
Negativity....Depression....?
Tags: discuss
Published: 2018-11-20 17:02:42

---
title: Negativity....Depression....?
published: True
description: Thoughts.
tags: #discuss
---

Hi,
I am fairly new to the community and I am yet another coder with a dream.
Been working on a few of my projects. And I just feel like I am not able to communicate my thoughts or is it that because people who are more experienced than I am, are more prone to pin me down. 

Just to be clear I am not here to gain sympathy.

I have made this post for all those people out there who have something to tell to the world but are restricted to do so mostly because of the fear of negative opinions pouring or simply people not getting your idea. Negativity can really be productive but it seems there are people who are affected by them (they shouldn't be).

Sometimes when we find the stuff that we built enticing, and we take it to the community to share how we feel, sometimes not being able to correctly word how we feel and because of that people misunderstand you.

People can form all sorts of verdicts about how good or bad your stuff is but that shouldn't be the cause of discouragement to you, you should know your worth and familiarize yourself with the truth. If people say your code is trash then don't hide yourself away, expose yourself to what's real maybe people are right, so that you get a chance to code better.

Everyone has a limitless potential to turn every negative event in our lives to something incredibly beautiful and beneficial.
know yourself, if you're bad then work hard to change it. Depression is nothing but the fruit of negativity, that's it. Plant yourself with seeds of positivity it's totally in your hands...

Just wanted to put my thoughts out.

Opinions welcomed!
What the flip are QUIC and HTTP/3?
Tags: quic, http3
Published: 2018-11-13 08:06:17

---
title: What the flip are QUIC and HTTP/3?
published: true
description: IETF has agreed to rename HTTP-over-QUIC to HTTP/3. Here's what you need to know from zero.
tags: QUIC, HTTP/3
---

# TL;DR
[IETF(Internet Engineering Task Force) has agreed to rename HTTP-over-QUIC to HTTP/3](https://daniel.haxx.se/blog/2018/11/11/http-3/). What the flip are they anyway?

# Describe QUIC and HTTP/3 in one sentence each.
**Note: QUIC != HTTP/3, iQUIC + HTTP/2 API == HTTP/3**

QUIC is a new transport protocol originally proposed by a Google developer to resolve many of problems which the current HTTP/1.1 and HTTP/2 have.

HTTP/3, previously called HTTP-over-QUIC, is a protocol stack integrated with QUIC and HTTP/2.

# Before you learn them
OK, as you've read the describes already, before you get to know about them, you would need to know how current HTTP works.

HTTP(HyperText Transport Protocol) is an application layer protocol to deliver HyperText Documents such as HTML and XML. Nowadays it's used pretty much everywhere on the Internet for many different purposes and it's now so-called "World Wide Web".

# Why did they need changes?
HTTP was originally made by a CERN scientist called Tim Berners-Lee but the very original protocol was very simple and just has GET method. It was so simple that it has [only one single page documentation](https://www.w3.org/Protocols/HTTP/AsImplemented.html).

Now we use HTTP/1.1 for the most traffics but it has the following problems
- HTTP is a pretty-much-30-years-old protocol 
- Security layer is not included in the protocol
  - Any traffic could be watched by someone unless server maintainer enables TLS
    - Ref: https://letsencrypt.org/2014/11/18/announcing-lets-encrypt.html
  - Even TLS 1.2 has some problems(Don't use older than TLS 1.1 without a valid reason :P)
- HoL Blocking can be a huge problem when you have huge traffic
  - Both HTTP/1.1 and TCP have this problem from different aspect
    - HTTP/2 addressed the problem from HTTP wise
  - As long as HTTP relies on TCP, HoL Blocking based on TCP cannot be resolved even if you enable HTTP/2
    - One packet lost makes all stream wait until the package is received

# How does HTTP/3 resolve these problems?
- QUIC works on UDP protocol(!)
- QUIC layer gives...
  - Encryption integrated with TLS 1.3 with 0-RTT handshake
    - Ref: https://speakerdeck.com/kazuho/security-privacy-performance-of-next-generation-transport-protocols
  - Congestion control without "good old" TCP
  - High accessibility under mobile network w/ Connection UUID(Switching Wi-Fi <-> LTE won’t make renegotiation)

# Protocol Overview
![](https://pbs.twimg.com/media/Dq0JawMXQAAv2du.jpg)
[Image credit](https://twitter.com/kazuho/status/1057511844032798720)
## Translation note
認証・鍵交換: Certification/Key exchange
優先度制御: Priority control
多重化: Multiplexing
暗号化: Encryption
トランスポート: Transport

Hope it helps you understand what they are :)
Uncovering Web Application Architecture
Tags: softwaredevelopment
Published: 2018-11-27 15:28:24

---
title: Uncovering Web Application Architecture
published: true
tags: Software development
canonical_url: https://perfectial.com/blog/web-application-architecture/
---

Brian Foote and Joseph Yoder of [Big Ball of Mud](https://en.wikipedia.org/wiki/Big_ball_of_mud) have famously [said](https://www.azquotes.com/quote/709598): ‘If you think good architecture is expensive, try bad architecture.’ Web application architecture is the basis of a successful app. In business, it helps and supports its growth by catering to its ever-growing requirements.

In our series of pieces for non-technical business founders we’ve already covered [choosing the right technology stack](https://dev.to/galyna_chekan/technology-stack-dilemma-for-non-technical-business-owners-1hco) and [the basics of UI/UX design](https://pixetic.com/blog/ui-ux-design-explained/) and today we would like to shed some light on web app architecture, how it works, its most common practices and the latest trends to finally understand if there’s such thing as a perfect architecture.

## What is web application architecture, how it works, and why it’s important

Web application architecture establishes the relationships and interactions between the application components, which includes middleware systems, user interfaces, and databases. Its main goal is to make sure that all of the elements can operate together correctly.

![how web application architecture works](http://perfectial.com/wp-content/uploads/2018/11/web_application-01.jpg)

The logic is the following: when a user hits a specific URL in the browser, the browser goes to a web server that is hosting a particular page. The server responds within seconds and shows a user the requested page. The timing here is vital; otherwise, a user will abandon the page.

Now on to the next question — **how does web application architecture work?** When we are talking about an application, it consists of the client (front-end) and server (back-end) side. The client side is everything a user sees on the screen when they interact with the page, and its code responds to user’s requests. While the server side is not visible to users, it creates the logic of the application and reacts to HTTP requests. Together, these two applications running concurrently constitute web application architecture.

And finally, the most important question before we move on to covering the main types and deciding which one suits your project more — **why web application architecture is important?** It’s an important component of your future business growth. With the right approach to web application architecture, you can reach a wider audience by giving them up-to-date content. Your business doesn’t have to be present everywhere or at a specific place to reach potential clients and be able to sell your products or services.


The post [Web Application Architecture](https://perfectial.com/blog/web-application-architecture/) appeared first on [Software Development Company Perfectial](https://perfectial.com).
so how do we approach developers without causing offence?        
Published: 2018-11-20 15:40:24

---
title: so how do we approach developers without causing offence?        
published: true
description: 
tags: 
---
So as a recruiter I am very interested to understand how its best to actually approach developers in the market.
There is a lot of discussions about CRM based emails (keyword focused and usually very inaccurate) obviously these are not great. 
I hear a lot of complaints about LinkedIn approaches, to be honest I think its a fair thing to do if the role is an actual match i.e. you have gone to the very small effort to read someones profile.
So do we phone? Its hard to reach people in the day and I bet you get a lot of these and if I am honest people probably return calls about 5% of the time.
so what then ? text? WhatsApp?

How would you all like to be approached by people in my industry and what is the way to not offend? (Before it's said I only approach people about relevant positions and I most certainly know the difference between Java and JavaScript!)
Top 5 DEV Comments from the Past Week
Tags: bestofdev
Published: 2018-11-20 15:12:58

---
title: Top 5 DEV Comments from the Past Week
published: true
description: Highlighting some of the best DEV comments from the past week.
tags: bestofdev
cover_image: https://res.cloudinary.com/practicaldev/image/fetch/s--7VrAA2ln--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://thepracticaldev.s3.amazonaws.com/i/qmb5wkoeywj06pd7p8ku.png
---

This is a weekly roundup of awesome DEV comments that you may have missed.  You are welcome and encouraged to boost posts and comments yourself using the **[#bestofdev](/t/bestofdev)** tag.

@davidk01 hopped into the **[What’s a concept you understand now, but took you forever to grasp?](https://dev.to/ben/whats-a-concept-you-understand-now-but-took-you-forever-to-grasp-4g06)** thread with this pearl of wisdom:
{% devcomment 7186 %}

@bosepchuk talked about effective leadership and team camaraderie in a thread titled **[Why is the software industry so competitive?](https://dev.to/ben/why-is-the-software-industry-so-competitive-1hem)**:
{% devcomment 70b3 %}

For a first team in this "Top 5" series, we're featuring back-to-back comments from the same thread.  The whole conversation is worth a read, but you may want to start with this top exchange.  First, @davidszabo97 answers the prompt of **[Are we Developers helping Google to build an unstoppable monopoly?](https://dev.to/sarthology/are-we-developers-helping-google-build-an-unstoppable-monopoly--39ki)**:
{% devcomment 6o27 %}

@sarthology offers a thoughtful reply:
{% devcomment 6o2c %}

We finish up this week in the **[Guide to Hiring Developers](https://dev.to/cheetah100/guide-to-hiring-developers-c7i)**.  @rrampage challenges some of the original post's main points in a thoughtful and constructive manner:
{% devcomment 6okg %}

See you next week for more great comments ✌