Wrong passwords take longer to verify

cool_penguin_smallDid you ever notice that when you enter a wrong login password to your system, it takes longer to verify? Doesn’t it seem an anomaly because verifying a correct password would mean all the characters match while in case of a wrong password only in the worst case the last character entered would fail to match, other attempts should fail earlier? Continue reading Wrong passwords take longer to verify

Ten Commandments of Egoless Programming

  1. hacker_compUnderstand and accept that you will make mistakes. The point is to find them early, before they make it into production. Fortunately, except for the few of us developing rocket guidance software at JPL, mistakes are rarely fatal in our industry. We can, and should, learn, laugh, and move on.
  2. You are not your code. Remember that the entire point of a review is to find problems, and problems will be found. Don’t take it personally when one is uncovered.
  3. No matter how much “karate” you know, someone else will always know more. Such an individual can teach you some new moves if you ask. Seek and accept input from others, especially when you think it’s not needed.
  4. Don’t rewrite code without consultation. There’s a fine line between “fixing code” and “rewriting code.” Know the difference, and pursue stylistic changes within the framework of a code review, not as a lone enforcer.
  5. Treat people who know less than you with respect, deference, and patience. Non-technical people who deal with developers on a regular basis almost universally hold the opinion that we are prima donnas at best and crybabies at worst. Don’t reinforce this stereotype with anger and impatience.
  6. The only constant in the world is change. Be open to it and accept it with a smile. Look at each change to your requirements, platform, or tool as a new challenge, rather than some serious inconvenience to be fought.
  7. The only true authority stems from knowledge, not from position. Knowledge engenders authority, and authority engenders respect – so if you want respect in an egoless environment, cultivate knowledge.
  8. Fight for what you believe, but gracefully accept defeat. Understand that sometimes your ideas will be overruled. Even if you are right, don’t take revenge or say “I told you so.” Never make your dearly departed idea a martyr or rallying cry.
  9. Don’t be “the coder in the corner.” Don’t be the person in the dark office emerging only for soda. The coder in the corner is out of sight, out of touch, and out of control. This person has no voice in an open, collaborative environment. Get involved in conversations, and be a participant in your office community.
  10. Critique code instead of people – be kind to the coder, not to the code. As much as possible, make all of your comments positive and oriented to improving the code. Relate comments to local standards, program specs, increased performance, etc.

[Source: The Psychology of Computer Programming (1971)]

64 modern tips to being a Man

coffee_compThe modern day words of wisdom to being a man. A few of these are typically for the Wall Street banker. However, the list isn’t a cliché and some of the points are worth paying attention to.

  • Stop talking about where you went to college.
  • Always carry cash. Keep some in your front pocket.
  • Rebel from business casual. Burn your khakis and wear a suit or jeans.
  • It’s ok to trade the possibility of your 80s and 90s for more guaranteed fun in your 20s and 30s.
  • The best public restrooms are in hotels: The St. Regis in New York, Claridge’s in London, The Fullerton in Singapore, to name a few.
  • Never stay out after midnight three nights in a row… Unless something really good comes up on the third night.
  • You will regret your tattoos.
  • Never date an ex of your friend.
  • Join Twitter; become your own curator of information.
  • If riding the bus doesn’t incentivise you to improve your station in life, nothing will.
  • Time is too short to do your own laundry.
  • When the bartender asks, you should already know what you want to drink.
  • If you perspire, wear a damn undershirt.
  • You don’t have to like baseball, but you should understand the concept of what a pitcher’s ERA means. Approach life similarly.
  • When people don’t invite you to a party, you really shouldn’t go.
 And sometimes even when you are invited, you shouldn’t go.
  • People are tired of you being the funny, drunk guy.
  • When in doubt, always kiss the girl.
  • Tip more than you should.
  • You probably use your cell phone too often and at the wrong moments.
  • Buy expensive sunglasses. Superficial? Yes, but so are the women judging you. And it tells these women you appreciate nice things and are responsible enough not to lose them.
  • If you want a nice umbrella, bring a sh*tty one to church.
  • Do 50 push-ups, sit-ups, and dips before you shower each morning.
  • Eat brunch with friends at least every other weekend. Leave Rusty and Junior at home.
  • Be a regular at more than one bar.
  • Act like you’ve been there before. It doesn’t matter if it’s in the end zone at the Super Bowl or on a private plane.
  • A glass of wine or two with lunch will not ruin your day.
  • It’s better if old men cut your hair. Ask for Sammy at the Mandarin Oriental Barbershop in Hong Kong. He can share his experiences of the Japanese occupation, or just give you a copy of Playboy.
  • Learn how to fly-fish.
  • No selfies. Aspire to experience photo-worthy moments in the company of a beautiful woman.
  • Own a handcrafted shotgun. It’s a beautiful thing.
  • There’s always another level. Just be content knowing that you are still better off than most who have ever lived.
  • You can get away with a lot more if you’re the one buying the drinks.
  • Ask for a salad instead of fries.
  • Don’t split a check.
  • Pretty women who are unaccompanied want you to talk to them.
  • Cobblers will save your shoes. So will shoe trees.
  • When a bartender buys you a round, tip double.
  • The cliché is that having money is about not wasting time. But in reality, money is about facilitating spontaneity.
  • Be spontaneous.
  • Find a Times New Roman in the streets and a Wingdings in the sheets. She exists.
  • Piercings are liabilities in fights.
  • Do not use an electric razor.
  • Desserts are for women. Order one and pretend you don’t mind that she’s eating yours.
  • Buy a tuxedo before you are 30. Stay that size.
  • One girlfriend at a time is probably enough.
  • #StopItWithTheHastags
  • Your ties should be rolled and placed in a sectioned tie drawer.
  • Throw parties. 
