teleren/devto huggingface dataset:
Influence and Traits of a Good Mentor
Tags: devjournal, beginners, codenewbie, career
Published: 2023-02-13 08:10:47

A good mentor can play a significant role in shaping a person's career journey, motivation, attitude, and love for a particular field. They provide guidance, support, and inspire their mentees to pursue their interests and reach their goals. Mentors who are knowledgeable, passionate, and effective in their teaching methods can ignite their mentee's curiosity and encourage a lifelong love of learning.

I've had my fair share of teachers and mentors. And let me tell you, not all of them were created equal! I've had some truly amazing mentors who have made a huge impact on my career and personal growth, and I've also had some "teachers" who were just going through the motions.

**So, what makes a good mentor?** In my opinion, there are five key traits that set apart the best mentors from the rest:


1. Knowledgeable and Up-to-Date: A good mentor should have a deep and current understanding of their subject matter. They should be able to share the most recent technologies and ideas with their mentees, providing them with the tools they need to succeed in their field.
2. Prepared and Organized: A good mentor should come to each session prepared with an agenda and a plan for how they will help their mentee. This helps to ensure that the time spent together is productive and focused. An unorganized mentor can be frustrating and demotivating for their mentee.
3. Motivating: A good mentor should be able to motivate their mentee, even when the topic is challenging. They should inspire their mentee to keep pushing forward and work through difficulties.
4. Challenging: A good mentor should know their mentee's limits and push them to take on harder tasks and stretch themselves. This helps their mentee to grow and become better in their field.
5. Understanding and Supportive: A good mentor should listen to their mentee and understand their struggles. In some cases, a mentor can even become a friend and provide emotional support. This type of relationship can be especially important in intensive bootcamps or other intensive learning situations.

In addition to these traits, a good mentor should also have excellent communication skills, the ability to provide constructive feedback, and a genuine interest in their mentee's growth and development. A good mentor should also be approachable, patient, and able to adapt their teaching style to meet their mentee's needs.

Now, I know that not everyone is lucky enough to have a great mentor. But if you're looking to take your career to the next level, it's worth seeking out someone who has these traits and who is passionate about their subject matter. A good mentor can make a huge difference in your life and help you achieve your goals.

So, if you're lucky enough to have a great mentor, give them a shoutout! And if you're looking for one, don't settle for just any teacher.
The Complete Guide to Angular User Authentication with Passkeys
Published: 2024-06-22 08:41:10

---
title: The Complete Guide to Angular User Authentication with Passkeys
published: true
date: 2023-02-13 08:03:58 UTC
tags: 
canonical_url: https://mojoauth.com/blog/angular-user-authentication-with-passkeys
---

Passwordless authentication is a form of authentication that verifies a user’s identity without the use of passwords. There are many forms of passwordless authentication including, Email, SMS, and more importantly, Passkeys. What are Passkeys? A passkey, also known as a password or passphrase, is a secret word or phrase that is used to gain access to a system or application. Passkeys are typically used as a form of authentication to confirm the identity of a user and to protect sensitive information from unauthorized access.
Mastering JavaScript: Understanding TypeError vs ReferenceError and == vs ===
Tags: javascript, beginners, programming, tutorial
Published: 2023-02-13 08:00:49

JavaScript is a powerful and flexible programming language, but it can be confusing for beginners. In this article, we will explore two common errors that developers face while coding in JavaScript: TypeError and ReferenceError, and how to avoid them. We will also take a deep dive into the difference between == and ===, two common comparison operators in JavaScript.

## TypeError in JavaScript

A TypeError in JavaScript occurs when you try to perform an operation on an object that is not of the correct type. For example, trying to access a property of an undefined object or calling a function that is not a function.

```javascript

let a;
console.log(a.name); 
// TypeError: Cannot read property 'name' of undefined
```

```javascript

let a = "hello";
a(); // TypeError: a is not a function
```
To avoid TypeErrors, it is important to always check if an object is defined and of the correct type before trying to perform operations on it.

## ReferenceError in JavaScript

A ReferenceError in JavaScript occurs when you try to access a variable that has not been declared. This is often caused by typo mistakes or forgetting to declare the variable.

```javascript

console.log(b); // ReferenceError: b is not defined
```
To avoid ReferenceErrors, it is important to declare all the variables you need before using them and to double-check for typo mistakes.

## == vs === in JavaScript

== and === are two comparison operators in JavaScript. The == operator compares values and returns true if they are equal, while the === operator compares both values and types and returns true only if both are equal.

For example:

```javascript

let a = 5;
let b = "5";
console.log(a == b); // true
console.log(a === b); // false
```
It is important to use the === operator whenever possible, as it ensures that the comparison is both value and type-sensitive, avoiding unexpected results in your code.

