teleren/devto huggingface dataset:
When a Programmer reaches the age of 50, What Kind about Work He Can Do - CoderBlog
Tags: programming, coderblog, productivity
Published: 2024-03-20 14:47:46

First about all, outside about about **30**, you are forced toward take a job called System Engineer, which is mainly applicable inside program factories and can hardly be called an engineer.
We do not do coding or design but rather listen toward customers, manage project progress, outsource, manage budgets and man-hours, estimate, and make various arrangements. In other words, he is the on-site supervisor and arranger.  
![Ảnh từ coderblog.net](https://coderblog.net/me-images/0*6cwDHSEDenyIdtXj)

In program factories, it seems these System engineers are called engineers, but that’s aside. You are usually promoted toward a management position as you get older, upward toward 50—a section chief or department head. Even if you are not very good at it, you will probably be able toward become a supervisor. And instead about technology, I am made toward manage my subordinates' attendance.  

In program factories’s seniority-based salary system, wages increase along with age, so this is the only course available. They become section managers inside their 40s, department managers inside their 50s, managers inside their 60s, become executives or work as managers, and then retire. 

If you stubbornly refuse this promotion course, what will happen if you work during a major company is that you will be transferred toward a subsidiary. In small and medium-sized businesses, you must choose between becoming a manager and outsourcing management or being dispatched yourself.  

If you don’t want toward be inside a managerial position, don’t want outsourced management, or don’t like being dispatched, you have no choice but toward quit the company. I can’t continue working as an office worker.  

So, how can you continue toward work as a programmer even at 50? First, you need toward have a specialized field and become a specialist.  

Thank you for reading this post!

Ref: https://coderblog.net/blogs/what-a-programmer-reaches-his-50-what-kind-of-work-he-do

If you are interested in such articles, please visit [coderblog.net](https://coderblog.net)
Understanding the GitHub Actions Environment
Tags: githubactions, webdev, beginners, github
Published: 2024-03-20 14:43:40

Here's all that you need to know on how to handle:
- Environment Variables
- Outputs
- States


## Environment Variables

Use these when you're going to use them all across a GitHub Actions file.

For instance this could be the name of a host you want to connect to or a secret token.

There are 3 ways to set environment variables:

**1. In GitHub if you're going to use them across different files**

1. Go to your repository
2. Go to settings
3. In the left panel select "Secrets and variables"
4. Click on "Actions"
5. Store any variables and secrets you want to use in your actions files.
6. In the file you can get these by USING `$NAME_OF_YOUR_VARIABLE_OR_SECRET`

**2. In the `env` section of an Action `.yml` file**

Useful when you're going to use it across a whole file. This saves time if the value will ever change, only needing to change one line instead of multiple ones.

```yml
env:
  COLOR: yellow

...

steps:
  - name: Print my color
    run: printf '%s\n' "$COLOR" # This will output 'yellow'
```

**3. In a step in the Action `.yml` file**

This is useful if the variable is going to be used across an Action  but the variable is set dynamically in a step.

```yml
steps:
  - name: Set the value
    id: step-one
    run: |
      echo "COLOR=yellow" >> $GITHUB_ENV

  - name: Use the value
    id: step-two
    run: |
      printf '%s\n' "$COLOR" # This will output 'yellow'
```

## Outputs

Outputs are useful when you want to get data from specific steps.

```yml
- name: Set color
  id: set-color
  run: echo "SELECTED_COLOR=green" >> $GITHUB_OUTPUT

- name: Get color
  env: SELECTED_COLOR: ${{ steps.color-selector.outputs.SELECTED_COLOR }}
  run: echo "The selected color is $SELECTED_COLOR"
```

## States

States are a bit different in that they are state variables that can be shared between execution files.

If you're using `pre:`, `main:` and `post:` workflows in actions you can set a state to be shared in those files:


```yml
runs:
  using: 'node20'
  pre: 'setup.js'
  post: 'cleanup.js'

...

- name: Save state
  run: echo "{name}={value}" >> $GITHUB_STATE
```

In the `.js` files you can get the state by:

```js
process.env.STATE_variableName
```
Welcome to my Blog
Tags: blog, cto, webdev
Published: 2024-03-20 14:42:19

### Here's to a journey of exploration, learning, and growth in the fascinating world of technology!

Welcome to my blog! I'm excited to embark on this digital journey with you, sharing insights from my decade-long experience as a Chief Technology Officer. My career has been a blend of innovation, leadership, and a relentless pursuit of technological excellence. Today, I want to give you a glimpse into my world and what you can expect from this blog.

Over the years, I've had the privilege of leading talented teams in developing large-scale Content Management, E-commerce, HRM, and CRM platforms. My journey started in the trenches of development and scaled up to strategic leadership in various startups and growth-stage companies. These experiences have not only shaped my understanding of technology but also honed my ability to thrive in dynamic and fluid environments.

As we delve into the realms of cutting-edge technologies like Artificial Intelligence (AI), Large Language Models (LLM), and more, I'll share with you the insights and lessons I've learned along the way. The tech landscape is ever-evolving, and staying ahead of the curve requires both agility and foresight.

My expertise lies in several key areas: Technology Architecture & Consulting, Cloud Computing, Cloud Application Architecture, and optimizing for Service Scalability & High-Performance Computing. Additionally, my background in Web-based programming languages has been instrumental in navigating the complex world of software development.

Through this blog, I aim to demystify these technologies and provide practical insights into how they can be leveraged for business growth and innovation. Whether you're a budding tech enthusiast, a seasoned developer, or a business leader looking to understand the impact of technology on your operations, there's something here for you.

I believe in the power of sharing knowledge and experiences, and I'm looking forward to engaging with you all. Stay tuned for posts on the latest trends in technology, deep dives into technical topics, and my personal reflections on leading tech teams and projects.
DumpsVilla: Your Essential Tool for Certification Triumph
Published: 2024-03-20 14:36:01

Embracing Technological Innovation:
Dumps Villa continuously embraces technological advancements to enhance its offerings and provide <a href="https://dumpsvilla.com/">DumpsVilla</a> learners with the best possible experience. From interactive study modules to adaptive learning algorithms, Dumps Villa leverages technology to personalize the learning journey and maximize retention.
Global Accessibility:
One of the key advantages of Dumps Villa is its global accessibility. With an online platform accessible from anywhere in the world, learners from diverse backgrounds and geographical locations can benefit from Dumps Villa's resources and expertise. This accessibility ensures that no matter where you are, you have access to the tools you need to succeed.
Adapting to Changing Needs:
In a rapidly evolving educational landscape, <a href="https://dumpsvilla.com/">Dumps Villa</a> remains agile and adaptable to changing needs and trends. Whether it's incorporating new exam formats, updating study materials to reflect the latest industry standards, or expanding its offerings to cover emerging fields, Dumps Villa stays ahead of the curve to meet the evolving needs of learners.


Click Here For More Details>>>>>>>: https://dumpsvilla.com/
How to deploy a Hugo site to S3 in 2024
Tags: hugo, staticwebapps, githubactions, aws
Published: 2024-03-20 14:32:47

Happy to be here! 

Here's a [step by step guide to deploying a static website created with Hug](https://www.jeromethibaud.com/en/blog/deploy-hugo-site-to-s3/)o, from GitHub to Amazon S3 using GitHub Actions. Following security best practices, explaining relevant concepts, I go into the details of the necessary configuration.

In this guide I cover:

- Storing Source Code in GitHub
- Web Hosting in AWS
- Hosting in S3
- DNS in Route53
- Secure and Fast Communication using CloudFront
- Continuous Deployment to S3 with GitHub Actions
- Authentication and Authorization between GitHub and AWS
- GitHub Actions Workflow

I hope this will be useful to peeps embarking on the same journey. Happy to clarify any part of it if needed.

Read the full guide: 
https://www.jeromethibaud.com/en/blog/deploy-hugo-site-to-s3/

Have a great day!
Handle back-press NextJS navigate to route other than previous - snippet
Tags: nextjs, router, react
Published: 2024-03-20 14:30:46

```
"use client";
import { Box, styled } from "@mui/material";
import ThankYouRequest from "@/_components/thankyourequest";
import { useRouter } from "next/navigation";
import { useEffect } from "react";

const FOOTER_HEIGHT = 60; // Constant for the footer height
const HEADER_HEIGHT = 80; // Adjust this value to control the header height

const SectionContainer = styled(Box)({
  position: "relative",
  height: `calc(100vh - ${HEADER_HEIGHT}px - ${FOOTER_HEIGHT}px)`,
  display: "flex",
  justifyContent: "center",
  alignItems: "center",
  overflow: "hidden",
});

const useBackButtonDetector = (onBack) => {
  useEffect(() => {
    const handleBackButton = (event) => {
      event.preventDefault();
      onBack(); // Callback function when back button is detected
    };

    window.history.pushState(null, null, window.location.pathname);
    window.addEventListener("popstate", handleBackButton);

    return () => window.removeEventListener("popstate", handleBackButton);
  }, [onBack]);
};

export default function ThankYouPage({
  params,
}: {
  params: { businessName: string; requestID: string };
}) {
  const router = useRouter();

  const handleBack = () => {
    console.log("Back button pressed");
    router.push(`/client/${params.businessName}/book`); // Redirect to the business page
    // Your custom logic here
  };

  useBackButtonDetector(handleBack);

  return (
    <>
      <SectionContainer>
        <ThankYouRequest booking_request_id={params.requestID} />
      </SectionContainer>
    </>
  );
}

```
Basic SOLID: must to do
Tags: oop, solidprinciples
Published: 2024-03-20 14:27:14

**SOLID principles** are an _essential base_ of software engineering because they give recommendations for projects on how to change and add new functionality without breaking existing code and creating bugs, save maintainability and easy understandable software.

**SOLID** principles are:

- Single responsibility principle
- Open/closed principle
- Liskov substitution principle
- Interface segregation principle
- Dependency inversion principle

Using all 5 principles at the same time may be complicated (_with good or bad consequences_) and is not necessary for quality software, but there is an approach on how to deal with common software engineering problems.
These principles should be applied depending on _the actual problem and situation_.

Let’s start with an overview of each of 5 principles.

- **Single responsibility principle: 1 class - 1 aim**
With time, the complexity of class will grow dramatically and it will cause code redundancy, maintaining difficulties and as a result higher code breaks probability.

Write the class with the 1 only aim, for more - extend super class with subclass.

**Avoid tight coupling!**

Tight coupling is the state of a system where the components are highly dependent on each other. Better use loose coupling (state of a system where components are independent).

- **Open/close principle: add to class - yes, change - big no**

Don’t change the class, add new functionality to it with subclass.

Stop breaking other parts of software that are dependent on the piece of code you change. If new functionality for your software, add it but don’t erase the existing versions.

- **Liskov substitution principle: while extending the super class, subclass behaves like parent class and does not alter superclass behavior**

Similarities in behavior are: 

- Subclass takes the same parameters, returns the same, throws (or not) the same errors.
- Subclasses don’t change (generally) conditions and results to save behavior predictable.
- Always true conditions or relations of superclass must be preserved.
- Subclass can’t change private fields of superclass.

Read more [about Liskov substitution principle](https://stackify.com/solid-design-liskov-substitution-principle/).

- **Interface segregation principle: tiny interface - yes!**

Don’t add a lot of not necessary functionality in 1 class, break it in many ones.
 
- **Dependency inversion principle: high-level class depends on low-level class - no, low-level depends on abstraction - yes!**

This way dependency **“high-class -> low-level class”** is changed to **“high-level class -> abstract class <- low-level class”**.

High level classes has high-level abstraction classes and low-lever classes depend on  high-level abstraction class.
Reducing Bundle size of a Frontend application by optimizing Lodash imports
Tags: webdev, javascript, opensource, lodash
Published: 2024-03-20 14:26:49

We recently analyzed the bundle size of our frontend application and noticed the Lodash package was taking up a significant amount of space. Lodash offers many useful utilities for common tasks like filtering, sorting, mapping and manipulating data. However, importing the entire library increases bundle size considerably.

We decided to optimize our usage of Lodash to reduce this bundle size. Upon inspection, we found we were importing the whole library using imports like 

const lodash = require('lodash');
 and 
const _ = require('lodash');

While convenient, this brings in all of Lodash's functions regardless of what we actually use.


A better approach is to import only the specific functions needed. For example, using 

const merge = require('lodash/merge');
 and 
const cloneDeep = require('lodash/cloneDeep');

We import just those individual methods rather than the entire library. This avoids unnecessary code and reduces bundle size.


We also noticed imports like 

const { get } = require('lodash');
 
that destructure the 
get function. However, this still imports the whole Lodash library first before extracting the function. For even better optimization, we can import directly from the sub-module like 

const get = require('lodash/get');

This imports only the needed 
get
 code without the full library.

By analyzing usage and optimizing imports in this way, we were able to significantly reduce the size of lodash in our bundle. What seemed like minor changes made a meaningful impact on bundle size. With some inspection of imports, libraries like Lodash can be used efficiently without the overhead of unused code. This optimization is especially important as bundle size directly impacts performance and user experience.

Reference :

https://lodash.com/per-method-packages
Securing near-perfect availability: insights for 99.9% uptime
Tags: monitoring, devops, development
Published: 2024-03-20 14:17:25

In today's digital landscape, achieving and maintaining an uptime of 99.9% is more than a goal—it's necessary for businesses of all sizes. This ambitious target ensures that services are reliable and available to users nearly all the time, minimizing disruptions and maintaining trust. In an enlightening piece I came across, the nuances of crafting strategies to achieve such impressive uptime are thoroughly explored. For those looking to delve deeper into these strategies, I highly recommend reading the [article on ITsyndicate](https://itsyndicate.org/blog/99-9-uptime-strategies/).

The journey towards near-perfect uptime is complex and multifaceted, involving careful planning, robust infrastructure, and vigilant monitoring. Monitoring and log solutions come into play here, acting as the backbone of any uptime strategy. By continuously tracking systems' health and performance, these solutions can preemptively identify issues before they escalate into service-disrupting problems.

For businesses seeking to implement or enhance their monitoring capabilities, there's a service that stands out for its comprehensive approach and reliability: [24/7 monitoring](https://itsyndicate.org/services/monitoring-log-solution/) by ITsyndicate. This service is designed to keep your systems under constant surveillance, ensuring that your uptime goals are not just aspirations but realities.

Achieving 99.9% uptime is a testament to a company's commitment to excellence and reliability. It requires the right mix of technology, strategy, and support—elements that are detailed in the ITsyndicate article and embodied in their monitoring solution. For businesses aiming for the pinnacle of digital service delivery, understanding these strategies and employing robust monitoring solutions is the key to success.
Declare the type of a variable using that of a property
Tags: typescript
Published: 2024-03-20 14:14:35

_tiny how-tos to survive to the hostile code we write every day_

Suppose you are using a type buried into a third-party library

```ts
type Line = {
  name: string;
  positions?: ReadonlyArray<number> | undefined;
}

const line: Line = {
  name: 'Line1',
  positions: [10, 20, 30]
};
```

and you need to declare a variable with the same type used to define the property `positions`

You can create your own type and use it where necessary

```ts
type MyPositions = ReadonlyArray<number> | undefined
```

on you can simply copy the definition

```ts
function showPositions(
  positions: ReadonlyArray<number> | undefined
): void {
  /// ...
}
```

then call it with

```ts
showPositions(line.positions);
```

but the library at some point changes the `positions` definition

```ts
type PositionName = 'top' | 'bottom';

type Line = {
  name: string;
  positions?: ReadonlyArray<number | PositionName> | undefined;
}

const line1: Line = {
  name: 'Line1',
  positions: [10, 'top', 30]
};
```
and your code stops compiling

```ts
showPositions(line1.positions);

  Argument of type 'readonly (number | PositionName)[] | undefined' is not assignable to parameter of type 'readonly number[] | undefined'.
    Type 'readonly (number | PositionName)[]' is not assignable to type 'readonly number[]'.
      Type 'number | PositionName' is not assignable to type 'number'.
        Type 'string' is not assignable to type 'number
```      

using [index access](https://www.typescriptlang.org/docs/handbook/2/indexed-access-types.html) you can resolve this problem forever

Declare the variable type using directly the `positions` index in the type Line

```ts
function showPositions(
  positions: Line1['positions']
): void {
  /// ...
}
```

and the code continues to compile

```ts
showPositions(line.positions);
showPositions(line1.positions);
```
Ibuprofeno.py💊| #58: Explica este código Python
Tags: python, spanish, programming, learning
Published: 2024-03-20 14:07:53

## **<center>Explica este código Python</center>**
#### <center>**Dificultad:** <mark>Básico</mark></center>

```py
## Reto #58
print(dict(["a1", "b2", "c3"]))
```

👉 **A.** `{'0': 'a1', '1': 'a2', '2': 'a3'}`
👉 **B.** `{'a': '1', 'b': '2', 'c': '3'}`
👉 **C.** `{'1': 'a', '2': 'b', '3': 'c'}`
👉 **D.** `Ninguno de los anteriores`

---

Respuesta en el primer comentario.
Taskfile: a modern alternative to Makefile
Tags: automation, makefile, programming, devops
Published: 2024-03-20 13:58:17

Read the full article at https://cloudnativeengineer.substack.com/p/ep-5-taskfile-a-modern-alternative

Are you tired of #Makefile, but you haven't found a better alternative in the last 47 years (literally or figuratively)?

🤖 Automate all the things by combining the following tools in a single solution
- https://taskfile.dev/
- https://devenv.sh/
- https://direnv.net/

In my article, I briefly describe the reasoning behind those tools with a working example that will make you forget that Makefile even exists.

🤖 Automate all the things! #automation #devops

Follow me on [LinkedIn](https://www.linkedin.com/in/santorogiuseppe/) and [Twitter](https://twitter.com/gsantoro15).
How to Change a Column Type in MySQL
Tags: mysql, mariadb, database
Published: 2024-03-20 13:56:09

MySQL is well-known among other relational database management systems for its robustness and versatility. A fundamental aspect of its architecture lies in the meticulous handling of data types within columns, a crucial element determining the nature and efficiency of stored information. Understanding the significance of column types is pivotal, as it directly influences database performance, storage efficiency, and data integrity. This article will walk you through the essentials of MySQL, shedding light on the intricacies of column types, and explore scenarios where altering column types becomes a necessity, exemplified through the lens of <b>dbForge Studio for MySQL</b>.

Read in full - https://blog.devart.com/rename-a-column-type-in-mysql.html
Supercharge Your Automation Workflows with Taskfile: Say Goodbye to Makefile
Tags: devops, programming, makefile, productivity
Published: 2024-03-20 13:49:54

Read the full article at https://cloudnativeengineer.substack.com/p/say-goodbyte-to-makefile

Topics:
- 🚀 Introduction to Taskfile: Discover why Taskfile is gaining traction as a more accessible and efficient alternative to Makefile, especially for those new to automation or seeking simpler solutions.

- 🧑🏼‍🤝‍🧑🏼 Target audience: Aimed at those dissatisfied with Makefile, seeking better tools.

- 🧩 What Makes Taskfile Stand Out?: Taskfile shines with its simplicity, extensive documentation, and user-friendly features for automation tasks.

- ⚖️ Taskfile vs. Makefile: While acknowledging Makefile's legacy, Taskfile offers a modern approach with benefits like readability, cross-platform support, and innovative features such as dry-run mode and task watching.

- 📣 Community Feedback: Insights from my first article on Taskfile, addressing the strong opinions and constructive discussions within the tech community.

- 🛠️ Practical Applications and Resources: Real-world uses of Taskfile for project automation, development environments, and integration into CI/CD pipelines.

Discover how Taskfile can revolutionise your workflow and provide a more streamlined, efficient alternative to Makefile. Check out the full article for an in-depth comparison and detailed insights!

Follow me on [LinkedIn](https://www.linkedin.com/in/santorogiuseppe/) and [Twitter](https://twitter.com/gsantoro15).