teleren/devto huggingface dataset:
Guiding principles for a new engineering team
Tags: culture, discuss, jobs, career
Published: 2020-10-10 22:25:45

---
title: Guiding principles for a new engineering team
published: true
description: What principles should guide engineering decisions at a scaling startup?
tags: culture, discuss, jobs, career
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/xuv8r7r4li0j2l3f1bkk.jpeg
---

What principles should guide engineering decisions? At [Procuret](https://procuret.com) we are starting to scale up. It's time for us to grow our engineering team. I want to ensure that we can do so while retaining a principled engineering culture.

To that end, I've drafted up the following [principles](https://procuret.com/engineering/principles). 

## 1. User data are sacrosanct

Anyone that interacts with our software provides us with data. These data might be deeply and obviously personal, like identity documents. They might be less obvious personal, like browser data, approximate location, or usage patterns.

All of these data are sacrosanct. Protecting these data from inappropriate access, by parties internal or external, with intentions malcious or careless, are our primary concern at all times.

## 2. There is no such thing as "User error"

There's an old joke that some errors have the code PEBKAC: Problem Exists Between Keyboard and Chair. While funny, if used in seriousness such a joke reveals a dangerous arrogance. If someone using our software is confused, we have done something wrong. Our software is the problem.

## 3. Speed is quality

How often do we release updates, how fast do we build new features, how quickly does our test suite run, how rapidly do we fix reported bugs, and how short is our page load time on customer devices?

The faster we can do these and other things is a measure of our performance. What we do in a day is less important than how fast we do it.

## 4. There are no stupid questions

If you don't understand what someone else is saying, there is a very strong chance they don't understand either. Ask questions for your sake and the sake of everyone around you.

## 5. Readable code is good code

Our code should be at least somewhat comprehensible to non-technical observers. Declarative, natural language code is fast, maintainable code.

--//--

What do you think? Have I got it right? What would you add or change?
Object Oriented Principles 
Tags: oop
Published: 2020-10-10 22:21:16

Through my time as a student I have found that using an analogy of something that I already understand to be extremely helpful when remembering or solidifying concepts.

Object Oriented Programming involves the use of classes. When first learning about classes, it seems that the most used analogy includes the car. Throughout this article we will be using a different analogy, the analogy of an oven.

# The oven as a class
- Properties of an Oven
  - Color
  - Dimensions
  - Amount of burners
- Methods of an Oven
  - heating()
  - heatSensing()

Properties and methods are involved in the class blueprint, or in this case, the oven. The values of the properties can change from product to product, and the methods listed here seem to be required by all ovens. 

# The major concepts 

When remembering the major concepts involved with object oriented programming this is the (kind of) mnemonic I use: **Easy as Pie**
- **Encapsulation**: Groups related variables and functions that operate on the object.
  -  This is how we know what the object is. If the oven in question was able to cool our food would it still be an oven?
- **Abstraction**: Hides complexity.
  - The main purpose of an oven is to heat food, but how does it do it? Like in the method heating() seen above it is abstracted away. The user doesn't need to know what is going on in the backend and honestly as long as their food is being heated they generally don't care. 
- **Inheritance**: Eliminates redundant code through creating classes with features used from the parent class.
  - A toaster oven IS-A form of oven. Oven would be the toaster oven's parent class, and the toaster oven has the properties and methods inherited from oven.
- **Polymorphism**: Many forms of methods.
  - Using the toaster oven example, it has the inherited method heating() from oven. The way the toaster oven heats the food is not the same as an oven. Therefore, the toaster oven heating() overrides its parent method of heating().
Factorial of a number
Tags: dotnet
Published: 2020-10-10 22:04:20

Step 1: Open Visual Studio and select console application.
Step 2: Write a Program to find occurrence of character in string

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace CharacterOccurrenceApp
{
    class Program
    {
        static void Main(string[] args)
        {
            string Statement = string.Empty;
 
            Console.WriteLine("Enter a string to check occurrence of a character numbers");
 
            Statement = Console.ReadLine();
            Statement = Statement.ToLower();
 
            if (Statement.Length > 0)
            {
                while (Statement.Length > 0)
                {
                    int CountCharacter = 0;
                    Console.Write("Number of Occurance of '" + Statement[0] + "': ");
                   
                    //Checking the Character occurrence in the string entered by the user
                    for (int i = 0; i < Statement.Length; i++)
                    {
                        if (Statement[0] == Statement[i])
                        {
                            CountCharacter++;
                        }
                    }
 
                    //Count of each character
                    Console.Write(CountCharacter + "\n");
 
                    //Removing that character from the string
                    Statement = Statement.Replace(Statement[0].ToString(), string.Empty);
                }
            }
            Console.ReadLine();
        }
    }
}

Step 3 : Run the application then console will be open.
Step 4: Enter the string then press "Enter" key then see the output.
Sparrow plugin to search / check resources in Azure resource group
Tags: azure, devops, automation, sparrowhub
Published: 2020-10-10 21:13:50

---
title: Sparrow plugin to search / check resources in Azure resource group
published: true
description: Sparrow plugin to search / check resources in Azure resource group, good for automation
tags: azure, devops, automation, sparrowhub
//cover_image: https://direct_url_to_image.jpg
---

Ever thought how to check if some resources exists in Azure resource group? This tasks is very common for those who deal with an Azure infrastructure automation.

Here is [azure-resource-group](http://sparrowhub.io/plugin/azure-resource-list/0.000003) plugin for the rescue:

# Load resource list

```perl

# list all databases in RG_001102:

my %state = task-run "get resources list", "azure-resource-list", %(
  group     => "RG_001102"
  pattern  => "'servers/databases'"
);

for %state<list> -> $d {
  say $d.perl;
}
``` 

# Validate if specific resources exist in a resource group

```perl

# Check if there is any storage account in RG_001102:
   
task-run "get resources list", "azure-resource-list", %(
  group     => "RG_001102"
  list => (
    "Microsoft.Storage/storageAccounts"
  )         
);
``` 

---

That is it. See updates on [Sparrowhub.io](http://sparrowhub.io)
Type Guards in Javascript Using JSDoc Comments
Tags: typescript, jsdoc, webdev, javascript
Published: 2020-10-10 21:02:50

In Typescript you can write [type guards](https://www.typescriptlang.org/docs/handbook/advanced-types.html#type-guards-and-differentiating-types) to filter down a union type to a single type.  For example:

```ts
// user-defined type guard
function isFish(pet: Fish | Bird): pet is Fish {
  return "swim" in pet;
}

const pet: Fish | Bird = getPet();

// at this point you either have a Fish or Bird

if(isFish(pet)) {
    // at this point you (and tsc and intellisense) know you have a Fish
    pet.swim();
} else {
    // at this point you (and tsc and intellisense) know you have a Bird
    pet.fly();
}
```

## JSDoc Type-Checking Version

What if you write your code in Javascript and use [JSDoc comments for type-checking and intellisense](https://goulet.dev/posts/build-a-pwa-without-a-build-step/#type-checking)?  You can still write and use type guards!

```js
/** @typedef {{swim: () => void}} Fish */
/** @typedef {{fly: () => void}} Bird */

/**
 * @param {Fish | Bird} pet
 * @returns {pet is Fish}
 */
function isFish(pet) {
  return "swim" in pet;
}

/** @type {Fish | Bird} */
let pet = getPet();

// at this point "pet" is either a Fish or Bird

if (isFish(pet)) {
  // at this point you (and tsc and intellisense) know you have a Fish
  pet.swim();
} else {
  // at this point you (and tsc and intellisense) know you have a Bird
  pet.fly();
}
```

> Hopefully you found this post helpful, if you have any questions you can find me [on Twitter](https://twitter.com/wes_goulet).
How to useState in React?
Tags: react, frontend, usestate
Published: 2020-10-10 20:41:59

hey!

As a newbie, when I started react JS, I don't know where to start today I'm learning how use useState hook in react.

newbie code.

```
import React, { useState } from "react";
import "./App.css";

function App() {

  const [activated, setActivated] = useState(false);
  return (

    <div className="App">
      <h2>React useState Hook</h2>
      <p>I am {activated ? "on" : "off"}.</p>
      <button type="button"
        className="main-button"
        onClick={() => setActivated(activated ? false : true)}> 
       {activated ? "Deactivate Me !" : "Activate Me !"}!</button>
    </div>

  );

}

export default App;
```
My #100DOC - Day 45
Tags: 100daysofcode, challenge
Published: 2020-10-10 20:28:03

### Day 45: October 10, 2020

#### **Today's Progress**: 
1. **[Continued with Confección y Publicación de Páginas Web Course](https://github.com/pablohs1986/confecci-nYpublicaci-nDeP-ginasWeb_SEPE)** (1h 30min):<br>I did the exercises in the second part of the course, applying basic CSS concepts.
    
#### **What I learned**: 
* Review of basic CSS concepts.

#### **Total time**:
1h 30min.
Alternative to Bootstrap??? 🤔
Tags: discuss, webdev, beginners, css
Published: 2020-10-10 20:19:52

hey! 

As a newbie, when I started in web development I went straight to Bootstrap.

Today I found this [post](https://es.quora.com/Están-jQuery-y-Bootstrap-anticuados-He-le%C3%ADdo-que-ahora-están-siendo-reemplazados-por-React-y-CSS-pero-sigo-viéndolos-en-tutoriales-para-desarrolladores-web-Vale-la-pena-que-un-principiante/answer/Ranferi-Márquez?ch=99&share=6643426c&srid=uxsvXF) where they say it is outdated.

Tell me, what should I wear? What is trend? Pure CSS? Some other framework?

Thanks, as always.
Paying yourself first with non-negotiables
Tags: 100daystooffload
Published: 2020-10-10 20:16:05

I just finished reading [this article](https://blog.doist.com/pay-yourself-first/) on the Doist *ambition and balance* blog. In it, the concept of "paying yourself first" relates to spending the beginning of your day doing things that are important to you. By prioritising two or three "non-negotiables", you start each day with something that brings you joy or provides inspiration or motivation. If you do them first, you cannot run out of time once the rest of the day takes over.

Without thinking about it in these terms, I have been putting my running at the very beginning of the day. Despite this [becoming harder to do](https://dev.to/pestrickland/the-surprise-of-darkness-3l2i) now that it is dark, it ensures that I do not miss out on that time if my work overruns or something else comes up.

With running now established as a good routine in the mornings, the Doist blog post made me wonder what else I could do before starting work. It would mean starting a bit later, but that might not be such a bad thing.

Reading is the other activity I find a lot of joy in, and it is also the one that gets pushed to the bottom of the list in any given day. With a long reading list, magazine subscriptions and email newsletters to get though, a few minutes of guaranteed reading time in the morning might be just what I need.

For all its horrors, 2020 has provided me with a lot of inspiration to experiment with how I live and work. If that's the only good to come of the year, at least it is something.

_I'm publishing this as part of 100 Days To Offload. You can join in yourself by visiting [https://100daystooffload.com.](https://100daystooffload.com)_
Numbers All Programmers Should Know - System Design Basics
Tags: webdev, javascript, career, tutorial
Published: 2020-10-10 20:09:56

**Rote memorization is usually a bad idea for programmers but in some cases it's worthwhile to know something by heart.**

In this video tutorial I'll cover some useful numbers that I think are essential and worthwhile for programmers and software engineers to memorize for many different situations. Knowing this stuff will help you quickly map out the requirements for new projects or adding features to existing projects, help you in system design interviews, and also help you determine how to properly architect an application depending on cost and performance requirements.

Topics covered:
* **Latency numbers with examples**
* **Data size conversions**
* **How to estimate traffic, memory, bandwidth, and storage requirements with formulas and example problems**

{% youtube zbhrtO2gapY %}

If you're interested in other system design topics be sure to check out my other articles and videos
{%link https://dev.to/renaissancetroll/load-balancer-tutorial-2020-system-design-basics-4g3i %}
Poisson Probability in Soccer
Tags: python, datascience, machinelearning, beginners
Published: 2020-10-10 20:02:35

In the previous [examples](https://dev.to/xsabzal/poisson-probabilities-2efb), we calculated Poisson probability on a single data point. Here, I am going to calculate the probabilities of soccer teams scoring a particular number of goals in a match. These probabilities are used to get odds based on historical results. I would like to note that it is a simplified approach because it does not account for the other important factors and features, e.g. injured players, players’ position for the particular match, new players and coaches, etc.  I used the English Premier League data for this analysis, the link to the data source is [here](https://www.kaggle.com/irkaal/english-premier-league-results).

###**Game outcome probabilities**

I used season 2017-2018 data to calculate teams’ defense and attack strength. 20 teams played 380 games total. Because there were 3 new teams in the season 2018-19, I showed only 17 teams' results. You can find a Python script [here](https://github.com/xs-abzal/Blogs_stat_examples/blob/master/ranking_systems.ipynb).

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

Let’s apply 2017-18 historical data to calculate the outcome probabilities of the first matches in season 2018-19. Particularly, we convert probabilities of scoring n number of goals to the home team win, away team win, and draw. 

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

###**Conclusion**

In this example out of 14 games, the results of 11 games correlated with calculated probabilities. As I have already mentioned in the beginning, these probabilities do not account for the specifics of the particular games. Also, here I skipped a test which checks whether a Poisson distribution is a good approximation.
As part of feature engineering, I would like to check if the above approach could be adjusted for the horse races, e.g. using gate numbers instead of home and away teams.
This project allows you to do streaming to multiple platforms like Twitch, YouTube, or Periscope at the same time!
Tags: showdev, bash, docker, node
Published: 2020-10-10 19:46:55

Hey DEV! 👋

I just published a GitHub project that allows you to self-host a streaming server so you can stream to multiple platforms at the same time.

At the moment, Twitch, YouTube, and Periscope are the only supported platforms. Adding a new one is easy, so I encourage you to create a PR if you need support for other platforms 😄

Here's the repo: https://github.com/HorusGoul/rtmp-social-multicast

{% github HorusGoul/rtmp-social-multicast %}

---

Follow me on [Twitter](https://twitter.com) if you want to know more about my future projects, posts, or whatever I came up with!
Slot Joker Terbaru Dari Joker123 Gaming
Tags: slotjoker, jokergaming, situsjoker, agenjoker
Published: 2020-10-10 19:42:12

Slot Joker ini selain sangat menghibur, juga bisa memberikan keuntungan bagi para pemain yang berhasil memenangkannya. Sebab setiap kemenangan yang didapat akan dibayar dalam bentuk uang asli pula. Maka dari itu permainan tersebut kian diminati oleh banyak orang. Nah, untuk bermain kita bergabung bersama salah satu agen yang menyediakan akun Joker123 Gaming.

Jika sahabat juga merupakan salah satu penggemar permainan ini, disini saya merekomendasikan kepada sahabat untuk bergabung bersama SkyJoker.net. Sebab situs kami ini sudah terbukti sangat berkualitas baik itu dari segi pelayanan ataupun dari segi produk yang disediakan. Seperti produk permainan Joker123 (Joker Gaming) yang merupakan situs terbaik dan terbesar di Asia saat ini.

Dalam melakukan pendaftaran akun permainan online sama saja. Dimana pemain dapat melakukan pendaftaran dengan 2 cara mudah yakni melalui layanan chat atau melalui halaman pendaftaran yang sudah disediakan di situs SkyJoker.net.

Ada beberapa data yang diperlukan dalam pendaftaran akun ini, diantaranya:

• Nama Rekening :
• No Rekening :
• Jenis Bank :
• No Hp / Kontak Wa :
• Email :
• Jenis Permainan :

Setelah mendapatkan akun permainan, sahabat dapat melakukan deposit dengan minimal deposit sebesar Rp 25.000. saja. So, jangan tunggu lama lagi, segera daftarkan akun permainan sahabat sekarang juga dalam memainkan game Slot Joker.
How to use Pandas
Published: 2020-10-10 19:34:26

I am writing this post as a cheat sheet for using the python package "Pandas".

### Importing Pandas:

import pandas as pd

### Reading from a CSV: 

dataframe = pd.read_csv('relative_path_to_your_file')

### Look at first three rows:

dataframe[:3]

### Selecting a column:

dataframe['column name']

### Plotting a column by name:

dataframe['column name'].plot()

### Plotting all columns:

dataframe.plot()

## Conclusion

As you can see, pandas is a very powerful library for working with data sets. It allows us to reformat the data, and chose how we want it to be displayed to gain insights into our datasets.
Creating a new Database using PostgreSQL
Tags: postgres, database, commandline, computerscience
Published: 2020-10-10 19:31:48

>The following steps are only meant for Windows Users.

**How to connect the database server to Windows**
1. Click on the Windows start button and Navigate to PostgreSQL 13.
2. From there, open the SQL shell and follow the steps demonstrated below to create a new database on Postgresql:
![Postgres](https://dev-to-uploads.s3.amazonaws.com/i/iezccbnv4r3ukqm0usql.png)

You can create the database with the name of your choice. In the above shell:
- \l is used to list all the databases created. You can easily see your newly created database at the bottom (testdb).
- \c connects you to your database "testbase".

And with that, your new database has been created!

Happy Learning! :smiley:
سرچ سریع در ویندوز
Published: 2020-10-10 19:02:10

یک امکانی که خیلی از کاربران ویندوز آرزوی داشتن اون رو دارن که به صورت پیشفرض در مک و لینوکس وجود داره اینه که بتونیم با یک دکمه یا دو دکمه ی شورتکات خیلی سریع بین فایل ها و نرم افزارامون یا حتی در گوگل سرچ کنیم ! 

تازگی با یک نرم افزار آشنا شدم که دقیقا همین امکان رو برای ما ایجاد میکنه و میتونیم به راحتی در کامپیوتر خودمون سرچ کنیم (به صورت پیشفرض با استفاده از ALT + space) 

اسم این نرم افزار ueli  هست که خیلی نرم افزار سبکی هست و سیستم های ضعیف هم به راحتی و با سرعت بالا میتونن ازش استفاده کنند ! 
این نرم افزار رو میتونید از microsoft store یا خیلی از سایت های ایرانی دانلود کنید 
تنظیمات خیلی دقیق برای شخصی سازی برای خودتون هم میتونید انجام بدید که داکیومنت هاش در سایتش موجود هست ! 
(این نرم افزار برای mac os هم در درسترس هست )


https://ueli.app
On World Mental Health Day
Tags: career
Published: 2020-10-10 18:56:22

---
title:On World Mental Health Day
published: true
description: My experiences with mental health
tags: career
cover_image: https://live.staticflickr.com/7013/6498667217_c972a5ba8d_b.jpg
---

Today October 10th, is [World Mental Health Day](https://www.who.int/campaigns/world-mental-health-day/world-mental-health-day-2020). A former colleague of mine posted some [thoughts](https://lowercaseopinions.com/mental-health) that I found to be really helpful. In turn, I wanted to write a little bit about my experience. 

I am tagging this as 'career'. Mental health issues have the ability to throw people off course and to make people feel alone. You are never alone.  

## Your mental health _is_ part of your physical health

Several years ago I had a sudden increase in anxiety symptoms and started to have severe panic attacks, sometimes without any idea what the trigger was. 

I sought help fairly quickly and it turned out that the problems had been triggered because my thyroid was extremely over-productive. If I had let things simmer, I could have easily ended up in the hospital fighting for my life against a thyroid storm. 

For me, my mental health issues were strongly tied to other things that were going on in my body. This isn't the case for everyone, but I think this experience highlights something very important. 

> Your mental health is part of your physical health. 

It is common to see mental health issues stigmatized in a way that physical health issues are not. Sometimes people don't take what is happening to them seriously because they see it as all in their head. So in case you were unsure, let me tell you:

> Your mental health deserves the same respect as your physical health. Mental health issues do not make you a bad person, in the same way allergies do not make you a bad person. 

## Your physical health is part of your mental health

I want to be careful here. You can not yoga your way out of a mental health problem. I also don't want to shift the stigma that currently exists in mental health onto a person's physical health. Health care access is not universal, free time is not free, and food deserts exist. We have a long way to go as a society. 

But I do want to share that my mental health has responded to changes in my physical health, both positively and negatively. Understanding this has helped me address physical issues faster (because my mental health may take a hit if I don't). I also know that taking hikes around my neighborhood helps me feel better not only physically, but mentally. 

It boils down to this:

> You deserve the resources to be proactive about your physical and mental health. Investing in your physical health reaps mental health gains. Even small steps should be celebrated. 

Be kind to yourself, today and always. 


-----
"Nature montagnarde" by gelinh is licensed with [CC BY-NC-SA 2.0.](https://creativecommons.org/licenses/by-nc-sa/2.0/)
Generating Custom HTML Invoices which also include Images and convert them to PDF
Tags: pdf, node, html, image
Published: 2020-10-10 18:43:31

there are multiple scenarios when the developer needs to build custom pdf for different customers.

**Let's start...**

`npm i html-pdf ejs`

{% gist https://gist.github.com/abdulRehman06/c454fb7d5ecc0313f135b4aa35109dc9 %}
Day 86: Custom events in Vue 
Tags: 100daysofcode, vue
Published: 2020-10-10 18:40:55

A custom event allows the parent component to listen to the events fired by child components. Data can be passed from a child to parent components as a payload of a custom event. `$emit()` is used to pass a custom event in vue. It take two parameters, the event name in kebab case and the payload(the data you want to pass). 


And that is day 86 in a paragraph.