teleren/devto huggingface dataset:
Simple Names
Tags: codequality, naming
Published: 2019-09-20 22:24:00

_Photo by Samuel Zeller on Unsplash_

I have a feeling that even when we try to use nice, descriptive names in our code, we still tend to make things too complicated. For some reason, we use this "heavy", technical vocabulary instead of plain, simple words that we would use in a conversation with non-tech people. Yes, it looks very smart and it _is_ clear when we write it but it gets confusing over time when we have less contact with that part of the code.

I started thinking about this a lot when working on a new feature recently at work. The details are irrelevant to the idea itself, but a couple of examples might help illustrate what I mean.

At one point when using the application, the user was supposed to enter a special code in a bunch of inputs and had limited time to do so.

We needed to make sure the final "submit" button cannot be clicked until the entire code has been entered i.e. all the inputs are not empty and we had to give a name to the button-disabling condition. For whatever reason, my brain was suggesting stuff like `notAllInputsFilled`, `invalidCodeLength`, or `shouldDisableSubmit`. All inputs? What "invalid" means? Disable when should disable? Really? It took quite a while to settle with `codeTooShort`.

A while later we needed to add another condition to disable the button - the user has run out of time. Again, for whatever reason, it took us a long time to come up with "obvious" `ranOutOfTime`. Before we came up with it, a whirlwind of `expiredCode`s, `expiredToken`s, `pastExpirationTime`s, and other weird stuff came through my mind. Heh.

Struggles like this kept popping, again and again, just to implement one very simple feature. Thinking about all the codebases I've seen over the years, I think it's not just me - it's a wider problem. Of course, effective communication is always hard and code is no exception. Yet we seem so used to the technical jargon that we sometimes forget to communicate (through code) like normal human beings.

One or two names like in the "bad" examples above will not make or break a project but it stacks up. Even in a small project, we probably have hundreds of names and not all projects are small. Over time, we can't _just read_ the code anymore, we have to "decode" it, even though we understand every single word in every single name.

So here's my little tip/wish: let's use simpler, more conversational, more human vocabulary when naming things. We'll thank ourselves sooner than we think and maybe others will too!
What it takes to achieve success as a freelancer
Tags: discuss, career
Published: 2019-09-20 22:09:02

> [...] some really fantastic consultants—people who not only help us think bigger and with more clarity, but inspire us to get better and better at our craft in consulting with our own clients.

