teleren/devto huggingface dataset:
How to Include Version, Git Commit, and Build Date in Your Angular Builds
Published: 2024-01-03 19:39:35

Knowing the exact version of your Angular app can be really helpful. This article will teach you how to add your app's package version, git commit hash, and build date to your builds. You'll also learn how to access this information within your Angular app.

## 1. **Create a File for Version Information**

Make a file named `version.ts` in the `src/environments/` folder.

Add placeholders for the app version, build date, and commit hash, like this:

```typescript
// src/environments/version.ts
export const version = "0.0.0-development";
export const buildDate = new Date().toISOString();
export const commitHash = "development";
```

Then, you can use this version information in your Angular code. Here's how you might do it:

```typescript
import { Injectable } from "@angular/core";
import { version, buildDate, commitHash } from "src/environments/version";

@Injectable({
  providedIn: "root",
})
export class VersionService {
  getVersion(): string {
    return `Version ${version}, commit ${commitHash}, built at ${buildDate}`;
  }
}
```

## 2\. **Write a Script to Update Version Information**

Make a file called `update-version.js` in your project's main folder.

This script will automatically fill in the real version and commit hash using Node.js code. Here's an example:

```javascript
const fs = require("fs");
const execSync = require("child_process").execSync;

const version = require("./package.json").version;
const commitHash = execSync("git rev-parse --short HEAD").toString().trim();
const buildDate = new Date().toISOString();

const content = `export const version = '${version}';
export const buildDate = '${buildDate}';
export const commitHash = '${commitHash}';`;

fs.writeFileSync("./src/environments/version.prod.ts", content);

console.log("Updated version!", { version, commitHash, buildDate });
```

## 3\. **Add a Prebuild Script to Your Project**

In your `package.json` file, add a `prebuild` script in the "scripts" section.

This script should run `node update-version.js` before each build. Your `package.json` should include something like this:

```json
"scripts": {
  "prebuild": "node update-version.js"
}
```

## 4\. **Update Your Build Configuration**

In the `angular.json` file, make a change to use `version.prod.ts` instead of `version.ts` when you build your app. Here's how you can set it up:

```json
"fileReplacements": [
  {
    "replace": "src/environments/version.ts",
    "with": "src/environments/version.prod.ts"
  }
]
```

## 5\. **Ignore the Generated Version File**

If you want, you can add `version.prod.ts` to your `.gitignore` file. This keeps the automatically generated file out of your code repository.

Working example: https://github.com/rensjaspers/add-version-to-angular-build

I hope this article was helpful to you. If you've found a better way to implement this, I'd be very interested to hear about it.
Tech Trend: Frontend for Backend
Published: 2023-12-29 18:34:17

As of my last knowledge update in January 2022, I don't have specific information about tech trends in 2024. However, I can provide you with a general perspective on the trend of frontend technologies encroaching into the domain traditionally associated with backend development. Keep in mind that industry trends can evolve, and you should verify the latest information.

"Frontend for Backend" Trend:

Full-Stack Development: Full-stack developers, who are proficient in both frontend and backend technologies, have been in demand. The ability to work seamlessly across the entire tech stack allows developers to have a holistic understanding of the application architecture.

Serverless Architectures: The rise of serverless computing has abstracted away many backend complexities, allowing frontend developers to focus more on the logic and features of their applications without deep involvement in backend infrastructure management.

JAMstack Architecture: JAMstack (JavaScript, APIs, and Markup) has gained popularity. It emphasizes decoupling the frontend from the backend by using APIs to fetch data dynamically. Frontend developers can leverage this architecture to build scalable and performant applications.

GraphQL: GraphQL, a query language for APIs, has become a significant player in frontend development. It enables frontend developers to request only the data they need, reducing over-fetching and under-fetching of data.

Edge Computing: The trend towards edge computing brings computational resources closer to the end-users. Frontend developers may find themselves dealing with edge computing concerns, such as optimizing content delivery and improving user experience.

