teleren/devto huggingface dataset:
Ask Octopus - How do I aggregate output variable values across targets?
Tags: octopus, tutorial
Published: 2020-08-14 16:08:20

---
title: Ask Octopus - How do I aggregate output variable values across targets?
published: true
description: You have a step that sets an output variable with different values for multiple targets. What if you want to combine those variables into a single value to send in an email or write to a file? Find out how to do that in this Ask Octopus.
tags: octopus,tutorial
series: Ask Octopus
---

You have a step that sets an output variable with different values for multiple targets. What if you want to combine those variables into a single value to send in an email or write to a file? Find out how to do that in this Ask Octopus.

{% youtube zzDqfY_S5w8 %}

Do you have a question about how to use Octopus? Email advice@octopus.com and someone from our team will get you an answer. You might even see it in a future episode.

Join our community slack at https://octopus.com/slack
What is the most practical server side language to learn in 2020 - 2021?
Tags: webdev, discuss, codenewbie, beginners
Published: 2020-08-14 16:07:29

The only backend server side language I know is Node.js. However I have noticed that on some job search platforms server side languages like Java seem to be the most in demand. And I recently had a recruiter reach out to me about a role but the backend server side languages that they wanted was either Java or Python. Node.js is growing in popularity but it seems like there are still many other server side languages that have more usage within the industry.
why to use sync.WaitGroup in golang?
Tags: go, goroutine
Published: 2020-08-14 15:47:14

> WaitGroup instance is available in sync package in golang. WaitGroup is required to force Main GoRoutine to wait all other GoRoutine complete their tasks. 

Before we see how to use waitgroup lets discuss about Goroutines first.

#### what is Goroutine?
> Goroutine is separate path of execution if you familiar with Java, it is same as thread.

By default there is will atleast one Goroutine in golang program, which i call as **Main Goroutine** as i come from java background. 

On top of that you can create your own Goroutine which can be called as **user defined Goroutines**.

#### How to create Goroutine?
> it is simple, just use prefix "go" to your function call.

    eg :   go myTask() // creates a Goroutine.


#### why we need WaitGroup? lets look at this example

    package main
    import "fmt"
    func task(msg string) {
	for i := 0 ; i < 10 ; i++ {
		fmt.Println(msg)
	}
    }

    func main() {
	    // we are creating two goroutine
        go task("first")
	    go task("second")
    }

> output : program exited


In the above example , we are creating two Goroutine but we are not making Main Goroutine to wait till "first" and "second" Goroutine completes. Now sync.WaitGroup comes into picture.

#### steps to use sync.WaitGroup

1. import "sync" package and declare variable sync.WaitGroup 
2. increment counter by using function Add(numberOfGroutineAdding)
3. use Wait() at the end of program
4. use Done() when each Goroutine is completed. It decrements counter by 1.

#### Now working example with sync.WaitGroup

    package main

    import (
	"fmt"
	"sync"
    )

    func task(msg string, wg *sync.WaitGroup) {
	for i := 0 ; i < 10 ; i++ {
		fmt.Println(msg)
	}
	wg.Done() // decrement counter
    }

    func main() {
	    var wg sync.WaitGroup
	    wg.Add(1) // incrment counter for "first"
	    go task("first", &wg)
	    wg.Add(1) // increment counter for "second"
	    go task("second", &wg)
	    // Main Goroutine will wait till "first" and "second" completes
	    wg.Wait() 
	
    }

> output: ten times "first" and "second" will be printed.

In the above program , we have added one more parameter sync.WaitGroup to call Done() when each Goroutine is completed.
The myth of "never going back to fix it later"
Tags: codequality
Published: 2020-08-14 15:52:33

There's a gained knowledge among senior engineers that if you take the shortcut now, expecting to "fix it later", you'll never fix it and it will live on forever.

There's a lot of truth to this _in general_, but I have an issue with it, having consistently overcome this throughout my work: It's only the truth if the organization does not value refactoring and slowing down the pace when needed.

Having a culture that values going over past work and improving on the shortcuts opens up an organization to make a lot of practical choices in the moment while knowing there will be an opportunity to fix what was broken later.

Knowing nobody will return to improve the code is a self-fulfilling prophecy. Engineers need to fight for a culture that allows for regular refactoring, cooldown work, and general maintenance in times when more information is known about the model we are developing for.

