Teh Journalz

Stuff I found interesting at the time 

Superman's A Baby, But He's Still Superman

Which means that the correct lesson the boy's parents could have taught him was what it is  the boy does to make Superman think he can manipulate him, or even what it is about Superman that makes him act that way; but the one they went with, the one that will make him neurotic for the rest of his life, is that he's a winner.

Comments [0]

Automatically populating .ssh/known_hosts

At that point I got busy with other things (most notably final preparations for the FreeBSD 9.0-RELEASE announcement) but on Sunday evening I sat down and wrote a much-needed shell script:

# ssh-knownhost hostname [fingerprint ...]
The ssh-knownhost script uses ssh-keyscan to download all the host keys for the specified hostname; uses ssh-keygen to compute their fingerprints; compares them to the list of fingerprints provided on the command-line; and adds any new host keys to ~/.ssh/known_hosts. Short, simple, and effective.

Could be really handy.

Comments [0]

NOAuth

There are different approaches for getting to the user's credentials, I will present the easiest here and I will concentrate on iOS:

  1. We register a custom NSURLProtocol for 'keylogger://' URLs. It is a dummy implementation which just makes sure that those URLs aren't processed further by the framework.

  2. In the webView:didFinishLoad: method, inject some JavaScript into the loaded page. The JavaScript will attach a listener to every input element on the page and that listener will call a 'keylogger://' URL crafted by us which contains the character the user entered.

  3. In the shouldStartLoadWithRequest: method, we capture all of the 'keylogger://' requests and log the characters. Then we stop loading, because those URLs are just used to communicate between JS and Objective-C.

Comments [0]

Why Warren Buffett Disdains The Private Equity Crowd

Calling this “Orwellian”: Buffett wrote that “private equity” is a “name that turns facts upside-down: A purchase of a business by these firms almost invariably results in dramatic reductions in the equity portion of the acquiree’s capital structure compared to that previously existing.

Comments [0]

Google, what were you thinking?

The Sting

We decided to find out. We made some changes to the site:

  • For visitors from the 41.203.221.138 address, we changed the code to serve slightly different content 10% of the time.
  • Instead of the real business phone number, we served a number that fed through to our call centre team, where the incoming calls would also be recorded. Our team were briefed to act like the business owners for the calls.

We switched the new code on December 21st.

When we listened to the calls, we were beyond astonished.

Comments [0]

1 million is so 2011

A few months ago we published a blog post that talked about our servers doing 1 million tcp connections on a single box: http://blog.whatsapp.com/?p=170

Today we have an update for those keeping score at home: we are now able to easily push our systems to over 2 million tcp connections!


jkb@c123$ sysctl kern.ipc.numopensockets
kern.ipc.numopensockets: 2277845

Very impressive numbers, if only in exploiting the awesome hardware they have available. I wish I could run on dual hex-cores with 96GB RAM ;-) I wonder if they even need two boxes with a setup like this for connection concentration.

Comments [0]

GoDaddy: A glimpse of the Internet under SOPA

The site in question featured a bad review of a local business, and that business had complained. Why on earth would a domain registrar take it upon themselves to police content?

SOPA is the worst legislation proposal I have ever heard of in the US. It needs to die a quick death.

Comments [0]

"Another World" source code review

I spent two weeks reading and reverse engineering further the source code of Another World ("Out Of This World" in North America). I based my work on Gregory Montoir's "binary to C++" initial reverse engineering from the DOS executable.

I was amazed to discover an elegant system based on a virtual machine interpreting bytecode in realtime and generating fullscreen vectorial cinematic in order to produce one of the best game of all time.

All this shipping on a 1.44MB floppy disk and running within 600KB of RAM: Not bad for 1991 ! As usual I cleaned up my notes, it may save a few hours to someone.

Comments [0]

Library Versioning

Libraries should be versioned and packaged such that they are easy to use over time, and in combination. The best way I have found to do this is to abide by three rules:

  • Use APR versioning
  • Re-namespace on major version changes
  • Change the artifact ID on major version changes

Sage wisdom from a true warrior.

Comments [0]

fest - Fixtures for Easy Software Testing

GUI Functional Swing Testing

This module provides a simple and intuitive API for functional testing of Swing user interfaces, resulting in tests that are compact, easy to write, and read like a specification. Tests written using FEST-Swing are also robust. FEST simulates actual user gestures at the operating system level, ensuring that the application will behave correctly in front of the user. It also provides a reliable mechanism for GUI component lookup that ensures that changes in the GUI's layout or look-and-feel will not break your tests.

Nice! I like to see stuff like this.

Comments [0]