Wasting my time… Writing on a blog.

My page of ramblings

I still hate C strings February 25, 2009

Filed under: Uncategorized — jordoex @ 10:32 pm
Tags: , ,

I present: substrings

char str_pid[strlen(msg_in.buf)-2];
sprintf(str_pid, “%.*s\n”, strlen(msg_in.buf)-3, &msg_in.buf[3]);

It’s just so ugly, why can’t they at least provide a sane substring class

God bless C++.

 

Java gui layouts February 23, 2009

Filed under: Uncategorized — jordoex @ 11:09 pm
Tags:

The default Java gui layouts are horrible, Qt’s makes way more sense. I wish I could use Qt Jambi for my cmpt 275 project, but noone else cares enough to not use swing

 

MP3 Players February 18, 2009

Filed under: Uncategorized — jordoex @ 10:31 pm
Tags: , , ,

Proposition: An iPod shuffle is overpriced

Fact: I got a $15 2GB mp3 player on Saturday (normally $30 at NCIX; the player is made by Philips)

Fact: A 2 GB iPod Shuffle costs $70

Q.E.D.

 

Pthreads and C strings February 11, 2009

Filed under: Uncategorized — jordoex @ 9:48 pm
Tags:

I love Pthreads and I hate C strings.

Why? I’m fairly used to Java and its strict typing, but C is very loosely typed, of course, for performance.  With c strings, I have to call so many odd libraries that I wouldn’t need to with Java or C++ strings.  Malloc makes sense, but not at a high level language.  The worst thing is when you’re taking part of an array of characters and when you pass it as a char*, you have to add an extra index to insert a null character.

It made my CMPT 300 assignment a horror to debug.

But pthreads are actually really nice, as long as you don’t need too much complexity.  They just do exactly what you want them to do, nothing more, nothing less.

C strings are just so simple that they’re overly complex.

 

Texting While Driving February 4, 2009

Filed under: Uncategorized — jordoex @ 6:00 am
Tags:

You would think that after four people died in an accident (,and common sense), that people would figure out that driving while texting is a bad idea.

Not for the guy who almost hit me while I was crossing the street.

C’mon, he’s driving slowly and slowing down, so it looks like he’s stopping; so I begin to cross.  Luckily, I was watching, unlike him.

Un-freakin-believable

 

Alarm Clocks February 3, 2009

Filed under: Uncategorized — jordoex @ 6:46 am
Tags:

There are a lot of different kinds of alarm clocks out there, many very bizzare.  As I’m writing this in my room, it’s obvious that I’m looking at my own alarm clock.  It’s the standard kind, it beeps and playes music.

However, the problem is that I find it very hard to wake up to it, now that I’ve had it for many years.  It seems that my mind will subconsciously hit the snooze button without me remembering that I even did so; this leaves me waking up at 6:30 (when I hear my family prepare for work) instead of the 6:00 that I actually set my alarm to.

So, soon, I plan to get another 2 alarm clocks soon, each with slightly offseting times and different sounds in an attempt to wake up punctually.  I don’t like the idea of an alarm clock specifically made to run under the bed or make you play a mind game to turn it off.