Phylosophy, Technology

My personal example of using math in programming

I was working on a small personal tool which adjusts the brightness via DDC protocol.

BTW, you can check the Github repository of it.

I wanted the tool which adjusts brightness automatically and gradually, using the time of the day and the season information. The first version which has been created perfectly fit my needs and had been working on my PCs for over 2 years.

Then I decided to share it with public and I started to work on its improvement. My goal was to generalize and parameterize the tool as much as possible, so that it could be used by other people with different requirements. And during this optimization I faced a problem with the brightness adjustment algorithm. Its initial implementation was rigid, built with if-else statements. I struggled with this problem for a while, looking for a fancy built-in Python modules or operators. Until I realized that what I need, is just to make a function. No, not the Python function, but the mathematical function!

Let’s go, I will show you how I did it.

Read More…

My Linux Experience Update

I have been using Linux as my primary operating system for more than 5 years now. The best part is that last 3.5 years I am using Linux not only at home, but also at work. My company allows to use Ubuntu Linux as a primary OS on my work laptop.

In this small post I like to reflex on my experience with Linux and how it has changed my life.

Read More…

Writing my own password generator

There are many password generators available: online and offline, as independent applications or as part of password managers. But I decided to write my own password generator in Python. Why?

  • It is a fun and small Python project, which can be done in one evening.
  • It will do only what I need and nothing else.
  • I know how it works and I can trust it.
  • I can use my own dictionary of words and phrases to generate passwords.

So, let’s go!

If you don’t want to read the whole article, you can go directly to the GitHub repository.

Read More…

Status Update

I have been off my blog for a while now. In year 2021 I started a new job at AWS and I have been busy with that. My time was occupied with learning new things and working on new projects.

Read More…

How much Dev and Ops shall be in the DevOps?

DevOps is a very popular modern set of practices for a software development and operations. And here comes quite interesting question:

How much Development and how much Operations shall be in the DevOps for engineers?

Is there an ideal balance?

I believe there is no particular numbers for such balance, but there is an ultimate ideal goal of making people free from Operations.

Read More…

Xmonad and Xmobar for laptop

Here I publish my Xmonad and Xmobar setup for the laptop. Key features of this setup is ability of the proper dynamic monitor setup: laptop screen + second HDMI connected monitor.

  • Monitor can be connected and disconnected any time.
  • Each monitor has its instance of Xmobar.
  • Instances of the Xmobar are added/removed dynamically.

I use systemd service for the detection of the external monitor/screen attachment/detachment.

Screenshot

Screenshot of Xmobar on two screens

Xmobar dual screen

Read More…