teleren/devto huggingface dataset:
Anyone planning to register a .dev domain? Yes it's live!
Tags: dev, domains, tlds
Published: 2019-02-20 17:06:48

---
title: Anyone planning to register a .dev domain? Yes it's live!
published: true
description: 
tags: dev, domains, tlds
---
In case you missed the news, ".dev" domain name is live! Make sure you register one if you want to stand out and build an awesome profile! Registration is open as an 'expensive' early access program (EAP). Wait until 28th feb to get the base annual price.

More info:
https://get.dev/
https://www.blog.google/technology/developers/hello-dev/

Early Access Program (EAP) ending timer:
https://www.namecheap.com/domains/registration/gtld/dev/
Difference between a python module and a package
Tags: python, beginners, learning
Published: 2019-02-20 16:51:32

## Modules

Modules are single Python files that can be imported. Any python file can be a module. For example, if I have two Python files: `module.py` and `hello.py` in the same directory:

```python
# module.py

def hello(name):
    print("Hello {}".format(name))
```

I can `import` that module in my `hello.py`:

```python
#hello.py

import module

module.hello("World!") # Hello World!
```

The same can be done in the interpreter:

```bash
>>> from module import hello
>>> hello("World!") # Hello World!
```

## Packages

Packages are made up of multiple Python files (or modules), and can even include libraries written in different languages like C or C++. Seeing an `__init.py__` file in a folder typically tells you that that folder is a Python package. The `__init__.py` doesn't have to contain any code -- sometimes it does -- it just has to be there for Python take that particular folder as a package.

```
📁 my_package
    |- __init__.py
    |- module.py
```

```python
# __init.py__

from my_package.module import hello
```

When you import `my_package` in your script, the `__init__.py` script will be run, giving you access to all of the functions in the package. In this case, it only gives access to the `module.hello` function.
ES6 Arrow Functions
Tags: es6, javascript, webdev, codenewbie
Published: 2019-02-20 16:09:10

---
cover_image: https://thepracticaldev.s3.amazonaws.com/i/rslyxjjl3uyi7vd1oxuw.png
title: ES6 Arrow Functions
published: true
description: 
tags: es6, javascript, web development, CodeNewbie
---

They are next-generation JavaScript syntax for creating functions.

Normal JavaScript function syntax:

```
function myFunc() {
    ...
}
```

ES6 fat arrow function syntax:
```
const myFunc = () => {
    ...
}
```

## Why we prefer ES6 arrow functions?

They can shorten the JavaScript function syntax, since:
- Omits `function` keyword 
- Solves a lot of issue with `this` keyword in JavaScript. 
    - `this` keyword is important when we add method to an Object. 
    - Arrow Functions bind their context and not change in runtime so `this` actually refers to the
originating context.
  
## Practice time!

```
function printMyName(name) {
    console.log(name);
}
printMyName('Meggie'); //Meggie
```

Rewritten as:

```
const printMyName = (name) => {
    console.log(name);
}
printMyName('Meggie'); //Meggie
```

### We can also shorten the syntax more!

#### How?

- If we’re passing only one argument, we can omit the parenthesis too to shorten the syntax.

```
const printMyName = name => {
  console.log(name);
}
printMyName('Meggie');
```

Similarly, see another function -

```
const multiplyNum = num => {
    return num*2
}
console.log(multiplyNum(5)); //10
```

- If there’s only one line of code returning something, we can omit the curly braces `{}` and `return` keyword too, and bring the whole code in one line!

```
const multiplyNum = num => num*2;
console.log(multiplyNum(5)); //10
```

## Conclusion

