teleren/devto huggingface dataset:
What was your win this week?
Tags: discuss, weeklyretro
Published: 2020-01-17 17:39:57

---
title: What was your win this week?
published: true
description: Got to all your meetings on time? Started a new project? Fixed a tricky bug?
tags: discuss, weeklyretro
cover_image: https://cl.ly/188e843c2985/download/Image%202019-02-15%20at%202.36.37%20PM.png
---

👋👋👋👋

Looking back on your week -- what was something you're proud of?

All wins count -- big or small 🎉

Examples of 'wins' include:

- Getting a promotion!
- Starting a new project
- Fixing a tricky bug
- Cleaning your house...or whatever else that may spark joy 😄

![friday-feeling](https://media.giphy.com/media/1iYG017UokdODQc0/giphy.gif)


Happy Friday!
That About Wraps It Up For Actix-Web
Tags: rust, actix, opensource, discuss
Published: 2020-01-17 17:37:13

Sadly, the [actix-web](https://github.com/actix/actix-web) maintainer has quit.  Check out the repo - it's gone.  He moved it back to a personal account and may delete it entirely.  He's not just done with `actix-web`, he's done with open-source.  Way to go, team.

  It's kinda like [last time around](https://dev.to/deciduously/the-trials-and-tribulations-of-actix-web-and-the-oss-community-53ee).  The underlying issue is a legitimate technical concern regarding soundness and unnecessary usage of `unsafe` in the library, which the maintainer does not perceive as problematic.

Enter Reddit, enter vitriol and toxicity.  Real technical concerns, and an utter inability to discuss them like everyone involved is actually people.  It's endlessly frustrating.  I'd quit too, and now everyone loses.

Steve Klabnick [says it better](https://words.steveklabnik.com/a-sad-day-for-rust) than I could.  In his conclusion he observes: "The Rust community says they’re nice but they will harass you if you use unsafe wrong."  Can we do better?

I don't know.  What do we do about this?  What *can* we do about this, what should we do about this?  This is why we can't have nice things, but I really want some nice things.  However you feel about soundness, this is a quality piece of software and a big loss for the Rust community and ecosystem.

I'm not mad, I'm just disappointed.  Like the author says in his post-mortem:

> It was fun trip but now is time to move on. Life should be fun.

*Photo by James Pond on Unsplash*
DevOps
Published: 2020-01-17 17:20:13


Check out DevOps documentation (no tracking code)
https://docs.microsoft.com/en-us/azure/devops/user-guide/what-is-azure-devops?view=azure-devops


Check out DevOps documentation (with tracking #1)
https://docs.microsoft.com/en-us/azure/devops/user-guide/what-is-azure-devops?view=azure-devops&WT.mc_id=devops-devto-dachauss


Check out DevOps documentation (with tracking #2)
https://docs.microsoft.com/en-us/azure/devops/user-guide/what-is-azure-devops?view=azure-devops&WT.mc_id=devto-blog-dachauss

Check it out (with tracking)
https://aka.ms/devto-dashboard

Check it out (no tracking)
https://aka.ms/devto-dashboard-notracking
Node.js Modules
Published: 2020-01-17 17:20:06

Hello Folks! Today we will will move ahead and learn node.js more. We are going to write our first code in node.js today. Then we will discuss about modules in node.js. This post will be long so please stay tuned and let's code together.
Initializing the working directory:
Open a suitable text editor of your choice. I will use VS Code for the whole series of Node.js to learn Node.js.
From FILE, select OPEN FOLDER and select a working directory for your learning.
The alternative to this is, right click on the desired working directory and select OPEN WITH CODE.
After the working directory has opened we will have to initialize the directory for our Node.js activities.
To learn more visit : <a href="https://learnnodeonline.blogspot.com/2020/01/node.js-modules.html">Click here</a>
Mutual TLS authentication in REST services with Kotlin
Tags: kotlin, microservices, security
Published: 2020-01-17 17:04:23

Do you want to develop mutual TLS Web services in Kotlin? Hexagon 1.2 got released today with that feature, check the following section to learn how: https://hexagonkt.com/port_http_server/#https 

You can check all project's examples and source code at GitHub : https://github.com/hexagonkt

If you give it a go, please share your feedback!

Disclaimer: I'm the project's maintainer
Fix This Before Commit!
Tags: vscode, productivity, discuss
Published: 2020-01-17 16:04:20

I saw this beauty today during a code review, and it brought a set of tools to mind:

```tsx
{/* Fix this before commit  */}
{true && <Locations locationOptions={locationOptions} />}
```

### ToDo Extensions for VS Code

There are a number of extensions that will take a comment like `\\TODO: Fix this before commit` and highlight it. If color coordination is your strong point, some of them allow you to customize your comment highlights according to the text so that, e.g., `\\WONTFIX` can be a pretentious shade of blue. Others will scan your code for such comments and compile them into a tree in your sidebar. Whatever your preference, just make sure you're utilizing a productivity tool that will catch your attention before your unfixed commit makes it to production. _Hint: Writing tests aren't just a good idea—they're preventative in nature!_

Obviously I am not the first to write about this:

{% link https://dev.to/eclecticcoding/todo-list-in-vscode-2mnb %}

Comment below with your favorites!
type variables in typescript
Tags: 100daysofcode, nativescript, vue, typescript
Published: 2020-01-17 15:55:13

1. I watched 20 minutes of Data structures. I finished Priority Queue.
1. I've tried some different layouts in nativescript-vue in play.nativescript.org.
1. I wrote a little bit more on *functional typescript*.

### May be I will use StackLayout instead of GridLayout
```javascript
        <StackLayout orientation="horizontal" backgroundColor="lightgray">
            <Label v-for="n in item.totalLabelsCount" :text="item.id"
                width="30" height="150" backgroundColor="white"
                class="border" />
        </StackLayout>
```
### I am trying to come with an idea about how to explain type variables in Typescript
Did you know there are type variables in typescript? You don't need to know type of a result from a function. You can just use a variable for whatever this type will be. Cool right?

```javascript
function identity<T>(arg: T): T {
    return arg;
}
```
Please check out: 
https://www.typescriptlang.org/docs/handbook/functions.html#rest-parameters

https://www.typescriptlang.org/docs/handbook/generics.html#working-with-generic-type-variables

day22
Callbacks in JavaScript. Let's break them down!
Tags: javascript, callback, frontend, node
Published: 2020-01-17 15:54:25

**Callbacks** are a simple concepts that many times confuse people when they are learning how to program.

Leaving aside that depending on the programming language the implementation could vary and there are synchronous callbacks (immediate) and asynchronous callbacks (may happen at a later time). Let's just focus on JavaScript.

Let's take the 3 following concepts:

* First of all, the formal **definition of a callback** is 

*"is any executable code that is passed as an argument to other code that is expected to call back (execute) the argument at a given time"*

* In **JavaScript** you can assign **functions to variables** 

* **JavaScript methods (functions) are first class objects, you can pass them around like variables**

 
Knowing that, let's dive into an example to make it crystal clear.

Let's say that we define an `execute` method that receives a variable and a (callback) function. 

```javascript
function execute(px, callback){
    let x = callback(px)
    console.log(x);
}
```
*I know, it's not necessary to instantiate the x*

In this simple case, the callback function could be any function that has one parameter, so, let's define 2 more methods (functions) to test the `execute` method.


```javascript
function squaredNumber(px){
    return px*px;
};

function numberPlusHundred(px){
    return px+100;
};
```

So, if we run:

```javascript
execute(2, squaredNumber)

>>> The execute method will call squaredNumber(x) and the result would be 4
```
But if we run:
```javascript
execute(2, numberPlusHundred)

>>> The execute method will call numberPlusHundred(x) and the result would be 102
```

It is as simple as that, using callback functions enable us to call different functions as needed making the programming even more flexible. 

## Final Thoughts

The given example could be way too simple but trust me, callbacks are used everywhere! To mention a couple of examples, Jquery and Ajax have them implemented in many methods. So, you should master the concept and take advantage of their benefits (Abstraction, Maintainability, Readability), and so on.

Any comments?
Ionic 4 Calendar UI Examples – How to Build Calendar App in Ionic
Tags: ionic4, ioniccalendarui, calendarapp
Published: 2020-02-01 20:05:51

---
title: Ionic 4 Calendar UI Examples – How to Build Calendar App in Ionic
published: true
date: 2020-01-17 15:48:33 UTC
tags: Ionic 4, Ionic Calendar UI , Calendar App
canonical_url: https://www.positronx.io/ionic-calendar-ui-tutorial-examples-from-scratch/
---

The post [Ionic 4 Calendar UI Examples – How to Build Calendar App in Ionic
published: true](https://www.positronx.io/ionic-calendar-ui-tutorial-examples-from-scratch/) appeared first on [positronX.io](https://www.positronx.io).

**This is a comprehensive step by step tutorial explains how to build calendar UI in Ionic 4 and Angular 8 application using the ion2-calendar plugin.**


As we start typing the Ionic calendar plugin in Google, we start getting tons of calendar packages in the search result.

Out of those various calendar plugins, we have found out the ion2-calendar plugin is the best for building a calendar UI component in an Ionic application.

[Click here to read more](https://www.positronx.io/ionic-calendar-ui-tutorial-examples-from-scratch/)
Scaling Webapps: Up vs Out
Tags: aws, devops, linux
Published: 2020-01-17 15:47:07

As your web app starts to grow, there comes the point where current server resources are no longer sufficient. WordPress starts to slow down, there are occasional timeouts, and your marketing team has to limit their campaigns to avoid taking the site offline. At this point, you have a decision to make – scale-up or scale-out.

Scaling up means adding more resources to the existing web server. In most cases, this refers to resizing the VM instance to the next available size. Scaling up is also called verticle scaling.

Scaling up is easy, reasonably painless, and has minimal potential to break your site.

But 

There is an upper limit on how much you can scale up. Although you can launch VMs with 128 GB memory and 32 CPUs these days, other bottlenecks show up way before you run out of memory. In other words, doubling the memory doesn’t double the capacity to serve visitors. The server starts to run out of available ports, sockets, and in case of containers, IP addresses as the traffic grows. Scaling up also doesn’t protect you against single-point-of-failure.

On the plus side, scaling up keeps the deployment and ops workflows the same as before and doesn’t introduce any changes.

Scaling out means splitting the traffic across several web servers. Scaling out is also called horizontal scaling. 

Scaling out is complex and requires extensive work to get started and to keep the site running smoothly. On the plus side, scaling out provides high-availability and significantly more capacity to serve visitors when done right.

When you consider scaling out your infrastructure, you need a plan for the following areas that aren’t necessary with a single web server:

Replicated file system to share code and media across web servers.

Standalone database server accessible over the network

SSL Termination and load balancing.

Log aggregation.

A deployment strategy with an optional blue-green deployment solution.

So, which scaling method is right for you?

If you expect the traffic to grow 2x this year, scaling up saves you from the complexity and overhead. All you need is a maintenance window where you can resize your server and adjust server configurations to utilize available resources effectively.

If you expect the traffic to grow 10x this year, investing in scaling out is more effective. It requires careful planning, testing, and migration from the current server to the new cluster. But when done right, scaling out helps you grow an order of magnitude more compared to scaling up.

If you don’t expect the traffic to change but need better availability for your site, consider this:

Daily automated server snapshots in 2 regions and low TTL on your DNS server.

If there is an extended outage, you can spin up a new VM in a different region using the daily snapshot, update the DNS, and get back online without the complexity of high-availability systems.
On.NET Episode: Advanced Features with Azure Service Bus
Tags: dotnet, azure, messaging, microservices
Published: 2020-01-17 15:33:15

In this episode, [Ashish Chhabria](https://twitter.com/ashishc1) joins Cecil to talk about some of the more advanced features of Azure Service Bus. They'll cover topics such as scheduling, deferred messages, duplicate detection, disaster recovery and more!


{% youtube Gd3Oas8JToU %}

If you liked this video and would like to see some more of our .NET content, please subscribe to our [.NET Developers YouTube Channel](https://www.youtube.com/channel/UCvtT19MZW8dq5Wwfu6B0oxw).


## Useful Links
* [What is Azure Service Bus](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-overview?WT.mc_id=ondotnet-devto-cephilli)
* [Choose between Azure messaging services](https://docs.microsoft.com/en-us/azure/event-grid/compare-messaging-services?WT.mc_id=ondotnet-devto-cephilli)
* [Messaging Patterns](https://docs.microsoft.com/en-us/azure/architecture/patterns/category/messaging?WT.mc_id=ondotnet-devto-cephilli)
* [Azure Service Bus Samples](https://github.com/Azure/azure-service-bus)
Surveying Web developers who have used a Framework (like Angular, React, Vue, etc.) for my Master Thesis
Tags: webdev, angular, react, vue
Published: 2020-01-17 15:14:07

---
title: Surveying Web developers who have used a Framework (like Angular, React, Vue, etc.) for my Master Thesis
published: true
description: Master Thesis Survery on code optimizations when using a Web Framework
tags: webdev,angular,react,vue
---

Hi all,
I am writing my Master Thesis on Code optimizations when using a Web Framework.
Basically, I want to do a statistical analysis to see if any Web Framework makes web developers optimize their code.
To do this, I have set up a survey of 19 questions that shouldn’t take longer than 10 minutes of your time.
With these results I hope to find if any code using a specific Web Framework is more optimized than another.

https://forms.gle/2A1pZKgHSUs2eyV3A 
I thank you for your time and effort!
Kubectl | Minikube | Kops - What's the difference? 🤔
Tags: kubernetes, devops, docker, beginners
Published: 2020-01-17 15:13:11

In Kubernetes world almost every tool has a “kube” in its name, plus there are so any of them each having a different role, so it may get a little confusing. The difference between 3 of the widely used tools - Kubectl | Minikube | Kops is actually pretty straightforward.


***Kops***
Is used to create and manage a production-grade Kubernetes cluster on cloud. It’s integrated with AWS and Google Cloud (GCE) and some other platforms. It’s a command line tool that offers simple commands to create, update and delete the cluster on cloud environment. These are some of Kops commands: 

```
kops create cluster --name mycluster.k8s.local
kops update cluster mycluster.k8s.local
kops delete cluster mycluster.k8s.local
```

***Minikube***
Is used for the same purpose as Kops, but for LOCAL k8s cluster creation. So with Minikube you can create, update, delete a cluster locally on your machine. It creates a single node cluster in VM on your local machine. It’s useful if you want to quickly create a small test cluster. It uses pretty simple commands to create and delete local cluster: 

```
minikube start
minikube stop
```

***Kubectl***
Once you create the cluster (either ***locally*** with ***Minikube*** or ***remotely in prod mode*** with ***kops***), you need ***kubectl*** to actually ***configure*** it: create k8s components like pods and services etc, troubleshoot the cluster etc. Here are some common kubectl commands: 
```
kubectl create -f deployment.yml
kubectl get pods
kubectl describe pod pod-name
```

You can find a diagram comparing the 3 tools here:
[Diagram - scroll to the end of the article](https://www.nnsoftware.at/post/kubectl-minikube-kops-what-s-the-difference)

----------
[Complete and FREE Kubernetes & Docker course on Youtube](https://www.youtube.com/playlist?list=PLy7NrYWoggjwPggqtFsI_zMAwvG0SqYCb)
Daily Challenge #165 - Password Lost in a Grid
Tags: challenge
Published: 2020-01-17 14:54:32

---
title: Daily Challenge #165 - Password Lost in a Grid
published: true
series: Daily Challenge
description: Recover your scattered password in a (m x n) grid.
tags: challenge
---
###Setup:
Today's challenge is to recover your password from a (m * n) grid. The array will contain pieces of the password to be recovered, you'll get directions on how to get all the the pieces, your initial position in the array will be the character "x".

###Examples:
Here's what the array looks like:
<pre>
[
  ["p", "x", "m"],
  ["a", "$", "$"],
  ["k", "i", "t"]
]
</pre>
The given directions would consist of [left, right, up, down] and [leftT, rightT, upT, downT], the former would be used to move around the grid while the latter would be used when you have a password to that direction of you.( E.g if you are in a position and the move to make is leftT it means theres a password piece to the left of you, so take the value and move there)
So in the 2d array example above, you will be given the directions ["leftT", "downT", "rightT", "rightT"], making the word "pa$$".
Remember you initial position is the character "x".
So you write the function getPassword(grid, directions) that uses the directions to get a password in the grid.

Another example:
<pre>
grid = [
  ["a", "x", "c"],
  ["g", "l", "t"],
  ["o", "v", "e"]
];
</pre>
directions = ["downT", "down", "leftT", "rightT", "rightT", "upT"]
getPassword(grid, directions) // => "lovet"

Once again, Your initial position is the character "x", so from the position of "x" you follow the directions given and get all pieces in the grid.

###Tests
<pre>
grid = [
    ["x", "l", "m"],
    ["o", "f", "c"],
    ["k", "i", "t"]
  ]
directions = ["rightT", "down", "leftT", "right", "rightT", "down", "left", "leftT"]
</pre>
Good luck!
***
_This [challenge](https://www.codewars.com/kata/58f6e7e455d7597dcc000045) comes from kodejuice 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!_
Understanding Git Branches (Illustrated)
Tags: git, beginners, illustrated, comics
Published: 2020-01-17 14:39:12

---
title: Understanding Git Branches (Illustrated)
published: true
description: But when multiple developers need to work in the same Git repository, it is important to define a process that allows collaboration. That's when branches become essential. 
tags: git, beginners, illustrated, comics
series: Git Illustrated
cover_image: https://thepracticaldev.s3.amazonaws.com/i/ban08i3ij12b7zv7ad1e.jpg
---

In a [previous post](https://dev.to/erikaheidi/stage-commit-push-a-git-story-comic-a37), we talked about the process of submitting changes to a remote Git repository. We've seen that this process is done in three steps: 1) stage. 2) commit. 3) push.

In a small project with a solo contributor, it's not uncommon that these changes are pushed directly into `master`. But when multiple developers need to work in the same Git repository, it is important to define a process that leverages parallel collaboration. That's when **branches** become essential. 

![Git Tree Illustration](https://thepracticaldev.s3.amazonaws.com/i/7ph91rcm4nkmna10eqmb.jpg)

>Not all trees are the same, but they all start small. In a typical Git repository, code grows as a tree. Features are implemented in development branches that are eventually **merged** into a **master** branch.

Whenever working on a team, whether if it's in an open source project or a corporate setting, it's always a good practice to create a new branch (usually based on `master`) and start from there.

Once you're finished with your changes, you can then push your branch to the remote repository and create a new **pull request**. A **pull request** is a formal request for merging your branch into `master`.

![Pull Request Mando and Baby Yoda](https://thepracticaldev.s3.amazonaws.com/i/26ehw0t3trfmuc4jlmw8.jpg)

> Although it is possible to push and merge a branch directly into "master", creating a pull request is usually the way to go when suggesting changes in a codebase.

Opening a pull request creates an opportunity for code review and actionable feedback; that's why it became a standard procedure for collaborating in most open source projects.

---

For a more in-depth understanding of Git branches, please check [these docs](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell) or have a look at this [quick reference guide](https://dev.to/digitalocean/how-to-use-git-a-reference-guide-6b6).

Any Git topic you'd like to understand better? Leave your suggestion for my next comic in the comments :)