The Suckless Stack

29 September 2024 linux software-engineering

In this post I am going to talk about the Suckless software tools and how I have integrated them into my workflow and daily use. Suckless tools are interesting because they are a little different from the mainstream in terms of how their software is built, configured, packaged and delivered. Their websites summarizes their mission statement as quality software with a focus on simplicity, clarity, and frugality. Lets dig a little deeper into what makes Suckless software unique.

Thoughts on Programming Languages

7 September 2024 software-engineering

This is a summary post of different programming languages as well as my personal experiences and opinions about them. I have written code in many languages over the years. Some languages I have tried only briefly while others I have used daily for many years. Additionally there are many interesting languages that I still look forward to learning. I have written before about what makes a good programming language which is closely related to this post. This post is very long, so if you just want to know which programming language you should be learning, skip to the very end where I give some recommendations for different career paths.

Moving to GitHub

26 May 2024 software-engineering

I have decided to move my public Git repositories to GitHub from Bitbucket. There is no denying it: GitHub is the place to be if you want to have a public profile as a software engineer. I have had my code hosted on Bitbucket for years and have been kind of waiting that it would be developed more to be a serious competitor for GitHub. But while Atlassian is a great company in my opinion, their focus seems to be on serving enterprise customers, rather than helping individual developers to have a public profile for their code that looks attractive. GitHub just looks good. Bitbucket kind of gets the job done in terms of storing your code, but the appearance does not give you confidence in sharing the links to your repositories with others.

Dangers of Extraterrestrial Civilizations

10 November 2023 space

This post is about a little different topic than my normal topics of software engineering and investing. The beauty of having a personal blog is that I can write about any topic that pops into my head. This post is about potential dangers of contacting extraterrestrial civilizations before we are ready for such adventures. I have always been interested in space exploration so this topic is near to my heart. I am also in the process of reading the Three-Body Problem by Liu Cixin which is an excellent science fiction book, and very closely related to this subject. Highly recommended.

Poem about Emacs and Vim

2 August 2023 emacs

This poem was made by ChatGPT.

Game Review: Cyberpunk 2077

15 April 2023 games

I recently completed the game Cyberpunk 2077 and thought it may be a good idea to write a review of it. The game does some things right, but unfortunately does not live up to its full potential.

Adventures in the Capital Markets

27 November 2022 investing

Now that I have been investing in stocks for more than a decade (started in 2012), I thought it would be a good idea to write down some of the most important lessons I have learned during my adventures in the capital markets. The topic of my first blog post was a description of my investing philosophy. That was 5 years ago. Looking back I realize that not a lot has changed during that time.

PHP on the Command Line

27 March 2022 php software-engineering

Most people tend to associate PHP with web programming. They might be unaware that PHP is actually great language for shell scripts and command-line use as well. The syntax is relatively expressive so you can do a lot in just a few lines of code. And like Bash, you can just write a script and run it. This is ideal for quickly writing small scripts and leads to faster development than compiled or strictly-typed languages like Go and C#. PHP is also faster than Python which is apparently commonly used for shell scripting.

Shopping in Tallinn: Stocks

20 November 2021 investing

Shopping is fun in general but shopping for shares of quality companies is really fun. The dividend payments that they provide are a good source of funds for other types of shopping such as clothes or luxury items. So far my investing efforts have been mainly focused on Finland and US based companies. I have previously written about stocks in Helsinki to provide some ideas for investments. While I want to keep those countries as the biggest weights in my portfolio, I am also exploring other markets for smaller additional positions. In this post I will take a look at Estonia.

What is the Best Programming Language?

20 August 2021 software-engineering

Since the beginning of internet, when first bytes began to flow between networked computers, script kiddies have been asking the age-old question on message boards, forums and mailing lists: "What is the best programming language?" Much to their disappointment, even after vigorous debate lasting many decades, this question still does not seem to have a definite answer. Of course, those with a little more experience have figured out that there is no such thing as one language that is best for all situations. So why do people ask it? It takes a lot of time and effort to become proficient with even one language. So they don't want to hear that they need to learn three or four languages, especially when they are just starting their career and it can feel overwhelming.