In conclusion, understanding TypeError, ReferenceError, and the difference between == and === are crucial concepts for writing high-quality, bug-free code in JavaScript. Always check the type and declaration of your variables and objects before performing operations on them, and use the === operator whenever possible. Happy coding!
Today's Fun Joke For Developers - Daily Developer Jokes
Tags: jokes, dailydeveloperjokes
Published: 2023-02-13 08:00:06

---
title: "Today's Fun Joke For Developers - Daily Developer Jokes"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1259582acfe.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q:___ Why did the developer have to quit smoking?

___A:___ Because they couldn't afford to pay the new syntax.
 -->
API Colombia, an open and free API about Colombia
Tags: colombia, api, opensource
Published: 2023-02-13 08:00:00

---
title: API Colombia, an open and free API about Colombia
published: true
description: API Colombia, an open and free API about Colombia
tags: colombia, api, opensource
# cover_image: https://direct_url_to_image.jpg
published_at: 2023-02-13 08:00+0000
---

API Colombia is a public RESTful API that enable users to obtain a variety of public information about the country "Colombia". This is an amazing resource to create demos, poc and try new technologies using the API as a mock backend.

![Api colombia swagger](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tmaoj620wxy78fe58mnl.png)


API Colombia is a minimal dotnet API that contains endpoints to get information about:
- General information about the country.
- Departments/States.
- Cities.
- Presidents.
- Tourist attractions.

You can use swagger to read the documentation and try the endpoints in the following link:
https://api-colombia.com/swagger/index.html

API Colombia is completly open source you get the repo in the following link:
https://github.com/Mteheran/api-colombia
Introducing Blite, the Lightweight Node.js Backend Server
Tags: javascript, webdev, node, backend
Published: 2023-02-13 07:55:42

Building a backend server for a small sized apps can be a complex and time-consuming process. Blite offers a solution to simplify this process and get you up and running quickly.

**Blite** is a monolithic **Node.js backend server app** that provides built-in services such as routing, user authentication, database management, upload management, and email confirmation. This all-in-one solution aims to be lightweight and fast, making it a great choice for small to medium sized projects that need a backend server and database.

It's an **open source** project and you can check out the source code and docs [here](https://github.com/firatkiral/blite). You can run the **demo app** following way to see how it works.

```javascript
const blite = require('blite');

blite.demo()
// Check out the demo app at http://localhost:3000
```

![Demo app](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ipt5e74j5tnuiwvad20r.jpg)

The following hello world example illustrates defining simple routes.

```javascript
const blite = require('blite');

blite.init({
  server:{
    port: 8080
  }
  ...
})

// Serve static files
blite.server.use("/static", blite.server.static(`www`) )

// Hello world
blite.server.get('/', (req, res) => {
  res.send('Hello World!')
})

blite.start()
// Check out the example app at http://localhost:8080
```
Here are some examples of how you can use database with Blite.

```javascript
const users = blite.db.addCollection('users', {unique: ['name']});

users.insert({
 name: 'Odin',
 age: 50
});

// Alternatively, insert array of documents
users.insert([{ name: 'Thor', age: 35}, { name: 'loki', age: 30}]);

// Find documents
const results = users.find({ age: {'$gt': 40} }).docs();

console.log(results)
// output:
// [
//     {
//       name: 'Odin',
//       age: 50,
//       meta: {
//         revision: 1,
//         created: 1676235325951,
//         version: 0,
//         updated: 1676235325952
//       },
//       '$ctrl': 1,
//       id: '80f81115-3e82-4603-bb04-3dae2540f554'
//     }
// ]
```

**Conclusion**

