teleren/devto huggingface dataset:
Quick MVC Crash Course!
Tags: javascript, node, react, tutorial
Published: 2022-10-04 06:31:08

## Introduction

MVC is an acronym that gets used a lot around the developer community especially with those who are full stack developers. By the end of this post you will be able to understand at a high level what an MVC is and why its so popular among developers.

## So what exactly is an MVC?
Simply put, MVC is an acronym that stands for Model, View, Controller. It's a software architectural design pattern for organizing your code into three different sections or parts that work interdependently. 

Lets dive a little deeper now...

![MVC Diagram](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/le7cxg0btisa9v3obubb.png)

**Model:**  The model purpose is to manage all the data for the application. It handles all business logic and notifies the view whenever something in the database was changed so it can render it for the client to see. The model works with Databases such as MongoDB or Postgresql.

**View:** The view purpose is to contain all the user interface logic for the application. It takes the data from the model and display it on the screen for users to see and interact with. The view usually contains code usually written in a frontend framework such as React, Vue, or Angular.

**Controller:** The purpose of the controller is to be the bridge between the view and the model. When a user interaction is dispatched in the view the controller is listening for that request so it can talk with the model and update the logic and send it back to the view. The controller is the server and can be written in languages such as Node, Python, etc.

So now that you understand what the MVC model is lets take a look at why its so popular...

## Why is the MVC model so popular?
One of the main reasons that the MVC pattern is so popular is because of its flexibility and organization. As I explained before, every component or piece of the MVC model is separated and work interpedently. The reason this matters is because this allows you to modify each part without effecting another. For example, if you decide to change the view in your application from Angular to React, you'll have a lot easier of a time doing so since the View piece is abstracted. Similarly, if you wanted to switch your database from MongoDB to MySQL, you can do this in the model without having to make huge changes across other pieces of your code. Another huge reason is because of the modularity the MVC pattern offers you can have more than one developer work on an application together. You could have someone working on the view while another developer could be working out the logic for the model.
DP-900 Part 3
Tags: azure, cloud, cloudskills
Published: 2022-10-04 06:28:30

Hii! This is the third blog in the series DP-900

In this blog, we will see Job roles

1. DBA or Database administrator

DBA manages database, assign permissions and store backup and restore data.

2. Data engineer

Performs data integration, data cleaning, govern rules, pipeline implementation for transfer of data.

3. Data Analyst

Explores and analyses data, visualize data

DBA works with stake holder, implement policies, tools, manage security, allow/deny access

Data Engineer works with stake holders to design and implement data related workload, cleansing, ingestion pipelines, file stores and data streams, pipeline maintenance, security.

Thanks for reading, in next blogs we will see which services are used by which of these people

Please write in comments if you find any error.
Salary: Why "Do Your Own Research" is terrible advice
Tags: career, money, healthydebate
Published: 2022-10-04 06:27:16

Article was originally called 

> What's the Most Accurate Salary Survey in your Country or Industry?

I renamed it because, as we will see, this is not the real question you should ask yourself.

## Why "do your own research is terrible advice"

