the “eureka” moment … almost

I started very fresh in the morning thanks to an uninterrupted 10-hour sleep last night. No caffeine was required and I was up and ready for work within no time. I eased into my chair, logged in to both my computers and glanced at the mailbox. No new mails. Good. Time to work. I was kinda stuck on creating some logical expression to be used in for loops earlier and that’s where I was supposed to start from. They say, its best to avoid for loops in hardware coding, unlike software where it makes life easy. But since this piece of hardware was to be repeated several times I was hell bent on using the loop. And why not? So I started thinking hard to make an expression which will use the loop indices to produce a constant every time. After an hour or so I finally came up with a nice ugly looking expression. I felt good. Great, in fact. It was my moment! Very few lines of code and the job done with this nice expression. I wanted to jump in joy but restrained myself and only got up to fetch a cup of coffee. While coffee was being dispensed, reality dawned upon me.

I spent almost 2 hours coming up with an expression that will produce a constant in each iteration of the loop. A CONSTANT!!! Constant means its value doesn’t change…so why not use the value instead? A constant is supposed to be .. a constant! Duhh! I felt soo stupid trying to do something easy in a much complicated way.

I guess that happens when you don’t expect things to be done easily. Sigh.


16 Comments

  1. gosh! I wait for moments like these!

    • anasimtiaz

      moments when u feel silly? :\

      • who cares about feeling silly when everything’s done and over with.

        P.S I can bet if someone else was solving that issue, they’d probably take double the amount of time. Sometimes we’re just too hard on ourselves.

  2. lol…May be it was because we think that indices have to be used in a loop.

    Deer aye durust aye.

  3. I love it when people feel stupid :P
    Kidding man! By the way, your Pagelinks in the ribbon at the top of the page are very distracting! :P

  4. Heh, we all have those moments! :D

  5. *reads post*

    *re-reads post*

    *nods head*

    I didn’t get it.

    :-D

  6. Happens to all of us dude

  7. Hahahaha. I know how it feels like. Kinda anyways :P

  8. Like specs ….
    * I came *
    * I read *
    * I re-read *
    * I ignored *
    * I stopped and said yaar kuch likh he daity hain =P *

  9. i love
    i like
    i pray
    i attention
    i observe
    i agree

Trackbacks/Pingbacks

  1. the “eureka” moment … almost | Tea Break - [...] This cup of tea was served by: Desultory Cerebrations [...]

Leave a Reply