teleren/devto huggingface dataset:
Kubernetes CKAD Tips 9 – Rolling Updates in Deployment
Tags: kubernetes, ckad, devops, cloudnative
Published: 2021-03-16 10:11:22

In a real production environment, we don't manage Pods rather Kubernetes deployment manages the Pods. However, if there is a change or update required, we prefer not to shut down the whole environment but rather roll it over slowly. If you have four replicas then probably it will take down one at a time and update 4 pods one after another, rather than doing altogether. This purely depends on the requirement of your application, if you don't want to have any older version running while updating the newer version, you can have the complete update without choosing the rollout kind of behavior.

{% youtube mntc_h6nKAc %}

## Resources 

Subscribe to the Channel [TechTalks-Wriju](https://www.youtube.com/channel/UCUzFKvlZOm3ukAiF59B_HgQ)

The [Kubernetes and CKAD Playlist](https://www.youtube.com/playlist?list=PLPIVZsyfpXt-wyNY65-aC9Vm_PEsM3pR8)
Real Story : Developers are blaming each other for a fault . 
Published: 2021-03-16 09:52:07

Recently I experienced such incident , in my work place , one Android app developer is being blamed for app crush by backend developer to the HR/Managers . 

The Real real reason was like this from neutral point , the app developer handled the api like the doc given to him earlier. in the mean time , the backend changed.  but app developer didn't know any of that changes. he did not handle every thing properly.
Backend developer didn't keep track with the app dev. 

When the judgement app was tested , it crushed in front of managers and suddenly everyone was angry. 

Backend developer started to blame the app developer , so does the app developer. Many things happened afterwards. Manager joined other ventures. The two dev can't see each other , but working in same company because of partially covid reasons.

The Project eventually failed after working for about 1 year.
TypingDNA is launching a new typing biometrics 2FA solution to replace SMS OTP
Tags: news, security, cybersecurity, programming
Published: 2021-03-16 09:52:02

Introducing [TypingDNA Verify](https://www.typingdna.com/verify): A smarter, user-friendly authentication that replaces SMS 2FA codes, reducing costs by an order of magnitude. First companies to integrate Verify get our service free of charge for the first year.

Let us know what you think in the comments!
What are great developer docs? Looking at Stripe here, let's discuss
Tags: discuss, devrel, docs, devlive
Published: 2021-03-16 09:43:30

Recently I had a chance to work with one of the most honored developer experiences out there - with Stripe, https://stripe.com/docs
Here are a few things I really liked about the docs there and a few flaws I found.

> But to be clear, overall I rate Stripe docs very high.

* (+) First of all, it's awesome. Human readable prefixes in the API keys, omg, why does not everyone do it?!! I.e. `price_******` for a price key and `sub_*******` for a subscription key

* (+) Docs are user story based, which is very cool. It's easy to go with the flow and find what you need. Would totally adapt that. Search is also good, but it is a must nowadays

* (-) The subject area is huge, some specific things are hard to find though, i.e. subscription statuses are teased here and there, but the whole list is only in the API docs

* (-) Some cherry picked dev docs/references are available through the main docs entry point, but others live at https://stripe.dev and there are no easily findable direct links to the server sdks from the main docs

* (+) Server (at least Node.js I worked with) SKDs are exactly like the API reference. This is insanely convenient. I suspect this is one of the reason why the server SDKs are not featured in the main docs

**What do you like and dislike about developer docs, for Stripe or any other product? Share some examples!**
Generate a CSS selector path of a DOM element.
Tags: javascript, css, webdev
Published: 2021-03-16 09:39:59

The task is to generate a CSS selector path of DOM element by implementation of 'generateSelector' function.

**Prerequisites:** You must be aware of the basics of HTML, CSS and JavaScript.

**Approach:**
1. First of all, you need to create an index.html file that consists of any markup code like shown in example code.
2. Create an app.js file that generate unique CSS selector as given below in the code.
3. In the app.js file, when any element is clicked, it will shown in browser console and the generated selector shown on web interface.

**Example:** In this example, In order to get that selectors are unique, We will use :nth-of-type Selectors. _Click on the element to see selector_.

{% codepen https://codepen.io/aniket_chauhan/pen/gOLyGja default-tab=js,result %}

**Note:** This function creates a long, but quite practical unique selector, works quickly.

Comment below if you have any query. I hope you’ll find this article helpful, Thank you for reading :)
Benefits of Online Java Training
Tags: javascript, java
Published: 2021-03-16 09:33:31

java is a well-structured, object-oriented programming language. It is the most preferred language to start a coding career as it has an easy learning curve & several processes run automatically in Java. Thus, it eliminates the need to deep dive into the technical functionalities. Considering the simplicity, popularity & endless scope in Java, many tech enthusiasts enroll in Java online training to acquire the necessary skills and secure lucrative job options. In case you’re also thinking of joining a Java Bootcamp, let’s acquaint you with some of its top benefits.  
Benefits of Java Online Training 
   
 • Cross-platform compatibility- Java codes are compatible with different platforms; thus, once you learn Java, you will be able to build robust applications that can deploy & run on any JVM-based device such as Linux, Microsoft, Mac OS, etc.  
   
 • Java largely supports enterprise applications- Oracle claims that 97% of enterprise applications run on Java, which means thousands of businesses seek skilled Java developers. Hence, taking the best <a href="https://synergisticit.com/java-training_in_bay-area-ca/">java training</a> can be beneficial as you will become competent in developing enterprise applications that can improve the efficiency & productivity of companies.
    
• Numerous high-paying Jobs- Java is always in high demand, generating tons of jobs in the market. If you do a quick job search for Java Developers on Indeed, you will get a whopping 30000+ jobs in some leading companies like IBM, TCS, JPMorgan, etc. Getting skilled through Java online training makes you qualified for the highest-paying job that can provide $85k to $141k per annum. 
   
 • Global Usage- Java is a sole programming language that is highly-scalable. For this reason, Java can be seen everywhere in real-word applications, like mobiles, TVs, desktops, gaming consoles, embedded systems and others. Since Java is used universally, it will never get obsolete in the future; thus, signing in a <a href="https://synergisticit.com/java-training_in_bay-area-ca/">java bootcamp</a> will only future proof your career.

Get all these benefits along with various other perks of learning Java by joining the Java online training.  Reach out to SynergisticIT to get the <a href="https://synergisticit.com/java-training_in_bay-area-ca/">java online training</a>. By the end of the online training, you will be skilled in both advance & core Java with a solid background in programming & a bright future as a Java developer. The online Java training gives you the flexibility to learn at your own pace without needing to cope with the class. So, leverage the opportunity to stabilize your career today by taking Java training.
Git vs. GitHub: an explanation for absolute beginners
Tags: github, git, beginners
Published: 2021-03-16 09:21:58

This is a question a lot of Git beginners have:

> "What is the difference between Git and GitHub?"

It can be confusing to understand their difference when you first encounter these new concepts. In this article I will try to give you some context for how Git and GitHub are related and what that means to you.

Git is the version control software you can use locally on your machine to keep track of changes you make to your projects. Git is an open-source project itself that was made by the team developing Linux operating system to keep track of the changes to their code. There are other version control software beside Git (Subversion, Mercurial, etc), but Git is by far the most common and most powerful.

GitHub is a web service that allows you to store your projects in the cloud using Git. You don't need GitHub to be able to use Git. But if you want to back up your projects in the cloud or share it with others, you can use GitHub.

GitHub is not the only option though. There are at least two other major ones: GitLab and Bitbucket.

Apart from storing your project files and your project's Git history, these services provide other tools that are useful for collaborating with others. Things like code review tools, project management tools, team communication tools, bug tracking, etc.

Sooner or later you will need to collaborate with others on a project. Usually you will do that by uploading your code (**push**ing it) to GitHub. Then others can download (**clone**) your code and start working on it. When they have made some changes and want to share it with you, they **push** it up to GitHub. Then you can **pull** the changes down to your local Git and see what they have done. This is the ground of all collaboration done on GitHub and is the central workflow for all Git projects. 

In order for Git to send your project to GitHub, you need to give your project a **remote** address. You can go to GitHub and create a home for your project, called a **repository**. Then you give the address of that repository to Git. After that you are able to just push your files to its new remote home on GitHub.

You can also download other people's work from GitHub. This process is called **clone**ing. You clone a repository like this:

```bash
$ git clone <address-of-the-repository>
```

You can find the address of the repository from it's GitHub page. It usually looks something like this: `git@github.com:username/some-cool-project-name.git`

So in summary, Git is a version control system and GitHub is a web service that helps you collaborate with others using Git.
I hope this article helped to clear some of the confusion around Git and GitHub! 🙂
I have also created a Git cheat sheet for beginners. If you are interested, grab a free copy from [here](https://chipper-musician-9131.ck.page/fc2d4720ba).
How I started Using ES6 Modules in Node JS
Published: 2021-03-16 09:15:08

---
title: How I started Using ES6 Modules in Node JS
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
---
## How I started Using ES6 Modules in Node JS

A short guide on how I started using ES6 Modules when using Node.

I love the EcmaScript Module syntax and I use it almost in all my code and practices.

I will use the example from [Express Introduction - MDN](https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/Introduction)

So, create a new folder (node-es6):

```shell
mkdir node-es6
```

Inside the folder, initialize a node application by:

```shell
npm init -y
```

Now open the folder using your favorite text editor.

Create a new file `hello.js` and paste the code:

```javascript
// Load HTTP module
const http = require("http");

const hostname = "127.0.0.1";
const port = 8000;

// Create HTTP server
const server = http.createServer((req, res) => {

   // Set the response HTTP header with HTTP status and Content type
   res.writeHead(200, {'Content-Type': 'text/plain'});

   // Send the response body "Hello World"
   res.end('Hello World\n');
});

// Prints a log once the server starts listening
server.listen(port, hostname, () => {
   console.log(`Server running at http://${hostname}:${port}/`);
})
```

Run the file to ensure that it's okay:

```shell
node hello.js
```

If the message shows on the terminal:

```shell
Server running at http://127.0.0.1:8000/
```

Then it's running.

## Using ES6

It's simple to get started, head over to the `package.json` file, and add the line:

```JSON
"type": "module",
```

Your updated file should be like this:

```JSON
{
  "name": "node-es6",
  "version": "1.0.0",
  "type": "module",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}
```

The last step would be to update our js file to use es6 modules"

```javascript
// Load HTTP module
import http from "http";

const hostname = "127.0.0.1";
const port = 8000;

// Create HTTP server
const server = http.createServer((req, res) => {

   // Set the response HTTP header with HTTP status and Content type
   res.writeHead(200, {'Content-Type': 'text/plain'});

   // Send the response body "Hello World"
   res.end('Hello World\n');
});

// Prints a log once the server starts listening
server.listen(port, hostname, () => {
   console.log(`Server running at http://${hostname}:${port}/`);
})
```

Note that I changed

```javascript
// Load HTTP module
const http = require("http");
```
To

```javascript
// Load HTTP module
import http from "http";
```

Run the file to make sure that everything worked as planned.

That's it, Tschuss!!
A Penny For My Thoughts
Published: 2021-03-16 09:14:34

---
title: A Penny For My Thoughts
published: true
description: Tech Talk
tags: 
//cover_image: https://direct_url_to_image.jpg
---

It's the time of the year we get alot of "top language of the year" kind of talks every where. In addition to that, the "What to expect as a dev in the next year" stuff too.

It's not a bad thought to read the stuff, or watch, or listen. I've had friends who switched their tech stack just because some language or tool was mostly used, and it didn't end up well. 

I always advise myself to go with what is good for what I'm trying to solve or create, I wouldn't care what language or tool I use as long as it delivers the desirable results. That's why I avoid "this" vs "this" dubbed items online. At some point they help but no.

I wouldn't rate my success within a 365-day period, that kind of limits my expectations and goals that I want to achieve. I mean, there's no reason or excuse to wait till "next year" to start learning a tech tool or something, like there's nothing to lose by just starting.

A mistake I have done, and maybe still doing is starting alot of projects and not completing them, not even getting halfway done. I regret not finishing them at the same time I don't do nothing about it, procrastinating is a weakness I'll try to get it out of my system.

About a month ago, I made a pact to myself, " Chris, a day shouldn't pass without making at lease a commit on your GitHub projects."

Yeah I know GitHub commits do not prove ones productivity, but on my side, I'm getting better at my coding styles, development styles and even started open source projects, and contributed to some.

When it comes to work, there's a saying in my language "Mchagua jembe si mkulima". It simply translates to anyone in need of assistance, should not choose where the assistance comes from.

I don't have a job, not employed, but I won't just apply for any job available. I feel that I have been shaping myself to be the best and would want to work where my contribution gets the respect ot deserves. I mean it's not bad to want to work for Facebook (my dream employer) ot Netflix or Google or Amazon.

I have a lot of stuff on my head, all I can tell myself is that I will do my best to make myself the best of me, help my colleague and anyone in need.

I will keep doing what I do till I get to being comfortable writing code and making impact.
Syncing A forked Repo with the Parent Repo on GitHub
Published: 2021-03-16 09:13:50

---
title: Syncing A forked Repo with the Parent Repo on GitHub
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
---

## Syncing A forked Repo with the Parent Repo on GitHub


A short guide and a practical reference to [GitHub Documentation on syncing a repo.](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/syncing-a-fork)

> 
It's kind of an 'open-source' hacks

For the guide, I'll be using a  [repo](https://github.com/ChrisAchinga/FbDevcCommunityContent)  I forked from [FbDevcCommunityContent](https://github.com/fbdevelopercircles/FbDevcCommunityContent).

From the terminal, I will change my directory to where the project files are:


![terminal.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1609526934002/J5GB-3Oaz.png)

The first step will be to fetch branches and their commits from the upstream, or the parent repository:

```shell
git fetch upstream
```


![terminal1.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1609527142520/U-XFSLp7m.png)

After that, ensure that you are at the default repository on your remote repo. In my case, the default branch is `master`, and so is the upstream.

To confirm your current branch you are on:

```shell
git status
```

![terminal2.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1609527421779/UqluZLgvi.png)

All set so go ahead and merge with the upstream's master branch:

```shell
git merge upstream/master
```

If you haven't made any changes or commits on your master branch, git will automatically merge the repos and it'll be up to date


![terminal3.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1609527664051/ThwaF-YqQ.png)

Once that is done, update your remote files to GitHub:

```shell
git add .
git commit -m 'synced repo with upstream'
git push
```


![push.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1609527975330/6g9XRasXY.png)

Well, that's pretty much it.
Find the original documentation here:

[https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/syncing-a-fork](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/syncing-a-fork)

https://linktr.ee/chrisdev
Linked List For (!Dummies)
Published: 2021-03-16 09:12:27

---
title: Linked List For (!Dummies)
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
---

## Linked List For (!Dummies)

I started off #100DaysOfCode on the 1st of January 2020 and hit the Linked List topic without looking back.

It is an interesting Data Structure and to be honest, I still am working on it.

So I'll explain what I have understood on LinkedList in a few paragraphs as I continue working on real examples.

## What is a Linked List?

It's a collection of data in a linear structure, and the order of the data isn't determined by their physical order.

A linked list contains Nodes. A Node is a piece of data in the linked list.

In each node is a head (the content/data) and a reference or link to the next Node.

![408px-Singly-linked-list.svg.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1609782632208/vssZQcCs6.png)

Want to learn more about Linked List?

Check out the links below:

[Wikipedia - In dept explanation](https://en.wikipedia.org/wiki/Linked_list#:~:text=In%20computer%20science%2C%20a%20linked,which%20together%20represent%20a%20sequence.)

[Geeks For Geeks - Linked lists](https://www.geeksforgeeks.org/data-structures/linked-list/)

[Tutorialspoint - Linked Lists](https://www.tutorialspoint.com/data_structures_algorithms/linked_list_algorithms.htm)

[JavaScript Algorithms - -Github](https://github.com/trekhleb/javascript-algorithms/blob/master/src/data-structures/linked-list)

**Linked List Data Structure | JavaScript - Video By Traversy Media**

%[https://www.youtube.com/watch?v=ZBdE8DElQQU&t=424s]

Go get the skill!!
Configure AWS Lambda source paths with OpenJS Architect
Tags: cloud, serverless
Published: 2021-03-16 09:04:49


  
Architect originally relied on convention over configuration — meaning you could expect the placement of Lambda function handlers, to appear in default and deterministic locations. Recently, we introduced configurable file paths, which allow you to have more granular configurability over your Architect and Begin projects source code. This might be important for you because you have an existing project structure and conventions or you may need to point your Lambdas at generated build artifacts from something like TypeScript.

Configure source for `get /`  in `package.json`

Define the application Infra as Code (IaC) in `package.json`  under the `arc` key. 

```json
{
  "arc": {
    "app": "begin-app",
    "http": {
      "/": {
        "method": "get",
        "src": "path/to/code"
      }
    }
  }
}
```

Configure source for a larger app in `package.json`

Define IaC for a GraphQL app.

```json
{
  "arc": {
    "http": {
      "/": { "method": "get", "src": "path/to/code"},
      "/api": { "method": "post", "src": "path/to/apollo"}
    }
  }
}
```

This enables you to configure separate source paths for your code for each Lambda function. It is a good idea to separate your code into single responsibility functions. Less code per function means faster cold-starts and deployments. This also makes sharing code and using transpilers a breeze!
Javascript Functions. A quick guide..
Published: 2021-03-16 08:37:26

Functions are often used in JavaScript by developers. In fact, it's used in other programming languages like python as well. But in this article, we'll focus on using functions in Javascript.

Definition of a Function:
A JavaScript function is a block of code designed to perform a particular task.
A JavaScript function is executed when "something" invokes it (calls it).

There are two types of functions. 
✔️ In-built functions
✔️ User defined functions.

🌟 In-built functions are special functions used to perform special tasks.
An example is the .to precision() function, this is used on number data type and it returns a string of that number but to a certain significant figures based on the argument passed into it. 
We also have the .toUpperCase and .to lowercase In-built functions and many other examples.

🌟 Javascript user defined functions are functions created by the user to perform tasks as well like the example below:
 function name(){
    alert("this is my name!");
}
In the example above, name() is a user defined function.

✔️ Function parameters: These are the names listed in the function's definition. For example;
 function sayHello(name){
     alert("Hi," + name);
}
sayHello("David");

Taking a look at this example, the parameter in this function is "name". While the expression sayHello("David") is known as calling the function.

📌 Therefore, note that for a function to be executed, it has to be called just like in the example above.

✔️ Multiple parameters: They can be defined with comma separating them. They're the names listed in the function definition. For example;
 function sayHello(name,age){
  document.write(name + "is" + age + "years old");
}
sayHello("John", 20);

✔️ Function Return: This is used to return a value from the function e.g when making calculation that require a result. For example
 function addNumbers(a,b){
    return a+b;
}
addNumbers(5,6);

✔️ Anonymous Function: Also known as function expression. This is a function assigned to a variable. For example
 var sayBye = function (){
   console.log("Bye");
}
sayBye();
 To read more on Javascript functions, you can go through this link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions
I hope you learnt something new today.
Thank you for reading.