Showing posts from March 11, 2012

When's Google Gonna be as Hateful as Facebook?

Google is really getting on people's nerves in past 2 years.When someone adds you back, you got this message:xxx added you back.
She wants to hear from you: start sharing with her and comment on her posts.Instead of a factual notice, Google gratuitously added “She wants to hear from you”.I suppose this is part of Search Plus Your World going forcefully down our throats. When is g+ gonna become like fucking facebook?Facebook's EthicsNymwars: Google Plus Account Real Name Policy DebateReddit = Porn Fodder

Hot Chicks and Their Personalities

Perm URL with updates: a few videos of hot chicks on David Letterman show. Hot models, actresses, celebrities.From the show, you can see the person quite a bit. Their personality, their brain size, their social skills. Some, are bubble-heads, e.g. Paris Hilton. Some, are easy-going and flirtatious. Some are nerdy and self-conscious.Paris Hilton, Bimbo De JureParis Hilton on David Letterman HD.Megan Fox, NerdyMegan Fox on David LettermanMegan Fox rose to fame in the movie Transformers, in 2007. Though, she got kicked off, due to, one could say her non-social personality.Charlize Theron, Self-ConsciousCharlize Theron - Late Show with LettermanCharlize Theron.Irina Shayk, Bright and FlirtatiousIrina Shayk on The Late Show With David Letterman (February 15, 2011)What's with Marilyn Monroe? She's before my times. I don't know her personality. I don't think i ever seen a video of her. But i've seen tons o…

Google's Defunct Projects: Google Health, Google PowerMeter

Google Health (2008‒2011). This is envisioned to be a centralized health records system, but nobody wants to use it.Google PowerMeter (2009‒2011). This is a software that lets you view your energy use. First, you need to install a Smart meter. Then, this is hooked up to google somehow, so you could view your meter usage on a google site, with nice charts.A normal meter just records your usage, and periodically someone comes to check it and bill you. Smart meter differ from normal meter in that it can record hourly usage and communicate that automatically, to the utility company or to you. So, the data can be analyzed and visualized, almost in real-time.For a in-depth article of Google's closed-down projects, but very much biased and dramatized, see:Google's Mounting Trash Pile2012-03-13 By Mary Jander. @ Source

Web Design Hideousness: Google Blog Gray Text on White Background

I bring you, another gray on white. This time, Google:Google Blog, grey on white screenshot.Did Google actually do AB Testing on this and has scientifically determined that people prefer grey text on white instead of the normal black on white?For more, see: Web Design: Say No to Grey Text on White Background.

Why Learn Lisp When There Are Perl & Python

Perm URL with updates:, i do not think there's much reason to learn lisp. If i must advocate lisp, then the following are reasons:① emacs lisp. It is extremely useful in emacs. (emacs, although powerful, but is a dinasour that cannot be easily fixed due to its cult. This means, if you are not a emacs user, and do not care for the many gospels about emacs, then this reason is not relevant.) (See also: Xah Emacs Lisp Tutorial.) ② Clojure, is a modern lisp, practical functional language, with growing use in industry. This is a good reason to learn functional programing and lisp. (Note: most lisp fanatics (the Common/Scheme lisp camp), hate Clojure.) (Note: Clojure's community and aim is industrial use, as opposed to Haskell. Haskell is likely to stay in academia and hobbyist programing community forever, like the fate of Scheme lisp, due to the nature of their community. See: Language, Purity, Cult, and Deception.)③ Mathem…

Bug Fix: System-Wide ErgoEmacs Keybinding for Windows

New version of system-wide ErgoEmacs qwerty keybinding for windows “ErgoEmacs_keybinding_Windows_qwerty.ahk”. Fixed a missing colon, that prevents Alt+i to work.At System-wide ErgoEmacs Keybinding for Windows, Mac, BashThanks to Mira HÉDL for reporting.

benchmark: Python: a Technique to Append String in a Loop

Few days ago i wrote Python: a Technique to Append String in a Loop. Someone wrote a more extensive test. See:Python Strings Accumulation Techniques2012-03-14 By Magnun. @ Source

I'm a Idiot: How to Copy a Nested List in Python?

