teleren/devto huggingface dataset:
Solving a Complex Backend Problem: My Journey with an Expense Tracker
Published: 2024-06-28 13:39:45


Hello, fellow tech enthusiasts!

I’m thrilled to share my journey as a backend developer tackling a challenging problem recently and why I'm excited about the upcoming HNG Internship. This experience not only tested my technical skills but also highlighted the importance of perseverance and creative problem-solving.

**The Challenge**

I was tasked with developing a sophisticated expense tracker application that could handle multiple currencies, provide real-time exchange rates, and ensure data integrity across numerous concurrent users. 

**Step-by-Step Solution**

**1. Requirement Gathering and Planning**

Understanding the requirements was crucial. I had detailed meetings with stakeholders to grasp their needs, which included multi-currency support, real-time exchange rate updates, user authentication, data security, and scalability.

**2. Choosing the Tech Stack**

Based on the requirements, I chose Node.js for its asynchronous capabilities and scalability, MongoDB for its flexibility with unstructured data, and Redis for caching exchange rates to ensure fast access.

**3. Setting Up the Project**

I started by setting up the project structure, integrating Express.js for handling routes, and connecting to MongoDB to establish a solid foundation.

**4. Implementing Multi-Currency Support**

To handle multiple currencies, I integrated a reliable third-party API for real-time exchange rates.

**5. Ensuring Data Integrity**

Concurrency issues can lead to data corruption, so I used transactions in MongoDB to ensure atomicity and data consistency.

**6. Optimizing Performance with Caching**

Fetching exchange rates frequently can be costly and slow, so I implemented caching using Redis to improve performance.

### Why the HNG Internship?

My journey with this expense tracker project underscored the importance of continuous learning and problem-solving. As I prepare for the HNG Internship, I’m eager to leverage these experiences and hone my skills further.

The HNG Internship offers a unique platform to collaborate with like-minded individuals and learn from industry experts. It’s a golden opportunity to expand my knowledge and make meaningful contributions. I am particularly drawn to the program’s emphasis on real-world projects and the potential to network with professionals in the field.

