Hi, In the good old days, when the Earth was young and the Internet was a wild west of plain, non-commercial unencrypted text, intercepting traffic during development was trivially easy. You'd fire up Ethereal (now Wireshark), pick the right interface, and watch every byte of every HTTP request fly by. Life was simple. Then Let's Encrypt happened, HTTPS became mandatory, and now…
If you're on KDE with both Dolphin and Nautilus installed, you may have noticed that clicking Open containing folder in Vivaldi (or any Chromium-based browser, really) opens Nautilus instead of Dolphin. Everything else seems fine -- xdg-mime query default inode/directory returns org.kde.dolphin.desktop , and KDE system settings agree. Yet there's the GNOME devs, pushing you their…
Maybe you've seen this error, when you sometimes use virt-manager : Error starting domain: internal error: process exited while connecting to monitor: qemu-system-x86_64: -accel kvm: Could not access KVM kernel module: No such file or directory qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory it sounds like something is pretty broken. Potential problems…
I keep forgetting the command line options for standard Linux package manager actions, so I've decided to write a blog post about it. I'm currently using Gentoo, ArchLinux and Fedora, so I'll include pacman, rpm and deb flavors (for completion). Q: Locating the owner package of a specified file Portage: $ qfile /usr/bin/ls # or 'equery b /usr/bin/ls'…
Programmers say that C++ gives them a lot of power because it allows them to shoot themselves in the foot in more ways than one. With its complicated syntax, multiple paradigms, and many confusing features, C++ enables programmers to create convoluted, hard-to-maintain code that is still somehow able to run at high speeds. This "power" also comes with a steep learning curve and a high potential…
I wouldn't use Windows if I wouldn't be forced to use it. Unfortunately, trying to evade it is like trying to evade snails after the rain -- whatever you do, snails ain't interested in it. So the best course of action is to embrace it: keep your friends close, but your enemies closer, as they say. One recent problem that I had was to build a specific Access Control List for a…
LLDB allows the user to write plugins in Python and C++. Because I'm a fan of static typing when programming, I'm often finding myself avoiding Python at all costs. When trying to write a plugin for LLDB this wasn't an exception. I'm not a real fan of C++ either, but I can find numerious advantages of the language, so that choice was a no-brainer for me. The problem is that…
I always forget what are the proper arguments to create a ssh proxy in some specific way, so I'm leaving a small cheatsheet here for my future references. I've already written a blog post about it a few years ago, but now I need a fast reference instead of a descriptive blog post. Example 1 (ssh -L) There's a VM ( heravm ) running on my MacMini ( hera ) which doesn't have…
I once dreamed that I was a loop. All I wanted to do was to iterate, executing the code that has been declared inside me. It was getting to me that the termination condition was about to happen, but I didn’t want to accept it. I wanted to keep iterating and executing the code. When finally the termination condition occured, I ignored it. The only thing that mattered to me was to keep going. I felt…
When programming, developer sometimes needs to contact a server, use API, etc. HTTPS is now a must. Letsencrypt makes it easy. There are several frameworks for easy HTTPS communication. Libs are high-level. They are easy to use, but they sometimes do some of the work behind the scenes. This sometimes makes it difficult to know what exactly is being sent and how. Sometimes we need to check if a…
Sometimes I also write mobile apps. It's a good exercise, and allows to be more familiar in today's fastest growing market. Since their distribution is very easy (much easier than distribution of traditional desktop software), I'll present those apps here.
When writing short-lived command line tools on JVM I often realise that when trying to run the application I prefer to simply switch to the terminal window and run the app from there, instead of doing it from the IDE. Maybe that's a thing I've inherited from years of using Vim to write all sorts of scripts, or maybe it's a way that allows for easier tinkering with the command line…
Generally I'm pretty happy with my KDE desktop, although I'm among those people who think that KDE hasn't been the same since version 3. Having version KDE v5.22.3 currently installed on my machine I do see lots of bugs, but the advantages like the feature list, and not assuming the user is an idiot (comparing to GNOME) easily convinces me that KDE is the best thing Linux Desktop…
I was an Amiga "user" back in my childhood days. Back then everything was magical, but today I know that it was just science all along. Peeking into old AmigaOS binaries (tools, games) takes the veil of mystery away a bit, and sometimes it's possible to see fun things that are pretty simple when one knows how they work. But, at the same time, one can also appreciate the unexpected complexity…
I've received a new MacBook Pro with the M1 chip and I've tried to perform a "factory reset" on it (that is, wipe all user data, and reinstall the operating system to a clean state). This is how it went. TL;DR -- Before attempting to do anything, update your Big Sur to at least version 11.1. Don't use Disk Utility when removing the partitions; Use the "Erase Mac" function from…
There are lots of resources on the Internet about RAID-6 error recovery and how you can create your own implementation of it, but most of those resources require spending a lot of time fighting with mathematical equations and figuring out the real algorithm. In this post I'll try to give you a simple example how you can create your own error recovery solution based on what is used in RAID-6.…
Nothing could be easier to remember and understand -- I don't understand why Windows hasn't adopted it yet. Command is generally used for command execution. But also it's used as a modification for mouse clicks. So, when you click with Command button active, you can sometimes get a different outcome. Shift key normally modifies letters to uppercase. But it also can be used as a…
Consider this code: #include <iostream> using namespace std ; struct Base { }; template < typename Type > struct Derived : Base { Type field; }; You can see two classes here. The class Base contains nothing, it's a placeholder. Then, there's also class Derived , which contains one field. The type of this field is specified in the template parameter Type . So, in main() , let's…
I have an impression that each version of macOS system introduces additional obstacles for developer. From one point of view I understand that they just want to make the system more secure, and that should be the biggest priority above all (well, maybe not above common sense). But it's hard to accept the fact that i.e. Valgrind doesn't work anymore, tools like lldb don't work out of…
You may think you've created a nice and tidy Makefile, which tracks dependencies and works across many different operating systems, but ask yourself these questions (and answer honestly): Which compiler does your Makefile support? Is it GCC ? Or Clang ? Some of their options are pretty similar, so it may not be very hard to make your Makefile work for both. But does it support e.g. Visual…