~ Sarah Avenir, CEO [&yet](https://andyet.com/)

Tonight I was reading an old newsletter from July, by &yet (because I'm subscribed to way too many newsletters), and there, very casually, in the middle of it, I found this gem.
I've never used a JS framework and my JS skills are - at best - mediocre. Should I try to learn Vue or React?
Tags: discuss
Published: 2019-09-20 21:39:25

So back end wise I'm a decent programmer. I'd like to think there's nothing I couldn't build. Code might not be beautiful or as elegant as other folks, but it'll work.

Front end wise there is also nothing I can't build, but I'm a simple HTML and CSS kinda guy. I can throw in some JS when required but really JS isn't my thing.

I want to go back and redo some of my front ends with a JS framework so that I can access some of the functionality that they provide, and also I just think that I should know how to do this shit.

The two candidates are Vue, or React. What do you think?

My framework of choice is Laravel.
MIME-Aware Mail-Distribution With SES
Tags: help
Published: 2019-09-20 21:32:56

---
title: MIME-Aware Mail-Distribution With SES
published: true
tags: help
---

A number of years ago, my group set up some SES-based distribution-lists to facilitate communications between our various teams. Worked decently well until recentishly. As we've broadened membership to the list(s), we've had the occasion "accept the defaults" mail-users send MIME-encoded emails to the list. Much like "back in the day" when distribution-lists took the form of listservs and majordomos, the results have been all of the list-recipients receiving BASE64 walls of gibberish rather than readable text.

Anyone else run into a similar problem? More importanly, if you did, did you figure out how to fix it …beyond yelling at offenders, "don't send rich-text to the distro"? Bout to start my Google search, but any pointers or other help would be greatly appreciated!
Algorithms Have Nearly Mastered Human Language. Why Can’t They Stop Being Sexist?
Tags: algorithms, ai, machinelearning
Published: 2019-09-20 20:54:32



Teaching computers to understand human language used to be a tedious and imprecise process. Now, language algorithms analyze oceans of text to teach themselves how language works. The results can be unsettling, such as when the Microsoft bot Tay taught itself to be racist after a single day of exposure to humans on Twitter.

It turns out that data-fueled algorithms are no better than humans—and frequently, they’re worse.

“Data and datasets are not objective; they are creations of human design,” writes data researcher Kate Crawford. When designers miss or ignore the imprint of biased data on their models, the result is what Crawford calls a “signal problem,” where “data are assumed to accurately reflect the social world, but there are significant gaps, with little or no signal coming from particular communities.”

Siri, Google Translate, and job applicant tracking systems all use the same kind of algorithm to talk to humans. Like other machine learning systems, NLPs (short for “natural language processors” or sometimes “natural language programs”) are bits of code that comb through vast troves of human writing and churn out something else––insights, suggestions, even policy recommendations. And like all machine learning applications, a NLP program’s functionality is tied to its training data––that is, the raw information that has informed the machine’s understanding of the reading material.

Skewed data is a very old problem in the social sciences, but machine learning hides its bias under a layer of confusion. Even AI researchers who work with machine learning models––like neural nets, which use weighted variables to approximate the decision-making functions of a human brain––don’t know exactly how bias creeps into their work, let alone how to address it.

As NLP systems creep into every corner of the digital world, from job recruitment software to hate speech detectors to police data, that signal problem grows to fit the size of its real-world container. Every industry that uses machine language solutions risks contamination. Algorithms are given jurisdiction over public services like healthcare frequently exacerbate inequalities, excusing the ancient practice of shifting blame the most vulnerable populations for their circumstances in order to redistribute the best services to the least in need; models that try to predict where crime will occur can wind up making racist police practices even worse.



by Abel Ayuba
Kubernetes - yeah it's cool but is it necessary?
Tags: discuss
Published: 2019-09-20 20:36:17

I work at a pretty big company by day. Multiple billions in annual revenue - but it's NOT a tech company. It's basically retail.

Yeah we have a website (it's not e-commerce though, it's like a brochure website)

We have internal tools (stock management, a data team, etc etc)

We're fairly geographically localised... we're not international.

For a setup like that do you think Kubernetes is overkill?
How to filter-search using a single search-bar component through all data types in an Array of Objects in React?
Tags: react, javascript
Published: 2019-09-20 19:48:04

I called an array of objects and rendered the data in table format. I need to implement filter-search using a single search-bar component that can filter through all data types like - strings, contact numbers, email addresses, address and many more I'm fetching from the API.

```
[
{
id: 4,
accountDetail: {
accountStatus: "ACTIVE",
referralCode: "X1DNO8GW",
signUpRemarks: "",
adminRemarks: "",
accountStatusRemarks: "",
signUpTime: {
date: {
year: 2019,
month: 3,
day: 20
},
time: {
hour: 21,
minute: 32,
second: 2,
nano: 0
}
},
lastUpdationTime: {
date: {
year: 2019,
month: 3,
day: 20
},
time: {
hour: 21,
minute: 32,
second: 2,
nano: 0
}
}
},
name: "Narendra Modi",
phone: {
countryCode: "91",
number: 9876543210,
verified: true
},
emailId: {
address: "modi@gmail.com",
verified: false
},
address: {
street: "abc",
locality: {
id: 2,
name: "ABC",
pincode: 123021,
latLong: {
latitude: 0,
longitude: 0
},
city: {
id: 1683,
district: {
id: 55,
state: {
id: "IND-MH",
code: "MH",
name: "Maharshtra",
tin: 18,
type: "S"
},
code: "",
name: "Hinjewadi"
},
name: "Pune"
}
},
latLong: {
latitude: 0,
longitude: 0
}
},
password: "9876543210",
type: "RETAILER",
businessDetail: {
gstRegistered: false,
gstin: "",
businessName: "BJP Group",
CODLimit: 0,
creditLimit: 0
},
walletBalance: 0
},
{}
]
```

Here's the code I used to search through all the names in the array of objects,
```
let filteredData = this.state.users.filter(user => {
      return (
        user.name
          .toLowerCase()
          .indexOf(this.state.filterUsers.toLowerCase()) !== -1
      )
    })
```

I need to filter through data like contact number, name, business name, email id, address and every field in the objects. How do I do this?
What is a Voice Assistant?
Tags: voice, explainlikeimfive, ux, webdev
Published: 2019-09-20 19:22:59

A voice assistant is a digital assistant that uses voice recognition, language processing algorithms, and voice synthesis to listen to specific voice commands and return relevant information or perform specific functions as requested by the user.

Based on specific commands, sometimes called intents, spoken by the user, voice assistants can return relevant information by listening for specific keywords and filtering out the ambient noise.

Using a mixture of artificial intelligence and machine learning, the software behind the voice controlled digital assistants UI uses algorithms and previous examples to more accurately understand what the user is asking for.

Many talking assistants today combine both a task-oriented and knowledge-oriented workflow to carry out almost any task that a user can throw at it. A task-oriented workflow might include filling out a form, while a knowledge-oriented workflow includes answering what the capital of a state might be or specifying the technical specifications of a product.

Some examples of what a Voice Assistant can do include:

Check the weather
Turn on/off connected smart devices
Search databases
One of the main reasons of the growing popularity of Voice User Interfaces (VUI) is due to the growing complexity within mobile software without an increase in screen size, leading to a huge disadvantage by using a GUI (Graphical User Interface). As more iterations of phones come out, the screen sizes stay relatively the same, leading for very cramped interfaces and creating frustrating user experiences, which is why more and more developers are switching to Voice User Interfaces.

Some examples of popular smart assistants today are Alan, Amazon Alexa, Siri by Apple, and Google Voice Assistant.

Read the full article at: 
https://alan.app/blog/voiceassistant-2/

https://alan.app
Pushing Left, Like a Boss - Part 7: Code Review and Static Code Analysis
Tags: applicationsecurity, appsec, beginners, security
Published: 2019-09-20 19:08:40

---
title: Pushing Left, Like a Boss - Part 7: Code Review and Static Code Analysis
published: true
description: This article explains what a secure code review is, Static Code Analysis, and gives the basics on how to start.  It also gives helpful resources so that you can learn more.
series: Pushing Left Like a Boss
tags: applicationsecurity, appsec, beginners, security
---
###This series, and my blog, have moved! [Check it out](https://wehackpurple.com/g8tg)!
---
This article is about secure code review and static code analysis (SCA), also known as Static Application Security Testing (SAST).

Note: Some people refer to SCA at Static Composition Analysis, in which case they are referring to verifying that your dependencies are not known to be vulnerable.  In this article I mean static code analysis.

####When application security folks say 'static' analysis, we mean that we will look at *written code*, as opposed to 'dynamic', which means when your code is *running* on a web server.

I wasn't sure if I was going to cover this topic, even though I know code review is very important. I personally find code review very difficult; my attention span is short and I can be impatient at times (such as, for example, when I am awake). Code review demands both patience and intense concentration. That said, it's a highly valuable activity which can find a lot of security problems, far before you get to the testing or release stages, potentially saving both time and money.

![Code Review can happening both during the coding and during the testing phases of the system development life cycle.](https://thepracticaldev.s3.amazonaws.com/i/f0rso1e6ar72ugff7djz.png "Code Review can happening both during the coding and during the testing phases of the system development life cycle.")


There are two options for doing code review; manual or with a tool. There are pros and cons to each.

###[Read the rest on my NEW blog!](https://wehackpurple.com/l0m5)!
JSitor Mobile App, an alternative of JSFiddle, CodePen and JSBin 
Tags: javascript, html, css, webdev
Published: 2019-09-20 19:07:02

[JSitor](https://jsitor.com) is a web tool which is used to write web snippets, along with the web version, it also supports mobile app-based editors which can be very helpful to test out our ideas whenever we are away from our laptop. 

Both Android and iOS apps are built with the power of [ReactNative](https://facebook.github.io/react-native/) and [CodeMirror](https://codemirror.net/).


[Download iOS App](https://itunes.apple.com/us/app/jsitor/id1455784773?mt=8)
[Download Android App](https://play.google.com/store/apps/details?id=com.ashvin777.apps.jsitor)

#What is different about JSitor app?

- Supports **TypeScript, JSX, Babel, Script Modules**
- Supports **Pug** document formatting
- Supports **Less, SCSS, PostCSS**

- Awesome interface an easy to use
- In sync with the web version [JSitor.com](https://jsitor.com), so you can finish your unfinished work anywhere
- Rich **syntax highlights and suggestions**
- **Quick keys** over the keyboard
- Easy to install external **CDN** libraries
- **Log in with Github** to manage snippets
- **View Trending/Most viewed and Most recent** snippets

#Few screenshots

![](https://github.com/jsitor/jsitor/raw/images/Screenshot%202019-09-17%20at%2012.55.41%20AM.png)

![](https://github.com/jsitor/jsitor/raw/images/Screenshot%202019-09-17%20at%2012.55.56%20AM.png)

![](https://github.com/jsitor/jsitor/raw/images/Screenshot%202019-09-17%20at%2012.55.49%20AM.png)

#Know more about JSitor
{% link https://dev.to/ashvin777/jsitor-an-alternative-of-codepen-jsbin-and-jsfiddle-1l98 %}


I won't say that JSitor will be the best tool but definitely it is worth to explore. Give a try and share your feedback. We would love to hear from you guys.

- Ashvin Suthar (Creator of JSitor.com)
- Follow us on Twitter - https://twitter.com/JSitorEditor
Developer Relations: content series
Tags: devrel, content
Published: 2019-09-24 19:03:32

---
title: Developer Relations: content series
published: true
tags: DevRel, DeveloperRelations, content
canonical_url: https://maxkatz.org/2019/09/20/developer-relations-content-series/
---

Content (articles, tutorials, videos) is one of the best ways to scale your Developer Relations program. Once content is published it can be consumed by developers any time, anywhere in the world. You are no longer limited to just the local developers coming to a hands-on workshop (of course hands-on workshops have other benefits, but that’s for another blog post). Here are some of the recent blog posts I published that cover content creating and publishing.


{% link https://dev.to/ibmdeveloper/how-content-creates-content-3edj %}

{% link https://dev.to/maxkatz/interesting-content-ideas-you-may-try-fo1 %}

{% link https://dev.to/maxkatz/where-to-publish-content-53ao %}

{% link https://dev.to/ibmdeveloper/using-online-meetups-to-scale-your-developer-relations-program-17li %}
Why Do Developers Argue Over Trivial Things? 
Tags: codequality, watercooler
Published: 2019-09-20 18:52:47

Seems to me there are a few reasons for this.

The first is that sometimes seemingly trivial things really do matter.

The second is that some devs lack empathy and can't understand other's preferences.

Following on from these, to non-techies the one can look very much like the other.

Bad devs will often argue personal points on genuine trivia because it makes things nicer for them personally, and since there are likely few real world consequences they don't have to worry about being wrong. Or they just can't tell the difference between important and not anymore having found the things they previously didn't care about actually did affect the project... 

Good and great devs will often still argue trivia for the reason outlined: non-techies and bad devs often can't tell the difference, and being seen to be knowledgeable in general can establish them in a position where they can improve the project as a whole, rather than deferring to bad or mediocre devs who would create an inferior product.
Function
Tags: function, javascript, newbie
Published: 2019-09-20 18:45:04

---
title: Function
published: true
description: Function JS MindMap
tags: Function, Javascript, newbie
---


## Function simple MindMap 🤓.



![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/n1j7vki2qwnily9dvm8d.png)
Get a Slack notification when your SSL certificate is about to expire
Tags: ansible, slack, ruby
Published: 2019-09-20 18:08:14

---
title: Get a Slack notification when your SSL certificate is about to expire
published: true
description: 
tags: ansible, slack, ruby
---

I was tasked to finish a script to check the expiration of SSL certificates and post the notifications to our Slack channel. I wrote an Ansible playbook just to spice up everything. I had fun doing this so I will share the code hoping someone else might find it useful.

## Configure the Ansible playbook

You must define `slack_webhook` and `domains` as both variables are required.

Optionally configurable variables
* **ssl_port** - standard is 443,
* **ssl_expiry_days_check** - the script starts warning if certificate is expiring in less than this period,
* **cron_period_check** - when the cron job shuld be run.

Example ``ansible_ssl_check.yml`` playbook .

```yaml
---
- hosts: server_name
  roles:
    - user_group_directories
    - rvm
    - whenever
  vars:
    slack_webhook: "https://hooks.slack.com/services/xxxxxxx/xxxxxxx/xxxxxxxx"
    domains:
      - github.com
      - gitlab.com
```

### Testing

If you want to test things out, and get some false positives, then change following variables
* `ssl_expiry_days_check` to something high like `'300'`,
* `cron_period_check` to `'hourly'`.

### Run the playbook

* Add the server to Ansible inventory file and then run the command below.

````
ansible-playbook -i hosts playbok.yml
````

This command assumes the hosts inventory file is in the current directory.

### Slack notifications

Your notifications will look like this.

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

### Code repository

You can find the Gitub repo [here](https://github.com/neidiom/ansible_ssl_expiry_check).
Linux Development Environment for Flatiron School
Tags: sqlite, node, linux, postgres
Published: 2019-09-29 21:39:16

---
title: Linux Development Environment for Flatiron School
published: true
tags: sqlite,nodejs,linux,postgres
canonical_url: 
---

[![](https://cdn-images-1.medium.com/max/2600/0*oyCcoU4E3eAh_hiO)](https://medium.com/@EclecticCoder/linux-development-environment-for-flatiron-school-c06069f23a5a?source=rss-ef76d2e219b4------2)

I have dabbled in Linux for years and I want to use my new System76 laptop to code. Below is the workaround I have developed for the current Learn environment used by Flatiron School. This tutorial addresses setting up [RVM](https://rvm.io/) (for Ruby Version Management), Ruby gems [Nokogiri](https://nokogiri.org/) and [Learn-co](https://rubygems.org/gems/learn-co/versions/1.0.4), [NVM](https://github.com/nvm-sh/nvm) (for Node Version Management), [SQlite](https://sqlite.org/index.html), and [Postgres](https://www.postgresql.org/).

You can continue to read more on Medium. 

[Continue reading on Medium »](https://medium.com/@EclecticCoder/linux-development-environment-for-flatiron-school-c06069f23a5a?source=rss-ef76d2e219b4------2)
Java microservices and how to become cloud-native
Tags: java, microservices, linux
Published: 2019-09-20 17:20:54

Many of us are on a journey from traditional monolithic applications to a more distributed cloud-native microservices architecture. In this session, Burr Sutter discusses the key microservices architecture principles and explains how and why to evolve to this approach. You’ll learn how to become a new cloud-native developer and architect.

Watch the complete presentation: https://youtu.be/VSofy6cssbo
Add React to a site
Tags: react, website, components
Published: 2019-09-20 17:08:34

Hi guys,

I'd like to develop some components for a web page. In the same page I can have 2 components or more. By using create-react-app I think that react and react-dom library will be duplicated. What to do in this case? I need to setup the development environment but I'm confused. Any idea about it?
Thanks
How does your company assess bootcamp graduates?
Tags: discuss
Published: 2019-09-20 16:46:45

---
title: How does your company assess bootcamp graduates?
published: true
tags: discuss
---

I am keen to hear how others have fared in assessing the abilities and potential of graduates from bootcamps such as Flatiron school, General Assembly etc.

Also, if you have graduated from a bootcamp, what do you think is a good way of assessing your technical knowledge and soft skills?
Do you enjoy reading source code?
Tags: discuss
Published: 2019-09-20 16:42:51

---
title: Do you enjoy reading source code?
published: true
tags: discuss
---

I love reading the source code of popular libraries and finding out how other developers have solved different problems. Just recently I was looking into how frontend frameworks attach event handlers to DOM elements and it led me to reading about the optimisations JavaScript engines make when accessing object properties. 

Does anyone else loving digging around in other people's code?