Friday, April 18, 2014

Bad Code: Don’t abuse the “if”

0 Comments
Couple of things I don’t like with this code,
  • “if” does 2 things, it adds a car to the collection and checks the status.
  • I like if condition flow from left to right than right to left, it feels more natural language.
Keep “if” side effect free, don’t do any logic other than checking. Less code is not always clear code.

Wednesday, April 16, 2014

Bad Code: Don’t abuse instances

0 Comments
Here we are creating a car object to create another car object, we could have used a static method for this.
This bad code is not only inefficient but quirky and cumbersome. it makes you wonder about the original authors intention. A good code should make its intentions clear by using right amount of clear comments and good names.

Wednesday, March 19, 2014

Learn “Web”

0 Comments

I get asked several times from young people I teach and entry level software developers, what are all the must know languages & technologies? I used to say, learn one language well, lay a good foundation, this should help them to learn any language in the future. C is the first language I recommend, for its simplicity and powerlessness. Next one is web, when I say web, I mean HTTP, HTML(+CSS) & JavaScript. Not one, not two, all three of them.

Here are two step-by-step tutorials to learn basic and advanced HTML & CSS.

  1. A Beginner’s Guide to HTML & CSS
  2. An Advanced Guide to HTML & CSS
  3. Web development for beginners

Tuesday, March 18, 2014

Garrett Peterson & 3D Printed Windpipe

0 Comments

Species that have no neocortex, such as reptiles, lack maternal affection; when their young hatch, the newborns must hide to avoid being cannibalize.

- Emotional Intelligence: Why It Can Matter More Than IQ

On the other hand, humans we are wired differently, parents sacrifice their own life to save their young.

Pander the last moments of of Gary and Mary Jane Chauncey, a couple completely devoted to their eleven-year-old daughter Andrea, who was confined to a wheelchair by cerebral palsy. The Chauncey family were passengers on an Amtrak train that crashed into a river after a barge hit and weakened a railroad bridge in Louisiana’s bayou country. Thinking first of their daughter, the couple tried their best to save Andrea as water rushed into the sinking  train; somehow they managed to push Andrea through a window to rescuers. Then, as the car sank beneath the water, they perished.

- Emotional Intelligence: Why It Can Matter More Than IQ

As a parent, it is agonizing to see your kid suffer and can’t do anything to help them. I can’t imagine what these parents went through for 18 months, watching their baby stop breathing and turn blue few times a day and can’t do any thing to prevent it or help. Luckily they had some help from some smart people who used 3-D printer to fix his windpipe. It is an amazing story to how a new, young technology, FDA and some smart minds came together to save this little boy and his parents.

An incredible story.

Doctors Use 3-D Printing To Help A Baby Breathe

Thursday, March 6, 2014

Passionate & Pragmatic

0 Comments

Look for these two characters when you hire an engineer: Passionate & Pragmatic.

Passion is a wild animal but it is key factor behind many inventions and changes in human history. Passionate people won’t accept status quo, if some things bother them they want to change them. Passion is the sign of caring, Hire people who care about what they are doing, why they are doing, hire people who care about the code, maintenance, future, fellow developers. As I said passion alone won’t do the job, it might derail you, tear apart a good team with good intention. Passion can be blind. Hire people who has mastered this wild animal.

Pragmatic: Pragmatic developers think for short term and long term. They know the priority. They know how top management works, how developers work. They know the priority. Won’t say, I want to take a break for 3 years and re-write the software and release it. They know what works, what doesn’t. They know what complicates and how to simplify things. Know that we won’t get everything in life. These are people who been there and done that. They don’t let their passion control them. They can hear the good arguments  of Passion and find a practical way to implement it. Caveat emptor, People full of pragmatism, and no passion, accept the status quo, they don’t want to change things. They know what works and what doesn’t, but they don’t know what should be better and why it should be better. They can’t see the future.

Passion + Pragmatism => Awesome

P.S. How to interview and identify people with these characters? that is for some other post.