Showing posts from June 9, 2013

web design: another white on gray


unix man page getting obsolete?

these days, man page is getting the slack. Instead, the embedded inline doc --help option is emphasized. Often, the info from --help is more complete than man page. Many programs don't even bother to write a man page, but the linux distributor such as Debian, writes one for them, pro forma.For example, i wanted to know what's the --minimal option do in xfce4-display-settings. So, i man xfce4-display-settings. The output doesn't mention it.XFCE4-DISPLAY-SETTINGS(1) User Commands XFCE4-DISPLAY-SETTINGS(1) NAME xfce4-display-settings - Display settings for Xfce DESCRIPTION Usage: xfce4-display-settings [OPTION...] Help Options: -?, --help Show help options --help-all Show all help options --help-gtk Show GTK+ Options Application Options: -v, --version Version information --display=DISPLAY X display to u…

Unix Shell Syntax, 2000 〜 2013

as of 2013, the unix shell tool syntax have gone thru more evolution.note, in 1990s, the GNU introduced the double-dash syntax. ⁖ diff --brief, in hope to make it readable. Unfortunately, it didn't really catch on. Most commands today do offer the double-dash variant, but only for some options. The double-dash option does not necessarily mean there's a corresponding single-dash one, and vice versa. What happened instead is just a new syntax variation.during 2000s, a new syntax form became popular, one that has a “action” keyword immediately following the command name. Here are some prominent examples:apt-get install --simulate -y ‹name›git add -m"…" ‹fpath›iptables --table filter --append INPUT --jump DROPOne good example of the confuse ball in one command can be seen in Linux's “ps” command. See man more at: Unix Pipe as Functional Language

the effect of keyboard hardware on your keyboarding habit

Here's a example. From 2005 to 2008, i was using the classic Microsoft Natural Keyboard. In about 2009, i switched to the new model Microsoft Natural 4000. The new keyboard is great, and i think it's a improvement, however, ON THAT KEYBOARD i developed a habit to press the {1, 2} keys by twisting my wrist to the left and press it with my middle finger (instead of using pinky and not turning wrist. (because, somehow on this new model, it's harder to press the 1 with pinky)). Then, i developed RSI symptoms. RSI cause is very difficult to track down, but eventually, after panicking for weeks, i eventually tracked it down to this wrist movement. For the full story, see: Programer Hand Health: vi Esc Key Syndrome. Here's another personal example: Keyboarding: Effect of Mechanical Key Switches on You.see also Bad Advices from Programers about Typing & Keyboard (RSI)

JavaScript Book by David Flanagan, and the Man-made Complexity in Computer Language

Perm URL with updates: very impressed with this book. VERY. 〔JavaScript Definitive Guide (6th ed.)2011-05-10 By David Flanagan. @ amazon〕 Normally, if you've been programing for a few years, you can quickly start to program in a new lang. You just learn the basics, types, loops, list/array, function/objects, module, then you can practically code anything you want, albeit in a non-optimal way. But, you'll have a lot questions, especially with complex languages. Questions like scope, evaluation model, and the language's overall “model”. What happens if you do xyz. Understanding these makes you a true expert in that lang. To understand a lang well, is to be able to have a sense of a mathematical model of the language.(and almost all modern langs are quite complex, including Java, Python, Ruby. Now, JavaScript is easy to use, but it turns out it's quite complex too actually, the hairy details of its prototype inher…

Interface Design: How JavaScript Breaks UI, and the Evolution of User Interface

so many “modern” pure JavaScript based websites f�cks up the page so that basic universal browser operations broke. For example:• Control+click or middle click on a link to open in new tab, or 【Ctrl+n】 to open new page, will not always work.Perpetrator include Google's Google Plus, Twitter.When a key that works only sometimes, it's annoying, but also dangerous, because after a few times of non-working, you stop using that key. Instead, user goes for the sure way of using the more cumbersome mouse.• When a page contains Video (Flash) such as YouTube, almost always your keys such as ⇟ Page ▽, don't work anymore, because the “focus” is on Flash or some particular JavaScript scripted element, so key input got stolen. You need to click somewhere outside the video first.From user's perspective, it's plainly annoying. However, the thing is, these fancy sites don't care, for good reasons, because, vast majority of people, probably 90%, don't even know about basic …

dollar sign in JavaScript

lots JavaScript libs use dollar sign “$” as the name of their primary function.It seems, it started with the prototype lib, then others picked it up, in particular's a quote from stackoverflowAs far as I can see, it's not recommended to use because the ECMAScript specification states that: The dollar sign ($) and the underscore (_) are permitted anywhere in an identifier. The dollar sign is intended for use only in mechanically generated code.Update: The above refers to ECMA-262 3.0. However, this is no longer the latest edition. Currently, 5.1 is the latest edition. In ECMA-262 5.1 the above text is changed to: The dollar sign ($) and the underscore (_) are permitted anywhere in an IdentifierName.That is, it seems that they dropped the "restriction" or whatever you want to call it.So, is this the case where practice forced a chance in spec?

javascript books

JavaScript Books〈JavaScript Definitive Guide〉 amazon〈Professional JavaScript for Web Developers〉 amazon〈JavaScript: The Good Parts〉 amazon〈JavaScript Web Applications〉 amazon

git tip: fast way to revert to last commit

when you just pulled from remote, and realized it didn't work, you can quickly revert.# revert before last commit git checkout HEAD@{1}

Linux: How to Upgrade Xfce

to find your current version, type xfce4-about --versionto upgrade:# upgrade xfce sudo add-apt-repository ppa:xubuntu-dev/xfce-4.10 sudo apt-get update sudo apt-get dist-upgrade# delete cache rm -rf ~/.cache/ ~/.compiz # restart sudo shutdown -r 0