teleren/devto huggingface dataset:
I want to be a freelancer, help!
Tags: discuss, help, freelancing
Published: 2018-12-02 02:04:26

---
title: I want to be a freelancer, help!
published: true
description: I have a couple of years with programming and I feel I'm ready to start freelancing. What am I missing?
tags: discuss, help, freelancing
cover_image: https://thepracticaldev.s3.amazonaws.com/i/yyzzktq1avneijwksgpa.png

---

# About me

I'm fairly new to **dev.to**. With less than 5 articles and ( fun stat one of the 57 users from South Africa)
{% link https://dev.to/biros/where-are-dev-users-coming-from-4l53
%}

I have been programming since 2014. I simultaneously taught myself web and android development. By 2015 I had started holding dev tutorials in introduction to java, web design and php for my peers. 2016 I thought I was ready to freelance. Or start a business around it rather. So I had my first client who wanted a site for an NPO, got a 7 month contract to tutor I.T at a local school and was enrolled for a full-time computer science degree. A horrible combination, I had bitten more than I can chew but it was a great learning experience. My grades were bad and my freelancing gig ended badly. Only success was with my well paying tutoring contract.

I thought I was good enough to be an employee, till I started getting involved in developer communities and learning from other developer stories from around the world. This is when I realized that there was so much more to learn.

I have a couple of github projects, mostly unfinished but a few that I'm proud of. I still feel they don't do me enough justice in showcasing my skills.

