Topical Tropical http://pokle.net Stuff that makes me think twice posterous.com Mon, 01 Mar 2010 00:27:02 -0800 Shuffling energy http://pokle.net/shuffling-energy http://pokle.net/shuffling-energy I got up this morning and rearranged some energy to affect the world. That's what I do for a living according to Ron Burk - http://www.youtube.com/watch?v=yzUuCwyk5DA

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle
Sat, 13 Feb 2010 16:09:00 -0800 Ever wondered how mechanical computers worked? http://pokle.net/mechanical-computers-101 http://pokle.net/mechanical-computers-101

Here's an interesting video explaining how navy mechanical computers used to work -

Part 1 - http://www.eugeneleeslover.com/VIDEOS/fire_control_computer_1.html

Part 2 - http://www.eugeneleeslover.com/VIDEOS/fire_control_computer_2.html

I remember playing with gears as a kid and discovering some of their mathematical properties. But I never went as far as using cams to compute trignometric functions!

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle
Fri, 01 Jan 2010 05:43:36 -0800 Simple http://pokle.net/simple-926 http://pokle.net/simple-926

I like the minimalistic look of this blog - http://blog.nuclearsquid.com/

Markus blogs mostly about coding - the look works very well for that purpose.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle
Sun, 13 Dec 2009 03:34:04 -0800 Stuff someone learned working at Microsoft http://pokle.net/stuff-someone-learned-working-at-microsoft http://pokle.net/stuff-someone-learned-working-at-microsoft I found this an interesting read. Mostly because it resonates with my own experience -
http://www.sriramkrishnan.com/blog/2009/12/stuff-ive-learned-at-microsoft.html

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle
Wed, 21 Oct 2009 19:47:46 -0700 It's a different world out here http://pokle.net/its-a-different-world-out-here http://pokle.net/its-a-different-world-out-here Here's something new I learnt yesterday about the middle east - every house has a little indicator stuck on the ceiling pointing towards Mecca. My Emirates flight had a Mecca locator up on the projector every so often. Many people carry a Mecca locator GPS device on them. Every one is quite aware of the direction to Mecca as their primary direction.

All that orientation means that more people know the direction towards Mecca than the cardinal directions (N,S,E,W). This has some interesting implications for an application we're developing for here. We can't for example show a layout of a house and orient it to North and ask people to pick where they want their network points installed. People would just get confused. We have to orient our maps towards Mecca, or show a little Qibla arrow as they are called.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle
Fri, 09 Oct 2009 17:12:00 -0700 Empirical evidence for software metrics http://pokle.net/empirical-evidence-for-software-metrics http://pokle.net/empirical-evidence-for-software-metrics

Someone did the leg work and found some real evidence about software metrics:

http://research.microsoft.com/en-us/news/features/nagappan-100609.aspx

The results are interesting, but not surprising if you've developed software for a while:

  • "Code coverage is not indicative of usage" - Your hot spots need good code coverage, but not your cool spots.
  • TDD projects take 35% more time to complete, but are 60 - 90% better in terms of "defect density".
  • Confirmed that having more assertions reduces defects. However, you can't just mandate their use. Developers must have a culture of using them.
  • Organisational structure matters a lot (herding your cats)
  • Geographical distance doesn't matter much if your distributed team feels like they're working on the same team. Here's an interesting quote - "Most people preferred to talk to someone from their own organization 4,000 miles away rather than someone only five doors down the hall but from a different organization."

 

 

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle
Sat, 06 Jun 2009 03:31:00 -0700 Software Engineering ≠ Computer Science http://pokle.net/software-engineering-computer-science http://pokle.net/software-engineering-computer-science Finally a reasoning that makes sense to me about the question about software as an art or science.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle
Fri, 15 May 2009 14:37:00 -0700 Mental plaque http://pokle.net/mental-plaque http://pokle.net/mental-plaque When I tried to get to gmail.com, and Safari wouldn't go there, I blamed Safari!

I did what every self respecting person would do when faced with evidence contrary to everything they believe in. I believed that Gmail's was a rock, and Safari was a bit mushier.

I actually lodged a bug report with Apple. How embarrassing.

Then when I read about it in the news today, I had a chuckle and did what every self respecting geek would do - talk about their mistake.

Phew, I do have hope.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle
Wed, 29 Apr 2009 14:56:00 -0700 I'm a salesman http://pokle.net/im-a-salesman http://pokle.net/im-a-salesman

So here's how it happened:


While waiting for my turn with the bank teller I started googling define:teller. Why are they called Tell-ers I pondered.


A frail voice from the right asked: What's that?

me: An iPhone


I looked at the voice, and it came from an old woman - no younger than 70.


frail voice: What does it do?