ES6 arrow functions are a new cool way to write JavaScript functions in less lines of code.
![Happy Comic Face](http://adage.com/images/bin/image/spongebob_1.jpg)
Good job
Tags: beginners, rails
Published: 2019-02-20 16:08:36

---
title: "Good job"
published: true
description: Just when I was getting overwhelmed with the idea of programming every day and wondering if I was actually getting better at it, my mentor said "good job" 
tags: beginners, rails
cover_image: https://images.unsplash.com/photo-1518335935020-cfd6580c1ab4?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1500&q=80
---
How important are those two words especially coming from someone whose opinion you value? It was vital for me today, those two words "Good job!" coming from a friend and a mentor. 

I was having one of those days where I was getting rather overwhelmed today. With all the effort that I have been putting into learning programming, I was having that kind of a day where I was feeling incompetent. The question if I would ever get good enough was hovering and traumatizing me. I buzzed up my friend and asked if we could meet. My friend a software engineer by trade has been programming ever since I met him back when we were still kids. He had graciously offered to give some of his time to mentoring me whenever he could. There have been times when I have gone to him showed him my projects and he has helped me figure out concepts and given me coding tips. Never though had he said a good job or really given me the compliment of any kind. As a matter of fact, he has always pushed me and said there's a lot for you to learn mate, keep at it. 

Today, however, when he said it, it felt like I had really achieved something. Funnily, when I think about it, this "good job" from him did not come because I had mastered some algorithm or learnt about some data structure. As a matter of fact, it came from what I thought was me solving a minute issue. 

So I had been using the [will_paginate](https://rubygems.org/gems/will_paginate) gem the other day, and I had encountered an issue with the gem [will_paginate_bootstrap](https://rubygems.org/gems/will_paginate-bootstrap). For some reason, the gem was not being applied to my HTML file. After reading the documentation on the [homepage](https://github.com/bootstrap-ruby/will_paginate-bootstrap), I figured that since will_paginate_bootstrap gem was not being maintained it might not work with the latest Bootstrap 4, the version I had been using. So I opted to use the [bootstrap_will_paginate gem](https://rubygems.org/gems/bootstrap-will_paginate) instead, and it worked in an instant. 

As I related this what I thought was a minor victory of mine, he said "Good Job". Furthermore, he added, "much of programming in rails is about being able to figure out what gems will work for you and what won't." Until then, I did not think that figuring out something like this even counted as programming, but apparently it did. 

All of a sudden, I found this new vigour and if ever I needed a validation that I was doing well and I was learning - this was it.
React Round-Up Podcast: Using and Teaching React
Tags: podcast, react
Published: 2019-02-20 15:55:43

---
title: React Round-Up Podcast: Using and Teaching React 
published: true
description: Using and Teaching React 
tags: podcast, react
---

I was special guest in the [React Round Up podcast by devchat.tv](https://devchat.tv/react-round-up/rru-048-using-and-teaching-react-with-kay-ploser/)

This was my first podcast and we talked about teaching React and being a tech-book author.
Record Video of Your Android Screen with ADB
Tags: android, adb, video
Published: 2019-02-20 15:05:06

---
layout: post
title: Record Video of Your Android Screen with ADB
author: Michael Callaghan
tags: android,adb,video
feature: assets/img/android-1000x420.jpg
cover_image: https://walkingriver.com/assets/img/android-1000x420.jpg
canonical_url: https://walkingriver.com/record-video-of-your-android-screen/
comments: true
published: true
---
Recently I needed to record a demo video for one of my apps running on an Android test device, an older Samsung Galaxy S4. I had no idea how to do that. Camtasia for the Mac supports capturing live video directly from iOS devices out of the box, but not Android. What to do? The instructions in this article describe one simple solution, which should work on both MacOS and Windows.
<!--more-->

## Background
I've been working a lot lately on writing mobile apps using the [Ionic Framework](https://www.ionicframework.com). My goal is to be able to release apps for both iPhone and Android at roughly the same time. As part the submission process to both Google Play and the Apple App Store, it is required (or at least highly recommended) to submit a demo video of your app in action. That's easier said than done.

## Search
After a bit of searching, I found instructions on a few different sites. None of them had all of the steps I needed. So rather than trying to remember where I found everything, I figured I'd put all of the instructions in one place on my own blog so I could find it again easily.

## Prerequisites
* Android Debugging Bridge (adb) or Android SDK. If you are already doing Android
development, you probably already have one or both of these.
* USB to Phone cable (preferably the one that came with the device).

## Record the Screen
1. Connect the device to the computer via USB.
1. Open your favorite terminal emulator to the folder where you want the video to be saved.
1. Run the following command: `adb shell screenrecord /mnt/sdcard/Movies/test.mp4` (Change `test.mp4` to anything you want). You may see some warnings, but shouldn't receive any errors. I put the video in the standard Movies folder to make it easy to find on the device, in case I want to preview it before copying to my computer.
1. Use the phone for whatever you want to record. Everything you do will be saved to that file `test.mp4`.
1. Press Ctrl+C to stop recording.

## Copy the Video to your Computer
1. Enter the following command at the terminal: `adb pull /mnt/sdcard/Movies/test.mp4 .` The path here should match the one from the `screenrecord` command.
Make sure you include the trailing dot at the end of that command.
1. Use the video any way you wish.

There might be a better way to do this, but I'm cheap and this is free. I did find other methods, mostly paid apps. If you know of something simpler, please let me know here or on twitter. I'm @walkingriver
Who is hiring? (As of February 2019)
Tags: whoishiring
Published: 2019-02-19 18:58:31

---
title: Who is hiring? (As of February 2019)
published: true
description: Members of the dev.to community sharing open job opportunities at their companies.
tags: whoishiring
---

This is our monthly thread where community members share openings at their companies.

Here a few ground rules:

- Please only post if you are personally part of the hiring company (no recruiting firms)
- Please provide brief background on what your company does
- Only one post per company (you can list multiple openings in the post)

Consider using this template:

```
Company Name | Job Title | Location | Remote or Onsite | (optional) Salary Range | Sponsor visa?

About the company — background, size, etc (1-3 sentences)

About the role(s) — languages, requirements, etc (1-3 sentences)

Do you sponsor visas?

How to Apply — email or application link
```

---

We also wanted to share some quick careers-related notes from our fantastic Sustaining Sponsors.

### Digital Ocean

> At **DigitalOcean**, we're simplifying cloud infrastructure for developers. Here you'll get to work with some of the smartest and most interesting people around; solving unique and complex technical challenges on a scale matched by few companies. If you get excited about stretching yourself in new ways, developing yourself to your fullest potential, with amazingly supportive friends and colleagues; [we want to talk to you](https://www.digitalocean.com/company/careers/?utm_source=devto&utm_medium=display&utm_campaign=Devto_2018_Brand)!

### Triplebyte

> **Triplebyte** now hires software engineers for top tech companies and hundreds of the most exciting startups like Apple, Dropbox, Mixpanel, and Instacart. They identify your strengths from an online coding quiz and let you skip resume and recruiter screens at multiple companies at once. It's free, confidential, and background-blind. [Apply here](https://triplebyte.com/a/YU8fSn0/whoishiring-jan).

### GoCD

> **GoCD** is a free and open source CI/CD tool by ThoughtWorks. You can model your complex workflows, deploy to popular cloud environments such as Kubernetes, and visualize your end-to-end workflows — [download and use for free](https://www.gocd.org/download/).  While we don't have any open positions, there are many ways to [contribute to the community](https://www.gocd.org/contribute/).
14-Year-Old Security Hole Found in WinRAR
Tags: news, link
Published: 2019-02-20 14:36:43

_Details at [arstechnica](https://arstechnica.com/information-technology/2019/02/nasty-code-execution-bug-in-winrar-threatened-millions-of-users-for-14-years/):_

> "The vulnerability was the result of an absolute path traversal flaw that resided in UNACEV2.DLL, a third-party code library that hasn’t been updated since 2005. The traversal made it possible for archive files to extract to a folder of the archive creator’s choosing, rather than the folder chosen by the person using the program. Because the third-party library doesn’t make use of exploit mitigations such as address space layout randomization, there was little preventing exploits."
Most Popular Development Posts Of The Week (20 February 2019)
Tags: productivity, javascript, vscode, frontend
Published: 2019-02-21 11:41:28

---
title: Most Popular Development Posts Of The Week (20 February 2019)
published: true
tags: productivity,javascript,vscode,frontend
canonical_url: https://medium.com/daily-now/most-popular-development-posts-of-the-week-20-february-2019-534f2717485b
cover_image: https://cdn-images-1.medium.com/max/1024/1*eXFtAS_4GCBKqS1zg1juvA.jpeg
---

> The only thing worse than starting something and failing… is not starting something.

- [10 Things Every Programmer Should Know](https://app.dailynow.co/r/58dc6726c169b84985a8f39cac9612ca) by [javinpaul](https://medium.com/u/bb36d8439904)
- [8 New Features in JavaSvript ES2019](https://app.dailynow.co/r/79a6bb8b825dfb788f0034dfc5bd536a)
- [Why I Switched From Visual Studio Code To JetBrains WebStorm](https://app.dailynow.co/r/3a143050f2ccd80846c74a4902b31e04)
- [7 Benefits of Waking Up Early (That Have Nothing to Do With Being a CEO)](https://app.dailynow.co/r/4f151f95a50a6cb1669a5eab84880fa8) by [Ayodeji Awosika](https://medium.com/u/a66f89ac80ab)
- [5 Examples of What Great Documentation Looks Like for Developers](https://app.dailynow.co/r/ceccbcc7db30c6f3017b8649d4ac5814) by [Nnenna Ndukwe](https://medium.com/u/82fe2a8527b0)
- [Beautiful parallax 2019 edition](https://app.dailynow.co/r/87e674866437f437d3ccc0a2e86f676b)
- [The 7 Deadly Sins Of Programming](https://app.dailynow.co/r/9761fb44addade5ef6c776b4bc01603a) by [Nitin Sharma](https://medium.com/u/f611a0e36d9f)
- [7 JavaScript Playgrounds to Use in 2019](https://app.dailynow.co/r/ab076cf17c79bdc681bf80ed83fb5440)
- [Lessons learned in my 10+ years as a developer](https://app.dailynow.co/r/232e095a6ff9da6cb0e2b589eee4bb7a) by [Hüseyin Polat Yuruk](https://medium.com/u/e47f212f584d)
- [Alternatives to Photoshop](https://app.dailynow.co/r/e77aafe86fc54d11c58d5cf3eef330c4) by [Start Digital](https://medium.com/u/819c78c01fc7)

* * *

[_Thanks to Daily_](https://www.dailynow.co/) _developers can focus on code instead of searching for news. Get immediate access to all these posts and much more just by opening a new tab._

![](https://cdn-images-1.medium.com/max/1024/1*m8Uf-6F4Q5AOp_wW6tbKSQ.jpeg)
Bugs are Inevitable. Your Response is What Matters
Tags: software, bugs, support
Published: 2019-02-20 19:30:03

---
title: Bugs are Inevitable. Your Response is What Matters
published: true
tags: [software, bugs, support]
canonical_url: https://scottw.com/your-response
---

![Email Response](https://scottw.com/assets/images/posts/wasd_sorry.png)

Bug, defects, delays, etc will always happen. With good practices, you can minimize them, but they will always exist.

You can however control **how you respond to them**. This message from [WASD](http://www.wasdkeyboards.com/) is exceptional. <sup id="fnref:1"><a href="#fn:1">1</a></sup>

1. Accept fault
2. Apologize
3. Provide details and supporting information.

1. 

If you are following my [keyboard journey](https://dev.to/scottw/my-mac-mechanical-keyboard-search-36ih), interactions with WASD like this won me over. ↩︎
How do you create accurate quotes and stick to them?
Tags: discuss, help, productivity
Published: 2019-02-20 12:24:26

---
title: How do you create accurate quotes and stick to them?
published: true
description: What are some good ways for you or your team to make estimations for development work and to stick to those timings?
tags: discuss, help, productivity
---

Something that I and colleagues sometimes struggle with is creating accurate quotes / estimations / timings, *whatever* you call them. These quotes are *usually* given in hours or days, which is translated into an actual $$$ cost. The hard part is making them as accurate as possible, so that we don't let the **scope creep**, smash **past our budget** and end up having a very **awkward conversation** with a client.

It seems that they are two main ways to attack this; either you do whatever you can to understand as much **as possible about the task or project beforehand**, *or* you **intentionally leave some ambiguity and room** in the project and in the budget to allow for some wiggle room.

Both options seem to have positives and negatives, as with the *former*, it can be very difficult to lock down every possible eventuality that can arise with some clients. I can spend an hour, a day or a week on a specification sometimes and (apart from already haven taken up a week) I can still be blindsided by something that me or the client overlooked or that we understood would work differently.

The *latter* option however where we leave the project somewhat open-ended is a more difficult sell initially, and doesn't *really* seem to address the issue and help me to be more accurate.

I am addressing this problem from an agency standpoint. So the projects, clients and even tech can vary quite a bit. We do what we can to sell what we know best, but that is always evolving and changing.

I'd really be interested to hear what anyone else does in these sorts of situations or in similar circumstances!
What I plan to learn in 2019
Tags: typescript, react, cloudflareworkers, cssgrid
Published: 2019-02-20 12:22:46

---
title: What I plan to learn in 2019
published: true
description: In 2019 I plan to go deeper on some skills, and branch out a little
tags: TypeScript, React, Cloudflare Workers, CSS Grid
---

Another year, another set of new shiny technologies to entice you! At Cogent, we recently asked each other what we were planning to learn in 2019. Below is my list: you’ll find a mix of front-end and back-end technologies, as well as some marketing related one.

It’s tempting to learn anything that looks compelling and interesting in any way. I am trying to be a little more particular and choose things that have some maturity. Or things if new, that I think will be here to stay. 

One thing I’m keen to learn through is by teaching. To finally have a proper somewhat regular blog and make screencasts. I would start with a blog post, get feedback from people, then record a lesson or walkthrough to share on YouTube. 

When I was teaching junior programmers I felt like lots of my knowledge was strengthened by having to articulate concepts that I just took for granted. I’m curious how things work generally so will want to know, but there’s always something that I gloss over — “yep this just works, and I don’t care why or how to do my job”. So it was great to sit down and study these concepts and then explain them in a way that didn’t lead to 35 confused faces.

After wondering if I should focus a blog on a particular topic, I’m thinking I’ll just write about what I’m working on and not worry about if I’m not satisfying ‘web developers’ or whoever with every single post.

## What I plan to learn

- Cloudflare Workers and what they best suit
- Architecting apps well with the next-gen React
- Optimising web apps to be faster and leaner
- GraphQL
- Golang and what it best suits, maybe compiling it to Webassembly
- Google App Engine and Datastore
- Elixir and what it best suits
- Whether Gigalixir is worthwhile
- Maybe Websockets and what they best suit
- Will try CSS Grid again
- Probably more iOS App development
- Latest Swift changes
- Possibly machine learning
- How to run and launch open source projects
- Marketing
- How to plan and write and record screencasts — after teaching I find presenting to a group of people much easier and engaging for me than sitting down and cranking out words
- How to not over engineer my blog and use something boring like Wordpress

## What I plan to *not* learn

I find it helpful to have a **no** list too:
- Not Reason
- Not Rust
- Not Android
- Probably not React Native unless for a project, then yes
- Less Node.js
- Not Electron

I often made ‘no’ lists when teaching for what would *not* be covered, as it helped to focus the lesson.

What are you planning on learning in 2019? Let me know via comments or Twitter!
PERFORMANCE OF JVM VS NATIVE VS THE WORLD
Tags: java, node, go, performance
Published: 2019-02-20 10:32:57

---
title: PERFORMANCE OF JVM VS NATIVE VS THE WORLD
published: true
description: Performance tests in several basic scenarios to estimate languages runtime performance
tags: java, nodejs, go,performance
---

Lately I was trying to understand 
[how virtual memory works](https://manybutfinite.com/post/how-the-kernel-manages-your-memory/)
 and [how JVM work and perform] (https://www.ibm.com/developerworks/library/j-nativememory-linux/).
My intuition was ' if a JVM is written in C, it is probably less performant than C '
So after a lot of reading and investigations I found out that the story is much more complicated then I have initially thought.
JVM has many optimization which makes it very fast most of the time, it does has an overhead but the optimization in JIT make everything worth it.
basically the JVM will loaded into native virtual memory (and be shared with other processes when possible)
it will use sophisticated algorithms to allocate memory on the native heap to create managed heap.
it will JIT to perform well, will vectorise  actions and what not to make the run time overhead worth it.
At that point I was thinking ' OK, so javascript is a VM, it should probably also perform well '
But [benchmark tests online showed different things] (https://www.techempower.com/benchmarks/#section=test&runid=8ca46892-e46c-4088-9443-05722ad6f7fb&hw=ph&test=plaintext). I know javascript is single threaded but this tests take this into account (For example fork many process).
The V8 engine is highly optimized and [make all kind of clever things] (https://blog.sessionstack.com/how-javascript-works-inside-the-v8-engine-5-tips-on-how-to-write-optimized-code-ac089e62b12e) to perform faster, for example making a behind the scene classes and types and caches to speed up the execution.
V8 is still young compared to C and Java so I am sure it will be even better. my impression is that optimizing a dynamic language such as javascript is harder than a language like java, but I might be wrong here.

Any way I thought that I have to make my own test to better understand the performance difference in various situations, so here it is, [my results](https://github.com/benchuk/performance_tests)

1. ​java and node win when performing loops and in memory

2. c and go win as of for reading file from disk to memory

3. java wins in http server


hope you will find this info helpful!

Comments are more the welcome.

I also have a blog with other interesting stuff:

https://www.2bitornot2bit.com/blog