Jared’s Blog

October 10, 2005

What am I doing wrong?

Filed under: Computers, Linux, Stupidity — Jared Sutton @ 8:32 pm

OK folks, if you don’t do any computer programming, then don’t bother reading the rest of this post…you have been warned. :)

I’ve been working on a program in preparation for an upcomming programming contest I’ll be participating in. In so doing, I’ve been learning a little more about C, as up until now, I’ve been using either C++ or Java (with a little PHP to top it off). I haven’t been completely clueless about C, since if you don’t know at least a little C, you won’t be that good at C++. So, for the past day or so, I’ve been translating a program from C++ to C. This program accepts any number of INTs on stdin, and prints out the prime factors of that int. It seems to work fine in C++, however, I wanted to see if there would be any performance advantage to doing it in C. So, I have it completely translated, and it even compiles…the problem is, however, that it will not link after compilation. I get the following message from ld:

/tmp/ccepGEcX.o: In function `main':
test.c:(.text+0x46): undefined reference to `sqrt'
collect2: ld returned 1 exit status

I even tried to do the following simple test program to make sure it wasn’t something else in my program that was messing up:

#include "stdio.h"
#include "math.h"

int main () {
double test = 5;
double test2 = sqrt(test);
printf("%f", test2);
return 0;
}

By the way, those include lines are using brackets, not quotes, when I try to compile it: stupid HTML. So, my question, to all those C experts, is, WHAT AM I DOING WRONG?!?!

September 13, 2005

What was he thinking?

Filed under: Stupidity — Jared Sutton @ 3:50 pm

The guy that created this label, and probably copied it to millions of boxes that left the IBM warehouse. If someone else has an idea how we can use the item before we break the seal to get the item, let me know…

LOL

July 30, 2005

Carbon Dating

Filed under: Stupidity — Jared Sutton @ 7:20 pm

No, this post has nothing to do with asking a Carbon Unit out on a date (Star Trek: The Motion Piture anyone?). It’s just that articles like this make me really mad. They treat the theory of evolution like it’s fact, which it is not.

Anyway, half way through browsing the comments on the Slashdot posting, I noticed that some brave Christian (read: person who is calling himself a Christian) had posted a link to this interesting article. It explains very well the flawed system of judging how old and object is to the Scientific community. Have fun reading it, and take this read as an opportunity to learn how to refute someone who tries to push evolution as a scientific fact.

July 6, 2005

Am I reading this wrong?!?

Filed under: Stupidity — Jared Sutton @ 2:24 am

According to an article on Slashdot, an astrologist is attempting to sue NASA for it’s recent ‘Deep Impact‘ mission. Deep Impact was a mission where NASA launched a probe with the intention of smashing it into an asteroid and studying the resulting debris. Apparently, this astrologer wants to capitolize on this, and is sueing NASA, with the claim that this will ‘deform her horoscope.’ This is absolutely laughable, for two reasons:

1. Astrology is a stupid concept!

2. Hitting an asteroid with a washing machine sized probe is not going to alter it’s course that much!

Suddenly, my head hurts. . .

Powered by WordPress