me: ummm… I’m browsing the Internet. It has the Internet.


frail voice: Hmmmm… You’re on the Internet? Over here?

me: Yes, it has the Internet. This is a web browser, but there are other things it can do too.


frail voice: Is it a phone? Can you make calls on it?

me: Yes, it’s a phone too. You can make calls.


And so we went. Her eyes lit up every time I did something unexpected like scrolling or zooming with my fingers. She liked the way my fingers glided all over the pretty screen.


When I told her how much I was paying for it every month her eyes lit up even more. Apparently she was paying $50 for her home phone, and about the same for the Internet… and it was all stuck at home!


Her partner sitting next to her grumbled something to her. My time with my teller had come. I smiled at her confident that she was going to get an iPhone soon.


I should go into sales. I'll find out about tellers some other day :-)

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle
Wed, 04 Mar 2009 06:41:00 -0800 Casino race condition http://pokle.net/casino-race-condition http://pokle.net/casino-race-condition This looks like an expensive race condition at a casino.

The jackpot machine didn't reset its jackpot amount fast enough, and two people won the same jackpot. One's now suing the casino :-)

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle
Mon, 25 Aug 2008 16:22:00 -0700 "Onward into the 2nd dimension!" http://pokle.net/onward-into-the-2nd-dimension http://pokle.net/onward-into-the-2nd-dimension Something moved my cheese.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle
Mon, 28 Jul 2008 08:35:00 -0700 A mystery http://pokle.net/a-mystery http://pokle.net/a-mystery Hello, I am your super expensive database. Bow before me. Today I will reprimand you for doing something stupid. I know you didn't mean it, but I'm going to be rude anyhow cause I have an attitude. All I'm going to tell you is 'ORA-00942: table or view does not exist'. Don't bother asking me anything else. Good bye.

Oracle is currently at version 11. I'd like to be proven wrong, but I'm willing to bet that this error message and others like it are not going to have any context in them for generations to come.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle
Wed, 20 Feb 2008 15:12:00 -0800 Kids play at office politics http://pokle.net/kids-play-at-office-politics http://pokle.net/kids-play-at-office-politics I've always thought that office politics was very similar to kindergarten politics. The entire spectrum of human deceit can be observed in both places. That sounds very bleak I suppose, but the common theme is human behaviour. Kids are just little humans remember?
Through the interlinkedness of the interweb, here's an interesting validation: Why We Banned Legos

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle
Sun, 12 Aug 2007 16:12:00 -0700 Don't catch this http://pokle.net/dont-catch-this http://pokle.net/dont-catch-this Inexperienced programmers can teach you a bucket load more than experienced programmers. I was reviewing someone's code recently when I came across something so nasty that I had to blog about it.
try {
x = you.getKnife().getRun().getCut();
} catch (NullPointerException e) {
x = null;
}
When I asked the programmer to reveal their intention, the answer was something along the lines of - that code kept throwing NullPointerExceptions, and this was the only way to proceed. When I asked the inevitable question of "why was that code throwing a NullPointerException?", the answer was an uninspiring "I don't know". A few moments spent debugging revealed a bug - that the developer had cloaked with the try-catch block. Scary to say the least!

As I was regaining my composure, Joel who was watching all this in the shadows piped "Never catch NullPointerExceptions". And what golden words they were! Almost anywhere you catch a NullPointerException, you are probably cloaking a bug. You should hunt for the source of the problem rather than cloak it.

You could generalise that for all workarounds - not just those that involve catching unexpected exceptions. The golden words could be generalised as "Behind every workaround lies a nasty bug". Doesn't that sound too obvious to be told? I don't know any more :-)

As I was thinking about all this, I remembered something that I find extremely annoying about Objective-C. Any operation on a null* value results in another null value (rather than a NullPointerException). Thus in Objective-C, the code above would have the same effect without the try-catch block.

The reason I find this extremely annoying is that every time I introduce a bug involving nulls, they propagate far far away from the original source of the bug. No exceptions are reported, and hence everything seems to be functioning correctly, except it isn't! The symptoms are button presses being ignored; generated fields being mysteriously blank; empty files being writen, etc. The list goes on and on.

The annoying NullPointerException is your friend :-)

*For the purists, Objective-C refers to null values as nil values.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle
Sat, 12 May 2007 13:26:00 -0700 Out of memory (not!) http://pokle.net/out-of-memory-not http://pokle.net/out-of-memory-not This has got to be the most annoying thing about running Java desktop applications. The dreaded out of memory error. Large applications like Eclipse require more memory than your usual hello world program. Sun in all of its good intentioned malice has decided for you that your desktop applications will be corralled into a limited amount of memory that is decided at the start. Your applications don't gracefully slow down as they start using up swap space - like other non-Java desktop applications. There is no warning. It doesn't matter if you were working on the cure to cancer and your machine had enough memory to shame an elephant. If your Java application hits the limit rightfully or wrongfully, you will lose your work. And no, it isn't good enough for the application to tell me that I should've known better and increased the size of the heap. There is plenty of free memory on my computer - it needs to just use it!

