Xah Programing Blog Archive 2010-12

Discovered a new compression util: XZ Utils. Quote:

XZ Utils (previously LZMA Utils) is a set of free lossless data compressors, including LZMA and xz, for Unix-like operating systems (with experimental support for Windows as of version 4.999.8beta) controlled by a command-line interface. It has been ported to many Unix-like systems including GNU/Linux, Cygwin, and iOS.

See also: ZIP, Open Source, Mother-Son Relationship. (thanks to meowcat.)

Thanks to Remington Furman for $15 donation!

HTML Entities, Ampersand, Unicode, Semantics (thoughts)

Windows Vista has this Quick Launch toolbar. Basically, you can drag icons there and you can click icons there to launch apps. It also has a automatic hotkey feature. Whenever you put a icon there, a hotkey is automatically created for you. The first icon will have hotkey 【❖ Window+1】, and second 【❖ Window+2】, etc. The total number of hotkeys auto-created are limited to 10, from 1 to 9 and 0.

Great feature, but there's one problem. Whenever you create a new icon, or remove one, all your hotkey changes. This is quite annoying.

So, today, i disabled them all, and instead, use AutoHotkey to create hotkeys myself. Like this:

; disable the bunch of launch app keys setup by Quick Launch. Because it change keys whenever you add or delete a icon there.
#1::Return
#2::Return
#3::Return
#4::Return
#5::Return

#6::Return
#7::Run "launch or switch skype.ahk"
#8::Return
#9::Return
#0::Return

See also:

Unicode Box Lines, Shapes ┌ ┬ ┐

How Are Books Made in 1950? Video of Linotype Machine in Action (nice video)

Unicode Keyboard Symbols ⌘ ⏎ ⌫

Discovered Operation Payback. A internet activist group. Recently, they launched attack on those who attacked Wikileak. [see Wikileak: US Diplomatic Cables Leak] They DDOS attacked sites of Visa, MasterandCard, Paypal, Amazon, and some government sites. In the past, they've attacked sites such as Recording Industry Association of America (RIAA), Motion Picture Association of America (MPAA), Warner Brothers, and also Scientology, etc. Typically, big organizations that cracks down on piracy networks. (See: Scientology and Falun Gong)

I don't support software piracy. [see Software Piracy, Open Source, Free Software, Copyright] However, in this world, much of it is political struggle. For example, there are 2 politicians B and E. You don't really like B, but you think E is by far the most evil. B is your possible chance to prevent E becoming more powerful. So, in many circumstances, you have to support B. This is in fact how alliances work.

Also, orgs like the Operation Payback are made of individuals, like you and me, where each of us make decisions individually, as opposed to big organizations that are typically mindless power controlled by a few. In some sense, that's a essential ingredient to keep some power to people, a form of Grassroots movement.

The Operation Payback group is called Anonymous (group). They seem to have twitter account https://twitter.com/AnonOpsNet.

Also, i've always wondered how those DDOS attack gets their machines. I thought it's from viruses (trojan horses), whic got to people's machines from games or pirated software downloads, without user being aware. Today, i learned the answer. There's this tool LOIC (for Low Orbit Ion Cannon). Basically, it's a software application you can download, so that you can participate in a coordinated attack against big sites. (the “attack” basically just means visiting the site repeatedly to drive their server out of handling request capacity; this is known as DDOS (Distributed Denial Of Service) attack) Of course, some DDOS attack are from rogue software (viruses; trojan horses) that hijacks user's machine without user knowning. But LOIC is the proper tool to carry out people's voices, in a meaningful and controlled way.

Design of Math Symbols Input System

Discovered a new trackball.

Adesso trackball mouse 87726
“Adesso trackball mouse”

See also: Best Trackballs 2017

Andy Stewart, who wrote tens of elisp packages (see his site), started a new project on Haskell called Manatee. We voice chatted on skype for about 50 min on emacs and haskell and programing.

Manatee is a OS-like environment for Haskell hacking, currently running on top of linux and GTK+.

You can see many screenshots here: Source www.flickr.com. Or a video of screenshots at Source www.youtube.com.

Manatee home page at: http://hackage.haskell.org/package/manatee. Documentation at http://haskell.org/haskellwiki/Manatee.

Discovered, that in Opera, to switch to next/prev tabs in a normal way, you have to press 【Ctrl+F6】 and【Ctrl+Shift+F6】. What a idiocy. [see Opera Pain; Opera Browser Problems] Or, in Opera 9.2 or before, press the 1 and 2 keys on the number pad. In Opera 9.5 or later, you have to Enable single-key shortcuts in the preference. [see http://help.opera.com/Windows/10.63/en/keyboard.html]

So, in AutoHotkey, i added these to be consistent with all my hotkeys for browsers. (the / and * on number pad to switch to prev/next tabs.)

;; Opera hotkeys
#IfWinActive ahk_class OperaWindowClass

; close window
$Pause::Send ^w

; prev tab
$NumpadDiv::Send ^+{F6}

; next tab
$NumpadMult::Send ^{F6}

See: AutoHotkey Tutorial and AutoHotkey Example Scripts.

Also, after several years of hearing Opera's stupid “mouse gestures”, today i took 5 min to read up what it is. See: http://help.opera.com/Windows/10.63/en/mouse.html. Rather idiotic.

What Do Programers Do All Day?

In the past few years, i've been wondering why software engineering is so cumbersome and time consuming. Usually, something that's conceptually trivial, something you think can be done in 10 minutes, ends up hours. In the past few years, i tried to write a account of it whenever this happened to me. See these essays:

(and it is quite time consuming to document this experience. Each essay above usually takes 4 hours to write.)

In all the above cases, they are typically about installing a package, setting a preference, compress a file, get spelling checker to work, setting a environment variable. If you know the technologies well, usually you'd imagine it's just 5 to 10 minutes job. But in each case, i ends up spending hours or half of a day.

In the past week, another 2 such situation happened. One is renaming a file in Subversion (svn); changing capital letters to lower case. See the problem described here: http://groups.google.com/group/ergoemacs.

The other problem is about writing a script to zip up a directory. See: Unix zip Utility Path Problem.

You might have worked in the software industry as a programer for years. Sometimes, you might wonder, “what i've actually been doing in the past few months?”. In a day job situation, half of the time is spent on meeting and communication and other miscellaneous, non-nondescript stuff. Perhaps you actually get to code only for 1/3 of your working time. Of that time, a large part, probably more than half of the time, is probably spent on getting something conceptually trivial to work, among the hacks, spaghetti code, non-existent documentations, problem in tools, etc.

As a programer, i think intuitively we think that programing is actually writing new functions, new libraries, something that doesn't exist before. But i think in reality, more than half the time a working programer spend daily on coding, is actually about fixing stupid problems, working around tools, using knowledge about the environment and past experiences.

Please use this date time format, in your code, in your blog, everywhere. ISO 8601. Like this:

For emacs lisp code, see: Emacs Lisp Date Time Formats.

Ask me question on patreon