teleren/devto huggingface dataset:
I tried Ansible-lint quickly
Tags: ansible
Published: 2020-02-16 13:05:32

I know Ansible-lint recently. I tried it right away and I think want to write a blog.Ansible-lint is a sentence structure check tool. By use it, we get beautiful playbook.
I write to introduce Ansible-lint right away.
```
pip install ansible-lint
pip list
>ansible-lint                           4.1.0
```
This is sample playbook.
```
- name: example
  action: ec2_metadata_facts
  when: production == True
- debug: var=ansible_ec2_instance_id
```
I got this result after I apply Ansible-lint to this playbook.
```
[601] Don't compare to literal True/False
roles/common/tasks/main.yml:3
  when: production == True
601 is error number. By reading this link, I can understand the error.
https://docs.ansible.com/ansible-lint/rules/default_rules.html
Use when: var rather than when: var == True (or conversely when: not var)
```
So, I fixed this playbook after I applied Ansible-lint. This playbook doesn't have an error and it was beautiful playbook.
I think adopt Ansible-lint in CI.
Daily Developer Jokes - Sunday, Feb 16, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-02-16 13:00:12

---
title: "Daily Developer Jokes - Sunday, Feb 16, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Sunday%2C%20Feb%2016%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e12595d30baa.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ How does a programmer open a jar for their significant other?

___A:___ They install Java
 -->
AWS CodeBuild DotNet Core
Tags: aws, codebuild, dotnet, core
Published: 2020-02-16 12:57:24

