Show me some comments! Nov17 '04

Feedback

# (1 of 8): Dale » dalegroup.net

49 minutes after the fact. (Wed 17 Nov 2004, 8:56 PM CST)

My current system has very few comments which is bad. Although the new thing should be much better.

settings.php
//remove ^ E_NOTICE for full error reporting

//uncomment to display errors in browser

//adds prefix to the table names. Allows for multiple installs in one database

functions.php

//start the timer, works out page generation time

//stops the timer and returns the time it took for generation. Level of accuracy can be changed

//checks if gzip is enabled, if the server supports it and the client supports it. If so output gzipped content

//checks if gzip is enabled and server supports it. Use for admin panel stats or something

//checks if the user has come from another link on the current site. If so any actions to go back will take them there (i.e certain post etc) otherwise take them back to the root of the site.

#FINISH THIS (move to another file?, cookie array)
//remembers users information, handles guests

#FINISH THIS
//handles registered users info

//adds slashes to a value. Protect yourself from SQL injection attacks!! No one likes them. This will add slashes to an array too. Recursion baby!

#FINISH THIS (work out custom session name or something, option for use only cookies?)
//starts the session

//lets get the details about the site out of the database

#FINISH THIS
//modified wordpress trackback. Shall code my own after the hsc ;)
//submitted patched version to matt. Port trackback thing. Wordpress now patched
//SQL STUFF HERE

//serialize an array and put it into a cookie

//return the array from the cookie

//deletes a cookie

//display links bound to a certain category

//makes title into one that works nicely in a url

Not sure how useful it is without the code :)

# (2 of 8): Matthom

1 hour, 8 minutes after the fact. (Wed 17 Nov 2004, 9:14 PM CST)

Excellent, Dale. Love it.

It is more useful than you think. It inspires.

Previous comment Return to entry

# (3 of 8): A.h. » amandaharasti.com

1 hour, 59 minutes after the fact. (Wed 17 Nov 2004, 10:06 PM CST)

Ok, I admit it, I have NEVER commented any of my code. Not even my HTML. But, since I am a PHP late bloomer, I definitely know I'd better get my act together because I have worked with ColdFusion before and I know how easy it is to 'lose' code.

Previous comment Return to entry

# (4 of 8): Matthom

9 hours, 58 minutes after the fact. (Thu 18 Nov 2004, 6:04 AM CST)

Amanda, yes - losing code and forgetting what some code does is frustrating... can't wait to see your comments

Previous comment Return to entry

# (5 of 8): Chad » greasyvalley.com

17 hours, 9 minutes after the fact. (Thu 18 Nov 2004, 1:16 PM CST)

// test to see if we are not on the homepage

// if we are, then echo the welcome statement

// categorical listing - only displays the title and excerpt

// post listing - lists the entire single post

// opening statement included with the 5 most recent posts

// nothing matched the query string

// set the allowed order by columns

// if order is not set, or it is not in the allowed list, then set it to a default value. Otherwise, set it to what was passed in.

Also, here's a post with some heavily-commented code.

Previous comment Return to entry

# (6 of 8): Matthom

22 hours, 49 minutes after the fact. (Thu 18 Nov 2004, 6:56 PM CST)

Like it, Chad.

Previous comment Return to entry

# (7 of 8): Ucosty » ucosty.net

2 days, 10 hours after the fact. (Sat 20 Nov 2004, 6:12 AM CST)

I'm more of a C coder [switching constantly between game development and operating system development]

These comments are old. They are from my old CMS system which was left incomplete and shoved into several sites before being ceremoniously replaced by wp.

// strip url of such things as '..' and '.'

// find if page exists and include it if it does load it

//display newsitems + comments
//(shit the is fugly ass code)
//i should really investigate css+xhtml soon
//gah!!oneoneone

//now substitute stuff such as page breaks, comment blocks, spam... mmm spam

Previous comment Return to entry

# (8 of 8): Matthom

2 days, 12 hours after the fact. (Sat 20 Nov 2004, 8:33 AM CST)

UCosty, I like the personal comments - or "notes to self..."

Previous comment Return to entry

RSS feed for comments on this post

Leave feedback

Feedback

Input format: The editor controls below will assist with Markdown syntax.

Status

Sub-status

Your info

Return to entry.

A good programmer always comments out their code, right?

You are at the feedback permalink page for: Show me some comments!

Read more...