January 20, 2020
On work processes
The remark is very right, it's from Spotify's videos on the topic:
"healthy culture heals broken process".
So the organizational hierarchy of company values should be:
culture > process > work
The culture cannot be built with any amount of process, so it's on a higher level.
Also the process helps to make less mistakes in work, while not being work itself.
January 10, 2020
On undoing git mistakes
https://sethrobertson.github.io/GitFixUm/fixup.html
Also this is a great example of dymanic "web app" without javascript! Yep, sir, anchors only. I really love a pragmatic simplicity of this kind.
Labels: git, no javascript, reference, undo
January 9, 2020
Android Emulator in Docker
$ make build-base && make build && make start. This provides emulator device waiting to run your tests.
PS I am not a big fan of building in docker, however it's possible using avd-base image from same project. I will cover this later.
Articles on building large systems
The good overview of using kubernetes for large finance projects by a brilliant architect Oleg Chunikhin (now CTO at Kublr) and Terry Shea, with whom I was lucky to work during early days of my career:
Making Kubernetes a Reality for Financial Services
Here's a nice description of the key moments on way working on scalable cloud system:
How to sleep at night having a cloud service: common architecture do's
A must-read about choosing a technologies:
Choose boring technology.
Labels: architecture, bookmarks, cloud, kubernetes, scalability, software architecture
January 8, 2020
Android: one ViewModel per view
Do not create huge ViewModels, keep it simple. Yes, it's more classes per view, however your support and development costs are closer to linear in time.
Labels: android, architecture, mvvm, software architecture, view, viewmodel
January 7, 2020
Blog migration to hugo
Sharing here some experience in process (will update this post until done).
TL;DR:
- Install latest hugo with snap
- Find and install theme (with git submodule - see below)
- Try blog with "hugo server ..."
- Setup publishing pipeline on blog changes (for example, Jenkins or whatever is preferred).
- Install blogger_to_hugo migration tool
- (This one is not specific to anyone I suppose. I don't want to experiment with lots of new packages in my main macos system, so installing debian 9 as vbox VM. All further is done there).
- Run migration from blogger backup with blogger_to_hugo. I got an error:
TypeError: object of type 'NoneType' has no len()
Seems like it expects only the english post titles (or maybe texts in english too) and crashes otherwise. Too bad. - Use blog2md which produces a bunch of .md files (not sure about non-english titles, but no crash at least).
- Install and try to use zzo theme. It turns out that hugo 0.58 is not compatible. Although it's latest in debian sid (unstable) repo!
- Use snap installer (another repo to think of..): snap install hugo
- Hmm, zzo theme does still not work showing bunch of "render of 'page' failed..." errors and crashing in the end. Could be a non-english titles.
- Trying a hugo theme pure.
- Copy and edit config from example site of a chosen theme.
- Use git submodules for themes if your blog is in git (which itself is a great idea too!) like:
git submodule add https://github.com/SOME/THEME themes/THEME
- Use snap (it's in bad ones too) - to experiment only.
- TL;DR: always use system packages, do not install binaries.
I strongly advocate against using a zoo of repo managers (read: snap, pip, etc - whatever non-native to your OS updates subsystem) or binaries to anything running in runtime at server. It takes huge amount of maintenance to track of major updates. Most probably you would miss serious vulnerability at some point. Even old version of packages in debian stable receive security fixes (they are backported), which you would need to do yourself manually for any separate repo manager not added to your cron (most probably manually too). - Test your hugo+chosen theme with all desired charsets before everything else. It's really hard to believe that modern software written in golang crashes for a non-ascii (read: utf-8 or cp-1251), but that's what happens to hugo with some themes.
- Good old backslash escaping is not what works in yaml out of the box. To escape apostrophe (single quote) use '' (yes, type it twice). Enjoy this good reading before going bed (do not): https://yaml.org/spec/1.2/spec.html