Tuesday, December 6, 2011

dcpromo on two feet

Today, I installed a Windows AD domain controller while waiting in the line for lunch in the cafeteria.

This was on a newly installed Windows Server 2008 R2. I started adding the DC role when I joined the lunch queue.  The longest decision making required was perhaps on choosing which functional level to install.  In the end I decided to go for Server 2008 R2.  When it was my turn to order the food, the upgrading was already in progress.

I did all this using my mobile phone, a Samsung Galaxy Note and Jump Desktop's RDP client.

I disconnected when I got my food as I didn't want to mix my lunch with dcpromo.  As I was busy after that, I found time to reconnect to the server almost half a day later.  As it turned out, the upgrading process completed beautifully while I was away.

The wonders of technology!

What I see on my cell phone

Wednesday, November 9, 2011

All Men Are Created Equal Not

My apologies, but Thomas Jefferson was wrong, perhaps just this once.  Not [all men are created equal].

(I won't split hair over whether it should be all men are not created equal or all men are created not equal.)

You must have heard of this anecdote before: if every possession in the world today were confiscated and then divided out equally among every living person, after ten minutes, the whole world will be unequal again, assuming everyone acts rationally.  There will be the Bill Gates'es who would successfully trade their bottle caps for medals.  There will be others who would give away their farms for something trivial, trivial as in trivial to you and me.

The ugly and yet beautiful fact is that the world functions because of inequality.  If all men are equal, the world grinds to a complete halt.  Life freezes, and, if the equality is really maintained, everyone drops dead.

Society works because everyone places a different value on the same thing.  It all started with the first kids.  When Cain wanted a beef steak to break the monotony of his vegetarian menu, he exchanged some of his onions to Abel for a part of a cow.  Cain must have reasoned that that part of a cow was worth his onions, and similarly Abel thought that the onions was worth that part of his cow.  If Cain and Abel had come to the same evaluation of the onions and the same evaluation of that part of a cow, both would have died of some food poisoning and there won't be you and I to discuss this subject today.

If David and Goliath were equal, their fight would have ended in a stalemate.  But as history has recorded, David slayed Goliath.  That is a confirmed inequality.

... to be continued later ...

Related: My three heresies.

Heresies of Economics

These are my private laws of economics:

  • Heresy #1: People respond to incentives
  • Heresy #2: People respond differently to (the same) incentives, and this creates a functioning society.
  • Heresy #3: Not [All men are created equal].
I have an advanced degree in Economics from the School of Hard Knocks.  I missed many classes.  But as there was no government in the School of Hard Knocks, I decided to award myself the degree anyway.

Monday, November 7, 2011

Respecting Intellectual Property

If IP owners want everyone to treat their IP just like any other property, then perhaps they should start by treating their IP just like any other property.

First (not in any order of importance), the freedom to use IP should be similar to the freedom to use all other property.  When you buy a chair from Ikea, you can do anything you like to it.  Sit on it.  Put things on it.  Use it as fuel for a BBQ.  Even if Ikea does not sell chairs but only rent chars, you are free to do whatever you want with a chair, as long as you are able to return it, less fair wear and tear, at the end of the rental period.  But when you buy Mac OS, you are not permitted to install it on non-Apple hardware.

Then, we should also be free to transfer ownership of the IP with the same ease to transfer ownership of other property.  If someone threw his old TV set out of his house to let the garbage collector pick it up, in most jurisdictions, people are free to pick it up and do whatever he likes with it, including using it to watch TV programs.  If someone damages his music CD (physical property), hard luck and he must pay again to get another copy of the CD.  But as a license to use the music cannot be damaged, an owner of the license must be free to transfer his license when he has no use for it.

Next, trading in parts and components should be similar to other property, that is, they are available because it is practical and cost effective to do so, not because only when the owner does not veto it.  You can buy a steering wheel of a Toyota car without having to buy the whole car.  You must be able to buy/sell a copy of Mac OS without having to buy/sell a Mac computer.

Lastly, notwithstanding that, in all non-communist countries, the selling price of anything is the highest price that the buyer can bear, the selling price of IP should bear some relationship to the cost of the IP.

If you exploit and drive people to the wall, expect people to think of creative ways to escape the bondage.  Once IP owners treat their IP like other property, people all over will naturally respect (or not respect) IP like all other property.

Sunday, October 30, 2011

Understanding Display "Resolution" (Retina display)

When I first heard the "Retina display" of the iPhone explained, the perplexed reaction I had was "what for?"  By the way, "Retina display" is just a marketing term for a density of greater than 300dpi.

Display area is probably the most expensive piece of real estate in the world after the Disney Store in New York city's Times Square.  When you have a large spreadsheet to analyze, every pixel is priceless.

Why would you want to waste 960x640 of screen real estate at 326dpi?  It's not about discernible (read snobby) people being able to tell the dots when the display density is below 200dpi.

For paper printouts, yes, you would want 300dpi or better.  But for an electronic display which is refreshed at 30 times a second?  For an electronic display showing moving images or video?

My main beef with high resolution displays on cell phones is that the density is too high.  The density should be reduced to make the display more readable when each pixel is put to good use.  Notice I said "put to good use".  The iPhone's beautiful display is not put to good use with the applications we are seeing. See explanation.

The Samsung Galaxy Note has 1280x800 pixels and at a density of 285 dpi.  This works out to a size of 5.3 inches diagonal.  Now, 1280x800 is same or more abundant than the full-size displays of 85% of the laptop computers shipped in the world today!  I could do some serious work on the phone with this amount of addressable and displayable pixels.  The current Galaxy Note goes into all of my pockets comfortably.  At 250dpi, this would give a screen size of 6".  I think this would be better for an all-purpose computer that can be with you all the time.  My eyes, which are more than half a century old each, are ok for such a display.

Smartphone Battery Life

Why do the specifications of smartphones still give the maximum number of talk hours?  And this is usually a huge fantastic number of half a month or more.  And there is no other indicator of battery life.

As we all know, we use the smartphone more as a computer than as a (voice) phone.  If I had wanted a very good voice phone, I would just get a $20 Nokia simple phone.

Smartphone battery life should be stated like laptops.  And no laptop battery can last a day.  Similarly, if you use a smartphone like a computer full time, don't expect it to last a day.

From experience, on the first day you bought your smartphone, your usage will be abnormally high.  You discover that the battery life isn't that "good".  As the days go by, your usage drops to a more realistic rate and you will find that the battery can last about a day.

The iPhone 5

I predict that the iPhone 5 will have a much bigger screen, à la the Samsung Galaxy Note.

Friday, October 28, 2011

Understanding "Resolution" 101

Related: Retina display

The word "resolution" has been so misused that the original definition, if I remember it correctly, actually bears little connection to how it is used nowadays.

Let's start at the very beginning, a very good place to start.

The first step in the communication process (from the screen to the person) is "visual acquisition".  Your eye must be able to acquire the image.  The image must be big and bright enough to trigger photosensitive cells in your retina.  Ignoring brightness, and just considering a single dot to represent the image, there is a minimum size for the dot below which the human eye cannot pick it out.  But this depends on how far away you are from the dot, so a better parameter to quantify this is the angle subtended by the dot to your eye.

Figure 1 - Images of different sizes can subtend the same visual angle, depending on distance

Obviously the minimum subtended angle that can make a dot visible varies from person to person.  And an eagle probably beats every human.

The second step is image recognition.  To simplify, let's forget about pictures and just restrict the discussion to the letters of the English alphabet.  About the minimum number of dots needed to represent each letter of the alphabet and still make every one distinguishable and recognizable (as letters of the English alphabet) is 5 dots horizontal by 7 dots vertical.  If you have examined an old fashioned CRT terminal, an old fashioned moving stock display, or an old-fashioned matrix printer, you would know what I mean.

Figure 2 - Anything less than a matrix of 5x7 would make it difficult to recognize all the letters of the English alphabet as we know them.

The minimum is 5x7.  But that doesn't mean you can't have more.  Having more doesn't make each letter more distinguishable than the next.  Technically, anything more than 5x7 is pure waste.  But artistically, using a bigger matrix for each letter allows you to have nice smooth curves, with minute turns, and so on, to create a more visually appealing character.  Now you know why a typeface like Times Roman looks coarse and ugly on "low resolution" displays.  Serifs are just lots of curves and curves require lots of pixels to achieve a smooth graduating path.

Figure 3 - Letter A drawn in a 50x50 dot matrix and in shades of color (dithering).

The above letter A when seen from a distance where the subtended angle of each dot becomes barely discernible will look like this:

Now that you know the reason, you should not say "Times Roman looks ugly on low resolution displays".  The right thing to say is probably: "Times Roman cannot be rendered adequately if each letter is represented by a small matrix of dots"!

"Resolution" is defined as the number of dots per unit distance.  A typical laser printer output is 300 or 600 dots per inch.  That is high resolution.  The LCD screen that I am using now has about 120 dots per inch.  Times Roman can still be rendered beautifully at a resolution of 10 dots per inch, provided you have a gigantic display.

Next, the displayable quantity (and size).  The monitor I am using now has 1,680 horizontal dots and 1,080 vertical dots, and it is 23 inches diagonal.  I can see so much of a spreadsheet if each character in the spreadsheet is represented in a matrix of 10x14 dots.  Go ahead and do the simple division arithmetic to find out how many rows and columns that is exactly.  A person with a display of 1,024 x 768 would be able to see less of the same spreadsheet than I.  Even if the person has a 500-inch jumbo display with 1,024 x 768, he will still see less of the spreadsheet than my 23-inch display.  For a display capable of showing 1,024x768, the person sees the same amount of information, whether the display is physically 14-inches or 500-inches.  The only difference is that with a larger display, he can see the spreadsheet from further away.  Remember the very first point above about the angle subtended by each dot? (Hint: if you fit the same number of dots onto a bigger screen, naturally each dot will be bigger.)

By quantity or the amount of information, I mean just that.  To explain what I mean, ten letters on a line is twice the amount of information as five letters on a line.  Ten letters on a line on a 14-inch screen is the same amount of information as ten letters filling up a line on a 500-inch screen.  Hope you can grasp this in totality, otherwise please re-read.

I will digress a bit to talk about address-ability.  All the previous discussion assume you have a computer capable of generating that 1024x768 or whatever "resolution" video signal. When you plug the cable to the display, the display input hardware must be able to synchronize with that signal.  That is, it is able to pick out that you are streaming 1024x768 dots per frame.  If a display cannot synchronize with the input signal, the picture (on an analog display) would be jumping or appear as some noise or the display can be damaged.  On a digital displays, usually you will see a blank screen or an informational message telling you what's wrong.  If the video signal is received properly, then the hardware will present that signal onto the display screen.  It is entirely possible that the display can synchronize with a much higher frequency video signal, say to 1920x1280, even if the display can show only, say, 1024x768.  The electronics in the display would "greek" the signal, averaging a few dots of the input signal into one dot for the screen.  So a beautiful image would appear as a compressed smudgy image on this "low resolution" screen. Most projectors are like this. The actual projection optics is expensive and the most common one today is capable of only 1024x768 (up from 800x600 of a few years ago). However, most projectors today can accept input signals of any "resolution" so as not to inconvenience users. How the signal is then projected varies. Some projectors greek them. Others show a viewport of 1024x768 and allow you to pan to see the bigger picture.

Now we come to the true use of the word "resolution".  Laser printers have very good resolution.  It's 300dpi since 1990.  The common standard now is either 600dpi or 1200dpi.  Most people cannot tell the difference (subtended angle again) when the resolution is higher than 300dpi.  Traditionally, displays have the lowest resolution, 100dpi is quite common.  But even 100dpi does not affect reading efficiency if something like ClearType, using graduating brightness to substitute for graduating dots, is used.

Lately, with cell phones, the displays have been increasing in resolution without increasing in size.  The iPhone 4 has 326dpi - 960 x 640 in 3.5" diagonal.  This is wasteful.  Lots of memory and electricity are used to render a lot of dots which cannot be consumed as they are not visible to most people.

In conclusion, for a given amount of displayable dots, if you want to transmit the maximum amount of information, you use the most simple typeface - a cell of 5x7 for each letter.  If you have plenty of dots to spare, then you can have the luxury of showing each letter more artistically with hundreds of dots.  Remember that the size of the display plays no part in the quantity of information you can show if the amount of dots are the same.  A bigger size display simply means you can see it from farther away.

Sunday, October 16, 2011

RDP Client for Mobiles

I have been looking for a good (and cheap) RDP client for my Android phone. I was about to pay $25 for Xtralogic's software when I saw the one from Jump Desktop for only $0.99. Having tested both, I find the Jump Desktop one better than the much more expensive one.

Jump Desktop's price for Apple is $14.99. Better grab Jump Desktop for your Android before the price goes up.

Jump Desktop's RDP client has the following useful and better features:

  • It is both RDP and VNC. But I have not used VNC myself.
  • It is a standard RDP client, but at the same time, if your host is on an internal network and you don't know its external IP address, you can configure Jump Desktop to go via Google for connectivity instead. I haven't tried it myself, but I think the host contacts "Google's servers" (according to the FAQ), your client contacts Google, and Google makes the connection. Neat if it works.
  • It has two "cursors", making use on a small phone screen lots lots easier. There is a big circle which you can drag to move the host's Windows cursor. Touch anywhere else and you can drag to pan the viewport showing the host's desktop or dual touch to zoom. As it is likely that your phone's display is smaller than your host's desktop, without this feature a terminal session is not practical.
  • Popping up the Android's virtual keyboard does not cover the host's desktop. Hence, you can see what you are typing.

One thing I can't find on Jump Desktop is audio options. For one of my hosts, I need to let audio play on the host as it is doing a recording. [Oct 31 Update: the latest version allows you to configure audio options, just like the Windows version.]

Like Xtralogic's, Jump Desktop does not run in the background, and it exits without prompting if you hit the Android back button one too many times. [Oct 31 Update: the latest version has a confirmation dialog before quitting.]

After purchasing Jump Desktop, I discovered Wyse's PocketCloud Remote RDP, which is free.  PocketCloud is almost the same as Jump Desktop except that it cannot zoom by touch.  You have to touch +/- keys on the screen.

I have tested Yongtao Wang's RDP Lite some time ago and I found it too basic. What I am surprised is why Jump Desktop has only 1,000+ downloads when Xtralogic has 10,000+.

In conclusion, if you don't want to spend a single cent, go for Wyse's PocketCloud.  If you can afford a dollar, try Jump Desktop.

For a screen shot, see the dcpromo on two feet.

After using RDP on a mobile for a few minutes, I came to realize that it's not like working on a PC.  A PC is true multi-tasking and you can jump from any window to any window.  Working on mobile is a bit restrictive. If I press the Home button, I don't know whether the current app will run in the background or the system will kill it after a while.  Hence, if you are working on a remote session via RDP, and a call comes in, what should you do?

Thursday, October 13, 2011

My Computer

I didn't want to describe my computer until I read this: http://tratt.net/laurie/tech_articles/articles/good_programmers_are_good_sysadmins_are_good_programmers.

First, what I do.  I write code, some of it, everyday.  I administer networks and servers too.

I develop Windows apps, about a hundred thousand lines of C# code so far.  I do ASP.NET apps, more than twenty operational but small web sites.  I do Silverlight too, a LOB one used by two thousand  users.  I have an unmanageable number of Powershell scripts, doing all sorts of funny things which most people would have written a console or Windows app to do, and this is possible because Powershell has full access to the complete .NET Framework class library.  I administer several PCs and about ten servers currently.  I install OS'es with my own two hands from a floppy/CD/DVD/thumbdrive, ie SYSPREP images strictly prohibited, in well over 100 machine instances from DOS 1.1 to Windows Server 2008 R2.  I install SQL Servers too, since version 2005.  There is also the occasional Sharepoint Server which I dislike.  Oh yes, I do Active Directory as well.  I install and operate my own on premise Exchange Server 2010, with one email account, mine.  I build networks.  Right now I am running six in six different locations with five of them using HSDPA for WAN access.  I have Virtual PC on my primary machine with five images, but I seldom switch them on because performance is disappointing.  I monitor about 20 batch jobs daily.

The machine that is with me all the time (meaning at times it could be in the trunk of the car, but always reachable at short notice) is a 17-inch notebook with 1600x900 addressability and displayability.  At three places I frequent, I have a positioned a 1680x1050 monitor.  So for >90% of the time, my notebook is running with a desktop of about 3200x1000 pixels.  I wish for more.

I disagree with Mr Tratt respectfully that a notebook is not powerful enough (instead see why it's an overkill). I also disagree that a notebook is not ergonomically sound.  I have not used a mouse since November 1996.  But I have not yet met another person who can operate a computer (ie access applications, work applications, enter data, manipulate windows, etc) as fast as I can.  Not even anywhere close.  Perhaps my circle of acquaintances is too small.

At any one time, I have 30+ application windows opened on my notebook, partially overlapping one another.  I have three Powershell consoles and two cmd.exe consoles, only one in elevated mode and with a danger red background.  On a busy day my RJ-45 is connected to one (restricted) network, my wi-fi is my route to the Internet, and I have two VPN tunnels to two distant networks.  Typically I have six terminal service (TS) sessions connected to some of my remote computers.  The good thing about TS is that I could be disconnected by a calamity such as an earthquake.  The next time I reconnect I am exactly at the middle of the down motion of the mouse click when I was disrupted.

Another thing, I have not shut down my computer since November 1996, that's when I got my first notebook.  I have upgraded eleven times since, but I have not shut any of the eleven notebooks down for the purpose of shutting it down.  Sure, I have to power it off to do hardware repairs and all that.  But I have not shut it down because I go to bed or drive somewhere or board a plane.  My computer is always on Sleep mode (not Hibernate) when I am on the move.

So, whenever I put my computer out of Sleep, it is exactly where it was previously.  I reboot my notebook once in two to three weeks at the point where it starts to behave weirdly.  I couldn't go longer than that, even with Windows 7.  I detest rebooting, because it would mean having to re-launch all my applications all over again and losing all the keyboard command buffers in my console sessions (I am that lazy).

Do you think I am insane?

Nov 2011 update: My mobile phone is the Samsung Galaxy Note.  It has a 1280x800 display.  This works nicely as all my remote desktops are at 1024x768.  See here why the Note display is a bit small.  See here why mobile computing is different from working on a notebook PC.  With the Note, finally I have the ability to access everything I want to access, anytime, even while not sitting down.  This is cloud computing in its purest form.

Wednesday, October 12, 2011

The case for an iPad

Do you know of anyone who has an iPad but not another personal computer?

Do you know of anyone who has an iPad but not a mobile phone?

I think the answers are overwhelmingly no for both questions.

Managing three devices is crazy, cloud services notwithstanding.  You spend more time managing the devices than using them.  It's not about enthusiasm.  It is just plain showing off.

A tablet computer is a great, probably the greatest, computing device for the situations when you can't be sitting down.  When you are not sitting down, you cannot do serious work.  Hence, an iPad is just that, for not serious work.  It is an expensive toy, just like those expensive hand bags with names you can't pronounce.

But what the heck, we need spenders like that to keep any economy functioning.

Today's iOS or Android is essentially a single tasking system.  If you are reading a document, you can't be looking at another document to compare the two.  If you are in the middle of an RDP session and a phone call comes in, you are stuck, like a deer in the headlights.  This is a massive retrogressive step since Lisa or Windows 1.1.  Until this changes, the notebook PC will still be the main workhorse for everybody.

Like expensive handbags, there will be many who will die to get an iPad.  Like expensive handbags, there will be many who would die than be seen holding an iPad.

Related: What is touch

Nov 2012 update: This secret is finally out: http://www.digitaltrends.com/mobile/tablets-are-for-old-people-women-and-those-who-like-playing-games-apparently/.

Friday, August 26, 2011

Military Technology 2011-07-16 The Network Storm is here

There you have it!  This is a reproduction mock-up of the attack software from the Electrical Engineering University of the People's Liberation Army:

Select Attack Target

IP Address of Attack Target

FalungGong Network List:


Watch the original video: http://www.youtube.com/watch?v=L_Wu1HlZbBk

Thursday, August 25, 2011

An expert is...

A good teacher or an expert is someone who, after listening to you for five seconds, knows :

  • what you know,
  • what you don't know,
  • what you want to know, and
  • what you need to know in order to achieve what you want to know.
Otherwise both of you will be spending unproductive hours going around each other repeatedly.  I am sure you have see this only too often, where two parties confuse each other on different frequencies.

Hence, if you are offering advice, do take a step back and spend five seconds to figure out what the other person knows, does not know, and wants to know, so as to offer what he needs to know.

Wednesday, August 24, 2011

Today and yesteryear

The gigantic difference between today and say, twenty, years ago, has got to be Google Search.

Before there was airplane travel, there were restrictions to what we can do to impact people far away.  It was worse before there was long distance telephone.  But with the near death of distance from cheap calls and fast jets, there was a boom in work that got done.

With computers came software.  The difference in speeds between today's toy computer and the first super computer is often forgotten, but it is a mind boggling three orders of magnitude, in favor of the toy computer.  The same improvements to automobiles would mean doing 50,000mph instead of 50mph today.  Imagine every granny having such a car.

Software on speedy computers is a super enabler.  But the super enabler is idling in waste 99% of the time while we think of things to make it do.  The limitations now, instead of being caused by vast distances, are caused by the smallness of the human brain.  There's only so much knowledge we can hold.  There's only so many tomes of encyclopedia we can look up in so many waking hours a day.  That is, until Google Search came along.

Initially, Google Search was just a different Alta Vista.  But soon it became one million professors standing by your side, 24x7 (the privacy people would say watching over your shoulders).  (I don't know whether this is not the case in the non-English speaking world. (Wow, triple negatives!))

So, the challenge now becomes who can make better use of the one million professors by your side.  Every granny and Michael Schumacher has the exact same 50,000mph car.

I have to stop here.  I need to go and consult my one million professors, lest your granny zooms past.

August 2013 update: I was introduced to this book today: Why Do I Need a Teacher When I've Got Google? during a talk on the future of learning.

Thursday, August 4, 2011

The decline of Microsoft

I use the quality of Windows Messenger as a barometer of Microsoft.

In 2000, it was MSN Messenger.  It came after Yahoo Messenger, but surpassed it immediately.  The features were really convenient.  Those pleasant audio notifications when your friends come online or send you a message became the standard noises in the office.  Remote Assistance worked, and I used it to help troubleshoot the PCs of many friends located far away.  There was even a real telco connection and you could dial to real phones.  File transfer worked if the firewall wasn't too strict.  PC to PC voice was excellent.

In 2003, MSN Messenger was the largest network, eclipsing AIM and Yahoo Messenger, with 30 million customers I think. The ability to make any animated GIF into an animated emoticon was priceless.  Pressing F2 you could use it like a walkie-talkie.  File transfer worked all the time.  So did handwriting, which was absolutely critical when what you want to say could not be totally expressed in words.

Then Remote Assistance stopped working.  Not even between two PCs next to each other connected on the same LAN.  In 2007, Remote Assistance mysteriously worked again, but only for a few days.

Then they renamed it to Windows Live Messenger, and it was downhill all the way.  Each newer version became bigger, but less and less things worked.  And it crashed more often, on a pure Windows PC.

Then came Google Chat as part of Gmail.  It was no fight as Chat was web based and was thus restricted in the number of things that can be done.

Then came Facebook, and Twitter.  I thought Microsoft would just tweak Messenger by letting the user broadcast certain threads and kill Twitter right away.  I waited and waited, but nothing happened.

Messenger was enhanced with its own integrated blogging feature, called Spaces or something.  It was neat, but not promoted at all, and died.  Considering the huge Messenger base, this is tragic.

In 2008 I had a Nokia E71.  It came with a true Messenger client.  It worked well, but back then I didn't have a data plan, so use was restricted to wifi opportunities only and usage didn't take off.

It's 2011.  I have two PCs on the same LAN with the newest version of Live Messenger.  On one PC I can send a file to the other.  On the other PC, the file transfer function is disabled.  On some days, it's the other way round.  On other days, it will complain that I or the other party don't have the latest version of Messenger.

It's 2011.  Google has a GTalk client on Android, which talks to all Google Chat users.  Microsoft still refuses to produce an Android client for Messenger.  The web version is unusable.  And sorry, I don't approve giving my password to the likes of eBuddy.  So now, at my desk I use Live Messenger. When away, I have to use GTalk on my Android phone.

[Sep 1, 2011 update] It's getting disastrous.  Live Messenger now creates extraordinary barriers to add a new contact.  It used to be: click Contacts, click Add.  How do you do it now?  I have someone sitting next to me, both online, both on the same LAN.  He has added me.  I don't see him.  I don't get any notification that he has added me.  He sees me as offline.  He sends an offline message to me.  I received nothing.  THIS IS RIDICULOUS.  I think it's the result of having the wrong Program Manager on the job.

And the handwriting feature has disappeared!  I need to sketch a quick drawing to my co-worker.  I am stumped.  I don't want to launch Word, save as a file, and transfer a file.

When do you think the once largest everyone must have Instant Messenger service will just die away?

[Three years later... I wasn't too far off ... ]

April 2014: By an insider.

Thursday, July 14, 2011

Connecting HP Photosmart to the Time Capsule

Today I helped a friend who had trouble connecting her HP Photosmart B210 to the Apple Time Capsule.

The error message on the HP printer was not useful, something about MAC filtering being turned on at the wireless router.  This is patently not true as MAC filtering was not enabled and any other PC could just connect to the Time Capsule by entering the correct password.

After two wasted hours, it was down to the type of encryption used.  The (old) Time Capsule was on WEP.  By changing it to WPA, it worked.

Sunday, July 10, 2011

What is gambling

Everyone tells me gambling isn't directly defined in the bible. Here's my take.

Gambling is not playing a game of chance. If it is, children playing Snakes and Ladders would be engaging in an act of sin. (Perhaps it is and I am unaware of some Christian groups out there who prohibit Snakes and Ladders.)

Gambling is not placing a bet. If it is, a farmer who buy some seeds hoping to reap a harvest later in the year would be making a huge gamble that the weather would turn out favorable.

Gambling is not gaining something without honest labor. If it is, a Boeing 747 pilot lifting 400 tons across the ocean with the mere effort of his fingers would be doing something sinful. And a person inheriting a house from his parents would be a born gambler.

However, all the generally acknowledged forms of gambling are invariably games of chance and require placing bets. We will talk about honest labor later. What then is gambling?

From what I have read from different sources, I see gambling as something that complies to all three of the following conditions:

a. Gaining ownership mainly by chance.
b. Gaining ownership through the transfer of ownership from someone else (the loser) without an overall gain in productivity or value in a zero sum game.
c. A covetous act.

Based on the above, Snakes and Ladders would not be gambling as it does not have b (unless money is being wagered in which case it is like any other game in a casino) or c. A farmer planting crops would not be gambling as it does not have b too.

Based on the above, everything in the casinos is gambling. "Investing" in the stock market by studying the ups and downs and making money from this is gambling. It meets a, b and c.

About the honest labor part, notice that the lack of it is not in my three conditions. Playing blackjack is gambling despite the enormous application of intelligence and hard work by serious players. Most stock market gamblers do serious study and work, though whether that effort has a correlation to desired outcome is a separate issue.

Tougher to determine, or perhaps tougher to accept without being in denial, would be placing some money in in an interest bearing bank account. You would not be doing the gambling. Someone else is, in order that you may receive some of the interest. Is this where Islamic banking comes in?

Some people argue that gambling in casinos does not meet condition b, as gambling revenue provides a whole string of jobs in the long food chain from the tax collector to the cocktail waitress.

Now that I have defined gambling, I will leave you to learn from the theological experts the badness of gambling.

Wednesday, June 15, 2011

A Simple Solution to the LINQ to SQL Connection String Problem

Sometimes geniuses do fumble.

Visual Studio is without question an engineering masterpiece. But the LINQ to SQL connection issue is really a silly mistake. Why would anyone want to compile a connection string, with password and all, into code?

Anyway, the geniuses did provide a good alternative.  The problem can be solved easily without having to modify anything generated by Visual Studio.

The DBML Designer generates a few constructor overloads for the DataClasses1DataContext class (assuming default naming). One of them takes in a, what else, connection string! So, when you instantiate your data context, just use this constructor instead. This is what I do for my particular application:

DataClasses1DataContext db = new

Friday, May 27, 2011

Bluetooth - ideal and useless

The hardware engineers did a fantastic job. The way the specifications of Bluetooth are developed, with all the different profiles to cater to every conceivable application, shows the professionalism and brilliance of the people behind Bluetooth.

The same cannot be said of the software people. Virtually every notebook PC comes with Bluetooth these days. But it is effectively useless. The dreams and aspirations of the Bluetooth creators are not, and cannot be, realized. It is a utter complete waste. The culprits are Microsoft and the driver developers of the device makers.

If some of the original goals of Bluetooh were realized, everyone would be able, among other things, :

  • To exchange files between notebooks instead of the hassle of a thumbdrive.
  • To connect to the Internet on the road through the mobile phone in the pocket, seamlessly.
  • To control a PowerPoint show, for example, with a pointer device using Bluetooth, instead of having to plug in another dongle.

I had gone through four different notebooks with Bluetooth. Every time it is always something like the following, which is the latest HP ProBook 4720s of mine:

Going to HP's driver support site merely wastes my time.  Contacting HP support wastes more time without a resolution.

Desktops are worse.  I bought a Bluetooth dongle from BlueSoleil some time ago and the driver BlueSoleil destroyed the PC.

I have yet to see a single person using Bluetooth on a PC.

Why is it so difficult to get this simple but very useful job done?

Monday, April 25, 2011

Your smartphone is very powerful!

It seems that most people, especially present day young ones, have problems understanding my Apollo 11 illustration.  I will try again with another example.

When the most well-known bank in my city had a million customers, it had 50+ branches.  Almost every customer operated a savings account where each was given a savings book.  Every deposit or withdrawal transaction was printed as a one-line entry in the book with the latest balance in the second last column.  (The last column was a comments field.)

Every teller in the branch had an IBM terminal.  Customers would fill up and sign a form to withdraw money, or just present cash to deposit.  The teller would open the savings book to the page where the last entry was and insert the book into the printer next to the terminal.  She would push the book all the way in.  When she hit the key to print, the central mainframe computer would send out the exact number of line-feeds so that the latest transaction would be printed nicely just below the previous one.

Overall it was a pretty efficient system.  It even took care of transactions not conducted at the branch, for example ATM withdrawals, by printing them in the savings book the next time you presented it at the branch.

The whole system was driven by two state-of-the-art IBM System 370 mainframes.  Each had 8MB of core RAM.  I can't remember the clock speed of the mainframe.  Probably it was below 5MHz, given that most register based S/360 opcodes took one cycle each and I thought the system had a couple of MIPS.  All the hardware in the branches were terminals, that is, every keystroke by each teller had to be sent to and processed by the IBM mainframe.

What the bank had is but a small fraction of what the phone in your hand has: 8MB vs 512MB, 5MHz vs 1,000MHz. To conclude, your stock iPhone alone is grossly over-powered to run the total operations of a bank with 50 branches and a million customers.  Do you get it?  It's not an analogy.  It's not an extrapolation.  It actually happened.  Imagine a 10,000 sq-foot computer room totally empty except for an iPhone sitting in the middle and driving all functions of the bank.

What's the catch?  There is none.

This illustration is not as beautiful as the Apollo 11 one as you can argue that now there're Internet banking requirements and banks now do more than just handle deposits and withdrawals.  So please go and read the Apollo story.  The distance to the moon has not increased, and astronauts are not asking for more comfortable seats.

What all this means is that we have tremendous power to do whatever we want.  It's like the (impossible) luxury of having unlimited electricity or water.  The availability of energy and water is worse now than at the beginning of the twentieth century, and is getting worse with each passing day.  On the other hand, we have more and more computing power at our disposal.  So, it's time to get off our butts and do something useful with all this power.

And the power goes to...

Probably something like 80% to 90% of the new found computing power goes into the graphical user interface. This is on personal computers as well as mobile phones. The sleek graphics painted in a window that we take for granted require billions and billions of computing cycles, repeating and repeating every time something on screen changes.

The graphical UI is obviously a great enabler. It allows lay people to use the computer where previously only trained professionals could.

However, do not let this be a distraction. The fact that a small fraction of an iPhone powered the complete operations of a bank or sent men to the moon and back cannot be erased. And it is repeatable, with great ease.

Sunday, April 10, 2011

Is it so difficult to appreciate that there are things we do not know that we do not know?

(I will justify shortly that) to most people, the set of things in the world is divided as follows (not to scale):

Things I do not know Things that I know
Figure 1

For the past thirty years or so, I have always assumed that the set of things is as follows (not to scale):

Things (I know that) I do not know
Things that I know
Things that I do not know that I do not know
Figure 2

I spend most of my waking hours tranfering things from the yellow zone to the pink zone.  It is only too easy to lapse into Figure 1 thinking if I lower my guard.

Why do I think most people think like in Figure 1? I draw this conclusion from the ridicule poured on Donald Rumsfeld from almost 100% of the press. Some thought it was poetry! The BBC called it bizzare.  I don't know whether to believe that the British Plain English Campaign doesn't understand what Mr Rumsfeld was saying.  It appears that people do not realize there is a Figure 2.

To me what Mr Rumsfeld said couldn't be clearer.  If only journalists didn't forget the sets and Venn diagrams they learned in grade 7 or 8.

Related: An expert is...

Sunday, March 27, 2011

We can be right but wrong

For almost five thousand years, we were certain that the sun rose in the east and set in the west. People went about planning a day's routine based on this knowledge that the sun moved in the sky around the earth. No one was hurt or killed even though our understanding was badly wrong.

Newton put forth many laws of physics that govern almost everything we do. We build bridges, skyscrapers and aeroplanes based on those laws. No one has been known to be injured or killed because any of Newton's laws were faulty. But 300 years after Newton, Einstein's theory on relativity showed that Newton's laws were wrong! Newton was right only if speeds were slow.  Luckily the rocket scientists had time to make the adjustments before sending people to the moon.

So, we can be right but still be wrong, and be the none worse for it.

We can be wrong in totality, but if our application of knowledge is restricted to the scope of what we know, it is possible that we can still be successful in thinking that we are right, while actually we are wrong.

So we are no better than the blind men and the elephant. We are the blind men floundering around with a big elephant.

Back to the earth going round the sun. How certain are we now that the earth is indeed moving round the sun? It is possible that the earth could still be the center of the universe after all. If someone with a good understanding of this subject matter were to propose this today, he won't be persecuted like Copernicus or Galileo were, but he would be ridiculed. I would keep an open mind.

Wednesday, March 23, 2011

The Awesomeness of Power

Finally, today I see someone with similar views. See Programming is a Super Power.

You might have discovered that I too started with assembler on 8-bits.  Survivors from that bygone era respect power, or rather the lack thereof.  Some of us are stupid enough to always optimize every line of code in the head, mentally mapping the compiler output to IL to Intel opcode, notwithstanding that the entry-level CPU is running at a billion instructions per second in each of its four cores.  Most of the time we are proven right, as any application beyond the trivial will become sluggish when one relaxes and indulge in "easy" code, no matter how BIPS you may have.

With today's hardware and the enormously rich class libraries, I am continuously thrilled by the amount of heavy lifting that a single line of innocuously looking code can do.  It must be like flying a jumbo plane - little movements on the stick maneuver 350 tons just like that!

After a while, it becomes addictive!

Thursday, March 17, 2011

Why are people still comparing browser performance?

IE9 is out today and web sites have sprung up benchmarking it against Chrome, Firefox, et cetera.

100 years ago, the lunch time conversation probably centered around who's got the fastest car, and if yours was 38mph and mine was 42mph I get the looks of envy and admiration.

About 50 years ago, people forgot that cars came with a maximum speed limit. Because whatever roads there were, and whatever you wanted to do, every car could go faster than what the other restrictions impose.

Here we are at IE9 on an entry level consumer PC with quad-cores and a billion instructions per second per core, who are these people talking about browser benchmarks, and what are their motives?