Converting caffeine to code, shooting pics, and cruising the roads of life.

Archive for the ‘PHP’ Category

Interesting day

Monday, February 20th, 2006

Today I ventured over to the University of Cincinnati to meet with Dr. Hal Carter, the computer science department head. My mom set up an appointment for me so that he could tell me more about the programs that UC runs for computer science and computer engineering.

He was rather amazed at what I already knew for being only 15. After talking a little about what he has taught, he was amazed to see that I’ve done work on Sourceforge, know C/C++, and have my own OS. He seemed kind of baffled how I taught myself all of these things. This makes me wonder about all the other programmers that are my age and have more skill than me. Maybe we could all benefit from a meeting like this?

After talking about the classes for a while, he then showed me around the campus. They had some pretty interesting things around. In one of the extra rooms (an old utility closet?) the graduate students have a room dedicated to themselves. In it were a few SGI octanes, couple parallel computer setups, and a custom designed gaming console they have been working on for a few years. If that isn’t cool enough for you, just having a keycard identification system won’t work. You need a custom one! These students wired the door up to a computer and hung a keyboard on the outside so they could just enter the keycode…

Next I went around to a few labs where kids were building circuits and designing them in CAD for their computer engineering classes. They sure have some super, heavy-duty breadboards in those labs… I found it quite interesting that they had so many SGI and SUN machines. They have several labs that are 100% SUN workstations…

Then we walked into a room with something that really grabbed my attention. Their server room was amazing. There were three, count’em, three beowulf clusters. One had 32 SMP machine nodes. The other two were 64 SMP nodes. One of the 64nodes was *brand* spanking new. To top off this multi-hundred thousand dollar setup. There was probably 5 Sun servers (don’t remember what type) laying around the room.

Didn’t see too much that drew my attention after this. Got to see the level 10 clean room and a few other pieces of equipment used in creating microchips.

After that I went back to my mom’s office and he said that he was amazed at what I knew once again. This is what seems kind of cool, he said that he could learn a lot from what I already know. Good or bad?

On the way home my mom decided I was going to go through the Chemical Materials department as well. Waste of time. I am ABSOLUTELY not interested in this stuff. w00t! I can see crystalline structures in a microscope and do things to them! They are needed no doubt, but that is not the field for me…

Today I also got some coding time in on osdever.net. The forums have come a long way over the past few months. It’s pathetic it’s take this long, but I have more important things to do I guess. Editing of posts should be done in maybe 30 minutes. After that it’s just moderator controls and the forums are done. I’ll probably do a code audit for security holes and optimizations after that is complete.

From there on it’s just finishing up the tutorials system, adding all the existing tutorials into the database, and tweaking the templates. :) Admin control modules can come later I guess, they won’t take that long to write.

In other news, multitasking is a PITA.

I’m also going to try something new here, weekly PHP tips. I’m not sure if I’ll focus on a designated area or just anything handy, but here is Week #1’s.
PHP Tip #1 – Week 1

This week I’m going to start with an essential security basic. Do not trust any data the user submitted to your site or that the user can edit. This includes query strings and forms usually. Make sure you do the appropiate cleaning of $_POST data.

I usually cast any number values to integers when I clean my $_POST vars. This means that any string that isn’t a number is set to 0. When I’m cleaning user data that needs to be entered into a database, I relyon mysql_real_escape_string to do the dirty work for me. I hope this little tip helps a few of you. =D

woah!

Tuesday, January 31st, 2006

Well this site has gotten quite a few visit since my discovery of the music protection hole on purevolume.com. (~800 visits).

Well, I’ve been doing a lot of work on the new web site for osdever.net and I must say it’s coming alone quite well. Check out the demo and leave me a message on the forums while you’re still there.

I still have a few things left to do on the forums. I’m having problems integrating GeSHi syntax highlighter and the bbcode system because when you go to nl2br() the post’s message, you’ll get double spaced code from GeSHI. This is because GeSHI specifically adds the \n’s to the code it generates so the source looks alright. So I have a hack in there to make it work right now, but that keeps us from adding \n into the code, as it becomes just “n.”

I have also begun working on JayantHTTP as of yesterday. It seems pretty portable right now, so hopefully I can get it on *nix and windows. Granted i’ts no all that far, but hopefully we’ll be sending out pages within the next few days.

I am also currently moving to FreeBSD as my main OS on my laptop, so this may not get updated for a while because if you’ve seen some of my other posts, it takes quite a few hours to get a desktop enviroment setup on it.

Bye for now.

test

Friday, December 9th, 2005
#include 

int main()
{
        printf("BBBBBBBB\n");
        return 0;
}