Happy coding ❤️
Building a New Life
Published: 2020-08-14 15:33:23

Recently, I decided to make a significant life change to begin a new career path. I had been working in the Zipline, treehouse, and rope course industry since 2014, but due to some recent life events, I have started to come to the realization that I might not be as young as I once was.  Therefore, it might be time for a change to something less body intensive. A close friend of mine recommended doing a introductory python course to get a feel for coding, and I absolutely loved it.  

From here, I began to do some research on pursuing a career in software development. My current partner recommended the bootcamp Flatiron School, which she attended a couple of years prior. After looking into the curriculum, Flatiron seemed like the obvious choice for me. It was very helpful in the decision process that I had her career to look at as a reachable outcome after attending a bootcamp. Throughout the application process, the admissions staff were helpful and easy to work with, giving an indication of the culture surrounding the bootcamp.

Fortunately, I have found a lot of correlation between my previous work and software development. Creating a product based off of a plan set seems to be something that will have a decent amount of overlap between the two fields. I have found that the long hours in ropes access work have made the transition into the hours required for learning much easier than I expected!

I have been very nervous and will probably continue to be during this transition. It is a very big change to go from living on the road to settling down into a career. However, I know that I can do it! The amount of information I have learned in a matter of 2 weeks has left me in awe of what my brain is capable of. I can't even begin to imagine what my progress will look like by the end of this journey.
Creating a Privacy Banner in CSS
Tags: css, webdev, learning
Published: 2020-08-14 15:32:24

## Introduction

Continuing my 30 Days of CSS, I've decided to spend more time on positioning to make sure that I understand it fully.  I've been learning CSS for about a week now and am finding it gradually becoming more natural :)

You can follow my progress on Twitter @cloudblogaas

## The Challenge

Today's challenge was to build a privacy notification bar that's locked to the bottom of the browser window.  I'm not worried about any of the JavaScript, or the notification displaying every time I load the page.  The challenge here is purely about CSS.

