teleren/devto huggingface dataset:
Moving From A and B to ~150 Microservices, the Journey, and Learnings [Slides]
Tags: webdev, devops, microservices, talks
Published: 2018-10-26 22:07:41

I gave a talk at #devopsdaysNewy on 24-Oct-2018. It was a great conference with lots of amazing people. I want to thank the organizers for putting together such a fantastic event. I want to extend the thanks to the sponsors who made it possible :). It was very good couple of days to meet new people and form a network. I think my talk on microservices went pretty good too. It was my second devops days and I enjoyed it.

![](https://cdn-images-1.medium.com/max/2000/0*aIcg6TD7hLZZgMSY.jpg)

## The abstract

Are you frustrated working with large, legacy and potentially lethal code bases? We were frustrated too, but in 4–5 years of time, we replaced A (front-end) and B (back-office) system with ~150 microservices. From the days of no tests and clumsy deployment process, we moved to each service with unit tests, CI and deploying with a bot. With the business buying in the process, we enabled the business to reach new heights. This talk reveals that journey and the things we learned along the way.

## The slides

{% speakerdeck 05a92573b3fc4221b6a17478ae0db2b2 %}

Slides on [slide share](https://www.slideshare.net/geshan/moving-from-a-and-b-to-150-microservices-the-journey-and-learnings)

## Conclusion

I gave the same talk at Node Sydney [September meetup](https://www.meetup.com/node-sydney/events/cvdqzpyxmbjb/) that went pretty well too. Hope to be able to give more talks in future and meet more interesting people.

---

*Originally published at [geshan.com.np](https://geshan.com.np/blog/2018/10/moving-from-a-and-b-to-~150-microservices/).*
Writing my first VS Code extension
Tags: python, django, jinja2, vscode
Published: 2018-10-26 21:51:58

---
title: Writing my first VS Code extension
published: true
description: A VS Code snippet extension for both the Jinja2 and Django template engines.
tags: Python, Django, Jinja2, vscode
---

I'm *(slightly)* celebrating this week because I achieved something, albeit relatively small. 

I published my first VS Code extension! 

VS Code is becoming an increasingly popular code editor with a huge selection of extensions to customize your experience. Despite this I still found myself creating my own custom snippets for the code I wrote repeatedly. 

After too long, it dawned on me that if I benefitted from these handy shortcuts then others might too. 

And thus, [Python Template Snippets](https://marketplace.visualstudio.com/items?itemName=RickyWhite.python-template-snippets) was born.

![Python Template Snippets](https://rickywhite.gallerycdn.vsassets.io/extensions/rickywhite/python-template-snippets/1.0.0/1540438764811/Microsoft.VisualStudio.Services.Icons.Default)

Just search "python template snippets" in VS Code's extention tab to install, or manually download from the Github repo below. 

It's only v1.0 but it's a start. Happy for feedback and [issue requests](https://github.com/EndlessTrax/python-template-snippets). 

And don't forget, if you like it, **leave a star rating** ⭐ 😊

Happy coding!


{% github https://github.com/EndlessTrax/python-template-snippets %}
Python tips 101
Tags: python
Published: 2018-10-26 21:51:29

---
title: Python tips 101
published: true
description: basic python tip to get started 
tags: python
---

I have background with mostly JavaScript and a strong type language such as Java.
Because Python's popularity in Machine learning, AI, data science, as well as backend web development, I decided to really learn it. I have observed that it has very elegant, and clean syntax which enforces us to think of the code on a high level (not too worried about the little detail) and to format code nicely with its strict indentation rule.

Below is some Python and JavaScript's code snippets to illustrate some common usages and language comparison.

{% gist https://gist.github.com/rattanakchea/19842cdc9b5ee08ed2a5379c8303c3d1 %}

I hope to write more advanced Python topics (I need to learn them first :-p) in future post:
- [] generators
- [] iterators
- [] decorators

If you have any comments and tips, please write below.

For side-by-side code comparison: https://leetcode.com/playground/vDy2x7Co/shared
Github vs Gitlab
Tags: github, gitlab, git, opensource
Published: 2018-10-26 19:20:49

> When Microsoft bought Github, everybody wanted to move to Gitlab. After 5 months on Gitlab, I can do the comparison.

## Philosophy


Github and Gitlab are two different `git repository managers`. I think I don't need to present them because almost everybody already knows this two services.

![](https://cdn.grahamcluley.com/wp-content/uploads/2017/02/gitlab-600.jpeg)

Gitlab is a professional git repository manager. You have a lot of tools to deploy, test your applications. It can also be self-hosted, which is a very good point.

![](https://tettra.co/wp-content/logos/github.png)

Github is more like a social network, and almost every big open source libraries, framework or tools are on Github.


## Use cases

### Gitlab

For me, Gitlab is a very professional git repository manager. It means if I were a professional programmer, I'll use Gitlab to host my git repositories. For many reasons like :

* Free private repositories

* Docker Registry / Free Docker registry

* Powerful CI tools

### Github

If you want to code an opensource project, Github will be a better option. Github is more like a social network. It means you will have more visibility on Github whereas Gitlab. There is also one good point for Github :

* Community

Yes, the open source community didn't move from Github to Gitlab that's why I said, **GO GITHUUUUUB** if you want to code an open source project.

### My mind

I think twice are very good choices. It only depends on what you want to do.
Gitlab is very useful but I come back to Github to have better visibility for [Filtrify](https://www.filtrify.xyz). Sorry, Gitlab ^^

![](https://octodex.github.com/images/nyantocat.gif)

*I'm testing gitote.in, I should write something about it in a few weeks*

 <iframe style="border:none" scrolling="no" width="500" height="250" src="https://gitote.in/embed/user/dimensi0n"></iframe>
Healing songs, healing code. How I'm using my side project to heal (part1)
Tags: python, healify, music, spotify
Published: 2018-10-26 18:47:05

---
title: Healing songs, healing code. How I'm using my side project to heal (part1)
published: true
description: healify, my side project that heals me        
tags: python, healify, music, spotify
---

Last month was a bad month. I won't get in the details of it, but it was a bad month. I talked about it with one of my friends and the day after I got a message from him

> "Hey man, here's one of the songs that makes you feel good"

Thank you Fabio. He was right. Ok, it didn't last long, but I felt better for a while. I strongly believe in the healing properties of music (and of coding ;) )
[He sent me this song](https://open.spotify.com/track/3zcYin7vFTtrjBFQN4yP1J?si=vSglktL-TGSCf8LPJ-JQ7A) if you're interested. Do not ask me why it worked. It just worked. But I wanted more.

So I thought

> "I should get more of these songs"

I wanted to gather as many healing songs as I could. And I didn't want to receive them by iMessage or Whatsapp of course. I wanted potentially anyone to be allowed to reach me and send me one of these songs and then share the playlist with everyone.

So, I opened vs-code, created a new project with the aim of having the simplest code for
- looking for a song in the spotify catalogue
- storing the chosen ones, maybe with a message attached

As I'm mainly using Python now, I've set up my project as following
- it uses Flask for exposing the search functionality and a branch for receiving the chosen song
- it uses pandas for loading and writing the list on a .csv file
- it uses semantic-ui and a simple .js file to handle the front-end part: a sort of autocomplete form and a thank you message in case you send a song

After the first night of coding I was able to use a local server to interact with the spotify APIs and get track results out of a query string. This was healing me already. I knew it was just a small step in a tiny project but it was working. It is working. How all this continued will be in the next parts of this "diary". Next part will be about setting up flask and interacting with spotify apis in python.

In the meantime, if you want, you can already send me your healing songs here :)
https://healify.it

and send me your comments here to improve the page
thank you <3
Hot Takes, Myths, And Falsehoods - Why Everyone Is Wrong About DevOps (Except For Me)
Tags: devops
Published: 2018-10-26 18:37:34

---
title: Hot Takes, Myths, And Falsehoods - Why Everyone Is Wrong About DevOps (Except For Me)
published: true
description: Don't believe everything you read on the internet when it comes to DevOps. A lot of people think they know what they are talking about, but they really don't. I, on the other hand, know exactly what I'm talking about.
tags: devops
cover_image: https://thepracticaldev.s3.amazonaws.com/i/38h2hq4ti2m5uc5k79z4.png
---
*(Adapted from a talk I gave at [DevOpsDays Indianapolis](https://www.devopsdays.org/events/2018-indianapolis/program/matt-stratton/) and [DevOpsDays Riga](https://www.devopsdays.org/events/2018-riga/program/matty-stratton-ignite-1/))*

Don't believe everything you read on the internet when it comes to DevOps. A lot of people think they know what they are talking about, but they really don't.

![](https://thepracticaldev.s3.amazonaws.com/i/etqgxy98bkur62s5x79s.png)

Here's a simple list of some common misconceptions about DevOps, and why they are wrong.

##“DevOps is more than just tools”

###False!

- If it was more than just tools, why would we have so many of them?
- Nobody cares about your culture
- There are a LOT of tools on DevOps twitter

##“DevOps is more than just automation”

###False!

- The “A” in CAMS is the only vowel
- Vowels are more important than consonants
- Therefore, automation is the most important

##“Kubernetes won’t solve all your problems”

###False!

- Kubernetes came from Google
- Docker is boring and old
- YAML shows your commitment to precision

##“If you DevOps, you still need testing”

###False!

- Remove the human element and remove the human error
- If your microservice only does one thing, it can’t have an error. That would be an additional thing
- QA people are annoying anyway

##“You can’t buy DevOps”

###False!

- You may not be able to buy it, but I can sell it to you
- Seriously, I would love to sell you some devops
- What will it take to get you in a devops today?

##“DevOps is not a title”

###False!

- Nobody can tell you what titles to use in your organization
- I suppose your HR people can
- But what does HR know anyway?

##“You can do DevOps on Windows”

###False!

- A key component of DevOps is a smug sense of self-satisfaction
- Windows is all click-next, right?
- Something something [slashdot](https://slashdot.org)

##“Cats are more aligned with DevOps than dogs”

###False!

![](https://thepracticaldev.s3.amazonaws.com/i/yrdh560rxgfytqf61yvg.png)

Need I say more?

*Note - if you take any of this too seriously, we need to have a conversation*
My Firefox Extension Is Actually Being Used, and I Think That's Really Cool.
Tags: showdev, design, tools, discuss
Published: 2018-10-26 16:54:46

---
title: My Firefox Extension Is Actually Being Used, and I Think That's Really Cool.
published: true
description: I made a thing. People are using that thing. It fills me with joy.
tags: showdev, design, tools, discuss
cover_image: https://harnerdesigns.com/wp-content/uploads/2018/10/Material-color-cover.jpg
---

When I first started getting into programming and web development, I was mostly pursuing it for the high salary (still working on this though, if you're hiring, hit me up!) and the joy of problem solving. However, the more work I do the more I realize I actually just love creating things that people _actually_ use and enjoy.


![Material Color Picker](https://harnerdesigns.com/wp-content/uploads/2018/10/Material-color-picker.jpg)


I created a [Material Design Color Palette](https://addons.mozilla.org/en-US/firefox/addon/material-design-color-palette/) Firefox Extension, mostly because I'm lazy and was tired of having to Google every time I needed a specific color code.

It started off as a Chrome Extension because I was primarily using Chrome at the time. Then halfway through development, I made the decision to switch to Firefox (Firefox Quantum had just come out and Chrome was really killing my old laptop). 

I finished development and wanted to not have to install it as a temporary add-on through Firefox on every computer, so I loaded it up in Mozilla's Add-On Directory. A few minutes later it was approved and...

## People Are Actually Using It! 

![Stats From Firefox](https://harnerdesigns.com/wp-content/uploads/2018/10/material-design-extension-stats.png)

21 Daily Users isn't much, but it's more than 0 and I'm damn proud of those 21. I'm sure at some point Dev.to only had 21 Daily Users, and look at it now! Just keep making stuff. Who knows who might end up enjoying your stuff.  


## Edit: I hadn't checked my stats on the Google version in a minute, but I'm up to 750 Current Users!!

![Google Stats](https://harnerdesigns.com/wp-content/uploads/2018/10/material-design-extension-stats-chrome.png)

_I guess I need to get around to porting that update back to Chrome. Coming Soon :D_


# I Love Making Things That People Enjoy.
Why do you do what you do? Looking to better the world? Pad your bank account? Something sinister? I'd love to hear it, Let's chat!

## Recent Posts
* [Fuck Facebook’s Text Overlay Tool](https://harnerdesigns.com/blog/fuck-facebooks-text-overlay-tool/)
* [BigCommerce Marketing Banners Adding Extra Commas](https://harnerdesigns.com/blog/bigcommerce-marketing-banners-adding-extra-commas/)
* [Pushing WordPress Theme Updates With Git](https://harnerdesigns.com/blog/pushing-wordpress-theme-updates-with-git/)
PostgreSQL: Analyze
Tags: postgres, tutorial, performance
Published: 2018-10-26 16:10:24

---
title: PostgreSQL: Analyze
published: true
description: How to keep PostgreSQL updated on the status of our tables so it can run queries as efficiently as possible.
tags: PostgreSQL, Tutorial, Performance
---

https://www.smoothterminal.com/articles/analyze

Hey guys, we've written an article on keeping PostgreSQL updated on the status of our tables so it can run queries as efficiently as possible.
Learn Angular 7 | Episode 3 of 5 | Part 1
Tags: angular
Published: 2018-10-26 15:55:46

---
title: Learn Angular 7 | Episode 3 of 5 | Part 1
published: true
description: Learn Angular 7 | Episode 3 of 5 | Part 1
tags: angular
---

{% youtube 5JdgHMjN-Hc %}
Why Not React Native? Why Not Flutter? Why Not Meteor? Why Not NativeScript?
Tags: meta, ios, reactnative, flutter
Published: 2018-10-26 15:38:57

We started working on an iOS app a little while back and just released a basic-not-totally-functional-but-usable Beta app yesterday.

{% link https://dev.to/devteam/help-test-the-dev-beta-app-4kme %}

This was an open source community effort. I sort of led the way early on by providing some initial direction, but then we let folks better than me take charge of the project.

But I did come in with the high-level technical direction. This could never have happened if I didn't at least have an opinion on what technology and architecture to use. We went with, what I would call, the "Basecamp Approach". **Native shell on top of web views.**

I included a link to resources from Basecamp in our repo:

{% github https://github.com/thepracticaldev/DEV-ios %}

But why?

React Native and Flutter and others are good options. But I felt like even with the cross-platform benefits of view-creation on these platforms, we're still fundamentally having to reimplement efforts from the web on native and coordinate every change brutally synchronously. We could overcome this with a lot of hard work and orchestration, but we'd always be fighting an uphill battle.

In order to keep leveraging the best of the web, keep our build velocity high, and ultimately maintain _way more optionality_, we took the approach we did.

I have used React Native and Flutter and think they are the right choice for a lot of types of projects, but really not this one. I've gotten the "why not" question literally just about every time this topic comes up. So here’s the answer: we're building a pretty simple native wrapper on top of a capable, and always improving, web application. Phones are getting faster, the web is getting stronger. This was a good choice. Any downside is a necessary tradeoff.

I don't know what the future holds, but in a field of constant uncertainty, I feel like our position is currently pretty well hedged.
Simple 3D Camera Movement in Unity
Tags: unity3d, gamedev, c
Published: 2018-10-26 02:03:17

---
title: Simple 3D Camera Movement in Unity
published: true
description: 
tags: unity, gamedev, C#
---

I'm making a 3D village management sim, and when things get crazy, I like to be able to zoom in on the action in a specific region.

This camera control script looks for horizontal and vertical axis inputs (WASD and arrow keys) to allow the player to pan around. It also watches the mouse scrollwheel to allow the player to raise and lower the camera.

Just drop it on your `Main Camera` gameobject in your scene, and you're good to go.

The basic pattern is:
  - if input
    - create a new `Vector3(x, y, z)` using the target inputs
      - `x` and `z` for pan, `y` for zoom, the rest `0`
    - multiply the `Vector3` by some predefined speed
    - add the new `Vector3` to the position of the camera transform

I've inverted the mouse scrollwheel input so that scrolling up zooms in and scrolling down zooms out.



```
using UnityEngine;

public class CameraController : MonoBehaviour {

    private float moveSpeed = 0.5f;
    private float scrollSpeed = 10f;

    void Update () {
        if (Input.GetAxisRaw("Horizontal") != 0 || Input.GetAxisRaw("Vertical") != 0) {
            transform.position += moveSpeed * new Vector3(Input.GetAxisRaw("Horizontal"), 0, Input.GetAxisRaw("Vertical"));
        }

        if (Input.GetAxis("Mouse ScrollWheel") != 0) {
            transform.position += scrollSpeed * new Vector3(0, -Input.GetAxis("Mouse ScrollWheel"), 0);
        }
    }

}

```
Parsing bridgesupport schema files
Tags: go, objc, devlog
Published: 2018-10-26 14:56:16

---
title: Parsing bridgesupport schema files
published: true
description: In an attempt to generate Go bindings for Objective-C frameworks, I parse giant XML files and create a parser for Apple's strange type encoding strings.
tags: Go, ObjC, devlog
---
Tuesday I started on the potentially arduous effort of generating a Go API for AppKit, the Apple framework for building apps. With the core bridge working, I want to have native bindings for all the Apple APIs. There are a lot of them! 

Luckily as I mentioned a while back, every framework has with it a gigantic XML file describing every part of the API. These are there specifically for generating bindings and/or header files. So the first step would be to parse these into Go structures. 

Although it's not super well documented, Go has amazing support for parsing XML into structs. You just lay out the data types and map them using struct tags. There is some documentation on the structure of these XML files, but I also just referenced a few of the files as well to figure out the data model.

There was one twist. When the schema needs to talk about specific data types of any value or variable, they are encoded into these strange strings. Luckily theses are... mostly documented. I had to poke around to find out why methods on informal protocols have some extra numbers it turns out I can ignore, and there are a few examples where I just don't know what they are.

On top of this, they're encoded into a strange string encoding where most types are represented as single characters, but a few like bitfield masks and pointers have extra information, and compound types like structs and arrays are of course more complicated structures. It took me a while to figure out how I should parse these. I ended up using `bufio.Scanner`, a sort of programmable tokenizer you can use to relatively easily throw together a lexer. After a bunch of experimentation I got a system that seems to work and I can extend and customize as I run into specific scenarios. I use this to create a `TypeInfo` struct that has a more friendly representation of the type data.

The best part is, I can have the XML parser automatically unmarshal into the TypeInfo type for those encoded fields. There aren't many examples of this, but it can be done and it works great. At this point I can parse a couple of these XML files without error, and although there's plenty of holes, this is enough to start generating some Go bindings. Next week!

{% youtube xui7cNeMwZ0 %}
Static site with markdown pages, but with bits of dynamic content in it? 
Tags: discuss, markdown, staticsite
Published: 2018-10-26 12:42:47

---
title: Static site with markdown pages, but with bits of dynamic content in it? 
published: true
tags: discuss, markdown, static site
---
Hello!

I have long thought about converting [my Wordpress blog](https://theforeignarchitect.com/) into a __static site__ with all the posts as markdown files, using either Hugo, or Jekyll, or Gridsome, etc.

However, I have a custom __shortcodes__ in each of my posts which grab data from a database and convert it to elements in the post.

This:
![shortcode](https://thepracticaldev.s3.amazonaws.com/i/r9nr56ep7e5w1890o06g.png)

Becomes this:
![rendered posts](https://thepracticaldev.s3.amazonaws.com/i/sgkkpe6gvcwkghfbl6jy.png)

I tried doing some research about how to make this situation work in a static site, but I in a bit of a loss as to where to start.

- Would it still work as a static site with bits of dynamic content being called at render time?
- Or would the dynamic content be called at build time only (which would be totally ok as well)?

So I thought I'd ask you guys: anyone with similar experiences or tips about this?

Thanks!
Daniel
Difference between oauth-shim, oauth-signature and oauth-request Node.js?
Tags: node, expressjs, oauth10, restapi
Published: 2018-10-26 10:27:37

---
title: Difference between oauth-shim, oauth-signature and oauth-request Node.js?

published: true
description: Please check the stack overflow link which I posted my full question. I having some trouble with express.js + OAuth 1.0
tags: NodeJS, ExpressJS, OAuth 1.0, REST API
URL for stack overflow: https://stackoverflow.com/questions/52982994/difference-between-oauth-shim-oauth-signature-and-oauth-request-node-js
---
A thought on the overuse of hearts on DEV.
Tags: meta, discuss
Published: 2018-10-26 09:12:43

---
title: A thought on the overuse of hearts on DEV.
published: true
description: First I was happy. Now I am disillusioned.
tags: meta,discuss
---

When I started writing on DEV, I was happy to see that I got my first "hearts" really soon. I thought that people liked what I wrote, so I kept contributing more comments and more articles, some more technical, some less.

Now this week I saw that the first spam bots registered here to post a meaningless "hi I'm *$username*" article and two subsequent links to a current movie from an obviously illegal source. None of those had less than five hearts before the DEV team got rid of them. This has one of two possible reasons:

1. Some DEV users like empty articles and being spammed.
2. More obvious: Some DEV users just add a "heart" to any new article without even reading the headline, because why?

Either way, this makes "hearts" worthless to me, at least for the moment. I can only urge you to think twice before giving them out. Make hearts great again!

But then again, at least five of you will probably not even read this.