teleren/devto huggingface dataset:
My Macbook 
Tags: macbook, apple, backstory
Published: 2020-07-29 17:55:50

---
title: My Macbook 
published: true
description: 
tags: Macbook, apple, linux, backstory
//cover_image: https://direct_url_to_image.jpg
---

Yeah this is another one where you see people praising the gem of the tech world. Let me start from the beginning which is when I was a child I did not had internet at my home but had a computer. 

So once I did pretty good in my school so my brother told me that you can either have internet or a new laptop and I chose internet and since that day onward I was hooked onto my computer like a drug addict to addiction. 

I didn't know much about programming but it sure did sound something I could learn and understand pretty easily. It was not as tough as physics where you had combine math and imagination to find a pattern. Here I could build my own patterns and I did not need to assume something I just had to declare some variables and let them to do rest by talking some wierd one's and zero's to each, yeah I know that's all they know. 

Anyways coming back to macbook, I used windows computers in my early days which are still early I suppose. I was a big fan of windows 7. It was something. Then I got an introduction to something amazing which was Linux and specifically ubuntu 9.04. windows did have a command prompt but it was not as cool as the terminal. The only thing I wanted from my computer was to be perfect. This is where mac comes into place. Introducing apple macbook, yup I am one of the few who was lucky enough to watch Steve jobs on stage live. Linux is great but the beauty with which Apple computer software interacts with its hardware is just mind blowing. I know there are some manufacturers out there which provide the same experience for linux computers also and most of the websites u and I use in our daily life are running on Linux servers. 

I got my first macbook at my 3rd tech job as a front-end developer and boy I always creamed of that moment when I would get my mac and it was finally the time to experience my dream in reality. After I got that macbook I am on a different galaxy. I still love Linux and open source community. 

The ease with which macbook does things is just pure beauty and slowly my macbook turn me into the golum of lord of the rings where I was standing on desk with my macboooook in my hand JK "just kidding" not yet. I know a bit dramatic but I thought u should know the whole story of 


#My Macbook
Should you use brave?
Published: 2020-07-29 17:49:34

If you don't know what brave is, brave a very good browser and a very private browser. 

#Why should you use brave
Brave is a very private browser. Brave browser blocks a whole lot of ads and it also sometimes blocks YouTube ad's. So if you hate ad's this it. You might be like well there is Tor for that. Tor is slow and Brave is not. And guess what Brave is open source so it keep getting better every day. Plus you feel well I think that it should have this, well go and add it, you are a developer after all.

#Conclusion 
Yes you should use brave but keep do not use it as your only browser. Because I did a test on inspecting and it didn't hold up that good. For some more info keep your eye open for a article that will be coming soon about this.
JavaScript Interview Preparation Resources
Tags: javascript, career, webdev, beginners
Published: 2020-07-29 17:46:27

I am a bit tired now, yet I thought I would share these resources that I collected for preparing for my JavaScript Interview Preparation.
I believe it would be beneficial both for the frontend or backend(node.js) role.

##Technical Coding Assessment
Many companies nowadays test their candidates via an online coding platform i.e. HackerRank. It is one of the first barriers to overcome. 
This a source of fear and anxiety for many of us. Only preparation and practice in the right direction can help us get through this step. 
Luckily platform like HackerRank & CoderByte has free interview preparation kit that are meant to help overcoming such fear.
+ <a href="https://www.hackerrank.com/interview/interview-preparation-kit"> HackerRank Interview Prep Kit</a>
+ <a href="https://coderbyte.com/interview-kit/algorithms?fromStart"> CoderByte Interview Prep Kit (Algorithm)</a>

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/66qh4jc9yi141j7dtxaf.jpg)

For algorithm reference, check this repo-

+ <a href="https://github.com/trekhleb/javascript-algorithms"> JavaScript Algo</a>

## Core JavaScript Question
This is where your domain-specific knowledge will be put under test. I am gonna list a few of the most reliable resources that I have curated from the internet and renowned bloggers. 
First, I highly recommend this series from Eric Elliot. I urge you to finish reading all of the posts from the series; it's a great value.

