teleren/devto huggingface dataset:
Understand Your Database Schema With ChatGPT
Tags: database, chatgpt, openai, ai
Published: 2023-07-22 14:19:00

---
title: Understand Your Database Schema With ChatGPT
published: true
description: 
tags: database, chatgpt, openai, ai
---

How would you like to get help from ChatGPT to answer questions like these?

- What is this database about?
- Which topic is this schema about?
- Can you write SQL for getting book names and author names?
- Can you suggest comments for columns that do not have them?
- Does this database have personal data?
- Can you suggest indexes for this database?

In order to do this, you need to describe your schema to ChatGPT. Enter SchemaCrawler. SchemaCrawler generates easy-to-read text output with tables, columns, foreign keys, and indexes. You can paste the output into ChatGPT and ask questions such as the ones above.

Let's get started. Begin with SchemaCrawler by following any of the instructions in [the series on SchemaCrawler](https://dev.to/sualeh/series/22771). Once you have your schema in text form, simply paste it into ChatGPT and ask your questions! You will be surprised at the help you can get.
From Scratch To Senior
Tags: beginners, programming, career, gamedev
Published: 2023-07-22 14:05:37

Hello everybody👋 to my personal blog about my personal progress in programming😁.
In this blog you will watch my path that I'll take to become from beginner programmist👶 that try to involve to programming to junior👦 that know only how to type simple code to middle👨 with job opportunities and finally a senior👴.

**What are my goals:**

- Understand basic syntax of popular programming languages.

- Improve my knowledge in C++.

- Learn new libraries.

- Strive to learn related subjects to backend/embedded systems.
 

**My knowledge now:**

- Basic of C,C#.

- Knowledge in C++ and some libraries like vector and string.

- little bit Unity.



**In end of every my blog I'll write my current level that I think I now and targets to the next blog.**

Current level - **hard beginner**.
Next target - learn new libraries of STL in C++ like **list** and **deque**.
CODING
Published: 2023-07-22 13:38:35

`                  <button
                    disabled={disable}
                    onClick={() => SubmitHandler()}
                    className="bg-white py-4 px-4 rounded-r-2xl disabled:cursor-not-allowed"
                  >
                    Subscribe
                  </button>`

this is test code .......

- python

- java script

1. react

1. next
Episode 23/28: effect() outside Change Detection, RFCs Q&A with Angular Team
Tags: webdev, javascript, angular, programming
Published: 2023-07-22 13:23:35

Effects in Signals will be decoupled from the Change Detection. The Angular Q&A provided answers to common questions about the latest RFCs.