Blite is a simple and fast library that allows you to create a full stack web application in minutes. It has a lot of features that you can use to build your next project. You can check out the documentation [here](https://github.com/firatkiral/blite) for more details. If you have any questions or suggestions, feel free to contact me.
Introduction to SQL for Data Analysis
Tags: sql, datascience, machinel
Published: 2023-02-13 07:53:26

        SQL in full stands for Structured Query Language. It is a widely used programming language used in the management and administration of correlated databases. It is widely utilized by web developers and data scientists. 
	In SQL, the basic database unit is the table. A table is a collection of cells. Cells are an intersection of rows and columns. Rows run horizontally whereas columns are vertically oriented. Examples of other database objects are;
      	Views: rational data illustrations assembled from one or more database tables.
      	Indexes: lookup tables used in hastening database lookup functions.
      	Reports:  these are data repossessed from one or more tables, usually a subset of that data that is selected based on search criteria.
Every column represents a data category e.g. phone address, state, first name, customer id etc. On the other hand, rows comprise a value for the intersecting column. 
	Relational databases are relational since they are made up of tables that are interconnected. For instance, an SQL database used for customer service can have one table for customer names and addresses and other tables that hold data about detailed acquisitions, product encryptions, and client contacts. A table used to track buyer contacts utilizes a unique customer identifier called a primary key to reference the customer's record in a separate table holding purchaser data, such as name, state, and contact information.
	In summary, despite SQL being case-impervious, SQL has been and is still utilized in the administration of company databases for various functions: analyzing sales revenue, customer relational database management, employee database management, and so on. Being case-insensitive, SQL makes it more user-friendly as compared to other programming languages.
How to create Sidebar navigation menu in ReactJS with react router and framer-motion
Tags: react, javascript, webdev
Published: 2023-02-13 07:47:19

Hi there 👋,

Checkout this cool sidebar.

Here is the Demo Link:
https://react-sidebar.vercel.app/

I have created this using Styled-components, react-router and framer-motion for page transition. You can use this kind of sidebar in creating Dashboards.

For this project I have used these libraries,
▶️ reactjs
▶️ Styled-Components
▶️ react-router-dom
▶️ Framer-motion for page transition
You can use this to learn or for your portfolio.

I haven't added drop-down menu yet but if you want it then you can add it and feel free to create more sections.

Any suggestions are welcomed!

Thanks For Reading😄
"A Beginner's Guide to Understanding Undefined, Functions, Console, and Console.log in JavaScript"
Tags: javascript, beginners, programming, tutorial
Published: 2023-02-13 07:42:31

## Table Of Contents
- What is Undefined in JavaScript?
- Why Does a Function When Called Returns Undefined?
- What is Console and Console.log in JavaScript?
- Why Does the Console Return Undefined on Executing the Log Method?

## What is Undefined in JavaScript?

In JavaScript, undefined is a value that represents the absence of a value. It is a special value that indicates that a variable has been declared, but it has not been assigned a value.

For example:

```javascript

let a;
console.log(a); // Output: undefined
```

In this example, the variable a is declared, but it has not been assigned a value, so it is considered to have the value undefined.

## Why Does a Function When Called Returns Undefined?

In JavaScript, a function is a block of code that is designed to perform a specific task. When you call a function, it executes the code inside it, and then returns a value. If a function doesn't have a return statement, or if the return statement doesn't have a value, then the function returns undefined.

For example:

```js

function hello() {
  console.log("Hello, World!");
}

hello(); // Output: "Hello, World!"
console.log(hello()); // Output: "Hello, World!" undefined
```

In this example, the hello function doesn't have a return statement, so it returns undefined.

## What is Console and Console.log in JavaScript?

The console is a tool used by developers to debug their code. It is part of the JavaScript development environment and can be accessed in the browser's developer tools. The console.log method is used to log information to the console.

For example:

```javascript

let a = 10;
console.log(a); // Output: 10
```
In this example, the console.log method is used to log the value of the variable a, which is 10, to the console.

## Why Does the Console Return Undefined on Executing the Log Method?

The console.log method displays undefined when you try to log a value that doesn't have a defined value.

For example:

```javascript

let a;
console.log(a); // Output: undefined
```
In this example, the variable a is declared but not initialized, meaning it doesn't have a value. When we try to log a to the console, it shows undefined because that's the value of the variable.

In conclusion, understanding the concepts of undefined, functions, console, and console.log is important for debugging your code and making sure it works as intended.
Create a Rails 7 API with JWT in 2023
Tags: rails, jwt, api, ruby
Published: 2023-02-13 07:40:28


Make sure you're running the latest stable Rails, Rails 7.0.4.2

- Create a new Rails app with the --api option to generate an API-only Rails app:

`rails new my_rails_jwt_api --api`

- Add the jwt gem to your Gemfile and run bundle install to install it:

`gem 'jwt'`

- Uncomment the bcrypt gem in your Gemfile and run bundle install to install it:

`gem "bcrypt", "~> 3.1.7"`

- Generate a User model with the necessary attributes for authentication (e.g. email and password_digest):

`rails g model User email password_digest`


- Add has_secure_password to your User model to encrypt the password:

```ruby
class User < ApplicationRecord
  has_secure_password
end
```

- Create a SessionsController to handle user authentication:

`rails g controller Sessions`

- In the SessionsController, create an action that accepts a user's credentials (e.g. email and password) and returns a JWT if the credentials are valid:

```ruby
class SessionsController < ApplicationController
  skip_before_action :authenticate_request

  def create
    user = User.find_by(email: params[:email])
    if user&.authenticate(params[:password])
      jwt = JWT.encode({ user_id: user.id }, Rails.application.secrets.secret_key_base)
      render json: { jwt: jwt }
    else
      render json: { error: 'Invalid credentials' }, status: :unauthorized
    end
  end
end
```

- Note that we're using Rails' secrets.secret_key_base to sign the JWT. You can generate a secret key with rails secret.

- In your ApplicationController, define a method to extract the JWT from the request headers and verify it:

```ruby
class ApplicationController < ActionController::API
  before_action :authenticate_request

  def authenticate_request
    header = request.headers['Authorization']
    token = header.split(' ').last if header
    begin
      decoded = JWT.decode(token, Rails.application.secrets.secret_key_base, true, algorithm: 'HS256')
      @current_user_id = decoded[0]['user_id']
    rescue JWT::DecodeError
      render json: { error: 'Invalid token' }, status: :unauthorized
    end
  end
end
```

- This will extract the JWT from the Authorization header and decode it using the same secret key as before. If the JWT is valid, we set @current_user_id to the user ID contained in the token.

- Finally, create an action in one of your controllers that requires authentication, and use @current_user_id to access the current user's data:


```ruby
class UsersController < ApplicationController
   def show
     user = User.find(@current_user_id)
    render json: user
   end
end
```

-Don't forget the routes

```ruby

Rails.application.routes.draw do
  resources :users, only: [:show]
  resources :sessions, only: [:create]
end

```


- That's it! This is just a basic example, and there are many ways to implement JWT authentication in a Rails app. But this should give you a good starting point.
Everything You Need To Know About Web Accessibility
Published: 2023-02-13 07:32:41

Undoubtedly, the internet is one of the most important inventions in our modern time. Currently, there are 4.33 billion internet users, which is equivalent to half the global population. The internet technology has truly changed the way we do things. From accessing news and information to obtaining an education, planning our career, seeking jobs, transacting with government offices, buying things, etc. It’s hard to imagine life without it. With its growing importance, it is inevitable to make the web accessible to everyone. More than a requirement under the Americans with Disabilities Act of 1990, web accessibility is a social responsibility of those who design and develop internet sites, tools, and applications.

What is Web Accessibility?

Web accessibility is making sure that the internet (from websites to tools and other platforms) can be accessed by everyone. And by ‘everyone’ we mean all individuals, including those who have cognitive or physical impairments or limitations. When people think about ADA web accessibility, they usually think about blind or deaf people. But it’s not just them who should be given the opportunity to access the internet with ease. Every individual who suffers from any disorder, disease, or disability should also be considered when designing websites. In addition to physical disabilities, web accessibility also covers people who have situational disabilities and socio-economic restrictions (e.g. those with lower bandwidth should still be able to access the information or service they need online). Accessibility is Important for Individuals, Businesses, and the Society It isn’t hard to see the importance of web accessibility to individuals. Think of a first-time mom who has to learn to do everything with a baby in her arms or a person who has just been through major surgery. Another example is a retiree who is still learning how to navigate the internet from her phone. Making the web accessible to individuals regardless of their status, age, condition, or situation is important to make their web experience a positive and meaningful one.
AI Driven Testing Trends Report 2023
Tags: mobileapptesting, mobileapptestingtrends, ai
Published: 2023-02-13 07:29:51


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

Welcome to the 4th edition of our Annual Testing Report. This time we’ve taken the liberty of reaching out to experts in the field of Artificial Intelligence and App Testing in general to draw valuable insights for the future of Testing using AI. Download your free copy of the report to gain insightful predictions and relevant pointers to take action now. We have delved into technologies like Artificial Intelligence and Machine Learning to understand their impact in the Testing domain. And well why take our word, trust the expert who are predicting a drastic change in the years to come. Ride the tide of growth coming your way to advance and accelerate your app testing efforts.

This year’s report has been compiled after much extensive research, rounds of interviews and exhaustive study. We believe this and the following year’s will be the rise of AI in the all industries. Chat GPT has inaugurated the change and opened up the Pandora’s box for many industries. What we make of embracing the change and technology will deter the course of organizations by a massive scale. So come on and explore the [AI driven Testing Trends](https://www.pcloudy.com/whitepaper/ai-driven-testing-trends-2023/) that we have highlighted in the report. Make the most of the real world use case shared by leading experts from the US, Europe, Australia and India. Download your exclusive copy here today!

Contents
Note from the Editor
Executive Summary
Our Expert Panel
volution of Artificial Intelligence
Setting Context – What do our experts say?
Identifying the Trends – AI in Testing
Trend 01 – Generative AI will replace redundant Development & Testing Tasks
Trend 02 – AI Augmented Test Automation will improve test efficacy & reduce delivery cycles
Trend 03 – AI infused DevOps will ease collaboration and autotrigger functions faster
Trend 04 – AI will drive Visual Testing capabilities to welcome Computer Vision
How are Businesses using AI in Testing?
Key Takeaways
About Us