The Triangle of Conscience

Conscience is like a triangle in your heart. When you do something wrong it spins and hurts you a bit. If it spins for too long, its edges fade and it stops hurting. ( This metaphor is supposedly inspired by a Navajo teaching. I could not find reputable sources about the origin or the usage of the .metaphor. But the idea seems potent enough to stand on its own.)

Extreme Env Parity

You need/want a local k8s environment to develop your container images, helm charts etc. And you’re pedantic about env parity. Your envs should differ only where they absolutely need to. So that you can re-use your manifests/charts as usual and when you eventually push to a shared env, you do so with confidence. You don’t expect issues with the workloads. You can build or pull the containers. Persistence may be an issue but your local k8s solution should already have a storage class for you to use. ...

Cheap Thrills

Consider the case of a hobby project or a startup with no funding or clients for the foreseeable future. We need dirt cheap infra for development and demos. What’s the lowest price for: somewhere I can run a couple of containers of my services a db to save my data, managed if possible a Load Balancer to expose my app to the world DNS so I can slap a name on the thing. AWS Free Tier (or equivalent) is always on the table. But then you need to be vigilant of usage and attentive to details (and who’s got time for the details, right? :-P) A simple VPC + subnets + NATs in AWS ends up costing somewhere near 15$ / month when accounting for Public IPs and traffic. And then we factor in our apps’ needs. ...

Empathy for Engineers

I’ve been in a couple of leadership seminars. One of the concepts that arose as central for good leadership was empathy. But what’s empathy? Let’s use this definition. …the ability to sense other people’s emotions, coupled with the ability to imagine what someone else might be thinking or feeling. If someone says I'm sad and I hear that, am I now empathetic towards them? Empathy is not superficial, but an in-depth understanding of both the state (sad) and its underlying causes, ideally coupled with the ability to predict future behavior. ...

Was this piece of code successful?

When it comes to a unit of code ( let’s define it as a project, service, function, script etc that performs some task) how do you define success? An easy answer would be It fulfils its primary purpose Each unit’s purpose, of course, differs. But, excluding learning projects, PoCs and similar endeavors, most of our work is commissioned. And it usually includes support and maintenance, right? Most of us, hopefully, enjoy the building part but merely tolerate the support/maintenance part. ...

Managed Services Woes, RabbitMQ Edition

I love managed services. You need a message broker, I’ll have one ready for you in 15’. We trade some money for ease of use and focus on the core deliverable, great. But then we need a simple change. Make the message queue’s endpoint public. If you’re using AWS MQ RabbitMQ and had created a private instance, then tried to flick a switch to make it public… Let’s start a support group, I’ll bring the cookies and frustration :-P ...

September 28, 2024 ·  stelis

macos setup as code

I try to keep track of everything that goes into my work machine. I, of course, start missing things after a couple of months. But the value is in trying, right? Let’s hope so. In any case, I recently setup a macos machine from scratch. It was intended for devops/infra work ( k8s, terraform, aws etc). It also includes java + node as I’ll occasionally need to build the apps before running them. ...

September 21, 2024 ·  stelis

ConfigMap Confusion

This has happened to me more than a few times… We’re mounting a ConfigMap to our container and using it to configure some aspect of the app inside it. Then the ConfigMap changes. But the app is unaware and does not react/reconfigure itself. Which component is at fault here and how can we fix it? Until this bit me, I was under the impression that Configmaps mounted in containers do NOT auto-update their contents in the container. At least not without restarting the container itself. There are even projects that undertake parts of this responsibility. Like Reloader or SpringBoot Config Watcher. ...

September 16, 2024 ·  stelis

My most used bash functions

There’s problems you’d like to solve. And problems you like solving. What you put in the second category is almost uncomfortably revealing of who you are. Anything you consider trivial fits right into the first category and is a candidate for automation. Here are some of these automations I bring with me to all new laptops I work on. get a random string of variable length function randpw() { # e.g randpw 20 local pwlength="${1}" cat /dev/urandom | tr -dc 'a-zA-Z0-9!@#$%^&*()-[]{}:;\|,.<>/?' | fold -w "${pwlength:-50}" | head -n 1 } full update for ubuntu distros function fu() { sudo apt update sudo apt -y upgrade sudo apt -y dist-upgrade sudo apt -y autoremove sudo ubuntu-drivers install brew update brew upgrade } update all repos in your code directory function getallprojects() { find "${YOUR_PROJECTS_DIR}" -maxdepth 1 \ -mindepth 1 \ -type d \ -printf '%f\n' \ | grep -v .vscode } function getdefaultbranch() { git remote show origin | grep 'HEAD branch' | cut -d' ' -f5 } function refreshprojects() { local LIGHTGREEN="\e[92m" local ENDCOLOR="\e[0m" echo "---------------" for project in "$(getallprojects)"; do echo -e "Refreshing ${LIGHTGREEN}${project}${ENDCOLOR}" pushd "${project}" > /dev/null || exit git fetch --prune git checkout "$(getdefaultbranch)" git pull popd > /dev/null || exit echo "---------------" done } hack to get a urlencoded string function urlenc() { local str_to_encode="${1}" encoded_str=$(python3 -c "import urllib.parse; print(urllib.parse.quote('''${str_to_encode}'''))") echo "${encoded_str}" # why did I need it? # verify connectivity to rabbitmq, password had special characters # rabbitmq-dump-queue -uri="amqps://mq_user:$(urlenc "${mq_password}")@my.mq.endpoint.tld:5671/" -queue=myqueue -max-messages=1 -output-dir=./ } Is it worth the time? It depends

September 15, 2024 ·  stelis

Can I get Free Email for my custom Domain, please?

At some point you bought a domain. You made something of it, or (usually) not. Now you’d like an email address on that domain. It looks much nicer than your typical xyz@gmail.com, right? Especially if you’re a business, Google Workspace or Microsoft 365 is a no-brainer. You get your custom domain email, storage, collaboration apps, SSO and other tools for something like 5-10$/person/month. But if you’re like me (i.e you like the vanity of the thing but will not allow yourself the expense unless you know you’ll actually use it or it’ll make its money back somehow) you may be looking for something without monthly subscriptions, preferably free. ...

September 14, 2024 ·  stelis