Skip to content

Instantly share code, notes, and snippets.

View MIvanchev's full-sized avatar
💭
Perpetual burnout

Mihail Ivanchev MIvanchev

💭
Perpetual burnout
View GitHub Profile

Greenspun's 10th rule and the sad state of software quality

You've heard of Moore's famous law no doubt: a prediction made in 1965 that the transistor count per semiconductor chip area would double every year and adjusted a decade later in 1975 projecting a doubling every two years. While the transistor count curve has been a bit jerky lately it is still considered to follow the law meaning Moore's law is in effect for more than 60 years.

How could Mr. Moore have ever made such a deep prediction about an engineering discipline that was still in its infancy? He was a champion of his field and possessed the knowledge, experience and motivation to correlate a seemingly infinite number of variables and by that to uncover the Gestalt of the semiconductor industry, the very essence of the thing.

There are deep observations regarding software as well. Often formulated as aphorisms and jokes, people tend to initially overlook, misinterpret and dismiss them as cringy nerdisms but they bestow special powers to th

@MIvanchev
MIvanchev / wine-8.20.patch
Created November 11, 2023 17:58
Adding an additional encoding to static-wine32.
diff --git a/dlls/msxml3/main.c b/dlls/msxml3/main.c
index 66e23114bfa..80283d3c69c 100644
--- a/dlls/msxml3/main.c
+++ b/dlls/msxml3/main.c
@@ -311,6 +311,7 @@ static void init_char_encoders(void)
} encoder[] =
{
{ "gbk", gbk_to_utf8, utf8_to_gbk },
+ { "gb2312", gbk_to_utf8, utf8_to_gbk },
{ "windows-1250", win1250_to_utf8, utf8_to_win1250 },
@MIvanchev
MIvanchev / wine-8.19.patch
Created November 10, 2023 16:25
Adding an additional encoding to static-wine32.
diff --git a/dlls/msxml3/main.c b/dlls/msxml3/main.c
index 66e23114bfa..80283d3c69c 100644
--- a/dlls/msxml3/main.c
+++ b/dlls/msxml3/main.c
@@ -311,6 +311,7 @@ static void init_char_encoders(void)
} encoder[] =
{
{ "gbk", gbk_to_utf8, utf8_to_gbk },
+ { "gb2312", gbk_to_utf8, utf8_to_gbk },
{ "windows-1250", win1250_to_utf8, utf8_to_win1250 },
@MIvanchev
MIvanchev / snippets.sh
Last active September 19, 2023 12:24
Random Linux snippets
# Get the amount of data written so far to the SSD /dev/sda (assumes a sector size of 512 byteas)
#
sudo smartctl -a /dev/sda | grep Total_LBAs_Written | sed 's/.*[ \t]\([0-9]*\)$/\1 * 512/' | bc | numfmt --to=iec --suffix=B
# Proper turn off procedure for the HDD /dev/sdb
#
sudo udisksctl unmount -b /dev/sdb
sudo udisksctl power-off -b /dev/sdb
@MIvanchev
MIvanchev / article.md
Last active May 24, 2025 14:52
Ever wondered what it takes to run Windows software on ARM? Then this article might be for you!