+ <a href="https://gist.github.com/Geoff-Ford/c985b67a1a27deadb970d828b6a90282"> Master the JavaScript Interview (Must)</a> 

Also read this article, if you can-

+ <a href="https://codeburst.io/clearing-your-front-end-job-interview-javascript-d5ec896adda4"> Clearing your Front End Job Interview — JavaScript</a> 


Now, for the rest of the resources- it is important to note that one can't finish all the questions listed in a specific resource. Rather one should try and solve as many as possible with the consistency that s/he can maintain. 
+ <a href="https://dev.to/macmacky/70-javascript-interview-questions-5gfi"> 70 JavaScript Interview Questions (Must)</a> 
+ <a href="https://github.com/sudheerj/javascript-interview-questions#table-of-contents"> Collection of 400+ JavaScript Questions</a> 
+ <a href="https://github.com/lydiahallie/javascript-questions"> JavaScript Multiple Choice To Test Your Knowledge</a> 

## Conclusion
These resources are by no means mine but their respective owners & contributors, I just curated it for better reach. If you know any better resources, plz share in the comment; it'll benefit us.

---
<span>Cover Photo by <a href="https://unsplash.com/@steve3p_0?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Steve Halama</a> on <a href="https://unsplash.com/s/photos/interview?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>
How test script help you write a safety code?
Tags: tdd, javascript, testing
Published: 2020-07-29 17:33:40

Code without test script is like writing an essay without proofreading. End up, full of grammar mistake and typo and is kinda bad for reader. Same goes to code will become buggy and not reliable.

Write a test script may not completely away from bug but it also depends on how comprehensive test you write, the more comprehensive test the more code confident you have.

Let's look at this example...
```javascript
function multiply(num1, num2) {
  return num1 * num2
}

multiply(1, 2) // 2
```
It is a simple multiply function, now let's write test for this function.

```javascript
test('with 1 * 2', () => {
  expect(multiply(1, 2)).toBe(2)
})

test('with times zero', () => {
  expect(multiply(1, 0)).toBe(0)
})
```

Now, your code is tested but not completely. Let's see...

```javascript
multiply(2) // NaN
multiply('o', 1) // NaN
multiply() // NaN
```
See~ We often write the test script in our expected way. This will only ensure the result is expected provided with valid input. What about invalid input? To write a better test script you have to think in negative or unexpected way. 

So, we need to improve our function handling. 
```javascript
function multiply(num1, num2) {
  if (!num1 || !num2) throw 'Invalid or missing params'
  return num1 * num2
}
```
and update our test script also.
```javascript
test('without input', () => {
  expect(multiply()).toBeThrow()
})

test('with invalid input', () => {
  expect(multiply(null, 2)).toBeThrow()
  expect(multiply(null, undefined)).toBeThrow()
})
```
You think now is safe, but not yet! let's see this...
```javascript
multiply('a', 'b') // NaN
```
Gotcha! the way we check is only for parameter undefined or empty. By passing in 2 params with different type it still can pass our test. Let's improve again.

```javascript
function multiply(num1, num2) {
  if (!num1 || !num2) throw 'Invalid or missing params'
  if (!/^[0-9]+/.test(num1) || !/^[0-9]+/.test(num2)) throw 'Invalid params'
  return num1 * num2
}

// test script
test('with invalid input', () => {
  expect(multiply(null, 2)).toBeThrow()
  expect(multiply(null, undefined)).toBeThrow()
  expect(multiply('a','b')).toBeThrow()
})

```

Now, our test is comprehensive and bug free. During development, you may not cover all the use case to test and it is also impossible to know all the use case. That's fine, just fix it while you face it. 
> The more use case are cover the less bug that we can ensure.

### Thank you for Reading!
*feel free to comment is there a better way!*
Trick for React Debugging
Tags: react, javascript
Published: 2020-07-29 17:22:26

## Do you want to see what's actually coming in from the props?

The **JSON.stringify()** creates a JSON string out of the props and you will see everything that's coming in from the routes.

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

The third argument of JSON.stringify(data, replacer, space) is the number of spaces to use for pretty formatting. That means, if you set **4** as your space parameter, the result would be more indented.

