During the past nine days I have been working on a new spec project that has pretty much taken all my working time. While I know enough of different programming languages to at least get an idea of what they are trying to do, there are only a few I really know well. PHP is getting to be one of them. In nine days, 55 files in 20 folders, just over 2000 lines of code that is a mix of PHP, HTML, CSS and a few INI files, not to mention the INI files that get generated in the site itself that I am not counting, working on this seven days a week so far I am averaging around 224 LoC per day of mostly debugged code.
It seems that after doing a lite search on the internet that this is not the best metric to use but it is what I have. The "average" Loc per day for PHP/HTML/CSS seems to fall somewhere between 50 and 500 LoC per day so I seem to be in the middle ground of this maybe useless metric.
I have noticed that my "style" of programming has changed. What I used to do in the past was get everything "working ugly", that is functional but oh so very not pretty and then try to make it look pretty while breaking/fixing things along the way. I would try to layout all the DB stuff in advance and then when I need to add a field it would break so many other things.
At some point in my life it was mentioned to me that one of the great authors would write a paragraph, tweak and tease it until it was, at least in his mind complete and done and then move on to the next paragraph. The book was written this way. While searching for who it was I could not find a name to match to the style of writing but this is pretty much how I am coding now. Well, maybe by the page not paragraph.
I start with what the page will be doing, make a functional version of the page and then do all of the CSS/prettying to make it look good while keeping it working and making sure that nothing else that was done prior still works and looks good so it is about a 50/50 split between code and debug. The funny thing I did notice is that some of the pages have almost half the code being catching user errors and returning the error along with the existing data so it can be corrected.
I would be guessing that I am about half way through (many more pages but simpler pages that "should" be quicker) but I may or may not be done in another nine days as my todo list keeps getting longer as I think of things to add, maybe the developer should not be the one driving the project, I might be worse than a customer to myself. I am also using flat file database at the moment and I know that will have to change in the future but it "shouldn't" be too bad to make the changes for multiple databases will it? LOL.
Had I started this project with the knowledge I now have I know I would be farther ahead than I am now but this is what happens when you are learning on the fly, as I usually do in life.
Time to get back to the code, it won't program itself. Yet.