August 18, 2011

A plain english introduction to CAP Theorem

You’ll often hear about the CAP theorem which specifies some kind of an upper limit when designing distributed systems. As with most of my other introduction tutorials, lets try understanding CAP by comparing it with a real world situation.

Chapter 1: “Remembrance Inc” Your new venture :

Last night when your spouse appreciated you on remembering her birthday and bringing her a gift, a strange Idea strikes you. People are so bad in remembering things. And you’re sooo good at it. So why not start a venture that will put your talent to use? The more you think about it, the more you like it. In fact you even come up with a news paper ad which explains your idea

Remembrance Inc! - Never forget,  even without remembering!
   Ever felt bad that you forget so much?  Don't worry. Help is just a phone away!
    When you need to remember something, just call 555--55-REMEM and tell us what you need to remember. For eg., call us and let us know of your boss's phone number, and forget to remember it. when you need to know it back.. call back the same number[(555)--55-REMEM ] and we'll tell you what's your boss's phone number.
   Charges : only $0.1 per request

So, your typical phone conversation will look like this:

  • Customer : Hey, Can you store my neighbor’s birthday?
  • You: Sure.. when is it?
  • Customer : 2nd of jan
  • You: (write it down against the customer’s page in your paper note book )Stored. Call us any time for knowing your neighbor’s birthday again!
  • Customer : Thank you!
  • You: No problem! We charged your credit card with $0.1

A Few months later…

  • Customer : Hey , can you tell me when is my neighbor’s birthday?
  • You: 1 sec please..
  • (look up the customer’s page in your note book)

  • You: Thank you for holding. It’s 2nd of jan sir.
  • Customer : Thank you!
  • You: No problem! We Charged your credit card with $0.1

Read the rest of this entry »

August 15, 2011

MacSequel – A native MAC OSX GUI query tool for Oracle

Introducing MacSequel – a made-for-mac-osx query tool for oracle . This is my first experience writing objective-C code. This is how MacSequel looks:
MacSequel - A "Made for MAC" query tool for Oracle

I am recently working on a web-project backed primarily by Oracle Database. Though most of my earlier projects used MySql, this is not the first time I am working with Oracle. I’ve had so many times in the past where a client has demanded that an app to be run on Oracle. One of the biggest troubles I’ve had in working with Oracle is the lack of a decent native osx client(a query tool).

During such times, every other day I actively google for a few minutes looking for a simple native-mac GUI for oracle and then after failing to find one, get back to SQLDeveloper. And SQLDeveloper sucks. At least on my mac. At least for the simple things I do everyday. Takes a long time load, consumes huge memory and just dosen’t have that “Something” that other native Sql tools have(For eg., Sequel Pro which is a great for mysql).

So I decided to make one.  I’ve been a Java(and swing) developer all my life, so the first step was to convince myself to move away from java for this project. Once I did that, it wasn’t that difficult. I will try to post a few more articles or the troubles I faced which might be useful to someone trying to write objective-c code for the first time.

I’d love your feedback.

June 9, 2011

Why You’ll like Fantom -part 1 – The compiler

The benefit of the compiler(and static typing) has always been a topic of hot debate. People love it, with passion. And people hate it, with passion. Have you thought about what is it with the compiler that brings people into a love/hate relationship with it?

Compilers. You can’t live with them.. You can’t live without them

Sounds familiar? That’s because compilers are like your wife. They complain .. let you know when you suck. And that’s a good thing. Wait.. is it?


Read the rest of this entry »

February 26, 2011

First, Save your Ass

I’ve seen managers always quoting Mahatma Gandhi :
“A customer is the most important visitor person on our premises..”

MG got it almost right when he said that. The truth is The Customer is the second most important visitor in your premises. The most important is you. Your team. If you die, your customer dies with you.

Learn from the Airplane Stewardess:

Remember what the airplane stewardess teaches you?  In an event that the flight goes bonkers and the oxygen level goes down the oxygen masks will drop above your seats. You are supposed to first put on the masks then put the masks on your children. You, then your children. In that order. Why do they tell that? Because the logic is so simple, yet so many don’t realize it. If you die trying to save your children, you’re helping nobody. There is a better chance to save your children if you are alive in the first place. Isn’t that true for your team too? If you allow your code to rot, overwork your developers all in the excuse of “doing it for the customers” you’re no helping nobody.