But have someone else clean up the next day.
  • You may only request one song from the DJ.
  • Measure yourself only against your previous self.
  • Take more pictures. With a camera.
  • Place-dropping is worse than-name dropping.
  • When you admire the work of artists or writers, tell them. 
And spend money to acquire their work.
  • Your clothes do not match. They go together.
  • Yes, of course you have to buy her dinner.
  • Staying angry is a waste of energy.
  • Revenge can be a good way of getting over anger.
  • If she expects the person you are 20% of the time, 100% of the time, then she doesn’t want you.
  • Always bring a bottle of something to the party.
  • Avoid that “last” whiskey. You’ve probably had enough.
  • Don’t use the word “closure” or ever expect it in real life. There may still be a mortally wounded Russian mobster roaming the woods of south Jersey, but we’ll never know.
  • If you are wittier than you are handsome, avoid loud clubs.
  • Drink outdoors.
 And during the day.
 And sometimes by yourself.
  • Date women outside your social set. You’ll be surprised.
  • If it’s got velvet ropes and lines, walk away unless you know someone.
  • You cannot have a love affair with whiskey because whiskey will never love you back.
  • Feigning unpretentiousness is worse than being pretentious. Cut it out with the vintage Polo and that ’83 Wagoneer in Nantucket.
  • The New Yorker is not high-brow. Neither is The Economist.
  • If you believe in evolution, you should know something about how it works.
  • No-one cares if you are offended, so stop it.
  • Never take an ex back. She tried to do better and is settling with you.
  • Eating out alone can be magnificent. Find a place where you can sit at the bar.
  • Read more. It allows you to borrow someone else’s brain, and will make you more interesting at a dinner party — provided that you don’t initiate conversation with, “So, who are you reading…”
  • Ignore the boos. They usually come from the cheap seats.
  • Hookers aren’t cool, but remember, the free ones are a lot more expensive.
  • Don’t ever say, “it is what it is.”
  • Start a wine collection for your kids when they are born. Add a few cases every year without telling them. It’ll make a phenomenal gift in 20 years.
  • Don’t gamble if losing $US100 is going to piss you off.
  • Remember, “rules are for the obedience of fools and the guidance of wise men.”

The original post.

The Mother's Day Poem written by my little sister

While I wished our mom a Very Happy Mother’s Day over the phone, my little sister was way too cool to write a poem for her. Here it is —

Salute to thee, o mother
The bond with whom never sever
Knit by time’s careful hands slowly
When all others waver, thy light steady
As the ice-capped Himalaya stands still
Withering time’s destructive will
When thy voice is heard, thy lullaby
It dispels the darkest hour of melancholy
The first divine being seen to tread the earth
Is the last one to last in healing your every scar
Under whose wings the little birdie sleeps safe
As the Chinese wall stands against the hostile wave
Whose hands toil through day and night
As much a person could with her might
Just to see the child’s smiling face
She is the angel of love, pity and grace
Whose pain never defeats her smile
Neither a tempest can crumble her spirit

— Ananya

Why I hate frameworks

Originally written by Benji Smith on Sep 30, 2005, this example shows exactly how far frameworks have swayed from their original goals in order to support everything possible. Read along:
——————————————————–
I’m currently in the planning stages of building a hosted Java web application (yes, it has to be Java, for a variety of reasons that I don’t feel like going into right now). In the process, I’m evaluating a bunch of J2EE portlet-enabled JSR-compliant MVC role-based CMS web service application container frameworks.

And after spending dozens of hours reading through feature lists and documentation, I’m ready to gouge out my eyes.

Let’s pretend I’ve decided to build a spice rack.

I’ve done small woodworking projects before, and I think I have a pretty good idea of what I need: some wood and a few basic tools: a tape measure, a saw, a level, and a hammer.

If I were going to build a whole house, rather than just a spice rack, I’d still need a tape measure, a saw, a level, and a hammer (among other things).

So I go to the hardware store to buy the tools, and I ask the sales clerk where I can find a hammer.

“A hammer?” he asks. “Nobody really buys hammers anymore. They’re kind of old fashioned.”

Surprised at this development, I ask him why.

