teleren/devto huggingface dataset:
Balancing Full-Time Work, A Family & A Full-Stack Web Development Bootcamp: The Next 2 Months
Tags: webdev, beginners, react
Published: 2023-07-08 07:58:28

## Where to start...

**CHANGE** and lots of it. As I head into months 4 & 5 I find my personal and work life changing drastically and keeping up with a full time software bootcamp at the same time seemed challenging to same the least.

## Work:
In work I have started a new role; same capacity, same company, just different office, with a different team. With this transfer my schedule was adjusted from working Days to Nights. This was a huge change but was needed to meet my non-tech work goals. 

## Life:
With the schedule change of course my personal life is thrown askew. I find myself not enjoying those early morning coffees and getting to get up when my son wakes up first thing in the morning. Although these are the little things I miss, oh so much, I know it is just for the time being while I work to make the best for us all. When there is a will, there is a way and I know I will get back to days soon enough.

## School:
Now about school.. With the changes in work and life the past 2 months I found myself falling behind some weeks and then getting ahead others. I struggled to stick to my 1 hour of school work a day. For the first month or so, waking up in the afternoon before work, I just could not pull myself to get the laptop out and do school. As I have adjusted I have gotten better, and getting back in that groove. Part of what has kept me going is getting to really dive deep into React, something a work friend introduced me to & said I "NEEDED to learn." I have really enjoyed React. Such a useful JavaScript library that has so much to learn with the use of components & ability to only re-render components that have been changed, rather than updating the entire webpage. At the end I made it through Phase 2 and am excited and ready to see what Phase 3 has in store.

## I Will Let Y'All Go With This:
Do I reject joining this bootcamp? Not at all! In fact, falling behind and catching up has only pushed me to do better in Phase 3. I know I will be able to finish this out and start the next chapter in my career. If I can do it, so can you! Until next time..
Javascript compile time and runtime
Tags: javascript, beginners, webdev
Published: 2023-07-08 07:50:42

In this article I will give a brief about Javascript compilation and runtime. I recommend you to elaborate to these terms to have a deep knowledge of how Javascript is run under the hood.

#### Compile time:
- The phase when Javascript is parsed into machine code - set of instructions for the machine to do as follow.
- The compilation process has 3 phases: - Tokenizing/Lexing - Parsing - Code-Generation.
- All the checking and optimization is done in this compile time.

##### Runtime:
- The phase when the code is done compiled and is invoked to execute.
- In Javascript specifically, the runtime system facilitates storing functions, variables, and managing memory by using data structures such as queues, heaps, and stacks. All these engines are provided by Javascript v8 if you run code in Chrome.
- Ex: NodeJS and Browser runtime provide all the things need to run our Javascript code. The run kit is comprise of Event loop, callback queue and Javascript engines (heap and callstack).

