teleren/devto huggingface dataset:
Retrospective journaling
Tags: productivity, journaling, routine
Published: 2019-08-27 21:42:34

---
title: Retrospective journaling
published: true
description: Trying out a different format for daily journals
cover_image: https://thepracticaldev.s3.amazonaws.com/i/ycvqu3xbpovbcnlo01vd.jpg
tags: productivity, journaling, routine
---

From the time I started practicing [GTD](//gettingthingsdone.com), I also adopted a daily journaling practice. I managed to stay regular to this practice for the past 3 months. I find it useful, in most cases it helps me when I want to review some decisions or incidents from the past few weeks. 

Since starting, my journals although they are regular, they don't necessarily have a structure. I tend to capture stuff as the day processes so I end up with a bunch of entries for a particular day with a timestamp:

```
  21st Aug 2019
    [10:00] First Entry
    [13:00] Next
    [23:00] Last Entry
```

I added this style on purpose, it's automated with org-capture. But in general, I wanted to be able to capture entries with less friction. The problem I am faced with my journals right now is they lack perspective. I have notes of what happened throughout the day, frustrations and venting out sometimes, aha moments when solving a problem and sometimes even meeting highlights/notes.

During my regular reviews, I realized that I wanted to figure out what worked out for me on a daily basis, this would ideally work as a routine review that could cut down the weight on the end of the week review which usually takes up about 45-90min of my time. With this in mind, I decided to try out something most of us programmers are used to in the scrum world. I decided to continue to have the entries as usual, but to sum it up with a final entry that had three key points:  

1. What worked out today
2. What didn't go as planned
3. What can I improve for tomorrow 

I am starting with summarizing one thing that is most important for every question. That helps me weed out the trivial many from the vital few (one in my case). 

I am expecting this to give me a sense of acknowledgment for a day's work regardless if its work or personal. And set the perspective for tomorrow's actions. 

I am not sure if this itself is going to work out well. But, I plan to experiment with this method for a few weeks before altering my journaling habits again.
This morning I had 2000 followers and now 🤯
Tags: thankyou, devjournal
Published: 2019-08-27 21:41:42

I just want to say thank you all so much. I'm nearing 3000 people that's enough to fill an opera house. I'm currently singlehandedly moving house so (less content) I wish you could all put your heads together and make me a robot to get that God damn fridge up the stairs!

None the less I feel so happy and want to keep up the writing it's been great fun. I may get into videos soon to. I love you 🥰
ionic vs react native? 
Tags: ionicreactnative
Published: 2019-08-27 21:33:07

Is it possible to use any of these technologies to build an instant messaging app? If so what are other languages or systems I would need to use, I'm already planning on using firebase for the backend, is there something else I'd need to learn or would it be possible to do this with just ionic with angular or React Native with react?
I spent an entire Saturday trying to understand .reduce()
Tags: javascript, beginners, explainlikeimfive
Published: 2019-08-27 21:14:39

Lately, I've been trying to up my js skills… including a run through some Javascript courses on Codecademy, which I was totally crushing until I got to reduce()… 🤯!!

<blockquote><q>The reduce() method executes a reducer function (that you provide) on each element of the array, resulting in a single output value.</q> <cite>(per <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce" target="new">MDN</a>)</cite></blockquote>

##That description did nothing for me. 
I had no problem working through and understanding other array handling methods like filter() and map()... but I hit a roadblock trying to grasp what *reduce* was all about. And I spent an entire day on it. 

But now, I **think** I finally get it: we "reduce" an array of objects into one object by performing a function on each item in an array, saving the result at each step to an *accumulator*. It's kind of like the way we use a *for loop*, but here we're adding to (*accumulating*) just one result. 

This "accumulator" thing, as I now imagine it: 
![Animation of accumulator value: a + b = ab, ab + c = abc, and onward through an array of the English alphabet](https://thepracticaldev.s3.amazonaws.com/i/bkx0mzwqdz5q8j3foajf.gif)

If that doesn't help, here are the examples I wrote for myself to make sure I understood the basic nature of the accumulator. 
{% codepen https://codepen.io/phillipkent/pen/KKPmPXj default-tab=js %}

##How I got here
To get to this level of understanding, I had to look at MDN, blogs, youtube, and finally give up and ask a more experienced programmer (my friend Dave) to explain it to me like I was five. 

This was what I got as an example: 
{% codepen https://codepen.io/phillipkent/pen/MWgmWzE default-tab=result,js %} 

While I now understand what's going on above, I didn't when I first saw it. 

##The resources that clicked for me
**Finally**, after several hours, I started to *get it* somewhere around my third read of [Jason Belcher's post: "Map, Filter, and Reduce"](https://jasonbelcher.dev/mapfilterreduce#reduce-implementation), which actually demonstrates rolling your own reduce-like function, and my second watch of the below video from [The Coding Train](https://www.youtube.com/watch?v=-LFjnY1PEDA) on YouTube. 
{% youtube -LFjnY1PEDA %} 

If you've made it this far down the page, you might be as frustrated and confused (and determined) as I was - I hope these links will help you like they did for me me!
JAMstack Roundup for August 26th 2019
Published: 2019-08-27 21:08:04

###This week is all about firsts 🥇. We love trying new things, so if you haven’t tried one of these technologies 🕹, here’s your chance!###

1. [Building Your First GraphQL Server](https://hackernoon.com/building-your-first-graphql-server-exbh3wpq)

    I don’t know if you’ve heard, but there’s a relatively new kid 🚶‍♂️ on the block — it's called GraphQL. It’s super fancy. 🎉

2. [Building Your First React.js App](https://medium.com/learning-new-stuff/building-your-first-react-js-app-d53b0c98dc)

    This article will take you through every step 1️⃣➡️🔟 of building the simplest React app possible. Even simpler 💡 than a to-do list.

3. [Building Your First Static Site with Gatsby](https://www.sitepoint.com/how-to-build-your-first-static-site-with-gatsby/)

    Thinking 🤔 about getting on the JAMstack bandwagon? If your answer is Yes, then Gatsby, one of the hottest static site generators around, could be just what you’re looking for 🤩.

4. [Building Your First Dead Simple RESTful API with Node.js and Serverless](https://medium.com/jengdahl/your-first-dead-simple-restful-api-with-node-js-and-serverless-b4f6bb9191f4)

    When it comes to trying to pick your first node.js project, there is no shortage of great ideas 🧠. In this tutorial, we’ll build a REST API that tells us about our users location 📩!

5. [Building Your First TypeScript Application](https://visualstudiomagazine.com/articles/2018/04/05/your-first-typescript-application.aspx)

    Here's what a real-world "Hello, World" 👋 TypeScript application looks like.
The dos and don'ts of documentation writing.
Tags: discuss
Published: 2019-08-27 20:26:44

---
title: The dos and don'ts of documentation writing.
published: true
description: No real reason for this discussion other than the curiosity of how everyone else approaches this task.
tags: #discuss
---

No real reason for this discussion other than the curiosity of how everyone else approaches this task. Any participation is appreciated!
2FAnotifier and multi-factor authentication
Tags: security, beginners, tutorial, authentication
Published: 2019-08-27 20:23:12

---
title: 2FAnotifier and multi-factor authentication
published: true
description: Tanya introduces 2FAnotifier, a free a browser plugin that  when you multi-factor authentication is offered on a site. #MFAally
tags: security, beginner, tutorial, authentication
---

[Tanya Janca](https://dev.to/shehackspurple), one of the [OWASP DevSlop Project Leaders](https://twitter.com/Owasp_DevSlop), is currently obsessed with convincing people to enable multi-factor authentication on all of their important accounts. To this end, she created a video that shows users how to install a browser plugin called ["2FAnotifier"](https://addons.mozilla.org/en-US/firefox/addon/2fa-notifier/), which will alert users if a site offers the option to use multi-factors of authentication on your user account.  

If you want to know more about what MFA is and why it's important, please read Tanya's post here; [Multi-Factor Authentication (MFA)](https://aka.ms/MFAally).

{% youtube ySfOpGi51Mk %}

**For this and more, check out my book, [Alice and Bob Learn Application Security](https://aliceandboblearn.com/) and my online training academy, [We Hack Purple](https://academy.wehackpurple.com)!**
TODO 8/26 - 9/1 & Review on Last Two Weeks
Tags: beginners, machinelearning
Published: 2019-08-27 20:10:01

I missed last week's review post, oops.

Things has been going really well. First and foremost, I finished all 3 most important items on my list from the previous week. 

- Driver Attrition Project * 
  - Finish feature engineering
  - Try random forest 
  - Investigate feature importance
- KeepTruckin Interview * 
  - Pramp practice * 2
- Update resume * 
  - driver attrition
  - spacing
  - Kuzushiji
  - send to career coach for review
  - send to friends for referral

We have been finishing up a project for a presentation, for which I traveled to Houston the last Friday. I also had my first round Medium interview which I think went well. 

## Achievements!

- I had my braces removed on Aug 13rd 😁 Invisalign in on 22nd
- Last swimming class when I swam a lap 🏊🏻‍♀️
- Published an article on interview tips on Medium 
- Resumed algorithm interview practice on Pramp

## Happy Memories

- The Handmaid's Tale season 3 ended. Looking forward to the book sequel! 
- Tried to play volleyball
- Visited Baltimore, the historic ships and the Charles Village
- team building at Dave & Busters, our team won!
- Houston has 85°C, authentic Korean & Japanese & Mexican restaurants!
- Visited my Natural History Museum and bought dinosaur shirt

## This Week

This week I will focus on enjoying Houston with friends while we are here. Friday I have a whole day virtual onsite interview which should be fun. I also started a weight loss plan with Noom and it seems really cool. Exciting week!

- KeepTruckin Interview
  - Pramp prep
  - Prepare questions
  - Interview on Friday
- Resume
  - 1 pomo Kuzushiji
  - Finalize and send out to Lynne
- Noom daily checkin


Cover photo by [Renáta-Adrienn](https://unsplash.com/@bajkorenata) on [Unsplash](https://unsplash.com)
Enhancing webauthn.me with the Online Debugger Tool
Tags: w3c, authentication, webauthn
Published: 2019-08-27 19:50:41

---
title: Enhancing webauthn.me with the Online Debugger Tool
published: true
description: To help you understand the WebAuthn configuration objects we've added a debugger to the webauthn.me website.
tags: #w3c #authentication #webauthn 
canonical_url: https://auth0.com/blog/enhancing-webauthn-me-with-the-online-debugger-tool/
---
Introducing the WebAuthn Debugger

TL;DR We've written about one of the latest additions to the W3C specs, the web authentication API, before. The API requires many configuration objects that you may be seeing for the first time. To help you understand these configuration variables we've added a debugger to the webauthn.me website. It lets you play around with different configurations and test them on the fly.

The Web Authentication API has 2 methods. A create() method to register new credentials and a get() method to use previously created credentials.

[Read on 🚀](https://auth0.com/blog/enhancing-webauthn-me-with-the-online-debugger-tool/?utm_source=dev&utm_medium=sc&utm_campaign=webauthn_debugger)
★ Watch the Flare reveal live
Tags: laravel, php
Published: 2020-01-02 23:34:50

---
title: ★ Watch the Flare reveal live
published: true
date: 2019-08-27 19:42:11 UTC
tags: laravel, php
canonical_url: https://freek.dev/1443-watch-the-flare-reveal-live
---

These past eight months [Marcel Pociot](https://twitter.com/marcelpociot), me and our teams at [Beyond Code](https://beyondco.de) and [Spatie](https://spatie.be) have been working on a secret project called [Flare](https://flareapp.io). We believe that Flare is going to change the way you work with Laravel. To be kept in the loop subscribe to [our mailinglist](https://flareapp.io).

We are going to launch it this Friday at Laracon EU at 16.30 local time (15:30 CET). The Laravel News YouTube channel will live stream the launch. You can watch the stream right below.

{% youtube _d9CXlxufyQ %}
Streaming Programming YouTube or...?
Tags: discuss
Published: 2019-08-27 19:28:16

---
title: Streaming Programming YouTube or...?
published: true
description: What are people using or following these days to learn programming? YouTube, Twitch, Discord
tags: discuss
---

I am planning to do a once a week programming video stream and have always planned to do it on YouTube, but I see others like Chris on scotch.io using twitch...

So what platform do you use in 2019? Why?
Welcome Thread - v38
Tags: welcome
Published: 2019-08-27 18:56:14

---
title: Welcome Thread - v38
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
---

![hi there, sloth](https://media.giphy.com/media/3oEduGjJPPpPLGnDO0/giphy.gif)

### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**
Object detection using Tensorflow.js
Tags: node, react, tensorflow, javascript
Published: 2019-08-27 18:32:08

---
title: Object detection using Tensorflow.js
published: true
description: 
tags: #node #react #tensorflow #javascript
cover_image: https://i.imgur.com/saXcWXQ.png
---

A new article is published on overflowjs.com around detecting an object in an image using tensorflow.js two models **imagenet** and **coco-ssd**.

The first part of the article talks about making the UI with react.js to upload the image and select the model from which the detection should happen.

The second part of the article makes an endpoint in node.js using tensorflow.js to detect the object in the image passed.

Read full article - https://overflowjs.com/posts/Image-Object-Detection-Using-TensorFlowjs.html

Github code link for UI- https://github.com/overflowjs-com/image_object_detction_react_ui

Github code link for Backend- https://github.com/overflowjs-com/image_object_detection_tensor_api

Happy coding!
How do you use GitHub Actions?
Tags: discuss, devops, github
Published: 2019-08-27 18:16:15

Today I was invited to [GitHub Actions](https://github.com/features/actions) Beta 🥳.

{% youtube E1OunoCyuhY %}

Does anyone use GitHub Actions already? What are your use cases?
Do you have some good examples?

Is anyone using GitHub Actions in production?


## Links
- [GitHub Actions Documentation](https://help.github.com/en/categories/automating-your-workflow-with-github-actions)
- [awesome-actions](https://github.com/sdras/awesome-actions)
- [GitHub Actions vs. GitLab CI](https://knapsackpro.com/ci_comparisons/github-actions/vs/gitlab-ci)
Qvault’s Offline Mode in Electron
Tags: bitcoin, electron, javascript, passwords
Published: 2019-08-28 12:10:36

---
title: Qvault’s Offline Mode in Electron
published: true
tags: Bitcoin,Electron,Javascript,Passwords
canonical_url: https://qvault.io/2019/08/27/qvaults-offline-mode-in-electron/
---

In preparation to add Bitcoin and cryptocurrency key generation in Qvault, one of the features that was just added was “Offline Mode”. There is now a toggle switch at the top of the app that, when switched off, ensures that no network requests can be made by the app.

![](https://qvault.io/wp-content/uploads/2019/08/screenshotOffline-1024x580.png)

Qvault has always been able to be used offline, assuming the user chose not to sign up for Qvault’s cloud backup option. Now, even if a user is storing their encrypted vault files on Qvault servers, the user can choose to go offline and work locally temporarily.

## How Does it Work?

Electron has an API that allows developers to intercept and modify web requests. By intercepting all webRequests before they are made using the onBeforeRequest hook, we can check them see if we want to allow each request or not. For example:

```
// callback({cancel: true}) stops the request before it is sent.
// callback({cancel: false}) sends the webRequest

mainWindow.webContents.session.webRequest.onBeforeRequest({
    // Intercept all webRequests
    urls: ['<all_urls>']
  }, (details, callback) => {
    // allow all filesystem calls
    if (details.url.substring(0, details.url.indexOf(':')) == 'file'){
      callback({cancel: false});
      return;
    }
    // don't allow any network calls if in offlineMode
    if (!onlineMode){
      callback({cancel: true});
      return;
    }
    // allow al other network calls
    callback({cancel: false});
  });
```

Hopefully this helps anyone else looking to control webRequests in Electron, and helps our users understand ‘offline mode’ in Qvault! Thanks for reading.

By [Lane Wagner](https://medium.com/@lane.c.wagner)

The documentation for Electron’s API: [https://electronjs.org/docs/api/web-request#webrequestonbeforerequestfilter-listener](https://electronjs.org/docs/api/web-request#webrequestonbeforerequestfilter-listener)

A link to our implementation: [https://github.com/Q-Vault/qvault/blob/master/main/setupWebRequests.js](https://github.com/Q-Vault/qvault/blob/master/main/setupWebRequests.js)

Download Qvault: [https://qvault.io](https://qvault.io)

Star our Github: [https://github.com/Q-Vault/qvault](https://github.com/Q-Vault/qvault)

The post [Qvault’s Offline Mode in Electron](https://qvault.io/2019/08/27/qvaults-offline-mode-in-electron/) appeared first on [Qvault](https://qvault.io).
Differences between "let" and "const" keywords?
Tags: javascript, webdev, todayilearned, beginners
Published: 2019-08-27 17:41:28

_In my last article I talked about the differences between <u>**"var"** and **"let"**</u> now it's time to talk about the differences between <u>**"let"** and **"const"**</u> keywords._

_Let's gets started !_

**“let”** and **“const”** they are both used to define variables. 

### **_Difference nr 1!_**

With keyword **“const”** you can define constant variables which means, after the first assignment of the value you cannot reassign the value again.

With keyword **“let”** you can reassign the value as many times as you need, you can even change the type of value if needed.

Let’s take a look at some code:

```javascript
let l = 1;
l = 2;
console.log(l); 
// 2

const c = 1;
c = 2;
Console.log(c); 
// Error: Uncaught TypeError: Assignment to constant variable 

```

## **_Difference nr 2!_**

Variables defined with **“const”** keyword cannot be initialized without any value. You must specify its value in the same statement in which its declared (which makes sense, given that it can't be changed later).

Let’s take a look at this example:

```javascript
let l
l = 1
console.log(l)
// 1

const c;
c = 1;
console.log(c);
// Error: Uncaught TypeError: Missing initializer on constant variable
```

## **_Difference nr 3!_**

The **"const"** declaration creates a read-only reference to a value. It does not mean the value it holds is immutable, just that the variable identifier cannot be reassigned. For instance, in the case where the content is an object, this means the object's contents can be altered.

Let’s see this in action:

```javascript
const c = [ 1, 2 ];
c.push(3);
console.log(c);
// [ 1, 2, 3 ]

Const c = [ 1, 2 ];
C = [ 1, 2, 3 ];
console.log(c);
// Error: Uncaught TypeError: Assignment to constant variable 
```

_That's it ! Once again simple but important concepts to keep fresh in your minds._

_See you soon for more tips !_
Fetch API gotcha in cypress.io and how to fix it.
Tags: fetch, cypress, fix, apolloclient
Published: 2019-08-27 17:23:40

---
title: Fetch API gotcha in cypress.io and how to fix it.
published: true
description: This shows you how to fix the route stubbing issue in cypress.io when the fetch api is used client side.
tags: fetch, cypress, fix, apollo-client
---

**The problem:**
When you use the fetch API on the client side, you cannot stub routes in [cypress.io](https://www.cypress.io/) because of the [lack in support](https://github.com/cypress-io/cypress/issues/95) in cypress atm. 




This is something I ran into when implementing the graphql [apollo-client](https://www.apollographql.com/docs/react/) [apollo-link-rest](https://www.apollographql.com/docs/link/links/rest/), since it uses the fetch api out of the box.

**Here is what I did to fix it:**
First I made sure to polyfill the fetch api using [whatwg-fetch](https://github.com/whatwg/fetch), but only in development or testing environments, since I don't need it in production builds.

So in my the main entry point to my app `index.tsx`, I added this near the top.
```javascript
//**this will get stripped out of production builds by webpack */
//@ts-ignore
if (!PRODUCTION) {
    require('whatwg-fetch'); //for polyfill cypress test 
}
```

For my `webpack.development.js` config file, I added this:

```javascript

plugins: [
    new webpack.DefinePlugin({
        PRODUCTION: JSON.stringify(false),
    }),
],

```

and in my `webpack.production.js` config file, I added this:

```javascript

plugins: [
    new webpack.DefinePlugin({
        PRODUCTION: JSON.stringify(true),
    }),
],

```

Next I added a new `visitWithDelWinFetch` command to cypress which will delete the fetch api on the `window` object.

```javascript
Cypress.Commands.add('visitWithDelWinFetch', (path, opts = {}) => {
    cy.visit(
        path,
        Object.assign(opts, {
            onBeforeLoad(win) {
                delete win.fetch;
            },
        })
    );
});
```
This will kick in the fetch polyfill. Now you'll be able to stub routes like you'd expect in cypress.

```javascript
cy.server();
cy.route('/path/to/api/').as('getApiPath');
cy.visitWithDelWinFetch('/');
```





And to give credit where it's due, this was largely inspired by [this solution](https://github.com/cypress-io/cypress/issues/95#issuecomment-281273126) in the comments.

Also note that if you don't care about ever using the fetch api in your tests, you could avoid having a separate visit command using [this solution](https://github.com/cypress-io/cypress/issues/95#issuecomment-343214638) paired with the fetch polyfill.
LeetCode "3Sum Closest"
Tags: leetcode, python
Published: 2019-08-27 17:20:02

---
title: LeetCode "3Sum Closest"
published: true
description: 
tags: [leetcode, python]
---

I could not solve this problem, so I referred to [this](https://leetcode.com/problems/3sum-closest/discuss/367111/Python-or-O(n**2)-or-Faster-than-91)😢

[3Sum Closest](https://leetcode.com/problems/3sum-closest/)


```python
class Solution:
    def threeSumClosest(self, nums: List[int], target: int) -> int:
        
        nums.sort()
        
        len_nums = len(nums)
        closest = nums[0] + nums[1] + nums[len_nums - 1]
        for i in range(len_nums - 2):
            left = i + 1
            right = len_nums - 1
            while left < right:
                sum_nums = nums[i] + nums[left] + nums[right]
                if sum_nums == target:
                    return target
                else:
                    if abs(sum_nums - target) < abs(closest - target):
                        closest = sum_nums
                    if sum_nums < target:
                        left += 1
                    else:
                        right -= 1
                
        return closest
```