teleren/devto huggingface dataset:
How I am partitioning the HDD for Linux setup.
Tags: linux, discuss
Published: 2019-06-19 14:21:25

The bellow described workflow is not commonly accepted. Even more, I am not sure it can be defined as a "good practice" or "unix way".

Nevertheless, it is very convenient and helps to save my working files during disasters.

Notice that this method is suitable and convenient only for computers that are used by a single user. But well, we are working on "personal computers" after all.

So, I usually have two Linux distributions installed simultaneously. At first for easy disaster recovery and also for experiments when I want to test some distro, or to test my software on different distribution.

At first I am creating the boot and swap partitions if needed.

Then, I am creating two relatively small partitions (20..50GB) for installation of two Linux distributions. 

On the whole remaining space on the HDD I am creating a single huge partition labeled "work".

Then, when I am installing Linux, I am mounting this partition as a **`/work`** directory (yes, on the root of the file system) and later I am placing all my working files in this partition, leaving the **`/home/USERNAME`** directory to the OS to make inside whatever it wants.

This approach has several big advantages:

1. You can use your files in every of the installed OSes on the same path. Even if you are booting from an USB thumb drive or CD, you still can mount the work partition and have access to all your important files.

2. The OS knows nothing about this path, so it will never put its files inside. (in contrast with **`/home/USERNAME`** that Linux owns in all possible ways).

3. The paths to your working files will be always very short and the same.

4. You can always format one or both of the OS partitions and install different Linux distribution, without need to backup your working files somewhere.

Someone may say that you can mount this working partition on **`/home`** or **`/home/USERNAME`**, but this is really bad idea. 

Mainly because booting from different Linux instances will instantly ruin your personal configuration files placed in your home directory. Simply because the different Linux distributions often differs in the way they create and use configuration files.
Weekly Picks #80 — Development Posts
Tags: frontend, webdev, vscode, css
Published: 2019-06-19 14:34:52

---
title: Weekly Picks #80 — Development Posts
published: true
tags: frontend,webdev,vscode,css
canonical_url: https://medium.com/daily-now/weekly-picks-80-development-posts-f8cdca1d1ead
cover_image: https://cdn-images-1.medium.com/max/1024/1*fGFoMbzbtXOjUvOWGy4vTA.jpeg
---

> Ideas are easy. Implementation is hard.