You will see something like this, on your page:
```
{
  "name": "Isaque Igor",
  "id": 1,
  "email" : "email@email.com",
  "roles": {
      "isDeveloper": true,
      "isAdmin": true
  }
}
```
How do you work as much as you’re paid for?
Tags: discuss, career
Published: 2018-12-19 00:10:56

I have a habit of being a workaholic and taking on too much work. Trying to be smarter than I should be. I spent a lot of time recently simplifying my answers to questions, accepting that a fix is a fix, even if I don’t know why it was broken in the first place. But recently I’ve become a resource to other members on the team. It’s getting in the way of my work though, and I’m not being paid enough, I’m a junior developer not a senior developer.

How do I tell my coworkers to politely not bother me and look at the documentation instead of asking me simple questions?
Recursion Algorithm Practice: Fibonacci Sequence Generator
Tags: python, programming, algorithms, practice
Published: 2018-12-19 00:08:16

---
title: Recursion Algorithm Practice: Fibonacci Sequence Generator
published: true
description: Trying to make an efficient Fibonacci sequencer in Python
tags: #python #programming #algorithms #practice    
---

>for more of our great content, visit the Coding Duck Blog at: [ccstechme.com/coding-duck-blog](https://www.ccstechme.com/coding-duck-blog)

Hey there Dev community! So, I've got an interview on Thursday for a position at a company near my house. They informed me that recursion algorithm efficiency is important to them and I will be tested on it. Therefore, I will be posting a couple of solutions I've come up with to HackerRank recursion practice problems for a review! Below is my solution to the Fibonacci sequence generator in Python3. I think it is quite good but am open to suggestions for improvement. My test criteria are how quickly my sequence can find the 200,000th Fibonacci number. This solution does it in around 13 seconds (measured with cProfiles) on my local machine. The next closest Python solution I found on HackerRank averaged about 30 seconds on the same setup. What do you all think? Let me know what your questions, critiques, and/or comments are! I look forward to reading them!

```python
def fibonacci(n):
    iterator = 1
    first_fib_num = 0
    second_fib_num = 1
    while iterator < n:
        added_to = first_fib_num + second_fib_num
        first_fib_num = second_fib_num
        second_fib_num = added_to
        iterator+=1
    return(added_to)
        
print(fibonacci(200000))
```
Node Environmental Variables: A Simple Example
Tags: dynamicprogramming, envvariable, node
Published: 2019-02-18 16:47:28

---
title: Node Environmental Variables: A Simple Example
published: true
tags: dynamic programming,env variable,node
canonical_url: https://www.stephencharlesweiss.com/2018/12/18/node-environmental-variables-a-simple-example/
---

This is not going to be a deep dive into Node’s environmental variables, but rather a quick look at how you may use environmental variables.

I wanted to test load balancing an application. This meant I needed a way to dynamically set the port my server would listen on.

This, it turns out, is a great example of how to use environmental variables provisioned from the command line.

These can then be referenced from within the app to set variables – in my case `port`.

# Example: Running multiple instances of the same app on multiple ports

In my server file, `index.js`, I defined my port as: `const port = process.argv[2] || 8081`.

This says that if I fail to pass an explicit port, I will use the default 8081.

However, I can also pass in a variable _after_ node (process.argv[0]), the file node is running (process.argv[1]) and it will be mapped to my port variable.

<script src="https://gist.github.com/stephencweiss/547a744e50c04f53e903e68427bae3db.js"></script>

This is a simple use case. It was also one of the first use cases I came across that helped me see how the process arguments worked in Node.js.

# Additional Resources

- [Process | Node.js v11.3.0 Documentation](https://nodejs.org/docs/latest/api/process.html#process_process_argv)
- [process.env: What it is and why/when/how to use it effectively](https://codeburst.io/process-env-what-it-is-and-why-when-how-to-use-it-effectively-505d0b2831e7)
Creating a Network Graph Using the AnyChart JS Charting Library (Visualizing Game of Thrones Battles)
Tags: javascript, datascience, tutorial, beginners
Published: 2020-07-29 16:55:47

Representing objects as points (called nodes) and connections between them as lines (called edges or links), [Network Graphs](https://www.anychart.com/chartopedia/chart-type/network-graph/) help explore relationships in a network or sections of a network.

Here I'd like to share a tutorial that will guide you through the entire process of creating an interactive Network Graph for the web using JavaScript (HTML5) - on the example of visualizing data about the relationships in the world of Game of Thrones (showing who attacked whom) using the [AnyChart](https://www.anychart.com) JS charting library (free for non-commercial use). No special knowledge is required at all, only some basic understanding of HTML and coding in general. The principle is quite the same for all JavaScript libraries for data visualization.

To start with, check this out - it's a quick demo of the visualization being built along the tutorial:
![Network graph demo visualizing Game of Thrones battles](https://dev-to-uploads.s3.amazonaws.com/i/qxffyrx0ao8z9ltce5nl.gif)

[**See the Network Graph tutorial here.**](https://www.anychart.com/blog/2020/07/22/network-graph-javascript/)
Devart Excel Add-ins Got SSL and SSH Support for Direct Oracle Connections
Tags: ssl, ssh, excel, oracle
Published: 2020-07-29 16:49:03

---
title: Devart Excel Add-ins Got SSL and SSH Support for Direct Oracle Connections
published: true
description: Devart introduced new Excel Add-ins v. 2.5 with SSL and SSH support for direct Oracle connections. 
tags: SSL, SSH, Excel, Oracle
//cover_image: https://direct_url_to_image.jpg
---

Devart, a recognized vendor of database management software and world-class data connectivity solutions for various data connection technologies and frameworks, rolled out new [Excel Add-ins 2.5](https://www.devart.com/excel-addins/) with support for secure SSL and SSH connections to Oracle. Now users can connect both to on-premises Oracle and Oracle Database Cloud — a Database as a Service (DBaaS) solution from Oracle — via secure SSL/TLS and SSH protocols in the Direct connection mode.

For the SSH protocol, Excel Add-in for Oracle supports public key and password SSH authentication. Thus, users can specify authentication type, SSH username and password or a private key and passphrase, acceptable ciphers, SSH host and port, etc. in the Advanced parameters when setting up a connection to Oracle.

Devart Excel Add-ins allow users to work with database and cloud data in Microsoft Excel as with usual Excel spreadsheets. External data can be edited as it is usually made in Excel and then saved back to the data source.

Learn more about the recent release at the official Devart blog - https://blog.devart.com/ssl-and-ssh-support-for-direct-oracle-connections-in-excel-add-ins-2-5.html

About Devart

Devart is one of the leading developers of database tools and administration software, ALM solutions, data providers for various database servers, data integration and backup solutions. The company also implements Web and Mobile development projects.
For additional information about Devart, visit https://www.devart.com/
CASE STYLES IN PROGRAMMING !
Tags: java, computerscience, beginners, career
Published: 2020-07-29 16:31:50

*have you ever came across words like camel case ,snake case and wondered what actually they mean?* :confused: 


# *In this Article I will be elaborating about the different case styles available in computer programming.*

## *The most popular ways to combine words into a single string*:
  ---
 
*  :camel: **camelCase**: Camel case combines words by capitalizing all words following the first word and removing the space, as follows:

**Raw**:
> the unconventional coder

**Camel Case**: 
> theUnconventionalCoder
  ----:point_up_2:--------------:point_up_2:
 
**Use**: Mainly in variable declaration.
 ---

 * **Pascal Case** : Pascal case combines words by capitalizing all words (even the first word) and removing the space, as follows:

**Raw**:
> the unconventional coder


**Pascal Case**:
 > TheUnconventionalCoder

**Use**:  Declaring classes 
 
 ---

*   :snake: **Snake Case** : Snake case combines words by replacing each space with an underscore (_) and, in the all caps version, all letters are capitalized, as follows:

**Raw**:
> the unconventional coder


**Snake Case**:
 > the_unconventional_coder

**Use** : Used for naming constants.

 ---

*  **Kebab Case** :  Kebab case combines words by replacing each space with a dash (-), as follows:

**Raw**:
> the unconventional coder


**Kebab Case**:
 > the-unconventional-coder

**Use** : Used for naming URL's.

 ---



[reference](https://www.chaseadams.io/posts/most-common-programming-case-types/#:~:text=The%20most%20common%20case%20types,Kebab%20case)

Please leave a :heart: if you liked this article!
And feel free to leave any suggestions for me in the discussions panel.
Har2Postman
Tags: postman, har, converter
Published: 2020-07-29 16:30:59

---
title: Har2Postman
published: true
description:  
tags: postman,HAR,converter
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/8q8rrbdakhjv3agpj6g1.png
---
Secrets of reduce in JavaScript
Published: 2020-07-29 16:05:49

JavaScript is an amazing language, almost all websites use it and it gives breath to any webpage by its spectacular features.

One of the amazing methods of javascript is `reduce` which is a method that executes a reducer function (that you provide) on each element of the array, resulting in a single output value.

With this reducer, you can do many amazing things like summing a list of numbers, converting an array to an object, or even more like sorting and optimizing an array.


In this article, I am going to explore the `reduce` method and show some examples of its usage.


`arr.reduce(callback, initialValue);`

callback pass accumulator, currentValue, index, array

So let’s see it in action, and start from simple examples

**1. Summation of an array of a number or object.**
It can be used for summing grades of a student to get an average or to calculate the total cost of an order. 

```javascript
[1, 2, 3, 4].reduce((sum, item) => sum + item, 0)
// 10
```
and
```javascript
[
  { id: 1, product: "shoe", cost: 85.0 },
  { id: 2, product: "sacks", cost: 15.0 },
  { id: 3, product: "belt", cost: 40.0 },
].reduce((sum, item) => sum + item.cost, 0)
// 140
```

**2. Converting an array to an object or an object to an array.**
Let’s say you have a list of names and want to make them into an array of student objects. Or you want to list products in an order.

```javascript
[
  'Shayan',
  'Sara',
  'George',
  'Brent',
  'Elisabeth'
].reduce((obj, item, index) => ({
  ...obj,
  [item]: {
    id: index,
    name: item,
  }
}), {})

// {
//   Shayan: { id: 0, name: "Shayan" },
//   Sara: { id: 1, name: "Sara" },
//   George: { id: 2, name: "George" },
//   Brent: { id: 3, name: "Brent" },
//   Elisabeth: { id: 4, name: "Elisabeth" }
// }
```
and

```javascript
[
  { id: 1, product: "shoe", cost: 85.0 },
  { id: 1, product: "sacks", cost: 15.0 },
  { id: 1, product: "belt", cost: 40.0 },
].reduce((ary, item) => [...ary, item.product], []);

// ["shoe", "sacks", "belt"]
```

**3. Filtering duplicate items within an array of item**

```javascript
[
  'Shayan',
  'Brent',
  'George',
  'Brent',
  'Shayan',
  'Brent'
]
.reduce((ary, item) => (ary.includes(item) ? ary : [...ary, item]) , []);
// ["Shayan", "Brent", "George"]
```

and

```javascript
[
  'Linux', 
  'Mac',
  'Windows',
  'Mac',
  'Linux',
  'Mac'
].reduce((obj, item, index) => ({
  ...obj,
  [item]: {
    id: index,
    name: item,
    count: obj[item] ? ++obj[item] : 1
  }
}) , {});
// ["Shayan", "Brent", "George"]
```

and

```javascript
[
  'Linux',
  'Mac',
  'Windows',
  'Mac',
  'Linux',
  'Mac'
].reduce((obj, item) => ({
  ...obj,
  [item]: {
    id: obj[item] ? obj[item].id : Object.keys(obj).length,
    name: item,
    count: obj[item] ? ++obj[item].count : 1
  }
}) , {});
// {
//   Linux: { id: 0, name: "Linux", count: 2 },
//   Mac: { id: 1, name: "Mac", count: 3 },
//   Windows: { id: 2, name: "Windows", count: 1 }
// }
```

Know any other uses, please comment below :)


Resources:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce