teleren/devto huggingface dataset:
People should stop calling GPL/LGPL as "freedom licenses" without knowing what freedom really means in this context
Tags: opensource, linux, github
Published: 2019-06-16 16:13:40

There is a trend in open source (or *free software*) world of referring to GPL/LGPL as *freedom friendly* or simply freedom licenses as though using them is going to give you some profound and mystical liberation or something.

As we all know, the English word *free* is rather confusing sometimes because it could mean one of two things:

1. Free of cost (as in free beer or gotten something without cost).
2. Freedom from something (as in India got freedom in 1947 from the colonial rule).

When it comes to GPL, folks are referring to the second kind of freedom (this freedom is also called *libre*, a french borrowed terminology, hence LibreOffice, Libre Linux, etc.).

Stallmanists (as the GPL proponents are usually called) think that GPL is somehow more free (libre) than the *permissive* licenses like MIT, Apache, BSD, etc. which they are too eager to dismiss.

However, that's a great misunderstanding because that may not be true at all depending on your definition of freedom or liberty. Liberty is the concept which directly tackles this second *libre* kind of freedom. Traditionally, Liberty proponents are of two kinds:

1. **Individual Liberty:** Those who hold that each individual or person should have as much liberty as possible.
2. **Collective Liberty:** The collective of individuals (or commons) should have as much liberty as possible as a group.

So you see, there are two kinds of liberties and there is a subtle difference between them. Stallman's stand on freedom (GPL) makes sense only if you consider the second variety of liberty (commons) as the measuring barometer but fails miserably when you consider the first kind of liberty (individual liberty).

Now, as much as I like the concept of commons or a community, I'm not too fond of licenses like GPL which carry that too far and place restrictions on how *an individual* chooses to use the GPL code. GPL states that any modifications or derived work from GPL code should be distributed under the terms of GPL only (I cannot even distribute them as MIT/BSD/Apache or any other permissive license).

Now this is great for the GPL common cause but here lies the biggest weakness of GPL too: The first kind of freedom (individual liberty) is actually sacrificed, an individual is no more free to define the terms of her own developed code. In contrast, the permissive licenses like MIT/Apache/BSD are lot more *free* in comparison when you consider the individual liberty aspect too.

Thus, next time when you talk about GPL licenses and the freedom it provides, be sure to understand what kind of freedoms are we talking about in the first place!
Working for non-profits organisations
Tags: career, discuss
Published: 2019-06-16 16:08:12

---
title: Working for non-profits organisations
published: true
description: Is there anything different from a developer point of view?
tags: career, discuss
---

## Non-profits

I am curious about the way developers handle working with non-profit organisations. Juste like a lot of organisations and people, they have a need for software and websites. But, they also might not have a budget anywhere near what is required to have what they want. 

If a non-profit approached you to build something, what would it take for you to give them a hand? Assuming that the organisation's mission is something that resonates with you, would you be willing to lower your rate, or even do it for free? Are there things you are not willing to give up under any circumstances? Have you ever had any experiences like these?
How to install Python 3.8 on Ubuntu?
Tags: help
Published: 2019-06-16 16:02:13

---
title: How to install Python 3.8 on Ubuntu?
published: true
tags: help
---

I'm having no luck getting Python 3.8 running on (K)Ubuntu 18.04. I've got the main program installed, but it's lacking pip.

I did:

```
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.8
```

Then as tests, I also did:

```
sudo apt install python3.8-distutils

python3.8 -m pip install --upgrade pip setuptools wheel
```

But if I try to setup a virtual env, it fails:

```
$ python3.8 -m venv env
Error: Command '['/src/mdl/env/bin/python3.8', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
```

The module `ensurepip` isn't there, nor can it be installed.

```
$ python3.8 -m ensurepip
/usr/bin/python3.8: No module named ensurepip
```

How do I install Python 3.8, along with a separate pip and package directory?

----

I got further with the below, added `-venv` and `-dev` to compile more packages.

```
sudo apt install python3.8-venv python3.8-dev
```

This appeared not to work at first, but it was a 3.8 compatibility problem with a particular package, unfortunately `mypy`. The reason I want 3.8 is for annotations support, so this is unfortunate. [They indicated](https://github.com/python/mypy/issues/7001#event-2415987083) a new release is coming to fix it.
What Do Web Developers Need To Know About HTTP/HTTPS?
Tags: beginners, discuss, webdev
Published: 2019-06-16 15:17:30

---
title: What Do Web Developers Need To Know About HTTP/HTTPS?
published: true
description: 
tags: beginners, discuss, webdev
---

In the [Web Developer Roadmap](https://github.com/kamranahmedse/developer-roadmap) and other sources, it's said that web developers should have some working knowledge of HTTP. I find the scope of this subject hard to parse, and am wondering what folks think webdevs need to know about HTTP, apart from [status codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) and [request methods](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods)?
I created a .gitignore command-line generator !
Tags: webdev, showdev, opensource
Published: 2019-06-16 14:41:30

If you're like me, you pretty much Google "gitignore templates" each time you start a new project from scratch. That's at least 15 seconds you'll never get back, so I made a command-line tool for that 🤷‍♂️

Introducing [gitignore-it](https://github.com/christopherkade/gitignore-it), here's how it works:

![gitignoreit](https://user-images.githubusercontent.com/15229355/59565299-e9c0fb00-9051-11e9-8012-04478bf9268c.gif)

Feel free to [install it](https://www.npmjs.com/package/gitignore-it) globally, it's super lightweight and will save you a few seconds.

If you want to contribute, you can always create new `.gitignore` files that will be usable right away.

And if I've saved you those vital few seconds at the beginning of your project, feel free to give it a little ⭐️ [Github Link](https://github.com/christopherkade/gitignore-it)
New Site Theme: "Minimal Light"
Tags: changelog, meta
Published: 2019-06-16 14:40:57

We just shipped a new theme to go along with "default", "night theme", and "pink theme". It's called "minimal light".

It uses more soft grays and whites than the default light theme and is less busy overall. Enjoy!

![](https://cl.ly/da86c5b4e1e6/Image%202019-06-16%20at%2010.39.52%20AM.png)

I already see a couple places where the colors need to be adjusted now that it is in prod, but that will be worked out shortly.

We currently have a dedicated set of themes, and don't allow full-on customization, because when things change we sometimes need to update all the themes. I'm not sure the interface would ever be so stable as to allow for arbitrary themes.

Any thoughts for additional themes? I feel like a "sunset theme" with subtle oranges could be nice. I could see a situation where we could allow folks to go from light to sunset to night themes automatically depending on time of day.

Reminder: you can also switch between serif and sans-serif fonts in [/settings/misc](/settings/misc).

Happy coding.
Invest in building custom tools
Tags: productivity
Published: 2019-06-16 14:16:48

{% tweet 1140259247680315393 %}

I agree with this. We can't always know how much time to put in to this kind of stuff, but it's the kind of thing we want to keep iterating on with the DEV team.

Custom tooling requires a lot of good communication because the folks who need the tools most are not necessarily the ones who have the time to build them.

Thoughts on this?
globster.xyz - glob tester
Tags: javascript, productivity, webdev
Published: 2019-06-16 14:15:12

Have you ever wondered whether you got your glob pattern right?


[globster.xyz](https://globster.xyz) is a tool to test and visualise glob pattern matching.
Type your glob pattern in the input field above and all matched files
will be highlighted in blue in the tree directory structure. Use it
to debug when your glob does not work or to experiment and learn from
the provided examples. It uses minimatch (version 3.0.4) under the hood.


{% jsfiddle https://jsfiddle.net/h42x9vnp/ result %}
SimQLe - very simple SQL in Python
Tags: python, sql, opensource
Published: 2019-06-16 12:21:25

---
title: SimQLe - very simple SQL in Python
published: true
description: A new, very simple SQL connection management library for Python
tags: #python, #sql, #opensource
---

# SimQLe

Hi all,

I found when creating various Python projects at work that require connections to SQL Databases, it wasn't easy to tick all the following boxes:

 - Easy to read and write SQL integration in any project
 - Manage multiple database connections simultaneously (including multiple types of SQL databases)
 - Get robust SQL connections in quick scripts up and running ASAP
 - Store connection strings, drivers etc nicely and consistently in secret .env variables

**But most importantly**:

 - Make it dead easy to write integration tests with test database instances where the code of the project doesn't need to change! Plus doing so with best practice and where you can be 100% sure that across the board your project isn't touching production databases during tests.


SimQLe was created to fix all these issues. It is based on the amazing SQLAlchemy library. SimQLe intends to be perfect when:

 - You don't need an ORM, just SQL queries,
 - You want a dead simple way to manage databases, and
 - You want super easy, robust testing.


## The Basics

Install it: `$ pip install simqle`

Create a `.connections.yaml` file anywhere that looks something like this:

```yaml
connections:
  - name: my-sql-server-database
    driver: mssql+pyodbc:///?odbc_connect=
    connection: DRIVER={SQL Server};UID=<username>;PWD=<password>;SERVER=<my-server>
    url_escape: True

    
test-connections:
    # the names of the test-connections should mirror the connections above.
  - name: my-sql-server-database
    driver: mssql+pyodbc:///?odbc_connect=
    connection: DRIVER={SQL Server};UID=<username>;PWD=<password>;SERVER=<my-test-server>
    url_escape: True
```

Then write some python like this:

```python
from simqle import recordset, load_connections

load_connections("./.connections.yaml")

sql = "SELECT name, age FROM people WHERE category = :category"
params = {"category": 5}
result = recordset(con_name="my-database", sql=sql, params=params)
```

Then, when you're writing the tests, simply flip the `SIMQLE_TEST` environment variable to `True` before running the tests and the whole project will now use the connections defined in `test-connections` instead. Note how the server in the test connection is different. Voila! Stress free tests, and the actual project is just as clean as ever.

Make sure `.connections.yaml` is in your .gitignore for secure connections when collaborating too.

There's more it can do - but the above demonstrates how simple it can be. It has named parameters, engine exposure if you want to use them for pandas' fantastic read_sql, 100% coverage and is fully tested with every major open source SQL Database. Check out the Repo for more.

Let me know if you have any ideas or questions! There's a few upgrades on the roadmap :)

Github Repo: {% github Harlekuin/SimQLe %}
Proposal for Standardising User Digital Presence Profile using .yml
Tags: profile, sharing
Published: 2019-06-16 12:02:55

Being in a developer community, we come across many People who have been inspiring to us through their great works, blog posts, videos, course tutorials, podcasts and much more. What if we have a standard way to easily share those inspiring digital presence profile using a standard convention.

Hereby sharing my thoughts on this to the community and would like to hear from you all. What you think and let me know and also share your comments if there any service which is already addressed these challenges.

### Background

Traditional way of Sharing Profiles in Phones uses VCARD File
[(VCard, JCARD) - Wiki ](https://en.wikipedia.org/wiki/VCard#jCard). But i don't find one to share a user profile about his  digital presence on the Web.


Initial Proposal to Standardise Public Profile using a simple .yml file to easily share and consume by applications.


### Summary

In this RFC, I am proposing a standardised way to create public profiles and share them easily to other applications. This standardised proposal will not includes and personal details like Phone Number, Address etc. This focusses mostly on the user digital presence and the corresponding links to their works, blogs and any other public account which they want to share with anyone.

### Challenges
- With the increasing number of applications used by users, each of these application is using a Custom Registration form, OAuth based/SSO based Integration to collect the profile information. Once registered, the profile details are not updated on regular basis. Either some of the information are obsolete (assume the user blog site is moved to a different site)
- Even the Author doesn't have a common way to manage and update their profiles and keep the version history.


### How if everyone has a common profile as a yaml file :

- Asssume a user ABC, maintains his profile using a source control version like GitHub.com. They can create multiple profiles and share wherever needed with just a Url/file.

(e.g) 
http://github.com/<ABC>/my-profiles/default-profile.yml
http://github.com/<ABC>/my-profiles/work-profile.yml
  

Applications who want to get the user profile information, they can simply read the yaml file and update them on regular intervals.

Sample default-profile.yml

```
website: gyanmoti.in
country: india
name: Nirmal
profile_image_url: "https://media.licdn.com/dms/image/C4D03AQFgMmks5SVa_w/profile-displayphoto-shrink_200_200/0?e=1566432000&v=beta&t=XehIjAJiGztgNbN42I5fY6RWvY8dpeN4J_czWn0IRY0"
social_accounts: 
  - facebook: NA
  - twitter: nirmal_kumar
  - youtube: NA
  - linked_in: nirmalweb
creations:
  - courses: http://usercourses.com
  - publications: http://userpublications
  - podcasts: http://userpodcasts

```

Hereby requesting your comments for this public profile and thus making the web a better place to share and manage one's own profile.

Feel free to send a PR if you wish to add anything to this proposal [here](https://github.com/nk-gears/public-user-profile-rfc) in Github.
Analog Clock: Flat Style Window Widget Concept
Tags: codepen, css, html, javascript
Published: 2019-06-16 11:38:08

<p>This is just a simple flat-style design concept for clock widget, for computer or smartphone.</p>

<p>I think, this clock may also be used for dashboard on a monitoring system.</p>

<p>Its size changes depending on the viewports' width and height.</p>

---

# Preview

{% codepen https://codepen.io/takaneichinose/pen/rEOpyR %}
Prevent Gutenberg converts paragraphs to blocks when you copy and paste
Tags: internet, gutenberg, wordpress
Published: 2019-06-18 07:38:10

---
title: Prevent Gutenberg converts paragraphs to blocks when you copy and paste
published: true
tags: Internet,Gutenberg,WordPress
canonical_url: https://kevinhq.com/prevent-gutenberg-converts-paragraphs-to-blocks-when-you-copy-and-paste/
---

When you copy and paste a text from somewhere else like MS. Words, you will see the Gutenberg converts each of the paragraphs inside that text into a block. That’s annoying but there is a workaround to avoid this. Background story If you want to skip the story, then just scroll down to the bottom… 

[Read More »Prevent Gutenberg converts paragraphs to blocks when you copy and paste](https://kevinhq.com/prevent-gutenberg-converts-paragraphs-to-blocks-when-you-copy-and-paste/)
Contributing to open source for beginners. How and Where!
Tags: discuss, opensource
Published: 2019-06-16 09:43:26

---
title: Contributing to open source for beginners. How and Where!
published: true
description: 
tags: discuss, opensource.
cover_image: https://thepracticaldev.s3.amazonaws.com/i/aelazn51pvyqpfktju5k.png
---

As am improving my coding skills in every way possible, and after making a research of it's benefits. I have found that one should contribute to open source projects. 

How ever; i didn't know what's really happening in that world! Or how should i enter it.

Do you have some practical tips or recommendations for a beginner to start dive in the open source world? a side from learning Git.

And if you know some beginners friendly projects kindly share the link in the comments section below.
Better Security Architecture Diagrams
Tags: uncategorized, softwarearchitectur
Published: 2019-06-16 14:51:13

---
title: Better Security Architecture Diagrams
published: true
tags: Uncategorized,software architectur
canonical_url: https://www.hack-the-planet.net/2019/06/16/better-security-architecture-diagrams/
---

For the last couple of years, I have seen many so-called “architecture” diagrams including those suffering from inconsistent notation, unclear depiction lack of information and ambiguity.

The worst scenario was in my last role, where I dealt with company-wide application integration. Each and every team had their own way to draw (or not to draw) security architectures. Guidelines? Nope. Nervous breakdowns n a daily base if something went wrong? Definitely.

So he/she who’s name is not known created a quite [comprehensive PDF guideline](https://github.com/chaocipher/JunkDrawer/blob/master/Security%20Diagramming%20Guidance%20(2019).pdf) which helps you to draw more precise security related architectural diagrams. Definitely worth a look.

![](https://i1.wp.com/www.aheil.de/wp-content/uploads/2019/06/image-8.png?ssl=1)

Link: [https://github.com/chaocipher/JunkDrawer/blob/master/Security%20Diagramming%20Guidance%20(2019).pdf](https://github.com/chaocipher/JunkDrawer/blob/master/Security%20Diagramming%20Guidance%20(2019).pdf)
A silly contraption using a physics engine
Tags: javascript, coding, programming, tutorial
Published: 2019-06-16 09:03:49

---
title: A silly contraption using a physics engine
published: true
description: A system of elevators and conveyor belts transports balls and cubes in an infinite loop. Unless something goes slightly wrong...
tags: javascript, coding, programming, tutorial
cover_image: https://i.imgur.com/wJFAIYw.png
---


This experiment may be completely pointless, but it's an interesting 15-minutes coding exercise resulting in something fun to watch for 15 seconds.

http://slicker.me/javascript/physics_experiment.htm
We asked stupid questions, and that's fine
Tags: learning, softwareengineer, lifelong
Published: 2019-06-16 06:28:31

In the tech industry, we are always involve in learning things. 
> Software engineers shall participate in lifelong learning regarding the practice of their profession and shall promote an ethical approach to the practice of the profession. 

from [Code of Ethics Principle](https://www.computer.org/education/code-of-ethics)

In fact, it is a lifelong learning process if we want to stay relevant in the industry. However, when learning new things, we often ask questions that we think are **stupid**. 


## Dare to ask questions
Even though you might think that the questions were just too **stupid** to be asked, but if we did not take the first step, we would not know the answer. We might get the answer eventually, but it will be much quicker by just asking the doubts. 


## Recall the answers that we get
Recalling the answers that we get from our **stupid** questions will make us fully understand the answers. Most of the time, when we get the answers from questions, we are not fully understand. By recalling the answers after we have gained some basic understanding of the topics, we might able to see the full image, and get better understanding. 



## Final words
At the end of the day, it is just a learning process. Questions are meant to be cleared. Without asking questions, we are not actually learning and thinking, just deadly follow instructions. 

*Thoughts based on my own experience*
During development, do you run all the dependent services on your machine?
Tags: productivity, discuss, development
Published: 2019-06-16 05:12:01

Development requires running many dependent services, like databases, caching servers, queues, other dependent (micro) services etc.

Do you run them on your machine? Or you use other server infrastructure to run them while only running the specific service you are developing on your machine?

How do you enforce consistent dev environment across your team mates?
Remove outline when click but keep it when tab in React
Tags: react, css, a11y
Published: 2019-06-16 04:37:36

---
title: Remove outline when click but keep it when tab in React
published: true
description: Sometimes you hate it, sometimes you need it.
tags: react, css, accessibility
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sp8siddpt5ct0h5ad176.png
---

While I inspect [f8 website](https://www.f8.com), I see something interesting.

When you click on the button "Experience F8 2019", there's no blue outline that we hate (mostly designer). but when I tab on the website, I see the blue outline again.


So I search how to do it on the internet (aka Google) I found the way which explain really great.

https://hackernoon.com/removing-that-ugly-focus-ring-and-keeping-it-too-6c8727fefcd2

So I adapt it to react component. I think it might be useful for someone else that facing this problem.

```js
import { useEffect } from 'react';

const handleFirstTab = event => {
  if (event.keyCode === 9) {
    document.body.classList.add('user-is-tabbing');
    window.removeEventListener('keydown', handleFirstTab);
  }
};

const RemoveFocusWhenNotTab = () => {
  useEffect(() => {
    window.addEventListener('keydown', handleFirstTab);
    return () => {
      window.removeEventListener('keydown', handleFirstTab);
    };
  });

  return null;
};

export default RemoveFocusWhenNotTab;

```

And you just render it in somewhere (I prefer render it in App.js)

You need to add style for focusable element (e.g., button) based on `.user-is-tabbing` class attaching to body element (I use styled-components for example).


```js
const GlobalStyled = createGlobalStyle`
    body:not(.user-is-tabbing) button:focus {
        outline: none;
    }
`;
```


PS. I just hide outline until user tab. After that when user click it, it'll show outline again. There's a way to hide outline again when user click but I think it's too much. If you're interested to do it, the website I reference also show how to do it which you can adapt with `RemoveFocusWhenNotTab` component easily