What kind of people are we?

Let’s be honest. In most industries having software is not mandatory. People can do without it. We sell our software but on one premise. Making the life of customer easy. What kind of people are we if we don’t buy in to the same philosophy? The truth is “software” can not only make our customer’s life easy, but also ours.
Look within your company. There will be so many places where software can help you. Take time off writing that. Ask your developers what’s irritating them. there are always some. May be the manual build process? Give them time off to automate it. May be the “dirty” code and design that encourages copy paste more than reuse? Give them time to write utility classes and refractor the code. Give them time to learn new technologies. Get them the mac that they always wanted.
Doing all this is not a “nice-to-have”. It’s priority-1-code-red-issue. And make sure you let your team know of this. Tell them it’s okay to delay the feature, in exchange for doing it right. Don’t file these work under “when-you-get-time”. That way you will never get time. Don’t treat these as “extra” work, this is a part of “the” work.
Keep looking for ways to make your team’s life easier. Ask them how can things be improved. Don’t expect your team to come and tell you about every problem. Make a culture out of “Helping themselves first”. Don’t let this process get lost in the “customer want’s this” hoopla.
Think about it this way. Wouldn’t you rather eat in a hotel that serves you nicely cooked food with a clean kitchen even if they delay a bit? Same with your customers. Keep your “internals” clean. Keep your developers happy. In turn, they will delight your customers. Isn’t that what you want anyway? :)
November 9, 2010

InterviewStreet

Tried interviewStreet.com. Very interesting project. I would definitely recommend it to be used by anyone for the first round screening of candidates. Here are some things I would wish for:

a) In my current interviews, I use google wave. Mostly I don’t bother that the users give exactly compilable programs, instead the approach. I would love if they add a module to live-see what the candidate is typing.

b) Ability to get more information once the test is done. Once the test is taken by the candidate, If he does satisfy the minimum criteria I would love to get more details about the candidate including their resume, phone number etc.

c) Extend it to be used for designers: This is a little bit more challenging. However, if I had a way to see the final designs from a set of candidates for a given problem, It’ll be very useful.

d) Offline. This is true in indian environments. A candidate taking the interview from home, should not see the clock ticking when the power goes off.

e).. a better code editor.

Overall I think It’s a great start and useful as is in the first screening process. I would like to see it evolve into a more complete interview solution where after the first screening I can conduct live interviewing of candidates, give feedback and transfer it to another person to interview and so on.

Curing yourself off Addiction

I always wondered why its so difficult to cure people out of addiction. It was put very accurately in a movie I saw on HBO yesterday.. “Curing yourself off addiction is same as curing yourself off ‘desire’ itself. And no one wants to be cured off ‘desire’”.

November 5, 2010

Backspace Hell

I don’t have a problem with my typing. In fact I type really fast. I’ve one small problem however. When I type a line and notice a mistake in the beginning of the line, I backspace until I get to the error, then fix it and type the rest again. I can’t seem to get out this habit. arghh.. May be because backspace involves less movement of fingers than reaching the arrow buttons or mouse.

November 4, 2010

Tales Framework

OK. Finally got to launch the Tales Framework. Have a look at it and let me know. I will write more about it in the comming posts. For now here’s a video of what it can do:

October 2, 2010

Not all engineers carry a pen

If you are a software engineer in India you know this problem. There is a huge difference between the previous generation “Engineers” and the new ones. Leading that difference is the thought that Engineers always carry a pen. Laptops and smart phones have spoiled me to the point that I don’t think of taking a pen anymore. Add the fact that I am usually careless.
I’ve never felt guilty about it. That is, Until I meet one of the previous generation Engineers. They could just kill you will a single “What? Don’t have a pen?”

October 1, 2010

Unconscious huhing is nature’s Gift

The other day I was in a meeting. A guy was sitting next to me and explaining some really boring things. The first few minutes I concentrated, but then went into the huh-ing mode.

You know what this mode this. You signal your brain to do the “huhh-ing”, “Yeah-ing”, “Hmm-ing” in round robin and your head to move up and down like a vertical pendulum while you enjoy a nice vacation with your girlfriend in a day dream. Amazing how our brain can do that.