teleren/devto huggingface dataset:
7 Tips For The Perfect fishing Backpack To Make The Most Of Your Trip
Published: 2023-11-28 21:44:04

A [fishing backpack](https://www.plusinno.com/collections/fishing-tackle-bag?utm_source=dev_to&utm_medium=rankking) is essential for any angler who wants to make the most of their fishing trips. Whether you are just starting out or have been fishing for years, having the right **fishing backpack** is key to making sure you have all the necessary gear and supplies to make your trip a success. Here are seven tips to help you pick out the perfect fishing backpack.

[![fishing backpack](https://www.plusinno.com/cdn/shop/products/81zfdMi1x9L.._1800x1800.webp)](https://www.plusinno.com/collections/fishing-tackle-bag?utm_source=dev_to&utm_medium=rankking)

## 1\. Choose the Right Size

The first thing to consider when selecting a **fishing backpack** is size. You’ll need to find a bag that is big enough to fit all of your must-have gear and supplies, but small enough that it’s comfortable and easy to carry. Consider the size of your rods and reels, tackle boxes, and other supplies and choose a size that can accommodate them all.

## 2\. Look for Durability

Fishing trips can often be rough and rugged, so it’s important to choose a **fishing backpack** that is tough and durable. Look for one that is made of strong, waterproof material and has reinforced seams, zippers, and straps. This will help ensure your gear stays safe and dry no matter what your adventure throws at you.

## 3\. Opt for Pockets and Compartments

Having pockets and compartments can make organizing and accessing your gear easier. Look for a **fishing backpack** with plenty of pockets and compartments of various sizes to store all of your equipment. This will help you find what you need quickly, without having to dig through the entire bag.

## 4\. Check for Comfort Features

You’ll be carrying your **fishing backpack** for long periods of time, so it’s important to find one that is comfortable. Look for a bag with adjustable straps and cushioned back panels that will help distribute the weight evenly and provide support. It should also have a chest strap or waist strap to help keep the bag secure while you’re on the move.

## 5\. Consider the Weight

When packing your **fishing backpack** , it’s easy to overload it with all the necessary gear and supplies. But it’s important to consider the weight of the bag itself. Opt for a lightweight bag that won’t add too much extra weight when you’re packing it up for your trip.

## 6\. Look for Waterproof Features

If you’re fishing in wet or humid climates, a **fishing backpack** with waterproof features is a must. Look for a bag with a waterproof liner or a rain cover to protect your gear from the elements. This will help ensure all your supplies stay dry and safe while you’re out on the water.

## References

  * [fishing backpack](https://www.kralen.com/counter.php?link=https://www.plusinno.com/collections/fishing-tackle-bag "fishing backpack")

<
Simple Python Hangman Game
Tags: python, learning, codingnomads
Published: 2023-11-28 21:24:37

# Transitioning in my career

I'm reviewing Python as I transition to a Data Science career, after a previous career in Software Engineering (relevant) and Program Management consulting (not very relevant). As part of this experience, I'm taking courses from CodingNomads to review this content, and created a simple Hangman game.

## Lessons learned with Python:

1. The enumerate() function probably requires a newer version of Python or something, as the Stack Overflow recommendation on creating a list of indices from a character in a string did not work for me, despite the near-exact replication of their suggested implementation. Or maybe there's a quirk I'm not realizing. Honestly, knowing software engineering, that's probably the issue.

2. Pseudocode is critical, and I'm going to guess that a lot of programmers don't engage in it to the extent they should. Hence, the terrible code we have to deal with 1/5/10/20 years later. Not that I'm perfect at it either.

3. Work is so much more motivating when you do something that you're good at. I'm so tired of going after the shiny new object. I'd rather rub off the grime from an object I have than try to chase after the elusive diamond in the ruff. Work with what you have and who you are, rather than you what you think the world pays the most.
Gitlabnotifications, my new package to handle Gitlab web hooks events as notifications
Tags: typescript, node, gitlab, en
Published: 2023-11-28 21:23:08

I have been working in a library that allows you to receive Gitlab web hook events as notifications. 

## How to install?

```bash
npm install express
npm install gitlabnotifications
```

## Basic configuration
If you need to send notifications only one platform at time, just delete its configuration lines
```javascript
const { GitlabNotifications } = require('gitlabnotifications');
const express = require('express');

const app = express()
app.use(express.json());
app.listen(3000, function () {
});


const sendNotificationsTo = {
    configuration: [
      {
        telegram: {
          token: 'your_telegram_token',
          chat_id: 'your_chat_id',
        },
      },
      {
        slack: {
          workspace_id: 'your_workspace_id',
          channel_id: 'your_slack_channel_id',
          token: 'your_slack_app_token',
        },
      },
    ],
  };

const myMiddleware = (req, res) => {
 /*Your custom middleware has to return true if everything it's okay
  and return false if isn't */
  return true;
}

const gitlabNotificationsService = new GitlabNotifications(
  ['/gitlab-webhook'], //Webhooks urls directions previously configured in Gitlab
  false, //Set in true if you want to send custom notification messages
  null, // Custom messages (if needed)
  sendNotificationsTo,
  app, //Your express instance
  myMiddleware
);


gitlabNotificationsService.connection()

```


## How to use custom notifications messages?

For more information about to get events values you can visit the official gitlab web hooks documentation
https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html

You can declare an object that contains all custom message handlers like this.

```javascript

const customMessages = {
  pushMessage: (eventData) => `Custom push message: ${eventData.user_username} pushed to ${eventData.project.name}`,
  issueMessage: (eventData) => `Custom issue message: ${eventData.user.username} created an issue in ${eventData.project.name}`,
  commentMessage: (eventData) => `Custom comment message: ${eventData.user.username} commented on something`,
  tagMessage: (eventData) => `Custom tag message: A new tag ${eventData.ref} was created in ${eventData.project.name}`,
  mergeRequestMessage: (eventData) => `Custom merge request message: ${eventData.user.username} created a merge request in ${eventData.project.name}`,
  issueTaskMessage: (eventData) => `Custom task message: ${eventData.user.username} created a merge request in ${eventData.project.name}`,
};

const gitlabNotificationsService = new GitlabNotifications(
  ['/gitlab-webhook'], 
  true, //Set in true if you want to send custom notification messages
  customMessages, // Custom messages (if needed)
  sendNotificationsTo,
  app, //Your express instance
  myMiddleware
);

gitlabNotificationsService.connection()

```


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eru3ojezjyjsazf0z98x.png)
hide email on website with captcha
Tags: webdev, programming, website, webscraping
Published: 2023-11-28 21:09:09

To protect email addresses on a website and prevent them from being easily harvested by spambots, you can use a combination of techniques, including obfuscation and the implementation of a CAPTCHA. Here's a step-by-step guide:

1. **Email Obfuscation:**
   - Use JavaScript to dynamically generate the email address on the client side. This makes it harder for bots to scrape the email address directly from the HTML source code.
   - Instead of writing the email address in the HTML code, use JavaScript to construct it.

   Example:
   ```html
   <script type="text/javascript">
     document.write('<a href="mailto:' + 'example' + '@' + 'domain.com' + '">' + 'Contact Us' + '</a>');
   </script>
   ```

2. **CAPTCHA:**
   - Integrate a CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) to ensure that the user is a human and not an automated script.
   - There are various CAPTCHA services available, such as Google reCAPTCHA. Follow the documentation provided by the CAPTCHA service you choose.

   Example of adding Google reCAPTCHA:
   ```html
   <!-- Add the following script tag to your HTML -->
   <script src="https://www.google.com/recaptcha/api.js" async defer></script>

   <!-- Add the following HTML snippet where you want the CAPTCHA to appear -->
   <div class="g-recaptcha" data-sitekey="YOUR_RECAPTCHA_SITE_KEY"></div>
   ```

3. **Server-Side Validation:**
   - Ensure that the form processing on the server side verifies the CAPTCHA response before processing the form data.
   - This helps prevent automated submissions by bots.

4. **Additional Tips:**
   - Avoid using plain text for the email address. Break it up or use additional characters to make it less recognizable.
   - Consider using a contact form instead of displaying the email address directly. This way, users can still reach you without exposing the email address publicly.

Remember that while these techniques can help reduce email harvesting, they are not foolproof. Determined spammers might still find ways to extract email addresses. Regularly updating and reviewing your website's security measures is a good practice.

Pro Tip: [hide email address from spammers](https://veilmail.io) with VeilMail.io. Check it out.
Hashes
Published: 2023-11-28 20:54:08

**Definition:**
A collection of _key-value pairs_. They are like dictionaries.

Hash syntax looks like this: 

``` 
hash = {
  key1 => value1,
  key2 => value2,
  key3 => value3
}
```

Values are assigned to keys using =>. _Any ruby object can be a key or value._

* Note: This is the _literal notation_. This is because you literally describe what you want in the hash: you give it a name and you set it equal to one or more key => value pairs inside curly braces.

**Using Hash.new**

Another way to create a hash is using Hash.new (Hash must be capitalized) like this:

```
my_hash = Hash.new

```
This is the same as my_hash = {}

Setting a variable equal to Hash.new creates a new, empty hash.

**Adding to a Hash**

Three ways:

1. Literal notation: simply add a new key-value pair directly between the curly braces

2. Bracket notation: Hash[key] = value

For example:

```
pets = Hash.new
pets["Stevie"] = "cat"
pets["Lucky"] = "dog"
pets["Sam"] = "snake"
```
3. Using the .store method

```
students = Hash.new
students.store(:name, "John Doe")
students.store(:age,22)
students.store(:grade,"A")

```

**Accessing Hash Values**

Very similar to accessing values in an array.

To access the value, access the key first using brackets:

```
pets = {
  "Stevie" => "cat",
  "Bowser" => "hamster",
  "Kevin Sorbo" => "fish"}

puts pets["Stevie"]
```
Pre-Screening Questions For Nearshore Software Developers
Tags: webdev
Published: 2023-12-07 22:14:50

---
title: Pre-Screening Questions For Nearshore Software Developers
published: true
date: 2023-11-28 20:51:52 UTC
tags: WebDevelopment
canonical_url: 
---

Thinking of hiring nearshore developers? You’re making a smart move! These developers strike the perfect balance in software development: they’re typically in your time zone, culturally aligned, and more cost-effective compared to onshore options. However, selecting the right talent is key. Here’s where effective pre-screening questions for nearshore software developers become essential. This process isn’t […]

The post [Pre-Screening Questions For Nearshore Software Developers](https://blog.nextideatech.com/pre-screening-questions-for-nearshore-software-developers/) appeared first on [Next Idea Tech Blog](https://blog.nextideatech.com).
Creating Arrays
Published: 2023-11-28 20:12:35

**Definition:**

An array is used to store a list of values in a single variable.

**Access by Index:**
Each element in the array has an index. First element is at index 0, the next is at index 1, the following is at index 2 ...

To access elements of the array put the index in square brackets like this:

``` 
array[i]

```

This is called _access by index_

Note: The position of the value does not match the index. The index starts at 0. Hence, a value in first position of the array is called using index 0.

**Arrays of Non-Numbers:
**
Arrays can be made of any objects - booleans, strings, etc.

**Arrays of Arrays**

You can put arrays in arrays these are called _multidimensional arrays_:

``` 
my_2d_array = [[1, 2, 3, 4, 5], ["Here", "are", "some", "strings"], [true, false]]
```
Create your own Schema Type in mongoose
Tags: webdev, mongodb, mongoose, backenddevelopment
Published: 2023-11-28 20:01:03

To create a new schema type in mongoose, first let's setup our server, to get this example 

1. Open your terminal, and choose specific path. After choosing the path write `npm init -y`. Give all the basic details about your project.
2. Install some basic packages like `cors`, `express`, `mongoose` by `npm i express mongoose cors`.
3. After it get install write `code .`. It'll open VSCode for you.
4. Write the below code for your to make your server run

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zff20h2011zvbuz7flys.png)
save this code in `Server.js`


6. This will make you a basic structure of server. After that run `node Server.js`. 

Your server is now running, now to create the schema type of your own, you first need to make a schemaModel. Before creating schema model, lets discuss about what we are gonna make... (Do you thought any... if then please mention it in comments). For me I am thinking to make a Color schema type, which will automatically fill the Color to the new field being entered. Sounds good right? 
So before creating our own Color schemaField let's create a small user schema


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w2lk57ay1xnj3qoay15i.png)
save this code as `userModel.js`

after creating schema lets create a controller, to add the user


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j00m5ftn0vkhtiys2sk2.png)
save this code as `userController.js`

now lets create a route on `Server.js` file to call this api


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

change your code accordingly, now finally create our own schema type name Color


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hdamtftvmxx3z3bwmtp6.png)
save this code as colorSchema.js

