teleren/devto huggingface dataset:
The state of javascript Survey
Tags: javascript, survey
Published: 2018-09-07 20:27:40

---
title: The state of javascript Survey
published: true
description: 
tags: 
    - javascript
    - survey
---

Hey Friends,

Please help fill in the [survey](https://medium.com/@sachagreif/take-the-state-of-javascript-2018-survey-c43be2fcaa9) about the state of javascript 2018.

> If you’re not familiar, the survey covers all things JavaScript and tries to answer two main questions:

> Which up-and-coming tools are developers most excited about?
> Which tried-and-true technologies are developers most happy with?
Introduction to OpenStruct
Tags: learning, ruby
Published: 2018-09-07 20:38:58

---
title: Introduction to OpenStruct
published: true
tags: Learning,Ruby
canonical_url: http://christine-seeman.com/2018/09/introduction-to-openstruct/
---

Intro to OpenStruct

![](https://media.giphy.com/media/LHZyixOnHwDDy/giphy.gif) 
*(Cause every article needs a little gif)*

Last week I had a task to start working with some CSV data pulled in from the database.  There was already existing code working with the data, so I needed to make sure whatever changes were applied, that they were backwards compatible.  The data was an csv representation of an array.  The current code was hard coded to go through the array in a fairly rigid process, so to add some flexibility, and allow better access the data in a controller, it was suggested to use OpenStruct.

First a quick overview on what is OpenStruct, it is a data structure that is similar to a hashe. It applies arbitrary attributes with accompanying values. It seems like magic, but it is just Ruby’s metaprogramming and it defines the methods on the classes themselves. A basic example of using OpenStruct on an object might be:

```
require "ostruct"

candy = OpenStruct.new
candy.name = "Snickers"
candy.type = "Chocolate"
candy.amount = 5
```

Then if I needed to call and figure out the candy name, or type, I can call a method on the object itself (instead of having to do the Ruby hash way which would’ve been candy[:name] # =\> “Snickers”)

```
candy.name
> "Snickers"
candy.type
> "Chocolate"
```

So the code went from using:

```
@csv = CSV.parse(parsed_text)
```

To the following with OpenStruct:

```
@csv = CSV.parse(parsed_text, headers: true).map { |row| OpenStruct.new(row.to_h) }
```

Making use of the csv data now went from:

```
@list = @csv[1..-1] || []
@count = @list.count
```

And now:

```
@list = @csv.map { |row| row.to_h.values } || []
@count = @csv.count
```

Accessing the values was much easier, but it is important to note with OpenStruct:

1. It is not performant, which wasn’t something that needed to be kept in mind for this piece of code but if it is something that you do need to keep in mind, go for a hash or struct.
2. OpenStruct != Struct , struct is similar to a custom created class that you don’t need to initialize or have any attr for. Struct is more performant, OpenStruct more flexible.  Struct has to have the attributes defined, while it is dynamic with OpenStruct.  For the ex. we have name, type and amount but couldn’t add on later an listing for populatarity.

```
candy = Struct.new(:name, :type, :amount)
snickers = candy.new("Snickers", "Chocolate", 5)

snickers.type 
> "Snickers"
```
Quick Tip: How to Test Timer-Based Azure Functions Locally
Published: 2018-12-30 02:46:33

---
title: Quick Tip: How to Test Timer-Based Azure Functions Locally
published: true
tags: 
canonical_url: https://SeanKilleen.com/2018/09/test-azure-timer-function-locally/
---

I’ve been digging into Azure Functions lately and it’s pretty great. I hit a small stumbling block so figured I’d document it here in case anyone else had the same question.

## Challenge

I have an Azure function that is triggered by a timer.

I’d like to test the function locally, but it appears that it only works on the schedule that I set. In the console window that pops up when debugging, I see

> The next 5 occurrences of the schedule will be:9/14/2018 4:00:00 PM9/21/2018 4:00:00 PM9/28/2018 4:00:00 PM10/5/2018 4:00:00 PM10/12/2018 4:00:00 PM

How can I force this function to run so I can test it locally, without waiting for the next scheduled run?

## Solution

You can then make a POST reuqest to `/admin/functions/[functionName]` endpoint to execute the function.

For example, if azure functions is running on `localhost:7071` and I have a function called `MyFunction`, I could send an http POST request to:

`http://localhost:7071/admin/functions/MyFunction`

and the function would then be executed.

Hope this can help save some time for someone else. Happy coding!

[Quick Tip: How to Test Timer-Based Azure Functions Locally](https://SeanKilleen.com/2018/09/test-azure-timer-function-locally/) was originally published by Sean Killeen at [SeanKilleen.com](https://SeanKilleen.com) on September 07, 2018.
Problems Focusing on one thing.
Tags: javascript, python, unity3d
Published: 2018-09-07 18:40:11

---
title: Problems Focusing on one thing.
published: true
description: having problems focusing on one language
tags:  javascript, python, unity, c#
---

Hey!! Folks, I'm new here. I'm having problems focusing on learning one thing to a deeper level. Example (1), I started python and Java about 3 - 4 months ago and then start to gravitate to learning other things eg HTML, CSS, javascript. This was not a bad choice because I got into web stuff and now use python and Django as a backend. Example (2) I also started creating an app with android and java was very hard to me but I pressed on and got the functionality I wanted. Recently I got interested in the game development tried Godot and settled with Unity and c# which was another language to learn again although it is very similar to Java which made learning less depressing. The main issue is I can't seem to stick with one thing I guess I'm trying things that I'm interested in an also trying to prepare myself to employable mainly remotely because my country doesn't have a lot of opportunities
for programming atm. any suggestions? Thanks!
Shall we see what Hacker News thinks about ClassicPress?
Tags: wordpress, opensource, php
Published: 2018-09-07 16:13:44

---
title: Shall we see what Hacker News thinks about ClassicPress?
published: true
description: This should be fun...
tags: #wordpress, #opensource, #php
---
Visit the thread: [ClassicPress (a WordPress fork) opens community voting](https://news.ycombinator.com/item?id=17935408)
Provide/Inject in Vue.js
Tags: vue, speakerdeck
Published: 2018-09-07 15:58:14

---
title: Provide/Inject in Vue.js
published: true
description: An advanced pattern
tags: vue, speakerdeck
---

I gave a presentation at my local Vue meetup this week. It was my first time doing a technical presentation outside of work and I had a great time. I talked about Provide/Inject, an advanced pattern in Vue.js. Rather than doing a full writeup about what Provide/Inject is and how to use it, I'll put my slides below and you can ask questions in the comments.

{% speakerdeck 344b83496cb04370baef49da2c1fbca7 %}

Let me know if there's anything I can clarify for you!
How to Combat Information Overload?     
Tags: beginners, career, discuss
Published: 2018-09-07 15:18:58

---
title: How to Combat Information Overload?     
published: true
description: How to Combat Information Overload?  
tags: #beginners #career #discuss
---

Hi all! I'm currently learning to code, in order to make a career transition from academic life to web development. I've started in June, and have gone through a fair portion of FreeCodeCamp's curriculum, taken a Python class on Udemy, started reading Medium articles, subscribed to some podcasts, followed some coding-related Twitter feeds, and connected with people in my area through Meetups and Slack groups.It's been really exciting, and I've found that I enjoy the logical challenges of creating functional code (which isn't to say that they've been easy, by any means!). This type of work blends well with my natural interest in the structure of spoken and written languages. 

Here's my confession: I am *totally* overwhelmed by all of the resources.

Don't get me wrong: I'm happy that there is such a vibrant community of self-taught developers, and that there are so many places I can go to get help. But there's also just so much stuff! There are like, 10000+ articles, threads, posts, feeds, video lessons, etc. that I could read every day, and half of them seem to assume knowledge of concepts I only have the vaguest idea about.

So, I guess my big question to all you self-taught devs out there is, how do you handle this? I wonder if I should devote myself entirely to pushing through FCC, then start looking more at articles, podcasts, etc. It's also possible that I could pay for something like a bootcamp or an online certification program, just to give me some structure. But that then begs the question of which program to join and how much $$$ to pay. (Hint: the closer to 0, the better!)

I know there isn't a magical straight path that will automatically show me everything I need to do (like the quest arrow in Skyrim) to get a job doing web development. But I have to imagine that I'm not the first person to start on this career and have a "holy crap I'm so in over my head" moment. (At least I hope I'm not!)

I'd love to hear how others have navigated this early point!
Make your voice heard - vote for the features you want in WordPress (aka, ClassicPress)
Tags: wordpress, opensource, php
Published: 2018-09-07 15:13:32

---
title: Make your voice heard - vote for the features you want in WordPress (aka, ClassicPress)
published: true
description: ClassicPress voting is now open!
tags: wordpress, opensource, php
---

**TLDR; for newcomers:** [ClassicPress](https://www.classicpress.net) is a fork of WordPress, focused on community-led decisions. There are dozens of people working on it and it's your time to decide the direction we take.

# **[VOTE NOW >>](https://vote.classicpress.net)**

Hacker News thread here: https://news.ycombinator.com/item?id=17935408

![We need you](https://thepracticaldev.s3.amazonaws.com/i/ply3u868az2m470aio51.jpg)

---

**Quick update for people who have been following our progress**: v1 of ClassicPress will be a LTS version of WordPress 4.9 **without Gutenberg** so people can switch knowing their site won't break. v2 will diverge and follow a development track as decided by the community (with sensible checks and balances in place).

And now the time has come - you can **NOW VOTE FOR THE CHANGE YOU WANT TO SEE IN WORDPRESS / CLASSICPRESS!**

Head over to https://vote.classicpress.net and make your voice heard.
What it is really like for a Junior Dev
Tags: developers, junior, software
Published: 2018-09-07 14:33:33

---
title: What it is really like for a Junior Dev
published: true
description: Gain some insight on the new wave of developers.
tags: developers, junior, software
---

I've only been in the software industry for about 2 years now. I graduated with a Bachelors in Software Engineering in 2016. I can say that the one thing I regret the most is not doing and side work/projects to gain more knowledge about software development. 

With that being said, it was really difficult to find a job at first. Being a recent grad I had NO experience. So to land a job I had to really sell my self. I was lucky to land a job and jump straight into developing in the .NET/Microsoft stack. I learned SO much more in about 1 month on the job than I ever have in 4 years of University. I have seen a lot of other new developers experience this too. 

Over these two years I have worked on about 4 different key projects and have gained knowledge on other tools that help in software development. I have heard many stories where junior devs, or entry level devs, get stuck on a bug queue for about a year before they do any actual development in significant projects. In my opinion this is only going to stifle them. If you give a new developer the proper guidance and tools you can be amazed at what they can accomplish. Being stuck in bug queue for a prolonged period of time doesn't allow a new developer, or any developer for that matter, to grow and gain company knowledge. Because there is nothing more deadly than a great developer who also truly understands the business rules of a company.

What was your experience like as a new developer? Did you work on significant projects, or were you given "easy" work?
Need Data to write parser
Tags: python, help
Published: 2018-09-07 14:26:17

---
title: Need Data to write parser
published: true
description: 
tags: python, help
---

I want to learn writing simple parsers, it would be fun if I can do it as simple challenges or problems that need solutions. Like some chunk of raw data to take information out of. Is there a place that you guys know of or I can look for such data ?
Adventures of a Hobbyist ~ Part seven
Tags: routing, node, learning, opensource
Published: 2018-09-07 13:18:46

---
title: Adventures of a Hobbyist ~ Part seven
published: true
description: Playing with routing
tags: routing, node, learning, opensource
cover_image: https://thepracticaldev.s3.amazonaws.com/i/hwuqi2330j2np8qlll1n.png
series: Adventures of a Hobbyist
---

# Playing with routing

## What is this?

Here we are in part seven of my learning experience. The aim is to learn node in order to make an opensource web app that can be used by sysadmins for daily tasks.

If you're interested in reading earlier posts here's the [index page](https://dev.to/link2twenty/adventures-of-a-hobbyist--index-4oj7).

## So you mean `express`?

No, I know `express.js` is a thing and I know people like it but I thought, to start with at least, I'd try my hand at making a custom router. I don't intend to make it do anything fancy just a simple thing to help me understand the greater concept.

### Starting point

To start with I made an incredibly simple proof on concept.

```javascript
const http = require('http');

function router(url) {
  let address = url.split('/')[1] || "index";
  return address;
}

http.createServer((req, res) => {
  res.writeHead(200, { 'Content-Type': 'text/plain' });
  res.end(router(req.url));
}).listen(80);
```
It looks at the URL path and prints the first part to the screen, if there's nothing there it prints index. Super simple but proofs we can use a function to work out what need to be printed.

### Loading files

The next step was having it load files rather than just pushing text.

```javascript
const http = require('http');
const fs = require("fs");

const pages = "pages";

function router(url) {
  let address = url.split('/')[1] || "index";
  let content;
  try {
    content = fs.readFileSync(`.\\${pages}\\${address}.html`, 'utf8');
  } catch (err) {
    content = fs.readFileSync(`.\\${pages}\\404.html`, 'utf8');
  }
  return content;
}

http.createServer((req, res) => {
  res.writeHead(200, { 'Content-Type': 'text/html' });
  res.end(router(req.url));
}).listen(80);
```
I just used `readFileSync` from `fs`, it checks if the file exists, if it does it will serve the file if not it will serve the 404 page. 

There are a couple of problems with this approach. If I try and browser to `http://localhost/home?beta=true` I'll get a 404 as `.\pages\home?beta=true.html`  can't be opened, anchors do work, however. Also, there is no support for deeper links like `http://localhost/api/userlist`.

## Limitations

I've already mentioned there are solutions for this out there already so I'm not going to try and overcome these limitations. Though if you want to tell me some ways you'd have solved them I'd love to hear them.

### What's next

Next week I'm going to look at `express.js` and try my hand at making a quick project, I was thinking perhaps a MySQL client to read and maybe write, data. Though, if you have a suggestion for something else I should do I'll happily concider that.

Sorry for the short post, hopefully, I'll be back to the longer ones soon, unless you prefer the short ones of course.
Thanks for reading! 🦄🦄🦄
Los Angeles, United States of America 🇺🇸
Tags: cdn, edge, pop
Published: 2018-09-07 12:09:38

---
title: Los Angeles, United States of America 🇺🇸
published: true
description: First Commons Host CDN edge server deployment in the Western Hemisphere.
tags: #cdn #edge #pop
---

## Go West, young CDN.

America, birth place of the Internet, joins the [Commons Host CDN](https://commons.host) with an edge server deployed in Los Angeles, California. As the largest city in the most populous state, this is a great location for low latency static site hosting.

![Scenic view of Los Angeles daytime skyline](https://thepracticaldev.s3.amazonaws.com/i/6rub4ejpq7ue9m54ejeu.jpg)

*Photo: Los Angeles, by [Jelle Bleyenbergh (Flickr)](https://www.flickr.com/photos/jellebleyenbergh/43603169272/in/photolist-26qHNY1-256qawg-29WjWjz-2aHYmME-26HYWYR-23BGjAu-27dxzmL-26x4nJ7-LGutDh-E3VZck-23hh2VQ-MMhtm9-23SnPka-23BGkzy-E1tby4-23d3mx7-25UaXmY-23v3E35-269p1ZE-29v9uRa-F4HBrC-24A3bhu-227PisY-23d3n4h-25G1a8U-29r4D7y-KckgH2-22gUxKT-26WxvgM-M4RoxM/)*

## Millicast WebRTC CDN

This edge server is sponsored by WebRTC specialists [CoSMo Software](http://www.cosmosoftware.io). Its polymath founder [Dr Alex](https://twitter.com/agouaillard) is a [WebRTC industry insider](http://webrtcbydralex.com) and long time supporter of the Commons Host project. WebRTC enables open-standards based media streaming in browsers and devices. *(More exciting news to follow!)*

Hosting of the server in LA is provided by [Millicast](https://millicast.com), a WebRTC-powered live streaming CDN offering incredible sub-500 milliseconds latency for large scale broadcasts. Millicast is a collaboration between CoSMo and [Xirsys](https://xirsys.com) as provider of TURN cloud services.

![Cofounder of Millicast with traditional Southern California greeting hand gesture](https://thepracticaldev.s3.amazonaws.com/i/atny1t6x8fowa10es753.jpg)

*Photo: Selfie by [Richard Blakely](https://twitter.com/RichardBlakely), [CEO of Xirsys](https://www.linkedin.com/in/richard-blakely-960796/) and cofounder of Millicast, with Commons Host µPoP server. 🤙🏻 for scale.*

## Together we serve, divided we scale.

This deployment is a small start, literally and figuratively, into the American CDN market. Obviously, many established American tech companies already provide competitive hosting and edge delivery services.

But what Commons Host offers is seamless extensibility into any location around the world. This offers better performance, cost savings, and unique operational capabilities.

The ability to extend the Commons Host CDN by deploying your own edge servers on-premises is made affordable and effortless thanks to open source software and hardware.

Join the Commons, deploy today!
Know how the investment returns on Mutual funds are taxed
Tags: mutualfunds, taxes, investment
Published: 2018-09-07 10:02:52

Ever wondered how the returns on the Mutual fund investments are taxed based on tenure held by the investor? This article http://mfrepublic.com/tax-on-mutual-fund-returns/ will help you understand more about taxes levied on your holding based on the duration for two most commonly invested fund schemes viz., Equity Funds and Debt Funds.
State of JavaScript 2018 Survey
Tags: javascript, webdev, discuss
Published: 2018-09-07 09:44:06

---
title: State of JavaScript 2018 Survey
published: true
description: The 2018 version of the State of JavaScript survey is now out. It's a great chance for developers of all levels to weigh in and add their two cents.
tags: javascript, webdev, discuss
---

It's that time of year! The 2018 version of the [State of JavaScript](https://stateofjs.com/) survey is now out 🎉

It's a great chance for developers of all levels to weigh in and add their two cents on how they're using (and planning to use) JS each year. [Here's the Medium post by Sacha Greif](https://medium.com/@sachagreif/take-the-state-of-javascript-2018-survey-c43be2fcaa9), who is one of the survey's creators, with more information.

Interested to see what people are using and what comes back in the results!

What frameworks and libraries are you loving the most at the moment?
What do you do with your free time at work?
Tags: discuss, help
Published: 2018-09-07 08:59:38

---
title: What do you do with your free time at work?
published: true
description: What do you do with your free time at work?
tags: discuss, help
---

Sometimes I complete my daily tasks faster than I expect, getting a lot of free time. What do you do with your free time? I scroll memes and stuff, but that takes about 30 minutes, and I have ~2-3 hours left. And I don't really know what I could spend it on.
How to Manage the TOC of Articles on dev.to?
Tags: help, meta, markdown, toc
Published: 2018-09-07 07:25:51

---
title: How to Manage the TOC of Articles on dev.to?
published: true
description: How to manage the TOC of articles on dev.to?
tags: help, meta, markdown, toc
---

I know there is no current standard in Markdown to write Table Of Content, but does anyone knows a trick to do it on dev.to?
Could it work by using HTML anchors?
But how can I know the future URL of the article I'm currently writing?

Any help would be welcome :)
What's the most important factor to determine quality of an OSS Project ?
Tags: discuss
Published: 2018-09-07 06:41:26

---
title: What's the most important factor to determine quality of an OSS Project ?
published: true
description: 
tags: #discuss
---

When i look at a github project, i consider the number of closed Pull Requests to know if it's qualified or not for me to use or try it.

What about yours ?