teleren/devto huggingface dataset:
Introducing DORA the DevOps Engineer
Tags: dora, devops, metrics
Published: 2022-09-05 20:19:43

---
title: Introducing DORA the DevOps Engineer
published: true
date: 2022-03-07 00:00:00 UTC
tags: dora,devops,metrics
canonical_url: https://jhall.io/archive/2022/03/07/introducing-dora-the-devops-engineer/
---

The book [_Accelerate_](https://amzn.to/3tBNWJ7) summarizes the several years of DevOps research done by the [DevOps Research and Assessment (DORA)](https://cloud.google.com/blog/products/devops-sre/the-2019-accelerate-state-of-devops-elite-performance-productivity-and-scaling) team, up to 2018, and provided us with four key metrics that are shown to indicate performance of a software development team.

For those of you who have not read the book, I want to introduce these four metrics, often called simply the [“DORA metrics”](https://cloud.google.com/blog/products/devops-sre/using-the-four-keys-to-measure-your-devops-performance):

- **Deployment Frequency** — How often an organization successfully releases to production
- **Lead Time for Changes** — The amount of time it takes a commit to get into production
- **Change Failure Rate** — The percentage of deployments causing a failure in production
- **Time to Restore Service** — How long it takes an organization to recover from a failure in production

Do you know how your team is performing across these four areas?

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
Custom Clojure helpers in your REPL
Tags: clojure
Published: 2022-03-14 15:43:11

---
title: Custom Clojure helpers in your REPL
published: true
date: 2022-03-07 00:00:00 UTC
tags: clojure
canonical_url: https://www.lafuente.me/posts/clojure-setup
---

## The problem [#](#the-problem)
 

Over time, I wrote several Clojure helper functions I use while I'm writing new code. I want to load those helpers every time I start a Clojure REPL. How can I make those helpers available in any Clojure project I'm working on? Especially in 3rd party projects I don't control.

 
## The solution [#](#the-solution)
 

Traditionally, Clojure developers put development utilities in a `user.clj` file, since Clojure automatically loads any `user.clj` found in the classpath. In recent Clojure versions, Clojure CLI was introduced, and now we can call any Clojure function from the command line. Knowing that, a better alternative is to move all our helpers to their own project, and to create an alias in our `~/.config/clojure/deps.edn` for those utilities.

 

As an example, let's suppose this is the main file for my helpers project:

 
```clojure
(ns local-utils)

(defn init
  [{:keys [main]]
  (println "Loading helpers...")
  (load-file main))
```

 

We can add an alias in our `deps.edn` file:

 
```clojure
{:aliases
 {:user {:exec-fn local-utils/init
         :extra-deps {me.lafuente/clj-dev-utils {:local/root "$HOME/projects/clj-dev-utils"}}}}}
```

 

Now, in any project, we can do `clj -X:foo:bar:user :main "path/to/main.clj"`. In this example, we are just printing a message before loading the main entry point, but we can do whatever we want.

 

My personal Clojure helpers are here: [https://github.com/jlesquembre/clj-dev-utils](https://github.com/jlesquembre/clj-dev-utils)

 

My `init` function loads some helper utilities, initializes [portal](https://github.com/djblue/portal), enables [malli](https://github.com/metosin/malli) instrumentation (if present in the classpath) and starts a [nREPL](https://nrepl.org/) server. We can also provide the main function to be loaded.

 

A library I'm using for my helpers is [https://github.com/gfredericks/dot-slash-2](https://github.com/gfredericks/dot-slash-2) With it, I can create aliases under the `.` namespace. For example, `./sh` points to `clojure.java.shell/sh`. The `.` namespace is loaded automatically, so I can evaluate `(./sh "ls")` in any file without an explicit `require`
Five Year Badge
Published: 2022-03-06 22:50:21

> Congratulations, You received the Five Year Club badge!

![Five Year Club badge, A five to celebrate being a DEV member for five years.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o9t8fm3omzdtt1weikh6.png)

> This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least five years.*

> Happy DEV Community birthday! Can you believe it's been 5 years already? 

It doesn't feel like five years. Maybe because, for most of it I was lurking, reading, and learning. I didn't start posting till 2020. The pandemic halted in person meetups so I turned to bogging to "stay out there."

I blog to build in public and share with other developers. I haven't posted lately. I need to write another CSS or JavaScript post. There's a few tricks I'd like to share. I have a few drafts in progress I just need to flesh them out.
 
Thank you to everyone that follows and supports me.
INTRODUCTION TO CSS
Tags: webdev, css, beginners, programming
Published: 2022-03-06 22:42:46


CSS (Cascading Style Sheets) is a style sheet language for expressing how a document created in a markup language like HTML looks.
CSS is a stylesheet language that allows you to separate presentation from content, including layout, colors, and fonts.
This separation can improve content accessibility, provide more flexibility and control in the specification of presentation characteristics, enable multiple web pages to share formatting by specifying the relevant CSS in a separate.css file, reducing complexity and repetition in the structural content, and enable the.css file to be cached to improve page load speed between the pages that share the file and its formatting.
Selectors are used in CSS to target HTML components that we want to customize on our web pages. CSS selectors come in a range of shapes and sizes, providing for fine-grained precision when styling elements.
###SELECTOR
The first portion of a CSS Rule is a CSS selector. It's a set of items and words that tells the browser which HTML elements should be chosen to have the CSS property values from the rule applied to them.
The subject of the selector refers to the element or items that are selected by the selector.
###PSUEDO SELECTOR
Pseudo-classes are what they sound like.
A pseudo-class is used to define an element's particular status.
It can, for example, be used to:
When a user hovers their mouse over an element, it is styled.
Visited and unvisited links are styled differently.
When an element receives a lot of attention, it's time to style it.
Examples of Psuedo Classes include Dynamic Pseudo-classes i.e link, visited, hover, active and focus. Pseudo-classes for UI elements: enabled, disabled ,checked

##Shorthand CSS properties
CSS shorthand properties allow you to set the values of numerous other CSS properties at the same time. You can save time and energy by writing more brief (and frequently more readable) style sheets by using a shorthand attribute.
Shorthand properties are defined in the CSS specification to gather together the definitions of similar properties that function on the same subject. For example, the CSS background property is a shortcut for background-color, background-image, background-repeat, and background-position. Similarly, the shorthand font may be used to specify the most common font-related characteristics, and the margin shorthand can be used to define the different margins around a box.
Edge cases are tricky.
Hello World: Stuck
Tags: helloworld, esolang, stuck
Published: 2022-03-06 22:08:01

---
title: "Hello World: Stuck"
published: true
description: "Writing \"Hello, World!\" without writing any code at all?"
tags: helloworld, esolang, stuck
series: Hello World
canonical_url: https://viviandai.hashnode.dev/hello-world-stuck
---

Let's start off the series with [Stuck](https://esolangs.org/wiki/Stuck), a language where an empty file will output "Hello, World!"

## Code
```stuck
```
That's it, no code. An empty file in Stuck will print "Hello, World!".

## How Does This Work?
We can take a look at the Github repository for Stuck and check out the source code.

{% embed https://github.com/kade-robertson/stuck %}

In the [`stuck.py`](https://github.com/kade-robertson/stuck/blob/master/stuck.py) file, we can check out the main function:

```python
def main():
    if len(sys.argv) < 2:
        while True:
            prog = raw_input("stuck > ")
            if prog == 'plugin':
                r=import_modules('plugins')
                for k in r:
                    print '%s - Version %s - By %s\n   %s'%(r[k].NAME, r[k].VERSION, r[k].CREATOR, r[k].DESCR)
            elif prog == '':
                print 'Hello, World!'
            else:
                process(prog, stack=[], t=0, nest=0)
    else:
        if sys.argv[1].split('.')[-1] == 'stk':
            f = open(sys.argv[1], 'r')
            prog = f.read()
            if prog == 'plugin':
                r=import_modules('plugins')
                for k in r:
                    print '%s - Version %s - By %s\n   %s'%(r[k].NAME, r[k].VERSION, r[k].CREATOR, r[k].DESCR)
            elif prog == '':
                print 'Hello, World!'
            else:
                process(prog, stack=[], t=0, nest=0)
        else:
            print 'Usage: python',__file__.split('/')[-1],'program.stk'
```
Do you see it? 
```python
elif prog == '':
           print 'Hello, World!'
```
The Stuck interpreter will print "Hello, World!" when the file is empty.

## Conclusion
Esolangs are fun and help solidify an understanding of computers and programming. Stay tuned for the next language!
Programming Languages And Their Purpose
Tags: programming, beginners, codenewbie
Published: 2022-03-06 22:06:47

In this blog you can find out the purpose of some of the major languages. This is just so beginners can get their head around the purpose.

With that said the languages we will discuss are:
- C++
- Java
- JavaScript
- Python

## C++

C++ is a powerful general-purpose programming language. It can be used to develop operating systems, browsers, games, and so on. C++ supports different ways of programming like procedural, object-oriented, functional, and so on. This makes C++ powerful as well as flexible.

## Java

The Java programming language was developed by Sun Microsystems in the early 1990s. Although it is primarily used for Internet-based applications, Java is a simple, efficient, general-purpose language. Java was originally designed for embedded network applications running on multiple platforms. It is a portable, object-oriented, interpreted language.

## JavaScript

JavaScript is a text-based programming language used both on the client-side and server-side that allows you to make web pages interactive. Where HTML and CSS are languages that give structure and style to web pages, JavaScript gives web pages interactive elements that engage a user. Common examples of JavaScript that you might use every day include the search box on Amazon, a news recap video embedded on The New York Times, or refreshing your Twitter feed.  

Incorporating JavaScript improves the user experience of the web page by converting it from a static page into an interactive one. To recap, JavaScript adds behavior to web pages.

JavaScript is mainly used for web-based applications and web browsers. But JavaScript is also used beyond the Web in software, servers and embedded hardware controls.

## Python

Python is a computer programming language often used to build websites and software, automate tasks, and conduct data analysis. Python is a general purpose language, meaning it can be used to create a variety of different programs and isn’t specialized for any specific problems. This versatility, along with its beginner-friendliness, has made it one of the most-used programming languages today. A survey conducted by industry analyst firm RedMonk found that it was the most popular programming language among developers 2021.

Python is commonly used for developing websites and software, task automation, data analysis, and data visualization. Since it’s relatively easy to learn, Python has been adopted by many non-programmers such as accountants and scientists, for a variety of everyday tasks, like organizing finances.

“Writing programs is a very creative and rewarding activity,” says University of Michigan and Coursera instructor Charles R Severance in his book Python for Everybody. “You can write programs for many reasons, ranging from making your living to solving a difficult data analysis problem to having fun to helping someone else solve a problem.”
OpenLiteSpeed VS Nginx honest comparison.
Tags: proxys, nginx, openlitespeed, opensource
Published: 2022-03-06 21:46:04

_There is a lot of debate within the community about these web servers, both containing there own benefits and downsides which I will cover here._

## Features
Let’s explore the different features of the two web servers.

### OpenLiteSpeed
- Has a web GUI for configuration (all settings can be configured here)
- Configurations made easy for non-technical users via there web GUI
- Lower server costs due to minimal resource usage
- Easy to configure security rules for anti-ddos and anti-bots protection.

### Nginx
- Faster performance when cache is disabled (There is no reason you would ever want to disable cache anyway)
- Configuration using config files
- Good enterprise services available and support

Looking at these features, overall OpenLiteSpeed wins for there wide base of features built in and the overall ease of use for non-technical users who are not experienced with the command line. But what about performance, let’s get some metrics.

## Installs

### OpenLiteSpeed
Installing OpenLiteSpeed is as easy as running this script:
`bash <( curl -k https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh )`

### Nginx
Installing Nginx is as easy as running this script:
`sudo apt install nginx`

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

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

These results so show OpenLiteSpeed as the winner by a tiny amount, but when looking side by side they do perform pretty similar.

## DDoS Protection
Both OpenLiteSpeed and Nginx have built in DDoS protection features:
- Global ReCaptcha Support (Installed externally on Nginx but built in on OpenLiteSpeed)
- Worker Settings for connections
- Rate limit settings
Both withstand pretty well against attacks (with cache enabled or not) but personally I would suggest setting up something like CloudFlare or some DDoS protection service for your site to take the load of your server.  


## Final verdict
The final verdict, this all comes down to personal preference some users will prefer the web GUI but others will prefer using the command line. They both have compelling features, great support and community forums. When choosing your first webserver, I would personally suggest using OpenLiteSpeed it’s very easy to install, easy to setup with great documentation and has most features built in to the dashboard.
Getting back to the right route
Published: 2022-03-06 21:02:00

Hello everyone,

This month I finally started working on the project, which  goal is to build a webapp that will exchange data with an external application. 

The Tech Stack is Java JEE, MySql, Wildfly, REST.

In the kickoff meeting with the subject matter experts and the IT Architect, I only gathered the functional requirements. 
After that, I realized that I was still asking questions as an analyst and not as a developer and the questions about non-functional requirements were not covered. I also realized that learning new technologies or refreshing software development skills is not enough to be in front of the computer and code. I talked to an experienced developer who gave me some hints to help me think again as a coder. 

I listed things I need to do to help me with this project:

- Admit that this code is practice and I had not been involved with it for very long. So I need to be patient with the learning curve and also be able to handle it in the time I will be stuck with some code problem.

- Organize the task to be done (functional and non-functional requirements) before sitting in front of the computer to code.

- Learn the knowledge and try to implement it as quickly as possible.

- Be involved in development forums.

- Sharing/writing what has been learned. I created an account on Confluence to write my own tutorials.

- Going to code review meetings.




Photo by cottonbro from Pexels
Add multi-language support for telegram bot on NestJS
Tags: kaufmanbot, nestjs, languages, multi
Published: 2022-03-06 20:47:27

A lot of changes, I didn’t copy and paste the whole process, I’ll just give a link to the commit, everything is there.

## Links

https://github.com/EndyKaufman/kaufman-bot/commit/641320a74c27e74e46d7da31fbf64348a8978384 - commit with current changes

https://telegram.me/DevelopKaufmanBot - current bot in telegram

## Significant changes:

1. Added a new lib for switching languages ​​LanguageSwitherModule
2. Updated old libs and added support for multiple languages
3. Moved general things about processing commands into a separate module

![Significant changes](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f1jc68dbi6ades74vvz8.png)

## Screenshots with new logic

![Screenshots with new logic](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vjrpzjwho7c6qvk2a03w.png)

In the next post there will be instructions on how to add new dictionaries with translations...
CRUD API in 3 lines using NestJS
Tags: api, backend, javascript, node
Published: 2022-03-07 09:07:00

---
title: CRUD API in 3 lines using NestJS
published: true
date: 2022-03-06 20:37:54 UTC
tags: api,backend,javascript,nodejs
canonical_url: https://itnext.io/crud-api-in-3-lines-using-nestjs-692df3d61160
---

![](https://cdn-images-1.medium.com/max/1024/0*4k1eivsvVupse7fG)
_Photo by Kier In Sight on Unsplash_

If it sounds like a clickbait, looks like a clickbait and smells like a clickbait, it must be… well it’s not.

Here are the 3 lines to create a webserver with a crud api for a candy store which sell chocolate

![](https://cdn-images-1.medium.com/max/1024/1*UWhmT7hxZP3t1K1X7FVyJQ.png)

I admit it’s not a full application, but If you look closely, I said an API.

### Why did I write this article ?

Working with NestJS is super nice. It has an opinionated structure (that you can like or dislike), but you have to agree, it reduces a lot of the time wasted tinkering on directories structure, setting up tests, routes, database connections and so on, everything is solved for the average use case.

It even comes with a great extendable CLI to facilitate everything using generators.

But even with the CLI, every time I needed some kind of boiler plate code for a crud API I had to do the same stuff. Create a module, controller and a service.

> nest g module chocolate

> nest g controller chocolate

> nest g service chocolate

Then I had to add the crud APIs which are the same for each resource. And finally, If I’m really committed, I had to have some DTOs and Entities definitions.

Even before I wrote any actual logic related to my application, I had to do all of that. So the generators are amazing, but not enough.

But I was wrong! there are more generators, mainly the **resource** generator

Using the following line of bash

> nest g resource chocolate

I get EVERYTHING done for me in one command!

![](https://cdn-images-1.medium.com/max/1024/1*wXYkLbaP9XUwZI6DLfo8Uw.png)
_All resources created using generators_

References:

[Documentation | NestJS - A progressive Node.js framework](https://docs.nestjs.com/recipes/crud-generator)

* * *
CSS Flex and Grid( Wired Part)
Tags: css
Published: 2022-03-06 20:29:56

Flex layout is a flexible box layout and is used for setting the length of flexible items and making complex layouts. Using flex layout we can align, items very easily.  Flex layout is very responsive. Flex property stands for flex-grow, flex-shrink, flex-basis.
Difference between flex and grid: 

1. Flex is a one-dimensional layout on the other hand grid is a two-dimensional layout with row and column

2. flex is designed for small-scale layout and the grid is designed for larger-scale layout.

3. Flexbox can be controlled well than Grid
Flex direction can be controlled vertically and horizontally But Grid automatically adjusts column and row.
List of Github Commands
Tags: github, git, webdev, beginners
Published: 2022-03-06 20:28:19

GitHub is a code management, code hosting platform for version control and collaboration. It lets you and your team work together on projects from anywhere. Here is a list of github commands which you can use to manage your code and repositories.

```ssh
git config –global user.name “[firstname lastname]”

git config –global user.email “[valid-email]”

git config –global color.ui auto

git init

git clone [url]

git status

git add [file]

git reset [file]

git diff

git diff –staged

git commit -m “[descriptive message]”

git branch

git branch [branch-name]

git checkout

git merge [branch]

git log

git log branchB..branchA

git log –follow [file]

git diff branchB…branchA

git show [SHA]

git rm [file]

git mv [existing-path] [new-path]

git log –stat -M

logs/
.notes
pattern/

git config –global core.excludesfile [file]

git remote add [alias] [url]

git fetch [alias]

git merge [alias]/[branch]

git push [alias] [branch]

git pull

git rebase [branch]

git reset –hard [commit]

git stash

git stash list

git stash pop

git stash drop
```
Please like share and give positive feedback to motivate me to write more.

For more tutorials [visit my website](https://www.w3courses.org/tutorials/).

Thanks :)
Happy Coding :)
Nevertheless, Kavisha Continued Coding!
Tags: wecoded, breakthebias
Published: 2022-03-06 20:10:44


```
            A very happy International Women's Day, 2022! 
```

I’ve been a member of the DEV Community since 2020 and this is the second time, I've shared my story with SheCoded.

## My biggest technical goal is…
to contribute more in open source and expand my knowledge and skills to understand programming memes 😉😂



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

## My biggest technical achievements are…

- 
Participating for Hacktoberfest 2021 and contribute in open source 
- 
Completing Pearson BTEC HND in Computing 

- 
Started doing TOP UP degree at London Met University 


![Convocation 2021](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/36ul06fz8lw0xn48h812.jpg)

## Advocating for myself looks like…
Setting healthy boundaries, making space for my feelings, asking for help when needed, developing self-love and self care routines, allowing myself to express emotions and start coding

## I’m excited about…
future me


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

## My advice for allies to support underrepresented folks who code is...
Create the space you want to be. Create the future you want to see and ensure that everyone gets their voice heard in a positive environment.

```
                          Happy Coding! 👩‍💻 
```