teleren/devto huggingface dataset:
10 ways to earn as software developer
Tags: webdev, javascript, beginners, chatgpt
Published: 2022-12-31 13:57:22

1 : Freelancing: You can offer your software development services on a freelance basis to clients around the world. You can find freelance work through online platforms like Upwork, Freelancer, and Toptal, or you can reach out directly to potential clients through networking and marketing efforts.

Consultancy: Another option is to start your own consultancy and offer software development services to clients on a contract basis. This can be a good option if you have a lot of experience and expertise in a particular area and want to work with a variety of clients.

Product development: If you have an idea for a software product, you can create it and sell it to customers. This can be a challenging and time-consuming process, but it can also be very rewarding if your product is successful.

In-house development: You can also work as an in-house software developer for a company, where you will be responsible for developing and maintaining software for the company's internal use.

Open-source contributions: You can contribute to open-source projects and earn money through donations or by offering paid support and consulting services to users of the project.

Teaching: If you have a lot of experience and knowledge in software development, you can consider teaching others through online courses or in-person workshops.

Writing: You can write technical articles or books on software development and earn money through publishing or by offering your writing services to clients.

Speaking: You can also earn money by speaking at conferences or events about software development. This can be a great way to share your knowledge and experience with others while also earning income.

Contract work: You can work as a contractor for a company on a short-term basis, completing specific software development projects for them.

Starting a business: Another option is to start your own software development business, either as a solo entrepreneur or with a team of developers. This can be a challenging but rewarding way to earn money as a software developer.
How to Set Up a Book Selling Website with WordPress and Mpesa Integration
Tags: mpesa, ecommerce, wordpress
Published: 2022-12-31 13:17:48

In this tutorial, we'll show you how to create a fully-functioning book selling website using WordPress and Mpesa integration. We'll walk you through the step-by-step process of setting up the website, including how to choose the right hosting provider and plugins to get the most out of your online bookstore. Plus, we'll share some tips and best practices for promoting your website and attracting customers. By the end of this tutorial, you'll have everything you need to create a successful online bookstore.

By the end of this tutorial, you'll have everything you need to create a successful online bookstore. Without further ado, let's get started – watch the video below to learn more.

