Quite Rude

Re-write
Blogged on Friday 5th November 2004 at 7:22:35 PM by David

I was looking to add a couple of features to the blog software just now. A page to display the most recent comments and something to keep track of when visitors last came to the site so they could see if there were any new comments/blogs.

Unfortunately I decided that I couldn't add these features for three reasons:

1) To create the recent comments page I intended to modify the subroutine that writes the comments on the blog pages. However, that subroutine has become so complicated with the stuff I've added to it already that it's practically impossible.
This subroutine needs to be re-written and simplified and I have plans already drawn up in my head for that.

2) The cookie thing to keep track of when visitors were last here would need to be tied into the subroutine that writes the blogs. Unfortunately that subroutine is in a somewhat similar state to the comment subroutine. That subroutine does a great many different things (some of which I can't even remember) and meddling now would cause severe breakage.

3) I need my own PC to code, it's a fact. I simply cannot work on these Uni PC's, I cannot code on someone else's computer either (no matter if it's a good one or not). It HAS to be my machine. Therefore I have to wait for my new motherboard to arrive (which should be soon Grin).

Just so you can see how bad these two subroutines have become I have uploaded the ASP file that they are both in.
This is the whole file without any modifications made to it, they are the only two subroutines in it because they are soooo bad. Believe me, they started off nice and simple, but now they are ... not.

blogfunctions.txt

Edit: Oh yeah, you can use the code but not sell it, creative commons license etc. etc.