I have heard this answer too much and it [makes my bool blood boil](https://dev.to/marcuscreo/the-4-letter-word-word-that-makes-my-blood-boil)

> Friend with an important question: I've been contacted by $company, what do you think I should ask?
> Quick and unhelpful answer: [Just](https://dev.to/marcuscreo/the-4-letter-word-word-that-makes-my-blood-boil) do your own research. [Just](https://dev.to/marcuscreo/the-4-letter-word-word-that-makes-my-blood-boil) look on Glassdoor.

I'm sure some people have found Glassdoor useful. It probably works well for "Web Developer in San Francisco" because that's like 42% of the city population. Does that mean it universally applies, that the data isn't shit or useless elsewhere? Not in my experience.

Do you remember that after hearing the tip "just do your own research" for the first time, you knew exactly what to do? Well good for you, but many developers I know are not like that.

Your friend is asking an important question, she is at risk of being underpaid for many years in her life. And that sucks. 

We can do better than that right?

## Update: we can do better than salary surveys

Terrific response from **Sandor Dargo** in the comments, don't miss it.

{% embed https://dev.to/sandordargo/comment/2242f %}

And to be clear **and don't take surveys from talent.io, hired.com, ... at face value. Always ask a friend whether the values sound actually fair.**

{% embed https://www.youtube.com/watch?v=h8Xpapy6I9E %}
DP-900 Part 2
Tags: azure, cloud, data, beginners
Published: 2022-10-04 06:23:00

Hii! This is the next part in DP900 series. In this we are going to explore databases.

#### What is a database?
A database (DB) is a central system in which data is stored is queried.

#### Relational Database
It is used to query and store structured data. 
Data is stored in tables, represent entities. Each table has a primary key. Keys in relational DB helps in normalizing database.

#### Non Relational Database
It has no relational or tabular schema.
It includes database which stores data as key-value, we can relate it with JSON format.
We have column family databases, columns can be split into 1 to many columns.
We also have Graph databases, which store entities as node, uses link to define relationship.

#### Transactional Data processing

A transactional system records transaction that encapsulates specific events, organization wants to track.

Here transaction can be taken as unit of small work.
Work performed by this system is Online Transaction Processing (OLTP).

OLTP relies on system optimized for CRUD operations, to support transactional workloads.
OLTP enforces transaction which support ACID properties.

Now what are these ACID properties...
A stands for ATOMICITY
Each transaction is treated as single unit, which succeeds or fails completely.
For example: Transfer of money from one account to other bank account should either succeed or fail, nothing else.

C stands for Consistency
Transaction can only take data from one valid state to another.

I stands for Isolation
Concurrent transaction must not interfere with each other, and result in consistent DB state.

D stands for durability
Once transaction committed will be committed.

OLTP supports live applications.

#### ANALYTICAL PROCESSING

It  used read only system, stores vast volume of historical data metrics.

1. Data files are stored
2. Extract, Transform and Load (ETL) process copies data from files to OLTP databases to data warehouse.
Data warehouse is optimized for reading data. Its schema is based on fact table that contains numeric values you want to analyze.

3. Data in warehouse may be aggregate to OLAP model. Aggregate numeric values are calculated from fact table.
4. Data in data lake, warehouse and analytical model is queries.

Some terms we should know : 

1. Data Lakes : Large volume of file based data must be collected and analyzed.

2. Data warehouses : Stores data in relational database which is optimized for read operations.

3. OLAP model : Data storage for analytical workloads
Example : Calculate Sales by region, city, address etc

Thanks for reading this blog :)
Hope you liked it

I have one request to everyone reading this, please do not refer it for preparation. I am writing this as a revision content. 
Also if you find any error in content, mention that in comments, will correct it asap.
RollerCoin, a fun virtual mining game were you earn real crypto! (marketplace now open)
Tags: crypto, blockchain, web3, mining
Published: 2022-10-04 06:13:55

## Join RollerCoin, a virtual Play-to-Earn(P2E) mining game (**getting you a passive income**).

Buy miners split the power what crypto to mine!(ETH, BTC, RollerCoin, Season tokens, BNB, DOGE, SOL,Matic and TRX) 

Play mini-games for more hash,  get free miners and more. Merge miners for bonus hashrate or sell and buy miners on the P2P marketplace (newly open).
You can also from special events such as this season win free exclusive limited edition miners!
Your investment is safe as you always can sell your miners! Make your money work for you in this inflated times!

[https://rollercoin.com/?r=ko8bramg](https://rollercoin.com/?r=ko8bramg)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vo5htz2i190pecg96osz.jpg)
Laravel 8 Custom Email Verification Tutorial
Tags: laravel, laravel8, email, verification
Published: 2022-10-04 06:03:41

In this article, we will see laravel 8 custom email verification. Many web applications require users to verify their email addresses before using the application. Laravel provides convenient built-in services for sending and verifying email verification requests. 

Email verification is the process of checking and authenticating emails that you've been given to ensure that they're authentic and that they're likely to connect you to a real person.

So, we will give you an example of custom email verification in laravel 8. For custom email verification we need some basic requirements like middleware, routes, and mail configuration.

Let's see the email verification laravel 8.
A first look at Bun
Tags: bunjs, node, javascript, webdev
Published: 2022-10-04 06:01:03

Since I heard about Bun, I've been super excited to try it.
And that's precisely what this article will be about.

Before we dive into the nitty gritty of setting Bun up, let's take a moment to talk about what it is.

## What is Bun?

Bun is a brand new JavaScript runtime, much like you know Node and potentially Deno already.
However, they build this one from scratch with speed in mind.
The idea is that we can use Bun for our JavaScript and TypeScript apps.

It comes packed with 90% of the Node-API function, plus it comes with all the fantastic Web APIs like fetch, WebSockets, and so on.

I won't go into the details, but Bun is written on the JavaScriptCore engine instead of the V8 engine. They wrote the code in ZIG, which helps with memory management.
The combination here is what makes it so fast!

## Trying out Bun

Alright, I'm not one for long background stories and am eager to see how it works and performs.
So let's get some applications up and running.

First, let's install Bun.
Open up your terminal and run the following command.

```bash
curl -fsSL https://bun.sh/install | bash
```

Now create a folder, and inside add a `http.js` file with the following contents.

```js
// http.js
export default {
  port: 3000,
  fetch(request) {
    return new Response('Welcome to Bun!');
  },
};
```

Now run the following command in this folder:

```bash
bun run http.js
```

And if we now visit `http://localhost:3000/` we should see the welcome from Bun.

![Bun.js basic web server](https://cdn.hashnode.com/res/hashnode/image/upload/v1664001084437/V7qtsX5KL.png)

As Bun is still very much being developed and limited now, I wouldn't rush to migrate all your applications as some essentials still need to be developed.

However, getting a feel for it is good, as it might become the following big framework for runtimes.

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
Azure DP-900 Part 1
Tags: azure, azurefunctions, cloud, data
Published: 2022-10-04 06:00:20

Hiii everyone!

I was busy as hell from last few months, and now able to get the time. 

This blog is going to be first part of DP-900 Preparation. 
I am mentioning things in brief for revision purpose, please read documentation from MS learn first. Will recommend reading these blogs for revision.

LETS BEGIN TADAA

## EXPLORE CORE DATA CONCEPTS

As the name is data fundamentals, we should know what data is.
Data is collection of facts, number and description.

We have 3 types of data, defined in this course.

1. Structured data

Data which adheres to a fixed schema or tabular format is structured data. All the data has field and properties.
Rows represent data entity, column represent attributes.

Example : A table for storing customer info and their details

2. Semi-structured data

It has structure, but allows some variation.
Example : Customer may have more than one email ID
One such format is JSON

3. Unstructured data

Images/ Audio file/ Video data/ Documents do not have specific structure and fall in this category.

Now we are done with types of data, lets see DATA STORE...

## DATA STORE
Organizations store data in all 3 defined types.

1. File Store
2. Databases

In this file format is used to store data, it depends on type of data and application required to modify it. 

CSV, and TSV files are structured data.

#### JSON
It is good for structured and semi structured data.
Hierarchical document schema is used to define objects that have more than one attributes. Hope you are familiar with JSON format.

#### XML
It is human readable format. Tags are used for element and attributes.

#### Blobs
Images, videos and audio are stores.
These are application specific documents.
It is for unstructured data
It stores file in raw binary

#### Optimized file format
It enables compression, indexing and efficient storage.

- As the name suggests, it is optimized so we can assume it may acquire less space and all

1. Avro
It is a row based format by Apache.
Header is stored in JSON, and data is stored in binary information.
It is *good for compressing data, minimize storage and network bandwidth requirements*. 

Since it optimized file format it  is for compressing data, when data is compressed it take minimum storage.

2. ORC
Optimized row column format
It organizes data into columns rather than rows
Contains stripes of data, hold data for a column.
Stripe has index, data and footer

3. Paraquet
A Columnar data format
It has row groups
Paraquet files contain metadata
It supports compression and encoding schema

Thanks for reading :)
SEE YOU IN NEXT BLOG
Best learning technique
Tags: learning, study, programming, coding
Published: 2022-10-04 05:45:03

---
title: Best learning technique
published: true
description: 
tags: learning, study, programming, coding
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/46jrs03846qbam7vxejr.jpg
---
A few years ago, a friend explained me how he learned technical concepts, and that has completely changed how I learn things. I wish this learning approach is more commonly used in classes.

When we're taught new things, it's very easy to be taught the solutions directly. For example, we might jump straight to learning how to use git or Kafka or neural network without understanding what problems git or Kafka or neural network solve in the first place.

I found myself learn things much faster through problem solving, which involves the following steps:

1. Understand the problem: when it arises, why it's important, who this problem affects. For example, if I want to learn git, I would start with understanding the challenges of version control, such as how to revert back to a previous version and how I can compare two different versions to see how they differ.

2. Attempt to come up with a solution myself. For example, to be able to revert back to any older version of my code, I'll likely have to make copies of my code at different points in time. How do I organize the different copies? How do I keep a log of changes? How do I let users compare the two different versions? What if two people work on the same codebase and create conflicting changes?

3. Implementing this simple solution, even if it's just a simple solution that doesn't scale. This will likely lead me to realize so many other challenges.

4. Compare it with the solution I want to learn, which will give me so much more appreciation of this technology.

Just a random thought for Monday. I'd love to hear if you have any recommendation for a good way to learn technical concepts!
Skeleton loader generator
Tags: webdev, css, ux, skeleton
Published: 2022-10-04 05:41:47

## What's a Skeleton loader?
> It's an animated placeholder for a piece of content that's still loading


## Skeleton Loaders made easier.

You'll find the generator hosted here https://skeleton-loader.web.app

Once opened you'll see 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t4jr32kkd37t1m8r1wdg.png)

## The left column
You'll see the canvas area where you can control your skeleton and do the following

- Modify the skeleton "width/height, background, foreground".
- Enable/Disable the animation.
- Control the animation duration.
- Add/Edit shapes of the skeleton "width/height, position and color"

## The right column
You'll see the preview of your skeleton and below it the important part which is the generated CSS code

## What makes this generator significant?
Simply it generates the skeleton in a single `<div>` which makes it so easy to add it into any webapp.

## The idea
Is that it uses the CSS multiple backgrounds feature to generate it in a single element.
You can check browser compatibility for the generated CSS code from here
https://caniuse.com/?search=multiple%20background

## Finally 
If you're curious to see the code or open a discussion about it or report an issue, the code is hosted on [this Github](https://github.com/minaalfy/skeleton-loader) repo.
props and state
Tags: javascript, jsx
Published: 2022-08-04 16:15:55

The Facebook team created the open-source JavaScript library known as React. It's employed to create complex graphical user interfaces (UIs).

 It is based on the idea of reusable components, which enables you to build intricate user interfaces out of discrete, little pieces of code known as components. 

  JavaScript syntax extension is referred to as JSX. It is a JavaScript add-on that enables us to define the object tree of React using syntax akin to an HTML template. We can write JavaScript that resembles markup and have it returned from a component using merely an XML-like extension.

## The importance of props

The special term "props" in React is used to pass data from one component to another and stands for "properties."

The fact that data and props are being passed in a unidirectional flow is what matters here, though. (from parent to child just one way)

Additionally, since props data is read-only, child components shouldn't alter the parent's data in any way.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yvih3j9ii0ojsd0qfc5u.png)

I'll walk you through using Props step by step.

Define an attribute and its value first (data)

After that, use Props to pass it to any child components.

render the Props in the end. Data

## state 

First, When you want to alter the component when that variable is modified, you utilize "state variables." Activate this post's status. React components only re-render when a state or class is changed. However, because modifying a class variable involves neither, render is not triggered.

State allows us to manage changing data in an application. It's defined as an object where we define key-value pairs specifying various data we want to track in the application.

In React, all the code we write is defined inside a component.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/12a52ok7mpzsbfxdoygk.png)
Fixing Errno::EIO: Input/Output Error when Running Sinatra for Ruby
Published: 2022-10-04 05:11:00

I came across and issue while working on my backend server using Sinatra with Ruby. When I would try to run my server locally on my machine, I would get an error on Sinatra's end saying Errno::EIO, and notifying me that there was an input/output error which was preventing me from fetching data from that endpoint. That error might occur because you're trying to access a port which is already in use. There's a lot of fascinating Computer Science that goes into ports but chances are you're just looking to fix this issue.

In your terminal, you want to kill the port that's currently in use. For this example, I will use port 9292, but you should use whatever port you're trying to access.

In your terminal, type the following:

```
sudo kill -9 `sudo lsof -t -i:9292`
```

Make sure to use backticks, not apostrophes or quotes. If you're interested in exactly what you're typing, I'll direct you [ExplainShell](https://explainshell.com/explain? cmd=sudo+kill+-9+%60sudo+lsof+-t+-i%3A9292%60). If you're uninterested in the specifics just know this this is killing the open terminal.

Now when you try to run your server again, Sinatra will work perfectly. Happy Coding!
Splunk logo in python
Tags: splunk, chiki1601, python
Published: 2022-10-04 05:02:36

Hello friends...

I created Splunk logo using Python...

which is shown below:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mz0evq0xo3ildh3w36xz.jpg)



I am glad that I am implementing Python turtle graphics by making various logos🥳🥳🥳🥳🥳
112. Leetcode Solution in java
Tags: java
Published: 2022-10-04 04:57:35

```java
/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *     int val;
 *     TreeNode left;
 *     TreeNode right;
 *     TreeNode() {}
 *     TreeNode(int val) { this.val = val; }
 *     TreeNode(int val, TreeNode left, TreeNode right) {
 *         this.val = val;
 *         this.left = left;
 *         this.right = right;
 *     }
 * }
 */
class Solution {
  public boolean hasPathSum(TreeNode root, int sum) {
    if (root == null)
      return false;
    if (root.val == sum && root.left == null && root.right == null)
      return true;
    return hasPathSum(root.left, sum - root.val) ||
           hasPathSum(root.right, sum - root.val);
  }
}


```
#leetcode
#challenge
Here is the link for the problem:

https://leetcode.com/problems/path-sum/
Errors and exceptions in python 🐍
Tags: python, programming, testing
Published: 2022-10-04 04:14:35


![errors and exceptions](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2cmjynip7aoapnpoepgn.jpg)
![errors in python](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qbh5bqjq36mqm5c7i88a.jpg)
![syntax error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/09ckonbd0dap7pd4207w.jpg)
![common python syntax error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w836mqh9a7xprm5rkkyz.jpg)
![logical error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w0pvin2jb8447ndfz24c.jpg)
![common python logical error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lrc4nkwcg4002zubamtm.jpg)
![exceptions](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/siykszs3466mbw32lm4o.jpg)
How many times did you give up on learning development?
Tags: codenewbie, webdev, javwscript
Published: 2022-10-04 02:16:49

For those that learned development mostly by themselves, was it a one time achieved journey or did you gave up several times?

I'm in this situation in which i have started and progress until certain extend around 5 since I started back when I was 24. I'm now 30 and thinkig to start again. 

A combination of hard to understand concepts, feeling stupid, progressing without really understanding what came before, and being generally overwhelmed with jargons I think caused me to quit before. 

I wonder, should I even continue? Is this just me or has this happened to anyone? How often does this happen, if it does?


Thank you