Emacs Daemon and Multiple Daemons

14 August 2021 emacs

I have been using Emacs the normal way for many years and I am really happy with it. By normal, I mean starting Emacs as a regular process and not using the daemon with emacsclient. This approach has been good enough because usually I start Emacs once when I start working and then just keep it running throughout the day. The startup time is not too bad, maybe around a second or two, when it happens only once per day. With the faster startup speed usually described as the main benefit of the daemon process, I had not seen the need for it in my workflow. But now I changed my system to run not one, but two, daemon processes of Emacs, and I am really glad I made the change.

Getting Started with x64 Assembly

A while ago I decided the learn the basics of the Assembly language for my x64 processor. Assembly has a reputation for being difficult and elitist which is keeping many people from trying it out. But once you learn the basics, it is actually really simple. In fact, in many ways it is much simpler than other programming languages. Using Linux as our host system, we can make system calls to the kernel for many operations like reading and writing standard input/output and files. Also the x86 instruction set allows us to perform string operations and "loops" directly with a single instruction, condensing many common operations into just a few lines of code.

Static Website Generator

I have not been updating my website and blog in a while. Part of the reason is that I was not fully satisfied with the software powering the site. The site was running on Grav CMS, and don't get me wrong, it is a great piece of software for hosting a website. With Grav all the content of the website is stored in Markdown files and having a database is not required. I much prefer Markdown files since they are a joy to edit and can be stored in a Git repository to keep version history. It suited my preferences much more than something like Wordpress and it was more lightweight also.

Customizing Indentation in Emacs CC Mode

25 October 2020 emacs php software-engineering

I have been using Emacs as my main text editor for writing PHP code. For that purpose, the php-mode is a nice Major Mode which provides syntax highlighting and other convenient features. It can be installed from the MELPA package repository.

Writing a Lisp Interpreter

24 October 2020 php lisp software-engineering

There comes a time in the life of a serious software engineer when he wants to implement a custom programming language. Not with the goal of creating a language that gains widespread adoption (there are enough programming languages already), but as an exercise to gain deeper insight into how programming languages work.

Basic Personal Finance

29 March 2020 investing

I have been thinking about the importance of being smart about personal finances as many people are now struggling because of the COVID-19 pandemic. Many are losing their jobs and have not saved money to prepare for something like this. It is a rude wake-up call for many, very much in the same way as the 2008 financial crisis was. The lesson is clear: unexpected events will happen to the economy that we cannot control. We must focus on what we can control, which is our personal finances. In this train of thought, I wanted to write a basic guide for personal finance. Just some best practices and common sense information that I have learned over the years. Something a person can follow and know that they will end up being comfortable with money, even in times of economic turbulence.

Own The Companies That You Use

22 March 2020 investing

A nice personal financial goal to have is to own the same companies that you use, so that you will receive in dividends the same amount that you spend with them. This way you are kind of using their service for free. To do this, just calculate how much money you spend annually for a service, then see how much that company pays in annual dividends, and finally calculate how many shares you need to own to cover your expense. Lets look at some examples to illustrate this idea.

Optimizing PHP: Sorting

12 January 2020 php software-engineering

In the previous post we examined the potential performance issues with nested for-loops and how they can be improved using array lookups instead. Another common pitfall in terms of performance can be sorting when done incorrectly which we will examine here.

Optimizing PHP: Array Lookups Instead of Nested Loops

11 January 2020 php software-engineering

One of the most common issues that I see almost daily when reviewing code is nested loops where they aren't required. They are particularly tricky because they are not slow with small data sets (which developers often use for testing), but become slow in production environment where data sets are larger. Of course, testing with too small data sets is a separate problem which should be fixed as well.

