Xah's Programing Blog Archive 2010-11

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 【❖ Win+1】, and second 【❖ Win+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.

#7::Run "launch or switch skype.ahk"

See also:

Unicode: Drawing Lines, Boxes, Shapes ┌ ┐ └ ┘ ├ ┤ ┬ ┴ ┼

Unicode: Stars, Crosses, Dingbats ★ ♥ ✜ ☪ ☯ ☺ ☠

Linotype Machine, Typesetting, Book Binding Tech (nice video)

Unicode: Keyboard Symbols ⌘ ⏎ ↹ ⌫ ❖ ⇞ ⇟

Discovered Operation Payback. A internet activist group. Recently, they launched attack on those who attacked Wikileak. 〔☛ 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. 〔☛ 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.

Designing a Math Symbols Input System

Discovered a new trackball.

Adesso trackball mouse
“Adesso trackball mouse” amazon

See also: Best Trackball Mouse

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. 〔☛ 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. 〔☛ 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 Basics 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.

Unix zip Utility Path Problem (commentary)

A very detailed explanation of keyboard switch mechanisms, key label printing tech, etc.

Mechanical Keyboard Guide By Manyak. @ Source

For 70 articles on keyboarding, see: Keyboards, Layouts, Hotkeys, Macros, RSI.

Pirate Bay Guilty Verdict Upheld By Jared Newman, PCWorld. @ Source

See also: Software Piracy, Open Source, Free Software, Copyright.

A unprecedented, military-grade virus that attacks nation states. Stuxnet.

Stuxnet is a Windows-specific computer worm first discovered in June 2010 by VirusBlokAda, a security firm based in Belarus. It is the first discovered worm that spies on and reprograms industrial systems,[1] the first to include a programmable logic controller (PLC) rootkit,[2] and the first to target critical industrial infrastructure.[3] It was specifically written to attack Supervisory Control And Data Acquisition (SCADA) systems used to control and monitor industrial processes.[4] Stuxnet includes the capability to reprogram the PLCs and hide its changes.[5]

The worm's probable target has been said to have been high value infrastructures in Iran using Siemens control systems.[6][7] According to news reports the infestation by this worm might have damaged Iran's nuclear facilities in Natanz[8][9] and eventually delayed the start up of Iran's Bushehr Nuclear Power Plant.[10] Siemens has stated, however, that the worm has not in fact caused any damage.[11]

Russian digital security company Kaspersky Labs released a statement that described Stuxnet as "a working and fearsome prototype of a cyber-weapon that will lead to the creation of a new arms race in the world." Kevin Hogan, Senior Director of Security Response at Symantec, noted that 60% of the infected computers worldwide were in Iran, suggesting its industrial plants were the target.[12] Kaspersky Labs concluded that the attacks could only have been conducted "with nation-state support", making Iran the first target of real cyberwarfare.[13][14][15]

thanks to Meow Cat for the news.

Discovered Microsoft Kinect device.

“Kinect Treatment of Windows 7”

Detail at: Microsoft Kinect Device.

Recently, met a online friend “meow cat”, who's into the underground hacking stuff.

Learned recently about 2 old-time hackers. Fravia (Francesco Vianello (1952 〜 2009)) and Captain Crunch (John Draper b1944).

I think the Fravia guy is idiotic. Typical of those underground, conspiracy theory, anarchy type of crowd.

Also, learned a lot about internet video chat service sites. Tinychat and quite few others. Quite amazing. I thought it might take few min to setup. Actually, it's instaneous. In 20 seconds, you see 9 videos of teenagers (mostly girls) on webcam, simultaneously. (and you can broadcast yourself too) And there are hundreds or thousands of rooms, each particular to a topic, or personal friends or groups.

The internet really is going into a second wave of advancement. I'd call it the second dot com wave. All things are free again, with huge number of startups. Starting in late 2000s.

truly ergonomic keyboard
“Truly Ergonomic Keyboard”.

Ergonomic Keyboards Gallery (gallery; review)

CCleaner is really a fantastic tool. In a easy way, it lets you delete all the cache and temp files of various browsers and Windows files. If you do it manually, you'll have to find it all over your disk, or thru various browser Preference interfaces. It also lets you clean your Registry, and lets you disable or delete the startup program settings, far better interface than the tiny window of “msconfig”.

Here's some startup processes i removed recently:

See also:

Discovered that Logitech came out with a new version of their trackball.

