teleren/devto huggingface dataset:
What is Ubiquitous Language?
Tags: bestpractices, domaindrivendesign
Published: 2022-12-26 18:29:42

---
title: What is Ubiquitous Language?
published: true
date: 2022-10-05 04:00:56 UTC
tags: bestpractices,domaindrivendesign
canonical_url: https://mindsers.blog/post/what-is-ubiquitous-language/
---

The _ubiquitous language_ is a concept that is based on the fact that the different actors of a project need a common language that allows them to understand the data model without ambiguity and approximation in order to be able to work _correctly_ together.

***⚠️ Read more of my blog posts about tech and business [on my personal blog](https://mindsers.blog/)! ⚠️***

In a project team as we understand it here, there are all the people likely to participate in the development of an application. We will therefore find developers and architects, but also users and business experts: as many technical and non-technical profiles. As a result, this often results in misunderstandings related to the terms used to designate the different elements of our model.

The heart of my application is its data model. The data model is business-based. **The business is not mastered by the developers or the architects** , but by the business experts, who are generally the customers.

This is why it is critical to agree between the production team and the business team on the terms to be used in the model and the code. The best thing is to discuss, argue and define the terms belonging to the ubiquitous language at the beginning of the design phase in order to be able to apply it to the data model and to use it in the code of the application. **The code produced will thus be much more expressive.**

When a developer talks about the data model and business rules, business experts and even users need to be able to understand exactly and unambiguously what is being said.

Ideally, it should be possible to present the data model of the application to a person totally outside the project, with a non-technical profile: this person must understand how the application works.
Usefull functions in python pandas 🐼
Tags: python, programming, algorithms, machinelearning
Published: 2022-10-05 03:59:00

******head(n) and tail(n)**
The head🧠 and tail function is used to give you a quick look at the dataframe by printing some of its values.
By default, the head function shows the first 5 rows, and tail() shows the last 5 rows of the DataFrame.
The n in the arguments is the total number of rows you want to print.
`df = pd.read_csv('Elections.csv') # displaying first 5 rows print (df.head())`


**df.isnull().sum()**
isnull().sum() returns how mach NULL values are present in a columns.
`df.isnull().sum()`


**df.count(0)**
It returns the number of data in the DataFrame in the specified direction. When the direction is 0, it provides the number of data in the columns.
`print(df.count(0))`


**df['col'].value_counts()**
We can get the value counts of each category using this function.
`df['Year'].value_counts()`


**df.['columns'].unique()**
It is used to find out the unique values of a categorical column.
`df['Year'].unique()
array([2020, 2018, 2016, 2014, 2012, 2010, 2008, 2006, 2004, 2002, 2000, 1998, 1996, 1994, 1992])`


**df.nunique()**
This function lets you know how many
unique values you have in a column. The great thing is, this function can be used on the total dataset as well to know the number of unique values in each column.
`df.nunique()` 
`#or df['Year'].nunique()`

**df.iloc[rows, columns]**
This function takes as a parameter the rows and column indices and gives you the subset of the DataFrame accordingly.
`# 5 rows of 1 and 2 column, 3 is excluded
 df.iloc[:5,1:3]`


**df.loc[rows, columns]**
This function does almost the similar operation as .iloc() function. But here we can specify exactly which row index we want and also the name of the columns we want in our subset.

`#returns 1, 2, 3 and 5th row of Year and` 
`# Office column `
`df.loc[[1, 2, 3, 5], ['Year', 'Office']]`
I create a tool for helping me generate the API document from test cases
Tags: node, showdev, productivity, tooling
Published: 2022-10-05 03:46:31

Writing an API document is something I hate, and writing an OpenAPI document from scratch is a nightmare.

I checked some auto-api-generation tools and they all need me to modify my codes by adding comments or decorators. I personally don't like it because I wanna keep my code as clean as possible.

Then I was thinking if we could generate an API document based on the unit test because usually the unit test covers all cases of the API, we just need a program to understand the test cases and generate the API document.

So I build Outdoc and here is an example for an express application:

**app.js**
```js
const express = require('express');
const app = express();

app.get('/projects', (req, res) => {
  res.json([{
    id: '1',
    name: 'project v1'
  }, {
    id: '2',
    name: 'project v2'
  }]);
});
```

**app.test.js**
```js
const request = require('supertest');
const app = require('./app.js');

describe('api testing', () => {
  it('should able to find all', (done) => {
    request(app)
      .get('/projects')
      .set('x-api-key', 'outdoc-test')
      .expect(200)
      .end(function(err, res) {
        if (err) throw err;
        done();
      });
  });
});
```

For using Outdoc, we simply add a few codes into app.js and run the script.

**app.js**
```js
const express = require('express');
const app = express();

// New added for using Outdoc
if (process.env.NODE_ENV === "test") {
  const { OutDoc } = require('outdoc');
  OutDoc.init();
}
```

**package.json**
```json
{
  "scripts": {
    "test": "mocha *.test.js",
    "gen-doc": "outdoc npm test"
}
```

By running `npm run gen-doc`, we get an **api.yaml** as the following
```yaml
openapi: "3.0.1"
info:
  title: "API Document"
  version: "1.0.0"
paths:
  /projects:
    get:
      parameters:
        - in: "header"
          name: "x-api-key"
          example: "outdoc-test"
          schema:
            type: "string"
      responses:
        200:
          description: "OK"
          content:
            application/json:
              schema:
                type: "array"
                items:
                  type: "object"
                  properties:
                    id:
                      type: "string"
                      example: "1"
                    name:
                      type: "string"
                      example: "project v1"
```

Outdoc can also auto generate tags for multiple endpoints. 

Check more options and examples in Github https://github.com/dapi-labs/outdoc
Installing Hadoop single node cluster in AWS EC2
Tags: hadoop, aws, datalake
Published: 2022-10-05 03:36:48

Ubuntu 18, m3.large, memory 8GB

Install openjdk(Not JRE) 

`sudo apt-get install openjdk-8-jdk`

Get the Hadoop 2.9.0
`wget https://archive.apache.org/dist/hadoop/core/hadoop-2.9.0/hadoop-2.9.0.tar.gz`

Extract Hadoop in home folder

`tar -xvf hadoop-2.9.0.tar.gz`

Create folder for Hadoop

`sudo mkdir /usr/lib/hadoop`

Move extracted Hadoop folders to /usr/lib/hadoop

`mv hadoop-2.9.0 /usr/lib/hadoop/`

Find the JDK 8 path and note down as following

`EXPORT=/usr/lib/jvm/java-1.8.0-openjdk-amd64`

Open ~/.bashrc and put the above line at the end of thee file.

`EXPORT=/usr/lib/jvm/java-1.8.0-openjdk-amd64`

Load the env environment

`source ~/.bashrc`

Generate SSH

`ssh-keygen -t rsa`

`cd ~`

`sudo .ssh/id_rsa.pub >> .ssh/authorized_keys`

`ssh-copy-id -i .ssh/id_rsa.pub ubuntu@localhost`

Create hadoopdata folder in home directory
`cd ~`

`mkdir hadoopdata`

Go to xml files

`cd /usr/lib/hadoop/hadoop-2.9.0/etc/hadoop`

core-site.xml

```xml
<configuration>
    <property>
        <name>fs.defaultFS</name>
        <value>hdfs://localhost:9000</value>
    </property>
</configuration>
```

hdfs-site.xml

```xml
<configuration>
    <property>
        <name>dfs.replication</name>
        <value>1</value>
    </property>
  <property>

 <name>dfs.namenode.name.dir</name>

 <value>/home/ubuntu/hadoopdata/hdfs/name</value>

 </property>

 <property>

 <name>dfs.datanode.data.dir</name>

 <value>/home/ubuntu/hadoopdata/hdfs/data</value>

 </property>
</configuration>
```
mapred-site.xml

```xml
<configuration>
 <property>

 <name>mapreduce.framework.name</name>

 <value>yarn</value>

 </property>
</configuration>
```

yarn-site.xml
```xml
<configuration>

<!-- Site specific YARN configuration properties -->
 <property>

 <name>yarn.nodemanager.aux-services</name>

 <value>mapreduce_shuffle</value>

 </property>

 <property>

 <name>yarn.nodemanager.auxservices.mapreduce.shuffle.class</name>

 <value>org.apache.hadoop.mapred.ShuffleHandler</value>

 </property>
</configuration>
```

Format the name node
`hdfs namenode -format`

Go to sbin directory of hadoop :
`cd $HADOOP_HOME/sbin`

Start the name node
`./hadoop-daemon.sh start namenode`

Start HDFS components
`./start-dfs.sh`

Stop all 
`./stop-all.sh`

Start all
`./start-all.sh`

Then access the web ui for Hadoop in following webpages.

NameNode – aws_ip_address: 50070

DataNode – aws_ip_address: 50075

SecondaryNameNode – aws_ip_address: 50090

ResourceManager –  aws_ip_address: 8088

In the next tutorial, we will install sqoop.
https://dev.to/zawhtutwin/installing-sqoop-on-hadoop-14n8
Blue/Green Deployments
Tags: kubernetes, tutorial
Published: 2022-10-05 02:30:41

## Introduction

A blue/green deployment involves deploying the new application version (green) alongside the old (blue).

A load balancer in the form of a Service Selector object is used to test and redirect traffic to
the new application (green) instead of the old one when verified.

Blue/Green deployments can prove costly due to the need to sustain twice the amount of application resources for the duration of the deployment.

To start this, we set up a service that sits in front of deployments.

For example, the service selector section of the manifest file for a blue deployment for an app called web-app with v1.0.0 looks like this:
```
Type: Service
Metadata:
 Name: web-app-01
 Labels:
   App: Web-app
Selector:
   App: Web-app
   Version: v1.0.0
```
And the deployment for Blue Web App:

```
Type: Expansion
Metadata:
  Name: web-app-01
Specification:
  Template:
        Metadata:
           Labels:
             App: Web-app
             Version: "v1.0.0"
```
When we want to redirect traffic to the new (green) version of the app, 

we update the deployment file to point to the new version v2.0.0.

```
Type: Service
Metadata:
 Name: web-app-02
 Labels:
   App: Web-app
Selector:
   App: Web-app
   Version: v2.0.0
```
Expansion for Green App:

```
Type: Expansion
Metadata:
  Name: web-app-02
Specification:
  Template:
        Metadata:
           Labels:
             App: Web-app
             Version: "v2.0.0"
```

Thank you for reading my blog. If you like my work feel free to connect me on <a target = "_blank" href= "https://www.linkedin.com/in/krishnamohanyerrabilli"> LinkedIn </a> or <a target = "_blank" href= "https://www.twitter.com/K_Mohan_">Twitter</a>, see you with another one guys.
SOLID Principles Sketches
Tags: javascript, webdev, programming, beginners
Published: 2022-10-05 00:45:15

I've recently launched the minimalistic drawing app [okso.app](https://okso.app/) that allows you to do interactive (nested) sketches. And, as a continuation of my previous [S.O.L.I.D. Principles Around You](https://dev.to/trekhleb/s-o-l-i-d-principles-around-you-1o17) article, I've organised it in [interactive sketches](https://okso.app/showcase/solid) that you may find [here](https://okso.app/showcase/solid).

Check what I've got:

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

So, each SOLID principle has a dedicated sketch page that look like the following

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

## Single Responsibility Principle

[SRP Sketch](https://okso.app/showcase/solid/page/924000bf-21ec-4580-36f4-49ee920abe55)

A class should have only a single responsibility. Only one potential change in the software’s specification should be able to affect the specification of the class.

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

## Open/Closed Principle

[OCP Sketch](https://okso.app/showcase/solid/page/f297d650-5343-4423-39b9-6a1dbb21e5df)

Software entities should be open for EXTENSION, but closed for MODIFICATION. Allow behavior to be extended without modifying the source code.

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

## Liskov Substitution Principle

[LSP Sketch](https://okso.app/showcase/solid/page/2899b427-2bd8-4899-16a7-0ce855331ba2)

Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.

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

## Interface Segregation Principle

[ISP Sketch](https://okso.app/showcase/solid/page/5464baff-5793-482a-0dfa-bab4337fe3ed)

Many client-specific interfaces are better than one general-purpose interface. No client should be forced to depend on methods it does not use.

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

## Dependency Inversion Principle

[DIP Sketch](https://okso.app/showcase/solid/page/70a27e39-47db-4ada-2065-f023372e1933)

One should depend upon abstractions, not concretions.

- High-level modules should not depend on low-level modules. Both should depend on abstractions.
- Abstractions should not depend on details. Details should depend on abstractions.

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

> In the future I plan to add more visual explainers like this one to the [okso.app showcase](https://okso.app/showcase). Currently there is a [Data Structures](https://okso.app/showcase/data-structures) sketch is available that is done in a similar style as SOLID one. I hope having such visual explainers in one place will be convenient for you.
Fundamentals in JavaScript
Tags: tutorial, javascript, webdev, programming
Published: 2022-10-05 00:28:47

## What is JavaScript?
 
JavaScript is a dynamic computer programming language. [(1)](https://www.tutorialspoint.com/javascript/javascript_overview.htm)

JavaScript is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. 
![Tech Stack for Web Development](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/derjb49x078vwdfhftpq.png)As of 2022, 98% of websites use JavaScript on the client side for webpage behavior, often incorporating third-party libraries. All major web browsers have a dedicated JavaScript engine to execute the code on users' devices. [(2)](https://en.wikipedia.org/wiki/JavaScript#Other_usage)

JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with [first-class functions](https://developer.mozilla.org/en-US/docs/Glossary/First-class_Function). [(3)](https://developer.mozilla.org/en-US/docs/Web/JavaScript)

According to MDN, in another definition, JavaScript is a programming language that allows you to implement complex things on web pages. 

Every time a web page does more than just sit there and display static information for you to look at—displaying timely content updates, interactive maps, animated 2D/3D graphics, scrolling video jukeboxes, or more—you can bet that JavaScript is probably involved. [(4)](https://developer.mozilla.org/en-US/docs/Learn/JavaScript)

JavaScript is a high-level, often just-in-time compiled language that conforms to the ECMAScript standard.[10] It has dynamic typing, prototype-based object-orientation, and first-class functions. It is multi-paradigm, supporting event-driven, functional, and imperative programming styles. It has application programming interfaces (APIs) for working with text, dates, regular expressions, standard data structures, and the Document Object Model (DOM). [(5)](https://en.wikipedia.org/wiki/JavaScript)
Introduction to Javascript
Tags: tutorial, javascript, webdev, programming
Published: 2022-10-05 00:10:56

## Why would I choose Javascript in the First Place?

I began learning Javascript about four (4) years now, but not until my 2 years into JavaScript do I begin to Truly Understand JavaScript.

JavaScript, as we generally know is greatly used by web developers to build functionalities into many developed websites and web applications.

What if I tell you that the application of JavaScript as a programming language goes beyond adding functionalities to websites and web applications?

JavaScript is a programming language that can do even more, such as developing an entire web application, developing API, serving as the programming language for Backend Development, developing desktop applications, building software solutions, and even much more.

Thanks to the developers of many engines, libraries, frameworks, and utilities in the JavaScript community. Implementing JavaScript to develop all of these isn't as difficult as it would have been in many other programming languages, such as PHP .

To really be able to understand JavaScript and use it effectively in building applications and functional web platforms, it will be important that we ground ourselves in Truly Understanding the Fundamentals of JavaScript.
What's the story?
Tags: acceptancecriteria, userstories
Published: 2022-11-11 19:39:12

---
title: What's the story?
published: true
cover_image: https://jhall.io/images/bn-story-time.jpg
date: 2022-10-05 00:00:00 UTC
tags: acceptancecriteria,userstories
canonical_url: https://jhall.io/archive/2022/10/05/whats-the-story/
---

> As a user I want access to the database so that I can access the database.

I expect we’ve all seen some really, really bad user stories like this.

I’ll bet you have a good feeling why it’s a bad user story, too, right? It’s too vague.

Well, it is vague. And that probably does make it a bad user story.

But there’s something more fundamental that makes this a bad user story. It’s the same thing that makes _most_ user stories bad user stories.

Namely: **It’s not a story!**

The Mad Lib format of user stories is supposed to help us formulate good user stories.

> As a \_\_\_\_, I want to \_\_\_, so that I can \_\_\_\_.

But in my humble opinion, this format has utterly failed. It’s far too easy to fill in this form with something grammatically correct, but essentially worthless.

User stories exist to start a conversation about how to solve a user’s problem. If your user story isn’t doing that, it’s not a good user story. No matter the format.

This means that even the most detailed Jira ticket can be a bad user story.

So my advice about user stories is to forget the format, and instead ask the question: Do you understand the user’s intention and motivation?

Without that, the format is irrelevant. Without that, detailed acceptance criteria is irrelevant.

What is the user’s goal? How can you help them achieve it?

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
How to be more Efficient & Consistent in your Career as a Software Developer
Published: 2022-10-04 22:47:30

As a Software Developer, there are times when we feel lost and have the feeling that we are not as good as others. First of all, having this kind of feeling when you enter the software industry as a fresher is very normal. We look at our seniors who are in the software industry for some time and we feel that we are not good and efficient as them.

We should embrace this feeling. Here are some points from my experience that can help other people.

1) **Have a growth mindset** - 

You cannot become a better Software Developer if you don't have a growth mindset. There is a lot to learn in the software industry. Having the curiosity to figure out things, search on the internet, looking into the documentation or the source code and debugging things on your own will help you to learn a lot and progress steadily.

2) **Reaching out to senior developers** - 

There are times when we feel that if we ask a certain question to someone senior than us, than they would laugh at us or think that we don't know this concept. But asking question is important. Don't be hesitant in asking questions in the initial stages of your career so that you can progress faster.

3) **Learning by doing** -

Most of the freshers do this mistake of getting stuck in the tutorial hell and when it comes to actually implementing something, they fail. Instead, start working on some project, don't try to figure out everything in the beginning. Just start and as you develop some application, you will eventually figure out things on your own when you get stuck somewhere. We often make this mistake of trying to learn everthing in the beginning and then only we think of making some project, but because of this we always remain stuck and never progress. So get your hands dirty, start working on some projects and figure things out in the way.

4) **Documentation** -

Documentation is a very important thing for a developer. Always document your learning, your mistakes and your thought process for any problem or project that you are working on. It will help you better when you come back to revisit your work or to showcase to someone your skills and your learnings. Documentation will also help you to write clean and efficient code
Get The Most Out of PMI DUMPS and Face book
Published: 2022-10-04 07:42:25

Easy to Access and Understand PMI PDF Questions with PMI Dumps: We accept as true with in providing the excellent and excessive fine PMI PMI exercise take a look at questions which can be handy, intelligible, and clean to make **PMI Dumps** use of. We equip our customers with PMI dumps and assist them with good enough guidance to efficiently, use the PMI questions. Our Project Management Professional (2022 Version) PMI dumps pdf questions are the correct manner to get the pinnacle consequences withinside the PMI PMI. The PMI examination questions PDF may be, accessed on any tool due to the fact our PMI specialists make sure that everybody with any form of clever device can accumulate it. Clients also can touch us for assist to skip the PMI examination this is much like the up to date PMI pdf query and solutions. This is to present them an perception into what the actual PMI examination and the actual PMI PMI questions will appearance like. 
**
Click Here More Info >>>>> https://dumpsarena.com/vendor/pmi/**