teleren/devto huggingface dataset:
🚀 Why Code Review is Crucial in Software Development 🚀
Tags: codereview, softwareengineering, development, coding
Published: 2023-06-24 09:03:26

🔎 Self-reflection is a common trait among developers. We often find ourselves in a state of denial when it comes to reviewing our own code, believing it to be flawless and devoid of any faults. But let me tell you, my fellow developers, that code review is an essential practice that can elevate our skills to new heights. 💪

🔐 **Picture this:** You've diligently crafted a feature, poured your heart and soul into it. It seems perfect, a masterpiece in your eyes. However, we all know that even the most experienced developers can inadvertently introduce errors or overlook potential issues in their code. That's where code review comes to the rescue. 🦸‍♀️🦸‍♂️

🔍 A fresh set of eyes can uncover hidden bugs, logic errors, or performance bottlenecks that we may have missed. By having one or two developers who aren't directly involved in the feature review our code, we expose it to critical scrutiny and gain valuable insights. It's through these suggestions and constructive criticism that we grow and become senior developers. 👩‍💻👨‍💻

🔁 Initially, the idea of code review might seem mundane or even boring. But trust me, when you truly dive into it, you'll start to appreciate the profound impact it can have. It's during code reviews that we witness firsthand what distinguishes good code from bad code. We learn the importance of clean, maintainable, and efficient code that stands the test of time. 📚

🌟 By incorporating code review into our software development lifecycle, we transcend beyond mere project development. We embrace a culture of continuous improvement, aiming to deliver not just projects but exceptional products. 💡

✨ So, my fellow developers, let's embrace the power of code review. Let's seek feedback, learn from our peers, and refine our craft. Together, we can unlock our true potential and create software that truly shines. 🌟

**NOTE  :** The ideas in this post are my own, but I used AI-assistance to help with rephrasing words and finalizing this article.
Using GPT for automated crawling
Tags: chatgpt, langchain, gpt
Published: 2023-06-24 08:44:20

GPT seems to make web crawlers more efficient. specifically, it can:

1. GPT can extract the necessary information by directly understanding the content of each webpage, rather than writing complex crawling rules.

2. GPT can connect to the internet to determine the accuracy of crawler results or supplement missing information.

So I have created an experimental project [CrawlGPT](https://github.com/gh18l/CrawlGPT) based on langchain that can run basic automated crawlers based on GPT-3.5. I hope to get any suggestions and assistance.
Building Docker Container for a Laravel Project
Tags: docker, laravel, beginners, devops
Published: 2023-06-24 08:22:57

In the first place, we need a web server that can support someone specific php version.

- Web server: `nginx`
- Php version: `php-7.4`

When we need two containers. We will create a `docker-composer.yml` usign this structure.

```
# Main Directory
└── docker-laravel
    └── docker-compose.yml
    └── README.md
    └── phpfpm
        └── Dockerfile
    └── nginx
        └── default.conf
        └── Dockerfile
    └── laravel-project          # Laravel Project
        └── app.php
        └── ...
        └── composer.json
```
Or just we download it in a chosen location using following command:
```
git clone https://github.com/automatape/docker-laravel.git
```
```
cd docker-laravel
```
For create and start the container (in first plane)
```
docker-compose up
```
Birinchi Back-End loyiham
Published: 2023-06-24 08:04:54

**Birinchi BackEnd loyiham🤓**

_⏱ Shu oyni 5-sanasida bitishi kerak bo'lgan loyiham, yaniy python django texnologiyasi yordamida qilingan birinchi back-end saytim bugun tayyor bo'ldi._

_- 1.5 oy davomida yozildi,_
_- Salkam bir hafta server qidirish va  joylash uchun ketdi._

**🔹Saytda nimalar bor:**
- Yangilik qo'shish
- Yangilikni tahrirlash
- Yangilikni o'chirish
🧑🏻‍💻Bu uchta amalni faqat adminlar qila oladi.

- User ro'yhatdan o'tishi(SignUp)
- User saytga ochilgan account bilan kirishi(LogIn)
- Userdan chiqish(LogOut)
- User accountini tahrirlash(Edit profile)
- User parolini almashtirish(password change)

- Izoh yozish(comment)
- Yangiliklarni qidirish(search)
- Kategoriya bo'yicha saralangan yangiliklarni ko'rish
- Yangiliklarni qo'shilgan vaqtini ko'rish

Saytga havola (link): [javohirdjango.pythonanywhere.com](https://javohirdjango.pythonanywhere.com)

**❗️Bu loyiha ustida hali yana ishlanadi...**

Endi navbat Django Rest FrameWork (DRF)ga😊
Campus Route Devlog #1
Tags: devlog, react, javascript, frontend
Published: 2023-06-24 07:56:13

Hey guys!

I'm excited to share the progress I've made in the latest update of CampusRoute. In this devlog, I'll walk you through the key changes and improvements I've implemented. Let's dive in!

1) New UI Design:
I've given CampusRoute a fresh new look! I've been working hard to revamp the user interface, focusing on enhancing usability and providing a more intuitive experience. With a cleaner and more modern design, navigating through the app has never been easier. Just take a look at the screenshot below to see the updated UI in action. 

![Photo of new UI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nbg6b59sv5hvukxpgoes.png)


2) Improved Route Status Page:
To keep our users informed during their journeys, I've introduced an enhanced route status page. Now, when you visit /status within the app, you'll be redirected to a page that indicates the current operational status of the CampusRoute website. This way, you'll always know if the website is up and running smoothly or if there are any temporary disruptions or maintenance activities affecting its availability. We're continuously working on further enhancements to provide real-time updates about your navigation within the app, ensuring you have the most accurate information at your fingertips.