=> When we type and run the JS code in the console browser, the browser will firstly **compile** the code into machine code, and then run the byte code (compiled code) in the environment (JS v8) - which means this in **runtime**. [How JS v8 works](https://cabulous.medium.com/how-v8-javascript-engine-works-5393832d80a7)


### Ref:
- [Javascript - How the engine compiles](https://medium.com/@osmanakar_65575/javascript-how-the-engine-compiles-6df6d5c6439c)
- [MDN - Compile](https://developer.mozilla.org/en-US/docs/Glossary/Compile)
- [Introduction to JS Engines and Runtimes](https://algodaily.com/lessons/introduction-to-js-engines-and-runtimes)
#3 SOLID - Liskov Substitution Principle | Swift | iOS Development
Tags: swift, ios, development
Published: 2023-07-08 07:31:29

> LSP states that objects of a superclass should be replaceable with objects of its subclass without affecting the correctness of the program - Barbara Liskov (1987)


In the below example,
-  We have a class hierarchy representing different shapes: a superclass `Shape` and two subclasses, `Rectangle` and `Circle`.
- The `Shape` class acts as a superclass defining a common interface with the `area()` method.
- Both Rectangle and Circle subclasses inherit from Shape and provide their own implementation of the area() method.

```swift
class Shape {
    func area() -> Double {
        fatalError("Subclasses must override area() method.")
    }
}

class Rectangle: Shape {
    var width: Double
    var height: Double
    
    init(width: Double, height: Double) {
        self.width = width
        self.height = height
    }
    
    override func area() -> Double {
        return width * height
    }
}

class Circle: Shape {
    var radius: Double
    
    init(radius: Double) {
        self.radius = radius
    }
    
    override func area() -> Double {
        return Double.pi * radius * radius
    }
}
```

- In the printArea() function, we accept an instance of Shape as a parameter. 
- The area() method will be dynamically dispatched based on the actual type of the object at runtime, and the correct implementation will be executed.
- This example demonstrates how the Liskov Substitution Principle allows us to treat objects of different subclasses as interchangeable, as long as they conform to the common superclass interface.

```swift
func printArea(shape: Shape) {
    let area = shape.area()
    print("Area: \(area)")
}

let rectangle = Rectangle(width: 4, height: 5)
let circle = Circle(radius: 3)

printArea(shape: rectangle) // Output: Area: 20.0
printArea(shape: circle)    // Output: Area: 28.274333882308138
```
Coding 101: What's the Difference between Designers & Developers?
Tags: codenewbie, beginners, discuss
Published: 2023-07-08 07:00:00

_This week's discussion series is dedicated to helping beginners on their coding journey by addressing common doubts and misconceptions. We will delve into fundamental concepts, explore essential tools, and shed light on industry practices, providing clarity and guidance to those who are new to coding. If you're an experienced developer, your valuable insights, explanations, and best practices are highly encouraged and appreciated to support and mentor aspiring coders!_

> In the realm of software development, how do we differentiate between designers and developers? Let's exchange thoughts on their unique roles, collaborative dynamics, and the skills they bring to the table

Follow the [CodeNewbie Org](https://dev.to/codenewbieteam) and [#codenewbie](https://dev.to/t/codenewbie) for more discussions and online camaraderie!

*{% embed* https://dev.to/codenewbieteam *%}*
Instant Bug-fixing or Bug-free Code: Which Power Would You Pick?
Tags: discuss, watercooler
Published: 2023-07-08 07:00:00

Would you rather have the ability to instantly fix any bug OR write code without any bugs from the start? 

Join the discussion and share your preference, along with the reasons behind your choice.

Follow the DEVteam for more discussions and online camaraderie!

{% embed [https://dev.to/devteam](https://dev.to/devteam) %}
Microservices architecture examples
Tags: webdev, programming, productivity, softwareengineering
Published: 2023-07-08 07:00:00

Microservices architecture is widely adopted by various organizations across different industries. Here are some examples of companies that have implemented microservices architecture:

1. **Netflix**: Netflix is one of the well-known examples of microservices architecture. Their architecture is composed of hundreds of microservices that handle different functionalities such as user authentication, recommendation engine, content delivery, and billing. Microservices enable Netflix to scale their system, deliver personalized experiences, and continuously roll out new features.

2. **Amazon**: Amazon, one of the largest e-commerce companies, utilizes microservices architecture extensively. Each service within their architecture, such as product catalog, shopping cart, payment processing, and inventory management, operates independently and communicates through well-defined APIs. This allows Amazon to handle high traffic loads, enable rapid development and deployment, and provide a seamless shopping experience.

3. **Uber**: Uber, the ride-hailing platform, has adopted a microservices architecture to power its complex system. Microservices handle different aspects like user management, geolocation, pricing, ride dispatching, and payment processing. The decoupled nature of microservices allows Uber to scale its platform globally, integrate with various third-party services, and deliver real-time experiences to users.

4. **Spotify**: Spotify, the popular music streaming platform, utilizes microservices architecture to deliver a personalized music experience to millions of users. Microservices handle functionalities such as user authentication, music recommendation, playlist management, and social sharing. Spotify's microservices architecture allows them to scale their platform, continuously deliver new features, and handle a vast catalog of music.

5. **Airbnb**: Airbnb, the online marketplace for accommodation rentals, has embraced microservices architecture. Their architecture consists of various microservices responsible for user management, search functionality, booking, payment processing, and reviews. Microservices enable Airbnb to handle a large number of listings, provide a seamless booking experience, and integrate with external services.

These are just a few examples of companies that have adopted microservices architecture to build scalable, resilient, and innovative systems. Microservices architecture has become a popular choice for organizations aiming to build complex, highly scalable applications that can evolve rapidly and deliver a better user experience.
MJGS Newsletter - Pandemonium in cyberspace (Issue #122)
Tags: javascript, tech, webdev, discuss
Published: 2023-07-08 06:59:41

---
title: MJGS Newsletter - Pandemonium in cyberspace  (Issue #122)
published: true
description: A lot of bigger picture stuff swirling around this week, the group vs the individual, access and permission, new tech launches and old tech revivals.
tags: javascript, tech, webdev, discuss
---

Pandemonium in cyberspace  (Issue ##122)

A lot of bigger picture stuff swirling around this week, the group vs the individual, access and permission, new tech launches and old tech revivals.

https://markjgsmith.substack.com/p/mark-smiths-newsletter-07-07-2023

Would love to hear any comments and feedback you have.

[@markjgsmith](https://twitter.com/markjgsmith)
AWS CI/CD Pipeline Creation for AWS ECS - Step by Step
Tags: aws, cloudcomputing, devops, cicd
Published: 2023-07-08 06:37:12

![Day18](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8h6u3m5ayomtvp1vsfa6.png)

[18/30] #30DaysOfAWS Today, AWS CI/CD Pipeline Creation for AWS ECS.

![diagram](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7ac2022slj9a139ge303.png)

**My article link -** https://lasanthasilva.medium.com/aws-ci-cd-pipeline-creation-for-aws-ecs-step-by-step-f9c262186378

Thanks for reading the Article.

[Medium](https://lasanthasilva.medium.com)

[LinkedIn](https://www.linkedin.com/in/lasanthasilva)

[Twitter](https://twitter.com/LasanthaSilva96)
React And Node.js Integration: Step By Step Guide - A New Youtube Video
Tags: javascript, react, node, mongodb
Published: 2023-07-08 06:15:16

{% embed https://www.youtube.com/watch?v=0zatGzwgvsw&list=PLSJnlFr3D-mEn4JLpA4F7UCAX_e5Nmx3q&index=15 %}

I got a lot of requests for a youtube video showing how to connect React with Node.js Express APIs.

So finally it's here.

In this video, you will learn:

✅ How to connect React application with Node.js Express APIs

✅ How to handle form validation

✅ How to fix CORS error

✅ How to access backend API errors to display on the frontend

and much more...

## Closing Points

If you're looking to enhance your skills in JavaScript, React, and Node.js with the MERN stack, then my [YouTube Channel](https://www.youtube.com/@codingmastery_dev) is the perfect resource for you.

The videos in this channel cover a range of topics related to JavaScript, React, and Node.js, including tutorials, code walkthroughs, tips and tricks, best practices, and much more.

Whether you're a beginner or an experienced developer, our content is tailored to help you learn and grow.

You can take a look at the below playlists also.

* [How to Build Unsplash Image Search App Using React](https://www.youtube.com/watch?v=0YoT44j3Jg4) 

* [Express JS + MongoDB Crash Course](https://www.youtube.com/watch?v=GDe8DFZcgoI&list=PLSJnlFr3D-mEn4JLpA4F7UCAX_e5Nmx3q)
    
* [Learn Latest Webpack For Production](https://www.youtube.com/watch?v=ILcb7BD9R90&list=PLSJnlFr3D-mEBWnL0XGa_hpGyiXoI_BIN)
    
* [Redux Toolkit Crash Course](https://www.youtube.com/watch?v=ha2Fh4Vi7xo&list=PLSJnlFr3D-mEmCOE1mjlnsr1A8t5Zrmub)

**If you found this article and video useful, don't forget to subscribe to my [YouTube Channel](https://www.youtube.com/@codingmastery_dev) and hit the bell icon so you will not miss any future video notifications.**

------

**Want to stay up to date with regular content regarding JavaScript, React, Node.js?** [**Follow me on LinkedIn**](https://www.linkedin.com/in/yogesh-chavan97/)**.**
Go Lexical elements: Rune literals pt 2
Tags: go
Published: 2023-07-08 06:00:00

I write a daily email about Go, and this is a repost from my series [Exploring the Go Spec](https://go.dev/ref/spec). You're invited to [sign up](https://boldlygo.tech/daily?utm_source=devto&utm_campaign=runes&utm_medium=blog) and follow along.

<hr>

Let’s continue our exploration of rune literals, which began on Monday. In summary from [yesterday](https://dev.to/tinydevops/go-lexical-elements-rune-literals-pt-1-intro-to-unicode-dn), a rune in Go represents a Unicode code point. Continuing from there…

> ## [Rune literals](https://go.dev/ref/spec#Rune_literals)
>
> A rune literal is expressed as one or more characters enclosed in single quotes, as in `'x'` or `'\n'`. Within the quotes, any character may appear except newline and unescaped single quote. A single quoted character represents the Unicode value of the character itself, while multi-character sequences beginning with a backslash encode values in various formats.
>
> The simplest form represents the single character within the quotes; since Go source text is Unicode characters encoded in UTF-8, multiple UTF-8-encoded bytes may represent a single integer value. For instance, the literal `'a'` holds a single byte representing a literal `a`, Unicode U+0061, value `0x61`, while `'ä'` holds two bytes (`0xc3 0xa4`) representing a literal `a`-dieresis, U+00E4, value `0xe4`.

There are a few things I want to call out about this section of the spec, that aren’t always obvious, or are easily forgotten. Especially if you’re not already very familiar with Unicode.

- A `rune` represents a single “character” (technically: unicode code point, see yesterday's discussion).
- A `rune` is _not_ a single byte. (In fact, `rune` is an alias for `int32`, so it’s actually 4 bytes)
- A `rune` is _not_ necissarily a single visible character, as many visible characters are built by combining multiple codepoints.

As pointed out in the spec, both `'a'` and `'ä'` are valid `rune` literals. The first also corresponds to a single ASCII (or Unicode) byte: `0x61`. The second corresponds to two UTF-8 bytes: `0xc3`, `0xa4`. So it’s immediately clear that a `rune` may contain multiple bytes.

But recall the example from yesterday as well: `'ў'` is a valid rune literal, and represents two bytes: `0xd1`, `0x9e`. But in contrast, the visually identical `'ў'` is not a valid `rune` literal, because it contains two Unicode code points, each of two bytes: `у` (`0xd1`, `0x83`) followed by the breve mark, `˘`, (`0xcc`, `0x86`).

As you might expect, this can be an easy place to get tripped up. What you see on the screen is quite frequently not the whole story. I know of no fool-proof way to solve this confusion. The best I know is to be aware that the confusion exists, so when you see an error along the lines of “more than one character in rune literal”, you know where to begin your search.
MOVE ZEROS IN AN ARRAY LEETCODE SOLUTION C++ |ARSH GOYAL DSA SHEET
Tags: webdev, beginners, programming
Published: 2023-07-08 05:45:01


DESCRIPTION:
Given an integer array nums, move all 0's to the end of it while maintaining the relative order of the non-zero elements.

Note that you must do this in-place without making a copy of the array.

 

Example 1:

Input: nums = [0,1,0,3,12]
Output: [1,3,12,0,0]
Example 2:

Input: nums = [0]
Output: [0]
 

Constraints:

1 <= nums.length <= 104
-231 <= nums[i] <= 231 - 1
 

Follow up: Could you minimize the total number of operations done?



1.NAIVE : PICK NON ZERO ELEMENT PLACE IN TEMP ARRAY  ,REST 0'S
2.OPTIMAL: PICK ZERO INCREMENT ELSE SWAP ZERO ELEMNET WITH NON ZERO ELEMENT

SOLUTION C++:

```
class Solution {
public:
    void moveZeroes(vector<int>& nums) {
        int n = nums.size();
        int i = 0, j = 0;
        while(j<n)
        {
            if(nums[j]==0) j++;//if u found zero ,increment
            else{
                swap(nums[i], nums[j]); //if u found non zero swap it with zero 
                i++;
                j++;
            }
        }
    }
};
   
```
Creating The object in the JavaScript
Tags: webdev, javascript, programming, tutorial
Published: 2023-07-08 05:42:37

- ## _**First Method**_

First of all we create a object of const type then I assign a value to that object and name of that object is object1.
Using the dot operator we access the all element of object1.

```
const object1={a:'Ajeet Rai',b:'Rajat Yadav',c:'Veeresh Maurya'};
console.log(object1.a);  //Ajeet Rai   
console.log(object1.b);   //Rajat Yadav
console.log(object1.c);   //Veeresh Maurya
```

- ## _**Second Method**_

In second method we assign a value to all variable separately and the create a object and assign them.

```
const a='Uttam';
const b='Sudeep';
const c='Shruti';
const object2={a:a,b:b,c:c};
console.log(object2.a);   //Uttam
console.log(object2.b);  //Sudeep
console.log(object2.c); // Shruti
```
- ## _**Third Method**_

In this method only different in the assigning the value of the variable in the object3. see in the below example.

```
const object3={a,b,c};
console.log(object3.a);  //Uttam
console.log(object3.b);  //Sudeep
console.log(object3.c);  //Shruti
```

Hello World!
TWO SUM LEETCODE SOLUTION C++|ARSH GOYAL DSA SHEET
Tags: beginners, welcome
Published: 2023-07-08 05:05:52

DESCRIPTION:
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.

You may assume that each input would have exactly one solution, and you may not use the same element twice.

You can return the answer in any order.

 

Example 1:

Input: nums = [2,7,11,15], target = 9
Output: [0,1]
Explanation: Because nums[0] + nums[1] == 9, we return [0, 1].
Example 2:

Input: nums = [3,2,4], target = 6
Output: [1,2]
Example 3:

Input: nums = [3,3], target = 6
Output: [0,1]
 

Constraints:

2 <= nums.length <= 104
-109 <= nums[i] <= 109
-109 <= target <= 109
Only one valid answer exists.



SOLUTION C++:


```
class Solution {
public:
    vector<int> twoSum(vector<int>& nums, int target) {
        vector<int> ans;
        map<int, int> mpp;
        for (int i = 0; i < nums.size(); i++) {
            int t = target - nums[i];
            if (mpp.find(t) != mpp.end()) {
                ans.push_back(mpp[t]);
                ans.push_back(i);
                break;
            }
            mpp[nums[i]] = i;
        }
        return ans;
    }
};



```
How To Create a Database in PostgreSQL using Git Bash
Tags: webdev, tutorial, database, postgres
Published: 2023-07-08 04:10:16

To create a database in PostgreSQL using Git Bash, you can follow these steps:

**Step 1:** Install PostgreSQL: If you haven't already, download and install PostgreSQL on your computer. Make sure it's properly installed and running.

**Step 2:** Open Git Bash: Launch Git Bash on your computer. It provides a command-line interface to execute commands.

**Step 3:** Access PostgreSQL: In Git Bash, you need to access the PostgreSQL command-line interface (CLI) to create a database. Use the following command to connect:

```
 psql -U postgres
```

This assumes that the default username for PostgreSQL is "postgres". If you have a different username, replace "postgres" with your username.

**Step 4:** Enter Password: After executing the above command, it will prompt you to enter the password for the PostgreSQL user. Type the password and press Enter.

**Side Note:** For security reasons, when entering your password in the terminal, the characters you type won't be displayed. Nevertheless, the system will register what you type. 

**Step 5:** Create Database: Once you're connected to the PostgreSQL CLI, you can create a database using the following command:

```
CREATE DATABASE your_database_name;
```

Replace "your_database_name" with the desired name for your database. Make sure to avoid using spaces or special characters.

**Step 6:** Verify Creation: To confirm that the database was created successfully, you can list all databases using the command:

```
\l
```
This will display a list of all databases, including the one you just created. You can also use pgAdmin4, a management tool for PostgreSQL, to view your existing databases as well. 

**Step 7:** Exit PostgreSQL CLI: When you're finished working with the PostgreSQL CLI, you can exit by typing:

```
\q
```
This will return you to the Git Bash command prompt.

That's it! You have now created a database in PostgreSQL using Git Bash. You can use this database for your applications or further database operations.
Go Gin Framework | Start with Routing
Tags: go, webdev, beginners, programming
Published: 2023-07-08 04:05:35

In this tutorial, you will learn about the Gin HTTP framework in Go (Golang). The Gin framework is a lightweight and fast web framework that simplifies building web applications in Go. This tutorial is the second part of a series focusing on the Gin framework. Whether you're new to Go or looking to enhance your skills, this tutorial will provide you with a step-by-step guide on using the Golang Gin Framework. Get ready to dive into the world of Go and build powerful web applications with ease!

{% youtube vNS_A0Rw7t8 %}

Thanks