I'll explain the code after a while, lets make the necessary changes and give it a run... 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ui0cisgv6oquat1nvfxs.png)
make the changes accordingly in userModel.js

now when you'll hit the api, it will automatically create a color in your data.

Now come to the important part i.e being known what's happening in colorSchema.js file

so whenever we're extending schemaType form mongoose,  the default function is triggered if no data is provided. In this case, it returns nothing. Then, the cast function is executed, where the val variable holds the current value. If val is present, it is returned; otherwise, a random color from the specified array is set.
The Secret Weapon for Developers
Tags: webdev, productivity, career, learning
Published: 2023-11-28 19:28:04

#To grow, you have to embrace the discomfort.

That sentence comes from [this article](https://www.cnbc.com/2017/08/11/the-only-time-you-are-actually-growing-is-when-youre-uncomfortable.html#:~:text=Peter%20McWilliams%20once%20said%2C%20%E2%80%9CComfort,most%20often%20expanded%20through%20discomfort.%E2%80%9D&text=Discomfort%20is%20a%20catalyst%20for,change%2C%20stretch%2C%20and%20adapt.) and fits perfectly in what happened to me recently.

Dr. Elizabeth Lombardo, Psychologist and author of Better Than Perfect, says people who regularly seek fresh experiences are more creative and emotionally resilient than those who remain stuck in routine.

>“Breaking your mould can only make you stronger and more confident to reach higher levels in your professional and personal life,” she says.

Of course, in theory, that works, but how do you put it into practice?

I accidentally became vulnerable while writing my [first post on this website](https://dev.to/lucassacheto/junior-dev-to-senior-in-1-hour-3cch). The feedback was much better than I had ever expected. Negative and positive responses made me rethink many things.

The main one was to review the code from the project I gave as an example in the article. There was a HUGE security mistake; even though it is a harmless app, I learned something from it. After all those years, I finally can comprehend how much you can grow personally and professionally.

Since I’m not a writer or specialist, here are the 5 tips from Chat GPT to help you become more vulnerable :) 

###Open Communication: 
Cultivate an environment where open communication is encouraged.
###Admit Mistakes and Learn from Them: 
Acknowledge your mistakes rather than trying to conceal or ignore them.
###Seek Feedback and Act Upon It: 
Request feedback from peers, managers, or mentors to gain different perspectives on your work or approach.
###Build Relationships Based on Trust: 
Be authentic and empathetic and foster genuine connections with colleagues or team members.
###Take Calculated Risks: 
Embrace opportunities that challenge you to step out of your comfort zone.

Share your thoughts below :)
Microservices for beginners. Common code. Typescript.
Published: 2023-11-28 19:09:23

