teleren/devto huggingface dataset:
My journey in code
Tags: education, learning, programming, discuss
Published: 2018-03-01 19:52:07

---
title: My journey in code
published: true
cover_image: https://thepracticaldev.s3.amazonaws.com/i/1f7kh3ns8kzyjiz0x3jb.jpg
description: 
tags: education, learning, programming, discuss

---

This is my journey throughout the years in learning how to code.

 
### 1. High School and code
My journey with code started when I was in high-school, we were introduced to FrontPage at first and I was like _wow me make websites, me is genius_. Afterwards, QuickBASIC came with it's blue screen I thought that I was officially a hacker! and then we moved into Visual Basic where I wrote my first if statement, my first for loop and made my first calculator -tears of joy-, the idea of me talking to a machine and telling it what to do was mind blowing for me. Yet, it took me a while to grasp and understand all these programming concepts. 


### 2. College, code and tears


Then I got into college, and got into depth in programming. I basically studied C++ and Java as programming languages, then I was introduced to OOP concepts, Algorithms, Data Structure and Database. It was pretty tough, all I did during college was crying because I did not get good grades, every semester my GPA would fall, my tears and my self esteem.


### 3. Work and code


Following that, I did an internship in iOS development using Objective-C. 
And for the past 2 years, I've been working as a .NET developer using MVC C#.

I know that am still at the beginning of my career, yet things are not easy for me and I'm doing my best to keep getting better and improving. I tried taking some online courses, and reading few books about coding, but I'm still not getting there. 

