teleren/devto huggingface dataset:
Diversifying Income as a Developer: Business and Passive Income Ideas
Tags: codenewbie, codepen, computerscience, productivity
Published: 2023-03-11 13:26:47

As a developer, you have a unique skill set that can be leveraged to generate income beyond traditional software development work. Diversifying your income streams can provide financial stability and increase your earning potential. Here are some business and passive income ideas for developers to consider:

1. **Develop and Sell Digital Products**
Developing and selling digital products such as themes, plugins, and templates is a popular way for developers to earn passive income. Platforms like Envato, Creative Market, and ThemeForest allow developers to create and sell their own digital products.

2. **Offer Consulting Services**
As a developer, you can leverage your expertise by offering consulting services to businesses and individuals. Consulting services can include website audits, performance optimization, or custom software development.

3. **Create and Sell Online Courses**
Online learning has become increasingly popular, and developers can take advantage of this trend by creating and selling online courses. Platforms like Udemy and Skillshare allow developers to create and sell courses on a variety of topics, including programming languages and software development methodologies.

4. **Invest in Real Estate**
Real estate can be a great way for developers to diversify their income. Investing in rental properties or participating in real estate crowdfunding can provide passive income streams and potentially long-term financial growth.

5. **Start a Blog or Podcast**
Starting a blog or podcast can be a great way to share your knowledge and expertise with a wider audience. Blogging and podcasting can also lead to sponsorship opportunities and advertising revenue.

**Conclusion**
Diversifying your income streams can provide financial stability and increase your earning potential as a developer. By developing and selling digital products, offering consulting services, creating and selling online courses, investing in real estate, or starting a blog or podcast, developers can create passive income streams that supplement their software development work. With creativity and entrepreneurial spirit, the possibilities are endless.
Python Create Virtual Environment
Tags: python, programming, tutorial, beginners
Published: 2023-03-11 13:21:55

Python has an inbuild venv module to create a lightweight virtual environment, it will help us to isolate and run multiple projects with different dependency. virtual environment is created on top of an existing python installed in the system.

Python virtual environment is kind of similar to docker but both are different. Docker is used to create isolated environment with different OS version and type, System dependency, different python and node version. VENV is used to created environment for python packages. 

Suppose if we want to run a django and flask project instead of installing both packages globally, seprate virtual environment can be used to run the project. In future if we want to create a new project without affecting the existing project this comes handy.

Syntax
```py
python -m venv [venv]
```
you can have any name as you want inside the square bracket []

Steps:

1. Go to the folder where you want to create the new virtual environment.
2. Run this command `python -m venv venv`

## To activate virtual environment in Linux or Mac use this command
```
source venv/bin/activate
```

## To activate virtual environment in Windows use this command
```
.\venv\Scripts\activate
```

