teleren/devto huggingface dataset:
deps JS - Keep your JavaScript dependencies secure and up-to-date
Tags: showdev, npm, javascript, node
Published: 2018-12-04 17:38:38

---
title: deps JS - Keep your JavaScript dependencies secure and up-to-date
published: true
description: Keep your JavaScript dependencies secure and up-to-date
tags: #showdev #npm #javascript #node
---

This is something I've been working on over the last month.

[deps JS](https://depsjs.xyz/) analyses a package.json to show you when your dependencies are out of date. 

It also generates status badges that can be added to your README.


It's built with [React](https://reactjs.org/) and [Fastify](https://www.fastify.io/).

Let me know what do you think. :)
AoC Day 4: Repose Record
Tags: adventofcode, discuss
Published: 2018-12-04 16:19:28

---
title: "AoC Day 4: Repose Record"
published: true
description: Day 4 is using trickery to figure out overlapping elf sleep schedules.
tags: adventofcode, discuss
cover_image: https://thepracticaldev.s3.amazonaws.com/i/98sv177jbhpe8mmcfjh7.png
series: Advent of Code
---

[Day 4 is here!](https://adventofcode.com/2018/day/4)  Our first puzzle launched on a weeknight.  Hopefully, we're able to keep up this pace!

Today's challenge makes me feel *very* much like a secret agent as we observe elfy guards falling asleep on duty: figuring out who is sleeping, when, and how much.

I haven't even started this challenge yet (hoping to get to it this evening or maybe at lunch), but I wanted to get the post up for everybody else to share their solutions.

Good luck!
Is it just me or is Microsoft really crushing it lately?
Tags: discuss, microsoft, github
Published: 2018-12-04 15:37:21

Yes, the stock keeps rising

![](https://cl.ly/b2db4ca0dfce/Image%202018-12-04%20at%2010.38.22%20AM.png)

But lots of companies have rising stocks.

I feel like Microsoft, in the past year or so, has been really positioning themselves as the foremost technology company in the world. Their developer relationships have to be at an all-time high. With GitHub and VSCode to go along their cloud business, their hardware, their operating system, their browser, etc.

They're a diversified professional networking company with their acquisition of LinkedIn, and GitHub only added to this position.

Microsoft seems well-liked, executing well, and well-positioned in _many_ important tech sectors. I'm fairly blown away at the progress.

Thoughts?
Explain Distributed Systems Like I'm Five
Tags: explainlikeimfive, computerscience, distributedsystems
Published: 2018-12-04 15:19:35

_This is an anonymous post sent in by a member who does not want their name disclosed. Please be thoughtful with your responses, as these are usually tough posts to write. Email sloan@dev.to if you'd like to leave an anonymous comment._


I hear this term a lot, but I'm not always sure what exactly it is referring to.
Top 5 DEV Comments from the Past Week
Tags: bestofdev
Published: 2018-12-04 14:52:00

---
title: Top 5 DEV Comments from the Past Week
published: true
description: Highlighting some of the best DEV comments from the past week.
tags: bestofdev
cover_image: https://res.cloudinary.com/practicaldev/image/fetch/s--7VrAA2ln--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://thepracticaldev.s3.amazonaws.com/i/qmb5wkoeywj06pd7p8ku.png
---

This is a weekly roundup of awesome DEV comments that you may have missed.  You are welcome and encouraged to boost posts and comments yourself using the **[#bestofdev](/t/bestofdev)** tag.

One of the most popular discussions this week was the **[What was your worst interview experience?](https://dev.to/sergio/what-was-your-worst-interview-experience-4d4n)** thread.  @avalander hopped in with a truly brutal interview recap:
{% devcomment 770p %}

In a heavily-bookmarked article entitled **[5 CSS tips you didn't know you needed](https://dev.to/lynnewritescode/5-css-tips-you-didnt-know-you-needed-nb3)**, @quantumsheep adds another useful tip:
{% devcomment 77oo %}

The parent comment in **[What is the future of software development pay range?](https://dev.to/ben/what-is-the-future-of-software-development-pay-range-13ff)**  describes a potential future where the coding profession eventually becomes so popular that wages fall substantially ([full comment](https://dev.to/leightondarkins/comment/7755)).  @davidk01 offered a rebuttal:
{% devcomment 7768 %}

@canderson93 jumped into a [#help](/t/help) thread — **[Why function deceleration overrides](https://dev.to/yashwanth2804/why-overriding-function-declaration---36n5)** — to provide an explanation and some useful context:
{% devcomment 78f7 %}

Finally, @nepeckman shared some information about [Nim](https://nim-lang.org/) in the **[What language should I use in 2018 if I want to ~easily~ compile a single binary for the end-user?](https://dev.to/sergio/what-language-should-i-use-in-2018-if-i-want-to-easily-compile-a-single-binary-for-the-end-user-1npe)** discussion thread.  This has got me craving more "advocate for this language" comments/articles:
{% devcomment 78k8 %}

See you next week for more great comments ✌
Fight climate change with better software
Tags: technology, programming, webdev
Published: 2018-12-04 14:43:10

---
title: Fight climate change with better software
published: true
description: Software causes 2% of global CO2 emissions. How much of those can be saved by better software?
tags: aws, technology, programming, webdev
---

Who here thinks about **Energy wasted by bad Software** when programming? I did during the last couple of days and here‘s what I found out:

# Software and Energy

The link between software and energy is not easily visible, only few companies such as https://www.getflyweight.com/ target it directly, yet it is there. For example: A single [google search releases 0.2g CO2 into the atmosphere](https://googleblog.blogspot.co.uk/2009/01/powering-google-search.html). Enough energy to power a lightbulb for 16 seconds.

If global Information and Computer Technology was a country, only US and China would consume more energy. Yale even calls them [energy hogs](https://e360.yale.edu/features/energy-hogs-can-huge-data-centers-be-made-more-efficient).

![](https://e360.yale.edu/assets/site/_1500x1500_fit_center-center_80/Greenpeace_Data-Center_GP0STQFLK_PressMedia_web2.jpg)

The [Guardian reports](https://www.theguardian.com/environment/2017/dec/11/tsunami-of-data-could-consume-fifth-global-electricity-by-2025) that by 2025 ICT could use 20% of global electricity and releasing more CO2 than shipping or aviation.

# Improving Hardware is Hard

To fight this trend, data centers increased their [Power Usage Effectiveness](https://en.wikipedia.org/wiki/Power_usage_effectiveness). In the past PUE has dropped from 2-3x to 1.1x, with 1.0 being the best possible value.

Still, energy consumption is on the rise. [Google nearly doubled their electricity consumption](https://storage.googleapis.com/gweb-sustainability.appspot.com/pdf/Google_2018-Environmental-Report.pdf) in the last 5 years

![Google 2018 Sustainability Report Screenshot](https://thepracticaldev.s3.amazonaws.com/i/ezijl83628bzwluyxbdi.jpeg)

Similarly, conventional CPUs are trapped within the [limits of moores law](https://www.weforum.org/agenda/2018/09/end-of-an-era-what-computing-will-look-like-after-moores-law/) leaving only little room for improvement

![](https://thepracticaldev.s3.amazonaws.com/i/n8ef46h9yzgb9tr6iv9p.png)

# Stop Software Waste

Software however, has never been more wasteful. As was pointed out by http://tonsky.me/blog/disenchantment/ and [XKCD](https://xkcd.com/2021/).

![Software Development](https://imgs.xkcd.com/comics/software_development_2x.png)

Saving energy with software can be as easy as making sure your code has been compiled correctly. In an experiment comparing re-compiling SQLite vs. the downloaded binary, the **energy consumption was cut in half** and **performance was improved by 13%**.

Therefore, fight software waste! Optimize performance, cut costs and do good by saving IT energy. Learn about lightweight protocols and libraries, make a code fatcamp, declare performance as a development goal and profile regularly. If you want to know more, reach out to me or visit https://www.getflyweight.com/
Apache Hadoop YARN - “Vulnerability” FUD
Tags: bigdata, apache, hadoop, yarn
Published: 2018-12-10 20:52:19

---
title: Apache Hadoop YARN - “Vulnerability” FUD
published: true
tags: bigdata,apache,hadoop,yarn
canonical_url: https://risdenk.github.io/2018/12/04/apache-yarn-vulnerability-fud.html
---

### Overview

There are reports of an [Apache Hadoop YARN](http://hadoop.apache.org/docs/stable/hadoop-yarn/hadoop-yarn-site/YARN.html) “vulnerability” but want to share some more details that have missed the few articles I’ve come across. Here are a few of the articles/links:

- [https://www.extrahop.com/company/blog/2018/detect-demonbot-exploiting-hadoop-yarn-remote-code-execution/](https://www.extrahop.com/company/blog/2018/detect-demonbot-exploiting-hadoop-yarn-remote-code-execution/)
- [https://github.com/vulhub/vulhub/blob/master/hadoop/unauthorized-yarn/exploit.py](https://github.com/vulhub/vulhub/blob/master/hadoop/unauthorized-yarn/exploit.py)

### Demonbot vulnerability requires an **unsecure** cluster

The key point I want to make is that the report misleads the reader to assume that all Apache Hadoop YARN environments are insecure. This is **false**. The clusters described have no security and are akin to having your front door unlocked. Kerberized clusters are secure since they require a valid user account to be usable. Furthermore, clusters should not be exposed to the internet for most usecases (especially not endpoints that allow for remote job submission).

### Explain the “vulnerability” like I’m five

Imagine that one day you get home and find a whole bunch of extra lamps plugged into your outlets. You are annoyed because the lamps are using your electicity. You remember that you forgot to lock your door when you went on vacation. Instead of someone stealing stuff from your home, they decided to plug in lamps.

Now you might be thinking, it is expected that something bad would happen if you left your door unlocked when you went on vacation. This is the exact same thing as an unsecure Apache Hadoop YARN cluster. No one should leave their cluster unsecured and exposed to the outside world.

### Conclusion

There have been multiple reports of “big data” endpoints being exposed to the internet and not being secured. This has affected Elasticsearch, Mongodb, and others. There is no reason to expose a cluster to the internet without security. Cloudera wrote a blog post that covers the same topic as well [here](https://blog.cloudera.com/blog/2018/11/protecting-hadoop-clusters-from-malware-attacks/).
React Barcamp Cologne 2019
Tags: react, barcamp, event
Published: 2018-12-04 12:38:31

---
title: React Barcamp Cologne 2019
published: true
description: React Barcamp in Cologne on the 26th and 27 January 2019
tags: #react #barcamp #event
---

On the 26th and 27th January 2019 we will organize the first React Barcamp in Cologne. This event is for everyone who works with React and has the desire to share his knowledge and experiences with others and wants to learn new things from his fellow React devs. If you are interested feel free to join us here: 
[React Barcamp Cologne](https://react-barcamp.de/ "React Barcamp")
Work hard to make things simple
Tags: development, ux, requirements, userexperience
Published: 2018-12-04 13:22:32

---
title: Work hard to make things simple
published: true
tags: development,ux,requirements,userexperience
canonical_url: https://craignicol.wordpress.com/2018/12/04/work-hard-to-make-things-simple/
---

![](https://craignicol.files.wordpress.com/2017/05/dsc_0531.jpg?w=187&h=105)<figcaption>Bowling Alley</figcaption>

“Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.” ERNST F. SCHUMACHER

> "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction." ERNST F. SCHUMACHER
> 
> — Quite Interesting (@qikipedia) [January 8, 2018](https://twitter.com/qikipedia/status/950306092323692544?ref_src=twsrc%5Etfw)

<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

It’s easy to write software. Ask users what they want (or even better, observe them and discover their problems), find a clean, user-friendly solution, build it and deliver it, for free, with no ads.

And you make a success of it, so you add more features to see off the competition, or to disrupt a new market. Google built Gmail, then added automatic categories, and Smart Replies to make it easier to process your messages. And they also added Wave, Buzz, Google+, Talk and others, to demonstrate other ways to connect and communicate, for places where email doesn’t work so well. So many new features, new things to learn, spinning out from that new core.

And yet Gmail remains popular, the rest, not so much.

It’s easy to add features. With a bit of work, you can even add them seamlessly without adding another menu option that your users will never see.

But what’s your plan to remove options, to streamline your code? How do add a new feature that’s easily discoverable and useful? [How can you be smart and subtle?](https://craignicol.wordpress.com/2016/04/15/smart-is-subtle/)

What is your simplification strategy?
You might be sending to many API requests! Here is how to fix it (FAST) with RxJS!
Tags: typeahead, rxjs, angular, search
Published: 2018-12-04 11:42:50

---
title: You might be sending to many API requests! Here is how to fix it (FAST) with RxJS!
published: true
tags: typeahead, rxjs, angular, search
---
{% youtube HfVTp4yo12A %}
How to write a bug report?
Tags: bugreport, softwaredevelopment
Published: 2018-12-05 07:39:30

---
title: How to write a bug report?
published: true
tags: bugreport,software development
canonical_url: https://howtosurviveasaprogrammer.blogspot.com/2018/12/how-to-write-bug-report.html
---

This one is not a real blog post, just something short what came into my mind and what I wanted to share with you.

  

Unfortunately I have really bad experience with the bug reports I'm receiving. I often receive things like this:
  

- "The software is not working" => OK nice, what does it mean not working? Did you forget to start it?
- "I can not click on the button" => Your mouse is not working or what?
- "It is not saving the file"

In case of such bug reports it can take hours to figure out what you really meant and to reproduce it. So it is just a waste of time and you also need to wait longer for your bug fix.

Instead of that please try to specify all details regarding how to reproduce your bug and why is its behavior not normal?

  

A bug report should always contain the following information:

- Which working environment do you have (hardware, which operation system, other relevant software (ex. browser in case of web application)) etc.
- Which configuration/settings of the software are you using?
- What are the steps to reproduce the issue (really from starting the software, please)?
- What is the behavior you would expect here?
- What is the current behavior (which is of course not the same as the expected one, that's why it's called bug)?

If you are reporting your bugs in such a way the developer who will work on that will be happier and your bug will be fixed faster!

  

Thanks!

http://howtosurviveasaprogrammer.blogspot.com/
How do you track small projects and measure success?
Tags: discuss, productivity, tips
Published: 2018-12-04 11:33:23

---
title: How do you track small projects and measure success?
published: true
tags: discuss, productivity, tips
---

In my team we do a lot of proof-of-concept work around new technologies and ideas, but recently we're running into the issue of controlling the scope of these projects. 

For some background the team has changed recently, some of the more senior staff have moved to different teams and we're now getting more junior staff still in training coming in for rotations. 

Everyone is interpreting the loose and flexible system we use to track these projects a bit differently, which is leading to some people running away with ideas weeks at a time.

---

So I'm challenging myself to overhaul it and I've started looking at a few different ideas to implement over the last few days. The one standing out to the most for my first iteration are Test Cards, these are an single page document that has a couple of fields;  

- Hypothesis - What we're looking to test 
- Test - How we're going to test this out 
- Metric - How we're going to measure it 
- Criteria - What success looks like 

There's other important fields too; how critical this research is, a rough timescale, and potential cost.

If this pans out I might even write about it!

---

This has got me thinking though, how do other teams manage experiments, proof-of-concepts and researching new tech? 

How do you folks do it? Any horror stories or ideas? Or even any feedback on my thinking so far?
Installing WordPress 5.0 RC2 is almost the same to that of 4.9.8
Tags: wordpress
Published: 2018-12-04 10:57:22

---
title: Installing WordPress 5.0 RC2 is almost the same to that of 4.9.8
published: true
description: According to WordPress.org, the second release candidate of WordPress 5.0 was released on November 30, 2018. I tried to install it today and found the installer was almost the same to that of WordPress 4.9.8. This post will show all the screenshots.
tags: wordpress
---

## Intro

[According to WordPress.org](https://wordpress.org/news/2018/11/wordpress-5-0-rc2/), the second release candidate of WordPress 5.0 was released on November 30.

I tried to install it today and found the installer was almost the same to that of WordPress 4.9.8.
This post will show all the screenshots.

<center>✿ ✿ ✿</center>

## Steps (Screenshots)
 
*\* Note: The domain name is omit from urls in the screenshots.*

#### Language Setting (Is Required)

![screenshot](https://thepracticaldev.s3.amazonaws.com/i/4f4g8hbvclwgetibm6ds.png)

#### Welcome & Readme

![screenshot](https://thepracticaldev.s3.amazonaws.com/i/52nqnovgeurymk9rr18c.png)

#### Database Information (Is Required)

![screenshot](https://thepracticaldev.s3.amazonaws.com/i/3jmloqrtxdm6dm3st1cr.png)

#### Confirmation

![screenshot](https://thepracticaldev.s3.amazonaws.com/i/x2qhvbzj5d7ddzcmh9iv.png)

#### Site Information (Is Required)

![screenshot](https://thepracticaldev.s3.amazonaws.com/i/g7t4qk7vptdddyn4qyq6.png)

#### Completion

![screenshot](https://thepracticaldev.s3.amazonaws.com/i/rdnz96l040mv5p9telcu.png)

#### Login Page

![screenshot](https://thepracticaldev.s3.amazonaws.com/i/7it8iedysn13e7mga9pq.png)

<center>✿ ✿ ✿</center>

## Outro

Althogh the installer of WordPress 5.0 RC2 is almost the same to that of 4.9.8, the "post-new" style of Gutenberg, the WordPress's new editor, is fairly different.

![screenshot](https://thepracticaldev.s3.amazonaws.com/i/h52oz1omztrvhblfdin9.png)

Its block-type style reminds me of [Elementor](https://elementor.com/), the elegant page builder : )

Also, I wonder if it is more difficult for those who are unfamiliar with programming than WordPress 4.9.8 at least while there are little information about how to use it.
Confuzed Beginner
Tags: help
Published: 2018-12-04 10:02:19

---
title: Confuzed Beginner
published: true
description: This place seems friendlier then stackoverflow
tags: help
---
Hi everyone 👋 I am new here, and really struggling with my new project. It is 5am so I will keep this short. 

Last I built this side project using Wordpress last year <a href="https://www.cryptocoinresources.com">CryptoCoinResources.com</a> 

I am trying to build a version 2 with Product Hunt like functionality 

I am currently using the following:

SailsJS
VueJS
Undecided on DB but I am comfortable with Firebase/s3

I am wondering if there is an easier 'stack' / approach. 

I want the site to have the basic functionality of PH, upvotes, login, submissions, follows, etc. 

Thank you in advance for your help.😊
Episode 12: Building a JSON API - User Authentication in Under an Hour
Tags: node, mongodb, javascript, passportjs
Published: 2018-12-04 10:01:44

---
title: Episode 12: Building a JSON API - User Authentication in Under an Hour
published: true
description: Episode 12 covers adding "local" user authentication to your application with passport.js
tags: nodejs, mongodb, javascript, passportjs
series: building-a-json-api-with-express
cover_image: https://thepracticaldev.s3.amazonaws.com/i/vykvkaw8ohgh4ylgqh33.png
---

Grab a cup of coffee, maybe two.

In this episode we add local-user authentication (username, password) to our JSON API in under an hour with help from `passport.js`, `jwt`, and a strong dose of patience.

{% youtube DTGCta_1nGQ  %}

This episode had so much, I almost broke it up several times while editing as it felt like it was too much. However, having an incomplete basic solution at the end of several episodes also felt wrong, so here we are. One hour later, one authentication enabled api.

Thanks for watching! 

Source code:

{% github NathanBland/core %}
Build Web APIs with Aqueduct #2 (video series)
Tags: dart, api, webdev, beginners
Published: 2018-12-04 10:00:02

In this article we will look at routing in further detail, building an endpoint capable of performing CRUD(_create, read, update, delete_) operations. We will make use of `Router` and `Controller` classes in the handling of requests made to our endpoint.

Here's the second video in the series:

{% youtube K4EqGjMjCY0 %}
→ [**Watch on YouTube**](http://aqueduct-tutorial-2)

---

## What is a Router?

Routers capture the request by path and forwards it to a `Controller` using a `link` method for resolution or a `linkFunction` to implement middleware functionality to handle the request.

Here's what it looks like:

```dart
final router = Router();

router.route('/path-1').link(() => Path1Controller());
router.route('/path-2').linkFunction((Request req) async {
  return Response.ok('Hello, World!');
});
```

The path is passed as an argument when `route()` is invoked, and can also accept route parameters:

```dart
router.route('/path-1/:name').link(...);
router.route('/path-2/[:name]').linkFunction(...); // wrapping in square brackets means its optional
```
So with this snippet whatever is passed in the path segment after `/path-1/` is captured in `name` path variable:

```dart
router.route('/path-1/:name').linkFunction((request) async {
  final name = request.path.variables['name'];
  return Response.ok('Hello, $name');
});
```
See how routers and controllers work in this [**video**](http://bit.ly/aqueduct-tutorial-2).

→ [**Get the source code**](https://github.com/graphicbeacon/aqueduct-tutorial/tree/part-2)

---

**Subscribe to [my YouTube channel](http://bit.ly/fullstackdart)** for more videos covering various aspects of full-stack web development with Dart.

**Like, share and [follow me](https://twitter.com/creativ_bracket)** 😍 for more content on Dart.

## Further reading
* [**Handling HTTP Requests**: Overview](http://aqueduct.io/docs/http/)
* [**Free Dart screencasts on Egghead.io**](https://egghead.io/instructors/jermaine-oppong)