teleren/devto huggingface dataset:
How to understand Program to an interface not an implementation
Tags: oop
Published: 2018-02-10 22:38:26

---
title: "How to understand Program to an interface not an implementation"
published: true
tags: OOP
canonical_url: 
---

Yesterday my colleagues and I talk about JS `for loop` and `const`. I found this [post](https://medium.com/javascript-scene/master-the-javascript-interview-what-is-a-closure-b2f0d2152b36), it refers a quote "Program to an interface not an implementation", I read this several years ago, and have no feeling about this, just think it's a cool quote or rule.

Now, after several years working experience, I got some understanding about that.

For instance I use a simple JS example,

```javascript
var counter = function() {
    var count = 0;
    return {
        incr: function(){count++;},
        decr: function(){count--;},
        disp: function(){console.log(count)}
    }
}
```

I exposed three functions: `incr`, `decr`, `disp`, they operate private `count` variable, on the outer side, callee don't know `count`, callee can call `incr`, `decr`, `disp`, three functions are interfaces of `counter`.

Another implementation of `counter` is expose `count`, callee increase count, decrease count, display count by operate `count` variable directly.

When `incr`, `decr` logic is changed, e.g. increase count by 2, not 1. Interfaces are same as before, callee don't need change any codes.
Cool Readability Tools
Tags: tools, language
Published: 2017-09-22 14:29:09

---
title: "Cool Readability Tools"
published: true
tags: tools,language
canonical_url: http://api-ambassador.ghost.io/cool-readability-tools/
---

 ![Cool Readability Tools](http://api-ambassador.ghost.io/content/images/2017/06/Magnifying_glass_with_focus_on_glass.jpg)

If you wonder how good your writing is, wonder no more. Here are two good apps to help you evaluate your writing.

[![Cool Readability Tools](http://api-ambassador.ghost.io/content/images/2017/06/logo.png)](http://www.hemingwayapp.com/)

The [Hemingway App](http://www.hemingwayapp.com/) is geared toward improving your writing. Take it with a grain of salt, of course, because it is a machine. Bear in mind that you might be trying to accomplish something different than it is trying to do. Generally, it seems to score with an eye toward helping you write very clean, active prose. Like Hemingway. If you want flowery poetry, then you should look for a Dickens App somewhere. And while I do like Dickens, his writing isn't a good model for technical writing. The Hemingway App, in particular, gives lots of generally good advice about writing good, clean prose.

[![Cool Readability Tools](http://api-ambassador.ghost.io/content/images/2017/06/logo.io.png)](https://readable.io/text/)

[Readable.io](https://readable.io/text/) evaluates text giving you a variety of scores based on different academic scales that I don't understand. But what I do understand is the simple letter grade that it gives.  
It also gives you some statistical feedback, such as the percentage of your words that are adverbs.

 ![Cool Readability Tools](http://api-ambassador.ghost.io/content/images/2017/06/readingScore.png)

That's right, chumps. I got an A.

**Generally, good technical writing should score around the 8th- to 10th-grade reading levels.** That's because, without constant exercise at very challenging texts, our reading levels tend to settle back to around that grade. It's not a bad thing. Most people that studied _Hamlet_ in high school can still make it out. But it was hard for most folks then and still is now. If you're explaining technical material to people, it's easy to make it feel all complicated. That happens by accident. What takes deliberation and skill is to make complex things clear.

And yes, I'm going to add these tools to the [Resources to Learn Tech Writing](https://dev.to/ryanhaber/resources-to-learn-tech-writing-temp-slug-6364548).



_This post was originally published on [api-ambassador.ghost.io](http://api-ambassador.ghost.io/cool-readability-tools/)_
I'm making a React tutorial. Help me decide what to build!
Tags: discuss, react
Published: 2017-08-23 15:20:06

---
title: I'm making a React tutorial. Help me decide what to build!
published: true
tags: discuss, react
---

_UPDATE: Thanks everyone for your comments and feedback - super useful stuff! The ecommerce store has been the most popular idea by far. So I'm going ahead with that. I promise I'll try to make it fun and not boring. Follow me on [Medium](https://medium.com/@hrishio) and sign up to the [Learnetto newsletter](https://learnetto.com/blog) to get the tutorial as soon as it's out. I'll probably send my rough drafts to the newsletter first so get on that if you want to see my progress._


Hello! I'm writing a React tutorial for the freeCodeCamp blog. It'll be a hands-on tutorial where I'll build a working app. But I can't make up my mind about what to build!

Please help me choose from the following ideas I'm considering ([from this blog post of mine](https://medium.freecodecamp.org/every-time-you-build-a-to-do-list-app-a-puppy-dies-505b54637a5d)):

BookÂ club
EcommerceÂ Store
AWS S3Â client
Free Stock Image searchÂ app
Github explorer app for finding interesting code repositories
Meme generator
MediumÂ clone
DJÂ Spotify
Stripe analytics dashboard
Google analytics dashboard

PS If you don't like any of them, feel free to suggest more.
Safety in Flight
Tags: life, advice, happiness, selfhelp
Published: 2017-08-23 19:26:33

---
title: Safety in Flight
published: true
description: Be good to yourself, and you’ll be good to those around you.
tags: [Life, Advice, Happiness, Self Help]
cover_image: https://thepracticaldev.s3.amazonaws.com/i/byurah7palv7ljadrd8y.png
---

_If you are traveling with a child or someone who requires assistance, secure your mask on first, and then assist the other person._

I find it fascinating and deeply concerning that people often build a life around a commitment to be good to another, but make no such vows to themselves.
The self is not a static point in the universe. It changes shape, character, and mood hundreds if of times a day. I prescribe you keep with you a fixed point around which all your forms may take shape; acting as a reminder to the vision you have for yourself. A photo, a simple band, an earring, a tattoo, a timepiece, or a pocket stone. It can be anything as long as it’s with you always.

It sounds obvious, but I often find it helpful to remind myself that unhappy people do unhappy things. The cruelty and callousness exuded by unhappy people is only a stream off the roaring undercurrent of pain and confusion concealed within. Escaping that vortex of negativity is immensely difficult without a fixed point to grasp onto.

Make a commitment to be good to yourself and allow a fixed point to choose you. Once it becomes habit and neglect becomes the exception instead of the rule, you’ll be compelled to help others achieve this sort of inalienable resilience.
Be good to yourself, and you’ll be good to those around you.
The River’s Gift
Tags: poetry, selfawareness, mentalhealth, meditation
Published: 2017-08-23 14:55:48

---
title: The River’s Gift
published: true
description: An abstraction of self-discovery
tags: [Poetry, Self-Awareness, Mental Health, Meditation]
cover_image: https://cdn-images-1.medium.com/max/2000/1*mVyoY2crCDU-PShEu-dS2g.jpeg
---

I feel as though I am floating on my back down a great river. I can hear people living near the banks. If I turn my head, I can see them. When I tried to move closer, I found I could not change my course. I cannot reach them and for my efforts, I am left tired. Believing I belong with those on the banks, I felt helpless as I floated along, unable to grasp anything solid. It was isolating living as a witness to the lives of others.

With time I learned to accept my situation and enjoy things as they were to me. I found I enjoyed watching simple patterns blend together into immeasurable complexities as though they were placed in motion at perfect balance. The patterns I see and hear among the people, plants, animals, and stars along the river fill me with ineffable awe. Tangible lives within grasp, these motions between moments are merely a backdrop in the lives of shore folk. I don’t expect them to understand; I only hope they’re as in love with their gifts as I am with mine.

I am happiest when I let go of the urge to live another’s life and enjoy the river’s gift. The gift of perspective and weightlessness if I choose to accept it. The gift of being more in touch with the movement of the river than the solid ground at the bank. To resonate with movement and change instead of the static. My gift is in seeing the world as a series of changes instead of a set of states.

I am a child of the river. I am a citizen of time.
Promoting myself in a Hacker Con
Tags: hacker, promoting, qr, tattoo
Published: 2017-08-22 16:00:20

---
title: Promoting myself in a Hacker Con
published: true
description: I'm sharing a simple trick I used to share my CV in a hacker Con I'm giving a speech in. (RootedCon)
tags: hacker, promoting, qr, tattoo
---

I'm giving a speech in September in Valencia, Spain, about **Internet Censorship and how to fight against it**. But the event itself is a huge opportunity to meet people interested in **hacking, security and even find job opportunities**. So I struggled to think a way to make myself noticed. I spent a while thinking the most geek things, and I selected a few of them, now I'm sharing one:

**QR code temporary tattoo linked to my CV webpage**. I'm a big fan of tattoos, I already have three, and not long ago I thought "hey it would be cool to have a QR code on me". Of course I wouldn't tattoo myself for this event but having a temporary tattoo is a fun, cheap, easy idea to promote myself. Today they arrived in my home, so I decided to try one of them (I bought a bunch!) and it worked perfectly.I bought them in [StickerYou.com](stickeryou.com) and designed it online. I created my webpage using github and html W3C templates. It was a lot of fun, and if it works and grabs some hackers attention, it will be even better!

![](https://instagram.fmad3-1.fna.fbcdn.net/t51.2885-15/e35/21040894_353185488428024_1852579150368342016_n.jpg)

Hope you liked this tip. Please share your tips for grabbing professional attention in tech if you feel like it!
What's the difference between a pane, buffer and tab in Vim and how should they be used in one's workflow?
Tags: discuss, vim
Published: 2017-08-23 03:13:37

---
title: What's the difference between a pane, buffer and tab in Vim and how should they be used in one's workflow?
published: true
tags: discuss, vim
---

I still consider myself a newb when it comes to using Vim and still trying to optimize my workflow. One of those is trying to figure out what the differences are between a pane, buffer and tab in Vim and how should they be used in one's workflow?
How to avoid rabbit holes when learning?
Tags: discuss
Published: 2017-08-23 02:48:12

---
title: How to avoid rabbit holes when learning?
published: true
description: This 
tags: #discuss
---
As I begin trying to learn new frameworks/languages/paradigms etc., I find that rather than taking a deep dive into learning that specific thing, I almost always end up in a "rabbit hole" of tabs and resources covering the surface of related things. Most recently I have been attempting to learn React, but find myself spending more time reading about things like webpack, Babel, Create React App and others. It doesn't feel right to use things like these few examples without truly understanding what they are all doing under the hood, but at the same time learning these could take significantly longer than the tech (React in this case) itself.

I am curious if others have had similar experiences and whether or not I should continue to explore all surrounding things in the ecosystem or try and focus in on one thing with a very high-level understanding of everything else?
Prevent Google from indexing your site
Tags: google, searchengines, webdev, webmastering
Published: 2017-08-23 02:04:03

---
title: Prevent Google from indexing your site
published: true
description: Two methods to prevent Google and other search engines from indexing your site.
tags: google, search engines, web development, web mastering
---

While I'm currently developing a client's website, the root of their website has a simple coming soon page. I decided to also setup a subdomain so that I can use it as a development environment and also send it as a link to the client so that they can see a close representation of the progress and actually interact with the website.

One challenge with this is, while I want the root domain with the coming soon page to be index by Google, I didn't want the subdomain to be indexed because at some point when the site is done, I'd probably delete the subdomain.

## `noindex` method

[According to Google](https://support.google.com/webmasters/answer/93710), including a meta tag with the content value of `noindex` and name value of `robots` will cause the Googlebot to completely drop the page from the Google Search results when it next crawls.

This is what the `noindex` meta tag looks like in the head of your web page.

```
<head>
  <meta name="robots" content="noindex">
  <title>Your cool website</title>
</head>
```

The meta tag will need to be included in every single page you want the Googlebot not to index. If you want to block the bot completely instead of telling which individual pages not to index, you'll want to use the `robots.txt` method.

## robots.txt method

The other method is to [block all search engine crawler bots from indexing your site](https://stackoverflow.com/a/390379/703220). To do this, you'll create a `robots.txt` file and place it at the root of the domain. This method also assumes you have file upload access to your server.

The contents of [robots.txt](https://developers.google.com/search/reference/robots_txt) will be:

```
User-agent: *
Disallow: /
```

Which tells all crawlers to not crawl the entire domain. So for example if I've got a subdomain of `dev.example-url.com` and I want just the subdomain of `dev` to be blocked, I'll want to place the `robots.txt` file at the root for the subdomain.

```
http://dev.example-url.com/robots.txt
```

## Do I Need Both?

Nope, you only need one method, but remember with the `noindex` tag, you'll need to add it to every page you desire not to be indexed, while the `robots.txt` will instruct the crawler to not index the entire subdomain.

***

Originally posted on [Michael Lee](https://michaelsoolee.com/prevent-google-index/)
Open Source List of Companies in San Francisco
Tags: career, companies, startup, jobs
Published: 2017-08-22 16:45:39

---
title: Open Source List of Companies in San Francisco
published: true
description: I recently published my private spreadsheet of companies in San Francisco. This list includes company name, website, year founded and company's physical address. It is useful for job seekers sensite to long commutes and anyone interested learning about new businesses that are out there!
tags: career, companies, startups, jobs
---

Open Source list of technology companies and startups in San Francisco, addresses included. This project is for job seekers and salespeople to discover companies within the SF metro

https://github.com/connor11528/sf-companies
Tech Talks: Slow Growth & Yvon Chouinard
Tags: techtalks, growth, startup, discuss
Published: 2017-08-22 14:38:42

---
title: "Tech Talks: Slow Growth & Yvon Chouinard"
published: true
cover_image: https://thepracticaldev.s3.amazonaws.com/i/takfjt133qftyj5pnz7n.jpg
description: Let's have a community exploration of this amazing podcast episode, where the founder of Patagonia shares his unique ideas on business/product growth & value. How can this apply to our industry?
tags: techtalks, growth, startups, discuss
---
<iframe src="https://www.npr.org/player/embed/504852483/505017995" width="100%" height="290" frameborder="0" scrolling="no" title="NPR embedded audio player"></iframe>


This podcast stimulated many thoughts that I wanted to discuss with the DEV community. Let's listen to it and engage in a constructive conversation from the POV of our industry and experiences.

Feel free to share meaningful take-aways, raise questions (that folks in community might be able to help clarify), or state areas where we may disagree with the speakers POV.


To kick things off These are 3 things that stood out to me:

1) 7:35 **His Ideas on slow and meaningful growth**, i.e."sometimes you grow strong, other times you grow fat". What do you think about this, does it apply to our industry as well?

2) 7:24 **Creating the product you wish you could buy and demand coming organically from others in the community wanting them also.** He makes a statement similar to "we were our own first customer, if you wait for customers to tell you exactly what they want you are too late". There is something to be said for being/having a domain expert on your team to refine your efforts. But I'm a big fan of market research/user testing to identify what users actually value over what I would guess they do so am unsure if I agree with this, but think it's worth consideration. 

3) 18:14 **Progressive Work Environment that was way ahead of it's time.**
It blew my mind that 40 years ago in the 70s Patagonia was offering their employees maternal and paternal leave, a child friendly office and daycare on-site, and flexible work schedules. Benefits that are frequently offered in software engineering (with the exceptions of child care considerations), but to this day still are often not offered in other fields, even other fields of tech like IT.


If you have suggestions of other interesting recordings of talks or podcasts with some application to tech and that would be interesting to try this with feel free to run with this theme and make a post or leave it as a suggestion in the comments.
Rutgers Coding Bootcamp Review 
Tags: codingbootcamp, career, rutgers, videos
Published: 2017-08-22 06:34:04

---
title: Rutgers Coding Bootcamp Review 
published: true
description: In response to some comments I read on reddit here is my honest review of Rutgers Coding Bootcamp from someone who attended the program. 
tags: codingbootcamp, career, rutgers, videos
cover_image: https://thepracticaldev.s3.amazonaws.com/i/l39nmc0zfk6pgxx52y06.jpg
---

In response to some comments I read on reddit here is my honest review of Rutgers Coding Bootcamp from someone who attended the program. I explain how I feel you can be the most successful at Rutgers or any bootcamp for that matter and why I feel most people fail. At Rutgers Coding Bootcamp I was able to teach myself React, MongoDB and NodeJS which I now use in production on a daily basis. 

{% youtube ZurTjRaOxWk %}
how to teach yourself to code
Tags: codingbootcamp, beginners, discuss, videos
Published: 2017-08-22 06:25:31

---
title: how to teach yourself to code
published: true
description: In this video rant I talk about the some of the top places that you can learn to code and how to better prepare yourself before spending money on a coding bootcamp. 
tags: coding bootcamp, beginners, discuss, videos
cover_image: https://thepracticaldev.s3.amazonaws.com/i/oy171snq2lh1t5sfewxz.jpg
---

In this video rant I talk about the some of the top places that you can learn to code and how to better prepare yourself before spending money on a coding bootcamp. 

{% youtube Dmj-_PudJrA %}
Are coding bootcamps really worth it?
Tags: codingbootcamp, beginners, discuss, videos
Published: 2017-08-22 06:21:10

---
title: Are coding bootcamps really worth it?
published: true
description: In this rant I explain why I feel that coding bootcamps are not for everyone but can be super worth it for people who are. 
tags: coding bootcamp, beginners, discuss, videos
cover_image: https://thepracticaldev.s3.amazonaws.com/i/84qnvccl250wdgh6ja9e.jpg
---

In this rant I explain why I feel that coding bootcamps are not for everyone but can be super worth it for people who are. 

{% youtube 8J0TQ3I_Ptk %}
Android Studio project syncing with Bitbucket without any command & third-party tool.
Tags: bitbucket, git, android, repository
Published: 2017-08-21 20:56:29

---
title: Android Studio project syncing with Bitbucket without any command & third-party tool.
published: true
description: 
tags: #Bitbucket #git #Android #Repository
---

In bellow Video, I will explain how to sync your android studio project with Bitbucket account. In this video, you will see how to create Bitbucket repository, how to push your code to Bitbucket directly from the android studio without any command or a third-party tool.

{% youtube AyJVK1Qay2E %}
Hazel Networking
Tags: showdev, networking, dotnet, opensource
Published: 2017-08-21 19:06:35

---
title: Hazel Networking
published: true
description: A low level networking library for C#
tags: showdev, networking, dotnet, opensource
---

It's been a while since I've done much on it but I feel if there's anything I should showcase here it should be this!

# Hazel
Hazel is networking library for C# that aims to simplify networking and take away some of the unneeded complexities and poor interfaces of sockets.

While I've only really advertised it on the Unity game engine forums it's fully compatible with .NET 3.5 and above (though not .NET core yet) so anyone who needs networking in .NET should be able to use it straight off.

It supports communication over TCP, UDP and its own RUDP and provides 3 major guarantees/abstractions for all of them:
* Connection oriented
* Message based
* Thread safe

By providing a standard interface it becomes really trivial to switch protocol and I've aimed to make it as simple and lightweight to use as possible.

# Code and Packages

You can get the source on [GitHub](https://github.com/DarkRiftNetworking/Hazel-Networking) or as a NuGet package [here](https://www.nuget.org/packages/DarkRiftNetworking.Hazel/) (MIT license, yay!) 

#Future (and a little past)

Hazel was a great little project for me and I had a great few weeks trying to invent and implement the RUDP algorithms and make them as efficient as possible. I really recommend it as a challenge to anyone who wants to learn more about networking or get a little experience in algorithmic thinking.

I originally intended Hazel to be the core of one of my more commercial side projects but sadly I've since changed that to a TCP/UDP socket pair in order to simplify the code base a bit. I still plan on maintaining Hazel as it's pretty much complete, so if anyone wants to use it or submit pull requests/issues etc. then I'll make sure to put some extra time into it with you!

One of the other visions I had for Hazel was to implement it in as many languages as possible in order to create a truly cross-platform networking library, hence the lightweightness of it, but that's perhaps something for the far future.

Any discussion, improvements or thoughts are more than welcome, I'd love for more people to give it a try!