Microservices and Containers: The adoption of microservices and [containerization ](https://newsllytoday.com/is-kisskh-me-down/)allows for more modular and scalable backend systems. Frontend developers might work closely with containerized applications and microservices to integrate frontend components.

Low-Code and No-Code Platforms: The rise of low-code and no-code platforms allows developers, including frontend developers, to build applications with minimal hand-coding. This trend can blur the lines between frontend and backend development.

WebAssembly (Wasm): WebAssembly is gaining traction, enabling high-performance, low-level code execution in web browsers. Frontend developers may find themselves working with Wasm to enhance application performance.

Remember, the tech landscape is dynamic, and emerging trends can shape the roles and responsibilities of developers. Stay updated on the latest industry news, attend conferences, and participate in the developer community to gain insights into evolving trends in frontend and backend development.
Only a Front end dev will see the problems :)
Tags: frontend, webdev, javascript, beginners
Published: 2024-01-03 19:21:54



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

BTW, I am looking for someone that knows how to fix them and wants to help ... +_+

Arranging the buttons, fields, adding X buttons on the columns and rows.
How to create a Docker image ( for the website ) and run the container
Tags: php, development, docker, devops
Published: 2024-01-03 19:15:00

Hello, since Rumble had some issue in code and stopped uploading videos, I needed to recreate my channel now it all works and the Devs checked so republishing my videos:

