teleren/devto huggingface dataset:
Do I really want to write a Google Keep tool?
Tags: googlekeep, javascript, selenium
Published: 2019-07-17 03:27:49

---
title: Do I really want to write a Google Keep tool?
published: true
description: Still no public API for Google Keep
tags: google-keep,javascript,selenium
---
After writing so many wrappers and so many scraping tools over the last few years, I'm now asking myself: "Do I really want to write tools for [Google Keep](https://keep.google.com)?" There's been a few folk calling for a Google Keep API but nothing has materialized as yet (AFAICT.)

I do use Keep a lot as a general catchall for interesting web content. Mind you, I use [Pocket](https://app.getpocket.com/) as well. And [PearlTrees](https://www.pearltrees.com/). And [Zim](https://zim-wiki.org/). 

Fiddling with my Keep collection in [Firefox Developer](https://www.mozilla.org/en-US/firefox/developer/) sees me trying to spot some structures that could be targeted in [Selenium](https://www.seleniumhq.org/). One item of interest is via `document.querySelectorAll(".RNfche")`. At this point I don't know if the RNfche class is specific to my collection or to everyone's, but it's on every containing DIV. The number of results of the querySelectAll() increases as one scrolls down the page. Thus, to find every one of them one would have to script Selenium to scroll right down to the bottom of the collection before pulling up the list of `RNfche`-class elements.

Can I really be bothered?
Top 5 DEV Comments from the Past Week
Tags: bestofdev
Published: 2019-07-17 01:58:11

---
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.

Chiming in to the **[How is your portfolio built?](https://dev.to/iam_timsmith/how-is-your-portfolio-built-49g9)** thread, @sureshmurali29 shows off a super-slick site:
{% devcomment cnk9 %}

The story of everyone's Twitter feed this weekend was the "10x Engineer" conversation.  Hopping in to **[The 10 points that make up real "10x engineers"](https://dev.to/turnerj/the-10-points-that-make-up-real-10x-engineers-4mj4)** @thatjoemoore provides some great points:
{% devcomment d1kj %}

**[Will software ever become "blue collar" work?](https://dev.to/ben/will-software-ever-become-blue-collar-work-4aef)**  @theringleman offers a great reply:
{% devcomment d2o4 %}

This was a more explicitly-technical thread with a very helpful reply.  Responding to **[Why (! + [] + [] + ![]).length is 9](https://dev.to/tomasforsman/why-length-is-9-2i4l)**, @tpenguinltg offers some additional thoughts:
{% devcomment d2mf %}

Finally, responding to **[Which computer era would have been the most exciting to take part in?](https://dev.to/ben/which-computer-era-would-have-been-the-most-exciting-to-take-part-in-47mn)**, @thomasjunkos provides wonderful perspective about the here and now:
{% devcomment coe2 %}

See you next week for more great comments ✌
Simplify reduce accumulator function code
Tags: javascript
Published: 2019-07-17 01:38:21

---
title: Simplify reduce accumulator function code
published: true
description: How to write simpler reduce functions in single line
tags: javascript
---

### Problem:

Consider a very simple reducer example : Find the sum of all elements in an array . 
```js
  const sum = [1, 2, 3, 4, 5].reduce((total, currentValue) => {
    total += currentValue;
    return total;
  }, 0);
```
OR 
```js
  const obj = [['a', 4], ['b', 3], ['c', 6]].reduce(
    (accumulator, currentValue) => {
      accumulator[currentValue[0]] = currentValue[1];
      return accumulator;
    },
    {}
  );
```
_(These are just simple example for easy explanation, there are simpler ways to write them, for ex: second one can be replaced by `Object.fromEntries`)_

My code base almost always have single line function expressions except for the reduce function. I never liked it until I found a way to write it in single line 

### Solution 1: Spread operator

The second code snippet can be refactored using spread : 
```js
  const obj = [['a', 4], ['b', 3], ['c', 6]].reduce(
    (accumulator, currentValue) => ({
      ...accumulator,
      [currentValue[0]]: currentValue[1]
    }),
    {}
  );
```

But this might affect the performance, hence not suggested. 

### Solution 2 : Comma operator

I came across this wonderful comma operator while reading the blog [The JavaScript Comma Operator](https://javascriptweblog.wordpress.com/2011/04/04/the-javascript-comma-operator/) by Angus Croll. 

Comma operator can be used to write multiple expressions in single line. The above code snippets can be refactored to : 

```js
  const sum = [1, 2, 3, 4, 5].reduce(
    (total, currentValue) => ((total += currentValue), total),
    0
  );
```

```js
  const obj = [['a', 4], ['b', 3], ['c', 6]].reduce(
    (accumulator, currentValue) => (
      (accumulator[currentValue[0]] = currentValue[1]), accumulator
    ),
    {}
  );
```

This works on the principle that `(expr1 , expr2)` evaluates each expression left to right and returns the last expression value. 

_P.S.: This is purely to demonstrate the beauty of comma operator and for aesthetic purposes only with no real value for performance (IMHO). In fact, the original code should be preferred as it is more readable_
A funny rap song about tech conferences
Tags: showdev, discuss, culture
Published: 2019-07-17 00:15:22

---
title: A funny rap song about tech conferences
published: true
description: https://www.youtube.com/watch?v=6JSe1yKTjX0
tags: #showdev, #discuss, #culture
---

Song url: https://www.youtube.com/watch?v=6JSe1yKTjX0

Quick background on the project: I'm a full time programmer and I love making rap music. I see a lot of humor in the profession/industry, and thought it would be fun to combine the two.

I'm always open to feedback and collaboration (currently in CO, would love to work with a videographer to make a music video)!
A Frame Of Reference
Tags: career
Published: 2019-07-16 22:55:31

Being a software professional for a living is a bit like driving at night. You can only see as far ahead as your headlights. Whether that's your next move in your career, the next language/framework trend, or the industry shifting direction, relevancy hits us like a truck.

One thing I like to keep near me on my desk is a picture of my daughter and wife, they help me remind myself of the life I want. Whenever I'm thinking about the next thing I should work on, no matter how big or small, I take a look at this picture frame and I'm reminded of my why and figure out my next steps as I go.

As I'm tackling my next steps, **I'm doing it one step at a time.** I like to remind myself that there is a  small amount of people **who know what they are actually doing.** Those who really know what they're doing, have already done it before and know what works for them. For me, taking that first step is the most intimidating. It sets my compass in a direction where I want to thrive in.

I know that the first iteration of this next thing is typically my **shitty first iteration.** This is where I let every idea pour out on paper regardless of how bad or good the idea is. I simply want to exhaust myself of ideas so it's easier to focus on the actual work to be done.

It's taken me many years to become comfortable with this. I'm finally at the point where I know that **no one will see this work, and I can shape it later.** Everything good begins with terrible first efforts. You need to start somewhere, and you can start today by doing something...anything...and just being okay that it exists although it's not perfect.

The **main obstacle between you and your shitty first iteration is perfectionism**. Perfectionism will stop you completely in your tracks. It will ruin your code, block your inventiveness, kill your creativity, and ultimately your life. Perfectionism is our mechanism to prevent ourselves from getting hurt or disappointed. 

Perfectionism is a hard thing to conquer. You'll want to make sure you've tied every loose end before shipping something to the public eye. Just know that once you get comfortable with the gift of imperfection, then you truly conquer it.

**Jon Douglas** writes at [jondouglas.dev](https://jondouglas.dev), where he writes about better habits, deep work, software development, and improved health for Software Professionals. You can [read his articles](https://jondouglas.dev/blog/) or [join his free newsletter](https://jondouglas.dev/free-newsletter/) for new content every week.

This article was originally published on [jondouglas.dev](https://jondouglas.dev)
Being a member of a remote team
Tags: discuss, freelance, remote, beginners
Published: 2019-07-17 00:11:30

I've been seeing a lot of listings for remote and freelance jobs. I'd like to know, how difficult is it working remotely and still being part of a team? Is that even possible? I assume that without complete autonomy with your code, that it's hard to keep a team dynamic or even keep your job. I'd like to hear what you have to say.
Welcome to the Big Thread Club, Tim Smith. You are the latest winner of the Big Thread Badge. 🎉
Tags: meta, bigthreadbadge
Published: 2019-07-16 23:30:26

Tim joins @fullstack_to, @espoir, @helenanders26, @philnash, @florinpop17 and @lauragift21 in the club as the fourth winner of this badge.

{% user iam_timsmith %}

The Big Thread Badge is awarded to the person who creates a discussion thread on the site that sparks the most collective comment love (e.g. score as determined by total ❤️ reactions and adjacent ranking factors).

This was Matthias's thread:

{% link https://dev.to/iam_timsmith/how-is-your-portfolio-built-49g9 %}

Entry is simple: Start a thread that is bound to spark a lot of comments. Ask the community to tell a certain kind of story and get lots of comments! Even if these threads aren't always answering _the deep questions_, they are often great for seeing what the broader community thinks of a topic and are usually a lot of fun!

Use the #discuss tag to signal that the post is a discussion thread.

{% tag discuss %}

_DEV employees are not eligible for the Big Thread Badge. 🙂_

## **The International Streak Continues**

This marks 7/7 winners that have gone to folks from a different country. It highlights the global diversity of our community of folks helping one another out. How long will the streak continue? Oceania, Europe and Africa each have two winners with one from North America.

## **Happy Coding!**
API de Votaciones Argentinas 🇦🇷
Tags: datosabiertos, argentina, opendata, votaciones
Published: 2019-07-17 17:46:43

---
title: API de Votaciones Argentinas 🇦🇷
published: true
tags: datos-abiertos, argentina, opendata, votaciones
cover_image: https://thepracticaldev.s3.amazonaws.com/i/1dlw6p7w2sqd05l3j5cm.png
canonical_url: https://nahuelhds.dev/datos-abiertos/2019/07/16/Votaciones-Argentinas-API-Un-ID-para-el-Congreso.html
---

Acabo de publicar [Cómo Votó](https://www.comovoto.com.ar/). Por ahora es simplemente un API disponibilizado para consultas. No requiere autorización y [está documentado](https://www.comovoto.com.ar/docs/#general) lo suficiente como para que cualquier nerd que haya manejado APIs en algún momento de su vida, pueda interactuar con ella. 🤓

![Pantalla de bienvenida del proyecto](https://nahuelhds.dev/img/comovoto.com.ar.png)Pantalla de bienvenida del proyecto

**El proyecto está en estado alpha** por lo que es inestable y va a sufrir cambios; pero lo interesante es que ya puede utilizarse para generar consultas rápidas y hacer aplicaciones o clientes web con esta información. 🎉🎊🥳

Podés leer más sobre parte del proceso de elaboración del API en el post original, acá:
[https://nahuelhds.dev/datos-abiertos/2019/07/16/Votaciones-Argentinas-API-Un-ID-para-el-Congreso.html](https://nahuelhds.dev/datos-abiertos/2019/07/16/Votaciones-Argentinas-API-Un-ID-para-el-Congreso.html)
Manual on how to become the worst programmer in the world
Tags: career, productivity, react, javascript
Published: 2019-07-16 23:20:17


If you want to become the worst programmer in the world I strongly recommend reading those steps that have proven effective in the lives of some programmers.

#### Learn multiple languages ​​/ frameworks at once
![](https://miro.medium.com/max/700/1*LXkSRnqxsh4pBmmD9ZeHFw.png)

If you want to become the programming guy learn 8 languages ​​and 5 frameworks at the same time.


#### Create complex jobs for crumbs
![](https://miro.medium.com/max/700/1*vqTPNJGxh5kBDoNQ5TmVbA.png)

The best part of being the worst programmer in the world is to make a complex system and sell it for $25.


#### Discuss the best language/framework
![](https://miro.medium.com/max/700/1*h72bSS8UZ4ona8scW6Cxgw.png)

Discussing with the classmates stating that React is better than angular is something that will bring you a great feeling, even because React solves all problems.

#### Do not use version control
![](https://miro.medium.com/max/700/1*zWhHZUDWuxJwfEoumC1-OQ.png)

You can use Google Drive to version your code. The best practice!


#### Are you in a team? Work alone!
![](https://miro.medium.com/max/700/1*L30BHpyUmdluxpzanwujiw.png)

Work alone, you do not have to depend on another person. Know that, "Want to make things happen, do it yourself".


#### Do not be proactive
![](https://miro.medium.com/max/700/1*oPqw8eUjVCdKFw7HhlprHg.png)

Be proactive for what? Nothing will happen, everything will happen well!

#### Do not respect the Senior Developer

The Senior Developers do not know what you're talking about, that post you read on facebook made by a 17 year old who knows how to create a component in the react knows what he's talking about.


#### Don't have discipline
![](https://miro.medium.com/max/700/1*js4IF-Nq6rA66wnMFKLELg.png)

We become programmers to do whatever you want whenever you want and this is our world, get used to it!


#### Forget your mental and physical health
![](https://miro.medium.com/max/700/1*PI0jVieukS6KIuN4m8xqWA.png)

You need to stay only on the computer and not worry about your health. Getting out of the computer for a few hours to exercise may cost you money. Time is money, write it down!


#### Get away from the people you love
![](https://miro.medium.com/max/700/1*xvMGwXmXiGTbNrPexBzJJg.png)

Study, work on the personal project, work on delivery of the project that is already for tomorrow. There is no time for people, but no problem because they will always be around.


And finally ... Write in Dev.to a little manual of how
become the worst programmer in the world.


Original Post [PT/BR]: 
https://medium.com/@brunoandrade.me/manual-de-como-se-tornar-o-pior-programador-do-mundo-3ac70b4fa1e2

If you have found some error in the translation, please inform me.
A Chrome extension to focus on your email
Tags: showdev, chrome, email
Published: 2019-09-09 03:25:16

---
title: A Chrome extension to focus on your email
published: true
tags: showdev, chrome, email
canonical_url: https://miguelpiedrafita.com/email-focus/
cover_image: https://miguelpiedrafita.com/content/images/2019/06/D7l6T2xXYAAWvnU.jpg
---

It all started with a tweet by Christian Genco:

{% twitter 1133045254498734080 %}

<figcaption><a href="https://justinjackson.ca">Justin Jackson</a> shared this tweet on the #general channel of <a href="https://join.megamaker.co/club/oubsy">the MegaMaker community</a>, which I'm a part of</figcaption>

I've always had a hard time focusing on my current task when I'm out of _the zone_, and when I saw this I instantly knew this could help with my problem if applied to other sites. When Christian shared a mockup of how the same code looked on Gmail, I knew I had to get this working somehow.

![A Chrome extension to focus on your email](https://miguelpiedrafita.com/content/images/2019/06/D7l6T2xXYAAWvnU-1.jpg)<figcaption>"As requested, it's even better for Gmail" - <a href="https://twitter.com/cgenco">@cgenco</a> on Twitter</figcaption>

I asked Christian if he was planning to make a Chrome extension for this, and he told me I was free to build it myself, so I started to work with the CSS code he gave me and had a working extension in around 30 minutes ⚡

{% twitter 1133122804956762112 %}

Today the extension was finally approved, which means you can improve your email focus today [in just one click](https://chrome.google.com/webstore/detail/gmail-focus/ibkglcbdiifoobbgjpghnobobbnddojj). The extension is also open-source, so you can checkout the code and collaborate [on GitHub](https://github.com/m1guelpf/gmail-focus).
Finding A Mentor
Tags: career
Published: 2019-07-16 22:58:02

As you work day-after-day in the software industry, you'll start to feel a bit plateaued, even stuck at times. After all, you're giving it your 100%, but what if 100% just doesn't cut it? Maybe you are looking to be promoted, take more responsibilities, or even consider a different role altogether.

Here's the shortcut, **find a mentor.** Having a good mentor in your life and the day-to-day can bring enlightenment that would take months, if not years to come to naturally. If you want to fully realize your true potential as a developer, you need to have somebody who can help guide you along the way.

You might be asking...well that's easier said than done, finding a mentor is not exactly a cakewalk. It's not always that easy, nor will the daunting task of being vulnerable enough to tell somebody you believe they would be an ideal mentor for you be either. 

One thing to keep in mind is that your mentors are not going to be perfect. What I mean by this is that each mentor may be proficient in a certain skillset, and lack in the others. There's no such thing as a perfect mentor. Instead, you can take on multiple mentors and sharpen your mind by understanding each mentor's contribution they bring to the table, and how you can fully apply yourself with it.

What's in a good mentor? If you know of somebody who:

- Understands the big picture
- Actively listens
- Encourages where needs be
- Acts like your biggest fan
- Inspires you to do better
- Keeps you on track

Because these skills exist in people regardless of skill, it can be beneficial to seek comfort in finding these people in your life early on in your career rather than later. You can always repay the favor later by providing mentorship for others.

Mentors don't have to be people you consider your heroes, they can be as simple as a peer who might be struggling with the same problems as you, but they act like your biggest fan and encourage you to do better. You might even find yourself as one of your mentors. As crazy as it sounds, you are your biggest fan, you make sure you understand the big picture, and you keep yourself on track everyday.

Start small, first by asking somebody you admire their work, work ethic, or even their personality and ask them if they would mentor you once a month over a lunch. Most importantly, make sure that **you do the work of identifying where you think you can improve**, so that your mentor has an idea of the areas you're struggling with today while they get to know you.

**Jon Douglas** writes at [jondouglas.dev](https://jondouglas.dev), where he writes about better habits, deep work, software development, and improved health for Software Professionals. You can [read his articles](https://jondouglas.dev/blog/) or [join his free newsletter](https://jondouglas.dev/free-newsletter/) for new content every week.

This article was originally published on [jondouglas.dev](https://jondouglas.dev)
Narrow Your Focus
Tags: productivity, career
Published: 2019-07-16 22:56:33

Multitasking as we know it today is a lie. Multitasking is neither efficient nor effective. In the real world, having your fingers in many pies is simply not sustainable. It provides you an opportunity to screw up more than one thing at a time by bouncing between one thing and another and eventually you have to reorient your context back to one.

By multitasking often, you start to develop a distorted sense of how long it takes to actually do the task at hand. But what if there was a better way? What if you knew that success is about doing the right thing, and not necessarily about doing it right the first time?

## Choose The Right Habit

Here's the trick to success. **Choose the right habit and bring enough discipline to establish it.**

Rather than completely rehaul what you deem as the right habits in your life. Start small with a single habit that you absolutely believe is the right habit. Ask yourself the following question: **Who is the person I want to be in a year?**

Now that you have this prompt, you simply need to ask yourself about that person, and the habits that person has. This person might:

- Run a mile everyday
- Work on a side project every morning
- Eat well by cooking every meal
- etc

It's as simple as taking one of these habits, and bringing discipline to establish it within your life. Want to run a mile everyday? Start with running everyday.

## Manage Your Willpower

You have a finite amount of willpower you can exert everyday. Make sure that everytime you are approaching the right habit, you are allowing yourself to use a large chunk of your willpower to commit to the habit. In other words, most people have replenished willpower every day after sleeping. If you wanted to run everyday, try to run every morning right after you wake up. That way you can exert your newly replenished willpower and perform at your absolute best every day.

> Maximum Willpower = Maximum Success

## Stay In Your Lane

Life is a balancing act. The question of balance is really a question of priority. The challenge comes to be how clear your priorities are with various aspects of your life such as work, home, play, etc.

- Work - When you're supposed to be working, work.
- Home - When you're supposed to be home, be home.
- Play - When you're supposed to be playing, play.

Let the right things take precedence and stay in your lane.

## Conclusion

Success in life starts within you. By bringing purpose to your life, knowing your priorities, managing your willpower, and balancing your life, anything is possible.

**Jon Douglas** writes at [jondouglas.dev](https://jondouglas.dev), where he writes about better habits, deep work, software development, and improved health for Software Professionals. You can [read his articles](https://jondouglas.dev/blog/) or [join his free newsletter](https://jondouglas.dev/free-newsletter/) for new content every week.

This article was originally published on [jondouglas.dev](https://jondouglas.dev)
Introducing Myself, again!
Published: 2019-07-16 22:21:37

---
title: Introducing Myself, again!
published: true
description: 
tags: 
---

Hello Dev community! Apparently I must have done this before because I have an account, but I've never posted anything! It's been so long since I've been here, and was only reminded when I decided to make a Twitter. Currently I'm learning Ruby at Launch School, which is an online school for Software Engineers. I guess I can use this to post new things that I learn from here on until I actually land a job. That's it for now!