To those interested in the HNG Internship, you can learn more about the program [here](https://hng.tech/internship) and explore hiring opportunities [here](https://hng.tech/hire).

In conclusion, this journey has been a testament to my passion for backend development and my readiness to tackle complex challenges. The HNG Internship is the next step in my professional growth, and I can't wait to embark on this exciting adventure.

Stay tuned for more updates on my journey!

By Osayuwamen Aigbogun
Setting Up NativeWind in React Native
Tags: reactnative, tailwindcss, mobile, javascript
Published: 2024-06-28 13:38:40


If you want to enhance your React Native Expo project with a powerful styling solution, NativeWind is an excellent choice. NativeWind allows you to use Tailwind CSS classes in your React Native components, making it easier to manage styles and maintain consistency across your application. This article will walk you through the steps to set up NativeWind in your React Native Expo project.

 Table of Contents
1. Introduction to NativeWind
2. Prerequisites
3. Setting Up a New Expo Project
4. Installing NativeWind
5. Configuring TailwindCSS
6. Using NativeWind in Your Project
7. Example Usage
8. Conclusion


## Introduction to NativeWind

NativeWind brings the utility-first CSS framework, Tailwind CSS, to the React Native world. Integrating NativeWind allows you to apply Tailwind-style classes directly to your React Native components, simplifying the styling process and making your codebase cleaner.

## Prerequisites
Before you start, ensure you have the following installed on your system:

Node.js (version 12 or higher)
npm or yarn
Expo CLI

## Setting Up a New Expo Project
If you don't already have an Expo project, you can create one by running:
```bash
npx create-expo-app MyNativeWindApp
cd MyNativeWindApp
```
## Installing NativeWind
To install NativeWind and its peer dependencies, run the following commands:

```bash
npm install nativewind && npm install -D tailwindcss@3.3.2
```

## Configuring TailwindCSS
Next, you need to configure TailwindCSS in your project. Create a tailwind.config.js file in the root of your project:

```javascript
// tailwind.config.js
module.exports = {
+ content: ['./App.{js,jsx,ts,tsx}', './components/**/*.{js,jsx,ts,tsx}'],
  theme: {
    extend: {},
  },
  plugins: [],
}
```
If you’re going to be writing Tailwind styles in other directories, be sure to include them in the content array. 
Finally, add the Babel plugin for NativeWind to babel.config.js:

```javascript
// babel.config.js
module.exports = function (api) {
  api.cache(true);
  return {
    presets: ["babel-preset-expo"],
+   plugins: ["nativewind/babel"],
  };
};
```
## Using NativeWind in Your Project
Now, you can start using NativeWind in your React Native components.

```javascript
import React from 'react';
import { View, Text } from 'react-native';

export default function App() {
	<SafeAreaView className={"flex-1 items-center justify-center bg-neutral-900"}>
	<StatusBar style="light" />
        <Text className="text-red-500 font-bold">They not like us</Text>
	</SafeAreaView>
}
```

the visuals

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

Conclusion
Setting up NativeWind in your React Native project allows you to leverage the power of Tailwind CSS for styling your mobile application. By following the steps outlined in this guide, you can quickly integrate NativeWind and start using utility-first CSS classes in your React Native components.
The interesting regex for Identifying Prime Numbers
Tags: regex, math
Published: 2024-06-28 13:33:34


Prime numbers are numbers greater than 1 that have no positive divisors other than 1 and themselves.

The regex is `^1?$|^(11+?)\1+$`

Let's breaking Down...

First you need to know the meaning of these 3 symbols:
- **^**: _start of the string_
- **$**: _end of the string_
- **|**: _OR operator_

So we have two components in the main regex:

`1?`: The literal “1” and the question mark "?" for match the previous char zero or one times. So if we have zero characters or “1” it will match. Soon we will know the reason for this pattern here.

`(11+?)\1+`: The second pattern. `(11+?)` is a group and matches any string that starts with “11” by one or more “1”s. The “+?” makes it non-greedy, meaning it matches as few characters as possible. 
`\1+` capture the same text again with as many characters as possible. 

> E.g. So for the number  '111111', the pattern '11' is repeated three times. For the number 5 ('11111'), there is no way to split it into repeated sub-patterns.

So the interesting thing is that we found how to evenly divide repeated sub patterns. 
In the same number '111111', the pattern  '111' is also repeated twice and this is captured by regex.
For prime numbers, the string cannot be divided evenly into repeating sub patterns.

Ah, and  first pattern (1?) handles the non-prime cases of 0 and 1.

Thank you for reaching this point. If you need to contact me, here is my email: joaopauloj405@gmail.com 


_Sapere aude_
Accessing Azure storage with a shared key in php
Tags: php, azure
Published: 2024-06-28 13:24:59

---
title: Accessing Azure storage with a shared key in php
published: true
description: Accessing Azure blob and table with a shared key in php
tags: php,azure
---
The new CTO like azure, so I had to access to azure storage blob and table from a php project.

The [microsoft offical libraries](https://github.com/Azure/azure-storage-common-php) are deprecated, so I made a the project [caiofior/azure_storage](https://github.com/caiofior/azure_storage) using [guzzle](https://github.com/guzzle/guzzle) to access at this resources with a shared key.


```php
$azureTable = new \Ftc\driver\AzureStorageTable(
    AZURE_STORAGE_ACCOUNT_TABLE_NAME,
    AZURE_STORAGE_ACCOUNT_TABLE_BASEURL,
    AZURE_STORAGE_ACCOUNT_TABLE_TOKENSAS
);

try {
    $tokenNata = $azureTable->get('file','%24filter='.urlencode('PartitionKey eq \''.$token.'\''));
} catch (\Exception $e) {
    die("Token errato !");
}
```
Example of sorage table access

```php
    $azureBlob = new \Ftc\driver\AzureStorageBlob(
        AZURE_STORAGE_ACCOUNT_FILE_NAME,
        AZURE_STORAGE_ACCOUNT_FILE_BASEURL,
        AZURE_STORAGE_ACCOUNT_FILE_TOKENSAS
    );

   $azureBlob->put(
        'file',
        $_FILES['uploadFile']['name'],
        $_FILES['uploadFile']['type'],
        $_FILES['uploadFile']['size'],
        fopen($_FILES['uploadFile']['tmp_name'],'r')
   );
```
Example of file uploading

![How to generate a sherd key in azure](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/absbl8vch4ti8ojbjpqx.jpeg)

How to generate a shared key
What Do Flutter Developers Ask About? An Empirical Study on Stack Overflow Posts
Tags: flutter, nlp, mobile
Published: 2024-06-28 13:23:05

Since Google launched Flutter, an open-source framework, in 2017, many companies and software developers have turned to its use owing to its cross-platform feature. Other attractive features include hot reloading, a rich widget library, and improved performance compared to other cross-platform frameworks. Despite the rise in the use and adoption of the framework, little has been done to understand developers' challenges. This study aims to understand what Flutter developers post on Stack Overflow-a popular Q&A website for developers. Analyzing such posts would help us understand the challenges faced by Flutter developers. To meet this goal, the study used a topic modeling approach to analyze all "flutter" tagged posts between 2019 and 2023. This study revealed state management, widgets, navigation, packages, and persistence as some areas developers face challenges. Further, the study established that there is a growth in the number of Flutter-related posts and developers. While the Flutter framework is promising for companies and software developers, this study points out areas where Flutter trainers and developers should emphasize. Flutter Framework developers should provide more documentation and support as the language matures.
Read more [](https://www.researchgate.net/publication/381224589_What_Do_Flutter_Developers_Ask_About_An_Empirical_Study_on_Stack_Overflow_Posts)
Google maps polyline issue in flutter
Tags: help
Published: 2024-06-28 13:22:44

PolylinePoints polylinePoints = PolylinePoints();
PolylineResult result = await polylinePoints.getRouteBetweenCoordinates(    
    GOOGLE_MAPS_API_KEY,
    PointLatLng(_pGooglePlex.latitude, _pGooglePlex.longitude),
    PointLatLng(_pApplePark.latitude, _pApplePark.longitude),
    travelMode: TravelMode.driving,
    );
in this code part, it shows errors under the words getRouteBetweenCoordinates, travelMode and GOOGLE_MAPS_API_KEY. If someone can help me wwith this, would be grateful
italian lounge
Tags: webdev
Published: 2024-06-17 21:01:25

Italian lounges are synonymous with elegance and comfort. These spaces blend modern design with classic Italian charm. Whether you're enjoying a cappuccino or an evening cocktail, an **[Italian lounge](https://cashandcarrybeds.com/product-category/italian-furniture/italian-lounge/)** offers an unforgettable experience.

The Ambiance of an Italian Lounge
Italian lounges are designed to make you feel at home. The lighting is soft, creating a warm and inviting atmosphere. The furniture is both stylish and comfortable. You can relax on plush sofas or sleek armchairs, all designed with impeccable Italian craftsmanship.

Italian Cuisine and Beverages
An essential part of the Italian lounge experience is the cuisine. You can savor a variety of Italian dishes, from light antipasti to rich pasta. Pair your meal with a selection from the extensive wine list, featuring both local and international wines. For coffee lovers, Italian lounges serve some of the best espresso and cappuccino you can find.

Live Music and Entertainment
Many Italian lounges offer live music, enhancing the relaxing ambiance. You can enjoy performances by talented local musicians. The music ranges from smooth jazz to classical Italian tunes. This entertainment adds to the lounge’s sophisticated vibe, making your visit even more special.

Why Choose an Italian Lounge?
Choosing an Italian lounge means opting for quality and elegance. These lounges provide a serene escape from the hustle and bustle of everyday life. The combination of excellent service, delicious food, and a cozy environment makes them a perfect choice for any occasion.

The Unique Design Elements
The design of Italian lounges often incorporates elements of Italian architecture. You’ll notice beautiful marble floors, intricate tile work, and elegant chandeliers. These details create a luxurious yet comfortable space where you can unwind and enjoy the finer things in life.

Conclusion: The Perfect Getaway
In conclusion, an Italian lounge is the perfect getaway for those looking to experience luxury and relaxation. Whether you're dining, enjoying a drink, or listening to live music, these lounges offer a unique and memorable experience. So next time you need a break, consider spending it in an Italian lounge. You'll leave feeling refreshed and inspired.
Men's Denim Do's and Don'ts: Style Tips for Every Guy
Tags: design
Published: 2024-06-28 13:03:31


Although men's fashion has evolved in many ways over the years, most guys continue to hold tight to their favorite pair of denim jeans. From how skinny to wear them, and the type of fit that is most flattering-how denim should look. Below are some tips to make sure you look perfect in your jeans.



Grow Your Denim Wardrobe Wisely


DENIMJANE STYLE TIPS, BUT... FIRST THINGS FIRST Before we get into style tips around this particular item of your wardrobe - let's talk about the main part itself. Take care to buy quality navy blue jeans when you purchase your denim. While inexpensive jeans may appear to be a more frugal choice, they won't last as long and you'll end up paying for them several times over.



Some of the Do's and Don'ts to look great


But what if you are now in possession of pants that might not be the most ideal but at least fit better than anything else? You want to make sure your jeans fit properly. They should be fitting tight but not too much or feeling loose. A good rule of thumb is to be able to easily slide two fingers between your waist and the top of your jeans. Secondly, your jeans should fall just above the ankle for a clean and current look.



For colors, dark wash denim is always a good shout to look smart. Some black jeans are also a good idea instead of classic blue ones. Light wash denim is great but stay away from looking too aged with punty holes or tears in your jeans.



How to Find the Best Jeans for Your Body Shape


All jeans are not created equal, as bodies differ. This tip is about shopping jeans: consider your body shape so the fit doesnt shade anything-appropriate across. Tall and slim guys tend to look good on straight or boot-cut leg high waisted bootcut jeans while the relaxed fit works better if you have larger thighs or a very muscular body.



Accessories to Levitate Your Style


Denim jeans can be either dressed up or down for the occasion. Wearing the right shoe is one way to really increase your denim game. Classic leather boots or tennis sneakers. Go for colorful loafers or dress shoes in textures, point it to a full high fashionable look.



Even accessories can add on to your denim look. Leather belt Leather watches A belt enhances your dress sense. Wear a denim hat and jacket for an individualistic edge if you are looking experimental.



In conclusion, every man should own black denim jeans. Always select jeans, that fit on your body shape and do not forget to add accessories in order you can play trends according to your personal style. Use these little hacks and you will never dress like a denim schlub again!
Mastering JavaScript Variables in Testing Frameworks
Published: 2024-06-28 13:03:24

🔍 **Understanding JavaScript Variables for Effective Testing**  
JavaScript variables are the backbone of any application. For testers and developers, mastering these variables is crucial for writing robust and efficient tests. Let's dive into how to leverage JavaScript variables in your testing framework!

---

🛠️ **Why Variables Matter in Testing Frameworks**  
In any testing framework, variables play a pivotal role. They store data, manage state, and drive test logic. Ensuring these variables are well-defined and properly managed can lead to more efficient and effective tests.

---

🚀 **Optimizing Your Testing Framework with Variables**  
1. **Identify Key Variables**: Determine which variables are critical to your test scenarios. Focus on the most impactful ones.
2. **Design Thorough Test Cases**: Ensure your tests cover a wide range of scenarios involving these key variables.
3. **Automate Repetitive Tests**: Use automation tools to handle repetitive testing of these key variables, freeing up time for more complex test cases.

---

📊 **Example: Testing a Login Functionality**  
1. **Key Variables**: `username`, `password`, `loginStatus`.
2. **Priority Tests**: Check valid login, invalid login, and edge cases for `username` and `password`.
3. **Automate**: Automate tests for common scenarios (e.g., valid and invalid logins) to quickly catch any regressions.


🔧 **Best Practices**  
- **Consistent Naming Conventions**: Use clear and consistent names for variables to avoid confusion.
- **Modular Tests**: Write modular and reusable test functions that can be easily maintained and scaled.
- **Documentation**: Document your variables and their roles in your tests to ensure clarity and ease of use for the entire team.

🌟 **Takeaway**  
By focusing on the most critical variables and optimizing your testing framework, testers and developers can create more efficient and effective testing environments. This approach not only saves time but also enhances the quality and reliability of your applications.

 
---

Feel free to reach out if you have any questions or need further assistance. Happy testing! 😊🚀
Reflexões antes da Arquitetura de software
Tags: softwaredevelopment, architecture, developer, carreira
Published: 2024-06-28 13:02:25

Um dos maiores enganos é o desenvolvedor de software acreditar que o próximo passo natural na carreira será a arquitetura de software, simplesmente por ser o estágio seguinte.

A pergunta que devemos nos fazer é: quanto conhecimento técnico e experiência acumulamos ao longo da jornada? Quanto evoluímos em liderança? Quanto conseguimos desapegar do nosso ego? Quanto crescemos profissionalmente em inteligência emocional?

Decisões estruturais não são soluções instantâneas e passos equivocados, devido à falta de experiência, reflexão e uma certa ingenuidade, podem afundar um projeto de software, gerando prejuízos bilionários.

Estude, avance e tenha em mente que o aprendizado é contínuo. Bom senso e humildade nunca fazem mal a ninguém.

Aprenda a reconhecer que também precisa de ajuda e o seu papel é conduzir uma jornada para a solução no lugar de fingir sabedoria e agir no modo "aliem" destruindo tudo ao redor.

Você precisa de uma consultoria especializada em estratégia de software para apoiar a modernização do seu software? Entre em contato. Até a próxima !!!

Ramon Durães
VP Engineering @ Driven Software Strategy Advisor
Devprime
Working with Nodemon in Node.js projects
Tags: javascript, webdev, programming, node
Published: 2024-06-28 12:59:27

While working with Node.js for Backend development, developers usually get tired with having to restart the server application everytime a change is made to the program logic. I was also caught up in this scenario while working with on a Node project recently.

In this article, I want to outline how this tedious process could be made easier by using Nodemon to automatically execute this repetitive task while working on Node.js projects.

Before I proceed, I want to let you know about the HNG internship that gives early career professionals in tech a chance to work on real-world projects and gives them the experience of a real-time workspace remotely. Check it out here [HNG Internships](https://hng.tech/internship)

Moving forward, to work with Nodemon, I installed nodemon as a dependency in my project using npm
`npm install nodemon`
This takes a few seconds or minutes to execute depending on your bandwidth strength, and afterwards Nodemon is added as a dependency in the package.json file as seen below

```
{
  "dependencies": {
    "express": "^4.19.2",
    "nodemon": "^3.1.0"
  }
}
```

After this, I adjusted the value of the "start" property in my package.json file to "nodemon app.js" where "app.js" is the name of the entry file for my application and I save the changes. Code shown below 

```
{
  "scripts": {
    "start": "nodemon app.js"
  }
}
```

After applying these changes, my server application automatically restarts and adjust to any changes I make to the program logic and I don't need to manually do that again. Once I run "npm start" at the first instance, the nodemon dependency takes care of restarting my server after any change is made. 

This is one of the techniques I have learnt while building my portfolio in backend development and I look forward to expanding my horizon in this field as I enroll for the HNG11 internship.

I believe the internship will give me an opportunity to apply the concepts and techniques I have learnt so far in a real-world setting and a chance to collaborate with other like-minded developers. If you are someone who also needs this type of experience, do well to check it out [here](https://hng.tech/premium) and learn more about the internship.

Thanks for reading this article, I hope you learnt something.
Atitude nas decisões em projetos de software
Tags: lideranca, softwaredevelopment, softwareengineering, gestao
Published: 2024-06-28 12:46:54

A tomada de decisão no dia a dia do desenvolvimento de software é constante. Por isso, um bootcamp de 6 meses não forma um sênior, e nem um profissional com 10 anos de experiência se torna sênior fazendo a mesma coisa todos os dias.

Estamos perdendo algo muito importante: a essência da jornada. As pessoas estão se “gourmetizando”, evitando mergulhar na trincheira, e isso tem se transformado em um abismo nas carreiras.

Aprendi no campo, enfrentando muitas dificuldades, mas nunca desisti. Sempre tive a humildade de perguntar e, principalmente, a proatividade de reagir rapidamente, buscando soluções.

Tenho visto pessoas em verdadeiras zonas de conforto, achando que estão protegidas, mas depois se perdem na carreira por falta de experiência prática e fundamentos essenciais.

Sou um executivo programador, fundei algumas empresas e nunca me coloquei numa zona de conforto. Estudo muito todos os dias e aprendo com os desafios da minha equipe e dos clientes. Para liderar, vou para o front e estou sempre pronto para debugar qualquer código, se for necessário.

A liderança tem que dar o exemplo. Dessa forma, podemos contribuir para a recuperação da cultura e do prazer pelo desenvolvimento de software.

Faz sentido? Compartilhe

Você precisa de uma consultoria especializada em estratégia de software para apoiar a modernização do seu software? Entre em contato. Até a próxima !!!

Ramon Durães
VP Engineering @ Driven Software Strategy Advisor
Devprime