teleren/devto huggingface dataset:
5 Tips to Become a Better Software Developer.
Tags: developer, beginners, tips, career
Published: 2023-05-15 05:25:16

1. Write clean codes.
2. Write maintainable and scalable code.
3. Don't use magic numbers in your code.
4. Write test codes for testing functionalities of you project.
5. See other's code on regular basis. Talk to your peers about techniques/ technologies they use to solve a particular problem.
APACHEAGE Feature
Tags: apacheage, postgres, feature, blog
Published: 2023-05-15 05:17:56

Apache AGE is a graph database plugin for PostgreSQL that makes it easier to manage and query your data. It uses hybrid query technology, allowing you to perform queries on both relational data and graph data simultaneously with OpenCypher and SQL.


Apache AGE is designed to process graph queries quickly and accurately. It provides fast indexing and efficient query processing, allowing you to get accurate results in a timely manner even with large datasets. Additionally, it offers powerful visualization tools for viewing both graph and relational data, helping users understand complex relationships between elements of the dataset more easily as well as identify patterns within them.

To summarize it all, Apache AGE is a useful tool for managing and retrieving graph data in databases compatible with PostgreSQL. Its hybrid query technology allows it to quickly process information, while its visualization capabilities make understanding the results easier. It is an ideal choice for anyone needing to manage large datasets.