[![Book Selling Website Tutorial](https://img.youtube.com/vi/TSb5wQDBMRo/0.jpg)](https://youtu.be/TSb5wQDBMRo)

Before you can get started with setting up your book selling website, you'll need to purchase the necessary plugin from our website. You can find the plugin at the following link: https://fortunedev.hustlesasa.shop/product/20342.

This plugin is essential for adding Mpesa integration to your WordPress website, as well as a number of other features that will help you manage your online store. Once you've purchased the plugin, you'll receive a download link and instructions on how to install it on your WordPress website.

Once the plugin is installed, you'll be ready to start setting up your book selling website. Follow the steps in the tutorial to complete the setup process and start selling books online. Good luck!
One-page Database cheat sheet
Tags: interview, cheatsheet, database, sql
Published: 2022-12-31 13:14:30

Hello everyone 👋

I am glad to present you with the One-page Database cheat sheet.

Link (google doc): [One-page Database cheat sheet](https://docs.google.com/document/d/1ynlPwaoiLe1w1evkcBsEAwGtNK1kTQiab4N6x5r38ow/edit?usp=sharing)

Feel free to leave your comments on the google doc or below the post.

Sources: 
https://www.geeksforgeeks.org/acid-properties-in-dbms/
https://www.geeksforgeeks.org/transaction-isolation-levels-dbms/
https://www.geeksforgeeks.org/normal-forms-in-dbms/
https://www.geeksforgeeks.org/indexing-in-databases-set-1/
https://www.scaler.com/topics/sql/advantages-and-disadvantages-of-indexing-in-sql/
🚀 New portfolio site – check it out!
Tags: react, webdev, beginners, portfolio
Published: 2022-12-31 13:11:42

Hey there 👋!

I just wanted to let you know that I just built my new [portfolio] (poojabela.github.io) site. I would really appreciate it if you could take some time to check it out and leave a review. Your feedback is really important to me as I continue to grow and improve my work.

Thanks in advance for your time and support!

Visit my portfolio site at: [poojabela.github.io](poojabela.github.io)
Full Notepad++ Setup for Python
Tags: notepad, python, tutorial, beginners
Published: 2022-12-31 12:51:48

If the [Quick Notepad++ Setup for Python](https://dev.to/pizofreude/quick-notepad-setup-for-python-4l5o) isn't your cup of tea, here's a full-blown setup you can try to make it world whole again as a Python dev.

### Step 1

Verify Python installation on the system. Open cmd and type:

```bash
python --version
```

If python is not yet installed, get it [here](https://www.python.org/downloads/).
   
### Step 2

Install "NppExec" plugin inside notepad++. (Skip this if you already done it)

### Step 3

Go to "plugins" --> "NppExec" --> click on "Execute"

When the command window pops up, add the following script and save it with a new name.

```bash
NPP_SAVE
cd $(CURRENT_DIRECTORY)
python $(FILE_NAME)
```

### Step 4

Create menu item and hotkey to run the python program:

Go to "plugins" --> "NppExec" --> click on "Advanced options"
   
Then, go to "settings" --> "shortcutmapper" and follow the instructions to create a shortcut.

### Step 5

Test run any python program and voila!
SOLID Design Principle in JAVA
Tags: programming
Published: 2022-12-31 12:42:57

**SOLID** is a mnemonic acronym that stands for five design principles developed to write reusable, scalable, flexible and maintainable code. It also helps in reducing tight coupling(group of classes that are highly dependent on one another). As loose coupling is the approach which is suitable while writing code as it makes it reusable, flexible and maintainable.

SOLID stands for —

**S**ingle responsibility principle

**O**pen-closed principle

**L**iskov substitution principle

**I**nterface segregation principle

**D**ependency inversion principle

Let’s dive deep into what is SOLID by understanding what each principle means in detail.

**Single Responsibility principle (SRP)**
Its all about having only one reason to change the class/ package or component. One class should have only one responsibility to implement.

In order to achieve Single responsibility principle, we need to implement all the tasks in different classes individually, thus we can have one class implement one functionality and implement it well.

**Open Closed principle (OCP)**
This design approach states that any component such as class or routine should be open for extension but closed for modification, which means code should be written in a manner that there should be no need to modify it and changes should be allowed only through inheriting the class and extending the class behavior without actually a need to modify it.

Create an interface and implement the functionality separately in its individual classes.

**Liskov Substitution principle (LSP)**
Liskov substitution principle states that child classes should be substitutable for parent classes.

which essentially means if a class A (child class) extends class B (parent class), then it should inherit in a way that class A should completely.

This approach helps to reduce coupling in the code thus improving the reusability across the codebase.

**Interface segregation principle (ISP)**
client should only implement the methods or interfaces which are required and need not implement methods that are not required in class.

This design principle is similar to Single responsibility principle (SRP) as this helps us to write code that implements smaller and focused interfaces.

**Dependency Injection Principle (DIP)**
According to this principle, classes should only be dependent on its abstraction and not onto its concrete implementation. High level modules should not depend on low level modules rather its abstraction.

This principle is used to write code that is highly decoupled and well structured having reusable software components.

References: [baeldung](https://www.baeldung.com/), [javatechie](https://medium.com/@javatechie)
Quick Notepad++ Setup for Python
Tags: python, npp, tutorial, beginners
Published: 2022-12-31 12:33:30

Sometimes using built-in Python IDLE isn't so quick after all for testing code blocks.

Using online compiler such as [Programmiz](https://www.programiz.com/python-programming/online-compiler/) is limited by the library available. Need to use import os? Sorry NO-GO.

Luckily, Notepad++ comes to the rescue with a very concise setup:

1. Go to the Run tab in Notepad++
2. Click Run...
3. Enter the following command and saved it as "Run Python" or whatever you like: 

```bash
 python -i "$(FULL_CURRENT_PATH)"
```

4. Set a hotkey for that. I set `ctrl+F5` for that.
5. Now simply test any code you want in Notepad++, saves it and hit `ctrl+F5` to run the python code. Done.
The least bad move in tech - F&L #2
Tags: failandlearn, devjournal, career, motivation
Published: 2022-12-31 12:28:31

We live in a society that always thinks about winning and winning and we have turned the human being into something specifically made to win over the rest, to be above the others. 

To success means to be better than others, to success means to earn more money, to get the best position, to have a better title on LinkedIn, to success means always making the best move.

It is possible that throughout your career in technology, you have experienced some, if not all, of the above points either in others or in yourself. 

Fortunately, it seems to be something that is easily fixed, with enough time and experience. 

These needs to be better and to win end up causing many people to get lost along the way and, instead of understanding failures as part of the journey and knowledge, they understand them as mistakes and penalties. And how not to get lost?

To my surprise, I learned this lesson by listening to a professional video game player. Professional players are usually people who have seen failure very closely and who have managed to reach a very small percentage of their profession, which basically gives them something to live for.

That player explained that casual people always try to make the best move with the elements they have, that the best move is often the most complex and the one that can make you lose against stronger rivals but win against the average. This can help you to stop being a bad player but it will not help you reach the top.

And how do they do it? They mostly base their strategy on "the least bad move" which statistically and in the long term, gives you regularity and if you maintain it for long enough it will eventually make you a professional, because the least bad move can make you lose but in the long run it is much more likely that you will end up winning.

And then I wondered, how can I apply something like this to my profession? And the truth is that we cannot lack examples.

Since 100% test coverage does not provide much more than 32% coverage in which you are sure that the important things have been tested. 

That it is better to go to production with 3 out of 6 stories done than try a perfect sprint and need 12 hours per day. Or that it is better to have a project with real users and a very simple architecture than to have the best architecture in the world but no one uses your product.

Let's remember that there are startups being sold for thousands and they are just a few slides… As people who really like technology, we may not go to that extreme, but knowing how to apply these rules and many others that will surely occur to you can be the difference between a Minimum VIABLE Product and an idea that did not work because: we had "bad luck" or we "did everything right".

And that's when I wonder… What if at the end, the best move is  the least bad move?

If you want to receive this article in your inbox as a newsletter just press the button.

[![Subscribe](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s2oe4gt7otu6o2ct9ao2.png)](https://ckgrafico.substack.com/subscribe)
CSS rendering .deliver in list
Tags: css, html
Published: 2022-12-31 12:24:19

In the project I use a menu component with conditional rendering.
The problem happened in the display of menu item separators, because some entries may not be rendered.
Example 1 is the first state when all menu items are visible.
Example 2 and 3 are the state when some elements are not rendered in the component.

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

I wrote such a selector to hide the line elements.

```css
<style>
  .deliver:has(+ .deliver),
  .deliver + .deliver:not(:has(+ *)) {
    display: none;
  }
</style>
```

Code example https://codepen.io/ivolkoff/pen/ExpKBvg
You should know about the filter(Boolean) trick 💡
Tags: javascript, react, webdev, typescript
Published: 2022-12-31 12:23:09

The `Array.prototype.filter()` method in JavaScript allows you to create a new array with only the elements that pass a certain test. The `filter()` method takes a callback function as an argument, which should return a Boolean value indicating whether or not the element should be included in the new array.

One use case for the `filter()` method is to remove falsy values from an array. You can do this by using the Boolean function as the callback for the `filter()` method. The `Boolean` function returns `true` for values that are "truthy" and `false` for values that are "falsy". In JavaScript, the following values are considered falsy:

- `false`
- `0` (zero)
- `''` (empty string)
- `null`
- `undefined`
- `NaN` (Not a Number)

Here is an example of how to use the `filter(Boolean)` trick to remove falsy values from an array:

```ts
const values = [0, 1, '', 'hello', null, undefined, false, true, NaN];

const truthyValues = values.filter(Boolean);

console.log(truthyValues); // [1, 'hello', true]

```

In this example, the `filter()` method is called on the values array and passed the `Boolean` function as the callback. The `filter()` method will then iterate through each element in the `values` array and include any elements for which the `Boolean` function returns `true` in the new `truthyValues` array.

Here is another example of using the `filter(Boolean)` trick to remove falsy values from an array of objects:


```ts
const users = [
  { id: 1, name: 'John', age: 30 },
  { id: 2, name: 'Jane', age: 25 },
  { id: 3, name: 'Bill', age: 35 },
  { id: 4, name: 'Mary', age: 40 },
  { id: 5, name: '', age: null }
];

const validUsers = users.filter(user => Boolean(user.name) && Boolean(user.age));

console.log(validUsers);
/* 
[
  { id: 1, name: 'John', age: 30 },
  { id: 2, name: 'Jane', age: 25 },
  { id: 3, name: 'Bill', age: 35 },
  { id: 4, name: 'Mary', age: 40 }
]
*/
```

In this example, the `filter()` method is used to remove any users who have an empty string for their `name` or a `null` value for their `age`. The `filter()` method is passed a callback function that uses the `Boolean` function to check if the `name` and `age` properties of each user are truthy. The `filter()` method will then include only the users for which the callback function returns `true` in the new `validUsers` array.

The `filter(Boolean)` trick is a useful technique for removing falsy values from an array in JavaScript. It can be a powerful way to filter and transform data to meet your specific needs.

----------------------------------

I hope you will find this trcik helpful and will help you in your journey. Feel free to give me suggestions.

Take care developer 👋
How To Get The Best Logo For Brand?
Tags: logo, webdev, beginners, programming
Published: 2022-12-31 12:04:30

- The logo is the identity of your brand; that's why it's essential to make it unique and attractive.

- These tools will help you to select, customize and download the best logo for your brand.

The tools are:

Turbologo [https://turbologo.com/]

![A look on Turbologo website](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lra0dl5p0f42r7fxve5s.jpg)

Looka [https://looka.com/]

![A look on Looka website](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0i1q39a3uy7fs1uxf4sp.jpg)

LogoMaker [https://www.logomaker.com/]

![A look on LogoMaker website](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zkipqzirdsrkx6wc52wa.jpg)

Logogenie [https://www.logogenie.net/]

![A look on Logogenie website](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4b42kx874bgm76tlh8k2.jpg)
2022 Spotify Wrapped
Tags: spotify, codemusic
Published: 2023-01-01 06:49:13

---
title: 2022 Spotify Wrapped
published: true
date: 2022-12-31 12:00:00 UTC
tags: #spotify #codemusic
canonical_url: https://conormeagher.com/posts/2022/12/2022-spotify-wrapped/
---

Wow, 2022 is ending in a couple of hours. What a great year of growth and productivity. One thing that helped with that was switching from Apple Music to Spotify. The interface, music library, and shareability are top-notch. I frequently binged on my [144 BPM playlist](https://open.spotify.com/playlist/1PYjhP7IagKgGMaQVxvYiF?si=0091ec72aa14420d) to keep my JavaScript or newly learned TypeScript code fresh and flowing. [80's Cheese](https://open.spotify.com/playlist/7mncNgMcNKRMh3I2N5Lu6g?si=9f988332e9fa44de) was a fun way to re-live my childhood during a weird decade while coding in a modern era. The best part is that this is my first year to open my [Spotify Wrapped](https://www.newsroom.spotify.com/2022-wrapped/) present. Yay!

![My Spotify Wrapped Lists](https://res.cloudinary.com/conrmahr/image/upload/q_auto,f_auto,w_400/conormeagher.com/2022-spotify-wrapped.webp)
This week’s newsletter is out! (31-12-2022) - Happy New Year Edition
Tags: javascript, tech, webdev, discuss
Published: 2022-12-31 11:49:37

---
title: This week’s newsletter is out! (31-12-2022) - Happy New Year Edition
published: true
description: Another week of great javascript, tech and web development links.
tags: javascript, tech, webdev, discuss
---

Happy New Year Edition

https://markjgsmith.substack.com/p/mark-smiths-newsletter-31-12-2022

Would love to hear any comments and feedback you have.

[@markjgsmith](https://twitter.com/markjgsmith)
Attention JS developers!
Tags: javascript, serverless, database, api
Published: 2022-12-31 11:03:19

Need to develop a REST API but don't want to deal with the hassle of setting up servers? Look no further than [codehooks.io](https://codehooks.io)! With just a few lines of code, you can easily create and deploy your own REST APIs in the cloud. 

Here is a minimal example of a REST API app using Codehooks.io:

```js
import app from 'codehooks-js'

// Declare a single route
app.get('/hello', sayHello);

// Serverless function
function sayHello(req, res) {
  // Send a simple message to the client
  res.send('Hello, world!');
}

// Bind the app to the Codehooks runtime
export default app.init();
```

This example REST API app has a single route that listens for `GET` requests at the `/hello` endpoint. When a request is received, the sayHello function is triggered, which simply sends a message back to the client. This is the bare minimum required to create a REST API with Codehooks.io.

To deploy this app to Codehooks.io, you would run the `coho deploy` command from the command line, and your REST API would be live and ready to receive requests.

Happy new years coding.
How to save to Local storage
Tags: webdev, javascript, react, tutorial
Published: 2022-12-31 10:59:06

## Introduction

Saving data to local storage is a useful way to persist data in a web application. Local storage allows you to store data in the user's browser, which means that the data is available even if the user closes the browser or navigates to a different website. This can be useful for storing user preferences, temporary data, or any other information that you want to make available across sessions.

In this article, we will look at how to save data to local storage using JavaScript. We will start by looking at the basics of local storage, including how to set and get values. We will then explore some more advanced techniques, such as storing complex objects and handling errors.

Basics of Local Storage

To use local storage in JavaScript, you first need to check if the browser supports it. You can do this using the following code:
 

```
if (typeof(Storage) !== "undefined") {
  // local storage is supported
} else {
  // local storage is not supported
}

```
If local storage is supported, you can use the following methods to set and get values:

```
// set a value
localStorage.setItem("key", "value");

// get a value
var value = localStorage.getItem("key");

```
You can also remove a value from local storage using the removeItem method:

```
localStorage.removeItem("key");

```
You can also clear all values from local storage using the clear method:

```
localStorage.clear();

```

## Storing Complex Objects

Local storage only allows you to store strings, so if you want to store complex objects (such as arrays or objects), you will need to serialize them first. You can use the JSON.stringify method to serialize an object, and the JSON.parse method to deserialize a string back into an object.

For example, to store an array in local storage, you could do the following:

```
var array = [1, 2, 3];

// serialize the array
var serializedArray = JSON.stringify(array);

// store the serialized array in local storage
localStorage.setItem("array", serializedArray);

```
To retrieve the array from local storage, you would do the following:

```
// get the serialized array from local storage
var serializedArray = localStorage.getItem("array");

// deserialize the array
var array = JSON.parse(serializedArray);

```
Handling Errors

There are a few potential errors that you may encounter when working with local storage. One common error is trying to store too much data. Local storage has a limited size (usually around 5MB), and if you try to store more data than the available space, you will get a QuotaExceededError.

To handle this error, you can catch it using a try/catch block and display an error message to the user:

```
try {
  localStorage.setItem("key", "value");
} catch (e) {
  if (e.name === "QuotaExceededError") {
    alert("Error: Local storage is full.");
  }
}

```
Another potential error is trying to access local storage when it is disabled. This can happen if the user has disabled