[**Learn more about python tutorials**](https://www.programdoc.com/python/intro)

### Explore Other Related Articles
[Read and Write JSON in Python Requests from API](https://dev.to/max24816/read-and-write-json-in-python-requests-from-api-52ga)
[Read and Write Python Json](https://dev.to/max24816/read-and-write-python-json-h6i)
[How to combine two dictionaries in python using different methods](https://dev.to/max24816/how-to-combine-two-dictionaries-in-python-using-different-methods-3hcc)
[How to check if a key exists in a dictionary python](https://dev.to/max24816/how-to-check-if-a-key-exists-in-a-dictionary-python-132i)
[Python try exception tutorial](https://dev.to/max24816/python-try-exception-tutorial-2nlp)
[Python classes and objects tutorial](https://dev.to/max24816/python-class-and-objects-21k6)
Is Python a programming?
Tags: python, beginners, programming
Published: 2023-03-11 13:21:06


## Introduction

Hello , this article is indicated in it's title, even if the title is not clear, we will talk about "Why some people don't want to learn python".
In this article, we will discuss several pens, the most important of them:

1. What is python?
2. Is python that easy?
3. Is it really a language?
4. Conclusion

---

## What is Python?

Python is a high-level, interpreted programming language that was created by [Guido van Rossum]() and first released in 1991.
**It has a design philosophy that emphasizes code readability**, and its syntax allows programmers to express concepts in fewer lines of code than in languages such as _C++_ or _Java_.
Python has become one of the most popular programming languages in the world, used for _web development_, _data analysis_, _artificial intelligence_, and many other fields.

---

## Is Python that easy?

Python is often touted as an easy language to learn, particularly for beginners. Its syntax is straightforward and readable, and its built-in libraries and frameworks make it simple to accomplish many common programming tasks.
However, like any programming language, Python still requires effort and practice to master.
It's not a magic bullet that will make programming easy for everyone, but it is an accessible language that can help people get started with coding.

---

## Is it really a language?

Some people argue that Python is not a "real" programming language because it is interpreted rather than compiled. However, this is a misconception.
Python is a fully-featured programming language that can be used to create complex applications, just like any other language.
The fact that it is interpreted means that it can be slower than compiled languages in some cases, but it also has benefits such as being more flexible and easier to debug.

---

## Conclusion

In conclusion, Python is a powerful and versatile programming language that has become hugely popular in recent years.
While it may not be the best choice for every situation, it is a language that is worth learning for anyone who wants to become a programmer or work in a field that requires coding skills.
Despite some misconceptions about its ease of use and status as a "real" language, Python has proven itself to be a valuable tool for developers around the world.
C ++ Yangi qator .
Tags: beginners, programming, tutorial, cpp
Published: 2023-03-11 13:18:54

Salom dasturchi hozir siz bilan yangi qator tashlashni ko'rib chiqamiz . bunga \n va endl kiradi . 
Biz \n ni raqamlar va kasr sonlar bilan bog'liq amallar qilayotgan paytda ishlatamiz . 

Buni hozirgi koddi ko'rib tushunib olasiz degan umiddaman :

```
#include <iostream> 
using namespace std ; 
int main() {

cout << "Hello world"<< endl ;
cotu << "HELLO" ;

return 0 ;
```
Siz ko'd yozayotganingiz da endldan foydalanganingiz maqulroq chunki bu hamma tipdagi narsalarga o'tadi . 

Mana yana siz bilan sonlarda \n bilan bog'liq ko'dlarni ko'rib chiqamiz . 

```
#include <iostream> 
using namespace std ; 
int main() {

cout << 1 \n ;
cout << 2 ;

return 0 ;
 
```
Mana shun nyulayn deyiladi bu faqat sonlar uchun ishlatiladi .
Why Everyone Should Learn How to Program a Computer
Tags: computerscience, programming, beginners, productivity
Published: 2023-03-11 13:18:19

As technology continues to advance and become more integrated into our daily lives, programming has become an essential skill for everyone to learn. Whether you're a student, a professional, or a retiree, learning how to program a computer can have numerous benefits for your personal and professional development. As computer scientist Alan Perlis once said, "A language that doesn't affect the way you think about programming is not worth knowing."

**Benefits of Learning How to Program a Computer**
- Enhance Problem-Solving Skills: Programming requires analytical thinking and problem-solving skills. When you learn to program, you learn to break down complex problems into smaller, more manageable components, and create algorithms to solve them.

- Increase Career Opportunities: Programming skills are in high demand in today's job market. Whether you're interested in software development, data science, or cybersecurity, learning how to program can open up a world of career opportunities.

- Improve Creativity: Programming allows you to create something out of nothing. By using code to build websites, applications, or even games, you can exercise your creativity and imagination in ways that other disciplines cannot.

- Automate Tasks: Programming can be used to automate repetitive or time-consuming tasks, freeing up your time for more important activities. By automating tasks, you can increase your productivity and efficiency.

- Understand Technology Better: In today's digital age, it's important to have a basic understanding of how technology works. By learning how to program, you gain a deeper understanding of the technology around you and how it functions.

**Conclusion**
Learning how to program a computer is an essential skill in today's technology-driven world. Whether you're interested in pursuing a career in technology or simply want to improve your problem-solving skills and creativity, programming is a valuable skill to have. As computer scientist Alan Kay once said, "The best way to predict the future is to invent it." By learning how to program, you can become an active participant in shaping the future of technology and contribute to the digital revolution.
C++ Constant
Published: 2023-03-11 12:54:42

A constant  is a constant. To declare constants in the C++ programming language,  `const` using the helper keyword ( We declare this variable as immutable). A constant can only read (get) its value.

```
# include  <iostream>
 using  namespace std; int
 main () {
     const int n = 13 ;  // _the value of n is always equal to 13; _return 0 ; 
}
```
**Let's look at the impossible.**

```
# include  <iostream>
 using  namespace std; int
 main () {
     const int n = 13 ;  // the value of n is always equal to 13 
    n = 15 ;  // error: n is read-only here 
    cout << n; return 0 ; 
}
```
_2nd line :_ the C++ compiler will not allow such a case where an attempt is made to change the variable. and will give you the above error screen. Be careful when declaring a constant because this identifier cannot be changed during program execution and you will get an error if you try to change it.

A variable of an optional type can be declared as a constant when declaring a _constant_.

```
#include <iostream> 
using  namespace  std ; int
 main () {
     const int age = 24 ;  // age (age) constant const string name = "MasterSherkulov" ;  // name (name) constant const bool is_developer = true ;  // is_developer (developer) constant const char is_char = 'M' ;  // is_char constant const float PI = 3.14 ; 
}
  
```
Operators
Tags: cpp, beginners, programming
Published: 2023-03-11 12:40:16

`Operator` masalan `+` operatori ikki qiymatni qo'shish uchun ishlatiladi


Misol uchun:

```
#include <iostream>
using namespace std;

int main()
{

int num = 1900;
int num1 = 1800;

cout << num + num1;

return 0;
}
```


`+` operator ko'pincha yuqoridagi misol kabi, birgalikda ikki qiymatlarni qo'shish uchun ishlatiladi u ham birga bir o'zgarmaydigan qiymat yoki o'zgaradigan o'zgaruvchilani qo'shishingiz uchun foydalanish mumkin


**C++**da `operator`lar

`Arifmetik` operatorlar:
`Tayinlash` operatorlari:
`Taqqoslash` operatorlar:
`Mantiqiy` operatorlar:


**Arifmetik operatorlar**
`Matematik amallarni + yoki - amallarini bajaradi`


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

**Tayinlash operatorlari**


**Tayinlash operatorini belgisi `=` o'zgaruvchini qiymatini belgilash uchun ishlatiladi**

```
#include <iostream>
using namespace std;

int main() 
{

int num = 100;

cout << num;

return 0;
}
```

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


**Taqqoslash operatorlari**


**Ikki qiymatni taqqoslash uchun ishlatiladi**



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


**Mantiqiy operatorlar**


**O'zgaruvchilar yoki qiymatlar o'rtasidagi mantiqni aniqlash uchun mantiqiy operatorlar qo'llaniladi**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uqo4bmyvflwrh515yqfa.jpg)
Bitcoin's Origin Story
Tags: beginners, blockchain, opensource
Published: 2023-03-11 12:35:23

The appearance of the first cryptocurrency and the creation of Bitcoin can be traced back to the financial crisis that occurred in the United States in 2008. The crisis was caused by the mishandling of deposited funds by large financial institutions, leading to a lack of confidence in the traditional financial system. This highlighted the need for a transparent transaction register that could show who sent money to whom while preserving the anonymity of users.

In 2008, a person or group using the pseudonym Satoshi Nakamoto proposed the creation of the first digital currency, Bitcoin, in a manifesto published on a cryptography forum. This manifesto outlined the structure and algorithms that would govern the Bitcoin network, with the potential to revolutionize the international financial system.

In 2009, the Bitcoin network was launched, with the first block created and the first transaction taking place. Bitcoin soon gained popularity as a decentralized digital system that distributed management and decision-making among network participants, rather than being controlled by a single entity. Its an open-source digital payment system that operates on the principle of direct exchange between users, with the availability of resources determined solely by supply and demand.
Startup Web Development
Tags: webdevelopmentservices, websitedesign, webdev, webdesign
Published: 2023-03-11 12:15:20

## How to Get Professional Services for Your Business

Startup web development is a critical part of launching a successful business. Without a professional website, your business may struggle to reach its online potential. **[Professional web development](https://69thedeal.com/web-development-laravel/)** services can provide the tools and resources you need to create a website that will help your business thrive.

When selecting a web development service, you should look for a provider that can provide the necessary services for your business. This includes website design and development, hosting, domain registration, e-commerce solutions, content management system (CMS) integration, and any other services that are part of the website process.

The provider should have experience creating websites for businesses of all sizes. They should also be able to provide technical support and ensure that the website is up-to-date and secure. Additionally, you should look for a provider that has a good reputation in the industry and a portfolio of successful projects.

Once you have identified a web development service, you should discuss the services they offer in detail. This includes outlining the design and development process, timeline, and cost. You should also discuss any additional services that may be required, such as SEO, analytics, and other marketing tools.

It is important to ensure that the provider has the resources to complete the project in a timely manner. This includes having the necessary skills and technological resources to create a successful website. Additionally, the provider should have the experience to ensure that the website meets the needs of your business.

Before signing a contract with the provider, you should contact several of their former clients. Ask questions about their experience with the provider and the website they created. This can help you determine whether the provider is the right fit for your business.

Once you have chosen a web development service, you can begin to work on creating your website. The provider will provide guidance, advice, and support throughout the process. They can help you create a website that meets your company’s needs and is tailored to your target audience. Additionally, the provider can provide additional services such as website maintenance and optimization.

By taking the time to find a **[professional web development service](https://69thedeal.com)**, you can ensure that your business has the tools and resources it needs to reach its online potential. With the right provider, your website can be the foundation of a successful business.
What you guys think?(Demo)
Tags: opensource, css, azure, frontend
Published: 2023-03-11 12:12:49

We are still in development and testing stages. Trying to build different interfaces for the MOB Media app. We need developers to help if you are interested in working on a music app let us know in the comments... This is just to give people a bit of an idea what we are working on.




![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xgyfrqujbrug363raqpq.png)
React Hooks: How to Use Them and Why They're Important
Tags: react, state, reusability, functional
Published: 2023-03-11 12:00:00

React Hooks are a powerful feature introduced in React 16.8 that allows you to use state and other React features without writing a class. Hooks provide a way to reuse stateful logic between components, and they simplify code by reducing the need for higher-order components and render props.

## Why Hooks Are Important
Before Hooks, the primary way to manage state in a React component was to use a class. However, classes can be confusing for beginners, and they can lead to code that's difficult to understand and maintain. Hooks provide a simpler, more intuitive way to manage state that's accessible to developers of all skill levels.

Hooks also promote code reuse and composition, which makes it easier to create and maintain complex applications. By creating custom hooks, you can encapsulate and reuse stateful logic, making your code more modular and easier to test.

## How to Use Hooks
To use Hooks in your React components, you'll first need to import them from the React library:

```js
import React, { useState, useEffect } from 'react';
```
The `useState` hook allows you to add state to your functional components:

```js
function Counter() {
  const [count, setCount] = useState(0);

  return (
    <div>
      <p>You clicked {count} times</p>
      <button onClick={() => setCount(count + 1)}>Click me</button>
    </div>
  );
}
```
The `useEffect` hook allows you to run side effects in your functional components:

```js
function Example() {
  const [count, setCount] = useState(0);

  useEffect(() => {
    document.title = `You clicked ${count} times`;
  }, [count]);

  return (
    <div>
      <p>You clicked {count} times</p>
      <button onClick={() => setCount(count + 1)}>Click me</button>
    </div>
  );
}
```
The `useEffect` hook runs after every render, and you can use it to fetch data, update the DOM, or perform any other side effect.

## Conclusion
React Hooks are an important feature that simplifies state management and promotes code reuse and composition. By using hooks like `useState` and `useEffect`, you can create components that are easier to understand, test, and maintain. If you're new to React, we encourage you to explore hooks and start using them in your projects.

Thank you,
J-Sandaruwan.
[linkedin](https://www.linkedin.com/in/j-sandaruwan/)
Unlimited Arguments and Return Type of Function
Tags: php, beginners, programming, functional
Published: 2023-03-11 11:17:48

Sometimes you may not know how many arguments will be passed to your function in advanced. So you should handle the situaion. Before we had to manage it manually but right now php has builtin features for unlimited arguments. Behind the scene it creates an array to store the rest of arguments.

Suppose In my home, my two friends and their family memebers will come to visit. Here two friends are confirmed as a guest and rest are unknown and unlimited. Here is an example:

```php
<?php
function guestList(string $friend1, string $friend2, string ...$others){
   echo "Confirmed Guests are: " . $friend1 . " " . $friend2 . "\n";
   echo "Unknown are: \n";
   foreach($others as $name){
    echo "$name\n";
   }
   echo "\n";
}

guestList("Gourango", "Nayon", "a", "b", "c", "d");

```
Decalaring a return type of a function explicitly sometimes helps a lot when debugging. You will face fatal error if you accidentally return such a value which is mismatched with decalared return type. 

Suppose you want to calculate your age and you want to get only years. Then the return type should be integer. Because nobody tell i am 26.7 years old.

```php
<?php
function calculateAge(string $birthday):int{
    $timeZone = new DateTimeZone('Asia/Dhaka');
    $age = DateTime::createFromFormat('d/m/Y', $birthday, $timeZone)->diff(new DateTime('now', $timeZone))->y;
    return $age;
}

$age = calculateAge("27/08/1993");
echo "you are $age years old\n";
echo "\n";

```
If you don' return integer you will face a fatal error here.

**A little Tips:**
If your function gets too much big and starts doing more than one work you can decompose the function into smaller chunks.
how to install and use font awesome icons in react js easily
Tags: webdev, react, beginners, tutorial
Published: 2023-03-11 10:02:27

{% youtube 7fdpzXeXbcE%}
For a video tutorial watch this ☝🏿

First make a react project and install these 4 packages

```js
//install this core package first
npm i --save @fortawesome/fontawesome-svg-core

//install first if you want to use solid icons and
//install second if you want to use regular icons
npm i --save @fortawesome/free-solid-svg-icons
npm i --save @fortawesome/free-regular-svg-icons

//install this react component to use fontawesome
npm i --save @fortawesome/react-fontawesome@latest

```

now go to here and pick any icon you like 
https://fontawesome.com/search?o=r&s=regular%2Csolid&f=sharp

suppose i like this one

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

as you can see it's react code is this 
`<FontAwesomeIcon icon="fa-sharp fa-solid fa-hippo" />`

so basicallly you need the last one i.e, `fa-hippo`
change this to CamelCase and remove dash(-) so it will be `fa-hippo` to `faHippo`
and now you can use it like this 

```js

import "./App.css";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faHippo } from "@fortawesome/free-solid-svg-icons";
function App() {
  return (
    <div className="App">
      <FontAwesomeIcon icon={faHippo} />
    </div>
  );
}

export default App;
```

Press the like if you enjoyed this article