![Notification Bar](https://dev-to-uploads.s3.amazonaws.com/i/ho0r41td8zcmzhqyntbo.png)

## The Solution

As usual, the HTML is pretty simple.  It consists of a single `div` containing a single `p` and single `button`.

``` html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <title>Privacy Banner</title>
</head>
<body>
    <p>...</p>
    <p>...</p>
    <p>...</p>
    <p>...</p>

    <div class="notification">
      <p>This site uses cookies to understand how you use the site and improve your experience. This includes personalizing content and advertising. By continuing to use this site, you agree to this use. </p>
      <button>Learn More</button>
    </div>
</body>
</html>
```

The containing `div` for the notification bar is defined as:

``` css
.notification {
    position:fixed;
    left:0px;
    bottom:0px;
    background:#646464;
    transition: 1000ms;
}
```

This defines the position as `fixed` and on the bottom of the page.  The reason this is set to `fixed` and not `absolute` is so that the notification does not move when the page is scrolled.

A new attribute here is `transition`, that makes the notification bar "fade in" to the page within a time of 1000ms.  This just makes it look a little nicer.

The paragraph inside the notification simply has padding and color defined:

``` css
.notification p {
    padding: 20px 20px 0px;
    color: #ffffff;
}
```

Similarly, the button has styling to change it from looking like a basic button to a more styled button.

``` css
.notification button {
    background-color: rgb(52, 102, 187);
    color: #ffffff;
    padding: 10px 50px;
    margin: 10px 10px;
}
```

Finally, I've added a `hover` attribute onto the button to slightly change the color when the mouse is moved over it.

``` css
.notification button:hover {
    background-color: rgb(103, 138, 187);
}
```

You can see the final version in my CodePen:

{% codepen https://codepen.io/cloudblogaas/pen/qBZZWYq %}
#programming
Published: 2020-08-14 15:11:52

I need some help to find sites that provide free programming courses since I'm a student and don't have any money to pay. But I want to learn so bad, I've found some sites like freecodecamp.org, codecademy etc. I hope I'll get to learn more ,learn from you guys and be better programmer than I'm today. I'm grateful to your help and willing to contribute to this community as much as I can.♥️
To stay happy in life
Tags: productivity
Published: 2020-08-14 15:00:47

Some things I learned from my previous mentors as well as from my own past experience in interacting with others:

(1) Don't fake it, be authentic and genuine in our approach to others;
(2) Try to see things from other's point of view, situations are not easy as you think it is;
(3) Do not judge others, everyone has their own valid reason for their actions;
(4) Give everyone the benefit of doubt and everyone deserves a second chance;
(5) Listen to others first and then respond objectively or rationally;
(6) Take emotions out of any kind of response. Emotions will cloud your judgement most of the time;
(7) Think positive side of every situation or blockers evens;
(8) Worrying about something that is not in your hands will not help to resolve the issue, so stop worrying if you cannot do anything to fix the issue
(9) You do not have to respond to everything that you see or hear. Some are just noise to distract you from your objective. Let them be, ignore them;
(10) World does not revolve around you, so don't make everything about you and get worried or tensed or angry.

Thought of sharing this, above points are easier said than done. I am still struggling with some even now.
[Tutorial Linux] Terminal: Limpando o cache do APT
Tags: linux, terminal, autoclean, womakerscode
Published: 2020-08-14 14:45:12

No terminal, digite:

```
$ sudo apt autoclean
```

- **$** indica que você deve usar o **usuário comum** para fazer essa operação.

- **sudo** serve para pedir permissões de administrador temporariamente.

- **apt** do inglês, *Advanced Package Tool*, em português, Ferramenta de Empacotamento Avançada; é a ferramenta que nos ajuda na instalação, atualização e desinstalação de programas, entre outras funções.

- **autoclean** limpa os dados armazenados pelo **apt**, removendo versões antigas de pacotes ou que não são mais úteis.

Esse cache do **apt** serve para otimizar algumas instalações.
How to share links between devices?
Tags: help, showdev, productivity
Published: 2020-08-14 14:37:25

All developers must have faced this problem when you have opened a link or tab in your browser in your laptop but then suddenly due to any reason, you want to open it in your mobile or any other device. Will you write it manually???? Will you send it to someone on whatsapp and then tell them to ignore the message???? LOL. Will you mail it to yourself???? Will you save it on any note keeping website???? Or any other solution???? So i want to ask this community, what can be the best solution for this problem? If there isn't one, but you have the idea then also please share. :)
Daily Challenge #281 - Area or Perimeter
Tags: challenge
Published: 2020-08-14 14:07:28

---
title: Daily Challenge #281 - Area or Perimeter
published: true
series: Daily Challenge
description: Given the length and width of a 4-sided polygon, return its area and perimeter.
tags: challenge
//cover_image: https://direct_url_to_image.jpg
---
You are given the length and width of a 4-sided polygon. The polygon can either be a rectangle or a square.

If it is a square, return its area. If it is a rectangle, return its perimeter.

`area_or_perimeter(6, 10)` --> 32
`area_or_perimeter(4, 4)` --> 16

###Tests
`area_or_perimeter(5, 5)`
`area_or_perimeter(10, 20)`

Good luck!

***
_This [challenge](https://www.codewars.com/kata/5ab6538b379d20ad880000ab) comes from `no one` on CodeWars. Thank you to [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
Drawing curves in html5 using <canvas>
Tags: javascript, css
Published: 2020-08-14 14:02:27

Given the following lines of code:
ctxt.beginPath();
ctxt.arc(150,100,75,0,2 * Math.PI, false);
ctxt.lineWidth = 25;
ctxt.strokeStyle = '#0f0';
ctxt.stroke();
On the second line where we have 150,100,75,0,2 can someone please help me understand exactly how those values determine the shape that my curve will take?
DA02 Domain Logic
Tags: course, design, architecture
Published: 2020-08-14 14:02:14

## 本篇讲Domain Logic，其中包含三个pattern：

- Transaction script
- Domain model
- Table module

# Background

Consider the example below:

> A company sells three products: A, B, and C, along with some support for using these products. If a client buys product A, the company receives all of the revenue upfront. If the client buys product B, the company receives one third of the revenue now, one third in 60 days, and one third in 90 days. If the client buys product C, the company receives one third of the revenue now, one third in 30 days, and one third in 60 days. 

# Transaction Script

A script for an action, or business transaction; The driving force is still that of a procedure for each action.

Transaction Script Pattern follows a **procedural** style of development rather than Object Oriented Programming approach.

在Transaction Script中，将多个事务脚本放在一个类中，每个类围绕一个主题组织相关的事务脚本。或者，为每一个事务写一个单一的方法或流程。

## 优缺点

### Pros

- Simplicity
- Transaction Boundaries: 事物的开始和结束都很明确

### Cons

- Scalability: 随着业务逻辑变得越来越复杂，维护良好设计变得越来越困难
- Duplication: 代码重复量大，每一种不同的事物都有专门的代码，即使它们很相似也是如此

# Domain Model

An **object** model of the domain that incorporates both **behaviour** and **data**.

The domain model pattern involves constructing a model of the business domain of the system, usually an object-oriented model, and then coupling the behaviour to the objects in the domain using methods.

一种对象模型，它结合了行为和数据的字段。

## 优缺点

### Pros
- Extensibility: to add more behaviour, one only need to add the classes/objects to the domain model
- Re-usablility
- Managing comain complexity

### Cons
- Complexity
- Need experience

# Table Module

The table module pattern attempts to blend the transaction pattern and domain model patterns. A single instance that handles the business logic for all rows in a database table or view.

On the surface Table Module looks much like a regular object. The key difference is that **it has no notion of an identity for the objects it’s working with**.

## 优缺点

### Pros
- Simplicity
- Less duplication: behaviour is tied to the concepts/classes

### Cons
- Scalability: 同Transaction Script
- Extensibility: 同Transaction Script

# Domain Logic & Layering

A **Service Layer** is placed over an underlying **Domain Model** or **Table Module**. A domain layer that uses only Transaction Script isn’t complex enough to warrant a separate layer.
Share a Git Meme, Make the Community Smile 😁😎
Tags: watercooler, discuss
Published: 2020-08-14 13:59:18

Hola developers!👋

You know how we all want to give back to the community but often don't get the time to do so? 

Well, I had an idea: share a GitHub meme in the comments below, and that's all.  

Because what's better than making people laugh? 😛

Let's get started!
How to Make a New Program From the Terminal
Tags: tutorial, codenewbie, womenintech, 100daysofcode
Published: 2020-08-14 13:34:13

I'm a flatiron school bootcamp student. I've noticed that no one in the first and second modules seems to know how to start a new program from the terminal. So here we are. 

Open your terminal and type the following in the directory of your choice:
```
mkdir new_folder
cd new_folder
bundle init 
touch config.ru  
```
*`bundle init` makes a new gem file and `touch` makes a file*

At this point you can open your files in your IDE and edit as you usually would.  Don't forget to run `git init` to create a new local repository and commit often!
How Teletrac Navman Switched from Coded UI to CloudQA [Case Study]
Tags: teletrac, codedui, cloudqa, automationtest
Published: 2020-08-14 13:30:54

Teletrac Navman is a SaaS product company headquartered in Southern California with offices in the United Kingdom. It provides cloud-based GPS fleet tracking software that’s being used to track 250,000+ vehicles in 87 countries.

Before CloudQA

Teletrac Navman has distributed teams, working from countries in different time zones. So the coordination of teams is a must.
But using Coded UI for web test automation came with a lot of hassles:

• Coded UI, a deprecated UI-driven functional testing tool was deprecated in 2019.
• It was becoming outdated for the rapidly upgrading of web technologies.
• Moreover, Teletrac Navman couldn’t manage global operations using Coded UI due to a lack of collaboration features.
• Testing more than one region at the same time was an unsolved issue.
• Test automation with Coded UI was time-consuming and required a lot of scripting.
• Coded UI has good support for IE but performed inadequately for all other browsers.

Journey with CloudQA

Teletrac Navman was looking to move from Coded UI to Selenium for testing. But shifting to Selenium would have taken a lot of time and resources.

CloudQA came with everything they required. Teletrac Navman could work with:

• Selenium cloud, cross-browser testing, minimal test code dependencies, and an intuitive UI making automated tests maintenance simpler.
• Real-time coordination between global team members was established.
• Multiple users were able to generate test cases and test the application at the same time.
• The critical integrations with the TFS Application pipeline (Azure DevOps)  and Jenkins for auto-triggering of tests and deployment upon success.
• And integration with Apache Subversion (SVN).

Conclusion

Teletrac Navman teams could collaborate globally. Regression testing automation is much faster with great reliability.
With CloudQA, the team could set up a CI/CD pipeline in no time. Multiple environments setup made the life easy to maintain different variables for each environment. Hence re-use of the same tests against the different environments as possible. The regression testing and release process was completely automated.
Teletrac Navman found CloudQA to be the best Coded UI alternative. To know more, visit https://cloudqa.io/ or email us at info@cloudqa.io.
How to learn advanced backend
Published: 2020-08-14 13:29:28

---
title: How to learn advanced backend
published: true
description: 

---

Not sure how to ask questions in this place, but wanted to know where to go to learn advanced backend techniques like caching, deploying to multiple servers and handling millions of calls per month for the api and stuff like that. Building the api and using load balancers and everything is done but where to go from here?
“Practical Cryptography” Course Released
Tags: cryptography, go, languages, release
Published: 2020-08-21 14:41:35

---
title: “Practical Cryptography” Course Released
published: true
date: 2020-08-14 13:28:48 UTC
tags: Cryptography,Golang,Languages,Release
canonical_url: https://qvault.io/2020/08/14/practical-cryptography-course-released/
---

 ![qvault practical cryptogrpahy course](https://qvault.io/wp-content/uploads/2020/08/practicalcryptography-300x300.jpg)

The post [“Practical Cryptography” Course Released](https://qvault.io/2020/08/14/practical-cryptography-course-released/) first appeared on [Qvault](https://qvault.io).

We just launched our new _[Practical Cryptography](https://classroom.qvault.io/)_ course, a code-in-the-browser tutorial where students build cryptographic functions in the Go programming langauge. _Practical Cryptography_ stands out among online cryptography courses because it not only teaches crypto fundamentals, but it allows users to get hands-on experience building out the code.

[Get Started](https://qvault.io/go/course-page-practical-cryptography/)

## What’s Included?

The course has four modules covering the following topics:

* Cryptography History and Overview
* Stream Ciphers and XOR math
* Block Ciphers and Key Schedules
* Hashes and Key Derivation Functions

We are already planning a sequel to this course which will cover public-key cryptography and some other more advanced concepts.

## Coding?

![golang gopher](https://qvault.io/wp-content/uploads/2019/10/go-300x157.png)

Coding projects in this course are all written in Go, a language that is soaring in popularity among devops, backend, and security engineers. If you aren’t familiar with Go yet, take our [Go Mastery](https://qvault.io/go-mastery/) course first! All coding is done directly in the app, no need to mess around with configuring a local dev setup.

## Thanks For Reading!

Follow us on Twitter [@q\_vault](https://twitter.com/q_vault) if you have any questions or comments

Take game-like coding courses on [Qvault Classroom](https://classroom.qvault.io/#/)

[Subscribe](https://mailchi.mp/5c7f5c281bbe/qvault-newsletter-subscribe) to our Newsletter for more educational articles
A new Microsoft mentality about opensource and her powertoys
Published: 2020-08-14 13:26:53

<h1 align="center"> <b>Microsoft</b> and "new" opensource mentality</h1>

We all know that microsoft, in the old days, have a diferent mentality about linux and opensource.

Nowadays microsoft embraced the opensource and brought linux to your system (WSL).
As a linux user, iam not a fanboy and i take out the best of the 2 worlds, but have some approach that i love on linux instead of windows.

1. Variety
2. Freedom to choose my tools and my DE (desktop enviroment)
3. Windows tiling managers

    and of course...

4. Terminal and GUI optionality to install programs and librarys

### <b>Why i'm talking about it?</b>

i was randomly browsing in a [Microsoft github profile](https://github.com/microsoft) when i found this [Power toys](https://github.com/microsoft/PowerToys), in a "preview" state but i realy liked.

I love productivity and i notice some similarities with linux and their workflow.

## Current Powertoys utilities

- Color Picker 
- Fancy Zones (like tiling manager or window organiser)
- File Explorer addons
- Bulk Image Resizer
- Bulk rename files
- Keyboard manager (shortcuts)
- App launcher (like U launcher)

Obviously e see some tools that are inspire on some old tools on linux and their workflow. This tools or have this optionality fits all workflow styles.

 I'm glad that microsoft can includes this kind of tools on a future update.
You can test it and say what you think?

 PS: Microsoft is also implementing terminal and packet manager what is great too but not a purpose of this post.