teleren/devto huggingface dataset:
What if drivers were hired like software developers?
Tags: humor
Published: 2019-10-31 14:39:18

**Job title**: car driver

**Job requirements**: professional skills in driving normal- and heavy-freight cars, buses and trucks, trolley buses, trams, subways, tractors, shovel diggers, contemporary light and heavy tanks currently in use by NATO countries.

Skills in rally and extreme driving are obligatory!
Formula-1 driving experience is a plus.

Knowledge and experience in repairing of piston and rotor/Wankel engines, automatic and manual transmissions, ignition systems, board computer, ABS, ABD, GPS and car-audio systems by world-known manufacturers - obligatory!

Experience with car-painting and tinsmith tasks is a plus.

The applicants must have certificates by BMW, General Motors and Bosch, but not older than two years.

**Compensation**: $15-$20/hour, depends on the interview result.

**Education requirements**: Bachelor's Degree of Engineering.



----

original: https://www.jitbit.com/alexblog/203-what-if-drivers-were-hired-like-programmers
VS Code snippet leads to funny, unintentional results. \_(ツ)_/
Tags: watercooler, discuss
Published: 2019-10-31 14:31:34

A long time ago I decided to create a snippet where if in VS Code I type: `:shrug` I get `¯\_(ツ)_/¯`.

It isn't the _most_ useful snippet, but fun nonetheless. 

Lately my autocomplete for CSS has been giving me this snippet every time I hit `enter` after I start a CSS property. 

So my CSS file is littered with these guys because I hit `enter` or `tab` for the autocomplete without checking which snippet it's referring to leading to some self-chuckling results.

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

**What are some of your funny accidents or unintentional results from creating your own snippets and shortcuts in code?**
Remove committed file from a repository
Tags: git
Published: 2019-10-31 16:56:12

---
title: Remove committed file from a repository
published: true
date: 2019-10-31 14:30:27 UTC
tags: Git
canonical_url: 
---