{% embed https://youtu.be/s7-tfYVE1oM %}

## Decouple `effect()` from Change Detection

Signals are tightly coupled to the template, which makes them not very suitable for generic usage.


We see this with the signal and computed function. They do nothing, unless we call them within a template or use them in an effect.

The effect plays a crucial role if we need side-effects but it comes with a constraint. It only runs during the change detection. In other words, we cannot run a signal-based side-effect outside of the change detection. That's going to change.

Alex Rickabaugh published a new PR which intends to remove the execution of the effect in the change detection. Instead,  the effect runs as an asynchronous task. To be precise, the effect should run as a microtask, which is like a native Promise.

{% embed https://github.com/angular/angular/pull/51049 %}

## RFCs Q&A with the Angular Team

We shouldn't forget the "older" RFCs, which are still open. The first is about integrating control flow commands directly into the template syntax. The second one is about the possibility of deferring the loading of components.

An official Q&A took place, where members of the Angular team explained these RFCs and answered questions.

The pattern where we combine async and *ngIf for Observable will not be necessary anymore and will get a better version with the new syntax.

We've learned that Angular looked into JSX but will not follow its path. The reason is that JSX is executed code that doesn't fit Angular's approach. Some ideas from JSX might land in Angular.

Alex Rickabaugh, Angular core lead, made vague comments about the future of forms. They are looking into ways to unify the current ones, but this is a long-term goal.

{% embed https://www.youtube.com/live/GTjTpyZUhuE %}

## Minor Releases

In terms of new releases, it was pretty quiet. Playwright, an E2E testing framework, moved up to version 1.36.

[ChangeLog](https://github.com/microsoft/playwright/releases/tag/v1.36.0)
ZSH Plugin for Laravel Sail
Tags: docker, laravel, sail, zsh
Published: 2023-07-22 13:23:21

---
title: ZSH Plugin for Laravel Sail
published: true
description: ZSH Plugin for Laravel Sail
tags: Docker, Laravel, sail, zsh
canonical_url: https://ariaieboy.ir/blog/9-zsh-plugin-for-laravel-sail/
---
## What is Laravel Sail

Laravel Sail is a development environment that uses docker under the hood.
By using Laravel Sail, you can use the power of docker without knowing much about it.
It has pre-defined services for your applications, including a web server, database, Redis, etc.

Sail also provides a CLI tool that helps you to manage the services and run commands like artisan, composer, npm, etc.
For example, you can start the service containers using `./vendor/bin/sail up` or run artisan commands using `./vendor/bin/sail artisan`

## Laravel Sail ZSH Plugin features

As you can see from the examples above, you need to use the sail binary file path to run these commands.

I've created a plugin for ZSH with lots of aliases, so you can use Laravel Sail with shorter commands.

For example, you can start the service containers using the `sup` alias or run composer commands using the `sc` alias instead of `./vendor/bin/sail composer`

Aside from simple aliases, the plugin also lets you use these aliases in any project sub-directories without you needing to provide the path to sail binary.

It also provides some basic autocompletion for the commands.

Another feature that makes this plugin much more helpful than a simple set of aliases is that you can install composer and npm dependencies using `s cinit` and `ninit` commands.

## How to install this plugin

Run this command in your terminal and clone the source code to your ohmyzsh plugin directory.

```bash
 git clone --depth=1 https://github.com/ariaieboy/laravel-sail ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/laravel-sail
```
Then open the `~/.zshrc` file in the editor of your choice and add `laravel-sail` to your ohmyzsh plugins list.

You can see the list of all aliases in the link below:

[Laravel Sail ZSH Plugin](https://github.com/ariaieboy/laravel-sail/blob/main/README.md)
Nala: Modern Front-End for the APT Package Manager
Tags: ubuntu, packagemanager, apt, nala
Published: 2023-07-22 13:21:38

---
title: Nala: Modern Front-End for the APT Package Manager
published: true
description: Nala: modern front end for the apt package manager
tags: Ubuntu, PackageManager, Apt, Nala
canonical_url: https://ariaieboy.ir/blog/8-nala-modern-front-end-for-apt/
---
As someone that uses Laravel and PestPHP, I am used to the beautiful CLI outputs. Nala is like a skin for apt with human-friendly outputs.
For example, look at the picture below which one do you prefer?

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

Besides the beautiful CLI outputs, Nala adds some nice to have features to the table.

The parallel download mode helps you to download lots of small and large packages faster than the default APT.

Another feature is `nala fetch` that test the latency of the available mirrors and then saves the 3 fastest mirrors and saves it in a file.

Another feature that I found out about Nala while I was writing this article is `nala history` it's like git but for the packages. It's save all installed removed or upgraded packages in var/lib/nala/history.json with a unique ID.
You can undo or redo changes using these IDs.
Nala is free and open-source and is written using Python.
If you use the latest version of Debian or Ubuntu you can install it as simply as an apt install:
```bash
sudo apt install Nala
```
Or you can check their wiki about other installation options:
[Installation Page](https://gitlab.com/volian/nala/-/wikis/Installation)
How to Start with Go Programming Language
Tags: tutorial, go, beginners, programming
Published: 2023-07-22 13:19:14

### Introduction:
In this tutorial, I will guide you through the first steps to start programming in Go (also known as Golang). Go is a powerful and efficient programming language designed for simplicity and readability. By the end of this tutorial, you will have a solid foundation to begin your journey with Go programming.

### Prerequisites:
Before we begin, make sure you have the following prerequisites:

1. **Basic Programming Knowledge:** It's beneficial to have some prior experience with programming concepts, but this tutorial assumes no prior knowledge of Go specifically.

2. **Go Installation:** Ensure that Go is installed on your system. You can download and install the latest version of Go from the [official website](https://go.dev/doc/install).

### Step-by-Step Guide:

#### Step 1: Setting up the Environment
Once you have Go installed, set up your Go workspace. Create a directory where you will put your source code, for instance `hello`.

#### Step 2: Creating Your First Go Program
Let's create a simple "Hello, World!" program. Open a text editor and create a new file named `hello.go`  inside your `hello` directory. In this file, add the following code:

```go
package main

import "fmt"

func main() {
    fmt.Println("Hello, World!")
}
```

#### Step 3: Compiling and Running Your Program
To compile and run the program, open your terminal or command prompt, navigate to the directory where `hello.go` is located, and type the following command:

```bash
go run hello.go
```

You should see the output: `Hello, World!`

#### Step 4: Understanding the Code
Let's break down the code you just wrote:

- `package main`: Every Go program starts with a package declaration. The `main` package is the entry point for the executable program.

- `import "fmt"`: This line imports the [fmt](https://pkg.go.dev/fmt) package, which provides functions to format and print text. We used it to display "Hello, World!" on the screen.

- `func main() {...}`: This is the main function where the program execution begins. Within this function, we used `fmt.Println` to print our message.

### Conclusion:
Congratulations! You have successfully written and executed your first Go program. You've learned how to set up the Go environment, create a basic program, and run it. I now invite you to follow the excellent resource [A Tour of Go](https://go.dev/tour/welcome/1) for an overview of Go's features.

Happy coding!
ChatGPT for Android: Your AI Companion on the Go?
Tags: ai, news
Published: 2023-07-22 13:18:42

Howdy friends! Are you ready to take your Android experience to the next level with AI-powered innovation? OpenAI's latest marvel, **"ChatGPT for Android,"** is set to redefine how you interact with your smartphone. This cutting-edge app brings the prowess of an advanced language model right into the palm of your hand, offering insightful conversations and assistance like never before. With the much-anticipated launch next week, you can get ahead of the game by pre-ordering ChatGPT for Android on the Google PlayStore starting today.


ChatGPT for Android is a game-changer in the world of mobile AI. Seamlessly integrated with your device, it's like having your very own virtual assistant on standby, 24/7. Imagine asking any question, seeking creative ideas, or obtaining information on the fly – ChatGPT has you covered. Harnessing the power of natural language processing, this AI companion understands your queries and provides relevant, accurate, and personalized responses.

**Stay Ahead with Pre-Order:**

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

Don't miss the chance to be among the first to experience the future of mobile interaction. By pre-ordering ChatGPT for Android today, you secure your exclusive access to a groundbreaking technology that will shape the way you use your smartphone. Prepare to be amazed as ChatGPT transforms your daily routine into a seamless and intelligent journey, enhancing productivity and enriching your knowledge.


Get ready to experience the future of mobile interaction – the era of ChatGPT for Android has arrived!




_Excited about the upcoming "ChatGPT for Android" app? Share your thoughts! Will having an AI companion in your pocket revolutionize your smartphone experience? Are you considering pre-ordering to be among the first to experience the future of mobile AI? Please let me know! 🚀😃_
Translate Your Laravel Application to 78 Languages
Tags: laravel, language
Published: 2023-07-22 13:18:02

---
title: Translate Your Laravel Application to 78 Languages
published: true
description: Translate Your Laravel Application to 78 Languages
tags: Laravel, Language
canonical_url: https://ariaieboy.ir/blog/7-translate-your-laravel-application-using-laravel-lang/
---
Laravel has localization tools that help you translate your applications into any language you want.
But by default, all the Laravel Lang files include the English language. And if your application needs other languages you must create and manage lang files for each language by yourself.

Right now that I am writing this article we have more than 1400 keys for each language in the Laravel-Lang package that includes Laravel and its first-party packages.

You can translate Laravel and its packages like Jetstream, Fortify, Cashier, etc into 78 Languages.

All you need to do is to install Laravel-lang/common packages using the command below:

```bash
composer require laravel-lang/common --dev
```

After that you can add any languages you want using the command below:

```bash
php artisan lang:add en de ro zh_CN lv
```

Laravel often introduces new localization keys to the lang files and the community might update the translations in the future you can update the added languages using the command below:
```bash
php artisan lang:update
```

You can translate missing keys or improve the translations and create a PR on the [Laravel-Lang/lang](https://github.com/Laravel-Lang/lang)  and help improve this package.
CapRover - Easy and Free Self-Hosted PaaS!
Tags: caprover, paas, selfhost
Published: 2023-07-22 13:14:33

---
title: CapRover - Easy and Free Self-Hosted PaaS!
published: true
description: CapRover is an Easy, Free, Open Source, Self-hosted PaaS!
tags: Caprover, PaaS, Selfhost
canonical_url: https://ariaieboy.ir/blog/6-caprover-easy-and-free-self-hosted-paas/
---

## What Is Caprover ?
If you managed a server on your own you know that configuring everything correctly is a very hard job to do.
Handling Nginx configuration, issuing SSL Certifications securing the services, etc.
Now imagine if you want to run more than a service on a server or you want to load balance your incoming requests between multiple servers and spin up more than one instance of a service on your servers. That's a hard job, right?
Not with Caprover, You can manage multiple services like your NodeJS, Python, PHP, ASP.NET, and Ruby Apps or your Databases like MySQL, MongoDB, Postgres, etc. on a single server or a cluster of servers.
It will load balance your app using a customizable Nginx proxy server and it can create free SSL certifications using Let's Encrypt.
CapRover Has a nice WEB GUI that helps you manage your services. you can also manage your services using the CLI of the CapRover.
Another awesome feature of CapRover is the rollback feature if you shipped a bad version on production you can easily roll back to any version of your APP with a single click.

## But How It Is Working?
Under the hood, CapRover uses Docker to containerize your applications. An Nginx Reverse Proxy will manage your load balancing, the Reverse Proxy will also route the incoming requests to the specified services in your server(s).
And for clustering, Caprover uses Docker Swarm.
In the picture below you can see how CapRover works:

![Caprover](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t909evr0v0uaj0tvk1bz.png)

## Is It Safe?
Caprover is an open-source project and you can check both the backend and frontend codes of it in their GitHub organization.
Since CapRover only uses docker in the background you can remove CapRover from your server any time you wanted to and your apps will continue working without any problem.

## But I Didn't Work With Docker Before
CapRover has lots of one-click apps which means you can deploy lots of popular projects with a single click.
For example, you can deploy MySql, PostgreSQL, MariaDB, Redis, WordPress, Minio, etc.
You can find the full list of the apps [here](https://github.com/caprover/one-click-apps/tree/master/public/v4/apps).
Besides one-click apps, there are some sample apps that you can use to practice or even deploy your application using [these samples](
https://caprover.com/docs/sample-apps.html).

### Last Word
CapRover might not be a good option for big teams and companies but it's a really good option for individuals or small to medium teams that want to reduce their costs and enjoy the power of Docker and Nginx without having to learn them or deal with their settings scripts to make things work!!
Test Your Codebase Without Testing It Using Larastan
Tags: laravel, livewire, filamentphp
Published: 2023-07-22 13:10:10

---
title: Test Your Codebase Without Testing It Using Larastan
published: true
description: Larastan and PHPStan helps you test your code base without writing tests
tags: Laravel, Livewire, Laravel, FilamentPHP
canonical_url: https://ariaieboy.ir/blog/test-your-code-base-without-test/
---

**Larastan** is a wrapper around PHPStan for Laravel, and it let you test your source codes without writing any tests.

PHPStan is a static analyzer for PHP and it's working with legacy and modern codes.

Since lots of Laravel works magically PHPStan needs some justification to understand the magic behind Laravel it's when Larastan comes into place.

So if you have any PHP code base you can PHPStan and if you use Laravel you must go with Larastan. from here on I am gonna reference these tools as static analyzers.

## But how it's working
Static Analyzers scan your code base before you even run your code in development or in CI to prevent any obvious & tricky bugs to reach your production.

PHPStan has 9 levels of rule sets that you can use on your code base. for example, level 0 only checks for:
> basic checks, unknown classes, unknown functions, unknown methods called on $this, wrong number of arguments passed to those methods and functions, always undefined variables.

It's good practice to start using these tools with low levels and fix bugs and errors after you fixed all errors on that level you can bump your level up and try to make your code base more strict and bug-free.

For sure Static Analyzers are not going to test all possible outcomes of your code, but they can detect lots of annoying bugs and dead codes etc. and make your code base much cleaner and bug-free.
HELLO
Published: 2023-07-22 13:10:03

loremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremlorem
Enjoyable PHP Testing with PestPHP
Tags: php, pestphp, testing, laravel
Published: 2023-07-22 13:08:50

---
title: Enjoyable PHP Testing with PestPHP
published: true
description: Enjoyable PHP Testing with PestPHP
tags: PHP, PestPHP, Testing, Laravel
canonical_url: https://ariaieboy.ir/blog/enjoyable-php-testing-with-pestphp/
---
Writing tests is time-consuming and tedious. But if you want close your eyes without fear at night, having good tests in your applications is essential.

With Pest, testing is much more enjoyable. It has a simpler syntax compared to PHPUnit. The test reports have more useful information in a beautiful style.

Pest is a progressive testing framework that uses PHPUnit at its core. That means you can both PHPUnit test classes and Pest test files in the same test suite.

You can also convert your PHPUnit test classes to Pest test files using these tools:
[Pest Convertor by Laravel-Shift](https://laravelshift.com/phpunit-to-pest-converter) (Each Shift Costs 9$)
[Pest Convertor by mandisma](https://github.com/mandisma/pest-converter) (Open-Source and free!)

Laravel Shift is a well-known Service, especially among Laravel Users. It can convert your PHPUnit tests for 9$.

The open-source option is not that popular but I've used it on a medium-sized project with hundreds of tests, and it's worked very well for me but it may need more work in big projects with complicated test suites.

At the end let's compare a test written in both PHPUnit and Pest:

PHPUnit:
```PHP
<?php
	 
	namespace Tests\Feature;
	 
	use Tests\TestCase;
	 
	class HomepageTest extends TestCase
	{
	 /** @test */
	 public function it_renders_the_homepage()
	 {
	 $response = $this->get('/');
	 
	 $response->assertStatus(200);
	 }
	 
	}
```

Pest:
```PHP
<?php
	 
	it('renders the homepage', function () {
	 $response = $this->get('/');
	 
	 $response->assertStatus(200);
	});
```

Beautiful version of this test using Pest:
```php
<?php

	it('renders the homepage')->get('/')->assertStatus(200);
```

Isn't the last example beautiful? We only wrote 1 line of code instead of 18 lines.

And that's why I love Pest that much. it's simple, minimal, and enjoyable to use.
8 React Js performance optimization techniques YOU HAVE TO KNOW!
Tags: react, reactjsdevelopment
Published: 2023-07-22 13:05:48

React is powerful and feature-friendly, but because of that, we often tend to use too many of its features extensively and end up ignoring the performance downside we could be causing our application. And therefore, in the video link below, I discuss 8 amazing and crucial performance optimization techniques to make your React application super optimized and efficient, so the next time you go deep into using reacts cool features, you can keep these techniques in mind.

{% embed https://www.youtube.com/watch?v=CaShN6mCJB0 %}