“Well, the problem with hammers is that there are so many different kinds. Sledge hammers, claw hammers, ball-peen hammers. What if you bought one kind of hammer and then realized that you needed a different kind of hammer later? You’d have to buy a separate hammer for your next task. As it turns out, most people really want a single hammer that can handle all of the different kinds of hammering tasks you might encounter in your life.”

“Hmmmmmm. Well, I suppose that sounds all right. Can you show me where to find a Universal Hammer.”

“No, we don’t sell those anymore. They’re pretty obsolete.”

“Really? I thought you just said that the Universal Hammer was the wave of the future.”

“As it turns out, if you make only one kind of hammer, capable of performing all the same tasks as all those different kinds of hammers, then it isn’t very good at any of them. Driving a nail with a sledgehammer isn’t very effective. And, if you want to kill your ex-girlfriend, there’s really no substitute for a ball-peen hammer.”

“That’s true. So, if nobody buys Universal Hammers anymore, and if you’re no longer selling all those old-fashioned kinds of hammers, what kinds of hammers do you sell?”

“Actually, we don’t sell hammers at all.”

“So…”

“According to our research, what people really needed wasn’t a Universal Hammer after all. It’s always better to have the right kind of hammer for the job. So, we started selling hammer factories, capable of producing whatever kind of hammers you might be interested in using. All you need to do is staff the hammer factory with workers, activate the machinery, buy the raw materials, pay the utility bills, and PRESTO…you’ll have *exactly* the kind of hammer you need in no time flat.”

“But I don’t really want to buy a hammer factory…”

“That’s good. Because we don’t sell them anymore.”

“But I thought you just said…”

“We discovered that most people don’t actually need an entire hammer factory. Some people, for example, will never need a ball-peen hammer. (Maybe they’ve never had ex-girlfriends. Or maybe they killed them with icepicks instead.) So there’s no point in someone buying a hammer factory that can produce every kind of hammer under the sun.”

“Yeah, that makes a lot of sense.”

“So, instead, we started selling schematic diagrams for hammer factories, enabling our clients to build their own hammer factories, custom engineered to manufacture only the kinds of hammers that they would actually need.”

“Let me guess. You don’t sell those anymore.”

“Nope. Sure don’t. As it turns out, people don’t want to build an entire factory just to manufacture a couple of hammers. Leave the factory-building up to the factory-building experts, that’s what I always say!!”

“And I would agree with you there.”

“Yup. So we stopped selling those schematics and started selling hammer-factory-building factories. Each hammer factory factory is built for you by the top experts in the hammer factory factory business, so you don’t need to worry about all the details that go into building a factory. Yet you still get all the benefits of having your own customized hammer factory, churning out your own customized hammers, according to your own specific hammer designs.”

“Well, that doesn’t really…”

“I know what you’re going to say!! …and we don’t sell those anymore either. For some reason, not many people were buying the hammer factory factories, so we came up with a new solution to address the problem.”

“Uh huh.”

“When we stepped back and looked at the global tool infrastructure, we determined that people were frustrated with having to manage and operate a hammer factory factory, as well as the hammer factory that it produced. That kind of overhead can get pretty cumbersome when you deal with the likely scenario of also operating a tape measure factory factory, a saw factory factory, and a level factory factory, not to mention a lumber manufacturing conglomerate holding company. When we really looked at the situation, we determined that that’s just too complex for someone who really just wants to build a spice rack.”

“Yeah, no kidding.”

“So this week, we’re introducing a general-purpose tool-building factory factory factory, so that all of your different tool factory factories can be produced by a single, unified factory. The factory factory factory will produce only the tool factory factories that you actually need, and each of those factory factories will produce a single factory based on your custom tool specifications. The final set of tools that emerge from this process will be the ideal tools for your particular project. You’ll have *exactly* the hammer you need, and exactly the right tape measure for your task, all at the press of a button (though you may also have to deploy a few *configuration files* to make it all work according to your expectations).”

“So you don’t have any hammers? None at all?”

“No. If you really want a high-quality, industrially engineered spice rack, you desperately need something more advanced than a simple hammer from a rinky-dink hardware store.”

“And this is the way everyone is doing it now? Everyone is using a general-purpose tool-building factory factory factory now, whenever they need a hammer?”

“Yes.”

“Well…All right. I guess that’s what I’ll have to do. If this is the way things are done now, I guess I’d better learn how to do it.”

“Good for you!!”

“This thing comes with documentation, right?

Gitanjali (English translation by Tagore)

This is for the non-Bengalee audience. I am not educated enough to explain it. Tagore won the Nobel prize in Literature in 1913 for Gitanjali (Song Offerings). It’s always a delight to read it in Bengali but the English translation evokes no less joy. The meaning isn’t to be understood, it has to be realized and felt. All I can say is – it defines ultimate selflessness, eternal peace of mind and endless joy in life by identifying oneself with the whole Universe.

He whom I enclose with my name is weeping in this dungeon. I am ever busy building this wall all around; and as this wall goes up into the sky day by day I lose sight of my true being in its dark shadow.

I take pride in this great wall, and I plaster it with dust and sand lest a least hole should be left in this name; and for all the care I take I lose sight of my true being.