teleren/devto huggingface dataset:
Announcing docker-image-size-limit: keep an eye on your docker image size
Tags: githunt, showdev, python, docker
Published: 2019-03-04 10:53:50

---
title: Announcing docker-image-size-limit: keep an eye on your docker image size
published: true
description: Limit your docker image size, prevent it from growing too big
tags: #githunt, #showdev, #python, #docker
cover_image: https://thepracticaldev.s3.amazonaws.com/i/tbud96yztrdmtpbc8u2f.jpeg
---

Originally published in my blog: https://sobolevn.me/2019/03/announcing-docker-image-size-limit

{% github wemake-services/docker-image-size-limit %}

## My story

It was an early morning. I was drinking my first cup of tea :tea: and reviewing a pull request from another developer.

It looked pretty well. Just some new `python` dependencies to generate beautiful reports. And a bunch of new `alpine` libraries to make sure everything will work.

So, I have merged it without any hesitations. 

Several hours later I have found out that our image size increased from `~200 MiB` to `~1.5 GiB` in size. :boom: This is unacceptable!

So, I have written this script to restrict the maximum image size in the future:

```bash
LIMIT=1024
IMAGE='your-image-name:latest'

SIZE="$(docker image inspect "$IMAGE" --format='{{.Size}}')"
test "$SIZE" -gt "$LIMIT" && echo 'Limit exceeded'; false
```

