teleren/devto huggingface dataset:
Clock is ticking
Tags: productivity, career
Published: 2020-07-07 06:15:03

# Journal Entry July 6 2020
**Study For Java OCA** 

I'm using Jeanne Boyarsky's Book (Certified Associate Java SE 8 Programmer I)

Today's Topics

`StringBuilder` Class and common methods like

`append() insert() delete() deleteCharAt() reverse() toString()`

And the concept of mutability and how methods really affect StringBuilder not the case for `String`
___

**Serverless Rest API, using chalice and boto3**

I'm still haven't fully understand the chalice workflow, but when using python I feel so productive and I like that.

Sample of the JSON response 

```json
{
    "start_time": "2020-06-26T09:00:00",
    "patient_date": "David",
    "patient_uid": "1234",
    "end_time": "2020-06-26T09:00:00",
    "phone_number": "12345678"
}
```
___

**AWS Developer Associate Certification 2020**

I'm thinking about also getting the AWS Developer Certification, because there are many concepts that I can apply on this project.

I'd tried acloudguru.com recently (1 week free period) and I prefer linuxacademy.com for the amount of Linux and DevOps related courses and labs. The one thing I'm worry about is that the course for maybe outdated, but we will see.

___

First day and I __(almost)__ miss the deadline of this Journal Experiment. So great start, I guess. Hopefully as the habit settles in I can do it with lees friction. Till tomorrow...
Top Machine Learning Telegram Channel
Tags: machinelearning, datascience, python, computerscience
Published: 2020-07-26 06:12:07


