teleren/devto huggingface dataset:
When you're feeling all TAPped out
Tags: tap, testing
Published: 2019-08-17 00:44:56

Good software practices say you should do automated testing, but what do you do when you work in an environment that can't get good test tools? Use a simple testing protocol like TAP.

TAP is the *Test Anything Protocol*. The protocol is so simple that you could probably write code to make TAP output in minutes. It is a line based protocol which means that any language that has some sort of print method can generate TAP. That's basically all software languages in common use.

I could provide the rules, but an example would be easier.

```tap
# This is a comment because it starts with a hash symbol.
ok 1 Something passed here.
not ok 2 Whoops, there was a failure.
When there is a line that TAP does not understand (like this one), it will skip it.
# TAP files should have a plan in the format of "1..<some number of tests>".
1..2
```

The key to the protocol is `ok` and `not ok`. When lines start with one of these two phrases, TAP readers will interpret it as a pass or failure. Besides the test number, everything else on the line is extra. Toss in how many tests were run and you have fully functional TAP output. We can prove it with Perl's aptly name `prove` tool.

```console
matt@eden:~$ prove sample.tap
sample.tap .. Failed 1/2 subtests

Test Summary Report
-------------------
sample.tap (Wstat: 0 Tests: 2 Failed: 1)
  Failed test:  2
Files=1, Tests=2,  0 wallclock secs ( 0.01 usr +  0.00 sys =  0.01 CPU)
Result: FAIL
```

