teleren/devto huggingface dataset:
Is College Crushing Your Dreams?
Tags: college, crushing, beginners, programming
Published: 2023-04-19 09:21:29

For many students, college is supposed to be the key to unlocking their potential and achieving their goals in life. However, for some, the college experience can be a disappointing and crushing one, leaving them feeling like they are nothing more than robots programmed to work like laborers.

This sentiment is expressed in a recent message from a frustrated college student who feels that their college has done nothing but crush their dreams and potential. According to them, the college system is designed to make students follow directions and conform to a certain mold, without regard for their individuality or unique goals in life.

For the past three years, the student claims to have attended useless lectures and lessons that have no relevance to their approach or goal in life. Assignments and lab files are shoved down their throats, and any attempts to resist or do better are met with ridicule and disdain.

The student argues that this approach is designed to create a class of workers who are trained to do the menial and repetitive work that no one else wants to do. By teaching students to be quiet and never raise their voice against the system, colleges are creating a generation of people who will work tirelessly for hours, without any thought of their own potential or dreams.
The student warns that unless something changes, future generations will be stuck in the same cycle of meaninglessness and despair. They urge colleges to start paying attention to the individual needs and goals of their students, rather than treating them like mindless laborers.

This message highlights the growing concern among students that the college system is failing to meet their needs and expectations. As college costs continue to rise, more and more students are asking themselves whether a college education is really worth it.

While there is no easy answer to this question, it is clear that colleges need to do more to address the concerns of their students. By creating a more personalized and individualized approach to education, colleges can help students achieve their full potential and realize their dreams, rather than crushing them under the weight of a system that values conformity over creativity.
Why UI/UX Design is Crucial for Your Startup's Success
Tags: ux, uxdesign, startup
Published: 2023-04-19 09:16:48


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/47qsvo82ge659cl6vj0d.jpg)

When it comes to building a successful startup, UI/UX design is crucial. UI (user interface) refers to the visual elements of a product or service, while UX (user experience) encompasses the overall feel and usability of the product. These two elements work together to create a seamless and enjoyable experience for the user.

## Stand Out from Competitors
In today's market, there is no shortage of startups and businesses trying to stand out. [UI/UX design](https://www.urlaunched.com/expertise/design) can be the key to setting your startup apart from the competition. A well-designed product or service can create a lasting impression on users and leave them wanting more.

## Increased User Engagement
UI/UX design plays a crucial role in user engagement. A poorly designed product can lead to frustration and disinterest, while a well-designed product can keep users engaged and coming back for more. By focusing on UI/UX design, startups can increase user engagement and create a loyal customer base.

## Improved User Satisfaction
At the end of the day, user satisfaction is what drives the success of a startup. By prioritizing UI/UX design, startups can ensure that their users are satisfied with their product or service. This can lead to positive reviews, word-of-mouth marketing, and increased revenue.

## Conclusion
UI/UX design is crucial for the success of any startup. By focusing on creating a well-designed product or service, startups can stand out from the competition, increase user engagement, and improve user satisfaction. It's important to prioritize UI/UX design from the very beginning of the startup process in order to create a seamless and enjoyable experience for users.
MOT Sample PGBench benchmark
Tags: opengauss
Published: 2023-04-19 09:05:47

**pgbench** is a simple program for running benchmark tests on PostgreSQL. It runs the same sequence of SQL commands over and over, possibly in multiple concurrent database sessions, and then calculates the average transaction rate (transactions per second or TPS). By default, pgbench tests a scenario that is loosely based on TPC-B, involving five SELECT, UPDATE, and INSERT commands per transaction.

To support the optimistic concurrency control (OCC) of the openGauss MOT several minor changes were applied to the standard **pgbench**. The enhanced utility is released as part of the openGauss code under the **contrib** folder.

A pgbench benchmark (26/08/2020) showed that MOT engine outperforms the Disk-engine by factor of x2.4-2.8 times, both higher TPS and lower Latency.

**·** Hardware tested: 2-socket 72 cores x86 server (Intel Xeon Gold 6154 CPU @ 3GHz)
**·** Test Parameters: Transaction=TPCB; Scaling Factor = 100 ;Query Protocol=Prepared

**How to run pgbench with MOT:**
1. To load data into MOT you need to use the “–m” flag like in the following example

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

2. To utilize maximum performance of MOT JIT capabilities it is recommended to use the prepared mode like in the following example

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wstwgncjfndi3f8d80lk.png)
MOT Error Messages
Tags: opengauss
Published: 2023-04-19 08:38:27

Errors may be caused by a variety of scenarios. All errors are logged in the database server log file. In addition, user-related errors are returned to the user as part of the response to the query, transaction or stored procedure execution or to database administration action.