{% embed https://rumble.com/v44id5f-how-to-create-a-docker-image-for-the-website-and-run-the-container-php-apac.html?mref=2xhj9j&mc=cm8uy %}

Follow for more on 
YouTube: [Link](https://www.youtube.com/@valters_eu)
Twitter: [Link](https://twitter.com/valters_eu)
Rumble: [Link](https://rumble.com/c/c-5535633)
Website: [Link](https://www.valters.eu/)

Thanks
Discussion: What is the best programming language to learn in 2024?
Tags: discuss, programming, 2024
Published: 2024-01-03 18:59:50

---
title: Discussion: What is the best programming language to learn in 2024? 
published: true
description: Let's talk about what are the best programming languages for learning during 2024
tags: discuss, programming, 2024
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2024-01-03 16:35 +0000
---

A new year is starting and the relevance and demand for programming languages continue to shift. As we delve into 2024, certain programming languages stand out, offering a great opportunity to improve our knowledge and career. 

In this discussion, we aim to dissect this question by analyzing the ecosystem of programming languages that hold promise in 2024.

Taking into account the market, the threading technologies and job opportunities here my top 8 list:

1. Rust
2. Go
3. JavaScript
4. Python
5. C#
6. Java
7. Elixir
8. Kotlin

Share your list in the comment and let's discuss
How to build docker container image
Tags: devops, docker, development, developers
Published: 2024-01-03 19:00:00

Hello, since Rumble had some issue in code and stopped uploading videos, I needed to recreate my channel now it all works and the Devs checked so republishing my videos:

{% embed https://rumble.com/v44hv56-how-to-build-docker-container-image-shorts-short-viral-developers-devsecops.html?mref=2xhj9j&mc=cm8uy %}

Follow for more on 
YouTube: [Link](https://www.youtube.com/@valters_eu)
Twitter: [Link](https://twitter.com/valters_eu)
Rumble: [Link](https://rumble.com/c/c-5535633)
Website: [Link](https://www.valters.eu/)

Thanks
Code & Canvas: Expressing Myself in the Digital World! 🚀🎨
Tags: devresolutions2024, discuss
Published: 2024-01-03 18:55:24

## Introduction:

Coding is not just about logic and syntax; it's an art form that allows us to express our creativity and personality. In this blog, I'll take you on a journey through a coding project that felt like a masterpiece, a canvas where I could splash my emotions and thoughts. 🖌️💻

## The Project: A Symphony of Pixels 🎵

Picture this: a pixel art generator that brings together my love for coding and passion for vibrant colors. The idea was to create a tool that transforms lines of code into a visual symphony, where every function and variable becomes a stroke of a virtual brush. 🌈

## Emotions Embedded in the Code:

**Joyful Variables:**

I couldn't resist adding some playful variables like **'happyLittlePixel'** and **'colorfulDreams'** to spread joy throughout the code. Every time these variables were invoked, it was like injecting a dose of happiness into the project.


![python](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6bm0kuwf1ikupde7m667.png)

**The Symphony of Loops:**

Loops became my musical notes, creating harmonious patterns across the canvas. The rhythmic dance of **' for'** and **' while'** loops echoed the excitement I felt while writing them.


![Javascript](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z8sdeaf1adglp3vgtq09.png)

**Exceptional Exceptions:**

Even error handling became a part of the artistic process. Instead of generic error messages, I crafted exceptions that were like gentle nudges, encouraging users to explore and experiment.


![Java](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o790ia7y1syhuwdub0ui.png)

**Thoughts Woven into Comments:****

I didn't stop at just the code; my comments became a diary of thoughts and reflections. It was like leaving love notes for future me, capturing the essence of my creative journey.

![python](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x0ola2spei53i4htfomx.png)

**Conclusion: A Digital Masterpiece** 🖼️

In the end, my pixel art generator wasn't just a coding project; it was a piece of my soul woven into the digital fabric. The joy, excitement, and a touch of whimsy embedded in every line of code turned it into a digital masterpiece that reflects who I am as a coder and a dreamer. So, go ahead, let your code be your canvas, and paint your digital emotions with the strokes of syntax! 🎨💻
The oOo way (part 1) : "Proof of concept"
Tags: programming
Published: 2024-01-03 18:52:44

The **_oOo way_** promotes usage of English language as the main language for all programming tasks. ChatGPT itself if asked mirrors the mainstream opinion that a spoken language is hard to impossible to use as a programming language and current attempts to achieve this functionality face hard to impossible to solve issues. This is why programming languages are there, according to ChatGPT which in next step delivers a proof of the opposite: 

Conversation with ChatGPT 3.5 on 3. January 2024: 
```
**User**
Please provide full and complete code for a "program which replaces all occurrences of '?🤔?' with 'oOo ☺️ way ' in the file '~/oOo/oo/whichWayIsTheBest.unicodeUTF8.txt' and saves the result back to the same file" along with instructions how to execute the program in order to accomplish the replacements. 

**ChatGPT**
Certainly! Below is a Python script that accomplishes the specified task:
```

python
```
import os

def replace_text_in_file(file_path, old_text, new_text):
    with open(file_path, 'r', encoding='utf-8') as file:
        content = file.read()

    content = content.replace(old_text, new_text)

    with open(file_path, 'w', encoding='utf-8') as file:
        file.write(content)

if __name__ == "__main__":
    # File path
    file_path = os.path.expanduser('~/oOo/oo/whichWayIsTheBest.unicodeUTF8.txt')

    # Text to be replaced
    old_text = '?🤔?'
    new_text = 'oOo ☺️ way'

    # Perform replacement
    replace_text_in_file(file_path, old_text, new_text)

    print(f'Replacement completed in {file_path}.')
```

Instructions for executing the program:

- Save the above code into a file, for example, replace_text.py.
- Open a terminal or command prompt.
- Navigate to the directory where you saved the script using the cd command.
- Run the script using the following command: `python replace_text.py`

If you're using Python 3, you might need to use python3 instead:
bash
```
python3 replace_text.py
```

This will execute the script, replacing all occurrences of '?🤔?' with 'oOo ☺️ way ' in the specified file (whichWayIsTheBest.unicodeUTF8.txt). Make sure you have the necessary permissions to read and write to the file.

P.S. if you need an inspiration for a text of `whichWayIsTheBest.unicodeUTF8.txt` here you are: 

```
~/oOo/oo/whichWayIsTheBest.unicodeUTF8.txt   by  oOosys  2024-01-03_17:55

There are always myriads of different ways you can do the same thing. 
If you are a newbie and want to create a program but are not sure which
way you need to choose to arrive at the right replacement in the answer

		**The best way of creating programs is the '?🤔?'.** 

to the question:

		**Which is the best way of creating programs?**  


I suggest to talk to ChatGPT and create a program using English as  
"programming language" in order to arrive at an executable which 
replaces the string with the question marks with the best possible 
answer being: 'oOo ☺️ way'
```

> **The best way of creating programs is ... the 'oOo ☺️ way'**
Simplified: AI Cover Letter Generator Create a Winning Cover Letter for Data Architects |
Tags: dataarchitect
Published: 2024-01-03 18:41:28

Dengan **[AI Cover Letter Generator](https://simplified.com/ms-ai-cover-letter-generator/data-architect)** dari Simplified, anda dapat mencipta surat permohonan yang efisien dan menarik untuk jawatan Arkitek Data. Alat ini akan membantu anda menyusun surat pengantar yang profesional dan menonjolkan kebolehan anda sebagai seorang arkitek data yang berkelayakan. Jangan lepaskan peluang ini, gunakan Simplified sekarang!
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w33q0bzj0c14vhv8x1cq.jpg)
How to run any docker container
Tags: docker, devops, development, developers
Published: 2024-01-03 18:30:00

Hello, since Rumble had some issue in code and stopped uploading videos, I needed to recreate my channel now it all works and the Devs checked so republishing my videos:

{% embed https://rumble.com/v44hvbc-how-to-run-any-docker-container-shorts-short-viral-developers-devsecops-dev.html?mref=2xhj9j&mc=cm8uy %}

Follow for more on 
YouTube: [Link](https://www.youtube.com/@valters_eu)
Twitter: [Link](https://twitter.com/valters_eu)
Rumble: [Link](https://rumble.com/c/c-5535633)
Website: [Link](https://www.valters.eu/)

Thanks
Task - 4
Published: 2024-01-03 18:27:06

Q1. Describe the Differences in between:
1.Smoke & Sanity testing

- Smoke testing
Verifies the very basic features

- Sanity testing
Verifies that the bugs have been fixed in the received build and no further issues are introduced

- Smoke testing
Verify if the software works at all

- Sanity testing
Verify several specific modules, or the modules impacted by code change

- Smoke testing
A subset of acceptance testing

- Sanity testing
A subset of regression testing

2.Validation & Verification

- Validation 
Typically conducted during the development process.

- Verification
Typically conducted after the development process.

- Validation 
Helps to ensure that the software is built correctly.

- Verification
Helps to ensure that the correct software is built.

- Validation 
Can be automated or manual.

- Verification
Often involves manual testing.	

Q2-Explain about Agile Methodology.

Agile methodology is one of the simplest and effective processes to turn a vision for a business need into software solutions. Agile methodology  describe software development approaches that employ continual planning, learning, improvement, team collaboration, evolutionary development, and early delivery.

Q3.Explain about Epic and User Stories?

- Epic 
Epic is an large body of work that can be broken down into a number of smaller stories.

- User Stories
A User Story is a short, simple description of a software feature expressed from the perspective of a product’s end user.
Argh! Lost my 649 Days Hot streak on Leetcode
Tags: leetcode, programming
Published: 2024-01-03 18:20:32

Funny enough, the only badge I missed was my December 2023 badge (exhausted my time travels). Ended up losing my streak because of it. :)

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

You can follow me on Linkedin: https://www.linkedin.com/in/afrozchakure/
Forgo Following Fads
Tags: codenewbie, softwaredevelopment
Published: 2024-01-03 18:01:29

| 🔴 **Disclaimer**: This post is enhanced with AI assistance.|
|--------------|

> Neal Ford says, “Yesterday’s Best Practice Becomes Tomorrow’s Antipattern.” Choose architectures based on fundamentals, not fashion. ~ Tip #19 from the book "The Pragmatic Programmer"

---

In realms of code, where trends take flight,
Fads whisper promises, bathed in digital light.
New frameworks bloom, like flowers in May,
But yesterday's hero, fades with the day.

Ford's wisdom echoes, a voice ever clear,
"Best practices crumble, replaced by new fear."
Don't chase the sirens, the hype and the throng,
Build on the bedrock, where logic stays strong.

Fundamentals whisper, a timeless refrain,
Data structures, algorithms, etched in the brain.
Object-oriented grace, a dance in the night,
Patterns proven, bathed in logic's pure light.

Efficiency's flame, a beacon to hold,
No needless complexity, stories untold.
KISS principle's mantra, keep it simple, dear friend,
For elegance thrives, where clarity transcends.

Measure and test, with rigorous gaze,
Unmask the false idols, in logic's bright maze.
Performance whispers, a truth to unfold,
Optimize wisely, let efficiency hold.

Learn from the masters, their wisdom embrace,
But choose your own path, with confident pace.
Experimentation's key, a playground to roam,
Discover new pathways, to call your own home.

So build with purpose, not fashion's bright call,
Let fundamentals guide you, through rise and through fall.
For lasting software, a legacy grand,
Is built on the bedrock, that time cannot withstand.

Raise your keyboard, a banner held high,
Let logic be your compass, as you code and fly.
For in the realm of code, where trends come and go,
Fundamentals whisper, "Software's true flow."

---

|✍ **Powered by**: *Google Bard*|
|--------------|
Task - 3
Published: 2024-01-03 17:56:39

1.List down all the Models of SDLC.

- Waterfall Model.
- V-Shaped Model.
- Agile Model.

2.What is STLC? Also, Explain all stages of STLC.

- Requirement Analysis
- Test Planning
- Test case development
- Test Environment setup
- Test Execution
- Test Cycle closure

a. Requirement Analysis
        The testers identify all the testable requirements. Once the requirements are identified and specified, they should be categorized into functional and non-functional tests.

b. Test Planning
         Once what needs to be tested is determined, the quality assurance professional will prepare a test plan.

C. Test case development
         The requirements traceability matrix has to be updated with which test should be conducted with which script and test case.

d. Test Environment setup
         The software and hardware are determined to test the application or product. 

e. Test Execution
          All the errors/bugs/defects will be reported back to the developers for fixing and once fixed, retesting is done.

f. Test Cycle closure
         All the functional and non-functional tests are completed and closed in this final stage.

3.As a test lead for a web-based application, your manager has asked you to identify and explain the different risk factors that should be included in the test plan. Can you provide a list of the potential risks and their explanations that you would include in the test plan?

4.Your TL (Team Lead) has asked you to explain the difference between quality assurance (QA) and quality control (QC) responsibilities. While QC activities aim to identify defects in actual products, your TL is interested in processes that can prevent defects. How would you explain the distinction between QA and QC responsibilities to your boss?

- Quality Assurance (QA)
Main objective of quality assurance is to prevent defects and mistakes

- Quality Control
Main goal of quality control is to fix defects after first identifying them.

5.Difference between Manual and Automation Testing?

- Manual testing
         Manual testing is the testing of software that is performed to find bugs in software applications under development without taking the help of an automation testing tool.
It took more time to complete.

- Automation Testing
Automated testing is a process in which testers create test scripts by writing code to automate test execution. We can complete testing an application faster then manual testing.
Compressing and Decompressing User Permissions with JavaScript
Tags: engineering, javascript, auth, bitwise
Published: 2024-01-03 17:34:07

---
title: Compressing and Decompressing User Permissions with JavaScript
published: true
description: compressing and decompressing user permissions to include the compressed permissions in an auth token
tags: engineering, javascript, auth, bitwise
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2024-01-03 17:31 +0000
---


User permissions are an essential part of any application’s security model. One major use case for compressing and decompressing user permissions is to include the compressed permissions in an authentication token. 

When a user login and obtained the access token, you can attach their permissions to the token.

```
Compressed: 3963n
Decompressed: 
{
  forms: [1, 2, null, 4],
  users: [5, 6, 7, null],
  archive: [9, 10, 11, 12],
}
```

[READ MORE WITH CODE IMPLEMENTATION](https://kamesh.xyz/posts/compress-user-permissions/)