The last couple of weeks have taught me that I’m not a natural web coder. For one thing, my grasp of PHP/javascript is really pitiful. It goes deeper than that, though. I’m a command-line script guy. I like to write clean code with short, discrete subroutines, type “program_name file_name”, sit back with a coffee and wait for a CSV file to pop out.
In a web application, you write an awful lot of code – most of which either (a) checks user input for errors or (b) makes things look pretty. The underlying algorithm is only a small part of it. On top of that, you have to imagine what users might want to do – unlike a set of linear procedures, they might want to go back, or forward, or jump in the middle. So you need a picture of the whole working site in your mind. For some reason, good coding practice goes out the window when I write web code. I forget to declare variables, or include checks for missing values. I copy/paste the same code with different variables multiple times, instead of writing functions. In short, I find it hard.
That said, I have a mostly-working web application which should see the light of day in the new year, so stay tuned.


