teleren/devto huggingface dataset:
Lay offs. Are you ready?
Tags: career, layoffs, programming
Published: 2023-01-18 17:21:54

Lay offs are everywhere in Tech these days. You should act NOW.

Twitter has cut 50% of its workforce in November, Facebook announced 13% cuts about the same time. Microsoft has announced it's going to cut 10000 jobs. 

Losing a job can be devastating but it doesn't have to be. Below is 6 step strategy which I think can save one's life.


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

👉Step one:
Work on the emergency fund. It's advisable to have at least 3 months of salary in a safe place - just in case. At times like this I would probably suggest changing the target to 6 amounts of your monthly expenses

👉Step two:
If you can - decrease your expenses. Sell this unused car you have, stop subscriptions you don't use, consider home made lunch over Deliveroo. And now totally is not a good time for credit application unless it's a matter of life and death.

👉Step three:
It is never hurt to have your CV up to date. Update it now, and if people suggest you roles to consider - don't refuse them straight away. You might be looking for a new role sooner than you expect

👉Step four:
Have plan B. List 3-5 companies, including your ex-employers which you could go to if you have to. Try to come up with a list of companies you might want to stick around with.

👉Step five:
Have plan C. If you cannot find new work in 2-3 months - what kind of temporary work you may have? Maybe there's something you always wanted to do but could not because it wasn't profitable enough? Job which isn't paid very well for usually is better than no job at all, especially when you have family and bills to foot.

👉Step six:
Prepare for tech interviews. Do Leetcode challenges or participate in mock interviews on my YouTube channel or even just go through real interviews. Make sure you can crack it when and if you have to!

💬Bonus tip:
Don't even consider changing jobs now. Laying off long-term employee is usually significantly more difficult than ending a probation or revoking an offer altogether. Just check your LinkedIn - it's full of stories about that.

Hope this helps and even more so - hope none of this will be necessary.

🪀Follow me for more career and development advice in tech.
Why Is My Printer Offline When I Print?
Tags: hp, printer, offline
Published: 2023-01-18 17:08:39

