Whats the best code you've ever written??

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

JPlush76
Forum Regular
Posts: 819
Joined: Thu Aug 01, 2002 5:42 pm
Location: Los Angeles, CA
Contact:

Whats the best code you've ever written??

Post 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.
lc
Forum Contributor
Posts: 188
Joined: Tue Apr 23, 2002 6:45 pm
Location: Netherlands

Post 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.
User avatar
llimllib
Moderator
Posts: 466
Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD

Post 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.
User avatar
protokol
Forum Contributor
Posts: 353
Joined: Fri Jun 21, 2002 7:00 pm
Location: Cleveland, OH
Contact:

Post 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.
lc
Forum Contributor
Posts: 188
Joined: Tue Apr 23, 2002 6:45 pm
Location: Netherlands

Post 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 ;)
User avatar
llimllib
Moderator
Posts: 466
Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD

Post 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 :D
samscripts
Forum Commoner
Posts: 57
Joined: Tue Apr 23, 2002 4:34 pm
Location: London, UK

Post 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
User avatar
RandomEngy
Forum Contributor
Posts: 173
Joined: Wed Jun 26, 2002 3:24 pm
Contact:

Post by RandomEngy »

Heh, I guess the mods didn't like my random background color script refresh-a-thon. :D
JPlush76
Forum Regular
Posts: 819
Joined: Thu Aug 01, 2002 5:42 pm
Location: Los Angeles, CA
Contact:

Post by JPlush76 »

you guys got some cool stuff going on there :)
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post 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 8O 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 :twisted:

Later on,
BDKR
User avatar
llimllib
Moderator
Posts: 466
Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD

Post 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.
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post 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.
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post 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
daemorhedron
Forum Commoner
Posts: 52
Joined: Tue Jul 23, 2002 11:03 am

Post 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.
User avatar
phice
Moderator
Posts: 1416
Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:

Post 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)
Image Image
Post Reply