Logitech Wireless Trackball M570 2-s
“Logitech Wireless Trackball” amazon

For review, see: Logitech Trackball Mouse Reviews.

Installed “Auto Copy” extensions to Google Chrome (Source) and Firefox (Source). Fantastic!

Razer Naga gaming mouse
“Razer Naga Gaming Mouse” amazon

Computer coder's heaven: A mouse with 17 programable buttons: Best Mouse for Programers: 17 Buttons. And if you are more of a keyboard macro type of guy, you need: Logitech G13 Advanced Gameboard. Forget about your Emacs key chords. Actually, i'd suggest a gaming keyboard, except that there are no good ergonomic ones.

Mathematica 8 is released.

I got Mathematica 7 this month, as a gift from Wolfram Research. (before they released 8) (Thanks Wolfram) I haven't actively been coding Mathematica since about 2000. In the coming months, i'll update my tens of Mathematica packages on my site to Mathematica 7.

Mathematica started in 1988 as a so-called computer algebra system. Namely, it lets you do things like solve equations, factor polynomials, do integration, derivative, etc. But, due to Stephen's design, it is also a full featured general programing language, much based on lisp. (he probably would not admit it) But since about late 1990s, Mathematica is more marketed as a technical computing platfrom — a system for doing any technical computation. The reason is simple: because as a math system, the market is very limited, but as a system for any technical computation, it widens its potential audience by some 10 fold or 100. Since mid 2000s, it became increasingly more broad. Although i haven't actively been coding Mathematica, but some quick look at Mathematica 7, it is really fantastic. Dynamic visualization, data center of all technical info, and this year Wolfram Alpha.

Here's things i've done with Mathematica, all or almost all graphics in the following projects are generated by Mathematica version 3 (≈1998) or 4 (≈2002):

Outline Rendering in 3D Models (POV-Ray) (commentary)

Collada is a 3D file format adopted by Second Life in its upcoming mesh feature. Quote from Wikipedia:

COLLADA is a COLLAborative Design Activity for establishing an interchange file format for interactive 3D applications. COLLADA defines an open standard XML schema for exchanging digital assets among various graphics software applications. COLLADA documents that describe digital assets are XML files, usually identified with a .dae (digital asset exchange) filename extension.

.obj is another common format, but it is for storing basically just mesh data. Quote:

OBJ (or .OBJ) is a geometry definition file format first developed by Wavefront Technologies for its Advanced Visualizer animation package. The file format is open and has been adopted by other 3D graphics application vendors. For the most part it is a universally accepted format.

The OBJ file format is a simple data-format that represents 3D geometry alone — namely, the position of each vertex, the UV position of each texture coordinate vertex, normals, and the faces that make each polygon defined as a list of vertices, and texture vertices. Vertices are stored in a counter-clockwise order by default, making explicit declaration of normals unnecessary.

Here's a sample format for “.obj”:

 # List of Vertices, with (x,y,z) coordinates.
  v 0.123 0.234 0.345
  v …

  # Texture coordinates, in (u,v[,w]) coordinates, w is optional.
  vt 0.500 -1.352 [0.234]
  vt …

  # Normals in (x,y,z) form; normals might not be unit.
  vn 0.707 0.000 0.707
  vn …

  # Face Definitions (see below)
  f 1 2 3
  f 3/1 4/2 5/3
  f 6/4/1 3/5/3 7/6/5
  f …

What's Point-free Programing? (point-free function syntax) (tutorial; essay; language design)

Discovered a new programing language. Factor (programming language)

I discovered it because it mentioned ErgoEmacs. See: Source.

2 months ago, i found a fantastic mouse:

Cyborg RAT 5 gaming mouse 2-s
Cyborg RAT 5 gaming mouse.

But reading amazon reviews today, it seems to have its problems. For video review and detail, see: Best Input Devices (Jog/Shuttle, Touchpad, Cyborg Mouse, Pen Tablet).

The Microsoft Comfort Curve Keyboard 2000, is the cheapest (≈$17), yet best keyboard, beats those fancy expensive ones. I'm undecided if i prefer this to my other $50 bucks Natural Ergonomic Keyboard 4000. The Comfort Curve is cited on StackOverflow to be among top 5 keyboards. However, it's also known to have defective key problem.

I just discovered a way to fix it. See: Fix Defective Keys in Comfort Curve Keyboard. Whack it!

Apple Macbook Air Review

Google Chrome is fantastic. I think even better than Firefox.

blog comments powered by Disqus