Evening denizens
I've spent the last two days ploughing through some of the lousiest code I've seen in years
To be fair, the chap who assigned me to this bit of work did say at the start that it might be best to throw it away and start again - this I have now done
I've already worked out how to replace about three hundred lines of the existing PHP with two SQL queries. Given that the PHP was doing the same thing by constructing lots of little SQL queries, iterating over the results at each step to work out how to get the next little SQL query built, it made sense to just get the database to actually use its selecting, sorting, filtering and aggregating functionality to do the same thing
I think I'm running at around one character of SQL to one line of PHP replaced at the moment
Anyway, it's chucking out time. Being a small company, one can only stay as late as the last keyholder, and they all seem to have this peculiar obsession with work-life balance which is totally unhelpful to a contractor working out of reach of home
Still, home tomorrow - I'll have quite a bit of catching up to do here in TPD
I've spent the last two days ploughing through some of the lousiest code I've seen in years
To be fair, the chap who assigned me to this bit of work did say at the start that it might be best to throw it away and start again - this I have now done
I've already worked out how to replace about three hundred lines of the existing PHP with two SQL queries. Given that the PHP was doing the same thing by constructing lots of little SQL queries, iterating over the results at each step to work out how to get the next little SQL query built, it made sense to just get the database to actually use its selecting, sorting, filtering and aggregating functionality to do the same thing
I think I'm running at around one character of SQL to one line of PHP replaced at the moment
Anyway, it's chucking out time. Being a small company, one can only stay as late as the last keyholder, and they all seem to have this peculiar obsession with work-life balance which is totally unhelpful to a contractor working out of reach of home
Still, home tomorrow - I'll have quite a bit of catching up to do here in TPD
Comment