**·** Errors reported in the Server log include – Function, Entity, Context, Error message, Error description and Severity.
**·** Errors reported to users are translated into standard PostgreSQL error codes and may consist of an MOT-specific message and description.
The following lists the error messages, error descriptions and error codes. The error code is actually an internal code and not logged or returned to users.

**Errors Written the Log File**
All errors are logged in the database server log file. The following lists the errors that are written to the database server log file and are **not** returned to the user. The log is located in the data folder and named **postgresql-DATE-TIME.log**.

Table 1 Errors Written Only to the Log File

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

**Errors Returned to the User**
The following lists the errors that are written to the database server log file and are returned to the user.

MOT returns PG standard error codes to the envelope using a Return Code (RC). Some RCs cause the generation of an error message to the user who is interacting with the database.

The PG code (described below) is returned internally by MOT to the database envelope, which reacts to it according to standard PG behavior.

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

Table 2 Errors Returned to the User and Logged to the Log File

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

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

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ugdll07p726rdjhrsvx.png)
Use Vue Exit Intent | A Vue Composable to power your exit intent content
Tags: vue, webdev, javascript, typescript
Published: 2023-04-19 08:30:20

## Vue Composable to handle user's Exit Intent behavior
This is an old refactored package, that I just published on [NPM](https://www.npmjs.com/package/vue-exit-intent).

Be sure to use the latest release.

It's a composable that allows you to easily implement an exit intent strategy in your Vue application.
See the GitHub [repo](https://github.com/nickap/vue-exit-intent), and feel free to contribute.



You can install the package via NPM:
```
npm i vue-exit-intent
```

Then import the composable and use it in your app:
```
<sript setup lang="ts">
import { useVueExitIntent } from 'vue-exit-intent'

const options = {
  LSItemKey: 'local-storage-key',
  handleScrollBars: true
}

const { isShowing, close } = useVueExitIntent(options);
</script>
```

```
<template>
  <yourModalPopUp v-if="isShowing" @close="close"></yourModalPopUp>
</template>
```

You can also use all available helpers like this:
```
const {
  isShowing,
  isAllowedToGetTriggered,
  isUnsubscribed,
  close,
  resetState,
  unsubscribe
} = useVueExitIntent(options);
```
The package comes with a variety of options that allow you to customize the behavior of your exit intent popup. You can find the full list of options in the documentation.

I hope you find it useful. 
Let me know if you have any questions or feedback!
MOT Statistics
Tags: opengauss
Published: 2023-04-19 08:24:13

Statistics are intended for performance analysis or debugging. It is uncommon to turn them ON in a production environment (by default, they are OFF). Statistics are primarily used by database developers and to a lesser degree by database users.

There is some impact on performance, particularly on the server. Impact on the user is negligible.

The statistics are saved in the database server log. The log is located in the data folder and named **postgresql-DATE-TIME.log.**

Refer to STATISTICS (MOT) for detailed configuration options.
MOT Replication and High Availability&MOT Memory Management
Tags: opengauss
Published: 2023-04-19 08:19:56

**MOT Replication and High Availability**
Since MOT is integrated into openGauss and uses/supports its replication and high availability, both synchronous and asynchronous replication are supported out of the box.

The openGauss gs_ctl tool is used for availability control and to operate the cluster. This includes gs_ctl switchover, gs_ctl failover, gs_ctl build and so on.

You may refer to the openGauss Tools Reference document for more information.

**·** To configure replication and high availability –
**·** Refer to the relevant openGauss documentation.

**MOT Memory Management**
For planning and finetuning, see the MOT Memory and Storage Planning and MOT Configuration Settings sections.
MOT Recovery
Tags: opengauss
Published: 2023-04-19 08:17:50

The main objective of MOT Recovery is to restore the data and the MOT engine to a consistent state after a planned shutdown (for example, for maintenance) or an unplanned crash (for example, after a power failure).

MOT recovery is performed automatically with the recovery of the rest of the openGauss database and is fully integrated into openGauss recovery process (also called a Cold Start).

MOT recovery consists of two stages –

**Checkpoint Recovery** – First, data must be recovered from the latest Checkpoint file on disk by loading it into memory rows and creating indexes.

**WAL Redo Log Recovery** – Afterwards, the recent data (which was not captured in the Checkpoint) must be recovered from the WAL Redo Log by replaying records that were added to the log since the Checkpoint that was used in the Checkpoint Recovery (described above).

The WAL Redo Log recovery is managed and triggered by openGauss.

In order to shorten the RTO (secondary node recovery at a failover event) and to speed-up the cold-start, the MOT Engine supports process parallelization of both Redo Log Recovery and Checkpoint Recovery.

Configure the parallel_recovery_workers and parallel_recovery_queue_size settings to change how the Redo Log Recovery (log replay) parallelization works. This effects the RTO.
Configure the checkpoint_recovery_workers setting to change how the Checkpoint Recovery parallelization works. This mostly affects the cold-start time.
See the RECOVERY (MOT) section for additional description and defaults values.

Previous
Machine Learning-The modern way of unleashing hidden possibilities
Tags: machinelearning, ai, machinelearnimodels
Published: 2023-04-19 08:17:36

**Why Machine Learning ?**

I always love to start my blogs with explaining "why" we are even talking about that topic. The reason behind this is that i strongly believe that the "why" should always be clear to us whenever we are heading towards something new. When we have the answer of "what is it?" we basically just "know" the topic but when we have the answer of "why this?" we start understanding the topic. You are maybe thinking that why am i discussing all of these philosophical stuff but these words are for those who will become learners from just readers of this blog.

Getting back to the point, now we will discuss that why Machine Learning had been introduced to human. In typical words Machine Learning is the ability of computational machines to imitate human-like behavior/intelligence. What type of human intelligence we are talking referring to? We are talking about human's ability of recognizing hidden patterns and predicting things. We can teach a machine how to unleash hidden patterns and make predictions based on the patterns. This is basic concept of Machine Learning. Our traditional computation system does not allow the machines to learn from given data by their own but ML allows us to do so. Application of ML in various fields like business, Education, Research etc. has unleashed many hidden possibilities.


**Machine Learning Categories**

There are three ways of a machine to learn from data, discover the hidden patterns and unleash the story behind the dataset. When we train a machine learning model using labelled data which means we tell the machine what the input dataset is about and what to predict is called Supervised Learning. The second way of training an ML model is using un-labelled dataset which means we won't tell the model what is the input dataset about and what to predict. Is is sounding absurd? okay, let me explain this a bit more. Suppose we are giving the medical history of the cardiac patients a doctor has seen in a year as the input dataset to train an ML model. We are not telling the model what we actually want the model to predict. Suppose maximum of the patients who were detected to have severe cardiac issue had diabetes, so if we give the medical history of a new patient who visited to the cardiologist the ML model will be able to predict that whether that person has a severe cardiac issue or not before the physical check-up. 
The third way an ML model can be trained is through reward or punishment based learning which is called Reinforcement Learning. In this method the model will get rewarded(in the form of positive feedback) for producing the desired behaviors and will get punished(in the form of negative feedback) for undesired behaviors.
Simple intro to SSH
Tags: ssh, webdev, programming, security
Published: 2023-04-19 08:17:15

**SSH authentication is based on private and public keys pair.**

![intro-to-ssh-cover](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y6fmz8iflx9gwmd7ztk6.jpg)

User generates a key pair consisting of a _private key_ and a _public key_. The private key is kept securely on the user's computer, while the public key is uploaded to the server.

When the user tries to connect to the server, the server sends a challenge to the client. The challenge is a _random string_ that is encrypted with the server's public key.

The client receives the challenge and decrypts it using its private key. The client sends the decrypted challenge back to the server.

The server verifies that the decrypted challenge matches the original challenge. If it does, the server grants access to the client. else server rejects the connection.

>It's the user that generates their own key pair not the server. The server doesn't send the private key to the user, as that would be a security risk. The private key should always remain on the user's computer and never be shared with anyone else.

Cheers!
8 Things You May Learn Working On Huge Legacy Codebase
Tags: learning, beginners
Published: 2023-04-19 08:10:54

During my career, I have worked both on multi-millions line of code project and brand-new project starting from scratch. What I can say is that you don't handle them the same way !

Here are 8 things I have learned from big projects:

1. It can take weeks to integrate a modification. Just forget about continuous integration, Accelerate, short iterations and that sort of thing. On multi-million lines of codebase with several hours of tests and very poor code coverage, you cannot apply classical "Red-Green-Refactor" TDD approach. You have to adapt, and be Agile 😉

2. Some behaviors are obviously buggy. There are even tests that validate this buggy behavior. And you must never EVER change the buggy behavior at the risk of making a lot of customer grumpy.

3. There is the Guy which is in the project since centuries. He has the knowledge. He has the skills. He has the vision. Without him, the project will go to ruin. And that Guy is underpaid.

4. It is in the end much safer to copy/past another line of if/else than trying to use the abstraction a contractor made 5 years ago for its own dedicated use case.

5. If you need to copy/past a code that can be factorized, either you rework all at once using a common abstraction, either you copy past again (the 1st one is off course the best solution). But do not create an abstraction for your own case and let legacy code as-is. Having several abstractions that do the same thing makes a global rework harder than having the same pattern repeated again and again. Homogeneity is better than specific genericity.

6. There are 2 kinds of behemoth projects: Those with good design and those with poor design. Those with good design have tons of features, and would end up with the same level of spaghetti code if rewritten from scratch. You will learn a lot on these projects.
Those with poor design don't have a lot of feature and would require 10 or 100 times less code if well rewritten. Run away from these. You will just learn how to write bad code.

7. You will never know the whole project, you will always find something you never saw before. But there will be a point where, even if you discover new piece of code every day, you won't learn anything new. You will stay blocked in your comfort zone. Don't fall in this trap, or you will become The Guy we talked at point 3.

8. Be humble. You cannot rewrite the equivalent of several centuries of work in just 6 months.

And you ? What is the biggest codebase you worked on, and what did you learn ?
Azure Functions Tips: disable a function through configuration
Tags: azurefunctions, serverless, azure
Published: 2023-04-19 08:02:00

You can disable an Azure Function in a Function App using Azure portal. 

If you open the Function App in the portal, you can find the `Functions` blade and clicking on it, you have the list of your functions and can disable or enable each of them (using the ellipsis menù on the right).

![The ellipsis menù to disable an Azure Function](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sa1i1iiulgl42sf7xyx1.png)

You can also control the enabling or disabling of a function by changing the app settings of the function app. 
In particular, you can add the following configuration key in the app settings: 

```
AzureWebJobs.<FunctionName>.Disabled
```

where `<FunctionName>` is the name of the function and the value is `true` (or `1`) to disable the function or `false` (or `0`) to enable it. 

![The function app settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tht0yoa5t2k82soao0tv.png)
inout parameters in Swift
Tags: swift, ios, inout, parameter
Published: 2023-04-19 07:56:49

Inout parameters are the parameters which hold the reference to the original variable. Hence, any change in those params directly affects the original variable. 

**How to accept inout param - ** We need to add an additional keyword 'inout' just before the data type of parameter as below.

Below example is a function that swaps the values of the original variables. 
```Swift
func swapValues(x:inout Int,y:inout Int){
   let z = x
   x = y
   y = z
}
```

**How to pass inout values - ** While passing variable to inout type , we need to add the ampersand (&) with variable name. Check below  - 

```Swift
override func viewDidLoad() {
   super.viewDidLoad()
   // Do any additional setup after loading the view.
   print("BeforeSwap-> a->\(a), b->\(b)")
   swapValues(x: &a, y: &b)
   print("AfterSwap-> a->\(a), b->\(b)")
}
```

When you run this code you will see below output - 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0574zj15pazrn6usws2u.png)
How to create a random quotes generator api in NodeJS
Tags: node, javascript, express, quotes
Published: 2023-04-19 07:49:06

## How To Create Random Quote Generator API In Node.js Express

Are you interested in creating API's using Node.js and Express? If yes, then you've come to the right place! In this post, we'll walk you through the steps to create a simple yet powerful quote generator API.

### Prerequisites

Before we dive into the code, let's take a quick look at what we'll be using:

1. Node.js - an open-source, cross-platform JavaScript runtime environment that allows developers to build fast and scalable network applications.
2. Express - a popular framework for building web applications in Node.js.
3. node-quotegen - a simple package that provides a collection of quotes that you can use to generate random quotes.

With these tools in hand, let's get started!

### Step 1: Create a new Node.js project

To create a new Node.js project, open your terminal and run the following command:

```bash
mkdir quote-generator-api
cd quote-generator-api
npm init -y
```

### Step 2: Install Express and node-quotegen

Next, let's install the required packages using the following command:
```bash
npm install express node-quotegen
```

### Step 3: Create the quote generator API
Create a new file called `app.js` and add the following code:

```javascript
const express = require("express");
const { getQuote } = require("node-quotegen");

const app = express();

// Define a GET route to generate random quote
app.get("/api/quote", (req, res) => {
  const quote = getQuote();
  res.json({ quote });
});

// Define a GET route to generate quote from a specific category
app.get("/api/quote/:category", (req, res) => {
  const quote = getQuote(req.params.category);
  res.json({ quote });
});

// Start the server
app.listen(3000, () => {
  console.log("Server listening on port 3000");
});

```
Let's take a look at what's going on here:

First, we import the required modules - `Express` and `node-quotegen`.

We create a new Express app and define two routes:
- A `GET` route that generates a random quote using `getQuote()` function and sends it back as a JSON response.
- A `GET` route that generates a quote from a specific category using the `getQuote()` function and sends it back as a JSON response.

Finally, we start the server and listen on port 3000.

### Step 4: Test the API
To test the API, run the following command in your terminal:

```javascript
node app.js
```

This will start the server, and you should see the message "Server listening on port 3000".

Next, open your web browser and navigate to http://localhost:3000/api/quote. You should see a JSON response with a random quote.

To generate a quote from a specific category, navigate to http://localhost:3000/api/quote/motivational (replace "motivational" with any other category). You should see a JSON response with a quote from that category.

And that's it! You've successfully created a random quote generator API using Node.js and Express. You can now use this API to generate quotes for your web or mobile applications.