Random Thoughts and Fibonacci Sequences

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.

Other thoughts:

  • 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.

2 replies on “Random Thoughts and Fibonacci Sequences”

  1. 1) I think your site looks fine.
    2) Glad to see you post. I was wondering how you were – seems a number of BPers right know are a bit “off”. Seasonality?
    3) I actually enjoy reading your computer stuff – it’s like a foreign language to me and I always had a thing for learning new languages :-)

  2. Thanks for the kind words. I don’t really mind this design much. It’s simplistic and could use fine tuning by someone with an eye for design, but it’s all right. The Maymay Media Web site is a pain to look at though.

    And, yeah, weather has been really crappy here lately. Lots of rain and clouds.

Comments are closed.