![](https://raulmonteroc.com/wp-content/uploads/2019/10/gitignore.png)

No matter what kind of project you are working on, they all have auto-generated files that don’t need to go inside the remote repository, but more often than not, we find ourselves working on projects that have those files already pushed and end up having to deal with conflicts that could have been avoided otherwise.  
  
Thankfully, there is a way to remove those files and make sure no other developer commits them ever again.

### 1. Remove the file locally

```bash
git rm -r --cached route/to/file.cs
```

### 2. Prevent the file to be added ever again by adding it to the .gitignore definition.

- Open the terminal and navigate to the root of your project folder
- Enter `open .gitignore` to open the gitignore file in your default text editor. If you don’t have one you can find one configured for your specific project in [gitignore.io](https://www.gitignore.io/).
- Add the relative path of the file you wish to ignore. Here’s a sample ignoring the AndroidResource.designer.cs of a xamarin project

```bash
# http://Xamarin.Android Resource.Designer.cs files

**/*.Android/**/[Rr]esource.[Dd]esigner.cs
**/*.Droid/**/[Rr]esource.[Dd]esigner.cs
**/Android/**/[Rr]esource.[Dd]esigner.cs
**/Droid/**/[Rr]esource.[Dd]esigner.cs
```

### 3. Stash changed files

```bash
git add route/to/file.cs && git add .gitignore
```

### 4. Commit changes

```bash
git commit -m "Removed auto-generated [file] from repository"
```

### 5. Push changes

```bash
git push origin master
```
Daily Challenge #103 - Simple Symbols
Tags: challenge
Published: 2019-10-31 14:08:38

---
title: Daily Challenge #103 - Simple Symbols
published: true
series: Daily Challenge
description: Determine whether the string is an acceptable sequence.
tags: challenge
---
Write a function that will take a string and determine if it is an acceptable sequence. The string will be composed of + and = symbols with several characters between them. For the string to be acceptable, each character must be surrounded by + symbols.

Examples: 
(++d+===+c++==a) => false, because a is not surrounded by +.
(+d+e+===+q+=) => true, because all characters are surrounded by +.

Test cases:
"f++d+"
"++q++qq=z"
"==++z+=+q+"

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
Last Chance to Join: Design Patterns for Secure and Scalable APIs on AWS Lambda
Tags: serverless, lambda, awslambda, apigateway
Published: 2019-10-31 13:38:53

---
title: Last Chance to Join: Design Patterns for Secure and Scalable APIs on AWS Lambda
published: true
description: Join our Tech Talk today (Oct 31) on design patterns for secure and scalable APIs using AWS Lambda
tags: serverless, lambda, awslambda, apigateway
cover_image: https://thepracticaldev.s3.amazonaws.com/i/yihih6mwws7oz8mfa90l.png
---

[Join our Tech Talk today](https://zoom.us/webinar/register/WN_nVMlXyd3TFmujapq8PNKcw) with [Eoin Shanaghy](https://dev.to/eoinsha) (CTO @ [fourTheorem](https://fourtheorem.com/)) on:

## Securing APIs on AWS Lambda

> Learn **proven** and **scalable** architectural patterns to secure internal APIs on AWS Lambda :closed_lock_with_key:

> **Hands-on** presentation, from **technical implementation** to architectural **decision factors** :raised_hands:

> **Interact** with panelists to address your questions in **real-time** :speech_balloon:

## [Reserve your seat now](https://zoom.us/webinar/register/WN_nVMlXyd3TFmujapq8PNKcw).
A beginners guide to unit testing in Vue
Tags: vue
Published: 2019-10-31 13:22:14

---
title: A beginners guide to unit testing in Vue
published: true
description: A 3 part series on Unit Testing in VueJS for beginners.
tags: vue
cover_image: https://thepracticaldev.s3.amazonaws.com/i/lkqogyvxhgxdkajirreg.png
---

All three articles that I did on **Unit Testing in Vue for beginners* that I did for Vue Mastery are now live. 

- [Unit Testing in Vue: What to test](https://www.vuemastery.com/blog/unit-testing-vue-1)
- [Unit Testing in Vue: Writing your first Test](https://www.vuemastery.com/blog/Unit-Testing-in-Vue-Your-First-Test)
- [Unit Testing in Vue: Testing More Complex Components](https://www.vuemastery.com/blog/Unit-Testing-in%20Vue-More-complex-components)

In part one of the series, we really focused on identifying what to test and more importantly what NOT to test in your components. From there we wrote our first test in part two and spent some time understanding the different libraries involved. In part three we learn through repetition by writing more unit tests with a couple of components that add some new wrinkles.

I want to thank Adam and Gregg over at Vue Mastery for giving me this opportunity to write for them. I have always looked up to them for their unique style of teaching and everything they do for the Vue community. I don't think this is the last time you will see me collaborating with them and I am looking forward to what we do next.

I put a lot of hard work into this series and if you enjoyed it please let them know. I hope you're having a wonderful day and as always friends...

Happy Coding
Dan

_If you found this article interesting please consider [subscribing to my newsletter](https://www.danvega.dev/signup/) or following me on [Twitter](http://twitter.com/therealdanvega)._
What is fallback font?
Tags: explainlikeimfive, discuss
Published: 2019-10-31 12:59:39

I am exploring what fallback font is, working under an article about **[Aspose.Slides](https://products.aspose.com/slides?utm_source=https://dev.to/aspose_slides/what-is-fallback-font-1b74&utm_medium=email)** product. I am curious to know how would someone explain what is fallback font, **like I am five**!😀🤔

**Please, explain me in comments!**👇
Monitoring Wildfly inside docker
Tags: wildfly, docker, jconsole, visualvm
Published: 2019-10-31 12:59:38

---
title: Monitoring Wildfly inside docker
published: true
description: 
tags: [wildfly, docker, jconsole, visualvm]
---

To monitor a wildfly instance that is running inside a docker container, is not as simple as simply exposing the port and connecting to it. The first thing you are going to need is to download a [wildfly](www.wildfly.org) copy of the same version you are running inside the container, on the host machine you are going to use.

On your docker file you are going to need to add a user to your container, that will be able to connect to the administration interface, and expose a port. Since you are going to create a user that can alter the server configurations, think carefully before putting this in a production environment. To do that add a line like this to your *Dockerfile*:

```Dockerfile
RUN /opt/jboss/wildfly/bin/add-user.sh adm Password1! --silent

EXPOSE 9990
```
The name of the user and passoword can be whatever you want. The name admin, is taken by wildfly already, so I used adm. And 9990 is the port you need to expose, and then map to.

Once you have your container built and running (don't forget to map the port), you need to know which is your container internal IP address. One way to check that is with the command:

```bash
docker inspect <container-id>
```
In the output shown, you are going to have something like this:

```bash
"IPAddress": "172.21.0.2",
```

Now, everything related to the container is ready.

### JConsole

If you want to connect with JConsole, in the host machine where you downloaded wildlfy go to $WILDFLY_HOME/bin and execute:

```bash
./jconsole.sh
```

On the window that shows up, check *Remote Process*, in the box, you need something like **service:jmx:remote+http://172.17.0.2:9990**, where the IP address is the one from your docker container. And in the username and password boxes type whatever you configured on your Dockerfile. Then, connect.

### VisualVM

If you want to use VisualVM, first you need to install it:

```bash
sudo apt-get install visualvm
```

All the first part of configuring the container, is exactly the same. What is different here is that you need to add wildfly client API to visualvm classpath, so it can connect.

To do that, you run visualvm like this:

```bash
visualvm --cp:a $WILDFLY_HOME/bin/client/jboss-client.jar
```

Then, add a remote host and a JMX connection, using the same parameters used for JConsole.
Rubber Duck Debugging as a Learning Methodology
Tags: discuss
Published: 2019-10-31 12:53:43

---
title: Rubber Duck Debugging as a Learning Methodology
published: true
description: How can Rubber Duk Debugging be used as a Learning Methodology? It was created to find bugs, but what if it were used for learning any subject?
tags: discuss
cover_image: https://thepracticaldev.s3.amazonaws.com/i/ph58804e20r63zho76lo.png
---

Rubber Duck Debugging was created to find bugs in software, but I think it's something else much more powerful. The traditional approach is that you programmed something that contains a bug that you can't identify. The methodology says that you should debug your code by reviewing it piece by piece and explaining it to a rubber duck. By going into those details, the programmer is forced to think clearly and the problems in the code arises.

If you haven't done it, it's quite simple:

1. [Pick your rubber duck (physical or virtual](https://gitduck.com/rubber-duck-debugging)).
2. Explain your goals and the strategy to accomplish your task.
3. Go through your code and explain each line and what's happening there.

By doing this process, you are able to spot the bug and fix it. 

## Rubber Duck Debugging as a learning methodology

Rubber duck debugging works great for developers because it's based on a powerful learning technique: Learning by teaching. This technique has been used since early 19th century and was developed in the 80s by Jean-Pol Martin. The method consists of having students teaching other students. The teaching students should prepare presentations on the topic and by doing it, they were learning faster and more effectively.

Going back to the use cases for developers, instead of using only for debugging. The technique can be used to learn a programming language or simply to learn how something programmed by other developer works. The process is the same as when you are trying to find the bug:

1. Describe the goals and how the task should be performed.
2. Explain the code line-by-line.

If you are not able to explain it, very likely you didn't understand it yet and should do a step back and try again. If you can explain everything, great! Now you fully understand it and very likely also had ideas on how to improve it.

## How rubber duck debugging technique can be used in other contexts

Just like with software, you can try to teach someone (or a rubber duck) about any subject. In the process, you will gain clarity and learn about the topic faster than if you have just read about it. It will force you to think clearly and more importantly, to express yourself in a simple and clear way.

Research about the topic you would like to teach and prepare a presentation. Doesn't matter if you fail in the first try, iteration is the key. By the time you are able to explain the concept in a concise way, you are going to have mastered it. And it's time to move to the next subject.
Kubernetes Patterns : The Ambassador Pattern
Tags: kubernetes, devops, docker, patterns
Published: 2019-10-31 12:52:55

What is an Ambassador container?
An Ambassador container is a sidecar container that is in charge of proxying connections from the application container to other services. However, while the Adapter container acts as a reverse proxy, the Ambassador container acts as a client proxy. You might be wondering, why do we need to proxy the application connection requests? Because we need to follow the separation of concerns principle. Each container should do it’s task and do it well. If there are other tasks that requires the application’s function in order to work correctly, we may hand those tasks to the sidecar container.

For example, almost all applications need a database connection at some phase. In a multi-environment place, there would be a test database, a staging database, and a production database. When writing the Pod definition for their application’s container, developers must pay attention to which database they’ll be connecting to. A database connection string can be easily changed through an environment variable or a configMap. We could also use a sidecar pattern that proxies DB connections to the appropriate server depending on where it runs. Developers needn’t change the connection string, they could leave the DB server at localhost as usual. When deployed to a different environment, the Ambassador container detects which environment it is running on (possibly through the Reflection pattern), and connects to the correct server.

Another well-known use case for the Ambassador container is when your application needs to connect to a caching server like Memcached or Redis. Let’s have a Redis example scenario to demonstrate this pattern.
Adding a method to a class component
Tags: reactjsjavascript
Published: 2019-10-31 12:52:49

---
title: Adding a method to a class component
published: true
description: How to pass class component method to child component in React
tags: reactjs javascript
cover_image: https://ferrariwebdevelopment.s3.us-east-2.amazonaws.com/assets/20190922-class-method.jpeg
---
 
## How to pass class component method to child component in React

Sometimes we need to add a method to a class component and pass it down to its child component.
For example, we may have a `GroceryList` component that has a child component called `GroceryItem`.
We define a toggleItem() method in `GroceryList` that we want to trigger from `GroceryItem`. How do we do that?

Let's first define the method in the parent component.
The way we add a method to a class component is to simply create an identifier inside the class definition and assign an arrow function to it.
The identifier will be the name of the method we call.

```js
class `GroceryList` extends React.Component {
  toggleItem = itemId => {
    // perform a toggle action
  }
}
```

To use this method in the child component, we need to pass it down via props:

```js
<GroceryItem item={item} toggleItem={this.toggleItem} />
```

Inside the child component we then use this method in an `onClick` event:

```js
<div onClick={ () => {props.toggleItem(props.item.id)} } />
  Click me
</div>
```

When we click on the `<div>` element now we trigger the `onClick` event that will call `toggleItem()` in the parent component, passing the item `id` as an argument.
Accounting Firms, Disruption, and the Competitive Advantage
Tags: career, accountingfirms
Published: 2019-10-31 12:50:08

In the 90’s, the Internet exploded with the introduction of the web browsers, Apple was a struggling company, Google didn’t have a website while Yahoo was the king of search, and AOL inundated mail slots with CDs to keep its stranglehold on email. In the 2000’s, BlackBerry was king of the smartphone, only to be replaced shortly after Apple’s release of the iPhone and its accompanying App Store. With each decade, we’re encountering unimaginable change; we’ve gone from the desktop web era to the mobile dependency era, and now, the wearables era. While massive changes have been occurring within the Big Four accounting firms, the impact of these changes have, to date, been mitigated for the balance of the accounting profession. The next decade, however, will transform the professional accounting landscape in what many will consider to be unimaginable ways. In twenty years, the accounting profession will be nothing like it does today and along the way, there will be an unprecedented amount of turnover in firms that adapted too little or too late. In short, the profession will be under immense pressure to deliver value for its clients in a manner that adapts to sweeping technological changes. Read more: https://helical-inc.com/blog/accounting-firms-disruption-and-the-competitive-advantage/
The Shared Assessment Framework: Third Party Risk and Beyond!
Published: 2019-10-31 12:48:23

Seemingly every few months, there’s news of an organization and its subsequent data breach, resulting in its confidential data in the wrong hands. These security lapses have major consequences, ranging from regulatory scrutiny to fines, lawsuits, and consumer dissatisfaction. Read more: https://helical-inc.com/blog/the-shared-assessment-framework-third-party-risk-and-beyond/
Enum in typescript
Tags: discuss, typescript
Published: 2019-10-31 12:25:56

Changelog:

- 6 Nov 2019: Added `type` for better developer experience.

-----

I know we can use typescript's `enum`, but, the difficulty arises when I'm receiving string in REST, and want to validate the property value in the request.

This is the way I write my enums:

```
// ===== DECLARATION =====

type TerrainEnum = 'MEADOW' | 'OCEAN' | 'FOREST';

class Terrain {
  public static readonly Meadow = 'MEADOW';
  public static readonly Ocean = 'OCEAN';
  public static readonly Forest = 'FOREST';

  public static isValid = (value: string): boolean => (
    value === Terrain.Meadow ||
    value === Terrain.Ocean ||
    value === Terrain.Forest
  );
}

// ===== USAGE =====

// Validate
Terrain.isValid(value);

// In function parameter
const myFunction = (terrain: TerrainEnum): void => {}

```

I think this way you have a built-in input validations, simply by calling `isValid()`.

I'm interested in what you guys think. Maybe we can find any better option out there.

So, what's your preferred way to write enums? And what's the reason behind yours?
🔥[gev] Golang TCP library that supports custom protocols to quickly and easily build high-performance servers.
Tags: go
Published: 2019-10-31 12:25:05

---
title: 🔥[gev] Golang TCP library that supports custom protocols to quickly and easily build high-performance servers.
published: true
description: 
tags: Go
---


https://github.com/Allenxuxu/gev/blob/master/README-EN.md
Have you ever lost all of your data?😰
Tags: discuss
Published: 2019-10-31 12:20:17

It happened to me in a distant past - my PC was stolen.
And the worst thing - I had all my life data there and had no backup.
All of my data, starting from my cat`s childhood photos and ending important documents, were lost forever.
That was a lesson for all the life - backup your personal data as well!!😅


**Tell your story in comments!**👇👇👇
Agence de référencement - Trouvez le bon!
Published: 2019-10-31 12:15:01



Dans cette ère actuelle, vous comprendrez, en particulier si vous êtes cadre dans une entreprise, qu'il est impératif de découvrir la société de référencement qui vous convient. Cependant, en choisir un n'est pas la chose la plus simple à faire de nos jours, car de nombreuses entreprises affirment être la plus grande société de référencement du monde. Évidemment, ce que vous faites à ce stade précis est de mener une enquête approfondie vous-même avant de faire le moindre choix. Une méthode pour ce faire consiste à interagir avec un grand nombre de personnes de partout au pays qui représentent de grandes entreprises. Ils sont certains de donner quelques indices sur le fournisseur de référencement à essayer.

Bien que les réseaux sociaux soient reconnus comme une méthode extrêmement fantastique d’apprendre quelle société de référencement peut être la meilleure, souvenez-vous que vous pouvez trouver un grand nombre de voies qui vous fourniront des informations possibles sur qui et quoi choisir. Lorsque vous choisissez une société de référencement, vous devez comprendre qu'il y a des aspects particuliers que vous devez créer avant de faire appel à qui que ce soit. Par exemple, il faut vérifier quels services vous fournissent exactement en ce qui concerne leurs services.

Cela peut sembler évident pour la plupart des gens, même si la vérité est vraie, mais de nombreuses entreprises promettent une large gamme de services dans un budget limité, tandis que certaines fournissent seulement quelques services à un prix plus élevé. Ce ne sont là que quelques-unes des choses que vous devez vous assurer. Une manière professionnelle dans laquelle vous êtes en mesure de rechercher une entreprise de référencement se joint à divers forums de discussion orientés vers les entreprises. Ils vous donneront certainement une idée précise de ce que vous devez faire pour satisfaire les besoins de votre entreprise de référencement. Une recherche d’experts de ce type est indispensable car de nombreuses entreprises sont certaines de promouvoir leurs partenaires ou leurs fournisseurs, en particulier dans le cas où elles ont réalisé un excellent travail.

Enfin, assurez-vous que lorsque vous choisissez une société de référencement, vous vous référez à un certain nombre de revues réalisées par des magazines de publicité professionnels. Ils vous fourniront un aperçu intéressant et impartial des sociétés de référencement à la pointe de la réussite. Le simple fait sur la question est que vous devez effectuer une recherche complète par vous-même avant de plonger et de faire un choix. Tout bien considéré, votre réaction à la fin de la journée doit vous convaincre quelle organisation est sans aucun doute la plus appropriée en ce qui concerne ce qu'elle donne pour l'organisation de la vôtre.

Trouver plus d'informations: www.belmont-web.com