teleren/devto huggingface dataset:
Hi, I'm ivanloerat
Tags: introductions
Published: 2017-07-26 18:08:54

---
title: Hi, I'm ivanloerat
published: true
description: My introduction post
tags: introductions
---

I have been coding for 2 years.

You can find me on GitHub as [ivanloerat](https://github.com/ivanloerat)

I live in LeÃ³n Guanajuato.

I mostly program in these languages: C# and Visual Basic.

I am currently learning more about Web Development.

Nice to meet you.
Hi, I'm Petar Prokopenko
Tags: introductions
Published: 2017-07-26 16:09:54

---
title: Hi, I'm Petar Prokopenko
published: true
description: My introduction post
tags: introductions
---

I have been coding for ~7 years.

You can find me on Twitter as [@peters_byts](https://twitter.com/peters_byts)

Currently i live in Novi Sad, Serbia

I mostly program in these languages: js, php.

I am currently learning more about javascript.

Nice to meet you, and expect new article about best JS frameworks(2017) soon. 

Have nice day.
Hi, I'm Leandro Gomes
Tags: introductions
Published: 2017-07-26 15:52:56

---
title: Hi, I'm Leandro Gomes
published: true
description: My introduction post
tags: introductions
---

I have been coding for ~2 years.

You can find me on Twitter as [@leandro_gs](https://twitter.com/leandro_gs)

I live in SÃ£o Paulo.

I work for Locaweb, which is the largest hosting service provider in Brazil.

I mostly program in these languages: PHP, Ruby on Rails and Javascript.

I am currently learning more about CI/CD, Docker, GIT and Management.

Nice to meet you.
Hi, I'm Matthew Turland
Tags: introductions
Published: 2017-07-26 15:51:41

---
title: Hi, I'm Matthew Turland
published: true
description: My introduction post
tags: introductions
---

I have been coding professionally since 2001.

You can find me on [GitHub](https://github.com/elazar) and [Twitter](https://twitter.com/elazar).

I live in New Orleans.

I work for [When I Work](https://wheniwork.com).

I mostly program in these languages: PHP, JavaScript.

Nice to meet you.
I tracked a breakup in a database
Tags: sideprojects
Published: 2017-07-20 18:24:24

---
title: I tracked a breakup in a database
published: true
description: Yeah, that really happened.
tags: sideprojects
---

{% link https://dev.to/jan/tracking-my-bipolar-through-github-contributions %}

This 👆👆 post reminded me of one particular breakup years ago that took a long while to come to its conclusion and in the meantime had me convinced that I would soon need help. I observed myself being very hopeful one moment and seemingly devastated the other with sometimes just an unanswered phone call as the transition point. It was stupid and silly, but it was also painful and I didn't know what was going on in my head and how to stop it.

As the cliché with geeks goes, in the hour of desperation I turned to code. Over a weekend, I decided to get some metrics on my issue, because y'know… you can't fix what you don't measure. I was working with Django, so I used it to serve a form that let me store a questionnaire to database.

MoodLog:
 - Timestamp
 - Mood (-9 to +9) [devastated, shaken, …, blah, okay, …, happy, excited]
 - Trigger [thought, event, person]
 - Describe what caused/ triggered the good or bad mood?
 - Why is this significant? implications?

Now just the MoodLog would have sufficed to produce and look at a graph that goes up in steps to a good mood and crashes all the way down with little reason. Enough to satisfy a curiosity, but not enough to fix my emotional upheaval.

There's no fixing a problem until the facing-the-problem part is sorted out first. I made another table that would add follow-ups to my data-points. I kept going back to every data-point to update it if new information was available about it.

FollowUp:
   - MoodLog.id
   - Was this reaction valid/ warranted?
   - What did I get right?
   - What did I get wrong? By what margin?

I needed to show to myself that my fears and reactions were either valid - in which case I had bigger problems, or that they were another fantastic creation of my own mind - something I could possibly tackle myself.

It took me two weeks of meticulous logging before the patterns were undeniable as I stared at the graph page that I had added in the weekend in between. Crazy ups and downs in a single day! More interesting were my follow-up logs, I had to eat my words (the implications I expected) so many times… it was humbling. Then something funny happened. As I kept going back and writing the follow-ups regularly, the graph began to smooth out slowly. The deviations from current mood became less volatile, almost bounded to three-four point drop, not more.

As I went from being utterly confused about my own emotional state to having metrics, my mind knew what to expect better than panicking with new imagination every time. The relation soon ended, it had run its course and we both moved on well. For sake of privacy, I destroyed that code and database hence no screenshots, sorry! But I'm glad to this day that the hack worked!

Have a story like this of your own? Share? :D

P.S. Lurker for a while but first time posting… am I doing this right?
ForceTouch in macOS
Tags: macos, forcetouch, ui, swift
Published: 2017-07-26 12:30:05

---
title: "ForceTouch in macOS"
published: true
description: "Handy snippets when dealing with ForceTouch in macOS"
tags: macOS,forcetouch,ui,swift
---



Here are some handy snippets when dealing with ForceTouch in macOS:

<img width="195" alt="img" src="https://raw.githubusercontent.com/stylekit/img/master/ForceTouchEvent_anim.gif">



### Event handler:

```swift
var prevStage = 0
override func pressureChange(with event: NSEvent) {
	let curStage:Int = event.stage
	if event.pressureBehavior == NSPressureBehavior.primaryDeepClick,prevStage != curStage {
	    switch (curStage,prevStage){
			case (0,1):
				Swift.print("from idle to clickStage")
			case (1,0):
				Swift.print("from clickStage to idle")
			case (1,2):
				Swift.print("from clickStage to deepClickStage")
			case (2,1):
				Swift.print("from deepStage to clickStage")
			default: break;//isn't possible
		}
		Swift.print("stageChange")
		prevStage = curStage/*always set prevStage to curStage on stage change*/
	}
	Swift.print("pressureChange")
}
```

### Normalize the pressure:

```swift
/**
 * NOTE: calculates the entire range of the stage pressures so from stage 0 to 1 the pressure goes from 0 to 0.5 and from stage 1 to 2 the linear pressure goes from 0.5 to 1 this makes it easier to scale things in a linear fashion from 0 to 1 in the entire stage range
 */
var linearPressure:CGFloat{
	if event.stage == 0 {
		return 0
	}else if event.stage == 1{
		return pressure / 2
	}else /*if stage == 2*/ {
		return 0.5 + (pressure / 2)
	}
}
```
UI provided by [https://github.com/eonist/Element](https://github.com/eonist/Element)
Garbage Collection in Git
Tags: git
Published: 2017-07-26 10:20:10

---
title: Garbage Collection in Git
published: true
description: Garbage Collection in Git and how to find lost commits.
tags: git
---
![git-gc](http://pliutau.com/git-gc.png)

To understand git garbage collector, we need to understand how branches work. Branches are just pointers to commits that move whenever a new commit is created.

Any time you do `git commit --amend` or `git rebase` a new commit object is created. But what happens to the old one? Old commit objects stick around in the datastore. The reason you don’t see them is because there are no pointers to them.

In addition, the `git reflog` stores a list of the previous branch pointers. In other words, even if you delete a branch, the reflog still shows it.

You will lose your old objects only when you run a `git gc`, which repacks the repository into a more efficient structure. Some git commands may automatically run `git gc`.

So, you just did a `git reset --hard HEAD^` and threw out your last commit. Well, it turns out you really did need those changes. When you do a reset, the commit you threw out goes to a `dangling` state. It’s still in Git’s datastore, waiting for the next `git gc` execution to clean it up. So unless you’ve ran a `git gc` since you removed it, you can find it.

`git fsck` command will show your commits in `dangling` state.

_[Original article in my blog](http://pliutau.com/git-gc/)_
Games based on Voice Recognition
Tags: go, googlespeechapi, voicerecognition, showdev
Published: 2017-07-26 08:08:26

---
title: Games based on Voice Recognition
published: true
description: Verbal games based on Google Speech, Google Translate, AI. Written in Go, some games support multiplayer mode. Written in Go.
tags: Go, Google Speech API, Voice Recognition, showdev
---
![git-gc](https://thepracticaldev.s3.amazonaws.com/i/odxsqndctg5qx2hoiuw1.png)
Hi folks!

Last Saturday I was very inspired by [Alexa skills using server-side Swift](http://academy.wizeline.com/alexa-skills-using-server-side-swift/) talk organized by Wizeline Vietnam team. Speakers made a demo of how can we use Alex Skill in League of Legends (LoL). This Skill enables a user to retrieve the statistics of the enemy team mid-match using voice-enabled commands.

I went home with an idea of building a game fully based on voice recognition, without any interface. In past I had experience with Google Speech API and Google Translate API, so I decided to try with it.

And of course Go!

I created a [PoC open source project](https://github.com/plutov/games) to implement a `20 questions` game, simple fun game where you should guess a noun by asking a maximum of 20 questions. Question can be answered only with "Yes", "No" and "Don't know". Demo page is located [here](http://pliutau.com/games/).

For now I am doing voice recognition using webkit technologies, but I have plans to move it to backend and use Google Speech API. Also in plans I want to support all possible languages using Google Translate API.

Please join a project if you're interested!

_[Original post in my blog](http://pliutau.com/voice-recognition-games/)_
Hi, I'm Shalltell U.
Tags: introductions
Published: 2017-07-26 00:59:30

---
title: Hi, I'm Shalltell U.
published: true
description: My introduction post
tags: introductions
---

I have been coding since 2007. You can find me on Twitter as [@shalltell](https://twitter.com/shalltell)

I live in San Francisco and I mostly program in Python (passion), PHP (paycheck).

I am currently learning more about SaaS Automated Marketing.
Hi, I'm Daniel GonzÃ¡lez GarcÃ­a
Tags: introductions
Published: 2017-07-25 20:39:07

---
title: Hi, I'm Daniel GonzÃ¡lez GarcÃ­a
published: true
description: My introduction post
tags: introductions
---

I have been coding for 20+ years.

You can find me on GitHub as [dgg](https://github.com/dgg)

I live in Holstebro, Denmark but I am originally from Madrid, Spain.

I work for Vertica A/S

I mostly program in .NET (C#) but I dig other platforms.

I am currently learning about everything I ignore (and that's a lot).

Nice to meet you all.
Overriding new tab page in Chrome extension, conditionally!
Tags: chrome, extension, javascript, trick
Published: 2017-07-25 20:18:43

---
title: Overriding new tab page in Chrome extension, conditionally!
published: true
description: This article explains how you can conditionally override the new tab page in your Chrome extension
tags: chrome, extension, javascript, trick
canonical_url: https://kushagragour.in/blog/2017/07/conditional-newtab-override-chrome-extension/
---

If you use Chrome extensions like Momentum, Panda etc you know that Chrome extensions have the ability to override your new tab pages i.e. the page you see when you open a new tab in the browser. They do this through the [*Override Pages*](https://developer.chrome.com/extensions/override) API, by doing so in the manifest file:

```json
{
  "name": "My extension",
  ...

  "chrome_url_overrides" : {
    "newtab": "theNewPage.html"
  },
  ...
}
```

Issue with such extensions is that you can use only one such extension, because if you have multiple extensions with each one trying to override the new tab page, only one of them can finally override. Also, these extensions don't provide any configurable setting to make the overriding of new tab optional. But, there is a very simple trick to make new tab overriding conditional which I use in [Web Maker](https://webmakerapp.com).

First, you don't do anything in the extension's manifest as mentioned above. Then you can have a background page that listens for a new tab creation event. Whenever a new tab is created and the new tab's URL is `chrome://newtab/`, we can do our condition checking and replace the URL accordingly. Heres how you do that:

```javascript
chrome.tabs.onCreated.addListener(function(tab) {
    if (tab.url === 'chrome://newtab/') {
        if (shouldReplaceNewTabSetting === true) {
            chrome.tabs.update(
	        tab.id,
	        {
	            url: chrome.extension.getURL('theNewPage.html')
	        }
	    );
        }
	
    }
});
```

There you go - conditional new tab page replacement! You can also see the actual [code I use in Web Maker here](https://github.com/chinchang/web-maker/blob/master/src/eventPage.js#L13).
Flash is dead 💀 (kind of)
Tags: news, webdev
Published: 2017-07-25 19:21:11

---
title: Flash is dead 💀 (kind of)
published: true
description: Earlier today, Adobe published a blogpost announcing that they would be gradually sunsetting their well known plugin, Flash.
tags: news, webdev
---

Earlier today, Adobe [published a blogpost](https://blogs.adobe.com/conversations/2017/07/adobe-flash-update.html) announcing that they would be gradually sunsetting their well known plugin, Flash. The company will continue "issuing regular security patches, maintaining OS and browser compatibility and adding features and capabilities as needed," according to the post, but the plan is to stop updating and distributing Flash by the end of 2020.

<img src = "http://www.techcult.com/wp-content/uploads/2008/09/indestructotankgame.jpg" width = "700">

Nostalgic users might shed a tear for Flash's death—who amongst us didn't rely on Flash to serve us an early viral video or whimsical browser game?—but the general consensus is that Flash's wind-down is overdue if anything. With near universal agreement, web developers consider Flash a potential source of security vulnerabilities, sluggish performance, and wasted battery. Major browsers like Chrome and Safari automatically block the plugin—you may recall being asked to allow it to run on various websites.

<img src = "https://lh3.googleusercontent.com/Lz_8IWHPgQP3-r3yBPMIxwy6G1F0FH2kcet0sfUZarc4luSisLmPcvilZvp3mYqTLUDX=w390" width = "700">

Originally rolled out in the 1990s, Flash was the standard for online audio and video playback for over a decade. But eventually superior technologies like HTML5 supplanted the plugin, and Flash's persistent bugginess and poor security attracted scores of critics, most notably Steve Jobs who penned [a long essay denouncing Flash](https://www.apple.com/hotnews/thoughts-on-flash/) in 2010.

But Flash's erstwhile prominence means that it's still all over the web, which is why Adobe is relying on its powerful partners, Apple, Facebook, Google, Microsoft, and Mozilla, to ease the transition by encouraging developers to migrate current Flash content to modern formats. The three years until the official end-date makes such conversions easier, but Flash was instrumental in the digital emergence of industries like education and gaming, so it's likely that this change will break more than a few old and untended websites.

Many [dev.to](/) users surely have experiences, both positive and negative, working with Flash over the years. Feel free to share them in the comments below!
Algorithmics with Rust: Graph
Tags: rustmathematics
Published: 2017-07-25 18:50:14

---
title: "Algorithmics with Rust: Graph"
published: true
description: 
tags: Rust Mathematics
---
*Originally posted on my [blog](https://mathieu-nivoliez.com/posts/2017-07-25-algorithmics-with-rust-graph/).*

Hello, today we are going to talk about graphs, what are they and how do we make them in Rust.

Before that, I was planning of speaking about merge sort. But, Vaidehi Joshi has already covered the subject in her article Making sense of merge sort. You should really read it for it is well written and really easy to understand.

Back to subject: GRAPHS!
"OK, what is a graph?"

To keep it simple, a graph is a collection of points, called nodes, and a collection of edges linking nodes. Graph can be directed, where edges will be like arrows, or undirected.

Directed graph: ![Directed graph](https://i2.wp.com/upload.wikimedia.org/wikipedia/commons/thumb/2/23/Directed_graph_no_background.svg/231px-Directed_graph_no_background.svg.png?resize=231%2C153&ssl=1)    

Undirected graph: ![Undirected graph](https://i0.wp.com/upload.wikimedia.org/wikipedia/commons/thumb/5/5b/6n-graf.svg/333px-6n-graf.svg.png?resize=333%2C220&ssl=1)

Graph can be divided in class, buuuuuut I let you seek it out on Wikipedia, the article is well documented.
"OK, what does it use for?"

Good question, our reader is a good one for sure!

What I will say will stun you: you see them every day! In telecommunication, social media, etc. Even in programming, for example in object oriented language, you can see and use graph.
"OK, it's useful. How do we make them?"

I'll show you ONE method to make them in Rust.

First, we can define a graph by a collection of nodes, a collection of edges and by being directed or not.

```rust
struct Graph<'a> {
  nodes: Vec<&'a Node>,
  edges: Vec<Edge<'a>>,
  directed: bool,
}
```

Then, we define node and edge.
```rust
struct Node {}

struct Edge<'a> {
  source_node: &'a Node,
  target_node: &'a Node,
}
```

Now we have all needed structures to make graphs.

You can see an example here: link.

We will stop here for today, I don't want to bore you. See you next time to play around graph.

-- Mathieu
Hi, I'm Jaime Mateo
Tags: introductions
Published: 2017-07-25 17:18:12

---
title: Hi, I'm Jaime Mateo
published: true
description: My introduction post
tags: introductions
---

I have been coding (professional) for 2 years.

You can find me on GitHub as [jaimemateo](https://github.com/jaimemateo)

I live in Madrid.

I work for Bridge for Billions

I mostly program in these languages: Angular, React, Django.

I am currently learning more about React.

Nice to meet you.
When I got a hand from Sherlock Holmes to help a peer with his problem
Tags: team, engineering, bug, investigation
Published: 2017-07-25 16:51:37

---
title: When I got a hand from Sherlock Holmes to help a peer with his problem
published: true
description: This week one of my peers was facing a problem with one of our APIs. He pinged the infrastructure team in Slack warning them about it, saying the API was broken.Â 
tags: team, engineering, bug, investigation
---

This week one of my peers was facing a problem with one of our APIs. He pinged the infrastructure team in Slack warning them about it, saying the API was broken.Â 

Another peer of mine, [Juan Maia](https://twitter.com/juanmaia1212), who's an awesome engineer pinged me in private, dazzled by the problem.

__Thiago, are you aware of any problem with the API? As far as I know, it is working accordingly in Roku (the platform I've been maintaining). It is not possible the API is broken if it's working in another platform._

When I checked the feature once again, it was indeed working. Juan was right, how was possible it to not work on web then?

I remembered that I got aÂ cookie problem with the API before, months ago, while implementing it in BrightScript. But my other peer followed the discussion back then, he would probably know to check his cookie implementation. Nevertheless, he was still facing problems by using the API. I replied on the Slack thread and asked him about how he was dealing with these little bastards (!).

__It should work on web, right? That's not possible!_

That's when a citation from Sherlock Holmes, written by Arthur Conan Doyle, came to mind. A quote that I carry on with me while search for root causes for problems.Â 

> _**Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth.**_

I copied to my peer the same quote and asked him to check the obvious first, before discarding this option.

The problem was,Â **indeed, cookies.**

## Software Engineering is partly an Investigation Job

How many times did we face a problem that seemed so weird it could not be possibly happening in normal conditions? No server down, no crash found, logic written at perfection . But yet, the problem happens and we feel confused.

My primary maneuver is always toÂ check the obvious first. Sherlock taught me that. Once you remove the impossible, whatever remains must be the truth.

If a cookie policy is impossible cause to a problem, why not to test it first? Often when we don't know the cause of a problem, it's better to start with what we do know, to test the perfect scenario to be sure it is still perfect, so only then we start to dig up more creative possible causes. This technique already saved me many hours of bug investigation.
Hi, I'm Tyler Phillips
Tags: introductions
Published: 2017-07-25 16:15:53

---
title: Hi, I'm Tyler Phillips
published: true
description: My introduction post
tags: introductions
---

I have been coding for [1.5] years.

You can find me on Twitter as [@thetylerjp](https://twitter.com/thetylerjp)

I live in [Cleveland].

I work as [an independent iOS Developer]

I mostly program in these languages: [Swift, HTML/CSS, Liquid].

I am currently learning more about [React.js].

Nice to meet you.
Hi, I'm mikerg
Tags: introductions
Published: 2017-07-25 15:04:03

---
title: Hi, I'm mikerg
published: true
description: My introduction post
tags: introductions
---

I have been coding for 35 years.

You can find me on Twitter as [@mikerg](https://twitter.com/mikerg)

I live in Wateroo, Canada.

I work for Lakes Software

I mostly program in these languages: C#, Ruby, Typescript.

I am currently learning more about Web Performance.

Nice to meet you.
Hi, I'm dirk lÃ¼sebrink
Tags: introductions
Published: 2017-07-25 13:43:14

---
title: Hi, I'm dirk lÃ¼sebrink
published: true
description: My introduction post
tags: introductions
---

I have been coding since 1980.

You can find me on Twitter as [@joe__six](https://twitter.com/joe__six)

I live in berlin.

I worked for a lot of companies, now I running my own boutique consulting. Mostly on complex e-commerce and enterprise integration projects.

I mostly program in these languages: ruby, php, elixir, javascript, bash, go.

I am currently learning more about Elixir, Laravel, go, mattermost, ethereum,.

have fun,
Hi, I'm Oleg Lustenko
Tags: introductions
Published: 2017-07-25 13:40:25

---
title: Hi, I'm Oleg Lustenko
published: true
description: My introduction post
tags: introductions
---

I have been coding for [5] years.

You can find me on Twitter as [@OlegLustenko](https://twitter.com/OlegLustenko)

I live in [Kharkiv].

I work for [EPAM]

I mostly program in these languages: [JavaScript].

I am currently learning more about [Reason].

Nice to meet you.
Explain TCP like I'm five
Tags: explainlikeimfive, discuss, tcp
Published: 2017-07-25 13:16:30

---
title: Explain TCP like I'm five
published: true
description: 
tags: explainlikeimfive, discuss, tcp
---

I understand Transmission Control Protocol (TCP) on some levels, but I feel like I never learned the concepts all that concretely. Can someone give me a really good overview?