If you think about it, the error message is wrong. My computer is not out of memory. Eclipse isn't out of memory either. It is just out of the horrible horrible limited memory that was chosen for it when it started up. 640k ought to be enough for everyone right?

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle
Sat, 05 May 2007 15:44:00 -0700 How soon we forget! http://pokle.net/how-soon-we-forget http://pokle.net/how-soon-we-forget Digital cameras have changed the photographic environment so much that we're starting to forget the bad old days of film photography. At the PMA 2007 Photography Exhibition that I visited today, I was playing with a Canon SLR camera attached to a massive telescopic zoom lens. The lens was on show, and the camera was just there to show off the lens.

A guy walked up to me and commented:


Gee, they've taken off the LCD from the back of the camera. They must've done that to stop people from damaging it.

I looked at the back of the camera, and was puzzled for a while. What an unusual camera back. Where indeed was the LCD?

And then it dawned on me that I was holding not a digital SLR, but a film SLR!

The backs of film SLRs are naked, black, and rather featureless. I've owned three film SLRs in my time, and yet I'd forgotten! The guy didn't look like he was any younger than me. Looking around the exhibition after that for film cameras, I saw none apart from historical pieces in glass cabinets!

What a strange experience! The future is now.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle
Fri, 06 Apr 2007 13:10:00 -0700 Please help me find it! http://pokle.net/please-help-me-find-it http://pokle.net/please-help-me-find-it I've been reading a lot of lengthy documents online recently, and I'm finding the user interfaces of web browsers, PDF readers and other such applications to be severely lacking. Don't even get me started about Zinio Reader.

Apple's Preview is a very good PDF reader, but it fails me when I want to search for words in a PDF document. In the following example, I searched for the word 'inject'. After it found the page, I had to scan through the page line by line with my tired eyes until I found the near invisible gray highlighted word!

I would like to poke the eyes out of the person at Apple that decided to highlight black text with a gray background! Yes, inverse video text was the only way to highlight text on a monochrome ANSI terminal when they were popular, but isn't it high time to discard this old user interface maxim and come up with someting more friendly for my 1440x900 display? Something that is easy to find on a page swarming with uniform horizontal text. Perhaps an animation of dancing girls next to your text? Hmmmmm... I think I'll settle for what a neat little PDF viewer called Skim does:

Now that's much better!

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle
Sat, 31 Mar 2007 18:03:00 -0700 The cleverest computer program http://pokle.net/the-cleverest-computer-program http://pokle.net/the-cleverest-computer-program I woke up one morning with the remnants of a strange computer related dream in my head:

The cleverest programmer devised the cleverest program. When he was done, it asked him "How do you know I'm done?"

I'm feeling completely lucid as I post this, and I don't find it the least bit funny :-)

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle
Sun, 14 Jan 2007 09:06:00 -0800 File->Lose or File->Save http://pokle.net/file-lose-or-file-save http://pokle.net/file-lose-or-file-save Isn't it strange that word processors have a 'File Save' command? It's as if users want their documents to be lost by default, and only saved on request!

I remember an incident at university when I was the resident geek (yes, sadly). One of my neighbours was distraught because her computer had lost an assignment that she had been working on for about three days. She hadn't saved the document once, and her computer had crashed taking her document away. Forget about backups. She didn't even have the document saved to disk.

She was horrified when I explained to her that unless she saved her document the computer would just happily lose it by default. She looked at me with incredulous eyes - "How could computers be so dumb!"

Wouldn't it be nicer if word processors just saved documents by default (wherever!), and had a 'File Lose' command instead? People don't start typing into a word processor with the intention of losing their work!

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle
Wed, 06 Dec 2006 00:19:00 -0800 The End http://pokle.net/the-end-708 http://pokle.net/the-end-708 To reach the end of a good book is such a sad thing. I flipped through the index illogically hoping to find more to read until I hit the definite hard blue back cover. The End. Then I held the closed book in my hands for a few more moments before putting it down.

How could it end? Why did it end? This wasn't meant to happen. I could feel the book thinning out as I got through it. The fat index fooled me into thinking there was more left. I felt cheated. But happy. But sad.

After a few more moments spent reminiscing there was only one thing left to do - get onto the Internet and see if there's more to read on the topic :-)

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/428566/you___me_square_001.jpg http://posterous.com/people/4aASOII2Oewp Tushar Pokle Tushar Tushar Pokle