Perm URL with updates: a Flat ListCopy by ReferenceIf you do this list_a = list_b, that'll copy a reference. That means: modifying one list also modifies the other. Example:# python list_a = [3, 4, 5] list_b = list_a list_a[0] = 7 print list_b # returns [7, 4, 5] You can check by using the “id” function. The “id” returns the object's memory address.# python aa = [3, 4, 5] print id(aa) # sample output: 2129927212 # python list_a = [3, 4, 5] list_b = list_a list_a[0] = 7 print id(list_a), id(list_b) # they have same id Use List Slice to CopyYou can use list_b = list_a[:]. When the first index are omitted, it means beginning of list. When the ending index is omitted, it means end of list. Here's a test:# -*- coding: utf-8 -*- # python list_a = [3,4,5] list_b = list_a[:] print id(list_a) == id(list_b) # prints “false”. They are different objects print list_a == list_b # prints “true”. Use “.extend()” to Copy# -*- coding: u…

Hot and Smart woman: Russian Model Irina Shayk

“Irina Shayk On The Late Show With David Letterman 2011-02-15” Irina Shayk (b1986)

Thomas Sowell's New Book: Intellectuals and Society

Intellectuals and Society2012-03-06 By Thomas Sowell. @ amazonRead the reviews on amazon.See also: Reading Notes on Basic Economics.

Dillo Web Browser: Cave-Dwelling Hackers Crawling Out of the Woodwork

Discovered Dillo, a basic's funny. Often, in the elite programing community (meaning: not your typical “i code to earn bread” but more of the “i love coding and am superior” hacker types), you often have a living-in-a-cave phenomenon. You'll often encounter programers crawling out of the woodwork, with obscure and impractical ideas. Dillo is a good example. (other examples are many emacs heads)let's look at Dillo. So, what is it? Quote from Wikipedia.Dillo is a minimalistic web browser particularly intended for older or slower computers and embedded systems. It supports only plain HTML/XHTML (with basic CSS rendering) and images over HTTP; scripting is ignored entirely. Dillo is available for Linux, BSD, Solaris, DOS / FreeDOS and Mac OS X. Due to its small size, it is the browser of choice in several space-conscious Linux distributions. Released under the GNU General Public License, Dillo is free software.that's like a lol. Who will actually find it use…

Chinese Fonts Comparison; 中文字體比較


Webkit Bug: Pre Display Table Space characters Not Rendered

Perm URL with updates: page reports a WebKit (Safari; Chrome) rendering bug.SummeryWhen using “pre”, with CSS “display:table”, then spaces between “span” tags will not be renedered. Also, when copying the text, no space char are being copied.Screenshot of the bug in Google Chrome, 2012-03-15.Notice the space between “use” and “strict” is gone. Also, space after “print”, and space after “my”DetailCreate a HTML file with this content in “body”: <preclass="x"> <spanclass="a">A</span> <spanclass="b">B</span> </pre> and with following CSS:pre.x { display:table; background-color:silver; } pre span.a {color:red} pre span.b {color:blue} See raw html here: webkit test.When rendered, there should be a space between the characters A and B.If you remove the “display:table”, then it'll be fine.Versions used, all latest public release for Windows as of 2012-03-…

Why Does π Occur All Over Math?