Goto *CodeBuild* services tab.
![Image01](https://github.com/mkokabi/images/blob/master/CodeBuild/image01-.png?raw=true)

Start with creating a build project:
![Image02](https://github.com/mkokabi/images/blob/master/CodeBuild/image02.png?raw=true)

Chose your source control management. Here we are selecting the one we created on another [post](https://dev.to/mkokabi/aws-codecommit-38p6) on *AWS CodeCommit*
![Image03](https://github.com/mkokabi/images/blob/master/CodeBuild/image03.png?raw=true)

Select the Environment as *Managed Image* and Operating as *Ubuntu* and Runtime as *Standard* and the latest image version.
After selecting the image the *Role name* would be generated like:
codebuild-{The build project name}-service-role

For instance in our sample:
codebuild-MohsenTestBuild-service-role

![Image04](https://github.com/mkokabi/images/blob/master/CodeBuild/image04-.png?raw=true)

Select *Insert build commands* and the click on *Switch to editor*.
![Image05](https://github.com/mkokabi/images/blob/master/CodeBuild/image05-.png?raw=true)

Edit *Buildspec* the *pre_build* and *build* sections as:
```yaml
  pre_build:
    commands:
      dotnet restore WebAppTest.csproj
  build:
    commands:
      dotnet build WebAppTest.csproj
```

Now start the build
![Image07](https://github.com/mkokabi/images/blob/master/CodeBuild/image07.png?raw=true)

Hit the *Start build*
![Image08](https://github.com/mkokabi/images/blob/master/CodeBuild/image08.png?raw=true)

The build should get successfully completed.
![Image09](https://github.com/mkokabi/images/blob/master/CodeBuild/image09.png?raw=true)

Note: Currently the AWS Code build doesn't support .Net Core 3.1. 

## Phase 2:
Now that the build is successful we can edit the build artifact settings:
![Image12](https://github.com/mkokabi/images/blob/master/CodeBuild/image12.png?raw=true)

And add a S3 bucket to the artifact. 

![Image10](https://github.com/mkokabi/images/blob/master/CodeBuild/image10.png?raw=true)

And also modify the build spec and add the artifact.
```yaml
  pre_build:
    commands:
      dotnet restore WebAppTest.csproj
  build:
    commands:
      dotnet publish -c release WebAppTest.csproj -o ./publish_output

artifacts:
  files:
    - ./publish_output/**/*
```
Now the build should ends with steps of copying the artifacts to S3.
![Image11](https://github.com/mkokabi/images/blob/master/CodeBuild/image11.png?raw=true)
What are the advantages/disadvantages of memory mapped files for a DBMS?
Tags: discuss, help
Published: 2020-02-16 12:45:05

Hi,

I'm developing a temporal Open Source data store[1] with features such as

  - the storage engine is written from scratch
  - completely isolated read-only transactions and one read/write transaction concurrently with a single lock to guard the writer. Readers will never be blocked by the single read/write transaction and execute without any latches/locks. Likewise the writer is not blocked by read-only transactions
  - variable-sized pages
  - lightweight buffer management with a "kind of" pointer swizzling
  - dropping the need for a write-ahead log due to atomic switching of an UberPage
  - rolling merkle hash tree of all nodes built during updates optionally
  - ID-based diff-algorithm to determine differences between revisions taking the (secure) hashes optionally into account
  - non-blocking REST-API, which also takes the hashes into account to throw an error if a subtree has been modified in the meantime concurrently during updates
  - versioning through a huge persistent and durable, variable-sized page tree using copy-on-write
  - storing delta page-fragments using a patented sliding snapshot algorithm
  - using a special trie, which is especially good for storing records with numerical dense, monotonically increasing 64 Bit integer IDs. We make heavy use of bit shifting to calculate the path to fetch a record
  - time or modification counter-based auto-commit
  - versioned, user-defined secondary index structures
  - a versioned path summary
  - indexing every revision, such that a timestamp is only stored once in a RevisionRootPage. The resources stored in SirixDB are based on a huge, persistent (functional) and durable tree 
  - sophisticated time travel queries

**I've read a bunch of stuff about memory mapped files, but I'm still not really sure in which cases a memory mapped file would be better and if I should map the whole file or just the potentially rather small page fragments.**

It seems MongoDB, LMDB and other data stores are super fast, because of memory mapped files among other stuff.

I think it would also drop the requirement to cache any page-fragments all-together.

In my case the files can get very big as I'm using an append-only paradigm without segment files.

So, besides that I want to better understand the impacts I wonder if I should map the whole file or just the page-fragment regions (however, they could be rather small due to fine granular storage -- maybe in some cases only a few hundred bytes).

Kind regards
Johannes

[1] http://sirix.io
Project Management, what is it?
Tags: project, projectmanagement, pm, projectmanager
Published: 2020-02-16 12:42:49

I was super exited this semester as Project Management was one of the units I was to undertake. I am currently a Third Year Student at [Multimedia University Of Kenya](https://www.mmu.ac.ke). This article outlines the clear understanding of what a project is, what a project entails and what project management is.

---

# What is A Project?
A project is a temporary undertaking that produces unique deliverables (product, services, etc.) using scarce resources.
> A project is done in progression and has an owner (stakeholder).

## Key Terms to note.
- Temporary - has a **start** and an **end**.
A project should have a start and an end. The team should decide the milestone the project should undertake.
- Unique - something new or novel to the owner.
A project should be something new that hasn't been created before by the owner.
- Resources - require resources from different areas but there is the primary owner and/or sponsor.
A project should utilize other resources or tools during creation of the product
- Progression - a project is done in steps.
Break down or decompose the project into small independent and manageable tasks. The tasks will be performed from start to the end.
- Uncertainty - a project is done with a certain level of uncertainty.
- Management - running something to be effective. Management has 3 parts:
  * Planning
  * Controlling
  * Scheduling 

### 1. Planning
Planning has 4 main things to be done
- Break down or decompose the project into small independent and manageable tasks. Work Break Down structure can be used, it helps in breaking down the project.     

> Independent - *Can be done on its own.*

- Determine the order or sequence in which the tasks will be performed from start to end.
- Estimate the resources (time, cost, materials, machines, personnel, etc) required to complete each task.
  * Use analogies method of estimation. 
  * Use past data to try and find what other people did
- Masterpiece plan of how the project will look like from start to the end.

> use network diagram. it is used to determine what to be done at what time.

### 2. Scheduling
Using the network diagram produce a master timetable of when each of the tasks will be done and by who. 
> use a [Gantt chart.](https://en.wikipedia.org/wiki/Gantt_chart)

### 3. Controlling.
Keep monitoring and evaluating the progress of the project by using the progress of the project by using the [Gantt Chart](https://en.wikipedia.org/wiki/Gantt_chart) developed above and having set milestones.

# Project Management
Project management is a framework of tools, skills, knowledge, etc. applied to a project so as to achieve its objectives (success)
Explain IoC Container like I'm Five
Tags: explainlikeimfive, oop, csharp, help
Published: 2020-02-16 12:31:28

Hi everyone! I'm a .Net developer and I've been trying to get my head around StructureMap and IoC containers in general recently. I understand what dependency injection is, and I know how to use interfaces to make code more testable and extensible.

What exactly is an IoC container though? I welcome answers from anyone, not just other .Net developers :grin:
AquilaDB - A new member to the CouchDB ecosystem
Tags: database, javascript, machinelearning, distributedsystems
Published: 2020-02-16 12:30:28

> Originally posted here: https://aquiladb.xyz/docs/replication 
>
> This feature is not stable and is only available in AquilaDB `develop` branch and `bleeding` docker image.

### Couch Protocol

AquilaDB integrates [Couch Replication Protocol](https://docs.couchdb.org/en/2.3.1/replication/intro.html). With this design choice, AquilaDB is now being part of the whole Couch movement. It is able to communicate to any Couch variant (CouchDB, PouchDB, Cloudant etc.).

To connect AquilaDB to a Couch node and start data sync with it, you just need to configure [`DB_config.yml`](https://github.com/a-mma/AquilaDB/blob/develop/src/DB_config.yml) the following way,

```
couchDB:
  DBInstance: default # database namespace
  host: /data # this will store documents within AquilaDB volume. Changing this to a remote couchDB endpoint will use that DB instead (not recommended unless you know what's happening)
  user: root # username, if above host requires authentication
  password:  # password, if above host requires authentication
couchDBRemote:
  DBInstance: default # database namespace
  host: # Specify if data to be replicated from AquilaDB to a remote Couch Variant and vice versa
  user: # username, if above host requires authentication
  password: # password, if above host requires authentication
```
That's it. Everything is straight forward.

### Deployment patterns
Below are some possible deployment patterns that's being enabled by Couch Protocol Integration
![ADB1](https://user-images.githubusercontent.com/19545678/73383959-58587d80-42f0-11ea-860e-5572387652d4.jpg)
![ADB2](https://user-images.githubusercontent.com/19545678/73383961-58f11400-42f0-11ea-9d7f-f58755ebb2ca.jpg)
![ADB3](https://user-images.githubusercontent.com/19545678/73383970-5d1d3180-42f0-11ea-9ded-d2968eed0526.jpg)
Using Cocoapods with Gemfile
Tags: ios, cocoapods, gem
Published: 2020-02-16 12:17:55

If you work in a team, it would be better if all team members have the same development environment. For instance, as an iOS developer, if we are using a different version of Cocoapods to install the 3rd party libraries, the generated `Podfile.lock` or the `.xcworkspace` file might be slightly different.

We can use a Gemfile to sync it:

Step 1. Create a file named `Gemfile` in the same directory of the `Podfile` and `.xcodeproj`

```
source 'https://rubygems.org'
gem 'cocoapods'
```

you may also specify the version of the cocoapods:

```
source 'https://rubygems.org'
gem "cocoapods", "1.8.4"
```

Step 2. Install bundler with gem in user directory

```
gem install bundler --user-install
```

Step 3. Install cocoapods with the version specified for the project (into the local relative path `vendor/bundle`)
```
bundle install --path vendor/bundle
```

To verify the version installed:
```
bundle exec pod --version
```



Step 4. Instead of using `pod install`, we now have to use a new command:

```
bundle exec pod install
```

Bonus:
We can open the `.xcworkspace` file automatically with Xcode right after `pod install`:

```
bundle exec pod install && xed .
```
Are you any good at TDD?
Tags: testing, tdd
Published: 2020-02-16 12:09:52

---
title: Are you any good at TDD?
published: true
description: So you practice TDD. But how do you measure your skills?
tags: testing, tdd
cover_image: https://source.unsplash.com/6EnTPvPPL6I/1000x620
---

_Cover image by [Isaac Smith](https://unsplash.com/@isaacmsmith?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/grade?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)_

In my last post I talked about code coverage and its usefulness as an educational milestone for any aspiring developer to conquer.

{% post d_ir/achieving-100-code-coverage-will-make-you-a-better-developer-seriously-30fc %}

I finished the post by saying that experienced TDD practitioners have little need for code coverage because they will be hitting 100% coverage by the very nature of their development process.

But unfortunately for us, **we have no good metric for measuring how effective we are with TDD**.

Software design itself is fairly subjective, so that’s one reason why we don’t have a good measurement. None of us can agree.

If you’re a TDD practitioner, how do you know you’re any good?

##The old “I don’t need code coverage because I do TDD” excuse

It’s been a long time since I  bothered to use code coverage metrics as part of my regular development process. (To be clear, there are times when I _do_ use code coverage--to verify coverage of a unit that I didn’t write, and to check how I‘m doing when I’m using test-after with legacy code.)

When I have clients ask me why I don’t bother with code coverage, I tell them I follow “strict” TDD so I don’t need it.

But it’s an excuse. I say this because people trust me that when I say it. They think it’s true, a fact. But of course it’s not. I say it because I’m lazy and code coverage it just one of those things that very rarely helps me in my day-to-day. And it’s _mostly_ true.

But what happens if I’m having an off-day, or I’m in a rush?

What happens if I make accidental mistakes in my tests?

What keeps me honest?

More to the point, how do I know that I’m writing _good_ tests, and how do I know I’m any good at software design in general?

I don’t really have the answer to that. There’s only one way I know that really helps: working with others.

## Keeping yourself honest by working with others

Pairing, and mobbing, helps you follow the TDD cycle religiously. It goes some way to stop you slipping up, cutting corners, making mistakes. Plus, it’ll improve your software design.

It can help with building the right thing, too. When you mob you might have the opportunity to include a QA person within the mob. With any luck, they’ll have some input on what requirements you may be missing.

Then, as the mob signs-off work, everyone involved should be able to say they they believe they tested everything to the best of their ability.

-----

If you have any of your own ideas about how to measure your TDD skills, I’d love to hear them.
Apa jadinya jika kita tidak diperbolehkan memiliki HP?
Tags: smartphone, life, zen
Published: 2020-02-16 11:33:34

---
title: Apa jadinya jika kita tidak diperbolehkan memiliki HP?
published: true
description: Bisa loh menjalani kehidupan tanpa HP
tags: smartphone, life, zen
series: Life
---

> Tentu saja kehidupanmu akan menjadi lebih baik

Kok bisa?

Bayangkan aja, jika kamu nggak memiliki HP, nggak ada lagi yang namanya pasangan dicuekin, nggak peduli ke anak, kehidupan sosial yang lebih berkualitas, studi yang lebih baik.

Eh, beneran kah?

Hmmm... Nggak tau juga. Tapi yang jelas, aku sudah menjalani kehidupan tanpa HP.

- 3 tahun di SMP tanpa HP
- 4 tahun di SMA tanpa HP

Wow, bagaimana bisa 7 tahun tanpa HP? Ya, tentu saja bisa karena aku di pondok pesantren.

Dan kamu tau apa hasilnya?

> Aku bisa fokus menghafal Alquran

Tapi, kalau kamu memang bener-bener nggak bisa lepas dari HP karena di situ sumber penghidupanmu, gunakan secukupnya saja. Jangan sampai HP merenggut kehidupan sosialmu.
Complete Jenkins Pipeline Tutorial for Beginners [FREE] 🎉
Tags: devops, docker, tutorial, beginners
Published: 2020-02-16 11:32:07

I have created a free video course on Jenkins Pipeline for Beginners:

####[Playlist](https://www.youtube.com/playlist?list=PLy7NrYWoggjw_LIiDK1LXdNN82uYuuuiC)####

Here an overview of the content:

***1. Run Jenkins in Docker Container***
 - Pull Jenkins Image and run container
 - Initialize Jenkins and install default plugins
 - Create First Admin User
 - Types of Jenkins Projects

***2. Create Multibranch Pipeline & Credentials***
 - Create Multibranch Pipeline
 - Explain how Credentials Plugin work in Jenkins
 - Filter Branches by Name

***3. Basics of Jenkinsfile***
 - Pipeline Syntax: Scripted vs. Declarative
 - Basic Syntax
 - Test something in Jenkinsfile - Replay Jenkinsfile
 - Restart from stage

***4. Trigger Jenkins Build automatically***
 - Push Notification
 - Polling for changes

Happy watching 🤓


Check out the first video here:

{% youtube pMO26j2OUME %}

-----------------
**Kubernetes 101** ► [Compact and easy-to-read ebook bundle 🚀](https://www.techworld-with-nana.com/e-books) 
It's a handy way to quickly look something up or refresh your knowledge at work and use it as your cheatsheet  😎

I'm happy to connect with you on 😍
- [Private FB group](https://www.facebook.com/groups/techworldwithnana)
- [Twitter](https://twitter.com/Njuchi_)
- [YouTube](https://www.youtube.com/channel/UCdngmbVKX1Tgre699-XLlUA?sub_confirmation=1)
- [Instagram](https://www.instagram.com/techworld_with_nana/)
What Layout Grid System should I use in my next GatsbyJS / React project?
Tags: react, gatsby, css, discuss
Published: 2020-02-16 11:20:15

The last couple of months I've dived deep into the JAMstack, and GatsbyJS is one of my favorite tools to use. 

But with every project the question arises: which Layout Grid System should I use? There are plenty grid systems out there. Some of them are really bloated, some are not maintained for a very long time, some of them are just simply MEH. 

I'm a frontend dev, so I could just try to build my own grid system.. But I'm also lazy, and why should I try to reinvent the wheel when others have done that for me?

So my question is: *which Layout Grid System is your default go-to tool in your GatsbyJS and/or React project?*

Photo by [Paulius Dragunas](https://unsplash.com/@paulius005?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on Unsplash
How to add loader in the website in a few seconds 😎
Tags: codepen, html, css, javascript
Published: 2020-02-16 11:07:21

---
title: How to add loader in the website in a few seconds 😎
published: true
tags: codepen, html, css, javascript
---

Magic of this few lines of JS code 🐝

let spinnerWrapper = document.querySelector('.spinner-wrapper');

window.addEventListener('load', function(){
  spinnerWrapper.style.display= 'none';
});


{% codepen https://codepen.io/atulcodex/pen/XWbdMGP %}
My First Yeoman Generator 
Tags: yeomangenerator, typescript, javascript, axios
Published: 2020-02-16 10:52:45

## Genertaor Venv
Generator Venv is A Generator To Create Simple Vue Environment like Vue cli Using Yeoman Generator

## Installation
Use the package manager Npm to install Generator Venv.

npm i generator-venv


## Usage

- install yeoman

  npm install -g yo


 - Then install Venv Generator

   yo generator-venv


## Serve
  npm run serve 

## Bulid
   npm run build
The suffering of the young Herbert
Tags: humor, comic, php, cartoon
Published: 2020-02-16 10:26:28

---
published: true
title: "The suffering of the young Herbert"
cover_image: "https://raw.githubusercontent.com/gabbersepp/dev.to-posts/master/blog-posts/comics/herbert-birthday/assets/1228974339942420480.jpg"
description: "The suffering of the young Herbert"
tags: humor, comic, php, cartoon
series: comics
canonical_url:
---

From time to time I am drawing cartoons with relation to our beloved programming doings. I am publishing them here, too. Have fun! Most of them will be in German but I am posting the english translation, too.
The main character in my developer cartoons is `Herbert`.

----

**The suffering of the young Herbert**

![Herberts birthday gift](https://raw.githubusercontent.com/YOUR-USERNAME/YOUR-REPO/master/blog-posts/comics/herbert-birthday/assets/1228974339942420480.jpg)

Herbert got a `PHP` book for his birthday. Maybe not the best idea.

----

# Found a typo?
As I am not a native English speaker, it is very likely that you will find an error. In this case, feel free to create a pull request here: https://github.com/gabbersepp/dev.to-posts . Also please open a PR for all other kind of errors.

Do not worry about merge conflicts. I will resolve them on my own.