I know I promised more writings on bipolar disorder. In a rather fitting and repetitive twist of fate, I was feeling too moody to write about being moody.
Instead, in order to keep myself from feeling unproductive, I started learning C programming. After trying the obligatory “hello world” program, I made a simple guess-my-birthday game. After that, I wanted to learn how to parse command-line options and arguments. I first needed an application that could take options, however, so I wrote a quick ‘n dirty Fibonacci sequence calculator. The first incarnation used an array to allocate some appropriate chunks of memory and then performed the calculations in one pass over the array.
It was simplistic, but wasteful. After posting a messag to the Orkut C Programming community, it was suggested that I use a recursive function to calculate the sequence. One number at a time is simpler and more memory-efficient. So I re-wrote the core function. Finally, I added switches for both starting numbers and the length of the sequence option.
Would like to see if I can add a few other options just for similar academic purposes like a delimiter (instead of the default newline) and an output file.
- Really don’t like the idea of keeping two separate sites (one for BPD, one for my work). I think I’ll combine both blogs into one and just turn feed the Maymay Media site blog postings from appropriate categories that I post here.
- Both these sites need redesigns. Would be willing to hire designers to get the job done.
- I missed the opportunity to register to vote. That’s frustrating but I have only myself to blame.
- Apartment hunting has proven fruitless for the time being. I also hate the idea of not living within three blocks of everything.