Square Galaxy

Tag: programming

hAPI hAPI joy joy

by Jacob on Jun.30, 2008, under Technical

Dear Google,

Let me tell you why you are a winner in my book. Three letters, A-P-I. I think opening up your services through developer APIs is what gives Google an edge over your competitors. It is what makes Google more than just a web site. It makes Google a web service. Your latest efforts to make Google data more mashable is a good example of your continued efforts to support nice APIs.

Thank you for your efforts and keep up the good work.

Leave a Comment :Dear Google, programming more...

atoi(getenv(”MYVAR”))

by Jacob on May.28, 2008, under Technical

These are mostly personal notes. I’m not sure if they will make sense to others.

I had a problem with a line of code like this:
int x = atoi(getenv("MYVAR"));

If this line was in daemon-ized code started at init level 2, it would segfault. (I’m not sure if these conditions are necessary, but those were my conditions).

getenv("UNKNOWN_VAR") == NULL
atoi(NULL) should == 0

But for some reason, things were segfaulting. I corrected the problem with:
if (getenv("MYVAR") == NULL) int x = 0;
else int x = atoi(getenv("MYVAR"));

2 Comments :c, linux, programming, Software more...

What bothers you most about this code?

by Jacob on Apr.01, 2008, under Technical

I came across this line of code today, and while I don’t normally hate other people’s coding style, this one has something in it that really bothers me:

i = ((unsigned int)(crcAccum >> 24) ^ *dataBlkPtr++ ) & 0xff;
3 Comments :c, programming, question, Software Engineering more...

Cross post code

by Jacob on Mar.01, 2006, under Technical

I’ve implemented a method which will automatically take posts I make on blogger.com and publish them on this blog as well. I thought I would share the code I used to do this. If you were to use use this script, you would need to replace text in all caps with actual values.

My code makes use of the Blogger Class from Dented Reality. Use at your own risk and don’t blame me if it doesn’t work or screws up your blogs.
(continue reading…)

Leave a Comment :Internet, programming more...


Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

 

November 2008
M T W T F S S
« Oct    
 12
3456789
10111213141516
17181920212223
24252627282930