That's it for now, folks! I'm thrilled about the progress we've made so far, and I can't wait to bring you more exciting updates in the next devlog. As always, thank you for your support and stay tuned for the latest CampusRoute news!
check ip address in Linux
Tags: linux
Published: 2023-06-24 07:53:36

Here are the steps to check the IP address in Linux:

1. Open a terminal: Launch the terminal application on your Linux system. This can typically be done by searching for "Terminal" in the application launcher or using a keyboard shortcut (e.g., Ctrl+Alt+T).

2. Enter the command: Once you have the terminal open, enter one of the following commands:
   - For `ifconfig`: Type `ifconfig` and press Enter.
   - For `ip addr`: Type `ip addr` and press Enter.
   - For `hostname -I`: Type `hostname -I` and press Enter.
   - For `curl ifconfig.me`: Type `curl ifconfig.me` and press Enter.

3. View the IP address: The command output will display the IP address information. Look for the section or line that specifies the IP address. It should be labeled as "inet" or "inet addr".

4. Interpret the IP address: The IP address is usually presented in the format of four sets of numbers separated by periods (e.g., 192.168.0.1). This is the address assigned to your Linux system on the network.

Note that the specific command and output may vary depending on your Linux distribution and version.

{% embed https://www.youtube.com/shorts/I6QxQHzuGw8 %}


| Command | Description | Example |
|---------|-------------|---------|
| ifconfig | Displays the configuration information of all network interfaces, including the server's IP address. | `ifconfig` |
| ip addr | Lists detailed information of all network interfaces, including the server's IP address. | `ip addr` |
| hostname -I | Returns all IP addresses of the server, separated by spaces. | `hostname -I` |
| curl ifconfig.me | Retrieves the server's public IP address using the HTTP protocol. | `curl ifconfig.me` |

Please note that the examples assume the commands are being executed in a terminal on a Linux system. The output will vary depending on the server's network configuration and environment.

[To get more detailed info about how to get ip address in Linux, check out this article here. ](https://www.howtouselinux.com/post/check-ip-address-in-linux)

[If you want to test your Linux skills, try the test here.
](https://docs.google.com/forms/d/e/1FAIpQLSf8nukPTgipRB-mrXcjNk360LWvmTAXNT1YICMkuJe_tqvrTg/viewform?usp=sf_link)
Open-Source Software: Catalyst for Software Revolution?
Tags: discuss, opensource
Published: 2023-06-24 07:00:00

How do you think open-source software influences industry trends, sparks innovations, and fuels community-driven initiatives? Share your insights, experiences, and success stories that demonstrate the transformative power of open-source collaboration. 

Let's explore how open-source software has become a driving force, shaping the future of software development. 

Follow the DEVteam for more discussions and online camaraderie!

{% embed [https://dev.to/devteam](https://dev.to/devteam) %}

[Image by pch.vector on Freepik](https://www.freepik.com/author/pch-vector)
WAYS OF USING TAILWIND CSS IN A REACT NATIVE PROJECT
Published: 2023-06-24 01:22:38

This article aims at showing you how to use Tailwind CSS in React Native applications. But first, you need to know what Tailwind CSS is and how it can be helpful in developing good user interfaces.



What is Tailwind CSS?
A utility-first CSS framework composed of classes that can be put together to build user interface, directly in your HTML file. The best part of this framework is it doesn't impose any design guidelines to follow , which means you're not restricted for creating any design of your choice.

It is highly efficient and portable in size, Tailwind removes all unused CSS when building for production, it ships the smallest CSS bundle possible.

Now that we grasped what Tailwind is, let dive in to see how we define classes in our React App using JSX.

```
html
<button className="bg-blue-500 hover:bg-blue-700 
    text-white font-bold py-[5rem] px-4 rounded ml-4 mt-4">
  Button
</button>
```



Moving on, how can we use Tailwind CSS in React Native application?

NativeWind
It is a package that uses Tailwind CSS as scripting language to create a universal style system for React Native. NativeWind components can be shared between platforms and will output their styles as CSS Stylesheet on web and Stylesheet for native.

React Native's Stylesheet system only provides static styles, with other features left for the user to implement. By using NativeWind you can focus on writing your system instead of building your own custom style system.


Getting started
 1. Project setup

To set up our project, we'll scaffold a new react Native app using react-native init. If you have already done this, skip this process, otherwise, run the command below:

```
js
npx react-native init my-nativewind-app
```


Cd into the project's directory.

```
js
cd my-nativewind-app
```

2. Install NativeWind

Install nativewind and it's peer dependency tailwindcss, using yarn or npm, but in this example I'll be using yarn instead.

```
js
yarn add nativewind
yarn add --dev tailwindcss
```

3. Set up Tailwind

Setup Tailwind CSS, run the command npx tailwindcss init to create a tailwind.config.js file

```
js
  // tailwind.config.js

  module.exports = {
  - content: [],
  + content: ["./App.{js,jsx,ts,tsx}", "./src/**/*.{js,jsx,ts,tsx}"],
    theme: {
      extend: {},
    },
    plugins: [],
  };

```

4. Add Babel plugin

Add the Babel plugin, modify your babel.config.js.

```
js
  // babel.config.js
  module.exports = {
  - plugins: [],
  + plugins: ["nativewind/babel"],
  };

```

And that does it! Hurray you have Tailwind css working in your react native project.

```
js
  import { StatusBar } from 'expo-status-bar';
  import React from 'react';
  import { Text, View } from 'react-native';

  export default function App() {
    return (
    <View className="flex-1 items-center justify-center bg-white">
        <Text className="text-gray-400 text-md font-bold mt-2">
            Open up App.js to start working on your app!
        </Text>
        <StatusBar style="auto" />
      </View>
    );
  }

```

Thank you for taking the time read...
Which Childhood Gadget Ignited Your Coding Passion?
Tags: discuss, codenewbie, beginners
Published: 2023-06-24 07:00:00

Let's take a trip down memory lane and share the tech gadgets or toys from our childhood that sparked our love for coding. Whether it was a classic game console, a programmable robot, or even a basic calculator, we all have that one gadget that set our imagination on fire. 

So, what was your favorite childhood tech companion that fueled your interest in coding? Share your stories, fond memories, and how that gadget influenced your journey into the world of programming.🤖🎮🚀

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

*{% embed* https://dev.to/codenewbieteam *%}*
MJGS Newsletter - The Economics of Catching the AI Wave (Issue #120)
Tags: javascript, tech, webdev, discuss
Published: 2023-06-24 06:17:24

---
title: MJGS Newsletter - The Economics of Catching the AI Wave (Issue #120)
published: true
description: 'We are heading into a future where AI is in every technology we use. You need to understand the fundamental cost curves, and maybe dangers, that are in play in solving the training conundrum.'
tags: javascript, tech, webdev, discuss
---

The Economics of Catching the AI Wave (Issue #120)

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

Would love to hear any comments and feedback you have.

[@markjgsmith](https://twitter.com/markjgsmith)
Build a Better Commitment between Client and Worker in Freelance Market with Blockchain Technology
Published: 2023-06-24 06:00:04

Have you ever experienced payment problems in your freelance jobs?. Maybe your client doesn’t want to pay you after the work you’ve done or maybe they don’t want to pay you in the first place. It must be a bad experience in your career as a freelancer 😢. 

When this problem occurs, you must do something to make you get paid. From frequently contacting your client, send them the invoices to remind them of their responsibility and the bad one is preparing yourself for suing them in court 🙀 .

The preventive action regarding this problem to occur is to make a legal agreement, but still, when a bad thing happens, you need to go to court, pay for a lawyer, and go through a long path of court. However it cannot guarantee you to get your payment 😱 .

Another preventive action is to ask the client to put some deposit before starting any work. While it shows the client's good faith, it still has some problems. The worker can run away without needing to work on the projects or tasks. 

So, how to ensure the client has the money to pay the workers  or guarantee the workers not run away with the deposits? 🤔 

We can utilize Smart Contracts that are written on top of blockchain technology to make it possible. Since smart contracts is a n immutable set of rules that are written on top of blockchain technology, it can be used to write a kind of contract that makes the client deposit their money in the contract and guarantee the workers not run away with their money.  On the other side, the workers are able to see the client’s good faith (ensure the client has the money).

Here the scenario:
1. The client locks their money in a smart contract. Since smart contracts live in blockchain, the money must be in the form of coins/tokens.
2. After the client locks their money in a smart contract, the worker will be able to see it and have confidence that the client has the money.
3. While projects usually have milestones, we can use it on smart contracts as a mark of partial payment of the projects. Let say the cost of project is 10K USDT and have 10 milestones, after the workers achieve their first milestones, they will be able to withdraw 1K USDT as the payment (it will be good if it require both signatures for the withdrawal process)

It’s not always sunshine and rainbows, sometimes both parties cannot come to an agreement on the withdrawal process, it will make the workers unable to get their payment and the client’s money stuck on smart contracts. In this scenario, we will need someone to judge the case. This is not really “someone” (one person), we can utilize DAO to judge the case in a fair manner. 

I will elaborate on the DAO mechanism and reward for the voters in the other part.

Enjoy the weekend 🏖
Escrow in blockchain.
Tags: webdev, beginners, tutorial, blockchain
Published: 2023-06-24 05:35:41

Blockchain-based escrow works by locking the funds or assets in a smart contract until specific conditions are fulfilled. These conditions can be based on time, delivery of goods or services, or any other predefined criteria agreed upon by the parties involved. Once the conditions are met, the smart contract automatically releases the funds or assets to the appropriate party.

The benefits of using blockchain for escrow include:

Transparency: Since the smart contract and its execution are recorded on the blockchain, all parties involved can verify the transaction details and ensure transparency.

Security: Blockchain employs strong cryptographic techniques, making it difficult for malicious actors to tamper with the escrowed funds or assets. This provides an additional layer of security compared to traditional escrow systems.

Efficiency: Blockchain-based escrow eliminates the need for intermediaries, such as banks or escrow agents, thereby reducing costs and accelerating transaction settlement times.

Global accessibility: Blockchain operates on a decentralized network, enabling escrow transactions to be conducted globally without relying on a centralized authority or jurisdiction.

However, it's important to note that while blockchain-based escrow offers advantages, it does not eliminate all risks associated with transactions. Parties should still exercise due diligence and carefully define the terms and conditions of the escrow agreement to ensure their interests are protected.
New art made with Controlnet v1.1
Tags: ai, chatgpt, softwareengineering
Published: 2023-06-24 05:10:12

[Bard GPT](https://chrome.google.com/webstore/detail/bard-gpt/kiddojmdiedebigkffjmpbfhmffkafad) logo

![Bard GPT logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ppgasu5eefth3dzhaml6.gif)


Used Model - https://huggingface.co/lllyasviel/ControlNet-v1-1

---

Let me know your thoughts in comments below 😀
Is this the future of Ai Art 👀

How do you like my portfolio 🚀 - https://parammittal.vercel.app
MongoDB Equivalent of SELECT column FROM table
Published: 2023-06-24 05:02:06

I've gotten lost in my notes too many times so this is a reference for my future self and anyone else who needs this.

In an aggregation pipeline, add the following.

```
$group {
	_id: null (or whatever),
	countries: {
		$addToSet: "$subCollection.countries"
	}
}
```

This will result in

```
{
  _id: null,
  countries: ["a", "b", "c", etc...]
}
```
Refine Admin Panel
Tags: refinehackathon, supabase, materialui
Published: 2023-06-24 04:55:56

I have made an Admin panel with refine. To connect with backend i used Supabase , which is easy to install and gives high performance. For ui designing i had  used Material UI.

refine is a React-based framework that enables rapid development of web applications. It eliminates the repetitive tasks demanded by CRUD operations and provides industry standard solutions for critical parts of a project like authentication, access control, routing, networking, state management and i18n.
I had used Supabase as backend and for authentications.
Supabase is an incredible tool for building secure and high-performance Postgres backends with minimal configuration. It provides developers with a wide array of functionalities similar to Firebase, such as authentication, real-time database, and storage. 
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s08c0s9vgp63u6dk74x6.jpg)

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

### Link to Source Code 
https://github.com/Rishabh-raj-kumar/refine-Admin-Panel-with-supabase-and-material-ui.git

### Permissive License 
  MIT License
Stop, think about it. Are you using the right Data Structure?
Tags: java, softwareengineering, programming, tutorial
Published: 2023-06-24 04:40:19

A very trivial thing but knowing which data structure or implementation maintains the order of insertion, allows duplicates, or does not accept null helps prevent unexpected outcomes. Had a similar first-hand experience a few months ago. 💀

For example, lets take Map interface. There are three classes that implements Map in java - HashMap, LinkedHashMap and TreeMap.

♨️ HashMap doesn't maintain insertion order, LinkedHashMap does, TreeMap maintains order in sorted manner.
♨️ HashMap and LinkedHashMap allows one null key object (K,V), TreeMap doesn't (it may have multiple null values, never the keys).
♨️ HashMap and LinkedHashMap both have O(1) insertion and search. TreeMap, has O(logN). Bonus - TreeMap is implemented using RB-Tree, HM - LinkedLists, LHM - Doubley-LL. These implementation are the reason for these TC.
What you learning about this weekend?
Tags: codenewbie, discuss, learning, beginners
Published: 2023-06-24 04:00:00

Hey folks 👋

What ya learning on this weekend?

Whether you're sharpening your [JS](https://dev.to/t/javascript) skills, making PRs to [your OSS repo of choice](https://github.com/forem/forem) 😉, sprucing up your portfolio, or [writing a new post](https://dev.to/new) here on DEV, we'd like to hear about it.

Learn to your heart's content. 🧠 ❤️

![A cartoon brain is walking with purpose in its step](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/llitrw075w5lihetsrxj.gif)
Agregar botón Buymeacoffe en tu Dev.to
Tags: spanish, buymeacoffe, howtoadd
Published: 2023-06-24 03:39:55

👋Hey developer,

En este artículo, mostraré y ayudaré a agregar el botón **BUY ME A COFFE** a vuestro blog en Dev.to, de una manera simple y en dos sencillos pasos.

Vamos al grano.

**Paso 1:** por favor, crea una cuenta en [buymeacoffee](www.buymeacoffee.com) y consigue el nombre de usuario
**Paso 2:** agrega la etiqueta `<a>` en la ubicación donde quieras que se muestre el botón **BUY ME A COFFEE**. Asegúrate de pegar el enlace en el atributo `href`: `https://www.buymeacoffee.com/your_username`

**Ejemplo**

```html
<a href="https://www.buymeacoffee.com/capscode" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-blue.png" alt="Buy Me A Coffee" height="41" width="174"></a>
```

###SI TE GUSTÓ EL POST, PUEDES COMPRARME MI PRIMER CAFÉ, GRACIAS DE ANTEMANO

<a href="https://www.buymeacoffee.com/xantosromero" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-yellow.png" alt="Buy Me A Coffee" height="41" width="174"></a>

Gracias por leer este artículo. Es una breve introducción sobre cómo agregar el botón **BUY ME A COFFEE** a un post en DEV.TO.

Comparte y comenta si encuentras útil este contenido.

---

_Traducido desde [Capscode](https://dev.to/capscode/how-to-add-buy-me-a-coffee-button-in-dev-to-blog-1d23)_