Once you have some TAP results from your awesome homegrown test suite, you can get them into a TAP reader like the [Jenkins plugin](https://wiki.jenkins-ci.org/display/JENKINS/TAP+Plugin) or a specific
tool like [Tapper](http://tapper.github.io/Tapper/).

There are some additional features that I did not discuss here (like TODO
tracking). See the [TAP website](http://testanything.org/) for more details. More adventurous individuals can check out the specifics by looking at the de facto parser, [TAP::Parser](http://search.cpan.org/~ovid/Test-Harness-3.28/lib/TAP/Parser.pm), on Perl's CPAN.

This article first appeared on [mattlayman.com](https://www.mattlayman.com/blog/2013/all-tapped-out/).
vim ssh
Tags: vim, ssh, remote, ide
Published: 2019-12-03 10:55:38

---
title: vim ssh
published: true
tags: vim, ssh, remote, ide
canonical_url: https://tech.serhatteker.com/post/2019-08/vim-ssh/
---
If you want to edit files on a remote server with your current lovely vim configs there are 2 options:

One is to copy your `.vimrc` to all servers. Which is not efficent and denying one of the main software development principle - [DRY (Don't Repeat Yourself)](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself).

Another one is instead of bringing `.vimrc`to each server you need to work on, edit the remote files from your local `vim`:

Start `vim` like this:

```sh
$ vim scp://remoteuser@host//path/to/file/file.extension
```

If you have already a `vim` session:

```vim
:e scp://remoteuser@host//path/to/file/file.extension
```

* `remoteuser` is the user name on the remote server
* `host` is the remote server name/ip


This opens the file seamingly in place (it actually copies the file locally), and when you save, it sends the edited file back to the server for you.

It asks for an ssh password, but this can be streamlined via ssh keys.

The only drawback of this method is that you don't get path/file competion as you would when working directly on the machine which is not a big deal beside advantages.

All done.
Remotely Edit Files in Vim
Tags: vim, scp, ssh
Published: 2021-01-25 12:45:32

---
title: Remotely Edit Files in Vim
published: true
date: 2019-08-17 00:00:00 UTC
tags: vim, scp, ssh
canonical_url: https://tech.serhatteker.com/post/2019-08/remotely-edit-files-in-vim/
---

If you want to edit files on a remote server with your current lovely vim configs there are 2 options:

One is to copy your `.vimrc` to all servers. Which is not efficent and denying one of the main software development principle -[DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself) ,

Another one is instead of bringing `.vimrc`to each server you need to work on, edit the remote files from your local `vim`:

Start `vim` like this:

```sh
$ vim scp://remoteuser@host//path/to/file/file.extension
```

If you have already a `vim` session:

```vim
:e scp://remoteuser@host//path/to/file/file.extension
```

* `remoteuser` is the user name on the remote server
* `host` is the remote server name/ip


This opens the file seamingly in place (it actually copies the file locally), and when you save, it sends the edited file back to the server for you.

It asks for an ssh password, but this can be streamlined via ssh keys.

The only drawback of this method is that you don't get path/file competion as you would when working directly on the machine which is not a big deal beside advantages.

All done.

---
**Changelog**

- 2020-11-06 : Change title and filename. Add scp tag.
Brutalist CSS
Published: 2020-12-30 14:56:56

---
title: Brutalist CSS
published: true
date: 2019-08-17 00:00:00 UTC
tags: 
canonical_url: https://blog.koenvangilst.nl/brutalist-css/
---

## Bare minimum responsive CSS

CSS can be hard, but getting started with responsive design doesn’t have to be. These are the only 196 bytes you need to get started with a responsive design.

```
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial,
    sans-serif;
  font-size: 24px;
  line-height: 1.6;
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
```

Here’s a CodeSandbox: [https://codesandbox.io/embed/brutalist-css-eu8s5](https://codesandbox.io/embed/brutalist-css-eu8s5)

[And this is how it looks](https://eu8s5.csb.app/)
You can release better products. The Validation Process
Tags: testing
Published: 2019-08-16 23:52:40

The validation process will determine whether the product functions are meeting the requirements of the project, whether they meet the organization's objectives, and ultimately, and perhaps most importantly, whether they meet the customer's needs. Usually this process is performed as a final step in the development of a product evaluating the accuracy of the product that always concerns the satisfaction of the needs and requirements of users.

It is interesting that the validation is performed preferentially by a team that does not participate in product development, that is prepared to analyze the product with a customer's perspective and is focused on identifying non-conformities and also suggesting the best resources for the market. It is important that the team is also prepared to verify if the product will integrate into the customer's environment.

It is very important for the quality of a product that all non-conformities inserted during development or maintenance are discovered before the release and because of this it is interesting to apply a validation process. But for how long should this process be carried out? This depends on the fault tolerance that the project may have and there is no defined response but usually the interval of the occurrence of detection of a non-conformity is used as the indicator. This indicator is used to define that the testing investment no longer pays off because of the high time to find a non-conformity.

Do you have tips for more effective testing? Answer the comments below!


Thank you for reading! 

Best regards,
Daniel Maurer
Demystifying Test Automation myths: Bursting the bubble! 
Tags: testing, testautomation
Published: 2019-08-16 23:49:28

Given our worlds are shrinking to a point where it can literally fit into our palms, there are a lot of companies that are investing in developing products that are mobile centric. Hence automation is gaining more importance as these companies want to move faster! But the misconceptions still prevail. 

Lets address them:
Automate 100% of all test cases: Automation is essential to move faster but we need to be cognizant of what we want to automate. There’s always the effort involved in designing and developing the test framework, apart from maintaining it. So, one should take into account the ROI of every test case that needs to be automated. For example: if a specific test case requires a tool to integrate with the photo gallery of your android app and currently your test framework doesn’t support it, then the question one should ask themselves is: “What is the impact of automating this test case”? Or in other words, “Is this a P0 test case?”
We test mobile apps, so we only care about the UI automation: Testing involves multiple layers. It can be anything from A/B testing, accessibility testing, API testing, integration testing, acceptance testing, performance testing, load testing, etc. Agreed that UI is the main component of mobile apps but it can’t function if other integrations don’t function properly. If your app is integrated with any hardware/wearable or if your app is integrated with the voice assistant then adding integration tests would help to ensure everything works seamlessly. 
Automation should catch “all” bugs: When automated tests are run against a new feature branch and if it causes a crash on an unrelated screen, then this bug is labelled as a “regression” bug. The goal of automation is to help find these bugs and it cannot replace manual testing in its entirety.
React MERN Stack CRUD App Tutorial
Tags: expressjs, mongodb, node, react
Published: 2020-01-31 19:27:58

---
title: React MERN Stack CRUD App Tutorial
published: true
tags: Express JS,MongoDB,Node JS,React JS
canonical_url: https://www.positronx.io/react-mern-stack-crud-app-tutorial/
---

The post [React MERN Stack CRUD App Tutorial](https://www.positronx.io/react-mern-stack-crud-app-tutorial/) appeared first on [positronX.io](https://www.positronx.io).

Today, I am going to teach you how to  **build React CRUD web application**  from scratch. Along with that, we will learn how to set up a Node server and create REST APIs using Node and Express.js. In this  **MERN Stack tutorial** , we are going to understand step by step how to create Create, Read, Update, and Delete data in React app. 
### React MERN Stack Example

In this **MERN stack tutorial** , we will create a basic Student app from starting to finish. This app will allow us to create student, show students list, update student, and delete a student from the MongoDB database.


[Click here to read more](https://www.positronx.io/react-mern-stack-crud-app-tutorial/)
Day #2 - Native Flags Game
Tags: android, sqlite
Published: 2019-08-16 20:11:24

---
title: Day #2 - Native Flags Game 
published: true
description: Pratice Sharing Series
tags: android,sqlite
---


Hello, I am practicing android application development every day. I will share my samples daily.

Note: There may be old techniques. The logic is the same.

- Feel free to contact me for any questions.

https://github.com/ardakazanci/FlagsQuizGame
A Short Primer on Design Systems
Tags: ui, ux, design, productdesign
Published: 2019-08-16 20:06:51

---
title: A Short Primer on Design Systems
published: true
description: 
tags: ui, ux, design, productdesign
---

### You may have heard the term **Design Systems**, or maybe other terms such as Design Language, Pattern Library,  or even Component Design. 

When we talk about Design Systems, we are actually referring to components that can be reused in a number of different combinations. This is very important when dealing with human-computer interaction, user experience, interaction design, as well as front-end development.  Design Systems help with improving design and development workflow, iterate with confidence and manage updates collaboratively. Documentation is also key to understanding the separate components that make up the design system along with when and how to use them effectively. 

The importance of having a Design System is crucial to a team for a variety of reasons. 

#### The main reasons: 

* **Scaling** your app or product for future growth
* Promoting **Consistency** throughout the user experience and product branding
* **Efficiency** for developers and designers in order to save time
* Encouraging **Teamwork**

#### Some of the biggest examples of  commercial design systems are:

* Polaris by Shopify
* Airbnb Visual Language
* Plasma by WeWork
* Swarm by Meetup
* Google's Material Design

Here are links to more in-depth information about design systems if you feel like going down the design development rabbit hole: 

[Everything you need to know about Design Systems](https://uxdesign.cc/everything-you-need-to-know-about-design-systems-54b109851969)

[Systems Design - Wikipedia](https://en.wikipedia.org/wiki/Systems_design)

This post also appears on my [blog](https://objector.dev/posts/2019/a-short-primer-on-design-systems/) as well, feel free to check it out.
Destiny Zero Hour - a Javascript Coding Project
Tags: javascript, codingproject
Published: 2019-08-16 19:51:24

---
title: Destiny Zero Hour - a Javascript Coding Project
published: true
description: A Javascript coding project to solve a maze.
tags: javascript, coding project
---

We combined our love of the Destiny video game and our day job teaching people to code at [Coder Foundry] (https://www.coderfoundry.com/) and created a Destiny themed coding project partially based on an in-game maze puzzle.

We figured there may be a few other devs/Destiny fans that find it as interesting as we did.

{% youtube 4Y7ZOa9pwWY %}
[Video] The Future of the Decentralized Web
Tags: video, javascript, dweb, cascadiajs2018
Published: 2019-08-16 18:53:58

---
title: [Video] The Future of the Decentralized Web
published: true
description: The original vision of the Internet was for a fully decentralized system that empowered its users at the edges. In the many years since the birth of The Web we’ve moved more towards centralized structures to solve the issues of scale and data and it has not come without consequence. In order to move past these issues we need new primitives for a new vision of The Web that can be decentralized.
tags: video, javascript, dweb, cascadiajs2018
---
*As we lead up to [CascadiaJS 2019](https://2019.cascadiajs.com), I'm going to share the 24 amazing talks from 2018 here on dev.to. Sit back and enjoy the show!*

# Mikeal Rogers
![Mikeal Rogers](https://2018.cascadiajs.com/speakers/mikeal.png)

The original vision of the Internet was for a fully decentralized system that empowered its users at the edges. In the many years since the birth of The Web we’ve moved more towards centralized structures to solve the issues of scale and data and it has not come without consequence. In order to move past these issues we need new primitives for a new vision of The Web that can be decentralized.

[Watch the talk on YouTube (19:38)](https://www.youtube.com/watch?v=83Gws-dPL8A)
Column-like layout in CSS without Bootstrap or Grids (Part-1)
Tags: html, css, webdev
Published: 2019-08-16 18:52:56

Ever wondered how to create columns in CSS without using grids or those pesky `col-md-sth` in a labyrinth of div tags ? 

There's mainly two ways you could do so. I shall explain with examples and scenarios as this is how I understand the best.

Scenario 1: say you would like to write your article in newspaper style. As you know, big chunks of continuous texts in newspapers are written in columns instead of paragraphs. How could you possibly achieve such a look with minimal effort? Turns out our old but mighty CSS has a property to do so.The property 

**column-count:**
 
let's take an example
I want to write a piece of text entirely in newspaper-ish style. The body structured with html would go like this

```
<section>

<h3>Things that don't make sense</h3>

<div class="col">


Lorem ipsum dolor sit amet, consectetur adipiscing elit, 
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
Sollicitudin tempor id eu nisl nunc mi ipsum faucibus vitae. 
Integer vitae justo eget magna fermentum iaculis eu non.
Rhoncus urna neque viverra justo nec ultrices dui. Risus viverra
adipiscing at in tellus integer feugiat scelerisque.
In hendrerit gravida
rutrum quisque non tellus. Consequat semper viverra nam
libero  justo laoreet sit amet.

           
</div>

</section>
```
And now with one line of CSS we will break this chunk of text in columns. This would be 
```
.col{
  column-count: 3;
}
```
And the final output would be 
{% codepen https://codepen.io/Silver1/pen/eYmGjKx %}
The best thing is if you click on the edit on Codepen  and try resizing the window size, you'll see it adjusts according to the browser size. Woohoo!

But wait there's more, you can also customize your columns to have gaps, column-rules and what not. I'll leave the link to the w3schools page for you to play around with it more

[https://www.w3schools.com/css/css3_multiple_columns.asp](https://www.w3schools.com/css/css3_multiple_columns.asp)

While I'm aware that this might not be as elegant as the generic Grids, this took my attention for its sheer simplicity.
Often you might only need a simple column-ish layout and using Grids are somewhat of an overkill for those times.

Let me know what you guys like and dislike about this CSS property in comments below. Also,stay tuned for part-2.
I'm building a SaaS for automating customer testimonials called Endorsal.io
Tags: showdev
Published: 2019-08-16 18:19:04

Hi guys! 👋

**[Endorsal](https://endorsal.io?source=DevTo) fully automates the collection and display of testimonials, saving businesses time & money.**

I've just launched my landing page while I'm building the MVP to capture leads and gauge interest in the concept. 

I'm also offering a lifetime deal for those that pre-order with huge savings on launch.

Any feedback is appreciated, especially regarding CTAs and the overall message/idea 😊

Take a look: [Endorsal.io](https://endorsal.io?source=DevTo)
Why do you like or dislike React?
Tags: javascript, webdev, react, discuss
Published: 2019-08-16 18:00:48

I have recently been learning about [React](https://reactjs.org), which, as you probably know is a JavaScript library. As far as I understand it, one of its greater strengths is that it works with a virtual DOM, which makes updating the real DOM faster. If you google it, you'll find lots of [reasons to use it](https://stories.jotform.com/7-reasons-why-you-should-use-react-ad420c634247) as well as [reasons not to use it](https://nickroberts.ninja/jquery-javascript/why-you-should-never-use-reactjs/).

What is your take on React? Do you like it? Do you find it too big? Does it perform well? What are your reasons for using it or not using it?
Dynamic Branding With React and SCSS/CSS Variables
Tags: css, scss, react, webdev
Published: 2019-08-16 17:42:26

---
title: Dynamic Branding With React and SCSS/CSS Variables
published: true
description: An article on implementing branding that can be changed dynamically at runtime
cover_image: https://thepracticaldev.s3.amazonaws.com/i/zlxpzn0b2t3yzqvakcwb.png
tags: css, scss, react, web development
---

Wrote an article about how I resolved trying to do dynamic theming with SCSS/CSS and React with styles that are provided from a JavaScript dictionary at runtime.

https://link.medium.com/cz26R6zMcZ
Dump and Restore PostgreSQL Tables
Tags: database, postgres
Published: 2019-08-16 17:27:48

---
title: Dump and Restore PostgreSQL Tables
published: true
description: Commands to Dump and Load table content to make local development easier
tags: databases, postgresql
permalink: dump-load-postgresql-table
cover_image: https://thepracticaldev.s3.amazonaws.com/i/nmf9gakueyd5l93it8ta.jpg
---

Sometimes it's helpful to dump an exact copy of a database table so it can be loaded elsewhere. How can you do that? 

In this example, we will dump and restore a table and assume there is no sensitive content in the table being dumped.

`pg_dump` can be used to dump table content to a file. By using compression the file size can be kept small even for large tables. 

Specify the output format with `--format` (or `-F`). The `c` format is the default. Refer to [`pg_dump` Docs](https://www.postgresql.org/docs/current/app-pgdump.html) for each of the options and values.

Without compression, the file would be 144MB file from a `users` table with `1042368` rows. With compression it is 19MB. Compression is continually being improved so this might be even better in newer versions of PostgreSQL or by using external compression programs. 

In the example below, the database name is `rideshare_development`.

Run `pg_dump` as follows.

```sh
pg_dump \
    --format=c \
    --host localhost \
    --table users \
    rideshare_development > users_table.dump
```

```sh
$ du -h users_table.dump
19M    users_table.dump
```

From the `.dump` file, the table and all the data rows can be populated into a database where neither exists.

Create a database to create the table and populate it. Call the database `temp_load`. The command below uses the createdb command line program included with PostgreSQL. The next command loads the content of the dump file using pg_restore.

```sh
createdb temp_load;

pg_restore --dbname temp_load users_table.dump
```

```sql
-- Confirm all the rows are there
SELECT count(*) FROM users;
  count
---------
 1042368
```

That's it! Note that this is only one of the ways to dump and restore table rows. Explore the PostgreSQL documentation for more options.
Headers, Interceptors, and Authenticators with Retrofit
Tags: android, kotlin, retrofit
Published: 2019-08-16 17:16:17


In Android sometimes you need to add a couple of parameters, like headers, to make a successful request, this is normal behavior from all the Android Apps when you are using Retrofit, you can do it in multiple ways
For example, you can add parameters directly to your request interface using the annotation Headers and putting a plain String, like this:

{% gist https://gist.github.com/dinorahto/ba63ca58a4399a06d31e4e25d4773e82 %}

Another solution is to send the Headers as a parameter to your interface function, using an annotation Header and sending a parameter, this gives you the possibility to have a custom parameter that you can manage from every request:

{% gist https://gist.github.com/dinorahto/eb7ecd467ef5a2cf3e1575dd3e6794c2 %}

##Interceptor##

A couple of people using Dagger probably will go for an Interceptor, you can have two types of interceptor:
The first one is using an interceptor directly in your Singleton, this will not give you versatility, but it will solve your problem faster, in this example, you can go for the chain object, get the request of the Retrofit call, get a new Builder and then add the Headers.

{% gist https://gist.github.com/dinorahto/aeee8e13ddec2e957c1222b9c4839b53 %}

Or you can use this as file apart, extending Interceptor class, this will let you have the reusable code.

{% gist https://gist.github.com/dinorahto/285b0b5d523bd908ac33a685ee12b4dc %}


##Authenticator##

Imagine you want to catch the response before to go to your Observable, maybe trying to catch a specific error before hitting your Throwable, for this specific behavior you need an Authenticator.
This authenticator will catch the response, when there is an error (401 error) then we will update the AuthToken for the failed request and it will send resend the request, no need to send anything else or make any logic inside your presentation layer.

{% gist https://gist.github.com/dinorahto/b265bb5fd75917c2c5d458f83e641481 %}

To make the implementation you only need to set this object like this:

{% gist https://gist.github.com/dinorahto/674d8ac2b6b66945283d92863f6bbc50 %}


And you re ready to go. 
Happy Coding! 👩🏻‍💻
If you have questions, you can reach me here at Dev Community or:
Medium: https://medium.com/knowing-android
Twitter: https://twitter.com/DDinorahtovar