###  The Struggle is REAL 
![Struggle](http://media.comicbook.com/2017/05/anime-streaming-computer-994731.png)
 

**Do you know when you like get something? There is a spark in your head that lights up and then you got it, you mastered that skill** I am still not there yet but I really wanna get there. 



So, do you have any tips for me? Also, I am curious to know how did you guys learned programming (self taught, school, boot camps, online courses etc..) and what was the thing that got you into programming?
For those who make use of GitHub Projects—What's your process?
Tags: discuss, productivity, management
Published: 2018-03-01 19:44:34

---
title: For those who make use of GitHub Projects—What's your process?
published: true
description: 
tags: discuss, productivity, management
---

We are trying out GitHub projects and I'm wondering if anybody has experience with this feature. What constitutes a project? What's your line in the sand? What is easier with this feature and what is harder?

Feel free to chime in on the general thoughts about project management if you have not used GitHub projects too if it's still sort of relevant. All input is welcome.
Is-Vegan helps you to find out which food ingredients are vegan / non-vegan
Tags: javascript, vegan, food, ingredient
Published: 2018-03-01 19:29:24

---
title: Is-Vegan helps you to find out which food ingredients are vegan / non-vegan
published: true
description: https://github.com/hmontazeri/is-vegan
tags: js, javascript, vegan, food, ingredient
---

[Is-Vegan on Github](https://github.com/hmontazeri/is-vegan)
[Is-Vegan on NPM](https://www.npmjs.com/package/is-vegan)
Milestone:  1K downloads!
Tags: ruby, opensource, documentation, markdown
Published: 2018-03-01 18:59:48

---
title: "Milestone:  1K downloads!"
published: true
description: Over 1000 downloads of my first Ruby gem, markdown_helper
tags: ruby, opensource, documentation, markdown
---
My first Ruby gem on RubyGems.org, <a href="https://rubygems.org/gems/markdown_helper">markdown_helper</a> just passed one thousand downloads.

But I can't get puffed up -- the most popular gem, <a href="https://rubygems.org/gems/bundler">bundler</a> has been downloaded 224 *million* times.
Why are you blogging?!
Tags: discuss
Published: 2018-03-01 18:54:41

---
title: Why are you blogging?! 
published: true
description: reason why I blog
tags: discuss
cover_image: https://thepracticaldev.s3.amazonaws.com/i/rps304wsxwn7tiydw6cn.jpg
---
It's funny, but when I talk with friends or colleagues about some of the articles I wrote, one of the most common question is: `Why are u blogging?`

They do not ask what I blog about, they ask why. 
So I realized I really have to write a blog post about why I write blog posts?!

Obviously all of us write stuff on the internet because we want to share something. But again, why do we want to share?

##My reason
Almost all the stuff I know, most of the stuff I learned and will learn come from a blog in one form or another.
It might be a coding blog like baeldung, it might be a blog which sums up papers, like the morning papers, it might be a developer hub like Dev.to!

I really have to thank the community for the amount of useful information they shared. 
So, as you might have understood at this point, blogging is my attempt to give something back to the community, my tiny little contribution.

I have also found out, how rewarding it is to document my ideas or little discoveries. Because...

> If you can't explain it, you don't understand it well 


## Conclusion
Now I have a blog post for all those times in which someone is going to ask me:
`How come you write a blog?`

And you? What's your reason?

Thanks!
Introducing Our March 2018 Sponsors
Tags: meta
Published: 2018-03-01 18:34:09

---
title: Introducing Our March 2018 Sponsors
published: true
description: Thank you to these amazing dev-driven companies for supporting us in various ways.
tags: meta
cover_image: https://thepracticaldev.s3.amazonaws.com/i/0fue3xp8hf3xears4ddo.png
---

Thank you to these amazing dev-driven companies for supporting us in various ways. We are happy to introduce Manifold as a new sustaining March sponsor this month, and a big thank-you to TripleByte and Algolia for holding onto their gold sponsorship level for a second month in a row.

## Manifold

[Manifold](https://www.manifold.co/?utm_campaign=dev.to_march&utm_source=dev.to&utm_medium=sponsorship) is a marketplace for independent developer services. This means they provide a _much less chaotic_ way of managing plans across various software service providers through a single dashboard. Before finding out about Manifold, I'd experienced this sort of convenience through other platforms, but always with a high amount of vendor lock-in that prevents it from being a long-term solution. Manifold is a brilliantly executed idea. We happen to also be users of [Torus](https://www.torus.sh/) for managing keys in our dev process after one of the Manifold founders made [this comment](https://dev.to/ianlivingstone/comment/7if) on a post of mine.

## Triplebyte

[Triplebyte](https://triplebyte.com/?ref=devto_mar18) is a remarkably efficient job placement platform. So much about about landing at a great engineering org is having people in your corner during the process. Triplebyte qualifies you through a series of their own interviews in order to champion for you. I didn't quite understand until I took [the quiz](https://triplebyte.com/?ref=devto_mar18) myself (for fun, I'm happy working on [dev.to](/) 😋). I'd suggest going through it yourself. It's a wonderful blind-spot-exposing experience.

## Algolia

[Algolia](http://bit.ly/2F3SjlV)'s core product is extremely low-latency search which we make great use of on [dev.to](/) in a variety of ways. It powers our core search as well as the customization of your home feed based on the tags you follow. We have plans to integrate it elsewhere, as well. It has become one of the critical pieces of infrastructure for our whole offering — which, as you may know, is all about performance. [Plus it's free to try](http://bit.ly/2F3SjlV).

In partnership with Algolia, we've also added a _Powered by Algolia_ message on the sidebar of our search page. We think this is a natural partnership, as we often get "what's your stack" kinds of questions. We hope to always work with sponsors thoughtfully, but you are always free to turn off any of the on-site sponsorship messages can be disabled [in your settings](/settings/misc).

We are working on other sponsorship integrations and funding avenues as we build a sustainable business. We strive to make these as valuable as possible for all parties and will keep you up-to-date on specific partnerships as they are launched.
Building a blog with Gatsby, React and Webtask.io!
Tags: gatsby, react, javascript, serverless
Published: 2018-03-01 17:14:40

---
title: Building a blog with Gatsby, React and Webtask.io!
published: true
description: Building a blog with Gatsby, the React based static content generator. Using Webtask.io, the serverless endpoint service to provide a backend API.
tags: #gatsbyjs #reactjs #javascript #serverless
canonical_url: https://auth0.com/blog/building-a-blog-with-gatsby-react-and-webtask/
---

Gatsby is a modern React based static content generator, and it boasts an impressive list of out-the-box features. In this article, we're going to be building a blog and adding extra features like pagination, user authentication with Auth0.js, and newsletter subscription using an API endpoint built on [Webtask.io](https://webtask.io/).

[Get started 🚀](https://auth0.com/blog/building-a-blog-with-gatsby-react-and-webtask/?utm_source=dev&utm_medium=sc&utm_campaign=gatsby_blog)

![Building a blog with Gatsby, React and Webtask.io!](https://thepracticaldev.s3.amazonaws.com/i/66eggyslj6s2a8eu9xmw.png)
[HELP] Desktop Application Technology
Tags: discuss
Published: 2018-03-01 15:32:37

---
title: "[HELP] Desktop Application Technology"
published: true
description: Need suggestions on desktop app technologies
tags: discuss
---

So I am in the planning stage for an upcoming project of mine and am trying to sort out the best technologies I should use. The project is based around a desktop app and I am super stuck on what to write it in. I have a background in Java so I was thinking maybe JavaFX. However, I am trying to get out of the Java world to build my portfolio a little. Electron looked extremely enticing due to my existing web development background but after seeing all the criticism on Electrons performance I am not so sure. The app won’t be anything too intensive but I definitely want it to be lightweight.

Any suggestions help.

Thanks
Explain Wordpress add_rewrite_rule Like I'm Five
Tags: explainlikeimfive, wordpress, html5mode
Published: 2018-03-01 14:17:24

---
title: "Explain Wordpress add_rewrite_rule Like I'm Five"
published: true
description: "I want to use the html5mode of AngularJS, and for this, I need to understand how this functionality works. Thx!"
tags: #explainlikeimfive #wordpress #html5mode
---
How would you go about resigning as a Junior Developer?
Tags: career, beginners, discuss
Published: 2018-03-01 11:57:48

---
title: How would you go about resigning as a Junior Developer?
published: true
description: You've landed an opportunity to move jobs as a Junior Developer, how do you break this news to your boss?
tags: career, beginners, discuss
---

## Preface

So this isn't necessarily a topic that I'm in desperate need of help with, I just thought it would be an interesting thing to discuss!

### Scenario

You are a Junior Developer, and you've been going for some interviews, and one of the companies you applied for has just sent you an offer that outweighs anything you've gotten thus far. You accept.

Your initial reactions of excitement and joy are quickly overcome by the thoughts of having to break the news to your boss, as well as having to remain at work for another 4 weeks or so, since that's what is stipulated in your contract.

Being the developer, how would you approach this situation from a written and verbal standpoint?

### My thoughts

I think being direct and straight to the point will alleviate any kind of hesitation I might have about handing in my resignation, but the one thing that keeps me held up is the thought of having to openly and honestly tell your boss why you're leaving, telling them why you were so unhappy as to look for another job etc.

The thought of having to open that up for my boss to listen to I feel could hurt the relationship and could come back to bite me in the future, for example:

If you took the offer from the new workplace and they contacted my boss to see what kind of an employee I was, I'm afraid that either the previous boss tells my soon-to-be employer qualities that aren't true or straight up defamation of character.

---

These are just a small collection of thoughts.

What are yours?
WooCommerce Booking Plugin by FMEAddons
Tags: woocommercebookings
Published: 2018-03-01 11:45:17

---
title: WooCommerce Booking Plugin by FMEAddons
published: true
description: 
tags: WooCommerce Bookings
---
<img src="https://thepracticaldev.s3.amazonaws.com/i/7pzyb2s9gidzvm49g828.png">
WooCommerce booking plugin is a powerful tool which helps you allow customers to reserve the bookable products on your e-store such as hotel rooms, rent a car etc. Customers can either book the products or services by paying the money or unpaid as well. <b><a href="https://codecanyon.net/item/woocommerce-booking-reservation-plugin/21394051">WooCommerce booking plugin</a></b> allows you to allow customers to cancel their bookings, you can define the time period for it. You can also create various options to enable the main product like with room you can offer internet or massage facility as well. The price of this plugin is only $39 and comes with free support and upgrades as well.

<b>Screenshots:</b>

<img src="https://thepracticaldev.s3.amazonaws.com/i/50z8rjiy1nmhz0010b19.png">

<img src="https://thepracticaldev.s3.amazonaws.com/i/qnp4sc12x105umi2tg6o.png">
Setup the proxy for Dockerfile building
Tags: docker
Published: 2018-03-01 08:10:50

---
title: Setup the proxy for Dockerfile building
published: true
description: 
tags: Docker
---

If we just need to pull or push the docker image, it is fine to set up the proxy by system service conf file. But this proxy setting seems don't work when building the Dockerfile. We have tried to modify the /etc/default/docker configuration, but this seems also do not work. By looking a lot of answers from StackOverflow, we finally found the right setting to set the proxy.

`docker build --build-arg http_proxy=http://10.239.4.80:913 --build-arg https_proxy=http://10.239.4.80:913 .`

10.239.4.80:913 is the proxy address of my company, you may need to change according to your company proxy address and port.

You also can set the proxy in the Dockerfile.

`ENV http_proxy 10.239.4.80:913`

But this method is not recommended in my opinion, since the end-users may directly connect to the internet rather than by proxy.
Data constraints: database layer or app logic?
Published: 2018-03-01 07:22:28

I used to be a big believer in using SQL constraints to ensure data integrity. I'm talking primarily about constraints like `FOREIGN KEY` to manage relationships between models and `UNIQUE` to ensure uniqueness. Now I'm wondering whether it's better to enforce such in the app logic itself, via ORM and validators.

My biggest gripes with SQL constraints are:

1. _It's difficult to catch and respond to specific errors._ Most times the DB layer throws a generic exception \(`PDOException` for PHP\) with the actual error message as a string. It would be much easier, if, for instance, a `UniqueConstraintViolationException` or `ForeignKeyConstraintViolation` were thrown.
2. When running manual tests that involve manipulating the database, sometimes database constraints can really be a pain in the ass.

Of recent, I've been leaning more towards enforcing my relations in the app logic. I still keep UNIQUE constraints on the DB, but I do a manual check first for duplicates.

Please share your thoughts and experiences.
Which one is valid ? How can answer 15 for both ?
Tags: javascript
Published: 2018-03-01 05:54:09

---
title: Which one is valid ? How can answer 15 for both ?
published: true
description: 
tags: javascript
---


###01
```

function doSomething(a) {
	b = a + doSomethingElse( a * 2 );

	console.log( b * 3 );
}

function doSomethingElse(a) {
	return a - 1;
}

var b;

doSomething( 2 ); // 15
```


###02

```
function doSomething(a) {
	function doSomethingElse(a) {
		return a - 1;
	}

	var b;

	b = a + doSomethingElse( a * 2 );

	console.log( b * 3 );
}

doSomething( 2 ); // 15
```
Using Async, Await, Plus a Slight Delay?
Tags: dotnet, webdev, csharp
Published: 2018-04-05 13:32:15

---
title: Using Async, Await, Plus a Slight Delay?
published: true
tags: dotnet,webdev,csharp
canonical_url: 
---

Today’s problem dealt with how we view our invoices online.  We use an app on the iSeries that creates a PDF and delivers it to a set destination.  That destination, in our case is a regular windows server, the files landing in a small site:   pdf.mycompany.com.

My initial approach was simple, use the PHP API I have sitting on the iSeries to make a call to the program – passing it the parameters for that specific invoice, await response (which gave me the new created filename) and then redirect to that URL.  The method looks something like this:

```c#
[HttpGet]
public async Task<ActionResult> GetInvoiceAsync(int invoice)
{
    GetInvoice getInvoice = new GetInvoice();
    var client = new HttpClient();

    string fileName = await getInvoice.LoadPDF(invoice);

    string url = "http://pdf.mycompany.com/";
    url += fileName + ".pdf";

    return Redirect(url);
}
```

This worked great… 90% of the time, but the other 10% of the time, I clicked too quickly on an invoice and got forwarded to a 404.

## The Confusion

LoadPDF is an async method, sitting in my Services folder and the method above sits in my controller.  I assumed, because it was an await, well, GetInvoiceAsync should WAIT until the server is done.  So, then, why am I getting forwarded prematurely?  Why is it not waiting?

## The Real Problem

GetInvoiceAsync IS waiting, it is waiting for a response.

What was really happening:

- LoadPDF takes data, seralizes it.
- LoadPDF creates a HttpWebRequest and posts the data to the iSeries
- The iSeries responds with a file name
- RESPONSE IS MADE. AWAIT IS OVER
- User is forwarded to new file
- _iSeries is still in the process of copying file over_
- User gets a 404

## Easy Solution

I solved the problem by simply adding a small delay inside of LoadPDF.  So, it gets response, then waits another 1.5 seconds before confirming to the controller it is done.  Here’s the code that solved it:

```c#
//declared at top of class
CancellationTokenSource source = new CancellationTokenSource();

//iSeries needs time to copy file over to pdf server
//added in LoadPDF just before return(fileName);
await Task.Delay(TimeSpan.FromSeconds(1.5), source.Token);
```


#### Do you know a better way I can handle this?
Your thoughts on Creating a New User 
Tags: discuss
Published: 2018-03-01 02:57:26

---
title: Your thoughts on Creating a New User 
published: true
tags: discuss
---

To handle the case when someone becomes a user of a paid web application, "we", as developers, need to take several steps: 

 - add them to the database 
 - verify their email 
 - send them a welcome message <- server
 - charge them 
 - redirect them 
 - *is there something else?* 

Most dev guides cover "add them to the database" and "redirect them". I have created all of the steps in my application. Naively, I took all of my steps and  plopped into the route handler for a new user. 

As I stand on the precipice of *really-this-matters* development, I am wondering: 

 - Does the **order of operations** matter? (obviously, we don't want to redirect to an authenticated area before we actually make an account and charge them, but should we wait to create the account until they click on the "confirm" email?)
 - Do you have a story from **your experience**?
 - If you verify email through verification service, do you still want to send a verify/confirm email email?
 - **Am I missing something huge?**
Introducing auto-nix-shell for consistent development environments
Published: 2018-03-01 00:00:00

---
title: Introducing auto-nix-shell for consistent development environments
date: 20180301T00:00Z
---

<script src="https://asciinema.org/a/dFFhCmPULkqtIPLN8PrBjnjK0.js" id="asciicast-dFFhCmPULkqtIPLN8PrBjnjK0" async></script>

I created [auto-nix-shell](https://github.com/chrismwendt/auto-nix-shell) to automatically enter/exit `nix-shell` when `cd`ing into/our of a directory that has a Nix config file (`default.nix`). It even checks for config changes before executing the next shell command (using [`fish_preexec`](https://github.com/fish-shell/fish-shell/pull/1666) and [bash-preexec](https://github.com/rcaloras/bash-preexec)) and reloads the configuration when you `git checkout <some other commit>`
Alternative Applicative and Monad formulations
Published: 2018-03-01 00:00:00

---
title: Alternative Applicative and Monad formulations
date: 20180301T00:00Z
---

There's a little known alternative definition of Applicative and Monad that I haven't seen presented in an article before, so I thought I'd share:

```haskell
class Functor f => Applicative f where
  pure :: f ()
  (**) :: f a -> f b -> f (a, b)

-- Left identity : pure ** v     ≅ v
-- Right identity: v    ** pure  ≅ v
-- Associativity : u ** (v ** w) ≅ (u ** v) ** w
-- (≅ means isomorphism)

class Applicative m => Monad m where
  join :: m (m a) -> m a

-- join . fmap join = join . join
-- join . fmap pure = join . pure = id
```

See:

- [https://stackoverflow.com/questions/45829110/monad-laws-expressed-in-terms-of-join-instead-of-bind/45829556](https://stackoverflow.com/questions/45829110/monad-laws-expressed-in-terms-of-join-instead-of-bind/45829556)
- [https://wiki.haskell.org/Typeclassopedia#Alternative_formulation](https://wiki.haskell.org/Typeclassopedia#Alternative_formulation)
- [https://www.reddit.com/r/haskell/comments/2lompe/where_do_the_applicative_laws_come_from/clxfblk/](https://www.reddit.com/r/haskell/comments/2lompe/where_do_the_applicative_laws_come_from/clxfblk/)
How to get an engineer job in Silicon Valley as foreigners?
Tags: discuss, career
Published: 2018-02-28 14:38:01

---
title: How to get an engineer job in Silicon Valley as foreigners?
published: true
description: 
tags: discuss, career
---

Hi, I am 25 years-old Japanese web engineer. I am enjoying programming everyday.

I would like to work in America, especially in Silicon Valley because America is the mecca of software.
Almost all new technologies and breaking innovations are being born there.

Then, what should I do for getting a job in America? I don't have any foreign experience. I have some foreign friends but neither study nor work experience.

I am planning the following parallel three strategies (I am working at a startup now but will become a freelance soon):

- Going to University in America for master degree of Computer Science.
- Get a job in America straightly by standing out in Social activity, such as OSS contribution or writing dev post (like here).
- Widen my network(=meet people)

The first one looks hard but robust way. However I might not be able to go to a good university as my terrible GPA in bachelor of economics...

Do you have any ideas? I appreciate any advice.

Thanks!