for example, just about every interesting plain curve involves π. See: Visual Dictionary of Special Plane Curves.the only reason i can think of is that it's the circular function. (that is, the essence of trig function. (See: Sine Curve.))but it happens in probability too. For example: Buffon's needle.the Wikipedia article indicates that Buffon's needle is part of a problem in in geometric probability. So, perhaps that ties to the circle, therefore π. Circle itself can be considered as a result of circular function. i.e. the trace of a constant length with one end fixed and the other end moves in a constant speed. So, we can consider that the relation of Buffon's Needle is tied to circular function.but are there other occurrence of π that has little to do with circle? (For example, it appears in series often. How's this explained?)

Browser User Agent Strings 2012

it's interesting. On my BlackBerry PlayBook, the brower is actually Safari. The User Agent string is this: • BlackBerry PlayBook tablet Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.0.0; en-US) AppleWebKit/535.8.+ (KHTML, like Gecko) Version/ Safari/535.8.+ • Safari (on Windows) Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.54.16 (KHTML, like Gecko) Version/5.1.4 Safari/534.54.16 • Google Chrome (on Windows) Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.79 Safari/535.11 • Internet Explorer 9 Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0) • Firefox (on Windows) Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 • Opera (on Windows) Opera/9.80 (Windows NT 6.1; U; en) Presto/2.10.229 Version/11.61

What's true and false in Perl and Python

Perm URL with updates: following evaluates to false:False. A builtin Boolean type.None. A builtin type.0. Zero.0.0. Zero, float."". Empty string.[]. Empty list.(). Empty tuple.{}. Empty dictionary.{}. Empty dictionary.set([]). Empty set.frozenset([]). Empty frozen set.# -*- coding: utf-8 -*- # python my_thing = [] if my_thing: print"yes"else: print"no"PerlPerl does not have a boolean type. Basically, anything that eval to {0, undef, empty string, empty array, empty hash}, are false. Everything else is true.Perl does automatic conversion between numbers and string, so '0' is false because it converts to 0. But '0.0' is true, because it remains a string, and is not empty string.The value of Perl's {array, list, hash}, depends on contex, and is not very intuitive.The best thing is to test specifically what you need. For example, check if the length of a list is 0, or whether …

Python: a Technique to Append String in a Loop

Perm URL with updates:'s Python style guide has this interesting advice:Avoid using the + and += operators to accumulate a string within a loop. Since strings are immutable, this creates unnecessary temporary objects and results in quadratic rather than linear running time. Instead, add each substring to a list and ''.join the list after the loop terminates (or, write each substring to a cStringIO.StringIO buffer).They gave 2 examples, one using string append and the other using list append. Here's their examples, slightly modified to be runnable code:# python # append string in a loop employee_list = [["Mary", "Jane"], ["Jenny", "Doe"], ["Alice", "Johnson"]] employee_table = '<table>'for last_name, first_name in employee_list: employee_table += '<tr><td>%s, %s</td></tr>' % (last_name, first…

Python: What's the Difference Between Tuple and List?

Perm URL with updates:, what's the difference between tuple and list?Answer: Both can contain mixed datatypes. Both can be arbitrarily nested. The only difference, is that a tuple cannot be changed.# python # list and tuple can contain mixed datatypes, and arbitrarily nested. my_list = [3, "4", [11, "12"], ("a", 2), 5] my_tuple = (3, "4", [11, "12"], ("a", 2), 5) print my_list print my_tuple # python # tuple cannot be changed my_list = [3, 4, 5] my_tuple = (3, 4, 5) my_list[0] = 9 my_tuple[0] = 9 # TypeError: 'tuple' object does not support item assignment print my_list print my_tuple So, in practice, if you need a list but the elements or length never needs to change, then, use tuple, else, list.There are a slew of tech geekers online who'll tell you that tuple is “heterogeneous” and list is “homogeneous”, or that tuple has identity, or that tuple…

Why James Whittaker left Google

Tablet Computer Issues and Touch-Screen Interface Pros and Cons

Perm URL with updates:'s my report on tablet.This page discuss some issues of tablet computer (e.g. iPad), and its touch-screen interface advantages and disadvantages in comparison to a PC and mouse.Recently, i got a tablet computer (BlackBerry. amazon 7″ screen, 1024×600 pixels.). (See: Modern Tablet Computer Features.) Here's some pros and cons.• On a tablet, the feature of web technologies (unicode, video, flash, html5, webGL etc) is pretty much similar to browser on PC. Except that processor on tablet is not fast enough to support WebGL apps designed for PC. Also, Apple's devices do not support Adobe Flash.• On PC, you have the concept of mouse hoover. On tablet, you can emulate that by touching the spot and hold it.Many websites send a mobile version of their site when you access it with a tablet. For example, when you access GooglePlus (google's social network; The usual nav bar at top, and…

emacs find/replace details

Here's a detailed tutorial on the most frequestly used find/replace commands, and the details about letter-case-sensitivity in find string and replacement string. See: Find & Replace with Emacs.Here's a summery:Major commands: {query-replace, query-replace-regexp, dired-do-query-replace-regexp}By default, the case is not sensitive, and case for replacement is also smart.Call set-variable to set “case-replace” to nil if you want the replacement's case be exactly as you typed.If you rather the whole thing be exactly you typed, call toggle-case-fold-search. (You might want to set a alias “tc” if you need this often.)

Why Should You Follow Wordy English?

Follow Wordy English for your daily vocabulary fix.It's, like, coffee — addictive. It's like tea — calms you down and energizes you. Like honey, you can suck on and is sweet.Once mastered, it's like pheromone in your mouth; making chicks come all over.And, among your friends and colleagues, those who don't understand you can only esteem you.Tell your friends, spread the word! (Wordy Englishg+twitter)

Python Logo Latte Art


growing collections of emacs 24 tips

Growing collection of emacs 24 tips in one page: New Features in Emacs 24

What is Wisdom?

Perm URL with updates: is Wisdom?Have you heard of Taoism? Like, “best action is no action”? And “imagination is more important than knowledge”? Wisdom are typically vague, and take interpretation and context. Surely, if your house is on fire, the best action is not do nothing, right? Or, then, perhaps the “no action” actually mean “natural action”, or “efficient action”, or “effortless action”?? If, we can choose only one between “imagination” and “knowledge”, which one is more likely to get you a space shuttle? “Thou Shall Not Steal”, is a great wisdom, but have it stopped or reduced stealing in the entire human history? (SOPA anyone?) There are lots wisdoms, but they can't make nuclear reactor or bomb, no x-ray, no neuro-science, DNA, no cure for cancer.These days, there's tons of shallow articles carrying lofty titles such as “Why Apple Will Fail”, “How to be the Next Google”, “How Facebook Will Kill Google”,…

Paul Graham Keynote at PyCon

Perm URL with updates: famous Paul Graham of lisp fame and y-combinator fame, giving a talk at Python Conference, about start up ideas.Keynote: Paul Graham on Startup Ideas, at PyCon 2012I watched the whole thing. I can't say i'm impressed at all.This talk can be divided into 2 parts. Main part, and the QA part.The first part, is not only not impressive to me, i find it a bit boring and stupid. Paul, is renowned as the wisdom type of guy (as exhibited in his essays, collected in his book Hackers and Paintersamazon). The problem with wisdom, as opposed to science, is that wisdom is not too different from bullshit. If you are smart enough, you can be the zen, zen of bullshit, and in history, there are quite a few number of them, who's great wisdom and fame dies the moment they went to their graves.The QA part, is more interesting, where you can actually see some intelligence in him and his ideas.The talk is 47 min…

Scam on Gmail

Incredible. Got this email scam, who prentends to be from Google, but gmail filter didn't catch it. Here's the content: Gmail 6:44 AM (33 minutes ago) to Dear Account User, Your account security requires verification. To keep your account security active: Sincerely, Email Disclaimer That google url above actually points to this: 〔〕.A Egregious Case of Twitter SpamMachine Generated Spamcomp.lang.lisp is 95% SpamWhere Do Spammers Came From? (A Xah Story of Human Animals)Anti-bot Test: CAPTCHA!John Bokma Harassment (DreamHost Review)Spy vs Spy: Tech Geekers vs SpammersWorld Multiconference on Systemics, Cybernetics and Informatics???

iPad, iPhone, Kindle, Xoom: Pixel Dimension, Resolution, Density

Perm URL with updates: staring at a tablet screen for a couple hours, now looking at my PC screen, the resolution is so coarse!By the way, the term “resolution” usually is used incorrectly. Here's clarification.Pixel Dimension = number of pixels on the screen, width and height. i.e. iPad has 1024 × 768 pixels. (most people (incorrectly) call this “resolution”.)Pixel Density = screen resolution (how fine it can display something). Measured in “pixels per inch” (PPI) or “dots per centimeter”. (this should be what “resolution” means.)Here's some examples of pixel dimension and density:NamePixel DimensionsPPIScreen RatioiMac 21.5″ amazon1920×10801021.78MacBook Pro 15″ amazon1680×10501281.6IPad 2amazon1024×7681321.33IPad 32048×15362641.33Amazon Kindle 1 & 2800×6001671.33Amazon Kindle DX1200×8241501.46Kindle Fireamazon1024×6001691.71Motorola Xoomamazon1280×8001601.6BlackBerry PlayBook amazon1024×6001691.…

Modern Tablet Features (BlackBerry PlayBook)

Perm URL with updates: a BlackBerry PlayBook (Tablet computer) from a generous friend.Things to do:Findout the hardware spec, processor, memory, storage capacity, screen dimension. CPU: 1 GHz Texas Instruments OMAP 4430 (Cortex-A9 dual-core) Memory: 1 GB RAM Storage: 16 GB Flash Display: 7″ LCD display. 1024×600 (WSVGA), 16:9 aspect ratio 1080p HDMI output General info: BlackBerry PlayBookCheckout unicode support. e.g. Sample Unicode CharactersCheckout playing video on it. e.g. youtube Selena Gomez - Love You Like a Love Song, and check out a porn video site.Checkout voice and video chat on it. e.g g+ hangoutOther questions.Checkout playing a game that touch-screen has significant advantage. e.g. bejeweled blitz on g+.How to get keyboard to Dvorak Keyboard Layout.Checkout how to write apps on it. The nature of app on such device. What lang are they written in, what tools are required for dev. Is it compatible for Android or other such tablet…