[**Machine Learning Telegram Channel**](https://t.me/MLmorons)
&#39;Coz ML is an art and this telegram channel ensures that you become an artist.

Machine Learning sounds all cool but being a practitioner of the same is not everyone&#39;s cup of tea and this is why the Machine Learning channel was created. To ensure that Machine Learning&#39;s exclusive content is being made available to all the aspirants out there.

**Machine Learning (ML) Telegram Channel brings you-**

- Machine Learning Tutorials that covers every concept
- Machine Learning Codes &amp; Practicals
- Machine Learning Case Studies and Applications
- Top Machine Learning Projects with Source Code
- Machine Learning Interview Questions with Answers

**Machine Learning, a dream not so far**

[Machine Learning](https://techvidvan.com/tutorials/machine-learning-tutorial/), a term that in itself takes you to the dreamland of innovations soon as you hear it. Machine Learning is more of an emotion rather than just a term that connects to almost every tech geek out there.

According to some study, what&#39;s machine learning has been in use as of now is merely a small part of it. There&#39;s a hell lot of things still unexplored. This is what brings out an immense amount of opportunities for all the Machine Learning enthusiasts out there. Being a machine learning practitioner is what having a dream is all about.

Although the innovations and the opportunities are a center of attraction of machine learning, having a career in it isn&#39;t as easy as it sounds to be. It takes skills and a lot of effort to be called as a Machine Learning Professional. It takes guts to get to the glory.

**WELCOME TO THE ML WORLD**

Since being aware of the challenges one faces during his journey of the ML world, this channel has each and everything that it takes to be there ultimately. An inch perfect channel that was created with a dream of being able to let all the ML aspirants there to achieve their goals.

[&#39;**Coz it&#39;s your time to be a Machine Learning professional**](https://t.me/MLmorons)

These resources are there with you always in your smartphone so that there are no hindrances in your Machine Learning journey. What separates these resources from the other ones are that these are curated by real ML practitioners.
Flutter Budget App UI...
Tags: flutter, ios, android, computerscience
Published: 2020-07-26 05:19:38

* Hey guys today I created a Budget App UI in Flutter.
* Flutter is awesome looking forward to take this Budget App to the next level. 

* Planning to launch this app in august end. 
* I'm trying my best to complete this APP in decided deadline.

* Lot of secret features to add in this.
5 Best Resources To Learn Javascript in 2020
Tags: javascript, beginners
Published: 2020-07-26 04:51:09

JavaScript is one of the most popular languages on the web. Even though it was initially developed just for web pages, it has seen exponential growth in the past two decades.

Now, JavaScript is capable of doing almost anything and works on several platforms and devices including IoT. And with the recent SpaceX Dragon launch, JavaScript is even in space.

One of the reasons for its popularity is the availability of a large number of frameworks and libraries. They make development much easier compared to traditional Vanilla JS development.

1- The Modern JavaScript Tutorial <a href="http://javascript.info/" target=_blank> Javascript.info </a>
2- An awesome more advanced written introduction to JavaScript: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript" target=_blank> A re-introduction to JavaScript </a>
3- 30 days of JavaScript challenges with corresponding videos by Wes Bos: <a href="https://javascript30.com/" target=_blank> JS 30 </a>
4- A video series introducing JavaScript: <a href="https://www.khanacademy.org/computing/computer-programming#programming" target=_blank> Khan Academy Computer Programming </a>
5- <a href="https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/" target=_blank> Free Code Camp </a>
Mozilla introduce VPN service
Tags: news, beginners
Published: 2020-07-26 04:50:51

Mozilla sent following mail to announce it's new VPN service

 ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/2eg28eg5mrw099jomf4m.png)

More details available here:
https://vpn.mozilla.org

This is paid service.
>Thanks! You’re on the list.
Once Mozilla VPN becomes available for your platform and region, we’ll email you. The VPN is currently available for Windows 10, Android and iOS devices in the US, the UK, Canada, New Zealand, Singapore and Malaysia..
Modify global variables in 2020 🤔
Tags: javascript, codequality
Published: 2020-07-26 04:24:24

Hi all, I would like to start writing a post about recommendations or thoughts to share with the community and receive feedback. So here we go.

-----------------------------------------------------------------

On the last days I was reading code on different projects and I noticed some code continues using and modifying some global variables in special cases. All these cases are similar and I think that there ways to prevent that. I will just talk about a common case that I noticed and how we could fix it. 

In some cases, we want to preserve the *id* to use it on our apps. All those cases are using an eternal accumulator as id to be sure that all time is a new value.
And we are using something like this:

```javascript
let _uiid = 1;

/* ... */

function createUser () {
  /* some logic */
  const userID = _uiid++;
}
```

This code is generating a new id to create a new user with a different id. It's a simple solution, right? But it's changing a global variable and it's opening the door to unexpected changes on the variables because this could change on any part of the code or the system flow.

My proposal here is: use a functional abstraction to prevent that.

```javascript
function createCounter (defaultState = 0) {
   let state = defaultState ;
   return () => state++;
}

const getID = createCounter(1);
/* ... */

function createUser () {
  /* some logic */
  const userID = getID();
}
```

Here we are using a global variable but we are not modifying it. So the code is cleaner and readable. You can create and move the `createCounter` to another file, to reuse it. 

It's longer than just use a variable and modify it. But it's helping you to prevent unexpected bugs in the future. 

And that's all folks. Let me know what do you think about it in the comments?
Breadth-first search implementation
Published: 2020-07-26 04:03:57

Hello there! If you've somehow stumbled this post, I'm assuming you're trying to understand how the breadth-first search algorithm works, and how to use it to solve problems!

In my other post about the differences between depth-first search and breadth-first search, we talked about cases where we would use the two appropriately. In this post I'll explain how breadth-first search and then implement a way traverse a graph with it.

A major difference between the two is the data structure we use. DFS uses stacks(in case of recursion the call stack) and BFS uses queues. 

We'll traverse a tree using BFS and I'll describe each step. 

```js
var levelOrder = function(root) {
    // If root is null return an empty array
    if(!root) return []
    
    const queue = [root] // initialize the queue with root
    const levels = [] // declare output array
    
    while(queue.length !== 0){
       const queueLength = queue.length // 
       const currLevel = [] // Declare this level
     
       for(let i = 0; i < queueLength; i++){
           
           const current = queue.shift()
           
           if(current.left){
               queue.push(current.left)
           }
           if(current.right){
               queue.push(current.right)
           }
           
           currLevel.push(current.val)
       }
       
       levels.push(currLevel)
   }
    return levels
}
```
We start by checking if root is null. We then initalize our queue and push root into it, since we know that we will visit it first. 

Now we go into our while loop, which will keep going until our queue is empty. Then we get the length prior to dequeueing, and loop through to exhaust all options and only to include nodes at currLevel. In our for loop, we add the left and right node for the current level and the push it into currLevel, and after the level is finished we push it into the output array. 

This repeats until we get to the last level and eventually the function returns an array of arrays, each one containing the nodes of each level of the tree.
Quick Thought: Don't Be A Generalist, Stay Focused
Tags: career, productivity
Published: 2020-07-26 03:54:35

It's tempting to dive into new technologies with reckless abandon. The initial steps of writing code in a new language or framework is exhilarating and addictive.

It would seem, however, that becoming... *familiar* with a lot of different technologies is far from the best use of our time.

The community of developers is always in dire need of people who have proven their commitment to a *very specific* stack. Some stacks are in higher demand than others, some are easier, some or better for specific tasks... find a stack that fits your needs and **specialize** in that stack.

So, the next time you're convincing yourself to learn another framework or language, ask yourself if it wouldn't be better to dig deeper into the stack you've already been working with.

NOTE: I hope this message will help someone else, but I am writing it to talk myself out of wasting a bunch of time over the next few weeks.
Whats a Closure in javascript?
Published: 2020-07-26 03:42:15

From personal experience, I have noticed many developers know how to code, but don't really understand what happening in the back of the eye. One of those are Closures. Closures gives access to an outer functions scope(is what is created inside functions) through an another function inside of it(a nested function inside of the outer function). A way to know if it's a closure is if theres a variable defined not inside the function and is given from somewhere else.
Instead of explaining it with words I believe it'll be easier to understand it from code. I will set an example.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/vj8wcp022xb1ssc55vhf.png)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/z12q8zelcjnv3iuzsqn6.png)
Ensure npm package is updated
Tags: node, npm
Published: 2020-07-26 03:12:14

---
title: Ensure npm package is updated
published: true
description: Ensure npm package is updated
tags: node, npm
//cover_image: https://direct_url_to_image.jpg
---

### Do you install your private node modules as below?

```json
// package.json

"dependencies": {
  "private-module": "git+ssh://git@github.com:private-module.git#v5.5.5"
}

```
If yes, chances are when you upgrade the package version to `#v5.5.6`, and do `npm install`, your `package-lock.json` wont be updated and neither the actual files inside `node_modules`. To ensure the update, I am having to manually update the `package-lock` file. Has anyone faced this?
Codecademy Data Science Course Part II
Tags: sql, python, database, datascience
Published: 2020-07-26 03:08:07

# Introduction to SQL
I was able to complete this section of the Data Science course pretty quickly as I already have some exposure to SQL. With that said there were some concepts that I didn't quite know about and some that I haven't used in a while that were nice to get a refresher on. All in all I think the SQL portion is great if you are familiar with SQL. If you don't know any SQL at all I would definitely recommend looking into the SQL course here: https://www.w3schools.com/sql/default.asp as it is a really great resource. As a matter of fact I should have included it in my previous post about free coding websites because W3schools is a really great learning resource. Some of the courses can be a bit outdated but you will get a decent amount of knowledge from them.

Moving on. I had a lot of fun in this section and definitely think that it was worth it. Now the particular section I am working on in the Data Science course is free to go through on Codecademy. It is the Learn SQL module they offer. If you are wanting to test your knowledge of SQL or you want more of a challenge because you learn better by being challenged then I would recommend this one over the w3schools course. You can find it here: https://www.codecademy.com/learn/learn-sql

# Writing Queries
This is the second part of the SQL course within the Data Science course. I thoroughly enjoyed this one as well and is also a part of the Learn SQL course module. So if you don't have a Pro membership to Codecademy but you still want to take this SQL course then I highly recommend it. I do have to warn you though. The project challenge at the end will make you think about how to solve the questions. Which is a good thing. You get some step by step sections but the best part about the course is the project. It helped me see the sections of SQL that I need to work on. I was able to complete a good portion of it without needing to look things up but, as with all things programming related you aren't going to know the answer to everything every time. So that was a lot of fun.

# Concluding Thoughts
In conclusion I have to say that so far I am definitely enjoying the course and definitely feeling as though my SQL skills are increasing with each challenge I finish. Definitely want to recommend this course again for those of you wanting a refresher or to test your skills. If you are brand new to SQL you will still learn some valuable skills but I would recommend going with an easier course to get the hang of the language first which would be w3schools. To follow along with the tutorial in w3schools as it doesn't include an in browser editor I would recommend setting up a SQLite repl at https://repl.it/. It's free and you can set up a repl for just about any major language used these days. As always I hope you enjoyed this post and look forward to hearing any thoughts and answering any questions you may have. Enjoy.
Learning Binary Trees Part 1: Implementation
Tags: beginners, javascript, computerscience, algorithms
Published: 2020-07-26 03:02:12

Unlike all of the data structures I've discussed previously, a binary tree is not a linear data structure, and is instead a hierarchical data structure. My go to real world example of a hierarchical structure is a family tree. 

Elements below nodes are called children, and elements above nodes are called parents. Like other structures, the beginning node of a tree is called the root. A binary tree has the restriction that each node may only have at most 2 children. 

![Binary Tree](https://dev-to-uploads.s3.amazonaws.com/i/j3fl2qpf36xyqx6zvodo.jpeg)

As with most of our other data structures, we first need to implement a node class. We can then use node objects that we create as we fill our tree. Each node needs to have some kind of data, and a pointer to the left and right.

![Node Implementation](https://dev-to-uploads.s3.amazonaws.com/i/1k6309n0vb3jink164pq.png)

Implementing the tree itself is simple. A tree needs a root, but all information about the root's children is stored in the nodes.

![Tree Implementation](https://dev-to-uploads.s3.amazonaws.com/i/zeurtpjz0wqa91h6n2s0.png)

Unlike other structures we've looked at, a binary tree can be constructed in a plethora of ways depending on how you want the tree to be structured. For this example we'll be implementing a [binary search tree](https://en.wikipedia.org/wiki/Binary_search_tree), meaning that the left child only contains data that is of lesser value than the parent's data and the right node contains data that is of greater value than the parent's data.

![Add Method](https://dev-to-uploads.s3.amazonaws.com/i/32rxtrsnmf0kbj87adgo.png)

First we check if there is a root, and set it if there is not. Otherwise, we add our node to the tree using our helper method. This second part needs to be a helper method because we are going to use recursion to call it repeatedly.

![AddNode Method](https://dev-to-uploads.s3.amazonaws.com/i/r51xta0jz2cfe95hdwoj.png)

In this method we check if the data is greater than or less than the value of the node we are looking at, then add it to the node if there is an opening, otherwise we run the method again until we find an available spot for the node.

There are many other methods we could add to work with a binary search tree, and even more when working with other forms of binary trees.

Trees are much more advanced than the linear data structures we've discussed in the past, and to be honest I'm mastering them myself. So in my next post I'll dive in to various ways we can navigate trees. Until then, think about other ways we could go about creating a tree.

The code from this post can be found [here.](https://github.com/123JackCole/Binary-Trees)
NuGet Pro Tip: Control Where Your Packages Are Installed
Tags: nuget
Published: 2020-07-26 02:37:28

As you are likely aware, there are currently two methodologies for using NuGet packages in your Visual Studio project:
1. **The packages.config file** - all of your packages are listed in this file, one per project, and typically the packages are installed to a "packages" folder on the root level of your solution. This also means they tend to be inside the scope of your source control, but most ignore files will filter them out for you, and they shouldn't be stored in source control unless they're local packages.
2. **The PackageReferences format** - all of your packages for the project are listed in the project definition file, like your content is, and typically the packages are installed to a folder in your Windows "users" directory. You'll find the references in the References or Dependencies section of your project, depending on if you're using .NET Framework or .NET Core, respectively. By default, a .NET Framework project won't let you convert to PackageReferences, but if you manually do one in your project file, the rest will fill in accordingly.

As .NET Core (soon to be .NET 5, merged with Framework and Standard) is the future, PackageReferences is becoming the typical way to see NuGet done. But I had a scenario come up recently with a T4 template that needed references to my NuGet packages...how do I reference the package location when it's in my users directory, and thus has my username on it, and still share with other developers on the project?

Enter the **globalPackagesFolder** setting! This allows you to determine exactly where to put your packages, such as a location common to all. I chose c:\packages to make it easy. So my NuGet.config files looks like this:

```
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <config>
        <clear />
        <add key="globalPackagesFolder" value="c:\packages" />
    </config>
    <solution>
        <add key="disableSourceControlIntegration" value="true" />
    </solution>
    <packageSources>
        <clear />
        <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
        <add key="Sitecore" value="https://sitecore.myget.org/F/sc-packages/api/v3/index.json" />
        <add key="Local" value="build-props\nugets" />
    </packageSources>
    <activePackageSource>
        <add key="All" value="(Aggregate source)" />
    </activePackageSource>
</configuration>
```

This doesn't affect anything like the Azure devops CI/CD process, everything will process fine there. This is purely for local machines. And from there, references to the packages are easy if you need a file path.
SCSS & React dir Inception
Tags: react, scss, beginners, blog
Published: 2020-07-26 02:02:05

###<center>SCSS w/ React for my Navbar</center>
___
Following a tutorial that is 3-4 months out from the release date of newer pkgs, shows exactly how hard the dev world is pusshin! It's really motivating actually 😆

So I followed this awesome post on [Hackernoon!] (https://hackernoon.com/how-to-use-sass-in-your-create-react-app-oh2x3ywb) This and some help from the [Reactiflux] (https://discord.gg/RunHgV8) community, really a fantastic group of people! Hopefully I can show my gratitude in future contributions, once we get past our `/.` `./` typos lol!

In short, react-app would only respond to `src/base.scss` _*not*_ `src/assets/base.scss` while trying to `@use 'assets/scss_nav'` so we did away w/ the extra dirs and linking which resolved✨

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8ipk3ip0pfdcg3w7lqwt.jpeg)

Upon further perusal of the [React Docs] (https://reactjs.org/docs/reconciliation.html) I found React's method of processing our files (specifically for create-react-app) is quite unique which *may be* the reason why it didn't process correctly? What do you think?

> sdll imagining their directory communicating w/ ours 🤔

![](https://media.giphy.com/media/kOIbusN7fPnkk/giphy.gif)

At any rate, I am now in the process of learning about React Router. Wish me luck! ⚛️
Web scraping discord server
Tags: social, discord, webscraping, scraping
Published: 2020-07-26 01:54:04

---
title: Web scraping discord server
published: true
description: 
tags: #social #discord #webscraping #scraping
---

I created a Discord server for web scraping and browser automation enthusiasts.

If you are interested in joining here is the server link - https://discord.gg/u759hFk