teleren/devto huggingface dataset:
Happiness and Success in Tech Industry
Tags: career, beginners, tutorial, mentalhealth
Published: 2022-12-09 15:59:59

[facebook.com/Trinwhocode](https://facebook.com/Trinwhocode)

Are you happy and successful in the IT industry? This is a question that many IT professionals grapple with on a daily basis. For some, success and happiness may mean climbing the corporate ladder and earning a high salary, while for others it may mean working on meaningful projects and having a positive impact on the world.

But what does success and happiness truly mean in the IT industry?

According to a recent survey, the majority of IT professionals cited having a fulfilling and challenging job as the most important factor for their happiness and success. This indicates that the IT industry values creativity and innovation, and rewards those who are willing to push boundaries and take risks.

Additionally, many IT professionals reported that having a strong support system and a positive work environment were crucial for their happiness and success. This highlights the importance of building and maintaining professional relationships, as well as creating a workplace that is inclusive and supportive.

However, it's not all sunshine and rainbows in the IT industry. A significant number of respondents also mentioned that they struggled with work-life balance and felt burnt out from the demanding nature of their jobs. This suggests that achieving success and happiness in the IT industry may require finding a healthy balance between work and personal life.

So, are you happy and successful in the IT industry? Only you can answer that question, but it's clear that success and happiness are not defined by a single metric or achievement. Instead, they are multifaceted and depend on a variety of factors, including personal fulfillment, professional growth, and overall well-being.

[linkedin.com/in/trinmar/](https://www.linkedin.com/in/trinmar/)
How to monetize open-source software
Tags: opensource, monetization, ideas
Published: 2022-12-09 15:54:31

Are you a open-source maintainer looking to monetize your open-source software? If so, you're not alone. Many open-source maintainers struggle to generate revenue from their work, despite the valuable contributions they make to the open-source ecosystem.

But the good news is that it is possible to monetize open-source software, and there are several ways to do it. One approach is to charge a licensing fee for use of your library. This can be a flat fee, or you can offer different licensing options with varying prices. For example, you could offer a free license for personal or non-commercial use, and charge a fee for commercial use.

Another approach is to collect donations from users who want to support your work. This can be done through platforms like [Patreon](https://patreon.com) or [OpenCollective](https://opencollective.com/), which allow users to make voluntary contributions. You can also offer paid support or consulting services to users who want help using or integrating your library. This can be a good way to generate revenue, and it can also help to build relationships with your users and gain valuable feedback on your library.

Additionally, you can sell related products or services that are connected to your library. For example, you could sell training courses, books, or developer tools that are based on your library. This can be a good way to generate additional revenue, and it can also help to increase the visibility and popularity of your library.

Finally, you can use a monetization platform like [PayDevs](https://paydevs.com). These platforms provide a closed registry of open-source libraries, and users pay a fee to access the registry. The fees are then distributed to the maintainers of the libraries, without charging any fees to the maintainers. This can be a convenient and effective way to monetize your library, as it allows you to focus on maintaining and improving your library, while the platform handles the payment processing and other aspects of monetization.

In conclusion, there are several ways to monetize your open-source software, and the right approach will depend on your specific goals and circumstances. By charging licensing fees, collecting donations, offering paid support or consulting services, selling related products or services, and using a monetization platform, you can generate revenue from your work and continue to support and improve your library. This can help to ensure the sustainability of the open-source ecosystem, and reward the hard work of maintainers
From Build to Prod: Getting Started with Software Signing and Policy Enforcement
Tags: events, security, opensource
Published: 2022-12-09 15:45:26


[![Banner for the Build to Prod event](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f40moq5tybjvk6qr9icp.png)](https://www.crowdcast.io/c/software-signing)Want to know how to get started on signing your images and commits? Secure your software from build to production and join [James Strong](https://twitter.com/strongjz) to walk through signing images with [Sigstore](https://www.sigstore.dev/how-it-works) via Tekton chains and commits with [Gitsign](https://dev.to/erikaheidi/enable-gitsign-today-and-start-signing-your-commits-2gda), all with [policy enforced by Chainguard](https://www.chainguard.dev/chainguard-enforce)!

[Be sure to register and save your spot for free!!](https://www.crowdcast.io/c/software-signing)
Creating a new database in Rails
Tags: rails, ruby, database, postgres
Published: 2022-12-09 15:43:17

To create a new database in Rails, you can use the rails db:create command. This will create a new database for your Rails application using the database adapter and settings specified in your `config/database.yml` file. For example, if you are using SQLite as your database, you would run the following command:

```
rails db:create
```

This will create a new database for your Rails application in the db directory — SQLite by default, but you may have configured a different database already, such as Postgresql. You can then use the `rails db:migrate command` to run any pending database migrations, which will set up the necessary tables and schema for your application.

Keep in mind that you will need to have a database server installed and running on your system in order to use this command. If you are using a database other than SQLite, you will also need to ensure that the necessary database drivers and libraries are installed on your system.
Day 9: CI for Mojo-UserAgent-Cached and Plack-Middleware-Greylist
Tags: perl, opensource, programming, devops
Published: 2022-12-09 15:43:00

---
title: Day 9: CI for Mojo-UserAgent-Cached and Plack-Middleware-Greylist
published: true
description: Two Perl projects
tags: perl, opensource, programming, devops
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
published_at: 2022-12-09 15:43 +0000
canonical_url: https://code-maven.com/ci-for-two-perl-projects
series: ci-2022-12
---

Today I can report about two pull-requests for two web-related Perl projects.

One of them is called [Mojo-UserAgent-Cached](https://metacpan.org/dist/Mojo-UserAgent-Cached) and the other one is [Plack-Middleware-Greylist](https://metacpan.org/dist/Plack-Middleware-Greylist).


## Mojo-UserAgent-Cached

It was quite straight-forward. There were only two small issues.
I had to install [Module::Install](https://metacpan.org/pod/Module::Install) before I could use the regular tools
as the `Makefile.PL` relies on that. That's a known drawback of Module::Install for developers and maintainers.

The other problem was that tests were failing on Windows so I had to disable them.
Anyway I sent a [Pull-request](https://github.com/nicomen/mojo-useragent-cached/pull/6) it was merged soon after.

## Plack-Middleware-Greylist

Here too I had to disable the testing on Windows, this time because one of the dependencies was failing own Windows.
The author then wanted to add testing more versions of Perl, but did it himself. I was contemplating a bit if I should send
another PR where first we build the tar.gz on one version of Perl and then use that for testing, but there are no
extra dependencies install for the building so I don't think that could reduce the time or the cpu usage.

[pull-request](https://github.com/robrwo/Plack-Middleware-Greylist/pull/3)

## Conclusion

That was easy.
FYI, ChatGPT's knowledge cutoff date is September 2021
Tags: chatgpt, machinelearning, openai, news
Published: 2022-12-09 15:31:56


Greetings!

Let's safely assume most of us either got to know or try the ChatGPT by now.

If you don't know about it yet or wanna learn more about it, visit https://openai.com/blog/chatgpt

ChatGPT is <3
{% twitter 1600490652688687104 %}

I got outdated answers for a couple of questions and ...

![ChatGPT talking about the learning and the cutoff](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e2uejfmwpveqpwxok8mj.png)

Thanks for reading.
C# Open-Source Projects for beginners
Tags: opensource, beginners, csharp, dotnet
Published: 2022-12-09 15:26:05

Projects to contribute to:

- [Blazor-Spinner-CSS](https://github.com/ayodejii/blazor-spinner-css) - 90% CSS and 10% C#

- [wj.Ocelot.Configuration](https://github.com/WJSoftware/wj.Ocelot.Configuration) - 100% C#

Many developers and beginners want to contribute to opensource projects, but they find it hard to due to these reasons and more:

- Advanced projects: Most of the available projects are too advanced for beginners. A glance at the first code file already discourages them, not to mention the senior contributors of that project.


- Inadequate open-source projects: This can also derive from the first point. I do check trending opensource C# projects every day and what I see are mostly official Microsoft projects. There are fewer individual projects available, well, maybe not trending.

These two points said, I have taken it upon myself to look for opensource C# projects and update this post with them.
If you find some, please add in the comments too.
Thank you 😊👨🏿‍💻👩🏿‍💻
How to Avoid Burnout as a Developer
Published: 2022-12-09 15:20:00

Work burnout is a state of emotional, physical, and mental exhaustion caused by prolonged and excessive stress in the workplace. It is a common problem among workers, especially in high-pressure environments, and it can have serious consequences for an individual's health, well-being, and productivity.

Work burnout can happen for many reasons, but some common causes include:

1. Prolonged and excessive workload: Excessive workload can lead to burnout, especially if it is accompanied by tight deadlines, high expectations, and a lack of support or resources.

2. Lack of control and autonomy: Lack of control and autonomy in the workplace can lead to burnout, as it can make an individual feel like they have no control over their work and no ability to make decisions or take action.

3. Poor work-life balance: Imbalanced work-life can lead to burnout, as it can make an individual feel like they have no time for themselves or for their personal life, and no opportunity to rest, recharge, and recover from work-related stress.

4. Lack of recognition and support: Lack of recognition and support in the workplace can lead to burnout, as it can make an individual feel unappreciated, undervalued, and unsupported.

To reduce burnout as a developer, you can try the following strategies:

1. Take regular breaks: It is important to take breaks throughout the day to rest and recharge. This can help to prevent fatigue and burnout, and it can improve your overall productivity and well-being.

2. Establish a healthy work-life balance: It is important to find a balance between work and personal life. This can help to prevent burnout, and it can improve your overall happiness and satisfaction.

3. Practice good self-care: Taking care of your physical, mental, and emotional health is essential for preventing burnout. This can include activities such as exercise, healthy eating, and getting enough sleep.

4. Seek support from colleagues and friends: Burnout can be isolating, but it is important to reach out for support from others. This can include discussing your challenges and concerns with colleagues and friends, and seeking advice and guidance from professionals.

5. Engage in hobbies and activities outside of work: Engaging in hobbies and activities that you enjoy can help to reduce stress and burnout. This can include activities such as playing sports, reading, writing, or playing music.

Overall, reducing burnout as a developer requires a combination of strategies and activities that support your physical, mental, and emotional well-being. By taking regular breaks, establishing a healthy work-life balance, practicing good self-care, seeking support from others, and engaging in hobbies and activities outside of work, you can reduce burnout and improve your overall happiness and satisfaction.
Rendering Web Methods in Next.js
Tags: nextjs, webdev, react, web
Published: 2022-12-09 15:12:21

I've been developing web applications for over seven years now, and I've seen a lot of different methods for rendering webpages.

I started with PHP, and for a long time, server-side rendering was the only option. In PHP the server is responsible for generating the HTML of the page, and it is send directly to the client.

This worked well, but then two years later I learned Node.js and Next.js. This was a paradigm shift for me, as I was now able to do client-side rendering, but also static side generation and (again) server-side rendering.

In this article, you'll discover the most common rendering web methods: **client side rendering, server side rendering, and static site generation** with its advantages and disadvantages.

## Client Side Rendering (CSR)

CSR is the process of rendering the content of a web page in the browser, using JavaScript. It works by sending a request to the server for HTML and other resources, then rendering the page in the browser.

✅ Easy development.

❌ Search engine optimization (SEO) can be a challenge since crawlers may not be able to index the content.

## Server Side Rendering (SSR)

SSR is the process of generating HTML on the server and sending it to the browser. The main advantage of SSR is that it allows for full page rendering, including the ability to render different content depending on the user, such as language or device type.

✅ Content is generated on the server and sent to the client, making it easier to optimize for SEO.

❌ The initial page load can be slower, as the server needs to generate the HTML, CSS and JavaScript files.

## Static Site Generation (SSG)

SSR works by pre-rendering the application on the server and creating a set of static HTML files which can be served directly to the browser.

✅ The main advantage of SSG is that it can improve performance and reduce the amount of time needed to render the page in the browser.

❌ Because static sites are built from pre-generated files, it can be more difficult to make changes to the design and layout of a static site than it is to make changes to a dynamic site.

## Recommendations

So which you should use? A CSR web app is very easy to develop. Now, if you have the time to develop a SSR. But because of the advantages that SSR presents, if you have resources (time) to spend, you should consider switching to SSR.

Finally, checking the Next.js documentation we can found the following statement:

> We **recommend** using **Static Generation** over Server-side Rendering for performance reasons. Statically generated pages can be cached by CDN with no extra configuration to boost performance. However, in some cases, Server-side Rendering might be the only option.
How to enable the slow query log in Postgresql
Tags: postgres, slowquery, beginners, tutorial
Published: 2022-12-09 15:05:14


We can capture the slow query details using the parameter “log_min_duration_statement” 

Also we should consider the below parameters
           * logging_collector
           * log_directory
           * log_filename
           * log_statement
https://www.youtube.com/watch?v=g3Ccgh4q9AA&list=PLKShApAWCKLTCQeLLu_z_tHS5wICa4Qs9&index=1
𝟱 𝗙𝗿𝗲𝗲 𝗔𝗣𝗜𝘀 𝗙𝗼𝗿 𝗬𝗼𝘂𝗿 𝗣𝗿𝗼𝗷𝗲𝗰𝘁𝘀 🔥
Tags: api, web3, javascript, programming
Published: 2022-12-09 15:02:35


💥 𝐅𝐚𝐤𝐞 𝐒𝐭𝐨𝐫𝐞 𝐀𝐏𝐈
🔗 https://fakestoreapi.com/

💥 𝐖𝐨𝐫𝐝𝐬 𝐀𝐏𝐈
🔗 https://www.wordsapi.com/

💥 𝐑𝐚𝐧𝐝𝐨𝐦 𝐔𝐬𝐞𝐫 𝐃𝐚𝐭𝐚
🔗 https://randomuser.me/

💥 𝐃𝐮𝐦𝐦𝐲 𝐀𝐏𝐈
🔗 https://dummyapi.io/

💥 𝐒𝐞𝐣𝐝𝐚
🔗 https://www.sejda.com/

Follow me for more coding-related tips and tricks
Best extensions to use in vscode
Tags: vscode, javascript, webdev, beginners
Published: 2022-12-09 14:58:47

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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9b1kesjmqw2vnvxvls1u.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xy1up50bbwiis0w86zz3.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rp28mk11tqrmv8w5iej6.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ytpzsvrzl5qwpovzlvjw.jpg)
Method overloading & overriding in Polymorphism
Tags: java, programming
Published: 2022-12-09 14:56:52

## Why Method overloading is called compile-time polymorphism?

**_Method overloading is a feature of object-oriented programming languages that allows a class to have multiple methods with the same name, as long as they have different parameter lists._**

This allows for a more concise and readable implementation, as the same method name can be used to perform different operations depending on the arguments provided.

Method overloading is called compile-time polymorphism because it is resolved at compile time, meaning that the compiler determines which method to call based on the arguments provided at the time the code is compiled. This is in contrast to runtime polymorphism, which is resolved at runtime and allows for a single method to behave differently depending on the type of object it is called on.

In summary, method overloading is called compile-time polymorphism because it is resolved at compile time, meaning that the compiler determines which method to call based on the arguments provided at the time the code is compiled. This is in contrast to runtime polymorphism, which is resolved at runtime.

## Why Method overriding is called run-time polymorphism?

**_Method overriding is a feature of object-oriented programming languages that allows a subclass to provide a specific implementation of a method that is already defined in a superclass._**
This allows for runtime polymorphism, where a single method can behave differently depending on the type of object it is called on.

Method overriding is called runtime polymorphism because it is resolved at runtime, meaning that the actual method that is executed is determined based on the type of the object on which the method is called. This is in contrast to compile-time polymorphism, which is resolved at compile time and allows for a class to have multiple methods with the same name as long as they have different parameter lists.

In summary, method overriding is called runtime polymorphism because it is resolved at runtime, meaning that the actual method that is executed is determined based on the type of the object on which the method is called. This is in contrast to compile-time polymorphism, which is resolved at compile time.
deployment error from vercel having dependencies of node 16v
Tags: javascript, webdev, react, programming
Published: 2022-12-09 14:53:59

```
[20:18:19.676] Cloning github.com/keshri95/tesla-clone (Branch: dependabot/npm_and_yarn/loader-utils-2.0.4, Commit: a32a2e9)
[20:18:20.249] Previous build caches not available
[20:18:20.279] Cloning completed: 602.781ms
[20:18:20.716] Running "vercel build"
[20:18:21.208] Vercel CLI 28.8.0
[20:18:21.811] Installing dependencies...
[20:18:23.458] npm ERR! code ERESOLVE
[20:18:23.462] npm ERR! ERESOLVE could not resolve
[20:18:23.462] npm ERR! 
[20:18:23.463] npm ERR! While resolving: @material-ui/core@4.12.4
[20:18:23.463] npm ERR! Found: react@18.1.0
[20:18:23.463] npm ERR! node_modules/react
[20:18:23.463] npm ERR!   react@"^18.1.0" from the root project
[20:18:23.463] npm ERR!   peer react@">=16.8.0" from @emotion/react@11.9.0
[20:18:23.463] npm ERR!   node_modules/@emotion/react
[20:18:23.464] npm ERR!     @emotion/react@"^11.9.0" from the root project
[20:18:23.464] npm ERR!     peer @emotion/react@"^11.0.0-rc.0" from @emotion/styled@11.8.1
[20:18:23.464] npm ERR!     node_modules/@emotion/styled
[20:18:23.464] npm ERR!       @emotion/styled@"^11.8.1" from the root project
[20:18:23.465] npm ERR! 
[20:18:23.465] npm ERR! Could not resolve dependency:
[20:18:23.465] npm ERR! peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4
[20:18:23.465] npm ERR! node_modules/@material-ui/core
[20:18:23.466] npm ERR!   peer @material-ui/core@"^4.0.0" from @material-ui/icons@4.11.3
[20:18:23.466] npm ERR!   node_modules/@material-ui/icons
[20:18:23.466] npm ERR!     @material-ui/icons@"^4.11.3" from the root project
[20:18:23.466] npm ERR! 
[20:18:23.466] npm ERR! Conflicting peer dependency: react@17.0.2
[20:18:23.466] npm ERR! node_modules/react
[20:18:23.466] npm ERR!   peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4
[20:18:23.467] npm ERR!   node_modules/@material-ui/core
[20:18:23.467] npm ERR!     peer @material-ui/core@"^4.0.0" from @material-ui/icons@4.11.3
[20:18:23.467] npm ERR!     node_modules/@material-ui/icons
[20:18:23.467] npm ERR!       @material-ui/icons@"^4.11.3" from the root project
[20:18:23.467] npm ERR! 
[20:18:23.467] npm ERR! Fix the upstream dependency conflict, or retry
[20:18:23.467] npm ERR! this command with --force, or --legacy-peer-deps
[20:18:23.467] npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
[20:18:23.467] npm ERR! 
[20:18:23.467] npm ERR! See /vercel/.npm/eresolve-report.txt for a full report.
[20:18:23.467] 
[20:18:23.468] npm ERR! A complete log of this run can be found in:
[20:18:23.468] npm ERR!     /vercel/.npm/_logs/2022-12-09T14_48_22_080Z-debug-0.log
[20:18:23.496] Error: Command "npm install" exited with 1
```
{% stackoverflow 74656603 %}
Cryptographic Hash Functions
Tags: crypography, blockchain, algorithms, web3
Published: 2022-12-09 02:39:57

A hash function is a function which takes an input of any size and turns it into a fixed size output.

Let's imagine a hash function that takes an input of any size and returns a fixed 32 byte output:


![32 bytes](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/epaj0ounigwwnsznp3wi.png)

These inputs get larger from top to bottom but they always map to an output of 32 bytes. There are many different algorithms for hash functions which could take these inputs and create outputs of fixed sizes.

The specific types of hash functions we are going to focus on are cryptographic hash functions. These hash functions need five specific properties. They must be:


🔮 Deterministic - One specific input always maps to the same specific output
🎲 Pseudorandom - It is not possible to guess the output based on the output of similar inputs
➡️ One-way - If someone gives you a new output, you could not determine an input without guessing
🏎️ Fast to Compute - It must be a quick calculation for a computer
💥 Collision-resistant - The chance of a collision should be infinitesimally small

Challenge Yourself: Try using this [sha256 online tool](https://emn178.github.io/online-tools/sha256). Can you prove to yourself each one of these properties?

source: [Alchemy university](https://university.alchemy.com/course/ethereum/md/blockchain-intro)