failing like never before

20Jan/080

Dynamically Create a Multidimensional Array

I had a few problems trying to dynamically create and pass a multidimensional array in C++ for my previous programming project. Of course, passing an array by value is rather ridiculous when the array is large, so I had to pass by reference. Now, passing a single dimensional array is really quite simple in C++, you just do the following:

//stuff
int input_cols;
char *char_array_ptr;
//stuff
cout << "cols? ";
cin >> input_a;
char_array_ptr = new char[input_cols];
return char_array_ptr;

And hey, you're done. The same thing could pretty much be done in C by using malloc, instead of new. But as I mentioned, I needed to pass a multidimensional array.

20Jan/080

The Pervasiveness of I

iclicker logo ipod logo iriver logo

In 1998, Apple Computers started selling a new version of their desktop computers, called the imac. The first imac had the CRT and all other components of the computer enclosed in a cool futuristic case, that came in various colors. I remember touring an Apple facility with my dad nine years ago (ASME offered their members tours of tech facilities) and hearing all the commercial hype about the new imac. They gave us some free toys and sat us in front of a projector to show us an imac commercial, which showed some imacs spinning across the screen, showing off their cool colors (because PCs were notorious for only coming in beige boxes back then) while an old Beetles song played in the background. Our guide also emphasized that the imac was simple to assemble and worked right out of the box, unlike a Windows PC. When I was a wee lad in grade school, I never could have guessed that the naming pattern for the imac would extend into just about all of Apple's products, and even into other companies.

13Jan/080

How to Cool a Computer

I really like these lightbox effects, forgive me if I go a little overboard with adding photos.

I took these photos a really long time ago. My computer uses a Pentium 4 CPU, and therefore runs quite hot. Thus, I ended up using a large house fan to cool the computer after one of my case fans died, and my computer started to overheat.

11Jan/080

Way Back When

Way back in the days, almost a year ago, this site was running my custom CMS. It didn't look too bad, but it wasn't very configurable and lacked all the bells and whistles that make a mature blogging platform like WordPress so much cooler.

Here's a quick list of the functions that my custom application offered:

  • Image gallery: Upload a picture that was less then 1mb in size and my application would save it and create a thumbnail, there was also a simple gallery interface
  • Live search: A fairly simple feature to implement under Rails. For those of you that still haven't heard of web 2.0, "live search" is where the user types into a search box, and results are returned instantly, without having to actually hit enter and go to another page (try the live search in my left sidebar!)
  • Anyone can join!: My application allowed anyone to keep a blog on my site. Your blog would be hosted at www.42gems.com/blog/<blog name>/, because I didn't know how to create subdomains automatically.
  • Comments: A vistor to the site could add comments without having to register, and they could add cool little emoticons by using TinyMCE. The only problem was that I didn't use CAPTCHA, Akismet or any kind of comment moderation, so I had massive spam issues.
  • Easy to use: One of the upsides of having very little features, my application was extremely easy to use. In that respect, it was vaguely like the ipod, except the ipod isn't free.

And thats about it in terms of feature sets, for my old blog application. I believe pictures are in order...

custom application, main page custom application, image gallery custom application, post and comment

But before I moved to WordPress, I was using Typo. See here for reasons why I decided to move to WordPress. And just because I feel like it, here's a really low quality screenshot of my old Typo blog, using the iWTAP theme.

10Jan/080

42gems Explained

I looked at my site's URL today and wondered why I chose the domain name “42gems,” and for the life of me I couldn't seem to remember why. Before I go any further, I'd like to describe how and why this site came about.

During the summer of '06, before I started my senior year in high school, I was an intern at Intel Corporation. I worked in Technology Automations and Manageability Services, a subgroup of IT. Essentially, my job was to design web applications. This of course, required that I know some sort of server-side scripting language. My manager gave me two choices, Microsoft .NET or Ruby on Rails. During that time, I knew very little about web programming, my programming experience consisted solely of c/c++, Javascript, and some HTML and CSS (of course, neither HTML or CSS are really programming languages, but I digress). However, even when I was sixteen I still had a dislike for Windows, so I chose Rails over .NET.

8Jan/080

Social Commentary, Physics Style

I was reading my physics book today, and came across this rather interesting sentance.

In everyday conversation we use the word "model" to mean either a small-scale replica, such as a model railroad, or a person who displays articles of clothing (or the absence thereof). (from Sears and Zemansky's University Physics Volume 1, Twelfth Edition)

I couldn't believe my eyes. Had my physics book just made a social commentary or som sort of weird joke?

Perhaps the authors were sick of the almost-nude style of clothing that is so popular these days (especially amongst females). Or perhaps they were disgusted by the moral decripitude that Americans had sunk to.

Irregardless, the fact remains that the authors of a college physics textbook expressed their views about something that didn't invovle physics. And not just any opinions, moral opinions.

Insanity!

8Jan/080

Migrated to WordPress

A little more then a week ago, Typo 5.0 was released. Shortly after that, version 5.0.1 was released to fix a bug, and the next day after the 5.0.1 release Typo version 5 was pulled from the mirrors because of a critical bug that would result in the application purging the blog's database. I upgraded to 5.0 almost as soon as it first came out but downgraded back to 4.1.1 as soon as I heard about the new bug.

But even with version 4.1.1 I experienced numerous problems with Typo. In December of 2007, 21.1% of all the HTTP error codes returned by my server, were 500 (Internal Server) errors. In one month alone, the Typo application on my domain experienced 208 internal server errors. I've experienced many of these before. Occasionally, after writing a new post up in the admin section, I would click the “submit” button only to get a 500 error. Or I might be on the home page and click on a category link, again, only to get a 500 error. Most of the times, these errors would disappear once I hit the back button in my browser and tried clicking on the link a second time. But these were aggravating errors and shouldn't have been popping up in a stable application release.