teleren/devto huggingface dataset:
GCP DevOps Certification - Pomodoro Eight
Tags: googlecloud, devops, certification, sre
Published: 2020-10-05 11:04:29

# Improving reliability

Shifting away from impacts on reliability, it's time to move to thinking about how to improve reliability.

There are lots of options for improvement and prioritising them requires some thought. I'll share the options in a moment but the Google SRE team share this calculation for measuring the impact on your error budget.

![Error Impact](https://dev-to-uploads.s3.amazonaws.com/i/7x5utw11wfvfn65oa8ks.png)

**TTD**
Time to Detect - The time between the user being impacted and someone in your team being informed.

**TTR**
Time to resolution - The time between being informed and a fix being presented.

**impact%**
Impact percentage - how many users will this particular failure impact.

**TTF**
Time to failure (sometimes called TBF time between failures) is how frequently you expect something to happen.

#### All together...

The expected impact of a particular type of failure on your error budget is proportional to the time-to-detect plus the time-to-resolution multiplied by the percentage of impact over the time-to-failure. This last value TTF expresses how frequently you expect this particular failure to occur.

# To improve reliability

![Areas of improvement](https://dev-to-uploads.s3.amazonaws.com/i/rixqn7xgghwvzszvcrwk.png)

So to improve reliability you could focus on **reducing the TTR**. Maybe setting up quicker alerting or more frequent monitoring checks.

Or even introduce automated alerting in an environment that previously relied upon humans spotting things on graphical dashboards.

Maybe spotting [Single Points of Failure](https://en.wikipedia.org/wiki/Single_point_of_failure#:~:text=A%20single%20point%20of%20failure%20(SPOF)%20is%20a%20part%20of,application%2C%20or%20other%20industrial%20system.) (SPOF's) in your architecture and then replicating those is another option to lower the **impact%** or maybe doing [canary releases](https://martinfowler.com/bliki/CanaryRelease.html) with dedicated groups of users thus lowering the **impact%**

# The key point

![Lowering impact percentage](https://dev-to-uploads.s3.amazonaws.com/i/hntykuemjvm8hln6ydel.png)

Having this calculation means we can start to prioritise which areas of the SLO impact we focus on.
Adding badges to your open source project in 2 seconds
Tags: opensource, github, productivity
Published: 2020-10-05 11:04:06

Are you a open sourcer or maintainer for open source project?? Have you automated adding badges to your repo?? Let me know how you do it.

Adding badges to your readme file is such a pathetic and robotic feel job. I have seen people doing following
1. Everytime go to shields.io or badgen.net
2. Search for your badge by name e.g. travis
3. Copy the url paste to your readme
4. and format it to add links to proper destination etc etc

damn it took 45 seconds for me to type the process and may be 15 seconds for you to read all the steps. Imagine how much time it will take to add 10 badges.

I thought there must be some tool out there to do this but I did not find one (Please comment if you know of any such tool)

But I decided to created one such tool which will
1. See for all files through your current working directory
1. and add badges accordingly

## Here is the demo of it running

{% asciinema 362652 %}

## How can you use it
1. `npm i -g git-auto-badger`
2. add a placeholder in your readme to tell where to add badges check [the repo](https://github.com/technikhil314/auto-badger) for more info
3. run `auto-badger`

Done. All the necessary badges for any OSS project are addeddto your markdown. Commit and push. Njoy.

By necessary badges I mean following

Build status, Code coverage, NPM package version, Dependancies monitor, all contributors count, star on github, fork on github

visit https://github.com/technikhil314/auto-badger for more details. Feel free to give feedback or leave comment.
Create Customer Attribute with data script - Magneto 2
Tags: magento2
Published: 2020-10-05 10:42:46

Path - app/code/Vendor/Module/Setup/Patch/Data/AddCustomCustomerAttribute.php

```
<?php

namespace Vendor\Module\Setup\Patch\Data;

use Magento\Customer\Model\Customer;
use Magento\Customer\Setup\CustomerSetupFactory;
use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\Patch\DataPatchInterface;

class AddCustomCustomerAttribute implements DataPatchInterface
{
    /**
     * @var ModuleDataSetupInterface
     */
    protected $moduleDataSetup;

    /**
     * @var CustomerSetupFactory
     */
    protected $customerSetupFactory;

    /**
     * @var AttributeSetFactory
     */
    protected $attributeSetFactory;

    /**
     * AddCustomerPhoneNumberAttribute constructor.
     * @param ModuleDataSetupInterface $moduleDataSetup
     * @param CustomerSetupFactory $customerSetupFactory
     * @param AttributeSetFactory $attributeSetFactory
     */
    public function __construct(
        ModuleDataSetupInterface $moduleDataSetup,
        CustomerSetupFactory $customerSetupFactory,
        AttributeSetFactory $attributeSetFactory
    ) {
        $this->moduleDataSetup = $moduleDataSetup;
        $this->customerSetupFactory = $customerSetupFactory;
        $this->attributeSetFactory = $attributeSetFactory;
    }

    /**
     * {@inheritdoc}
     */
    public function apply()
    {
        $customerSetup = $this->customerSetupFactory->create(['setup' => $this->moduleDataSetup]);

        $customerSetup->removeAttribute(
            Customer::ENTITY,
            'custom_attribute'
        );

        $customerEntity = $customerSetup->getEavConfig()->getEntityType(Customer::ENTITY);
        $attributeSetId = $customerEntity->getDefaultAttributeSetId();

        $attributeSet = $this->attributeSetFactory->create();
        $attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);

        $customerSetup->addAttribute(
            Customer::ENTITY,
            'custom_attribute',
            [
                'type' => 'varchar',
                'label' => 'Custom Attribute',
                'required' => false,
                'user_defined' => true,
                'sort_order' => 1000,
                'position' => 1000,
                'default' => 0,
                'system' => 0
            ]
        );

        $attribute = $customerSetup->getEavConfig()->getAttribute(
            Customer::ENTITY,
            'custom_attribute'
        );

        $attribute->addData(
            [
                'attribute_set_id' => $attributeSetId,
                'attribute_group_id' => $attributeGroupId,
                'used_in_forms' => ['adminhtml_customer']
            ]
        );

        $attribute->save();
    }

    /**
     * {@inheritdoc}
     */
    public static function getDependencies()
    {
        return [];
    }

    /**
     * {@inheritdoc}
     */
    public function getAliases()
    {
        return [];
    }
}
```
Quick fix for current spam deluge
Tags: javascript, spamfilter, greasemonkey, showdev
Published: 2020-10-05 10:26:33

---
title: Quick fix for current spam deluge
published: true
description: GreaseMonkey script to filter out spam
tags: javascript, spamfilter, greasemonkey, showdev
//cover_image: https://direct_url_to_image.jpg
---

If you use [Grease Monkey](https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/) or similar, you can use this user script to filter out the current spam posts in your feed:

``` javascript
// ==UserScript==
// @name     dev.to spam filter
// @version  1
// @include  http*
// @match    *://dev.to/*
// @grant    none
// @run-at   document-end
// ==/UserScript==

const dev_posts = document.body;

const config = { attributes: false, childList: true, subtree: true };

const callback = function(mutationsList, observer) 
{

  for(const mutation of mutationsList) 
  {
    if (mutation.type === 'childList') 
    {
      let posts = document.querySelectorAll('article');

      posts.forEach(post =>
      {
        const title = post.querySelector('.crayons-story__title a');
        if(title.innerHTML.replace(/\n/g, '').match(/customer.*care.*number/i))
        {
          post.parentElement.removeChild(post);
          console.log('removed post')
        }
      });
    }
  }
};


// Create an observer instance linked to the callback function
const observer = new MutationObserver(callback);

// Start observing the target node for configured mutations
observer.observe(dev_posts, config);
```

Obviously this is a temporary work around while smarter people look at real spam filters, but my feed was unbrowseable :D

You'll need to do a hard refresh for the filter to kick in.

Thanks to [MDN](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver/MutationObserver) for the mutation observer code.
What are the controllers in AngularJS?
Tags: angular
Published: 2020-10-05 10:13:47

To understand the concept of controller, I would suggest you start reading MVC.

MVC is nothing but Model View Controller.

Now every Angular Application is based on MVC structure.

Model : The application which has the business logic and data model, usually the application which is connected with database.

View: The HTML code that will be visible to the user afterwards.

Controller: The code which will call different functions to get the right data from model to the view .

Specifically for an Angular app, every ng-app is assigned a controller. Whenever the said ng-app is started, its controller comes in action. The functionality of the page will then come from this controller.

Controllers in Angular is to expose/bind data to our view via $scope, and to add functions to $scope that contain business logic to enhance view behavior. Presentation logic should remain within views and directives.

Controllers will refresh data every time it gets refreshed on loading, unlike services it retains the data on consequent Refreshes.

Meet the Experts : https://nareshit.com/angularjs-online-training/
Monday Express [Day 3] Exercism
Tags: javascript, codechallenges, mondayexpress, devcirles
Published: 2020-10-05 10:07:36

---
title: Monday Express [Day 3] Exercism
published: true
description: Hello, welcome to the third BigO notation challenge where we will be solving a few challenges.
tags: #javascript #codechallenges #mondayexpress #devcirles
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/4488mv01buah66hehf5a.jpg
---
Hello, welcome to the third BigO notation challenge where we will be solving a few challenges.

Thank you all for last week's remarks. We had a chance to read a detailed explanation of what BigO notation is and how you can go about solving the challenges. 

We have been solving challenges and today I found out about a wonderful platform that is free [Exercism](https://exercism.io/) and also we could maximize it. 

Through this, it would help improve your problem-solving skills and even tackle big company coding challenges.

That is why I created a team link where we can solve challenges and share what we learned from the challenges.

To Join click on the link here [Monday Express](https://teams.exercism.io/teams/4mK15pBixpJyy3K63eJe3RZh/join). If you need more languages covered you can always reach out

Let's Join and solve these challenges.
Why You Should Choose Magento 2 for eCommerce Development in 2020
Tags: discuss, magento, ecommerce
Published: 2020-10-05 10:04:47

Top open-source CMSs including WordPress, Joomla, and Drupal can be your good choice for developing online storefronts. But, all these platforms have eCommerce plugins or extensions, and therefore, they are not suitable for developing a fully functional, large-scale online shop. Here, a dedicated eCommerce platform known as Magento comes into the picture.

Magento 2 has the latest features and advanced functionality to power future-ready, full-fledged shopping cart solutions. Its excellent performance and user-friendliness with higher security and flexibility help it stand out from several available solutions for eCommerce web development. Magento 2 is a robust platform to develop an elegant online shop. A Magento eCommerce development company can utilize its features to make a customized eCommerce website with desired features.

Here in this blog, we are going to see some of the key benefits of Magento 2 from the perspectives of end-users, developers, and store owners. Let’s start with the end-users because they are the driving force for your online business.
1:1 Help for DevOps
Tags: devops
Published: 2020-10-05 09:52:44

To all DevOps out there that need help with a particular subject or designing an architecture you can schedule a free 1:1 call with the volunteers at [GetAdvice](https://getadvice.github.io/)

Volunteers:

[Juan Manuel Irigaray](https://getadvice.github.io/juan.manuel.irigaray.juancho.jxoir.html)
[Christian Melendez](https://getadvice.github.io/christian.melendez.html)
[Todd Densmore](https://getadvice.github.io/todd.densmore.html)

Please read the rules before scheduling a call https://getadvice.github.io/rules-and-conditions.html#if-youre-seeking-advice

*Disclaimer: I'm the guy behind GetAdvice (volunteers are needed!!). This is a way to promote getadvice.github.io and get more volunteers and users into the site too.*

*Image credit: https://instagram.com/luca_nardone*
WordPress: Disable integrated XML Sitemap
Tags: webdev, wordpress, php
Published: 2020-10-05 09:45:39

A major innovation of WordPress 5.5 is the integrated XML sitemap. Any additional sitemap plug-ins are therefore no longer needed. But what if you want to continue to use your previously used Sitemap Plugin? After all, the integrated Sitemap function of WordPress is not very feature-rich.

The XML Sitemap of WordPress can be easily deactivated. To do so, you only have to integrate the following code in the functions.php of the currently used theme or child theme.

```
add_filter( 'wp_sitemaps_enabled', '__return_false' );
```

For beginners: What is a XML Sitemap?

A sitemap in XML format usually contains all contents or content types of a website. This can not only be pages, but also articles, videos or products. The sitemap helps the Google Crawler to "browse" and index the website. Especially complex websites with a lot of content and complex structures may not be indexed as desired. Therefore Google recommends the use of a sitemap from at least 10,000 pages.
PR maturity timer resets in hacktober profile
Tags: hacktoberfest, discuss
Published: 2020-10-05 09:41:51

Its my first Hacktober and I was super excited for making my  contribution. I have submitted 5 PRs in total and got the first four updated on my Hacktober profile.

At the time of submisison the maturity timer stated 6d:xh:xm:xs.
But on the following days I have noticed that the timer changed to 10d:xh:xm:xs.
And now everyday when I login I can see that the maturity timer resets to 10d:xh:xm:xs.

Is this normal?
EML to PST Converter Software to Export EML files to Outlook
Tags: emltopst, convertemltopst, emltopstconversion
Published: 2020-10-05 09:39:12

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/al2e7psy2b374aqca374.jpg)

This EML to PST Converter Software can Export EML file to Outlook PST format with all mailbox items like: calendar, draft, notes, meeting, and task and outboxes etc. You can easily Export your any size of EML file to Outlook PST file format without any file size limit. This Software has simple and easy GUI Interface where you can easily operate it without any technical knowledge. This Software supports all the latest versions of MS Outlook and Windows OS.

Try this Software free demo version from here: http://www.emltopstfile.com
EML to PST Converter Easily Export & Import EML files to Outlook
Tags: emltopst, convertemltopst, emltopstconversion, emltopstmigration
Published: 2020-10-05 09:36:15

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/x9dr71bxjwo5p1xrsqk8.jpg)

You can try this EML to PST Converter tool and Export & Import EML files to Outlook PST format. this software also allows user to save EML file into MSG file format. this software comes with many advanced features like: Selective Conversion, batch conversion, Preview facility. Free trial version etc. you can also save 15 emails per folder at free of cost by using this software free trial version. checkout free trial version and see the original results.

You can try this Software free trial version from here: http://www.emltopstutility.com
Candlestick with React & Recharts
Tags: recharts, react, charts, beginners
Published: 2020-10-05 09:14:10



## My experience with Recharts

- Easy & quick
- Not too bulky
- Typescript support
- Lots of alternative way to overcome bugs
- And most important works well with pdf generations



## Quick Example

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/vy3qt4hhlzx82gaaoa94.JPG)

Candlestick with error-bar. 
[jsfiddle](https://jsfiddle.net/coktopus/kfpd0oL5/26/)



<iframe width="100%" height="300" src="//jsfiddle.net/coktopus/kfpd0oL5/26/embedded/js,html,css,result/dark/" allowfullscreen="allowfullscreen" allowpaymentrequest frameborder="0"></iframe>
Why not dismantling capitalism alltogether?
Tags: capitalism, cruiseships
Published: 2020-10-05 09:09:14

{% twitter 1312775548410658817 %}

I encourage you to click through the whole [image gallery](https://www.reuters.com/news/picture/cruise-ships-dismantled-for-scrap-after-idUSRTX7ZIVD). As I encourage you to overthrow this inhumane system.
Bad Programming Habits
Tags: tips, productivity
Published: 2020-10-05 08:55:47

1. can’t focus on one language
2. don’t have fundamentals clear
3. think you know everything
4. don’t utilize the resources
5. ignore errors
6. don’t know how to optimize the code
7. refuse to ask for help
8. freeze under pressure
9. don’t write enough comments
10. can’t accept new technologies
11. copy code from online
12. don’t plan before implementing
13. count hours
14. over engineer simple problems
15. ignore suggestion of others
16. don’t practice much
17. give up too soon
18. don’t use social media
19. don’t interact with programming community
20. don’t keep project manager updated
21. are not clear about what you’re doing

##see more [here](https://www.codesnail.com/bad-programming-habits-you-should-quit/) with detail
Application of Geotechnical Software in Concrete Testing
Tags: php, polymer
Published: 2020-10-05 08:44:17

Concrete screening consists of a range of approaches for testing concrete wetness, consisting of both area and the concrete within the piece's depths. Though not covered in ICRI certification, one frequently utilized method is moisture meters, which can be utilized to discover locations of higher surface wetness. However, this technique should not be used to obtain a quantitative worth of the wetness or suggest whether a slab is dry enough to start covering the flooring, however primarily to reveal you where to start. As soon as you've gotten an excellent reading, your geotechnical software can directly transmit the data through the laboratory, using a mix of mobile and online technology.
There are normally three moisture tests for concrete testing covered in ICRI certification. These include the calcium chloride test for wetness vapor emission rate of a slab, the surface relative humidity test, and the piece internal relative humidity test.
In concrete screening, the calcium chloride test measures the MVER of a piece, which is the amount of WATER vapor emitting from the concrete's surface area. Quite a couple of companies determine sets for this service, however it's best to utilize a screening set compatible with geotechnical software so the data can be moved immediately to the lab over the Internet.
Each calcium chloride test is conducted using a little dish of dry bone calcium chloride placed under a plastic dome to develop a closed environment over the concrete. The CaCl then takes in all wetness produced from the concrete for accurate measurement.
Once you have gotten accurate concrete screening data, the info is immediately cataloged by your geotechnical software and transferred electronically back to the lab. The concrete screening itself may be comparable, however the transfer of information could not be simpler.
We will share a lot of knowledge about concrete software and machinery for you, if you are interested you can read our articles. We are professional suppliers of <a href="https://www.hkfloormach.com/concrete-power-trowel-machine-for-sale/">power trowel machine</a> and <a href="https://www.hkfloormach.com/concrete-ride-on-power-trowel-for-sale/">Ride On Power Trowel</a> and welcome all concrete contractors to purchase our products.
Custom application development in meal delivery services
Tags: food
Published: 2020-10-05 08:39:12

Consumers want to crosscheck whether the listed eateries in the online meal ordering application are genuine or not, and they are placing meal requests there. Eatery receives the instant notification about the meal order. They accept the order and start preparing the foods. In the meantime, the online food ordering system assigns a delivery executive. Consumers have a question of how do believe the meal came from the eateries. GPS enabled tracking system is used in online food dispatch applications. Consumers can track their meal request in their mobile itself. It shows the driver journey towards restaurant, food picked-up and drivers movement towards consumer location.

*Adaptability:* Custom designed [online food ordering system]   (https://www.kopatech.com/restaurant-food-ordering-system)
has more benefits compared with ready-made platforms. Food dispatch company should use custom website in a way to integrate the existing software for improving the productivity. Ready-made platforms won't support existing software. Thus, the customized web application contributes more to the growth of dispatch organization.

*Cost-saving idea:* If an organization wants to launch an exclusive application, then the entrepreneur should appoint few employees to develop the website and mobile application. It creates a financial burden for the organization in the long-term. If the company chooses a custom web application, then it will save money over the period. There is no need to pay for product license, and nominal annual maintenance charges should be charged.

*Benefits:* Ready-made platforms are available with basic features and it gives an average user experience. Custom web application development gives better consumer experience, and it enhances the interaction between businesses and clients. The custom application is scalable. If the business grows, then the entrepreneur can scale up. If the business goes down, the business owner can scale down just as easily. Food dispatch applications need to have this kind of flexibility.
Geodesic shapes
Tags: watercooler
Published: 2020-10-05 08:10:31

Dear Alan Turing, I am very sorry to not live up to your expectations, you once predicted we would need a great number of disciplined mathematicians.

I can barely spell mathematician, let alone do math. Fortunately I often say, to be a programmer, you don't need the answer, just the right question.

None the less, I'm interested in making procedurally generated planets, to achieve this, we need a sphere, a sphere with equally distributed points in 3D space.
As it turns out, nobody has actually solved the problem, there are PhD students working on the problem, that fills me with hope, if they can't quite do it, than maybe I can't either. It's got to be good enough.

So let's see, there are a few methods I could approach this. A rip off somebody else's code (tempting!). Ideally I should learn though. Maybe il write a crappy prototype in JavaScript.

{% codesandbox j0ryv %}

Now what.. I guess I need a lot more points, oh boy do I need a lot more points. The problem is my "algorithm" doesn't actually scale, at all. I need an algorithm that can draw an *n* sided shape and that's where the dumbness kicks in.

How?

What is the relationship between a hexagon and an octogon? 

Anyways take care everyone.