Securing Linux: Closing Open Ports

10 January 2020 linux

One important aspect in securing a Linux system is closing any open TCP ports which don't need to be publicly accessible. This reduces the attack surface that the system exposes for malicious actors. In case a service needs to be accessed only locally, a good practice is to bind it on the local loopback IP address (127.0.0.1).

Generic Utility Functions for PHP

16 December 2019 php software-engineering

On this post I would like to introduce some generic utility functions for PHP. I often keep these in the global namespace because they are so useful. You may wish to wrap them in a namespace, or even a class, depending on your use case. They follow similar naming convention as the built-in functions of PHP because I view them almost like extensions to the standard library.

Profiling PHP using Xdebug and Webgrind

15 December 2019 php software-engineering

Have you ever encountered a situation where the performance of your PHP script is not great, but you are not sure where the problem is? Then you try to guess and change some part blindly just to see if that would help?

Customizing Emacs Keybindings

14 December 2019 emacs

I have been using Emacs as my text editor for a few years now. One of the best features about emacs is that you can customize everything. This is because of the underlying lisp interpreter that allows you to define custom functions and then bind them to keys. This is in contrast to a "normal" text editor which allows you to change keybindings, but only to pre-defined built-in functions which perform the text manipulation.

Book Review: Rich Dad, Poor Dad by Robert Kiyosaki

24 May 2019 books investing

It has been a while since I updated my blog, so it is about time. I have just finished reading Rich Dad, Poor Dad by Robert Kiyosaki, arguably one of the most famous "self-help" books when it comes to money and finances. I particularly liked the blunt and straight-to-the-point writing style of the author. So here is a short review of the book.

Using Stock Options Effectively

7 January 2018 investing

This is a brief introduction into stock options and how they can be used by a long-term oriented investor, either to purchase shares at a discount or to generate additional income to supplement dividend payments.

Book Review: Be Obsessed Or By Average by Grant Cardone

2 January 2018 books motivation

I ordered Grant Cardones new book, Be Obsessed or Be Average, at the same time as The 10X Rule which I reviewed earlier. This book has a very similar tone as the first book, but it considers things from the viewpoint of obsessions. The title is provocative for sure but it is consistent with the style of the author, no doubt intended to shock people a bit.

Finding Quality Stocks in Helsinki

30 December 2017 investing

In a previous blog post describing my investment philosophy I explained that I try to invest in companies of highest quality. But how to measure the quality of a company? There are many ways of course, such as looking at the strength of the balance sheet, competitive advantage or track record of management. There are also various equity research institutions which provide metrics and rankings to measure the quality of different companies.

Book Review: The 10X Rule by Grant Cardone

18 December 2017 books motivation

I must admit, I struggle to read books. It is so easy to get distracted with other things such as YouTube. Dont get me wrong, there is plenty of valuable content in video format, but there is something special about reading which engages the brain in a different way. After hearing over and over that successful people read books I realized it is something I must do, there is just no way around it. Writing a short review of a book that I have read is a good chance to reflect on what I have learned.

Three Decisions of a Business

16 December 2017 business

There are three main decisions that any business entity must make. These apply whether we are talking about a single enterpreneur or the largest corporations on the planet. Most other business considerations usually fall under one of the three main ones. The purpose of a business entity is to create value for their shareholders and these three decisions determine whether value is created or destroyed. The situation is a little different for non-profit organizations, but not much. Just like for-profit business entities, they face the same optimization problem of how to use their resources as efficiently as possible.

My Investing Philosophy

13 December 2017 investing

Since money and investing will be one of the main themes of my blog, I think it is natural to start off with a quick introduction into my investing philosophy. If I had to sum up my investing philosophy in once sentence, it would be get rich for sure. I have tried various things over the years, but one consistent lesson has been that the get rich quick methods do not work very well. So here is a brief introduction into my thoughts regarding investing for passive income.