**References**
[https://age.apache.org/overview/](https://age.apache.org/overview/)
Unleash the Power of Promises: A Guide to Asynchronous Programming in JavaScript
Tags: webdev, javascript, beginners, programming
Published: 2023-05-15 05:10:24

Asynchronous programming is an essential technique in modern programming. It allows us to perform time-consuming tasks without blocking other operations and freezing our user interface. One of the most popular ways to implement asynchronous programming in JavaScript is by using promises. In this article, we will discuss asynchronous programming and delve into promises.

**What is Asynchronous Programming?**

Asynchronous programming is a way of executing code that allows the program to continue executing other code while waiting for an operation to complete. This technique is commonly used in modern programming, where we need to perform operations that may take a long time, such as waiting for data to be fetched from a remote server. By using asynchronous programming, we can perform other tasks while we wait for the operation to complete.

Asynchronous programming can be done using callbacks, promises, and async/await. In this article, we will focus on promises.

**What are Promises?**

Promises are a type of object in JavaScript that represents the eventual completion or failure of an asynchronous operation and its resulting value. A promise can be in one of three states: _**pending**_, _**fulfilled**_, or _**rejected**_.

When we create a promise, we tell it what to do and what to return. We can then use this promise to perform other operations while it is running. Once the promise completes, it will return the result, or an error if something went wrong.

Promises have two important methods: `then()` and `catch()`. The `then()` method is called when the promise is fulfilled, while the `catch()` method is called when the promise is rejected.

## Using Promises in Asynchronous Programming

To use promises in asynchronous programming, we create a promise object that represents the task we want to perform. We then use the `then()` and `catch()` methods to handle the result or error of the promise.

Here is an example of how to use a promise to fetch data from a remote server:

```
fetch('https://api.dev.to/data')
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error))

```

In this example, we create a promise by calling the `fetch()` method with the URL of the remote server. We then chain the `then()` method to handle the response, parse the data using the `json()` method, and log it to the console. If there is an error, we catch it using the `catch()` method and log it to the console.

**Conclusion:**

Asynchronous programming is an important technique in modern programming, and promises are an essential part of asynchronous programming in JavaScript. Promises allow us to perform time-consuming tasks without blocking other operations, and they provide an elegant way to handle errors and results. By mastering promises, you can take your JavaScript skills to the next level and build faster, more responsive applications.
PostgreSQL Architecture
Tags: apacheage, postgressql, blog, database
Published: 2023-05-15 05:03:51

PostgreSQL is a popular open-source relational database management system that is widely used by organizations of all sizes for its robustness, reliability, and extensibility. In this blog, we will explore the architecture of PostgreSQL and how it executes statements.

**Server Architecture**

PostgreSQL follows a process-based server architecture, where each connection from a client is handled by a separate process called the backend process. The backend process is responsible for processing queries and returning the results to the client. The server also has a number of other components, including the Process Manager, Connection Manager, Parser, Query Optimizer, and Executor, which work together to handle client requests.

**Configuring PostgreSQL**

PostgreSQL can be configured using its configuration file, which is located in the root of the data directory. The data directory is specified using the ‘-D’ or ‘–pgdata’ switches when starting PostgreSQL using the ‘pg_ctl start’ command.

**Client-Server Connection**

A client connects to a unique, private database process on the server, which is commonly referred to as the backend. The connection is established using PostgreSQL's wire protocol version 3, which has been in use since PostgreSQL version 7.

**Query Modes**

When a query is sent from a client to the server for execution, it can be sent in two query modes - simple query protocol mode and extended query protocol mode.

**Server Statement Execution**

The backend process executes a query based on a memory tree structure called the ‘plan tree.’ The following are the steps involved in executing a statement in PostgreSQL:

1. Parse: In this step, the backend process performs a syntactical parse of the statement to create a parse tree from the query.

2. Rewrite / Parse: The backend process performs a semantic parse of the statement, which includes the validation of the existence of the table and columns, etc. to create a query tree from the query.

3. Rewrite / Rule: In this step, the rule system can rewrite views from the view definition to the table definition.

4. Plan: The planner or optimizer takes a query tree and evaluates all access paths for a given query tree based on ‘cost’. This results in a plan tree of the most optimal path.

5. Execute: The executor takes the plan tree and executes each plan node. It represents a principal step in the plan tree and returns the result to the client.

**Conclusion**

PostgreSQL is a robust and reliable database management system that is widely used in many industries. Its process-based server architecture and use of a memory tree structure for executing statements make it highly efficient and scalable. By understanding the architecture and statement execution process of PostgreSQL, developers can optimize their database performance and build more efficient applications.

**References**
[https://www.yugabyte.com/postgresql/postgresql-architecture](https://www.yugabyte.com/postgresql/postgresql-architecture)
Comparing Vercel Storage and Heroku
Published: 2023-05-15 04:23:45

I tried Vercel Storage.

https://vercel.com/blog/vercel-storage

I compared it with an app that was running on Heroku.

It's Blitz.js, but please don't worry about that too much.

## Diff

```diff
diff --git a/Procfile b/Procfile
deleted file mode 100644
index bc6eb1f..0000000
--- a/Procfile
+++ /dev/null
@@ -1,2 +0,0 @@
-release: npx blitz prisma migrate deploy
-web: npm run start:production
diff --git a/db/schema.prisma b/db/schema.prisma
index 0f8f549..3a35c9b 100644
--- a/db/schema.prisma
+++ b/db/schema.prisma
@@ -2,8 +2,9 @@
 // learn more about it in the docs: https://pris.ly/d/prisma-schema

 datasource db {
-  provider = "postgresql"
-  url      = env("DATABASE_URL")
+  provider          = "postgresql"
+  url               = env("POSTGRES_PRISMA_URL") // uses connection pooling
+  shadowDatabaseUrl = env("POSTGRES_URL_NON_POOLING") // used for migrations
 }

 generator client {
diff --git a/package.json b/package.json
index f6484ea..a1e0358 100644
--- a/package.json
+++ b/package.json
@@ -3,14 +3,13 @@
   "version": "1.0.0",
   "scripts": {
     "dev": "blitz dev",
-    "build": "blitz build",
+    "build": "blitz prisma migrate deploy && blitz build",
     "start": "blitz start",
     "studio": "blitz prisma studio",
     "lint": "eslint --ignore-path .gitignore --ext .js,.ts,.tsx .",
     "test": "vitest run --passWithNoTests",
     "test:watch": "vitest",
-    "prepare": "husky install",
-    "start:production": "blitz start --port $PORT"
+    "prepare": "husky install"
   },
   "prisma": {
     "schema": "db/schema.prisma"
```

- Run migration with `npm run build` instead of `Procfile`
- Replace with the recommended official env for Postgres URLs

## Comparison between Heroku and Vercel

Comparison in this case.

|             | Vercel               | Heroku        |
| ----------- | -------------------- | ------------- |
| Migration   | `npm run build`      | `Procfile`    |
| Deploy time | 1m30s                | 4m            |
| Performance | Good                 | Good          |
| Pricing     | Free (up to 1 Database) | $7.00 + $9.00 |

I didn't expect this comparison table to be realized.

## Conclusion

It's nice. Keep up the good work, Vercel.
I created a car search index using an api!
Published: 2023-05-15 04:13:17

Hello, my name is Dustin Beckford. For a class project I've decided to create a car search index. When a car year make and model is entered in the input fields, the API returns key value pairs that I then append to a div.

You can find the [Link here](https://github.com/xJamoni/front-end-project) along with a readme file that explains my work a bit further.
Unity Project #1
Published: 2023-05-15 04:03:17


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

I'm gonna try (just try) to make The Binding of Isaac in Unity, put as many enemy types as i can, maybe bosses, its just for fun and im just a begginer so its not a big project but its gonna help me to get better with game development
How to work at a slower pace to get less done less efficiently.
Tags: macbookpro, mac, macos, slow
Published: 2023-05-15 03:56:48

## The Problem

You are a hard worker and you're creative and effective at what you do but... often times you find yourself rushing through your work frantically.  

The sheer speed at which you can fly through your operating system is causing you to make errant mistakes.

## the solution

Naturally to achieve such pace in your work, to work so blazingly fast; you're either a Windows or a Linux user - so the solution is to switch to macOS.

On macOS, you have no choice but to move slowly.

No more flying between windows, now you MUST **click** an inactive window **once** to `focus` the window - **THEN** you can interact with it.

No more quickly snapping windows into split screen mode for those impromptu prototypes of a web page, no - now you must hover the cursor for a while over a green blob in order to get the option.

The slowdown benefits are many, I could go on; but ever since I started using macOS - I have to work longer days so I better get back to it.

## Recap

macOS has unlocked a whole new world of un-productivity for me.  It is no mystery to me now why all the mac users I see ALWAYS use the app switcher.  I guess I better fall in line.  There is no hope for macOS multi-monitor support though, just don't do it.  

I hope my sarcasm and suffering has brought you some element of joy (and deterred those pondering the switch - DON'T DO IT).

Farewell.

--suffering macOS / MacBookPro M2 max user
First Python Program
Published: 2023-05-15 03:31:25

****
Decided to learn Python, just because i heard is a good starting language (good to learn to think like a programmer), i actually never practice pseudolanguage or anything like that, i kinda just force my way to learn c#, so i hope it helps in that respect.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/axmuu21jkhi3ntojobfa.JPG)
after 20 min

Oh yeah it's definitely better for begginers, no variable types and easier to read (the syntax is simpler)


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

I'll keep adding to this function as practice
MaveFi - Web3 Knowledge Platform
Tags: cryptocurrency, courses, education, news
Published: 2023-05-15 03:11:45

MaveFi is one of the largest Web3 consumer education and onboarding platform. We want you to join us as you learn, earn, and explore the decentralised economy. We are aiming to develop the ultimate consumer onboarding experience for Web3. MaveFi combines incentivised education, a range of Web3 tools, and a wide selection of onboarding opportunities designed to onboard new consumers. Sign up today, and broaden your Web3 horizons!

[https://mavefi.com](https://mavefi.com)
The Never-Ending Game of Whack-a-Mole: A Hilarious Take on JavaScript Frameworks
Tags: aigenerated, javascript, frameworks
Published: 2023-05-15 03:07:25

Let's face it, frameworks have made our lives easier and our code more efficient. But sometimes, it's good to take a step back and laugh at the absurdity of it all. So, without further ado, let's dive into the wild world of JavaScript frameworks.

Oh boy, where do I even begin with JavaScript frameworks? It seems like every day there's a new one popping up, promising to be the ultimate solution for all your front-end development woes. And let's be real, half of them are just fancy buzzwords slapped together in a way that sounds impressive but ultimately ends up being more confusing than helpful.

Don't get me wrong, I love a good framework as much as the next developer. But sometimes it feels like we're just creating more work for ourselves by constantly jumping from one to the next, trying to stay on top of the latest trends. It's like a never-ending game of whack-a-mole, except instead of moles, it's just different variations of React.

And let's not forget the joy of trying to integrate these frameworks with each other. It's like trying to fit a square peg into a round hole, except the peg is made of spaghetti code and the hole is a black hole of dependencies. You spend hours trying to get everything to work together, only to have it break again the moment you add a new feature.

But hey, at least we can all bond over our shared frustration, right? Maybe one day we'll all just give up and go back to plain old vanilla JavaScript. Or maybe we'll just keep creating new frameworks until the end of time. Who knows? All I know is that I need a drink after trying to figure out which version of Angular I should be using. Cheers to all my fellow JavaScript devs out there, may our code always compile and our dependencies never break.
如何用rust构建openwrt armv7l CPU架构的可执行程序
Tags: rust, openwrt, armv7l
Published: 2023-05-15 03:06:53

- 1、安装`binutils-arm-linux-gnueabihf`

> 如果是ubuntu或者debain就用 `apt install`;macos用`brew install`
```
apt install binutils-arm-linux-gnueabihf
```
> armv7l 依赖的编译器链是：`binutils-arm-linux-gnueabihf`


- 2、利用rustup下载并安装armv7l平台的交叉编译工具链
```
rustup target add armv7-unknown-linux-musleabihf
```
> 需要注意的是rust安装的依赖工具链名称和系统依赖的编译器链的名称不同


- 3、开始编译
```
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABIHF_LINKER=arm-linux-gnueabihf-ld cargo build --target=armv7-unknown-linux-musleabihf --release
```
这里面的几个参数的含义解释：
> 3.1、`CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABIHF_LINKER=arm-linux-gnueabihf-ld`强制指定编译器链；`armv7l`平台就得指定`arm-linux-gnueabihf-ld`;当然指定的方式有很多种,也可以在项目根目录的Cargo.toml中配置，也可以配置环境变量的方式实现：
```
export CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABIHF_LINKER=arm-linux-gnueabihf-ld
cargo build --target=armv7-unknown-linux-musleabihf --release
```
`CARGO_TARGET_`意义等同于`cargo build --target`中的`--target`目标平台的意思；
`ARMV7_UNKNOWN_LINUX_MUSLEABIHF`就是平台在rust中的特定名称，与`--target=armv7-unknown-linux-musleabihf`的`armv7-unknown-linux-musleabihf`一致；
`_LINKER`链的概念，和前面几个参数组合在一块的意思就是：这个平台的构建用哪一个编译器链
> 3.2、`--target=armv7-unknown-linux-musleabihf` 指定平台


> 3.3、`--release` 字面意思就是发行，其实就是要上线的版本的意思，这个参数构建出来文件是经过优化的

- 4、构建结果存放的目录

> `target/armv7-unknown-linux-musleabihf/release`

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

- 5、不同开发环境构建的速度

> 我在centos （16C 32G）上构建的速度要比Macos（M2芯片）上快很多很多，不清楚为什么
On my way!! my coding journey.
Tags: api, javascript, fetching
Published: 2023-05-15 02:52:45

I was working on my first project in my life. This is the first time I was actually doing code by myself. Meaning that I used to see code since I was 19 but I never paid fully attention to it. I usually just coded to pass the class but I never really put effort on it. I had a super little basic knowledge of syntax before I enjoyed FlatIron.
I enrolled to this amazing bootcamp because I have friends who actually work in this area.

I did not know what to do for a project until I saw one of my favorite cartoons when I was a kid which it was digimon so I tried to think on what to code. It was like a flash on my head. I remember I used to have digimon cards and I really enjoyed with them.

A big problem for me was when I had to learn about api. It was a little confusing for me. Before I picked digimon I was checking on all those publics api where they have a lot of data. One of the main reason about getting public digimon api was because it only has name, image and level. It really helped me a lot to understand where and how to use an api. How to really use fetch. The data obtained from an API can be further processed, analyzed, displayed, or utilized in various ways within your application or system.

Working on my project with api and fetch helped me to understand that are both related to making HTTP requests from a client side application to a server to retrieve data or perform actions which is really cool.

const digimonContainer = document.getElementById("digimon-container");

fetch("https://api.example.com/digimon")
  .then(response => response.json())
  .then(data => {
    
    const digimons = data;

    
    digimons.forEach(digimon => {
      const digimonCard = document.createElement("div");
      digimonCard.classList.add("digimon-card");

      const digimonName = document.createElement("h2");
      digimonName.textContent = digimon.name;

      const digimonImage = document.createElement("img");
      digimonImage.src = digimon.image;

      const digimonLevel = document.createElement("p");
      digimonLevel.textContent = `Level: ${digimon.level}`;

      digimonCard.appendChild(digimonName);
      digimonCard.appendChild(digimonImage);
      digimonCard.appendChild(digimonLevel);

      digimonContainer.appendChild(digimonCard);
    });
  })
  .catch(error => {
        console.error("Error:", error);
  });

This code only get Digimon api and returns an array of Digimon objects.Each object contains properties like name, image, and level. It makes a GET request to the api endpoint using fetch, processes the retrieved JSON data, and it creates HTML elements to display the digimon information on the page.
I am excited to keep going on this journey and share my experiences with you. I want to keep learning and I will be keep posting about my coding journey.
My first coding experience for a single page application project
Published: 2023-05-15 02:25:21

This week I had my first experience to write a complete web project on my own as a new software student. I tried to design a app to allow users to search for the imgaes of their choice by using the search query. Here, I want to describe the concepts used in this project to satisfy the project requirements and for the personal records. In this post, I will focus on the javacript function and API method I leanred during this process. 

The API method is the first difficulties I faced and I learned so much about API. API stands for application programming interfaces, allow different software systems to communicate with each other. They expose certain functionalities of an application, which can be accessed by other programs.During my coding experiences in the past months, I used Spoonacular and Pexels as my API sources. Pexels and Spoonacular is a free stock photo and video website, and their API allows us to access their database of food images. We sent a request to their API, and in response, we received a JSON object that contained data about the food images, such as the image URL and photographer name. For the API, I practiced how to use fetch method to retrive data from public APIs, which is the main way I retrived data from public servers. 

Meanwhile, I leanred how to combine fetch method with javascript functions. Functions are a fundamental concept in JavaScript and are used to define reusable pieces of code that perform a specific task. In the project, I try to use several functions to fetch and display the images. For example, I utilized a function to  sends a request to the API and receives a response containing data about the food images. It then maps over the array of photos returned by the API and creates a new array of objects, with each object containing the photo ID, URL, and photographer name. The Javascript function here can posses the capabilities to read, pass, and display data by communicating with both front and back end servers. 

Finally, let's talk about the concept of event listeners. Event listeners are used to detect and respond to user interactions with the web page, such as clicking a button or entering text in an input field. Event listeners to detect when the user clicks a cuisine tab, enters a search query, clicks the randomize button, or clicks the clear button. When a user interacts with the page, the corresponding event listener calls the appropriate function to perform the necessary action, such as fetching new images, filtering the images, or displaying a random image in my project. 

Overall, the first project I did was a great opportunity to work with APIs, functions, and event listeners in JavaScript. It's exciting to see how these concepts can be combined to create a useful and interactive web application.
8 Types of Automation Testing
Tags: testing, automation, programming, devjournal
Published: 2023-05-15 01:32:00

8 Types of Automation Testing you must have to build a reliable system:

1. Unit testing

2. End-to-end Testing

3. Integration Testing

4. Smoke Testing

5. Regression Testing

6. Security Testing

7. Acceptance Testing

8. Performance Testing




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


Thanks for reading this.

If you have an idea and want to build your product around it, schedule a call with [me](https://calendly.com/pragyanatvade).

If you want to learn more about DevOps and Backend space, [follow me](https://dev.to/pragyanatvade).

If you want to connect, reach out to me on [Twitter](https://twitter.com/pragyanatvade) and [LinkedIn](https://www.linkedin.com/in/pragyanatvade/).