Anyway, I just updated my [portfolio site](https://sduduzog.github.io). Pointers welcome 😌
This and a new account created in [upwork](https://upwork.com). I got inspired by *@darryldexter* mostly
{% user darryldexter %}


# Question
### _or questions, gee I have so many_ 

* Can I consider freelancing as a full-time occupation?

* How do I start? Given the steps I've taken so far.

* Do I have enough to showcase? Is it enough to land me a client or I still need to work harder?

* What am I missing? I have a portfolio site that has no paid project and I don't have any employment history with software development.

Honestly all types of criticism will be considered positive. Don't hold back, no matter how harsh. Your input will kick start my career.

Thank you 😊
Understanding Array.From() In JavaScript
Tags: javascript, es6, react
Published: 2018-12-02 03:14:29

---
title: Understanding Array.From() In JavaScript
published: true
description: Understanding Array.From() In JavaScript
tags: #javascript #js #es6 #react
---

Post Link : <a href="https://www.skptricks.com/2018/12/understanding-arrayfrom-in-javascript.html" >Understanding Array.From() In JavaScript </a>


This tutorial explains how to use Array.from() function in javascript. The Array.from() method creates a new, shallow-copied Array instance from an array-like or iterable object.

Syntax :
Array.from(object, mapFunction, thisValue)

Parameter          Description
object                   :  Required. The object to convert to an array
mapFunction   :  Optional. A map function to call on each item of the array
thisValue          :        Optional. A value to use as this when executing the mapFunction

Understanding Array.from() in JavaScript 


Convert String to Array :
var a = Array.from('Skptricks');
console.log(a)

Output:-
------------------------
> Array ["S", "k", "p", "t", "r", "i", "c", "k", "s"]


<img src="https://2.bp.blogspot.com/-w1rRcepJhV8/XAJvHsWAicI/AAAAAAAACME/_We9xb3Wo_cUzry8I6x58BHkSIeeNqEqgCLcBGAs/s400/from.png" />
Check If Variable Is A Number In JavaScript
Tags: javascript, es6, react
Published: 2018-12-02 03:12:30

---
title: Check If Variable Is A Number In JavaScript
published: true
description: Check If Variable Is A Number In JavaScript
tags: #javascript #js #es6 #react
---

Post Link : <a href="https://www.skptricks.com/2018/11/check-if-variable-is-number-in-js.html" >Check If Variable Is A Number In JavaScript </a>

This tutorial explains how to check variable is a number in javascript. Lets see the below example, where we have used typeof operator and isNaN() function to verify the variable is number or not.
typeof – If variable is a number, it will returns a string named "number".
isNaN() – Stands for "is Not a Number", if variable is not a number, it return true, else return false.

Using typeof operator :
In this example, we have used typeof operator, and verifying the variable is number or not in javscript.
// In this variable we are storing number... 
var num1 = 758;

// verifying by using typeof operator
 if(typeof num1 == 'number'){
 console.log(num1 + " is a number.");
 }else{
 console.log(num1 + " is not a number.");
 }

Output :
-----------------------
> "758 is a number."

<img src="https://4.bp.blogspot.com/-xW2C8rFYXro/XADFQT2KHtI/AAAAAAAACL4/xJuhnvzLu2kISQKmNCUsyrQLLj31wzcIQCLcBGAs/s400/variable.png" />
How To Remove Duplicate Objects From An Array In Javascript
Tags: javascript, react, es6
Published: 2018-12-02 03:10:20

---
title: How To Remove Duplicate Objects From An Array In Javascript
published: true
description: How To Remove Duplicate Objects From An Array In Javascript
tags: #javascript #react #es6 #react
---

Post link : <a href="https://www.skptricks.com/2018/11/how-to-remove-duplicate-objects-from-an-array-in-javascript.html" >How To Remove Duplicate Objects From An Array In Javascript </a>

This tutorial explains how to remove duplicate objects from an array in javascript. Lets see the below example to build more understanding on this and hoping that may solve your future coding problems. We are using ES6 map and filter methods to remove the duplicate objects from an array. 

How to remove duplicate objects from an array in javascript

Remove duplicate objects from an array :
Lets consider we are having below array of objects with the id and name.

const arr = [
  { id: 2, name: "sumit" },
  { id: 1, name: "amit" },
  { id: 3, name: "rahul" },
  { id: 4, name: "jay" },
  { id: 2, name: "ra one" },
  { id: 3, name: "alex" },
  { id: 1, name: "devid" },
  { id: 7, name: "sam" },
  ];

 we are using below chain functions to filter out unique array value and remove duplicate objects from an array in javascript,

function getUnique(arr, index) {

  const unique = arr
       .map(e => e[index])

       // store the keys of the unique objects
       .map((e, i, final) => final.indexOf(e) === i && i)
  
       // eliminate the dead keys & store unique objects
      .filter(e => arr[e]).map(e => arr[e]);      

   return unique;
}

console.log(getUnique(arr,'id'))

After implementation we will get below output :

> Array 
[Object { id: 2, name: "sumit" }, 
Object { id: 1, name: "amit" }, 
Object { id: 3, name: "rahul" }, 
Object { id: 4, name: "jay" }, 
Object { id: 7, name: "sam" }]

<img src="https://2.bp.blogspot.com/-cZTXKmDZyow/W_-MVXbTyvI/AAAAAAAACLs/U9Mohvy1dPEZw-DUu4Ayu2IuTP9nslZTQCLcBGAs/s400/dup.png" />
How To Reverse A String In JavaScript
Tags: javasript, javascript, react, es6
Published: 2018-12-02 03:05:26

---
title: How To Reverse A String In JavaScript
published: true
description: How To Reverse A String In JavaScript
tags: #javasript #js #react #es6

---

Post Link : <a href="https://www.skptricks.com/2018/11/how-to-reverse-string-in-javascript.html" >How To Reverse A String In JavaScript </a>

his tutorial explains how to reverse a string in JavaScript. We are using reverse method, reduce method to reverse a string in javascript.

How to reverse a string in JavaScript

Method - 1 :
We used split method to split the string into an array of individual strings then chain it to reverse method.

const str = "ABCDEFGH"

let getReverseString = str.split('').reverse().join('')

console.log(getReverseString)

Output :
-----------------------
> "HGFEDCBA"


Method - 2 :
Reverse a string in traditional way using while loop.

function reverseString(str){

  const arr = [...str]
  let reverse= "";

  while(arr.length){
     reverse = reverse + arr.pop()
  }

  return reverse
}

const stringvalue = "ABCDEFGH"

console.log(reverseString(stringvalue))

Output :
-----------------------
> "HGFEDCBA"

<img src="https://3.bp.blogspot.com/-EmU8UkZlLhQ/W_9ntXXwOVI/AAAAAAAACLg/57s1MfWVjaoNsi36sayL0xulQA8u8fBDACLcBGAs/s400/reverse.png" />
How To Get Unique Values In An Array In JavaScript
Tags: javascript, es6, react
Published: 2018-12-02 03:03:31

---
title: How To Get Unique Values In An Array In JavaScript
published: true
description: How To Get Unique Values In An Array In JavaScript
tags: #javascript #js #es6 #react
---

Post Link : <a href="https://www.skptricks.com/2018/11/getting-unique-values-in-javascript.html" >How To Get Unique Values In An Array In JavaScript </a>

In this tutorial we are going to discuss how to get unique values in an array in javascript. Lets see the below examples for more information.



Method-1 :
In this example, we are using Set keyword with Array,from of ES6 feature. A Set is a collection of values, where each value may occur only once.

let values = ["Sumit", "Amit", "Neeraj", "Alex", "Skp", "Sumit", "Sam", "Neeraj", "Obama"];

function unique(arr) {
  return Array.from(new Set(arr))

}

console.log(unique(values))

Output : 
-----------------------
> Array ["Sumit", "Amit", "Neeraj", "Alex", "Skp", "Sam", "Obama"]


Method-2 :
In this example, we are using Set keyword with spread operator of ES6 feature. A Set is a collection of values, where each value may occur only once.

let values = ["Sumit", "Amit", "Neeraj", "Alex", "Skp", "Sumit", "Sam", "Neeraj", "Obama"];

function unique(arr) {
  return [...new Set(arr)]
}

console.log(unique(values))

Output : 
-----------------------
> Array ["Sumit", "Amit", "Neeraj", "Alex", "Skp", "Sam", "Obama"]


<img src="https://2.bp.blogspot.com/-R-K35VCStxQ/W_9bRWiQ3aI/AAAAAAAACLU/CJY0yfUlhfM6H7BmDOHOM5Nj1xBKth3rwCLcBGAs/s400/unique.png" />
Understanding Const In Javascript With Examples 
Tags: javascript, es6, react
Published: 2018-12-02 03:01:40

---
title: Understanding Const In Javascript With Examples 
published: true
description: Understanding Const In Javascript With Examples
tags: #javascript #es6 #react #js
---

Post Link : <a href="https://www.skptricks.com/2018/11/understanding-const-in-javascript-with-examples.html" >Understanding Const In Javascript With Examples </a>

This tutorial explains how to use const keyword in javascript. const statement values can be assigned once and they cannot be reassigned. The scope of const statement works similar to let statements.

const :- It has block level scoping but cannot change the value reference. 
 Point To Remember :
Variables defined with const behave like let variables, except they cannot be reassigned.
we cannot change constant primitive values, but we can change the properties of constant objects. 

<a href="https://www.skptricks.com/2018/11/understanding-const-in-javascript-with-examples.html" >Understanding Const In Javascript With Examples </a>

<img src="https://3.bp.blogspot.com/-ucM9NeY0R6g/W_t8TiiwMII/AAAAAAAACLI/Sk0W7eladbklAIN-tZawb01s2YeRD0cuwCLcBGAs/s400/cons.png" />
What are your programming goals for 2019?
Tags: discuss, goals
Published: 2018-12-02 02:37:42

---
title: What are your programming goals for 2019?
published: true
description: Share your programming goals for next year!
tags: #discuss #goals
---

I asked this question on Twitter but figure this is a good place to continue the conversation. What are your programming goals for 2019? I personally want to become proficient in GraphQL. I've dabbled enough to be intrigued, and now I want to know everything. Your turn! {% twitter 1068948408923230208 %}
How programming Language Works in less than 2mins
Tags: webdev, javascript, python, beginners
Published: 2018-12-02 02:32:30

---
title: How programming Language Works in less than 2mins
published: true
description: How Programming Language works inside the computers.
tags: webdevelopment, javascript, python, beginners
---

Hey, i am <a href='https://twitter.com/Thevenicelive'>Prakash Pawar</a> and today i will try to explain you how Programming Language works inside the computers.

Computer only understands instruction in Machine Language Code.

<img src='https://thepracticaldev.s3.amazonaws.com/i/qusb5yrzouqyqgwuidgl.jpg'/>

But there is a catch that it's harder to write program in Machine Language code.
So we have to write program in Higher level languages like , Java, C++, Ecmascript , Python and more.
The program written in Higher level language is called Source Code.
But we cannot execute this Source Code directly in computer.

<img src='https://thepracticaldev.s3.amazonaws.com/i/ryczomgnrsgizbkah86i.jpg'/>


So we have to convert it into Machine Language Code.
We need some special translators which are programs basically written in Machine Language Code.
And these translators are called Language Processors.

There are 3 types of Language Processors.
1. Compiler
It is used for Higher Level Language.
It reads and execute whole program in once and then throw errors if any occurs.
Higher Level Language which uses compilers are: C, C++, C#, Pascal, Java and more.

2. Assembler
It is used for Assembly Level Language(Mnemonic codes).
It reads Assembly Level Language instructions from given input.

3. Interpreter
It is used for Higher Level Language.
It reads and execute source code line by line and throws error after every line if any occurs.
Higher Level Language which uses interpreter are: Ecmascript, VB Script, Python, Perl and more.

Here i created a FlowChart to understand the process:
(Below in image, Yellow is Compiler, Blue is Assembler, Green is Interpreter)

<img src='https://thepracticaldev.s3.amazonaws.com/i/2037obyooql39nncgvtd.jpg'/>

Thanks for your 2 minutes and that’s it now you know what’s going on inside the machine with your code. If you liked this article let me know via comments and you can <a href='https://twitter.com/intent/tweet?text=%22How%20programming%20Language%20Works%20in%20less%20than%202mins%22%20by%20@Thevenicelive%20%23DEVcommunity%20https://dev.to/thevenicelive/how-programming-language-works-in-less-than-2mins-2j5l'>retweets</a>. You can also read this on <a href='https://medium.com/@thevenice/how-programming-language-works-in-less-than-2mins-8f564fb606d4'>Medium</a>.
Python urldecode on command line
Tags: python, bash
Published: 2018-12-02 01:24:11

I have some logs that contain url with encoded characters and I need to extract some data out of the urls. Searching around lead me to this [stackexchange's answer](https://unix.stackexchange.com/questions/159253/decoding-url-encoding-percent-encoding):-

```
alias urldecode='python3 -c "import sys, urllib.parse as ul;print(ul.unquote_plus(sys.argv[1]))"'
```

Then you can use it as:-

```
urldecode '%22status%22%3A%22SUCCESS%22'
"status":"SUCCESS"
```

Now that's perfect. But the data that I want to decode must be passed through unix pipe, like this:-

```
grep 'status: 504' /var/log/local0* | awk '{ print $10}' | xargs urldecode
```

But this won't work, as xargs won't see the alias. So we alias xargs as well:-

```
alias xargs='xargs '
```

But that however only work for the first line. How to make xargs execute for each line?

```
alias xargs='xargs -L 1 '
```

Now we can run urldecode for each line we piped from grep!
Getting in the Node
Published: 2018-12-02 00:43:56

---
title: Getting in the Node
published: true
description: 
tags: 
---
I have written blogs about using html to create inputs and using JavaScript and jQuery to take in the inputs from the user.  So my next topic is what happens to values from the inputs.  In order to expand on that thought, I have to think about how important Node.js is to web development.

Node.js is an application that enhances the capabilities of JavaScript.  JavaScript is only capable of being run in a browser to make web pages interactive.  Node.js can be run without a browser as a standalone application.   JavaScript is like a train in that it can only be driven on train tracks.  Node.js converts the JavaScript train so that it can be driven on the road.  This creates many more possibilities.  

The biggest use of Node is as a basis for web servers.  A web server takes a client request and gives something back such as a new web page, text information or content.   

Thanks to some great coders, there are packages already available that can be included in applications to create web servers. Node.js uses npm (Node package manager) which has packages that will make development faster and better.  Require loads the libraries installed from npm.  Node modules are built in modules that are automatically installed. 

Packages are created by entering commands into terminal.  In the project folder, enter command `npm init` into terminal to create package.json file.  The package.json file will contain the entry point which is the file that leads to the application.  Express is a node package that is helpful with making routing easier which will help with sending and retrieving information from the server.  To install express, enter command `npm install express` and additional node modules will be added to the folder. 

We are now ready to create schemas to store information and routes to send and receive information.
What is SQL injection?
Tags: security, websites, programming, sql
Published: 2018-11-29 20:24:34

---
title: What is SQL injection?
published: true 
description: Explanation of SQL injection in websites 
tags: security, websites, programming, SQL 
---

SQLI: Short for SQL injection.
DBMS: Short for databse management system. 

Hello everyone! This is my first post so any constructive criticism would be nice! Since I have been learning about Web application hacking and a lot of people on this website are web developers, I hope to make posts on common website vulnerabilities and how to protect your self against them so you don't fall for these! 

**First: What is SQL injection?** 

According to OWASP(Open web application security project) SQL Injection is: 
"A SQL injection attack consists of insertion or "injection" of a SQL query via the input data from the client to the application"(https://www.owasp.org/index.php/SQL_Injection) 

What does this mean? In simple terms this is an injection(meaning typing in commands or queries) into a field with SQL code that allows the manipulation of the websites database. 

**So what does it do exactly?** 

A SQL injection can be dangerous if your website is vulnerable to it and here's some reasons why. If successful a SQL injection can: 

1. Exploit and read sensitive data from the database. 
    A SQL injection if done correctly, can read sensitive data from a DB so something such as phone numbers, addresses, and even passwords (and usually the SQL command would gather ALL of these. So, ALL passwords, ALL addresses, etc. **even the admin!!!**) 
2. Another thing it has the potential to be able to mess with the *actual* data.
    This is pretty straight forward but basically it would be able to insert/update/delete. (**NOTE: This can happen unintentionally if a hacker isn't aware of what they are doing. They could input a SQL injection command and not be familiar with the DB and potentially delete specific data or all of it! Same goes for insert or update. Another reason why you should protect yourself against SQLI!**)
3. Mess with the DBMS. 
    A SQLI can also mess with the DBMS. It has the potential to activate administrative commands(such as shut down DBMS), it can also do things like recover files from the DBMS and even can issue commands to the OS. 

It is important that you protect your website when just starting out and creating it from SQL injection! (And even if you're google or facebook!) In the next couple of posts I will be posting on what the code looks like and how to protect yourself. I certainly hope this was informing for you and again, any feedback would be nice! :) 

Links: [OWASP Article on SQLI](https://www.owasp.org/index.php/SQL_Injection)
       Explanation from youtube on SQLI {% youtube ciNHn38EyRc %}
Today is World AIDS day
Tags: health, aids, self
Published: 2018-12-01 22:02:58

---
title: Today is World AIDS day
published: true
description: December 1st is World AIDS day
tags: health, aids, self
---

Today, December 1st, is World AIDS day. This year the United Nations has been encouraging everyone to **know their HIV status**. Knowing your HIV status is very important not only for yourself but for your sexual partner(s).

Antiretroviral therapy is now amazing and people who are HIV positive can live healthy lives and even stop spreading the virus. But *knowing your status* is crucial —it's the very first step.

So spread the word. Take courage and take the test.
Screencast on Node, Express and MongoDB for beginners
Tags: beginners, mongodb, node, screencast
Published: 2018-12-01 21:11:49

---
title: Screencast on Node, Express and MongoDB for beginners
published: true
description: A great video tutorial by Brad Traversy on Node, Express and MongoDB
tags: #beginner #mongodb #node #screencast
---

I found on Safari Books online a great [introductory video tutorial on Node, Express and MongoDB](https://www.safaribooksonline.com/videos/node-js-express-and/9781789535952). Many screencasts say they're for beginners but are actually hard to follow or assume you know a lot before you can start. This screencast by Brad Traversy of [Traversy Media](https://www.traversymedia.com/) is really good. I've been able to follow along and really learn step by step. 

It begins with a simple CRUD app and then it progressively gets more complex. It ends up with user registration, OAUTH and even security. But if you are a **real beginner** you can learn from this video.

BTW: Safari Books Online has a 10 day free trial. Go and use it!
I created Tim Ferriss' dreamlining and fear-setting exercises in Coda 
Tags: productivity, career
Published: 2018-12-01 19:34:34

---
title: I created Tim Ferriss' dreamlining and fear-setting exercises in Coda 
published: true
description: Tim Ferriss has two exercises for helping you create your ideal lifestyle (Dreamlining) and overcoming your fears (Fear-Setting). I used Coda to create templates for both exercises and got featured in Tim's 5-Bullet Friday.
tags: productivity, career
---

I read and watched Tim Ferriss' blog posts and videos about [Dreamlining](https://tim.blog/lifestyle-costing/) and [Fear-Setting](https://tim.blog/2017/05/15/fear-setting/) and decided to create his exercises using Coda, the startup where I work. After a few iterations, his team found them useful and featured the two templates in yesterday's 5-Bullet Friday newsletter. This was one of the biggest achievements I've had in my career, and shows how perseverance and hard work can yield positive results. If you'd like to check out these templates:

Dreamlining: https://coda.link/dreamlining-devto
Fear-Setting: https://coda.link/fearsetting-devto

![5-Bullet Friday Coda](https://thepracticaldev.s3.amazonaws.com/i/tqosjep7qk3npha0kw7j.jpg)