teleren/devto huggingface dataset:
Red Dog for Dev Episode One!
Tags: azure, serverless, java, news
Published: 2019-11-04 06:57:07

---
title: Red Dog for Dev Episode One!
published: true
date: 2019-11-01 04:24:54 UTC
tags: Azure,serverless,Java,news
canonical_url: https://blog.siliconvalve.com/2019/11/01/red-dog-for-dev-episode-one/
---

Starting today I’m going to be trying something new. Given the fast pace of change with the Azure platform it’s often hard to keep up with what’s new or interesting.

To that end I’m going to start publishing fortnightly videos covering a small number of new and interesting topics related to Azure for developers. In order to keep it interesting I’ll also do a demo of some aspect at the end of the video.

Welcome to episode one of 'Red Dog for Dev' – find it below!

I’d love feedback on the idea, approach and any other aspect you feel warrants it. 🙂

{% vimeo 370222454 %}

If you're unsure why it's called what it is… go and look up the origin of 'red dog' as it relates to Azure.

### Episode Links

Here are the links that appear in the episode:

- Azure Spring Cloud: [https://content.pivotal.io/blog/azure-spring-cloud-a-new-way-to-run-spring-boot-apps-atop-kubernetes](https://content.pivotal.io/blog/azure-spring-cloud-a-new-way-to-run-spring-boot-apps-atop-kubernetes)
- Azure Maps Weather Service: [https://azure.microsoft.com/en-us/blog/rain-or-shine-azure-maps-weather-services-will-bring-insights-to-your-enterprise/](https://azure.microsoft.com/en-us/blog/rain-or-shine-azure-maps-weather-services-will-bring-insights-to-your-enterprise/)
- Cognitive Services Form Recognizer: [https://azure.microsoft.com/en-us/blog/beyond-the-printed-form-unlocking-insights-from-documents-with-form-recognizer/](https://azure.microsoft.com/en-us/blog/beyond-the-printed-form-unlocking-insights-from-documents-with-form-recognizer/)
- Azure Functions v3 runtime: [https://github.com/Azure/app-service-announcements/issues/200](https://github.com/Azure/app-service-announcements/issues/200)
- Spring Cloud Functions on Azure demo project: [https://docs.microsoft.com/en-us/azure/java/spring-framework/getting-started-with-spring-cloud-function-in-azure](https://docs.microsoft.com/en-us/azure/java/spring-framework/getting-started-with-spring-cloud-function-in-azure)

Happy Days 😎
เปลี่ยน mac address กัน
Published: 2019-11-01 03:57:36

มีช่วงนึงต้องเอาคอมพ์วางตักไปซ่อม เลยต้องเอาคอมพ์สำรองมาใช้ ปัญหาคือเน็ตเวิร์กคุณลูกค้าอนุญาตแค่ mac-address ที่เราเคยลงทะเบียนไว้เท่านั้น ทำไงดีละ

พอดีนึกขึ้นมาได้ว่าตอนเราใช้ Windows ก็เคยเปลี่ยน mac-address นิ Osx ก็ต้องได้เลย google แล้วก็ได้เลย

## ก่อนอื่นจด mac-address เดิมเรามาก่อน

```
ifconfig en0 | grep ether
	ether 90:28:5c:8c:8x:yz
```

## เอา mac-address มาเซ็ตให้เครื่องสำรอง

```
sudo ifconfig en0 ether 90:28:5c:8c:8x:yz
```

แค่นี้เราก็สามารถเข้าถึงเน็ตเวิร์กได้แล้ว ~

อ้างอิง: https://www.online-tech-tips.com/computer-tips/how-to-change-mac-address/
Extending express request/response objects in Typescript
Tags: node, express
Published: 2019-11-01 03:49:01

---
title: Extending express request/response objects in Typescript
published: true
date: 
tags: nodejs,express
canonical_url: https://joeflateau.net/posts/extending-express-request-response-objects-in-typescript
---

It’s useful to be able to provide a unified response “envelope” when creating a REST API. This envelope can contain metadata, data and information on errors and warnings.

To do so with `express` for nodejs you can add custom functions to the `request` prototype and declare them in a module augmentation.

```
import { response } from "express";

// augment the `express-serve-static-core` module
declare module "express-serve-static-core" {
  // first, declare that we are adding a method to `Response` (the interface)
  export interface Response {
    respondWithData(data: any): this;
  }
}

// now actually add it to `response` (the prototype)
response.respondWithData = function(data) {
  return this.json({ errors: null, data: data });
};
```

> Possibly confusing:
> 
> The value `request` imported from **express** refers is the prototype of request objects passed to handler functions; it implements the `Request` interface exported by **express-static-serve-core**
> 
> The interface `Request` imported from **express-static-serve-core** refers to a Typescript interface and has no runtime meaning

After we’ve declared the method and added it to the prototype, we can now call it from our route handler:

```
app.get("/foo", async(req, res) => {
  res.respondWithData({ success: true });
});
```
Having trouble understanding wide column stores like Cassandra. Can someone explain?
Tags: database, sql
Published: 2019-11-01 03:23:49

I read about stuff like CAP theorem, but what has me confused is when people say "with RDBMS, you have to look at every column in each row, which is less performant". Like what if in RDBMS I was doing a `SELECT` statement on just 1 column? Then couldn't it just go down that one column similar to Cassandra would?

And with use cases like Instagram, I imagine data like photo feeds and messages as relational, but they use Cassandra. I'm wondering why it's recommended for things like messaging and chat.

Basically I'm struggling to grasp wide column stores because it seems like RDBMS gives you a lot more when it comes to data modeling.

When I look at diagrams I either see some row key with columns that could just be an RDBMS row with primary key, or some JSON-like key values, so I'm having trouble visualizing the benefits.

Thanks!
Some-Stack Engineer
Tags: discuss
Published: 2019-11-01 02:15:01

Photo by [Bill Oxford](https://unsplash.com/@bill_oxford?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/cogs?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)

Anybody down for starting the **some-stack** engineer movement?

{%twitter 1190083118880833537 %}

In all seriousness, no one can really be full-stack these days.

![Captain America saying he can do this all day](https://media.giphy.com/media/XV74ZvGRXcZdS/giphy.gif)

There are too many moving parts. Frontend, design, backend, database, deployments, automation etc. I think it comes down to you are good at some of the stack.

Thoughts?
Summary: "Introducing Concurrent Mode"
Tags: react
Published: 2019-11-01 00:10:20

*This is a summary of key points in [this reactjs.org doc](https://reactjs.org/docs/concurrent-mode-intro.html)*

## What Is Concurrent Mode?

React's solution for graceful handling of latency (network and/or cpu).

## Blocking vs Interruptible Rendering

Think of "blocking" like collaborative work on a codebase before git.
Two people couldn't work on the same file.
They were blocked until other work finished.

Like git, Concurrent Mode "slices" work into into small chunks that are now "interruptible".

### Interruptible Rendering

Re-rendering blocks others from doing work.
Techniques like throttling and debouncing help but aren't frequently come at a UX cost.
These experiences aren't well-reflected in common benchmarks.

**Concurrent Mode fixes this fundamental limitation by making rendering interruptible.**
Using an input that filters a list as an example,
React can paint updates to the input immediately,
Render the list _in memory_,
Then flush the updated list when rendering is complete.

Sticking with the branching analogy:
Work can branch off,
Higher priority work can be inserted,
Then branches merged to reflect async changes.

Game dev calls this [double buffering](https://wiki.osdev.org/Double_Buffering).

Concurrent Mode reduce UI stutter and jank by delaying work.

### Intentional Loading Sequences

Transitioning from a loaded screen and an empty screen can be jarring.
It's a better experience to delay these types of transitions until the next view is in a "good enough" state.

Concurrent Mode makes it simpler to **“skip” the “bad loading state” before showing the new screen**.
The new screen loads in memory (like a working branch).
The current screen remains interact-able until the new screen is complete.

### Concurrency

Concurrency allows the following:

- CPU-bound updates (e.g., creating DOM nodes, running component code) are "interruptible" by more urgent updates
- IO-bound updates (e.g., fetch) can be rendered in memory — before all data is received.

**The way you use React is the same.**
**set state when _you're_ ready update the screen**

React decides how "urgent" an update is.
But it can be tweaked where needed.

## Putting Research into Production

**The mission of Concurrent Mode is to help integrate the findings from the Human-Computer Interaction research into real UIs.**

- Too many spinners can make a page feel slower than it is
- A fixed progression of elements can feel faster than _render-as-available_
- User input feedback needs to happen immediately — high priority.

React is "baking" user interaction research into the framework.
Deploying an exiting VUE App on Netlify
Tags: vue, javascript, npm, node
Published: 2019-11-01 01:56:53

*In this tutorial I will show you how to make a deployment of your VUE app in Netifly so you can test or share it.*

# **Step 1: Create a VUE app**
You must have knowledge of how to use **NPM** or **YARN** since we will use the build and **DIST** folder to configure Netifly. I will assume that you already have an app created.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/51iv5zxqm90vktchzlul.png)
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/egu4mgdy9z9eelxyeird.png)


# **Step 2: Push your app to GitHub, GitLab Or Bitbucket**
For this example I will use GitHub

 Create an account or authenticate with GitHub on Netlify.
 Click on “New site from Git on Netifly”.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/7yn2df5khzprq9h70x3y.png)

 Select GitHub or your favorite.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/q5byv0yro8sqyvxjxyvw.png)

 Then you will have to choose the repository (s) so that they have 
 permission to be visible on Netifly.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/ndlaxscn1bqv7wwusvjt.png)

 Next you will have to choose the branch you want to publish and define 
 the command to build and the publication folder as specified in the 
 first step and click on “Deploy Site”.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/bpu7mbk5r2k5vvhynyrb.png)

 Also, you will see the first step is running “Deploying site”, if you 
 want to see the terminal click on it.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/0w0b358wmfgwdjkgh8vn.png)

 When this finish the next step is “set up a custom domain” if you want!.
 Finally, you can see at the top the self-generated name of your app and 
 the site for testing.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/u68tkveopuxfg553cycf.png)

*Ready your app is flying on Netifly*
Idea
Tags: micronaut, kubernetes, k8s, groovy
Published: 2019-11-17 08:02:55

---
title: Idea
published: true
date: 2019-11-01 00:00:00 UTC
tags: micronaut,kubernetes,k8s,groovy
canonical_url: 
---

This is the first part of a series of posts about how I’ll develop an application in Kubernetes (k8s)

- 

first post: Idea ([https://jorge.aguilera.soy/blog/prestamos-bibliotecas/k8s-1.html](https://jorge.aguilera.soy/blog/prestamos-bibliotecas/k8s-1.html))

- 

second post: Infraestructure ([https://jorge.aguilera.soy/blog/prestamos-bibliotecas/k8s-2.html](https://jorge.aguilera.soy/blog/prestamos-bibliotecas/k8s-2.html))

The main ot these posts is to document the process of deploying a solution in k8s at the same time I’m writting the application so probably all posts will have a lot of errors and mistakes that I need to correct in the next post.

| | Be aware that I’m a very nobel with Kubernetes and these are my first steps with it. I hope to catch up the attention of people with more knowledge than me and maybe they can review these posts and suggest to us some improvements. |

My idea is to develop a "solution" with some level of complexity (use a database, some services and a public front) and build it step by step. So, a possible roadmap could be:

- 

define the architecture of the application

- 

design the application, tools and basic infraestructure

- 

import data into database using a service or script. It needs to be executed every month

- 

a REST service to expose dome domains

- 

a simple web frontend to consume the service

## Idea

The town hall of Madrid releases every month a huge file with the details of loans of public libraries to their users from the previous month.

In this file you can find when a library loan a resource to a user (you can’t know the user, only if it’s adult, child, staff and so on). The resource can be a book, a newspaper, a DVD, etc.

Also, in the same portal, we can find another file with the catalog of all books in the libraries with the detail of it (author, num of copies, where to find it, etc)

The idea will be to build an application to ask simple questions about what was the most popular book loaned last month (or the date you want), compare libraries, etc

## Architecture

A first approach to the architecture can be:

 ![diag 7493c66b7d138afe72d6abdcf4d75cc5](https://jorge.aguilera.soy/images/diag-7493c66b7d138afe72d6abdcf4d75cc5.png)

As you can see, we’ll have a k8s pod with a database (I’m curious about Postgre so this time I’ll try to use it), some kind of script to import csv into it, maybe using a k8s filesystem (persistent volume claim or PVC) where the admin upload the files, a service REST (pretty sure it’ll be a micronaut service) talking against a webapp (I’m thinking in a simple Vue application)

## Next steps

The next step will be to define the application and select the tools and infraestructure
Java hates TABs!
Tags: java, tabs
Published: 2021-11-01 21:46:40

---
title: Java hates TABs!
published: true
date: 2019-11-01 00:00:00 UTC
tags: java,tabs
canonical_url: http://aivarsk.com/2019/11/01/java-hates-tabs/
---

Today I Learned one more thing for “tabs versus spaces” debate: Java hates tabs.

Turns out Java compiler counts each tab symbol as 8 spaces while parsing the source code. And when it reports errors it uses the 8-space version of column number.

You don’t get this normally when using `javac` from the command line, but all IDEs call Java compiler programmatically to access diagnostic information. So here is a sample code that compiles “Hello world” program containing a bit more tabs than usual

```
import javax.tools.*;
import javax.tools.JavaCompiler.CompilationTask;
import java.net.URI;
import java.util.Collections;

public class Javac {
  static class MemorySource extends SimpleJavaFileObject {
    final String code;
    MemorySource(String name, String code) {
      super(URI.create("memory:///" + name + Kind.SOURCE.extension), Kind.SOURCE);
      this.code = code;
    }
    @Override
    public CharSequence getCharContent(boolean ignoreEncodingErrors) {
      return code;
    }
  }

  public static void main(String[] args) {
    JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
    DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<>();

    MemorySource file = new MemorySource("Hello",
                      "public class Hello {\n" +
                      "\t\t\tpublic static void main(String[] args) {\n" +
                      "\t\t\t\t\t\tSyste.out.println(\"Hello world\");\n " +
                      "\t\t\t}\n" +
                      "}\n");
    CompilationTask task = compiler.getTask(null, null, diagnostics, null, null, Collections.singletonList(file));
    task.call();
    for (Diagnostic diagnostic : diagnostics.getDiagnostics()) {
      System.out.println(diagnostic.getKind() + " on line:" + diagnostic.getLineNumber() + " column:" + diagnostic.getColumnNumber() + " - " + diagnostic.getMessage(null));
      int n = 1;
      for (String line : file.code.split("\n")) {
        System.out.println("Line " + (n++) + " length " + line.length());
      }
    }
  }
}

```

And the output it produces says that error is around column 54 while the longest line of code is just 43 characters long.

```
ERROR on line:3 column:54 - package Syste does not exist
Line 1 length 20
Line 2 length 43
Line 3 length 39
Line 4 length 5
Line 5 length 1

```

One more point in favor of spaces!
What's Your Costume?
Tags: watercooler, discuss
Published: 2019-10-31 23:22:36

---
title: What's Your Costume?
published: true
description: Be yourself...except on October 31st.
tags: watercooler, discuss
---

It's probably safe to say, we're all nerds here to some extent or another. So who better to appreciate how that nerdism works itself out in our Halloween costumes? There's just some jokes best appreciated by our colleages.

Here's mine...

{% twitter 1190031785771487232 %}

How about you? **Got pics?**
Day 24 : Come Close
Tags: hiphop, code, coding, lifelongdev
Published: 2019-10-31 22:48:52

_liner notes_:
- Professional : Coming real close to finishing up the project I started this week. Ran into a couple of roadblocks. One was my own fault, I got so excited that I got the backend working, I skipped a step on setting up the front end and got stuck. Luckily, someone on Slack was able to help pretty quickly. The next is just figuring out how to work with the data that comes back. It returns as a Map and I haven't really worked with them before, so it's been a good learning experience. I'll work on it a little more because I'm really digging it and want to blow it out of the water!

- Personal : Going to finish up the work project for a little longer than go through tracks for the radio show. I've got a bunch of music! I want to have a stockpile just incase one week I'm not able to work on the show.

![Urnersee Lake in Switzerland surrounded my mountains](https://thepracticaldev.s3.amazonaws.com/i/6zxr5dvp55lin5uz4egv.jpg)

Tomorrow, I want to demo my project for my manager and see if I can get some feedback. Probably end up cleaning up some of the code and refactoring a little. I want to get my laundry done, finalize the prep work of the radio show and maybe my lawn mowed as well.

It's almost the weekend!

Have a great day!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube dbbRrNHJ4Lg %}
How Does Your Team Manage Work / Deadlines
Tags: discuss
Published: 2019-10-31 22:46:16

---
title: How Does Your Team Manage Work / Deadlines
published: true
tags: discuss
---

Hi devs,

I'm curious to get better data around how teams and work together with agile and deadlines to get work done.

I have a few questions:

1. How do you manage bugs in your sprint?
1. What does your product lifecycle look like for a feature?
1. How does QA fit into the product cycle?
1. Do you use sprint pointing and do you find it useful?
1. What does a backlog grooming session or sprint planning look like?
1. How is architecture managed over time?


Any answers help - thank you!
Bash: Monitoring a file until a string is found
Tags: shell, bash
Published: 2019-10-31 22:20:58

---
title: Bash: Monitoring a file until a string is found
published: true
description: 
tags: shell, bash
---

The script will wait for the string "Server Started" appear in `logfile.log` and then continue the execution

```
    #!/usr/bin/env bash

    start_server.sh > logfile.log &

    # waiting for the server to start...
    ( tail -f -n0 logfile.log & ) | grep -q "Server Started"

    echo "Server is running"
```

Source: 
https://superuser.com/questions/270529/monitoring-a-file-until-a-string-is-found
New Tech Job Fair discount code: flatironschool
Published: 2019-10-31 22:10:16

I wasn’t planning to go but everyone else in the cohort was going. How could I decline if it was 50% off? It still felt scammy to pay a $5 fee to talk to possible employers. Shouldn’t employers be paying to speak to candidates like us instead? Alas, I had to go with the flow to avoid being left behind.

Dress Code

People were worried about how they would look. It reminded me of something someone once said about the dress code. “Don’t dress up for tech interviews: the more you dress up, the more they hate you.” I relayed that story to my brother and he responded with a story about a guy at work who was probably the best coder there and he wore a suit to work every day. I guess sometimes you can judge a book by its cover and sometimes you can’t.

Preparation

I didn’t dress up though. I didn’t even work on my resume. I didn’t know it was needed until the last minute when I was registering on the fair website. During all this, I felt overwhelmed. I have less than a dozen LinkedIn connections while others in my cohort have over 500. It might be a good idea to bring business cards also next time.

Arrival

There were multiple times you could schedule your own arrival: 4-5pm, 5-6pm, and 6-7pm. I figured that the early bird would get the worm so I picked the earliest time available which was 4pm. When I got there the place was already packed. I didn’t know job fairs had lines like this. It reminded me of Disneyland but for a corporate rat race. Nintendo had the longest line. By 6pm the lines were about as half as long. I should have come later. The only reason to go early is to get free stuff. If you want swag, go early. If you want to avoid long lines to talk to employers at their booths then go later. If you go right on time you’ll just end up at the end of a long line of people who arrived early.

Conclusion

Update your resume/portfolio
Print resume
Get business cards
Dress up but not TOO up
Don’t go too early.
Best Brother printer troubleshooting |1833-702-0977| Solution for Brother printer problems
Published: 2019-10-31 21:20:05

If you are facing any problems with your Brother Printer Device then call our free <a href="https://onsiteprinterhelpdesk.com/brother-printer-troubleshooting/">Brother printer troubleshooting</a> helpline number(1833-702-0977). Our Technical Support is available 24*7 to give you free assistance regarding Brother printer troubleshooting. We provide you with the best and convenient option for your Brother Printer. Our team of highly trained Brother Technicians are your service just a phone call away.
We provide complete assistance for installing your Brother Printer. The Technical expert from our Company will give you detailed support for your Brother Printer Installation on your system. You can avail of this service anytime at your convenience over a phone call.  Our <a href="https://onsiteprinterhelpdesk.com/brother-printer-troubleshooting/">Brother printer Helpline number</a> is 1833-702-0977 We are online24x7.
Happiest Halloween from the Richardson's
Tags: friends, programming, webdev, halloween
Published: 2019-10-31 20:58:23

---
title: Happiest Halloween from the Richardson's
published: true
description: Have a super happy and safe Halloween
tags: friends, programming, webdev, halloween
---

# The Richardson's would like to wish you a safe and happy Halloween! 

![The Richardson's](https://thepracticaldev.s3.amazonaws.com/i/ch67ia89oesgm7dvv12r.jpeg)

![The Richardson's](https://thepracticaldev.s3.amazonaws.com/i/lzzyrfiiz0r49pqk2vzo.JPG)

Please feel free to comment with your family pics as well! So we can all share.