It is just like `js` [`size-limit`](https://github.com/ai/size-limit) library, but for `docker`.

And it worked pretty great. Now, our CI would fail on images that are bigger than our `$LIMIT`. But, do you know that we are using ["Blameless environment"](https://sobolevn.me/2018/12/blameless-environment) method? If something fails, fix it once and for all, including other projects as well. And now I have to distribute this code to all our projects by copy-pasting these four lines. And, of course, it is not how I like my code distribution.

## New project

As a result, I open-sourced this script as a standalone `python` CLI that can be distributed, installed, and used easily:

```
$ pip install docker-image-size-limit
$ disl your-image-name:label 300MiB
your-image-name:label exceeds 300MiB limit by 1200 MiB
```

And that's it. 

Now, you can be sure that your image size will always be in control. Checkout out [the docs](https://github.com/wemake-services/docker-image-size-limit) for all possible options. And integrate it to your CI not to make the same mistakes I have already fixed. :wrench:
Knowing your stack
Tags: discuss, help, career, beginners
Published: 2019-03-04 10:46:23

---
title: Knowing your stack
published: true
description: Knowing your task help developers to know the stack they belong
tags: #discuss, #help, #career, #beginners
cover_image: https://velaagency.com/wp-content/uploads/2019/01/Do-You-Know-Your-Stack-2.png
---

There are lot of misconception about stack in tech ecosystem, some developers especially the junior, aspiring developers and lot more are confuse about the stack they belong.

sometimes stack can be confusing and aspiring developers cannot differentiate or knows what makes up a particular stack they just learn any languages/libraries/framework that comes their way,i have been a victim of this and i want every aspiring developer to learn and know their stack.

__List of stacks__


* UI/UX Designer.
* Front end Developer.
* Back end Developer.
* Full Stack Developer.
* Software Engineer.
* Dev Ops

_please let share our ideas on above listed stack and what makes up the stack_

 _please share your idea,  no idea is too small._
Python: Module Management
Tags: python, modulemanagement, pipenv, pipfile
Published: 2019-04-08 14:41:12

---
title: Python: Module Management
published: true
tags: python,module-management,pipenv,pipfile
canonical_url: http://www.vimalselvam.com/2019/03/04/python-module-management/
---

Originally published in my [blog](http://www.vimalselvam.com/2019/03/04/python-module-management/).

This post is the continuation of my previous post: [Python Package Management with Pipenv](https://dev.to/email2vimalraj/python-package-management-with-pipenv-44kh-temp-slug-7990359). I’ve package / dependency management in place, now I would like to setup the folder structure and get the scripts executed.

My problem statement is that I don’t have any main script which can call any modules to trigger. Time to time, I execute any scripts from any folder individually and I should not have any hard dependencies with any file. Let me show you an example which can easily explain my problem.

Consider the following folder structure I have in place now:

[![Folder structure](https://i1.wp.com/www.vimalselvam.com/wp-content/uploads/2019/03/python-demo-project-structure.png?resize=179%2C300)](https://i1.wp.com/www.vimalselvam.com/wp-content/uploads/2019/03/python-demo-project-structure.png)

The ` __init__.py` is the special file which helps python to treat the folders / files as module. For example, the ` __init__.py` file in the `common/` directory makes it as a module, so that user can import this as a module anywhere. And the content of the ` __init__.py` file is just empty.

The content of my `constant.py` is very simple:

```
ENDPOINT = "http://vimalselvam.com"
```

and the `start.py` in the `src/datastore/` directory:

```
import common.constant as constant

def run():
    print(constant.ENDPOINT)

if __name__ == " __main__":
    run()
```

Just by looking at the above code, you think there is no problem in executing, right? That was wrong. Let’s execute and see what’s happening:

```
~ pipenv run python src/datastore/start.py
Traceback (most recent call last):
  File "src/datastore/start.py", line 1, in <module>
    import common.constant as constant
ModuleNotFoundError: No module named 'common'
```

What happened! The problem is that Python doesn’t resolve the module dependencies if you execute the file which is not relative to the current directory. So you’ve to execute the `start.py` file as a module. Let’s do that:

```
~ pipenv run python -m src.datastore.start
http://vimalselvam.com
```

Gotcha! I’ve spent some time to figure this out and hence this as a post. If you found this useful, please like and share.
Vue SSR Boilerplate
Tags: vue, ssr, githunt
Published: 2019-03-04 09:30:16

---
title: Vue SSR Boilerplate
published: true
description: Vue SSR Boilerplate
tags: vue, ssr, githunt
---

Hi here!

I made fork of [vue-cli-ssr-example](https://github.com/eddyerburgh/vue-cli-ssr-example) that adds some additional features.

## Features

### Server Side Rendering
- Vue + vue-router + vuex working together
- Server-side data pre-fetching
- Client-side state & DOM hydration
- Route-level code splitting

### Progressive Web App
- App manifest

## Roadmap
- Service worker

{% github antonreshetov/vue-ssr-boilerplate %}

I hope for someone it will be useful. For me, very))
Demo of CounterStrings in Action finding a live bug in Github
Tags: softwaretesting, exploratorytesting
Published: 2019-03-04 09:10:36

---
title: Demo of CounterStrings in Action finding a live bug in Github
published: true
description: Demo showing how to use CounterStrings and a Chrome Extension which implements them and finding a live bug in Github.
tags: SoftwareTesting, ExploratoryTesting
canonical: https://www.eviltester.com/blog/eviltester/2019-02-26-counterstrings-in-action
---

CounterStrings are an underused technique. Primarily because there are not a lot of tools that implement it. In this blog post I explain how you can use them from within your browser, and as a bonus, using them to find a bug in Github.


## CounterStrings

If you want to learn more about CounterStrings then:

- [CounterString algorithms](https://www.eviltester.com/2018/05/counterstring-algorithms.html)
- James Bach's original writing and work on CounterStrings at [satisfice.com](http://www.satisfice.com/blog/archives/22)
- and I wrote a [Chrome Extension](/page/tools/counterstringjs)
- and I implemented it in my [Test Tools Hub](https://github.com/eviltester/testtoolhub)

A CounterString is a string like this `*3*5*7*9*12*15*` where the `*` represent the position in the string of the number immediately proceeding it. This is a 15 character CounterString.

These are useful because if you paste them into a field, and are truncated then it is easy to see what they were truncated to, it is as James Bach describes it, self documenting test data.

## Using CounterStrings

James Bach's [PerlClip](http://www.satisfice.com/tools.shtml) is a simple executable that you run and it copies a CounterString into your clip board for copy and pasting into a field.

My [Chrome Extension](/page/tools/counterstringjs) you right click on a field in a web page and it inserts the CounterString into the field and outputs it to the dev tools console for later copy and pasting.

CounterStrings are useful because if you paste it into a field and it is truncated you can work out the length. And if you are trying to binary chop to find a length of a validation string then CounterStrings can prove useful.

## Github

When I was creating a demo video for CounterString extension I tried on Github.

- I created a 100 character CounterString,
- added it to Github Search field.
- Performed the search
- And Github said it would only search for 128 characters.

But I only entered 100 characters.

I then used the CounterString functionality to generate other CounterStrings which helped me discover that when Github says "128 characters" it actually means "95 characters".

This is a really good example of the type of bugs that CounterStrings can help you find and how you use them to help you create different string lengths to help you identify the real validation length to support you when raising defects.

## Video

{% youtube -Cs80GWeRuY %}
Aurelia: How do we React - Part 2
Tags: aurelia, react, javascript, jsframework
Published: 2019-03-04 09:07:22

---
title: Aurelia: How do we React - Part 2
published: true 
description: Part 2 of 3 parts series of how Aurelia handle common scenarios seen in React applications.
tags: aurelia,react,javascript,jsframework
---

Part 1: https://aurelia.io/blog/2019/02/21/how-do-we-react-part-1

Part 2: https://aurelia.io/blog/2019/03/01/how-do-we-react-part-2


In part 2, render prop technique in React is discussed...
Top 7 Points That Can Make You from a Freelancer to an Entrepreneur
Tags: stanislavkomsky, entrepreneur, businessconsultant
Published: 2019-03-04 09:03:28

---
title: Top 7 Points That Can Make You from a Freelancer to an Entrepreneur
published: true
cover_image: https://articleshubspot.com/wp-content/uploads/2019/03/Freelancer-to-an-Entrepreneur-stanislav-komsky.jpg
tags: StanislavKomsky, Entrepreneur, businessconsultant     
---
Disabling specific eslint rules
Tags: todayilearned, react
Published: 2019-03-04 08:10:58

---
title: Disabling specific eslint rules
published: true
description: It's as easy as adding an eslint config file at the project root.
tags: todayilearned, react
canonical_url: https://ajsharp.com/disabling-specific-eslint-rules/
---

The [create react app](http://github.com/facebook/create-react-app/) eslint presets come with a few rules that are slightly annoying. One of them is jsx-a11y/href-no-hash, which makes sure you don’t add an <a> tag without a valid http address for the href property.
To ignore this, add a .eslintrc.js file at the project root with the following:

```javascript
module.exports = {
  "parser": "babel-eslint",
  "env": {
    "browser": true
  },
  "rules": {
    "jsx-a11y/anchor-is-valid": "off"
  }
}
```

Then make sure to reload the vscode window.


Full eslint config file documentation [here](https://eslint.org/docs/user-guide/configuring).

---

☝️ _**Be sure to check out [Sharesecret](https://www.sharesecret.co), which makes it easy to securely share sensitive data.**_
Difference Between AngularJS. Vs. Angular 2 Vs Angular 7
Tags: angular987, angular, angular2
Published: 2020-02-01 19:08:12

---
title: Difference Between AngularJS. Vs. Angular 2 Vs Angular 7
published: true
tags: Angular 9|8|7, angular, AngularJS, Angular 2
canonical_url: https://www.positronx.io/difference-between-angularjs-vs-angular-2-vs-angular-7/
---

The post [Difference Between AngularJS. Vs. Angular 2 Vs Angular 7](https://www.positronx.io/difference-between-angularjs-vs-angular-2-vs-angular-7/) appeared first on [positronX.io](https://www.positronx.io).

Difference between AngularJS and Angular 2 will be covered in this article. We will also cover how both differ from Angular 7 as well.

## Difference between AngularJS and Angular 2 – Definition for AngularJS

[Click here to read more](https://www.positronx.io/difference-between-angularjs-vs-angular-2-vs-angular-7/)
Learning to use computer without mouse?
Tags: question, advice
Published: 2019-03-04 08:02:49

---
title: Learning to use computer without mouse?
published: true
description: Best practices to do, when trying to learn to operate computers with keyboard only    
tags: question, advice
---

I am  looking for some advice how to learn to operate computer with keyboard only. I find it much faster if you know all the shortcuts / tricks etc...

EDIT:
I found some interesting links, they are below:  
https://codurance.com/2015/11/25/mouseless-programming/  
https://blog.codinghorror.com/going-commando-put-down-the-mouse/  
If enough people get interested in this post, I can turn all my findings into a nice post.
The Real Facts About VPNs
Tags: vpn, privacy, security, networking
Published: 2019-03-04 07:47:26

---
title: The Real Facts About VPNs
published: true
description: A VPN is a useful tool for security and privacy, but not the end-all solution.
tags: VPN, Privacy, Security, Networking
---

A VPN stands for a <b>V</b>irtual <b>P</b>rivate <b>N</b>etwork, and does exactly what it sounds like. It connects your device to an encrypted private network through software. It's a useful tool, but why is it important for security and privacy? First, we'll go over briefly what a VPN does.

## What does a VPN do?
A VPN works by hiding your IP address and making connections to other servers on the internet on your behalf, then sending that data to you. This makes it harder to track you. It protects you from <a href="https://en.wikipedia.org/wiki/Denial-of-service_attack">DDoS attacks</a> and <a href="https://en.wikipedia.org/wiki/Man-in-the-middle_attack">MITM attacks</a>. It encrypts your data between your computer and their servers which protects you from being easily spied on through WiFi or other computers on the same network. It allows you to bypass censorship and <a href="https://en.wikipedia.org/wiki/Geo-blocking">Geoblocking</a>. 

## What does a VPN <u>not</u> do?
A VPN will generally only encrypt your data between you and their servers. There are also many methods of identifying you through your browser alone, including cookies, scripts, and HTTP request header information. That's only what your browser sends to each website you connect to and doesn't count the data your browser can collect from you and send to their own servers. No VPN can protect you from these methods of collecting your data.

## Why should I use a VPN?
A VPN is still the most effective first step in protecting your data and an important step for privacy. A VPN is just one part of full privacy and security. Even if you don't care about your privacy (even though you should), it is still worth it for the security benefits alone. Any time you are connected to a network, wireless or wired, you are trusting that no one else is trying to sniff out your personal data. Also, on a wireless network anyone can intercept data that you are broadcasting even if they are not connected to the same network.

## What is a good VPN?
There are many services out there, but no single VPN service is best for everyone. It depends on your needs and what the individual VPN service provides. Always research before trusting your data with someone. How do you know they are actually encrypting your data? What information about you are they keeping? A good rule of thumb is: if the product is free then you are the product, meaning they are probably selling your data.

## Summary
- Use a VPN when you are using a public network and/or when transmitting sensitive data on a network that is broadcasting wirelessly
- A VPN is not a total solution for privacy and security
- Research the VPN service provider before you trust them with your security
The way to fully automated releases in open source projects
Tags: github, travis, semanticversioning, releasing
Published: 2019-03-04 07:37:07

---
title: The way to fully automated releases in open source projects
published: true
tags: github,Travis,semantic-versioning,releasing
canonical_url: https://medium.com/@kevinkreuzer/the-way-to-fully-automated-releases-in-open-source-projects-44c015f38fd6
---

#### How to use conventional-commits and semantic-release in combination with GitHub and Travis.

![](https://cdn-images-1.medium.com/max/2600/1*6u8pu-lMmd3maevO9Whzzw.png)

Developing and testing is only one part of the art of creating software. Another part is shipping the artifact. 🚢

Delivering software requires some steps; we need to run tests, build our artifact and publish or deploy it somewhere. Most often, those steps are executed in a pipeline.

A pipeline is a way to automate all the required steps. Therefore tooling and CI servers with the necessary configuration are needed.

A lot of companies have a complicated setup and need whole teams to maintain such a platform.

Wow! 😮 That sounds complicated. “Maybe it’s better to forgo about CI and pipelines. I do everything manually” is probably what you think right now.

But no! Thanks to the great landscape of existing tools out there it is not that complicated!


[Find out how to create a pipeline to automate your releases!](https://medium.com/@kevinkreuzer/the-way-to-fully-automated-releases-in-open-source-projects-44c015f38fd6)
Refactorings with Design Patterns
Tags: cleancode, designpatterns
Published: 2020-01-08 21:57:17

---
title: Refactorings with Design Patterns
published: true
date: 2019-03-04 04:43:58 UTC
tags: clean code,design patterns
canonical_url: 
---

I’ve previously written about [refactorings I found useful](https://www.programming-decoded.com/blog/choosing-which-refactorings-to-use-based-on-code-smells/). But at the time I didn’t include refactorings that use design patterns, as I didn’t really understand them yet. Now that I’ve read a book on [design patterns](https://refactoring.guru/design-patterns), these will hopefully make more sense. Actually there is a book on [Refactoring to Patterns](https://industriallogic.com/xp/refactoring/), which I haven’t read yet. As a first step I want to just list the refactorings using patterns that are mentioned in the course, so that I can easily find them later:

**Duplicate Observed Data (Observer pattern)**

If domain data stored in classes is responsible for the GUI then it is a good idea to separate the data into separate classes, ensuring connection and synchronization between the domain class and the GUI.

**Replace Type Code with State/Strategy**

This refactoring technique is a way out of situations when a field with a coded type changes its value during the object’s lifetime. In this case, replacement of the value is made via replacement of the state object to which the original class refers.

**Replace Constructor with Factory Method**

Useful if one has a complex constructor that does something more than just setting parameter values in object fields.

**Form Template Method**

Merge the shared algorithm steps in a superclass and leave just the differences in the subclasses.

**Replace Inheritance with Delegation (Strategy pattern)**

If inheritance doesn’t make sense, e.g. there is a subclass that uses only a portion of the methods of its superclass one should consider replacing inheritance with composition.
Using DropConfig for website translations
Tags: web, javascript, dropconfig
Published: 2019-03-04 04:27:11

---
title: Using DropConfig for website translations
published: true
description: Using DropConfig to make translations for your website easy
tags: web, javascript, dropconfig
series: dropconfig
---

Using [DropConfig](https://www.dropconfig.com) can make it easy to add translations for your website and enable you to easily pass off the translation work to other people.

We are going to be using react in this example with DropConfig.

## The scenario

We want to be able to pass a translation key to a React component and have the proper translation loaded depending on the user's browser.

{% gist https://gist.github.com/powerc9000/b6c99ec0c252e4403f09774fd455e147 %}

## The DropConfig document.

We will want to create a document that has at the top level the language. Then children key value pairs of the translation key and value.

e.g.


```
{
    "en-US": {
        "homepage_welcome": "Welcome"
    }

}

```

## Why DropConfig?

DropConfig allow you to pass off all the work of translations to other people on your team or in your company. 

You just have to give them the URL and they can fill in the data without breaking the JSON!

![Form View](https://thepracticaldev.s3.amazonaws.com/i/48uxotjwm17ibqjq86jp.PNG)


## The React Component

This is a pretty simple component all the hard work will be done in our translation loader and `get`-er

{% gist https://gist.github.com/powerc9000/8d05221f509e9d50b67b1b83fbce7dc6 %}


## The Translation Loader

{% gist https://gist.github.com/powerc9000/e4aed8fb6afac51e70b9b756ab1bc10f %}


I hope this helps you with translations on your site and seeing the power of DropConfig
The Evolution of Software Testing
Tags: testing, softwaredevelopment
Published: 2019-03-04 05:22:33

---
title: The Evolution of Software Testing
published: true
tags: testing,software-development
canonical_url: 
---

## Team Effort

Everyone working on a software team is responsible for the quality of the software. Where is the direction software testing going? How does this relate to developers, infrastructure, and testers in how we make better quality software?

Typically as we have talked about automating our testing efforts we discuss the testing pyramid. This conveys where the most value in our testing occurs and its speed.

[![](https://s3.amazonaws.com/www.alanmbarr.com/blog/images/test-pyramid.png)](https://martinfowler.com/bliki/TestPyramid.html)

It is not the only part of the story. As software grows testing becomes more nuanced. How do we catch the bugs that reach it to production?

[![](https://s3.amazonaws.com/www.alanmbarr.com/blog/images/bug-funnel.jpg)](https://twitter.com/noahsussman/status/836612175707930625?lang=en)

In order to master Continuous Integration and Delivery we need to master testing in production safely.

[![](https://s3.amazonaws.com/www.alanmbarr.com/blog/images/testing_prod.jpg)](https://medium.com/@copyconstruct/testing-in-production-the-safe-way-18ca102d0ef1)

As we make and connect more systems we also increase points of failure. We need to embrace failure as a constant and use it as a rapid learning experience.

How can we make our software safer for the people that maintain it? How can we make it safer for the people using it?

New software we make must be made to be observable and explainable. If it is not it will cost significantly more to support and maintain over time.

[![](https://s3.amazonaws.com/www.alanmbarr.com/blog/images/observability.png)](https://medium.com/@copyconstruct/monitoring-and-observability-8417d1952e1c)

Where we spend most of our time in tracking down problems

[![](https://s3.amazonaws.com/www.alanmbarr.com/blog/images/observability_iceberg.png)](https://scoutapp.com/blog/observability-the-new-wave-or-another-buzzword)

- How much of the problems we catch are because we have monitoring, alerting, and dashboards?
- When significant problems occur how long does it require a person to debug that code?
- How easy is it to debug or find the right information to track down the issue? 
- What habits are we developing to make it easier for teams to catch where problems are introduced?