Multiple reasons are responsible for your [Printer Is Offline](https://www.3citcians.com/blog/hp-printer-offline-windows-10/) problem. It usually happens when the printer status is set to “Offline” mode or there is a connectivity issue. No need to wag-off when facing such a problem as every problematic hurdle has their specific resolution process. So, when you follow the below-noted instructions you will get to know the ways of converting your printer offline into Online. Let’s follow the given guide:
First and foremost, you are suggested to run HP Print and Scan Doctor on your PC to detect the printer offline problem and fix it automatically.
Secondly, you need to set the default printer on your Windows system.
If this also doesn’t work, then confirm your printer port and Windows services status.
In the end, check your connection and ensure the devices are connected well.
All You Need to Know About AWS Free Tier
Tags: aws, beginners, productivity, tutorial
Published: 2023-01-18 17:03:04

As a global cloud company, AWS have many interesting product that we can choose as part of our tech stack. For learning and know all of it, AWS has free tier option that we can utilise for knowing them deeper with hands-on without cost us a lot even free. Before utilise them, we need to know type of free offer for services that we want to try because not all the services have same type of free. We can checking them [here](https://aws.amazon.com/free/). I also try to explain them below.

## 12 Months Free
The offers will be count for 12-months from your initial sign-up date to AWS. 

For see detail list, you can open the link above and choose **12 months free** from filter list in your left. 

For more information can check on the image below

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

## Always Free
Some of the services come with free offer but with some limitation. The interesting part is these offers do not expire and are available to all AWS customers.

For see detail list, you can open the link above and choose **Always free** from filter list in your left.

For more information can check on the image below

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

## Trials
Another interesting free tier type we need to know is trials.
AWS offers short-term free trial for some services. It will count from the date you activate a particular service.

For see detail list, you can open the link above and choose **Trials** from filter list in your left.

For more information can check on the image below

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

## Free Tier Usage in Bill
We can also find all the free tier status that we already used in the bill usage. We can see the top free tier we used like below

![Top Free Tier in Bill Usage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rnf3aaf1rs914is5jbfl.png)

If we click the **view all** button, The list will be expande can see all top free tier list that already used

![Check All top free tier list in Bill Usage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rgtc8ce8vjv0hqgnt07v.png)

## Conclusion
As you see above, with free tier option that AWS offer, We can maximize our usage when we build our tech stack on top of AWS. we really need to know about the free tier type that AWS offer therefore we can avoid unnecessary bill in our AWS account. 

I think that's it for this article for now. Leave a comment below. Let me know about your thoughts! Thanks.
CSS clamp() Method
Tags: css
Published: 2023-01-18 16:59:26

Hi there! 

Recently, I've learnt a new functionality in CSS, which I've never known about before. I decided to share it with you, because I believe that it is very valuable and practical to use. 

The **clamp()** method has three values. The first is the **minimum**, the second is the **preferred** and the third is the **maximum** value. This function allows you to set a value that will not decrease beyond the minimum and increase above the maximum, i.e. it **clamps the middle value of the range**. Below you will find a link to check it out:

https://jsfiddle.net/2kdbe680/2/

In my opinion, this is a very practical method, because you don't have to adjust font size to the screen size. It's a different approach to media query and depending on the situation might be very useful.

Do you have experience using it? Please drop a comment.

Thank you for reading!
Day 13: Voice Recognition with Ubuntu
Tags: 100daysofcode, challenge, linux, ubuntu
Published: 2023-01-18 16:51:38

Big Tech prioritizes their own platforms. You might have already built voice products for  `macOS` or `Windows`. How about `Linux`-based systems? 

Billions of people use `Linux`. Is it surprising? Shouldn't be. `Android` uses the `Linux` kernel, so every `Android` user actually uses `Linux`. 

`Ubuntu` is `Linux`’s `most popular` distro. Picovoice devs love their `Ubuntu` machines, so we couldn't leave it out.

Here's the [Leopard Speech-to-Text](https://picovoice.ai/platform/cat/) tutorial with `Ubuntu`!

**Install Leopard Python package using PIP:**
```
pip3 install pvleopard
```
**Get your AccessKey* 
It's day 12, you may be pretty familiar with this process. Sign up for the [Picovoice Console](https://console.picovoice.ai/) and grab your AccessKey for free.

**Create an instance of Leopard STT and transcribe a file:**
```
import pvleopard
leopard = pvleopard.create(access_key)

transcript, words = leopard.process_file(path)
```
Voila! Reach out to Picovoice team on [GitHub](https://github.com/Picovoice/leopard) if you have any questions
Configure Odoo 16.0 to Sending Email
Tags: tutorial, odoo, smtp, email
Published: 2023-01-18 16:51:38

The mail module in Odoo is a powerful feature that allows users to manage and send emails directly from within the Odoo application. It allows users to easily send and receive emails, create and manage email templates, and keep track of sent and received emails.

To send out email messages from the Odoo application, we need SMTP server. To configure the SMTP server in Odoo, you need to activate the Developer Mode. When Developer Mode is active, please go to menu "_Settings/Technical/Email/Outgoing Mail Servers_".

Click on **Create** button to add new outgoing mail server. Then please fill in the form with your SMTP server's credential and information. Let's say we've SMTP server with the credentials are:

- **SMTP Host:** smtp.tammam.id
- **SMTP Port:** 465
- **Requires SSL:** Yes
- **Username:** outgoing@tammam.id 
- **Password:** ********

Then here is how to configure them into the Odoo:

- **Name:** `"Notification Mail Server"`. Please set the name of the mail server.
- **FROM Filtering:** `"no-reply@tammam.id"`. This helps us to not spoof the email address coming from another mail server that is not the same as ours. I've written an article to cover more about this [here](https://dev.to/gustitammam/prevent-customers-email-to-be-used-as-sender-address-of-notification-email-in-odoo-16-2c52).
- **Authenticate with:** `Username`.
- **Connection Encryption:** `SSL/TLS`.
- **SMTP Server:** `smtp.tammam.id`.
- **SMTP Port:** `465`.
- **Username:** `outgoing@tammam.id`. 
- **Password:** `********`

Please save your new server and then click on the **Test Connection** button. If the message is successful then you're done, otherwise, there's a problem with your mail server.

From now we'll receive email notifications for every message posted on Odoo chatter or when we're mentioned on Odoo chatter. All features related to the mail module to send out emails from Odoo will also be working.

> Cover image by [Joel Lee](https://unsplash.com/@joelnbora?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/photos/AF1Q7PKkQGQ?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText).
Responsive Restaurant Website Using HTML CSS & JS
Tags: html, css, javascript, tutorial
Published: 2023-01-18 16:50:38

hey guys, in this tutorial we will learn how to make Responsive Restaurant Website Using HTML CSS & JS. It's all about everyone who want improve your skills in HTML, CSS and JavaScript.

inside the project have a many sections on each section have a different features such as parallax image effect, hover effect, changing menus item using on click and also have great feature that's called static counters and many other features available, you will learn a lot of things that are help you to improve you skills. 

In this project I've used swper js library to display the card slider and I don't use any library to change the menus content etc. I've used pure JavaScript to display the dynamically menus, sticky navbar, parallax effect inside the showcase image and also static counters.

So, I'm going teach with you how to make a responsive restaurant website using html css & js. hope you will enjoy the course and you will get many ideas from it. 

{% embed https://www.youtube.com/watch?v=oAuMO8cWY4o %}
How do you approach a new API?
Tags: discuss, api
Published: 2023-01-18 16:46:22

---
title: How do you approach a new API?
published: true
description: How do you get started with an API for the first time?
tags: discuss, api
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lw03782ckhdrp3bi2m2s.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-01-18 16:35 +0000
---

If you are using an API for the first time, what's your process around getting started?

Do you find docs to read? Do you look for a getting started guide? Do you dive right in and start trying to make it work? 

Does your approach change if you are learning a new protocol like gRPC vs. REST? 

And for a bonus question, what was your first protocol experience? Because mine was SOAP! 

_Photo by <a href="https://unsplash.com/@douglasamarelo?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Douglas Lopes</a> on <a href="https://unsplash.com/photos/ehyV_XOZ4iA?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>_
Step the MongoDB compass for ReactJS
Published: 2023-01-18 16:30:30

- Open the Compass Exe
- Make a New Connection ( copy the URL for local host )

- Create a **Database** 
- Like -> **e-comm**

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

- Create a **Collection** ( _or in RDBMS called Table_ )

**products** and **users** is the collectiions

- Add the **Data**

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

- in insert document 📃 Add some demo data 


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


**Finally Done**
Why we chose C over Rust
Tags: programming, rust, csharp, luos
Published: 2023-01-18 16:30:00

We recently discussed on our Discord server about why we chose **C over Rust for Luos**

In the early stages of Luos, Luos engine was written in Rust. However, at the time, Rust was not officially supported for embedded development and it was very time consuming to work with. 

Despite this, we persisted with Rust because the code was safe. After a few months, we realized that the market was not ready for Rust in embedded development and that most developers preferred C/C++. Since our technology was already challenging to explain, adding Rust to the mix made it impossible. 

As a result, we had to switch back to C. In hindsight, this decision may have reduced the number of developers interested in Luos engine, but it also increased the number of industrial projects using it. We are still a **big fan of Rust** and hope to be able to move Luos engine back to Rust in the future.

**What factors influenced your decision** to use a particular programming language for your project? 

[Discuss](https://discord.gg/luos) with other embedded and edge developers
Advent of Code 2022 Day 1 Part 1 - Solution Only
Tags: javascript, programming, algorithms, adventofcode
Published: 2023-01-18 16:27:57

```javascript
// EXAMPLE input converted to a multiline string
const input =
`1000
2000
3000

4000

5000
6000

7000
8000
9000

10000`

// make an array of sub-arrays where each sub-array is one elf's calories, i.e., one grouping of nums
const groupedByElf =
    input // `1000\n2000\n3000\n\n4000\n\n5000\n6000\n\n7000\n8000\n9000\n\n10000`
        .split('\n\n') // ['1000\n2000\n3000', '4000', '5000\n6000', '7000\n8000\n9000', '10000']
        .map(str => str.split('\n').map(str => +str)) // [ [1000, 2000, 3000], [4000], [5000, 6000], [7000, 8000, 9000], [10000] ]

// find the total for each grouping and put these totals in one array
const eachGroupSum = groupedByElf.map(subArr => subArr.reduce((acc, curVal) => acc + curVal))

// pass this array (spread) into Math.max()
const highestCalGroup = Math.max(...eachGroupSum)

// log it
console.log(highestCalGroup) // 24000
```
Developer Burnout :\
Published: 2023-01-18 16:16:29

Have you ever finished a large project and returned to your desk only to discover that you now have to meet even more stringent deadlines? Would you be excited to tackle these new projects, or would you see them as a tedious chore that must be completed? If you guessed the latter, you're probably exhausted, and I don't blame you - it's difficult to be expected to run like a well-oiled machine. However, be aware that this is a sign of burnout. 

Chances are, we’ve all heard about and experienced burnout at some point in our lives. But recently, research has indicated a rise in burnout amongst developers me included.

## What is Burnout?

According to the World Health Organization, burnout is an “occupational phenomenon.” This occurs due to chronic workplace stress characterized by exhaustion or drained energy, feeling mentally distant from one’s job, negative feelings about one’s career, and reduced professional efficacy.

> Three phases of burnout

1. Honeymoon
When you start a new job and take on new responsibilities, you may feel excited, enthusiastic, and more satisfied with your job. You may not experience burnout symptoms during this stage, but you are likely to anticipate the types of stresses you will face in the future. 

2. Chronic stress
In this phase, you may begin experiencing stress more frequently along with intense symptoms compared to phase two. It may have become an everyday experience filled with anxiety and stress. 

3. Burnout :fire:
In this final phase, burnout has become a huge part of your life, leaving you vulnerable to significant and ongoing impacts on your mental, physical, and emotional health. 

## Reasons for burnout in developers: 
- Poor Coding Culture

In many organizations, junior developers are not properly trained to manage the future implications of specific projects. Consequently, senior developers are held responsible for clearing or avoiding technical debts, which can be highly time-consuming. This can increase your workload and easily blur the lines between your work-life balance.  

- Monotonous Work

Just like any other profession, devs also get tired of coding. It’s pretty intense brain work, and one can only do so much. That’s why it’s crucial to give devs a variety of work to make their day-to-day routine more interesting and enjoyable.  

- Lack of Work-Life Balance

Different for different individuals.

## How Developers Can Reduce Burnout

Take Care of Yourself

It’s common wanting to complete your work in one sitting to avoid distractions caused by zoning in and out of work. But realistically speaking, the more you get away from your screen, the better it will be for your health. You can make some time for a quick walk or lunch break or engage in physical activity to get your body moving and blood circulating. It would be even more helpful to schedule regular breaks throughout your day, so you don’t forget to take them. 

Also, keep your passion alive. Kudos.
Layout of a Solidity Source File
Tags: web3, blockchain, solidity, ethereum
Published: 2023-01-18 16:12:47

## Solidity Source File Layout-

The solidity source code can include import directives, pragma directives, struct, enum and function declarations as well as error and constant variable definitions.

## SPDX License Identifier

The source code of smart contracts may help build trust. The Solidity compiler advocates the use of machine-readable SPDX license IDs since making source code public inevitably raises copyright issues. Every source file should begin with the following license:

`//SPDX-License: MIT`

The compiler does not check the license, but it does include it in the bytecode information. If you don't want to indicate a license or the code isn't open source, use UNLICENSED.

Adding this remark does not relieve you of other licensing duties, such as mentioning a particular license header in each source file or the original copyright holder.

The compiler recognizes the comment anywhere in the file, although it is suggested towards the top. The SPDX website has further information on using SPDX license identification.

## Pragmas

The first line of code in any Solidity file is Pragma. Pragma indicates the compiler version for the current Solidity file.

Solidity is a new programming language that is always being improved. It releases a new version whenever a new feature or upgrade is added. The current version is 0.8.13 as of the time this document is written. Using the pragma directive, you may choose the compiler version and target your code as follows:

`pragma solidity ^0.8.13; `

Although it is not mandatory, it is good practice to declare the pragma directive as the first statement in a Solidity file. The syntax for the pragma directive is as follows:

`pragma solidity <version number>; `

The version number has two parts: a major build and a minor build.

The previous example's major build number is 8 and the minor build number is 13. Minor versions have fewer or no major changes, whereas major versions may have considerable changes. Choose the option that best meets your needs.

The caret ’^’ character is optional in version numbers, although it is important in determining the version number based on the following rules:

The ^ character denotes the most recent major version. So, ^0.8.0 relates to the current build number 8, which is 0.8.13. The character will only target the primary build given. The Solidity file will only compile with a major build of 8. No other major build will compile it.

It is best to build Solidity programs using a specific compiler version rather than utilizing ‘^’. Newer versions may deprecate your code if you use pragma. For example, the toss statement was deprecated in favor of newer constructs like assert, need, and reverse. You don't want to be startled when your code begins acting strange.


For more content, follow me on - https://linktr.ee/shlokkumar2303
GraphQL server demo via express and @apollo/server
Published: 2023-01-18 16:10:20

The following repository demonstrates a simple GraphQL server app via express and @apollo/server.
https://github.com/rezahazegh/demo-apollo-server

## Project Description
This project contains `Course` and `Teacher` entities, It provides create, update and delete for them.

**Entities relation**: Every course would have a teacher.

## Directory Description
* `models`: It includes required mongoose models to store entities in MongoDB
* `schema`: it include GraphQL related stuff
  * `types`: It includes types, something like dto in REST API
  * `resolvers`: It include resolvers, something like route handlers in REST API

## Project Setup
Run `docker compose up -d` to setup MongoDB via docker

Run app and open `localhost:4000` to reach out to  Apollo Sandbox (An in-browser tool for writing, validating, and testing GraphQL queries)

## Sample Requests
### Create, Read and Delete Teacher
```
mutation {
  addTeacher(name: "Peter Parker", email: "spiderman@gmail.com", phone: "855-465-2386") {
    id
    name
    email
    phone
  }
}
```
```
{
  teachers {
    id,
    name
  }
}
```
```
{
  teacher(id: "63c421e024a2dcb1e5dcdce6") {
    id,
    name
  }
}
```
```
mutation {
  deleteTeacher(id: "63c421e024a2dcb1e5dcdce6") {
    id,
    name
  }
}
```
### Create, Read, Update and Delete Course
```
mutation {
  addCourse(name: "GraphQL by Spider-Man", description: "This is the project description", status: new, teacherId: "63c424b724a2dcb1e5dcdcef") {
   name
   description
  }
}
```
```
{
  courses {
    id,
    name,
    status
  }
}
```
```
{
  course(id: "63c4252c24a2dcb1e5dcdcf1") {
    id,
    name,
    status
  }
}
```
```
mutation {
  updateCourse(id: "63c4252c24a2dcb1e5dcdcf1", status: completed) {
   name
   status
  }
}
```
```
mutation {
  deleteCourse(id: "63c4252c24a2dcb1e5dcdcf1") {
    id
  }
}
```