29 Jul 2009

Random Thought: Addictions

Every addiction fills a gap.  When the mind is intimidated by the nothingness of void, it falls back into one of its acquired addictions.

Thoughts, for example, is an addiction.  Try stopping your thought process for a few seconds.  No, you can't think "I am not thinking anything" or "wow, this is hard", just stop every single thought in your mind.  If you could get at least one second without thoughts, you will know how overwhelming that void is.  The mind, unaccustomed to such a void, falls back into its thoughts.

27 Jul 2009

Random Thought: Love and dream

Love is like dreams. You know it was just a dream only after you wake up.

Some people sleep dreamless; some people dream every night.

26 Jul 2009

Love for the ball

The first ball in my career went for a sixer.
"That was a bad ball," I thought.
Soon I realised it was a bad over.
Then I found it was a bad spell.
We lost.  A very bad first match!
We returned early; bad series it was.

3 years later, I'm thinking,
Feeling the red shiny ball in my hands.
That was a bad career move.

25 Jul 2009

My experience with T-Mobile Android G1

How long have I been using it?
For about 3 months now.
Do I like it?
Yes
Will I swap it for an iPhone?
No
Will I swap it for the cool new iPhone 3GS?
Nope
Why not?
I need a physical keyboard. Plus, I am not a fan of Apple's products
Will I swap it for a Palm Pre (when there is a GSM version of the phone, of course)?
I will, most likely
What do I like in the G1 phone?
  • Touchscreen -- I have always liked touchscreens (but not as the ONLY means to control the device)
  • Android OS -- one of the best phone operating systems I have used
  • Has a decent number of apps available in the market and I can write my own if I want, with free tools
  • Seamless integration with my Google Account and syncing of my contacts with Gmail
What do I not like much?
  • Battery life -- I don't want to remember to charge my phone every night
  • Not so easy to use physical keyboard
  • And a few minor annoyances (but minor annoyances are with every device!)
Will I recommend it to my friend?
Depends on what my friend needs
What will I tell the people who say their G1 phone is slow?
  • Don't run too many apps in the background. I used to run both Google Talk and Meebo running in the background and it made the phone considerably slow. Now I don't do that anymore.
  • Do not enable SSL (or encrypted connections) if you don't really need it. Twidroid especially was apparently sluggish with SSL enabled.
  • Try to use as few widgets on the home screen as possible. Widgets are more or less like background applications. My phone got intolerably slow when I had about 4 widgets on the home screen. (Now I have only one.)
What I wish Android OS had?
Ability to write apps in Python or other some higher level language than Java
Overall, what would I rate my phone, on a scale of 1 to 5?
4. I am very happy with it.

REPL or Interactive Shell for Java

You can use the interactive shell/REPL of BeanShell to execute arbitrary Java code and see the results.

For example:
bsh % print (new java.util.Date());
Sat Jul 25 15:11:35 IST 2009
Without BeanShell, I would do something like this for trying out the same code:
// Save this in a file, say Test.java 
class Test {
  public static void main(String[] args) {
    System.out.println(new java.util.Date()); 
  }
}
Save this file, compile it using javac Test.java, fix any compilation errors, and run using java Test.  Thank you BeanShell, for saving me a lot of time and trouble!

A 2-line user's manual

Enough has been discussed about user interfaces for decades!  Even now, machines (or rather, the people who make those machines, programmers like me) haven't learned to say only what is required to be said.


This UI has four buttons and a tiny "user manual" besides the buttons.  The manual only describes two buttons -- OK and Next buttons.  God knows what Exit and Ignore buttons do.  I have used this UI maybe 50 times in the past one year, and I still cannot figure out what Next and OK buttons do without reading the "manual"!

If I were designing this UI, I would simply list all the available trays with the corresponding paper type/size and let the user pick one.  If that design is not possible for some reason I would only have two choices: one that says "Use paper from this tray" and another that says "Find another tray".

18 Jul 2009

Optimism

Optimism is good,
I was told.
I started gambling.