Page 1 of 3
Whats the best code you've ever written??
Posted: Mon Aug 12, 2002 6:12 pm
by JPlush76
Since we're all on different skill levels I thought I'd just ask everyone what project they were most proud of that you had written from scratch?
A link to see it would be cool also, I'm always down with seeing new ways of doing things.
Posted: Mon Aug 12, 2002 9:20 pm
by lc
Oh that is soo easy

I basicly give away all the scripts I've done on my site, but the ultimate challenge I set myself was writing a BB.
And I don't do Mysql at all since I'd have to pay my host extra for that particular service. So it's completely flatfile... I'm still working on adding some functions and will prolly keep at it for the rest of my life
it's here
http://alienhelpdesk.com/ahdbb.php
But actually I am proud of every script in the freescripts section of that site. I'm also doing a completely interactive php site for some friends which is like a combo between the bb and a site... I'm excited about that too
Such fun.
Posted: Mon Aug 12, 2002 9:46 pm
by llimllib
I wrote a proxy in C for a networking class. While it didn't *do* anything, I got it to run on Windows using cygwin when my teacher thought it couldn't be done (so easily, anyway). The code was real tight, and I learned a lot making it, and I could use it as a code base for future projects if I wanted to.
Posted: Mon Aug 12, 2002 10:00 pm
by protokol
Heh, the coolest and yet the most useless program I have ever written was in C++ for my college level computer science course.
We basically had to write an interpreter which would parse and "compile" a made up computer language with made up syntax, data types, operators, etc.
While it did absolutely nothing except parse mathematical functions, it was definitely a huge step forward in my programming knowledge. C++ is cool when I need to write a really intense application. (Gotta love classes and templates

). PHP is the best for the web.
Coolest PHP program I have ever written is the Sleek Design Suite. It basically is a groupware application which incorporates an Address Book, Calendar, Notepad, Webmail, Todo list, Polls, Mailing List, Content manager, etc.
It'll be out sometime very soon

So I'll post a message in here and you can all bow down to me and praise me for my amazing contribution to America.
Posted: Tue Aug 13, 2002 9:03 am
by lc
hey that's cool guys!
So is that like a normal way to do it? Learn a bit of C/C++ in school then get into php?
LOL naturally I work backwards.. just downloaded the bloodshed compiler yesterday and made a start at learning C++, that after learning basic php

Posted: Tue Aug 13, 2002 9:09 am
by llimllib
The normal way to do it is different for everybody, but us student folk are generally taught in C/C++ (although java and, to a lesser extent, python, are becoming popular teaching languages). As for whether it's best to start high-level and move down or the other way around, you can find plenty of flamewars on the internet about that. For myself, I don't really think it matters as long as you want to learn. If you want to, you'll do it no matter where you start.
Once the programming bug gives you a good bite, you can't turn back

Posted: Tue Aug 13, 2002 9:15 am
by samscripts
Hi, I'm pretty pleased with some of the code on my current project, the php resource digest.
The site runs off a template engine, uses caching of fat db queries, custom 404 error handling to make it look like the site has 100s of thousands of pages when in fact there are only a few chucking out data from the db, and a (not yet complete) search facility like that on
http://www.php.net
The sites still in the testing phase, still a few bugs, there are no real resources listed, but if anyone is interested, it is at
http://www.phprd.net/index.php
To try the search, use (for example to search for mysql and caching resources)
http://www.phprd.net/mysql/cache
You can use username / password test / test to login,
but like I said, no real content there yet.
cheers, Sam
Posted: Tue Aug 13, 2002 10:53 am
by RandomEngy
Heh, I guess the mods didn't like my random background color script refresh-a-thon. :D
Posted: Tue Aug 13, 2002 11:00 am
by JPlush76
you guys got some cool stuff going on there

Posted: Tue Aug 13, 2002 11:37 am
by BDKR
The one that I've been working on lately is my favorite to date. It's a load balancer for a pool of replicated databases. And it's written in PHP

Took a huge step forward in understanding sockets, semaphores, and shared memory, as well as mapping memory for use by a process.
And to think, I never graduated from High School
Later on,
BDKR
Posted: Tue Aug 13, 2002 12:06 pm
by llimllib
Is the code for you, BD, or did you convince higher-ups to use PHP for nitty-gritty stuff? either way, I'm impressed.
Posted: Tue Aug 13, 2002 12:27 pm
by jason
Coolest PHP I have written? I think it's all cool, since I now live in Canada.
Okay, enough Bad Humor. hehe...
Seriously, the best code I have written. I don't know. All my classes I enjoy, and help me out the most. They aren't "cool" by any standards, but line for line, they get the most work down with the least amount of effort.
Posted: Tue Aug 13, 2002 1:54 pm
by BDKR
llimllib wrote:Is the code for you, BD, or did you convince higher-ups to use PHP for nitty-gritty stuff? either way, I'm impressed.
Actually, I get to make the decisions

Can you believe it
Anyways, this is development I'm doing for later as our business and load increases. The actual load balancing is working. It's simple round robin, but that's good enough as I have the luxury of making sure all db equipment is the same.
I'm still working out one more problem now, but once that's done, it's officially complete.
(Something about pumping the results back to the server and the fact that it doesn't seem to behave).
Anyways, I'm very weak in C so my eventual plan is to use my converting it to C or Objective C as a learning experience.
Later on,
BDKR
Posted: Tue Aug 13, 2002 6:30 pm
by daemorhedron
Tough to say, almost everything for me is a learning experience no matter how simple or how complex it is. I wrote an irc bot in php pretty much because I was told it was not possible/insane to do so. That was a lot of fun, and one of the best learning experiences for me to date. To help me learn c, I'll eventually be porting it over.
Posted: Tue Aug 13, 2002 6:51 pm
by phice
hex, i think is his screenname, made a little calender script that held all of your data for the next 3 weeks or so. Althought that never really made it big with this forum, it's the most memorable of any script in here... (that I know of)