Archive for the ‘java’ Category

UIL regional meet, and another year older :)

Friday, April 21st, 2006

Well today was my 26th Birthday. I had a really good time. I didnt do what most people I know who are in their 20’s do on their birthday (which is go out and drink and party). Instead I was a judge at a UIL computer science regional meet. It was totally awesome. There was a total of 9 teams from all across parts of Texas. One team ended up having to quit before we got started because they had a sick team member and they didnt have the required 3 team members needed to compete. The contest had a total of 12 problems that each team could choose to do. Each problem they got correct was worth a max of 60 points. Some of the problems were so easy to do that if you didnt get them right you didnt need to be there in the first place, and others would have taken me more than the 2 hours of allowed time to write. All the teams got problems 11, and 12 right off the bat with the first submission taking under 8 mins. Which isnt much of a suprise considering this was all that was needed:

for(int i=0;i<23555;i++) System.out.println(“some message”);

Most of the other programs required you to parse some given data files and do something with them. The easy ones were problems 11,12,1 and 2. Only 1 team even tried any other programs than those 4. Team 6 (no idea who team 6 was) They tried problem 6 and found a bug in the given data and we were able to reproduce the bug, this team would have won first place if they would have had the correct datafile to parse. I have no idea what will happen now but they should be given the points for finding the bug like they did. I got a shirt in the mail from thinkgeek.com today from my mom. It was the “No, I will not fix your computer.” shirt. Personally I think I had the coolest shirt on tonight at the contest. It was really a great time getting to see all the upcoming computer scientists, some of those kids were really bright. Well I guess this is the end of my geeky day. I guess Ill wrap it up by writting some java code on one of my apps.

EOF

Commenting your code

Thursday, September 29th, 2005

Ok I have been reading and writting a lot of code lately, and one thing that is really pissing me off when I start reading other peoples code is the massive lack of commenting that is going on. It really drives me insane. Whats wrong with taking 1 min of your time as you are writting code to pause and

// this is a comment
/* or maybe this is a comment */
# and maybe this is a comment…
! Maybe even this. Whats it take to get people to comment!?!?!

It doesnt make you cool to not add comments to your code, no one thinks youre a great programmer because you managed to write 1200 lines and not 1 comment in it, it makes you a bit of an a-hole. Im not talking to any one person out there, and if you do comment your code good woot for you, keep it up.

I have been running into a whole mess of uncommented code in the UT2004 video game. It has all this open source stuff where you can make mods etc etc, and thats great and all, but when youre doing code for public projects such as a game mod like this; even if you dont think anyone will look at the code; better guess again, we will reverse compile your code and look what you did to see how it happened so we can make a mod thats similar or maybe even fix a bug in your mod (yep you might have a bug in your mod I know its hard to believe) and reading through 1261 lines of code to find 10 lines that have a comment on them and then only 4 of those 10 are even the slightest bit like a comment (the others are who evers name and date etc) makes it harder to fix your code, or see what youre doing/trying to do. Moral of this rant is to comment your code no matter what your doing!!!!!