Comments:

  1. #1 posted by Ben Rogers (bcrogers at gmail dot com).

    See, this is why ASP smells. You have a database and you're having trouble. I could make these functions work quite easily on my PHP flatfile blog.

    Friday 5th November 2004 at 10:11:24 PM
  2. #2 posted by David (david dot s dot harrison at gmail dot com).

    Er... it's got nothing to do with the database. The database functions are all elsewhere.

    Saturday 6th November 2004 at 2:44:04 PM
  3. #3 posted by Ben Rogers (bcrogers at gmail dot com).

    I know. I'm saying you're having trouble doing these things, and you have the comfort of a database, which I've heard is more flexible than flatfile. I'm just mocking you, don't mind me.

    Saturday 6th November 2004 at 5:43:21 PM
  4. #4 posted by David (david dot s dot harrison at gmail dot com).

    Oh I see now, you meant to say this:

    Hahaha you have a problem that isn't even vaguely related to a database and you cannot solve it without a re-write!!! I am much better than you for not having a database.

    Is that what you were trying to say? Because that's just dumb.

    Saturday 6th November 2004 at 5:51:19 PM
  5. #5 posted by Paul Jr (prakoskejr at gmail dot com).

    See, this is how it is:

    Database == easier
    Flatfile == harder

    Ben is laughing because you're using a database (easy) and still having troubles, whereas he could make it work quite easily with his flatfile (hard) system. See? He is, in fact, mocking your ASP-coding ass!!!

    Saturday 6th November 2004 at 7:27:44 PM
  6. #6 posted by Bob (MonComradeBob at gmail dot com).

    Eek, I had a similar issue. I had gone the IE-style programming method of slapping more and more things on top of the code. Which resulted in a too-large and and confusing source. So I took the netscape route and rewrote it, this time incorporating all of my current features and plans into it. It's inevitable. If one plans to keep improving software, you've got to be prepared to rewrite. Now get off your lazy bum and code!

    Saturday 6th November 2004 at 9:44:25 PM
  7. #7 posted by Ben Rogers (bcrogers at gmail dot com).

    See? Paul understands. It's 'cuz he's not British. Grin Kidding, kidding. It's just that you'd think with all the information accessible with a string (rather than having to be parsed out each time) it'd be quite simple to manipulate it, and gain information from it, whereas with flatfile you have to be somewhat hackish, using file_get_contents(), unlink(), rename() and the such up the ying-yang.

    I'm considering doing some revisions to my blogware as well, but then I thought: What would I actually change? I'm considering doing as Bob suggested and converting to XML with a view.php file to get the file, and show it the right way, but I also like my PHP file for the entry, with headers, footers, and comments include()d, and my XML file for the comments, and I'm also thinking it won't be any better.

    Anyways, you really should plan everything out before the redo, don't rush into it. I can also say from experience that you shouldn't try to re-use code during a rewrite. Get a peice of paper jot down each and every function you want your script to be able to perform, type it into a document (I use notepad for this), then under each item do indented notes on it. Now, review it, get the idea of the system, try to find any flaws in it. Finally, split the functions up into pages, and then just write it out, as at this time you'll already know exactly what to do.

    Just some rambling ideas, that you probably know. It just seems you rushed through this version, so I'm trying to give you some ideas as to have the next version be better.

    Sunday 7th November 2004 at 4:43:44 PM
  8. #8 posted by Paul Jr (prakoskejr at gmail dot com).

    It isn't that he rushed into it, Ben, it's that he's coding ASP. Everyone knows that you can't code shit with ASP.

    Now if he had gone with PHP, then he wouldn't even have this problem.

    See?

    Sunday 7th November 2004 at 5:21:29 PM
  9. #9 posted by David (david dot s dot harrison at gmail dot com).

    My opinion of you is dropping Paul. Observe it dropping:

    if paul_jr="gay" then

    response.write "Well of course!"

    else

    paul_jr="gay"
    response.write "Hehehe."

    end if

    Sunday 7th November 2004 at 6:00:44 PM
  10. #10 posted by Schteel.

    just use C++ for everything. Watch and observe my cunning use of code:-

    #include <shitoff.h>
    void main(void)
    {
    char gay;
    cout << "Is david gay?? ";
    cin >> gay;

    if(gay == "y")
    {
    cout << "Well we knew that. Schmember. ";
    }

    else
    {
    gay = "y";
    cout << "You really are. You should have done PHP, idiot. Spchlack!!! ";
    }
    }

    Get the picture yet?

    Monday 8th November 2004 at 2:01:22 AM
  11. #11 posted by Paul Jr (prakoskejr at gmail dot com).

    Uh huh...

    Monday 8th November 2004 at 5:19:58 AM
  12. #12 posted by David (david dot s dot harrison at gmail dot com).

    Stop pretending you know C Adam.

    Funny though, I'll give it a schplack out of 10.

    Monday 8th November 2004 at 2:42:34 PM
  13. #13 posted by Ben Rogers (bcrogers at gmail dot com).

    Or, in PHP... <?php $paul = "ambiguous"; print ($paul=="gay")?"Paul is definetely gay.":"We aren't sure if Paul is gay.";?>

    Monday 8th November 2004 at 10:26:35 PM
  14. #14 posted by David (david dot s dot harrison at gmail dot com).

    Or as I would do it in ASP:

    response.write iif(paul_jr="gay", "Well of course!", "Hehehe.")

    Monday 8th November 2004 at 10:49:51 PM
  15. #15 posted by Rich.

    My entry in Matlab:

    if strcmp(paul_jr,'camp as elton john') then

    fprintf('Rocket man!!!');

    else

    paul_jr='camp as elton john';
    fprintf('Goodbye yellow brick road.');

    end

    Monday 8th November 2004 at 10:57:14 PM
  16. #16 posted by Paul Jr (prakoskejr at gmail dot com).

    Or, in English:

    Paul is not gay.

    How's that? *Insert eye rolling smiley that doesn't actually exist because DAVE hasn't made one*

    Tuesday 9th November 2004 at 1:15:21 AM
  17. #17 posted by David (david dot s dot harrison at gmail dot com).

    Smilies fall under Phil's jurisdiction, complain to him.

    Also, that script is flawed. Grin

    Tuesday 9th November 2004 at 2:03:14 PM
  18. #18 posted by Paul Jr (prakoskejr at gmail dot com).

    All right, I'll complain to Phil (*Snicker*) next time.

    No, my script is not flawed. Here:

    if script is not flawed
    yell script is not flawed you doodiehead
    or if script is flawed
    yell no it isn't you doodiehead
    if none of those then
    yell I'm confused

    See? :-D

    Thursday 11th November 2004 at 4:47:45 PM
  19. #19 posted by Ben Rogers (bcrogers at gmail dot com).

    WOW! That's AWESOME! I GOTTA GET ME ONE OF THEM BOOTS!

    Just thought I'd share. Grin

    Oh, yeah, hey, Phil. You SMELL, man. Take a shower. Then make a rolling eyes smiley, mmkay?

    Friday 12th November 2004 at 9:55:02 PM
  20. #20 posted by David (david dot s dot harrison at gmail dot com).

    Ben, have you injected yourself with crazy juice again?

    Saturday 13th November 2004 at 0:00:51 AM
  21. #21 posted by Paul Jr (prakoskejr at gmail dot com).

    "Crazy juice"? ... now, now, none of that talk around the children, Dave. You keep you and your crazy juice to yourself; no one wants to know.

    Saturday 13th November 2004 at 3:03:40 AM
  22. #22 posted by Ben Rogers (bcrogers at gmail dot com).

    PMSL. No, I have not done any of dem der boots... I mean, ah, crazy-juice injections. I haven't done any boots either, though... I don't think that's possible.

    ...

    HOO-HA!

    Thursday 18th November 2004 at 0:54:27 AM
  23. #23 posted by David (david dot s dot harrison at gmail dot com).

    Hmm, what the crap?

    Thursday 18th November 2004 at 0:55:47 AM
  24. #24 posted by Ben Rogers (bcrogers at gmail dot com).

    Ah, don't mind me. I was sugar high at the time, so, y'no, totally random reponse.

    *Resists urge to type "HOO-HA!" once again, fails.*

    Thursday 18th November 2004 at 9:12:01 PM
Site Navigation
Main Page
Past Blogs
Recent Comments
Serious Linkage
1976 design
autistic cuckoo
meyer web
mezzo blue
ryan brill
simple bits
stop design
stuff and nonsense
zeldman
Peer Linkage
some canadian guy
the hidden side
slightly remarkable
skinner a la mód
qstaircase
Web-comic Linkage
alien loves predator
bigger cheese
penny arcade
sinfest
questionable content
vg cats

39611 lockers tragically abused every year.