#### Whole series:

[Microservices for beginners](https://dev.to/igorok/microservices-for-beginners-3o1k)

[Microservices for beginners. Front-end service. Vue js. Socket.io.](https://dev.to/igorok/microservices-for-beginners-front-end-service-vue-js-socketio-3760)

[Microservices for beginners. Api Gateway service. Nest js. Kafka.](https://dev.to/igorok/microservices-for-beginners-api-gateway-service-nest-js-kafka-1i7)

[Microservices for beginners. User service. Nest js. Mongodb. Kafka.](https://dev.to/igorok/microservices-for-beginners-user-service-nest-js-mongodb-kafka-3j4k)

[Microservices for beginners. Message service. Nest js. Mongodb. Kafka.](https://dev.to/igorok/microservices-for-beginners-message-service-nest-js-mongodb-kafka-3p6h)

[Microservices for beginners. Spam service. Python. Scikit-learn. Kafka.](https://dev.to/igorok/microservices-for-beginners-spam-service-python-scikit-learn-kafka-1jmj)

[Microservices for beginners. Toxic service. Python. Tensorflow. Kafka.](https://dev.to/igorok/microservices-for-beginners-toxic-service-python-tensorflow-kafka-3g2e)

[Microservices for beginners. Common code. Typescript.](https://dev.to/igorok/-microservices-for-beginners-common-code-typescript-j8a)

Full code - [link](https://github.com/Igorok/micro-dto)

In previous articles I described how to create several services and how to work with them. But sometimes microservices in one project contain a lot of similar code, and I want to reuse it. For example I use a common type for user entities in the api gateway and in the user service - `WebUserDto`.

``` typescript
export class WebUserDto {
  @ApiProperty({ description: 'Id of user', nullable: false })
  id: string;

  @ApiProperty({ description: 'Login of user', nullable: false })
  login: string;

  @ApiProperty({ description: 'Email of user', nullable: false })
  email: string;

  @ApiProperty({ description: 'Flag of user active', nullable: false })
  active: boolean;

  @ApiProperty({ description: 'Date of user creation', nullable: false })
  created_at: Date;
}
```

So I made a new project in Github and put all the common DTO inside and built a typescript library.

#### Installation requirements

Installation
``` typescript
npm install typescript
npm install --save @nestjs/swagger
```

Initiation tsconfig.json
```
npx tsc --init
```

Building
```
npx tsc
```

Right now I can use common code as npm library in other projects, in package.json - `"micro-dto": "github:Igorok/micro-dto#main"`.
When to Use Flex or Grid (CSS)?
Tags: css
Published: 2023-11-28 19:00:02

In web development, both CSS Flexbox and Grid are powerful tools for creating responsive layouts, but they serve different purposes and are best used in different scenarios:

### CSS Flexbox
1. **One-Dimensional Layouts**: Flexbox is ideal for one-dimensional layouts where you want to align items either in a row or a column. It's perfect for small-scale layouts.
2. **Alignment and Distribution of Items**: Flexbox makes it easy to align items horizontally or vertically and distribute space between items, which is great for navigation bars, footers, or setting up elements in a specific direction.
3. **Dynamic or Unknown Number of Elements**: If you have a dynamic or unknown number of elements and want them to fit in a container nicely, Flexbox automatically adjusts the size and order of elements.
4. **Control over the Size of Items**: Flexbox offers great control over the size of items, allowing them to grow or shrink to fit the available space.

### CSS Grid
1. **Two-Dimensional Layouts**: Grid is more suitable for complex two-dimensional layouts where you need to control both rows and columns. It's best for larger-scale layouts.
2. **Precise Layout Control**: Grid provides precise control over where you can place items on both axes. You can define the exact placement and size of grid items.
3. **Complex Alignment and Overlapping**: Grid allows for more complex alignments and even overlapping of items, which can be useful for certain design layouts.
4. **Creating Consistent Structure**: It’s ideal for creating layouts with a consistent structure (like a photo gallery or a dashboard), where elements are aligned in rows and columns.

### When to Use Which
- **Use Flexbox when**:
  - The layout is simple and linear.
  - You need a quick solution for centering items or distributing space.
  - The number of items is dynamic or unknown.

- **Use Grid when**:
  - The layout is complex and involves rows and columns.
  - You need precise control over the placement and sizing of items.
  - You are creating a layout with a consistent matrix-like structure.

### Combining Both
Often, the best approach is to use both in combination. For example, you might use Grid for the overall page layout and Flexbox for smaller components or individual elements within a grid cell. This combination allows you to leverage the strengths of both layout models.