teleren/devto huggingface dataset:
Node version enforcement and convenience
Tags: node, javascript, webdev, backend
Published: 2023-12-26 19:48:29

# Node versions
Created Wed Dec 27, 2023 at 12:38 AM

Many projects have bad documentation or ways around what Node.js version they use, and how to load it.
But there's a simple explicit way to do both enforcement and convenience at once.

It involves making changes to 4 files - `.nvmrc`, `.npmrc`, `package.json` and terminal hook (`.zshrc` for example).

1. Enforcement - the app will raise errors for wrong versions during `npm install`. `.npmrc` and `package.json` do this, since any app is started by an npm script. This raises an error during `npm install` itself for wrong Node version, which is a good thing. See [StackOverflow](https://stackoverflow.com/a/61403989/11392807)

   `/.npmrc`

   ```sh
   engine-strict=true
   ```

   `/package.json`. See [engines property on npmjs](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#engines)

   ```json
    "engines": {
        "node": "<=16"
    },
    // supports range like so `>=0.10.3 <15`
    // optionally, even `npm` version can be specified
   ```

2. Convenience

   1. Manual load - Add `.nvmrc` with the node version (by running `node -v > .nvmrc`), then manually do `nvm use` inside the directory. Don't have to remember "x" in `nvm use x`, good.

      `/.nvmrc` and (for safety/other [environments](https://stackoverflow.com/questions/27425852/what-uses-respects-the-node-version-file)) `/.node-version` file

      ```json
      v16.20.2
      ```

   2. Auto load - remembering and doing `nvm use` for each new terminal is lame. So, add `.nvmrc` to the project as usual, and also add a function that loads the node version. Fully automatic. See [Deeper shell integration](https://github.com/nvm-sh/nvm?tab=readme-ov-file#deeper-shell-integration)

      `~/.zshrc`

      ```sh
      # for ZSH: Add to .zshrc https://github.com/nvm-sh/nvm?tab=readme-ov-file#zsh
      # for bash: Add to .bashrc https://github.com/nvm-sh/nvm?tab=readme-ov-file#bash
      # optionally can do
      ```

Notes and gotchas:
- Set global default: `nvm` has a bad UI. To set global default, one has to run `nvm use alias default _version_`
- Use specific node version (temporarily - for terminal session) - `nvm use _version_`
- On mac, make sure to run `brew uninstall node`. Homebrew node messes up with nvm global default - it just takes over the default.

## PS
Time to take [asdf](https://asdf-vm.com/) seriously?
Logging AWS SES Details
Tags: aws, learning, tutorial, devops
Published: 2023-12-26 20:14:31

_Cover Image Generated with DALLE :)_
AWS SES allows you to view various metrics such as the # of sends, rejects, bounces, etc. However, there is no place to view or log additional information such as the sender, recipient, subject, message or if the email is rejected, what is the reason or the diagnostic Code for example. 

Recently I needed to capture detailed notifications about email bounces and deliveries and log that information in AWS CloudWatch under the CloudWatch log group. 

Prerequisites that you may need to complete before deploying the additional SES logging.

**Under Amazon SES**
- Make sure that your domain, or email address identity shows in green as verified.

**Under Amazon SNS** 
- Create a new SNS topic to capture detailed notifications for bounces, deliveries, etc. 

Now head back to Amazon SES, under the verified identity (domain or email), select the Notifications tab, click on the Feedback Notifications section -> Click the edit button to navigate to the next page. Select the bounce notification topic with the SNS topic ARN that we created in the prior step and click Save Changes.

Once the prerequisite steps are complete, we are ready to move on to the next step!

1. Download ses_bounce_logging_blog.yml CloudFormation file from the below link, once you save this on your local machine, follow the next steps.

[(https://github.com/aws-samples/digital-user-engagement-reference-architectures/blob/master/cloudformation/ses_bounce_logging_blog.yml)](url)

2. Go to the AWS CloudFormation Console and Click Create Stack.
Select the Upload template button and Click Choose to upload the ses_bounce_logging_blog.yml file that we downloaded earlier.

3. Click Next, Specify a Stack Name, update the default value of Cloud-Watch-Group-Name, and Select the Event Type “Bounce”, “Complaint”, or “Delivery”. For my use case, I selected bounce as that's what I suspected was happening to emails being sent out, but not received by the intended recipient.

4. Enter the (ARN) of the AWS SNS topic that we created earlier and click Next, and next. 

5. Select I acknowledge..., and click Create Stack. 

**Time to Test**
Go to Amazon SES and select the Verified Domain Identity Checkbox. Click Send a Test Email Button. Fill in the required information such as the From-address, Subject, and Scenario is Bounce, and then click Send Test Email.

**AWS Cloudwatch**
Head over to AWS Cloudwatch | log groups, once the bounce notification is received in the SNS topic it will be sent over to the Lambda function, and then will be logged in the /aws /ses/bounce_logs CloudWatch log group. As a small set of notes, the default log retention for these SES logs is set to forever, but you can tweak the retention period to whatever makes sense for your specific project or policies. You may also export the logs to Amazon S3 for longer-term storage.

To visualize this data, you can filter down in AWS CloudWatch, this also allows us to graph metrics and make them searchable. you can export the logs to Amazon S3 for the long term.
Unleashing Opportunities: Get Paid to Complete Online Jobs and Easy Tasks Without Experience
Tags: webdev, beginners, ai, news
Published: 2023-12-26 19:47:48

In today's digital age, the internet has opened up a world of possibilities, allowing individuals to earn money from the comfort of their homes. Whether you're a student, a stay-at-home parent, or simply looking to supplement your income, there are numerous online opportunities waiting for you. The best part? You don't need any prior experience to get started.

[Click Here to Explore Exciting Online Job Opportunities!](https://sites.google.com/d/1GmEuKQs35cXNpRwI0w_bRTCCNfLcHKTY/p/1ms2Xe1hV60MApk0KWvBWahhELozgVijx/edit)
Generics in TypeScript
Tags: javascript, typescript
Published: 2023-12-26 19:37:54

Generics in TypeScript allow you to write functions and classes that can work with a variety of data types while maintaining type safety. They provide a way to create reusable and type-safe components, offering a level of abstraction that promotes code flexibility.

Let's start by looking at a simple example. Consider a function that returns the input it receives:

```typescript
const num = 1;
const str = 'a';
function returnValue(val: any): any {
 return val
};

const numReturn = returnValue(num);
const strReturn = returnStr(str);
```
While this works, it lacks type safety. The any type means that the function can accept any type of argument, but it doesn't provide information about the type of the returned value. This is where generics come into play.

Generics allow us to create functions and classes that can work with different data types while preserving type information. Let's rewrite the returnValue function using generics:

```typescript
function returnValue<T>(val: T): T {
 return val
};

const numReturn = returnValue(21)
```
In this example, the T inside the angle brackets <T> represents a type parameter. The type parameter T acts as a placeholder for the actual type that will be provided when the function is called. In the case of returnValue(21), T is inferred to be number (If you pass a string it will be taken as a string).

Benefits:

- Type Safety: With generics, you can write code that is both flexible and type-safe. The TypeScript compiler can catch type-related errors at compile time, providing a safety net that plain JavaScript lacks.

- Code Reusability: Generics allow you to create functions and classes that can work with different types without sacrificing reusability. This can lead to more modular and maintainable code.
- Functionality Abstraction: Generics enable the creation of highly abstracted and versatile components. You can write code that doesn't depend on specific types, making it adaptable to a wide range of scenarios.
- Improved Readability: By using generics, your code becomes more expressive and readable. Type parameters provide meaningful names for the types involved, making the code easier to understand.
Conclusion:

In this introductory guide, we've explored the basics of generics in TypeScript. As you delve deeper into TypeScript development, generics will become an essential tool in your toolkit for writing robust, reusable, and type-safe code. By leveraging generics, you can enhance the flexibility and maintainability of your TypeScript projects, making them more scalable and easier to work with in the long run.
IAS Preparation with a Full-Time Job Made Easy
Tags: ias, upsc
Published: 2023-12-26 19:37:43

Chasing one's dreams and aspiring to become an Indian Administrative Service (IAS) officer is undoubtedly a journey filled with challenges and rewards. For many hopefuls, the path to success requires unwavering dedication, hard work, and careful planning. But what about those who also shoulder the responsibility of a full-time job? Fear not, as this blog aims to be your guide through the intricacies of IAS preparation while juggling the demands of a 9-to-5 routine. We will delve into the significance of IAS coaching in Delhi, explore the realm of the best IAS coaching centers in the city, and shed light on the convenience offered by SHRI RAM IAS Online Classes.

1. **The Significance of IAS Coaching in Delhi:**

Delhi, often considered the heart of the nation, stands as a focal point for IAS aspirants seeking top-notch coaching. The city hosts some of the finest IAS coaching institutes in the country, drawing aspirants from every corner of India. The competitive atmosphere, experienced faculty, and access to valuable resources make Delhi an ideal destination for those aspiring to don the prestigious IAS uniform.

2. **Balancing Act: IAS Preparation with a Full-Time Job:**

For many individuals, the dream of becoming an IAS officer goes hand in hand with the demands of a full-time job. Juggling work responsibilities while engaging in rigorous IAS preparation may seem daunting, but it's certainly achievable. Success in this balancing act relies on effective time management and a well-structured study plan. Aspirants with jobs need to optimize their daily schedules, setting aside specific hours dedicated to focused [IAS preparation](https://web.shriramias.in/upsc-zone/ias-preparation-with-full-time-job/).
I made a website to create memorial pages quickly and easily
Tags: buildinpublic, opensource, python
Published: 2023-12-26 19:35:05

Recently, a family member passed away, and as a software engineer, I felt compelled to use my skills to create something meaningful in their honor.

I discovered nice platforms for creating memorial pages, like [joincake.com](https://www.joincake.com/), [forevermissed.com](https://www.forevermissed.com/), [muchloved.com](https://www.muchloved.com/), and so forth. However, given my mental state at the time, I felt there were too many steps and overwhelming options to get this done quickly.

So, I turned to [carrd.com](https://carrd.co/) and created a very basic page with a link to send emails to my wife and me, where you could share condolences, support messages, book recommendations, and so forth.

After that, I thought, "Why not create a platform to build these kinds of pages in just one step and start receiving support from friends and family without feeling pressured to answer the messages?"

And after two weeks, inspired by [@levelsio](https://twitter.com/levelsio) and [@marc_louvion](https://twitter.com/marc_louvion), I created https://www.easytribute.com

So, thank you all for your support and feedback!
History of Flutter 💚
Tags: flutter, mobile
Published: 2023-12-22 14:44:11


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

History of flutter:

- the framework has undergone several significant since its inception

Dart Language Announcement ( 2011) 

- Google introduced the Dart programming language in 2011, designed for web building.

Project Sky ( 2013 )  

- this was an early version of Flutter focused on providing a reactive framework for building user interfaces.

Flutter Beta ( 2017 )

- Flutter reached the beta stage, offering a more stable and feature-rich environment for developers.

Flutter 1.0 Stable Release ( 2018 )

- Google considered the framework ready for production use. With a stable release, Flutter became an officially supported framework for building cross-platform applications.

Flutter For Web ( 219) 

- this allowed developers to use Flutter to build applications that could run on web browsers

Flutter 2.0 ( 2021 )

- was a major release that expanded Flutter’s capabilities, and also introduced null safety in the Dart.

Flutter 3.0 ( 2022 )

- Flutter became stable on desktops ( Linux and macOS)

Flutter 3.7 ( 2023)

- support Material 3  and DevTools updates.
New Year - New Job? Optimize Your LinkedIn for Success 🚀
Published: 2023-12-26 19:17:13


Many people ask me for advice on how to optimize their LinkedIn profile, so I've decided to share some tips. I've put together a list of 10 tips that can help you improve your profile and increase your chances of getting noticed by recruiters. Let's dive into the details! 🤿
<br>


### 1. Craft a Captivating Headline 🔍

Your headline is the first thing recruiters see. Make it compelling and concise. Highlight your key skills and expertise to grab attention. 

Example of some eye-catching LinkedIn profile headlines: https://www.linkedin.com/business/talent/blog/product-tips/recruiters-with-eye-catching-linkedin-profile-headlines
<br>


### 2. Showcase Your Work with Rich Media 🎨

Don't just tell, show! Use the "Featured" section to display projects, articles, or any other work. Visuals speak louder than words.
<br>


### 3. Write a Stellar Summary ✍️

Your summary is your personal pitch. Share your journey, passion, and what you bring to the table. Let your personality shine through!
<br>


### 4. Detail Your Skills & Endorsements 🛠️

List your technical skills, and ask colleagues for endorsements. This adds credibility and helps recruiters understand your strengths.
<br>


![The Office Gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mk9ycwsju13oecgfu1s7.gif)
<br>

### 5. Highlight Achievements in Experience 💼

Rather than listing duties, focus on achievements. What impact did you make in your previous roles? Quantify results when possible.
<br>


### 6. Connect and Engage 🤝

Expand your network strategically. Connect with professionals in your field, join relevant groups, and engage in discussions to increase visibility.
<br>


### 7. Customize Your LinkedIn URL 🔗

Create a personalized LinkedIn URL to make your profile easy to find and share. It adds a professional touch to your online presence. 

Find here how to customize your LinkedIn URL: https://www.linkedin.com/help/linkedin/answer/a542685/manage-your-public-profile-url
<br>


### 8. Utilize the "Open to Job Opportunities" Feature 🎯

Signal to recruiters that you're open to new opportunities by enabling the "Open to Job Opportunities" feature in your profile settings.
<br>


### 9. Stay Active with Regular Updates 📆

Share industry news, insights, or your own thoughts regularly. Active profiles are more likely to catch the attention of recruiters.
<br>


### 10. Seek Recommendations 🌟

Ask colleagues or supervisors for recommendations. A positive reference can provide valuable insights into your work ethic and skills.

<br> 
If you found these tips helpful, consider giving this post a like or sharing it with your network. Let's boost those career opportunities together! ☕️

I appreciate your support as always. 🙌
From Semester Mini Project to Streamlit Fusion: A Coding Mini Tale
Tags: programming, python, api, streamlit
Published: 2023-12-26 19:14:25

Hey Coders,

So, back in my first semester, I was working on this project with a couple of buddies for an Intro to Programming course. We chose [OpenWeatherMap](https://openweathermap.org/) and [News API](https://newsapi.org/) – you know, to keep things interesting. The goal was to whip up a tool that fetched real-time weather data and top news headlines. Not groundbreaking stuff, but a solid start in the world of APIs.

[GitHub - Weather and News Python Mini Project](https://github.com/Vikranth3140/Weather-and-News-API.git)

![The Terminal snapshot of the Mini Project](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5cm9ubkwgx2mshqysap2.png)

A bit down the road, during a hackathon, I decided to give [Streamlit](https://streamlit.io/) a spin. I put together a basic Weather Tracker using the OpenWeatherMap API. Streamlit turned out to be a handy tool – straightforward, effective, and perfect for turning data into interactive web apps.

[GitHub - Streamlit Weather Tracker](https://github.com/Vikranth3140/Weather-Tracker.git)

![The Streamlit snapshot of the Streamlit Weather Tracker](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/874x2fyohwr8vfzggm66.png)

Now, here's where it gets interesting. After a bit of a break, I thought, "Why not bring these two projects together?" Take the weather and news API from the first, blend it with Streamlit features from the second, and there you have it – **CityInsight**.

[GitHub - CityInsight](https://github.com/Vikranth3140/CityInsight.git)

![The Streamlit snapshot of the Final Streamlit Weather and News Tracker](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ror1067egnmn80atf4ne.png)

This project isn't a groundbreaking feat, but it's my little step into the world of personal open-source development. Dealing with different APIs, navigating through Streamlit, and merging codes – it was like putting together a tech puzzle.

Challenges? Yeah, a few. Wrapping my head around different APIs, understanding Streamlit quirks, and getting the codes to cooperate – it wasn't a walk in the park. But hey, every challenge is a lesson in the coding world, right?

So, here I am, throwing **CityInsight** out there. It might not be the next big thing, but it's a thing. If you're curious or want to throw in your two cents, feel free to jump in. Let's make coding a tad more interesting.

[GitHub - CityInsight](https://github.com/Vikranth3140/CityInsight.git)

See you in the code!
Clube de leitura para Devs✨
Tags: softwaredevelopment, development, computerscience, reading
Published: 2024-01-23 15:55:18

---
title: Clube de leitura para Devs✨
published: true
date: 2023-12-26 19:11:44 UTC
tags: softwaredevelopment,development,computerscience,reading
canonical_url: https://marcellecode.medium.com/clube-de-leitura-para-devs-c50b1be89477
---

![](https://cdn-images-1.medium.com/max/1024/0*OhqNqYwXAktUl947)
_Photo by Vladyslav Bahara on Unsplash_

A oportunidade de interagir com pessoas do setor de tecnologia sempre foi fundamental para o meu crescimento e evolução como desenvolvedora. Inspirada por essa experiência, decidi criar o Clube de Leitura para Devs. Este clube não apenas incentiva o hábito da leitura, mas também se dedica ao estudo de temas frequentemente negligenciados na rotina diária, porém essenciais para aprimorar suas habilidades de programação. É um espaço para descobrir e explorar aspectos vitais da nossa profissão, contribuindo para o desenvolvimento contínuo de cada membro como um programador mais competente e versátil.

#### E como esse clube irá funcionar ?

Em um canal do Telegram ([link para o grupo](https://t.me/clubedeleituraparadevs)) eu vou compartilhar as informações da leitura da semana e também um material complementar para você se aprofundar no tópico da semana. E pensando também nas semanas corridas que podem acontecer com todos nós, eu vou disponibilizar também um resumo das páginas da semana, dessa forma você vai poder acompanhar e participar dos debates.

Caso você goste de utilizar o Notion para organizar a sua vida pessoal, também temos um template gratuito no grupo do telegram para você organizar o seu processo de estudo.

#### Preciso ter algum conhecimento prévio para participar ?

Não vai ser necessário e a ideia é ser um ambiente seguro para tirar dúvidas. Caso você leia algo e não entenda, você pode perguntar porque a ideia é ser um espaço livre e respeitoso.

#### Precisa pagar algo para participar ?

Não temos taxa de mensalidade nem nada do tipo, a única coisa que pode acontecer é em algum momento ser necessário comprar algum livro. Mas geralmente eu sou adepta a livros que estejam disponíveis de forma gratuita, assim vamos conseguir democratizar o acesso ao conteúdo.

#### Quando irá começar ?

Vamos começar no dia 02/01/2024 e no grupo do telegram você já encontra o link para baixar o livro. Durante o mês de janeiro iremos ler Algoritmos — Um Guia Ilustrado Para Programadores e Outros Curiosos do autor (Aditya Y. Bhargava).

Todos os links você encontra no meu agregador de links abaixo

[marcellevargas - Link in Bio & Creator Tools | Beacons](https://marcellevargas.bio)
Enhancing Software Design with Diagrams as Code
Tags: systemdesign, diagrams, aws, programming
Published: 2023-12-26 18:58:35

Read my latest article "Enhancing Software Design with Diagrams as Code".

Summary:

🌐 Introduction to Diagrams as Code: A valuable tool for documenting system design, useful for various professionals. Focuses on PlantUML for system architecture diagrams.

💻 Diagrams as Code Methodology: Uses code for creating and managing diagrams, enabling scripting, version control, and integration into build pipelines. Features PlantUML, Mermaid, and Python-based tools.

🔀 UML Diagrams Example: Demonstrates creating a sequence diagram with PlantUML, showcasing ease of use and versatility.

🌐 Kubernetes & AWS Support in PlantUML: Provides examples of component diagrams for Kubernetes web services and AWS system architecture, utilizing PlantUML with custom icons.

🔗 Resources and Tools: Lists tutorials and tools for Diagrams as Code, including support for other cloud providers like GCP.

For more details, you can read the full article https://cloudnativeengineer.substack.com/p/enhancing-software-design-with-diagrams
How to use Application Default Credentials on CGP Cloud Run for Google Drive API
Tags: gcp, cloudrun, googledriveapi
Published: 2023-12-26 18:55:21



Step 1. Create service account.

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


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


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


Step 2. Set the service account to Cloud Run security settings.

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


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


Step 3. Share a Google Drive folder (or a file) to the service account email address.

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


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


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


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

- see also : 
 - https://developers.google.com/identity/protocols/application-default-credentials
 - (for PHP) https://github.com/googleapis/google-api-php-client