A Caffinated Morning

Apparently staying up till 2am isn’t as easy as it used to be. I am working on the project for the DesignerGuys, and it’s going either really well, or not well, I’m not sure which. The majority of the work should (should) consist of 6 pages that are virtually identical in function and content. I’ve built one of these pages and once I get an ok from the people in charge, will just copy it another five times over… But there are other things that keep on appearing on the TODO list, like summary reports, permissions, etc, that are worrying and stressing me out.

I got a lot of work done last night. Got home, watched a bit of Survivor, did some code, head to do some shopping (go Save on! Open till midnight!), then back for work. While there is a lot of code left, it seems like it’s coming really easy. Write a simple authentication page, a generic cookie routine or two, and suddenly the big “Authentication on all pages” item on the list goes away. Sorting, just add a couple of HREFs with col= and order= parameters, grab those in the generic display function and voila, the “ All fields must be sortable” item is ticked off. Write a quick error handling routine and there is all my error handling dealt with. The big question is do I try to do things the smart way and write a way to display all 6 pages from one cgi, or literally cut and paste 5 times. I’d like to go with the former, as the amount of work for maintenance would be greatly reduced, but the pages are just different enough that the page would be just chock full of ugliness. I’ll have to think of it some more though….

We have having some people over tonight, and Saturday I’ll be off at the Northwest Linux Fest so late tonight, Saturday night and all Sunday is the time left, and I’m still undecided if that’s enough or not. It’s not a hacky as I originally thought, as going back to pure perl CGI from templating toolkits like embedded perl was a bit of a shock, but it seems fast enough, and is going to have all the elements they are wanting.

Needless to say, this morning consisted of tea and coffee via IV drip. Felt right at home reading ASR quotes as well. Just hope I can stay awake all day.

4 Comments on “A Caffinated Morning”

  1. why not pass it a ?section= parameter, and throw some templates into an .inc file? that way, you can set up the one file to be something like this:
    include($section . “open.inc”);

    include($section . “close.inc”);

  2. It’s not the display of the page itself, but the code within it. IE: The save from page A has to write item foo,bar,baz to the database table qux, but page B has to write (and validate) items barf,zool, and wiki to table blah.
    I could write a big ass data structure that defines each page, the fields on it, the table it uses, the validation methods, and error messages, and then write an engine for that, but I have to think and figure out if it’s not just easier to do it the old fashioned way. At this point I want it done as quickly as possible ๐Ÿ™‚

  3. Hey, we used to be good at:
    $ for i in “bar foo maki mor”; copy boiler-plate-code.cgi $i.cgi; vi $i.cgi; done

  4. That’s exactly what I’m planning to do, just need to make sure that the code to copy is good/complete before I do that ๐Ÿ™‚