Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Friday, July 28, 2006

Programming and Girls

So what happens if you-the-geek goes up to your girlfriend (wait! a geek who has a girlfriend? ahem!) ? She says "Ya [your_name_here_o_geek_god], I know it's good for me. But I don't know anything!"

Hmm. Don't worry, it's the same ol' story everywhere and let me tell you; people, all the world over, are debating about how to get more women into computer science. So what steps can we take to bring our favorite girls (comeon, you can't leave me out just because I don't have a girlfriend!) to the fantastic world of programming and computer science in the real sense of the word. Let me forewarn you, the journey is tough and filled with terrors unforseen; of missing (mis-placed?) semi-colons and strange un-decipherable (un-compilable?) code.

So how did we become good programmers? Ofcourse I know the code runs with the blood, and the neurons function in harmony to move our fingers on the keyboard. And the code? what code? it's a direct brain-se (like dil-se) to the computer. Oops, I just got carried away. Flashback...yeah girls and programming. It's something like language and mathematics. You need to learn the nuances of the lingo and become expert enough to be able to express the delicate and precise balance of a mathematical equation. You miss a plus or a minus and it does not compute. You forget to place the equals sign and the stupid compiler can't understand a thing. It's like teaching a child to stand on his/her feet, to walk, to run. We practiced hard enough day and night to reach this kind of dexterity and everybody else must do the same.

It helps an awful lot if you're good at language (an area where girls are better than us, and don't kill me for saying this boys). And it helps an awful lot if you're good at mathematics (no boy, you're looking at the wrong place for a compliment). And remember, 'Practice makes a woman perfect'.

Ok, it's late at night and I need some sleep (yes, geeks do sleep sometimes). I'll wait for the first non-male (ofcourse I mean female by that) comment on this post to continue this geek-talk. And she'll also get a cadbury's eclairs from my side if possible :-)

Coming up next:
  • A survival guide to programming for newbies.
  • What will I get from a programming contest (I can never win against those #*#$)?
  • ... (that's a secret)
  • ... (will tell you about this only if you sign a non-disclosure agreement with me)
Disclaimer: If you're a girl, please don't mind; and If you do, please try to find a way to forgive me. After all all this is just some crazy geek-talk, right? ;)

Monday, June 26, 2006

Insight into DP & BFS

Hmmm, thanks to two nice problems, I got some valuable reading of Dynamic Programming and Breadth First Search [Trees].

562. Dividing Coins
I did this program, I didnt even use recursion, yet I think the technique is called Dynamic Programming. From Cormen, I found out that the problem is similar to 0-1 Knapsack problem, and Shalin Bhaiya confirmed the same. However, I think the method I followed made the problem even simpler than 0-1 Knapsack.

439. Knight Moves
This was the TKP problem I was talking about. Used a BFS algo, but however, I didnt exactly use a tree. I used a queue instead. I wonder what is the method I used.. I mean whether what I did comes under DP or not, whether it is indeed BFS or not... Anyway, having done this program gives me tremendous confidence!