- [Frontend Development is dead. Long live to Frontend Engineering!](https://app.dailynow.co/r/19ca0e9d79128eb1d16d71099970c961) by [Michele Riva](https://medium.com/u/d062237dbca7)
- [Introducing my new project CSSWand!](https://app.dailynow.co/r/10acb9c41870ad4a89057fdb16684962)
- [Why [‘1’, ‘7’, ‘11’].map(parseInt) returns [1, NaN, 3] in Javascript](https://app.dailynow.co/r/4747efafe3b2f7908e388c840535a9e4) by [Eric Tong](https://medium.com/u/6a619d012efe)
- [You Should’ve set up Prettier in 2018](https://app.dailynow.co/r/a4343b91a256c1daad0179337f24ae07) by [Saheel Wagh](https://medium.com/u/92f00f01b417)
- [8 Useful VSCode Add-Ons New Front-end Developers Should Absolutely Download](https://app.dailynow.co/r/79857f56adf0487ab8c2007498844fa2) by [Nicole Peery](https://medium.com/u/be245714f069)
- [30 seconds of code: Learn JS in 30 seconds, one snippet at a time](https://app.dailynow.co/r/457f8ab02ea15738dbe5b720e19b8466)
- [The State of Web Applications](https://app.dailynow.co/r/f006b461914678919717aa98acf44293) by [Richard Ng](https://medium.com/u/6d3e20a4b679)
- [Dot notation vs Bracket notation](https://app.dailynow.co/r/03c36d17ba2a8e717d50b2492a9a5cad) by [Samantha Ming](https://medium.com/u/829a804ea5da)
- [Introduction to PixiJS: An HTML5 2D rendering engine](https://app.dailynow.co/r/9c0ae2dc8d2cb7e11a4be8bcbebca9fa) by [Swathi Prasad](https://medium.com/u/e5046969ba1f)
- [How I debug CSS with Chrome Devtools](https://app.dailynow.co/r/50d4097fac548ae79890ec2174359ff0) by [aliceyt](https://medium.com/u/f5786b0a91de)

* * *

[_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*7bwIhcH467BKX5Ni8XWpQg.jpeg)](https://www.dailynow.co/)
JavaScript developer's visualization and design
Tags: uml, visualstudiocode, design
Published: 2019-06-19 12:56:20

A few weeks ago I made a small contribution to a github repo. This is actually something I do often when I want to try out stuff from another developer; I clone the repo, usually there's some outdated dependencies or error in the installation instruction, how hard is it to fork it and make a PR? Usually this is highly appreciated.

In this case it was a project that I use very often, which is a plugin in Visual Studio Code called [yUML](https://marketplace.visualstudio.com/items?itemName=JaimeOlivares.yuml). I use this to visualize my code, or idea before I key it in. It is very simple; 

1. you create a new *.yuml file, and type one of the following words: [class|activity|usecase|state|deployment|package|sequence] and an example is pre-generated for you, visualizing the diagram desired so you can start tinkering around to your desire. When done, you add `// {generate:true}` to the top and you can import your design in your .md file using `![](./path/to/class.diagram.svg).


I found that the examples were a bit hard to find. So I contributed to the wiki, so whenever you press 'wiki' in the preview, you see my contribution.

Next to that I found two other projects that are similar:

1. [Chart.js Markdown Preview](https://marketplace.visualstudio.com/items?itemName=FlomoN.chartjs-markdown-preview) however this doesn't work on github
2. [Mermaid Editor](https://marketplace.visualstudio.com/items?itemName=tomoyukim.vscode-mermaid-editor) that you can manually generate svg files from, which is not as strict as [yUML](https://marketplace.visualstudio.com/items?itemName=JaimeOlivares.yuml)

I'd love to hear about your (free) visualization techniques that work cross-os without having to install complex programs!
JavaScript and Scope IV - Blocks
Tags: javascript
Published: 2019-06-19 12:34:38

In [JavaScript and Scope I, II, and III](https://blog.toddbiz.com/tags/javascript-scope-series/) we looked at scope and *functions*. What about other statements that use blocks? Blocks being sections of code enclosed by curly brackets `{}`.

For example, we often declare variables in a `for` loop with a block.

```js
var buzz = 3;

for (var buzz = 1; buzz < 10; buzz++) {
  if (buzz === 9) { 
    console.log('for loop buzz:', buzz); // logs 9
  }
}

console.log('global scope buzz:', buzz); // logs 10
```
<div class="jsfiddle-link">
  <a href="https://jsfiddle.net/tchaffee/5m4wk8hu/" target="_blank">Edit in JSFiddle</a>
</div>

When you run the code above, you'll see there is only one `buzz` variable. The one declared in the global scope. The `for` loop changes the global variable. The `buzz` variable will have a value of `10` when the last `console.log` runs.

What about `if` statements?

```js
var cute = 'not';

if (true) {
  var cute = 'cat';
}

console.log(cute); // logs 'cat'
```
<div class="jsfiddle-link">
  <a href="https://jsfiddle.net/tchaffee/Lutdkqsx/" target="_blank">Edit in JSFiddle</a>
</div>

Again, there is only one `cute` variable and the final value of the variable in the global scope will be `'cat'`. The re-declaration of the variable inside the block does not create a new scope and variable.

Both of the examples above are the *opposite* of what we saw for functions. Functions create a new scope for variables. Blocks do *not* create a new scope for variables declared with `var`.

Did you know you can declare blocks all on their own without using an `if` or `for` statement or anything else? I will leave you with this one final very simple example to help you memorize the rule: *blocks do not create a new scope for variables declared with `var`*.

```js
var toto = 'wants';

{
  var toto = 'a puppy';
}

console.log(toto); // logs 'a puppy'
```
<div class="jsfiddle-link">
  <a href="https://jsfiddle.net/tchaffee/17st5cmk/" target="_blank">Edit in JSFiddle</a>
</div>
Is it a good idea to use CLIs to generate projects in JavaScript?
Tags: beginners, help, javascript
Published: 2019-06-19 12:21:01

---
title: Is it a good idea to use CLIs to generate projects in JavaScript?
published: true
description: As a beginner it is a good idea to use CLIs, where most of the time generate many files you don't know their use?
tags: beginner, help, javascript
---

When I generate a project using Angular CLI, React Native CLI or even once with VueJs it is always somewhat troublesome because sometimes they ask questions before generating the project that as a beginner, you don't understand half of what they are asking and when it is generated, there are many files you don't know what they do. 

I am not a total beginner in Javascript, used jQuery for years and even Angular 2+ in some personal projects. I certainly know more about Angular fundamentals like components, modules, services, dependency injection, two-way binding and so on than what all that configuration files even mean. 

Is it everything thing there necessary at the beginning of a project? For a true beginner who want to start quickly, it is not one more wall they need to overcome?
Important soft skills for a developer
Tags: discuss, softskills
Published: 2019-06-19 11:31:04

---
title: Important soft skills for a developer
published: true
description: 
tags: #discuss, #SoftSkills
---

So I had a thought, and I'm curious for discussion.  What do you think are some of the most important "soft skills" for developers to pick up.  The kind where you wish someone had told you, or that picking it up helped you in your career.  

For me its the ability to listen and focus on understanding what others are saying before you respond.  Thoughts?
Automate deletion of unused AWS Workspaces
Tags: aws, cloud, cloudcost, awsworkspace
Published: 2019-06-19 11:05:39

Recently, we received way more than expected AWS bill; after using a cost explorer, we found that all this while we were billed for inactive Workspaces also. Practically, it is a tiresome job to keep a check on all the workspaces and terminate them before the billing period ends.
Is there a way where I can automate the filtering and deleting of unused Workspaces?
How to get the next web development project ideas
Tags: webdev, ideas
Published: 2019-06-19 11:08:15

---
title: How to get the next web development project ideas
published: true
tags: Web Development, ideas
canonical_url: https://kevinhq.com/web-development-project-ideas/
cover_image: https://i2.wp.com/kevinhq.com/wp-content/uploads/2019/06/Web-Development-Project-Ideas.png?resize=930%2C512&ssl=1
---

People often ask me do you have web development project ideas? Even one of my past clients, after I finished up his first project, ask me the same question. How to answer such a question? How to get such ideas? Where to get them? How and where to get them? There are plenty of places… 

[Read More »How to get the next web development project ideas](https://kevinhq.com/web-development-project-ideas/)
Automate deletion of unused EBS Volumes
Tags: aws, cloud, ebs, cloudcost
Published: 2019-06-19 10:43:46

Recently, my AWS account was heavily billed because I didn't pay attention to my unused EBS Volume.
We have been trying to pay attention the the unused EBS Volume and delete them, but is there a way to automate it?
Because it is practically difficult to implement the whole procedure manually periodically.
Even if I get notified monthly, it would be of great help.
Any input shall be appreciated.
Using React Navigation with Functional Components
Tags: reactnative, javascript
Published: 2019-06-19 10:32:22

React Navigation is a popular library used with React Native for navigation. It helps us to build navigational apps. Here is a quick guide for implementing React Navigation with Functional Components.
I have been using `react-navigation` with Class Components but haven't ever used them with Functional Components. Recently I was working on a small project to learn hooks and came across the issue of using `reat-navigation` with Functional Component. Unfortunately there was no documentation available on the officail website. I hope this article helps anyone who is looking to setup navigations with functional components.

_Note: If you're new to React Navigation, I recommend you to go through their [official docs](https://reactnavigation.org/) to understand the basics._

**Creating A Stack Navigator**

Creating a stack navigator is same as that for Class Components. We use the createStackNavigator method and pass objects.

```javascript
import { createAppContainer, createStackNavigator } from 'react-navigation'

// Importing the screens
import Home from './src/Home'
import Article from './src/Article'

const AppNavigator = createStackNavigator({
    Home: {screen: Home},
    Article: {screen: Article},
    },
    {
        // Specifing Initial Screen
        initalRoute: 'Home'
    }
);

const App = createAppContainer(AppNavigator);

export default App;

```

**Create Home Screen (Class Component)**

We will create the Home screen by making Class Component to understand the difference.

```javascript
import React from 'react'
import { View, Text, TouchableOpacity } from 'react-native'

export default class Home extends React.Component {

    static navigationOptions = {
        // Sets the title of the Header
        title: 'Home',
    };

    render () {
        return (
            <View>
                <TouchableOpacity
                    onPress={()=>{this.props.navigation.navigate('Article')}}
                >
                    <Text>Click Here</Text>
                </TouchableOpacity>
            </View>
        )
    }
}

...

```

To convert this Class component into a Functional Component the most important thing to keep in mind here is that `navigationOptions` is a static method.

_Static methods aren't called on instances of the class. Instead, they're called on the class itself._

Since we can't create instances of Functional Components, we call the method on the functional component.
The navigation object is passed as a prop.

**Create Home Screen (Functional Component)**

```javascript
import React from 'react'
import { View, Text, TouchableOpacity } from 'react-native'

const Home = ({navigation}) =>(
    <View>
        <TouchableOpacity
            onPress={()=>{navigation.navigate('Article')}}
        >
            <Text>Click Here</Text>
        </TouchableOpacity>
    </View>
)

Home.navigationOptions = () => {(
    title:'Home'
)}

...

export default Home
```

This was a small demo, I hope it will help you!
Json-node-normalizer 1.0.1 released - New easy method to normalize json data
Tags: javascript, webdev, node, opensource
Published: 2019-06-19 10:09:04

If you need to normalize #json data, take a look at 'json-node-normalizer' opensource #nodejs module: 
https://github.com/benjamin-allion/json-node-normalizer

Easy way to convert/cast some data types using #jsonschema & #jsonpath.
My first time talking at a meetup!
Tags: blogging, ruby, rails, meetup
Published: 2019-06-17 04:14:56

---
title: My first time talking at a meetup!
published: true
description: I gave a talk (a lightning talk) at the Ruby Peru meetup
tags: blogging, ruby, rails, meetup
---

As the title says, I gave my first ever lightning talk at a meetup (Ruby Peru), and I'm still thrilled about it! It was a little over a month ago, but y'know... procrastination is a thing. Anyways! Here is the post I've been wanting to share with you all.

I talked about Model-level validations on Rails as it's a topic I find really useful and perhaps needed when creating a web-app. The thing that stuck with me the most is the fact that _we **can't** trust the users_, so I told myself: "Why not share that and the way we can stop evil users from crashing our web-app with everyone? It's _really_ interesting if you ask me." So... that's what happened :)

A huge thanks to my instructors who were the ones that made this possible :) Even though, I was a bit unsure at first, everything went well :D It was definitely an honor!

[Here are my slides in case you want to know more about model-level validations on Rails :D](https://docs.google.com/presentation/d/1Q3L-6N_bogYCKyzkDYaPFoV2fo--bDUP4v5PSEGY14A/edit?usp=sharing)
My Experience after 2.5 years on my first job as a Web Designer
Tags: career, selfimprovement
Published: 2019-06-19 09:53:09

---
title: My Experience after 2.5 years on my first job as a Web Designer
published: true
description: I describe my journey on my first job
tags: Career, self-improvement
cover_image: https://images.unsplash.com/photo-1489844981779-7f06e8e0fdbb?ixlib=rb-1.2.1&auto=format&fit=crop&w=889&q=80
---
<p>It all start in 2016, 25 November.</p>

<p>4 Months after finishing up my graduation I landed my first job in the industry, I started working as a web designer in a small company.</p>

<p>It was a very good experience for my first job. I had to learn a lot and quite fast.</p>

<p>I started by re-designing the company's website and some optimizations to the SEO.</p>

<h2>1 Year and a half in the company</h2>

<p>It was very exciting but after one year and a half everything started to change. By this time I was starting to work with a lot of things unrelated to my professional career.</p>

<p>My role was Web Designer and at this time I was working as a digital marketeer, cable managment, printer technician, TI guy, content writer, photographer and so on.</p>

<p>The career path on this company was changing for me. My learning curve was dropping really fast and I had too much work for one person. I barely touched code by this time.</p>

<h2>2 Years in the company</h2>

<p>After 2 years on this company I found my real passion, Web Development. Since then I've been learning a lot about web development at home after work.</p>

<p>I've applied for some jobs but failed most of them because i didn't have a good professional background.</p>

<p>My boss found out about this and he started to get a bit upset. He started blaming me for everything that was not going so well in the company even if it wasn't directly connected to me.</p>

<h2>2 Years and a half in the company</h2>

<p>Now I feel more secure about my knowledge, even though I still feel I'm not that good but I am moving forward.</p>

<p>I haven't found another company yet but it really is the time to get going. I feel that I am not being  too much productive because of the bad environment that has settled in.</p>

<h2>It was a good experience</h2>

<p>It was a good experience for a first time. I learned a lot about different subjects and how to deal with people but I was also stuck in my technology stack.</p>

<p>I now want to change my career path. I'll be following my dream to become a web developer. I am going to disappoint a lot of people but my time at this company has reached the end.</p>

<p>Sorry for the long post :)</p>

<p>

Photo by&nbsp;<a href="https://unsplash.com/@greenpjy123?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Jiyeon Park</a>&nbsp;on&nbsp;<a href="https://unsplash.com/search/photos/time-to-move?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></p>
How do you handle improper function arguments?
Tags: discuss, testing, javascript
Published: 2019-06-19 09:06:08

I've recently been thinking about how to improve my code patterns to give my work a more consistent and easy to understand feel. 

Working functionally means that every function must return a response. If a function was to receive incorrect arguments, then how should it respond? 

Returning `false` for any anomalous behaviour (invalid input/error catch) and handling that in the parent is the best solution I have come up with. 

**How do you handle this scenario?**
FCC tribute project: a tribute to Avicii by rohil
Tags: freecodecamp, tributepage
Published: 2019-06-19 08:59:03

---
title: FCC tribute project: a tribute to Avicii by rohil
published: true
description: My fcc tribute page project
tags: freecodecamp, tributepage
---

https://codepen.io/Rcrisp/pen/NZNwMP
ALGORITHM CHALLENGE: 1
Tags: algorithms, go, rust
Published: 2019-06-19 06:26:44

# Challenge
```
This time no story, no theory. The examples below show you how to write function accum:

Examples:

accum("abcd") -> "A-Bb-Ccc-Dddd"
accum("RqaEzty") -> "R-Qq-Aaa-Eeee-Zzzzz-Tttttt-Yyyyyyy"
accum("cwAt") -> "C-Ww-Aaa-Tttt"

The parameter of accum is a string which includes only letters from a..z and A..Z.

```

# Solution

```rust
fn format_string(word: &str) -> String{
    let mut result: Vec<char> = vec![] ; //This is where we store our result which is array of character
    let mut conversion: Vec<char>; 
    for (i,c) in  word.chars().enumerate(){
         if i > 0{
            result.append(&mut vec!['-']);
         }
         result.append(&mut c.to_uppercase().collect());
         conversion = c.to_lowercase().collect();
         for _x in 0..i {
            // you need to clone else it prints seems a series of same object append and print only one
            result.append(&mut conversion.clone());
         }
    }
    return result.iter().collect();
}
fn main(){
     println!("{:?}", format_string("RqaEzty"))
}
```

```go
//go implementation coming soon
```
MEAN Stack Application Tutorial | Build a MEAN Application From Scratch | MEAN Stack Tutorial
Tags: mongodb, angular, node, javascript
Published: 2019-06-19 05:24:18

The "MEAN Stack Application" tutorial will help you to create a Full Stack MEAN Application from scratch. Each section of code has been explained to provide a better understanding. You will learn about following technologies while going through this video: Angular, Node.js, Express.js and MongoDB

{% youtube k0iGvadr_Cc %}
Learn How the Cloud Can Help Your Business
Tags: cloudcomputing, aws, businessgrowth, cloudtechnology
Published: 2019-06-19 04:21:22

---
title: Learn How the Cloud Can Help Your Business
published: true
description:Cloud Computing for Business Growth
tags: cloudcomputing, AWS, businessgrowth, cloudtechnology
---

Last week I completed my first presentation on cloud computing.  This session in particular focused on how cloud computing can help small businesses operate more efficiently and effectively.  The technology also allows organizations to grow by focusing on their products and services and not the technology needs.  

I focus on three cases studies of businesses that use the cloud - SmugMug, Zillow and Lyft.  

Points that I focus on:
Reliability
Availability
Reduce latency time
Cost savings with auto-scaling

When preparing for this presentation I had a goal of being informative but not instructional.  I couldn't resist ending the presentation sharing how Amazon Web Services is providing resources like AWS Educate CSforALL and Girls Who Code