*Geeky, possibly loooong and boring post ahead. You've been warned*
When you blog about work, you've got to be very careful. This is the Internet, people! It doesn't take much for your boss or your client to type in his name and see what you're talking about. Which is why its a good idea to hide yourself by changing names ever so slightly. People I know will probably know who I'm talking about here, which is good, and the person in question (although I believe would never be smart enough to actually look this up, but I'm being careful) is Dwayne Rooks. (Yeah, yeah, I know, that name sucks.)
I've done a lot of web design programming work for this fella, which has got me quite a bit of money, brought me lots of hassle, and been the cause for me to have lots of stress and hairloss, even at my age. But still, its good experience to continue working, because its helping me with my programming, its getting me money, and it's something good to put on my CV and my Personal Statement. More recently, he's been contacting me to do little smaller jobs, aside from the main work I do for his website, on some of his other websites. And incidentally, I haven't programmed these. As any programmer probably well knows, taking over someone elses work.... is HELL ON EARTH. I see some of the things people submit to
The Daily WTF, and I think to myself, "Yep, I know that terrible, terrible feeling." What makes it all worse is that my client, not knowing of programming thinks that all code is the same. If its PHP, its PHP. But gawd almighty, this code is attrocious. And more the point, it was written by his brother, who is learning how to do web design, and web programming. But I can so easily tell that this code once was at some point wripped from a tutorial, tweaked, and added to. Parts of the code are full of these useful comments like "This part of the code prints out the Weekday headers, as long as the loop isn't on Row#1", and then the rest of is just a bunch of mangled crap. No wonder the original author couldn't add this feature to the code, since not even he can understand what he's put in this piece of shmit.
When I write code, I tend to restrict myself to a rather strict style, which keeps it constant, easy to read, and most importantly, maintainable so that if I, or someone else (like in this case) were to come along, they could pick it up, skim through it, and go, "Ah yes, of course - thats what they're doing". But, no, I find myself looking at this code, with a blank expression on my face, saying "WTF?" to myself over and over again. On coding styles, when I'm picking at someone else's work, I try and work out their style, and adapt to its style. But, no, this has no style. Not only does it mix and match between millions of different styles, in places, it doesn't have anything. Whitespacing is always important to help you learn where If, while, for, etc statements begin and end. Having them start 16 columns in, and end on 78 columns... DOES NOT HELP, DAMN YOU!
My biggest trouble with the case in question was the job was oh so simple. Well, at least the premise was. Basically, we have a calendar. And write now, the calendar is set up to change the background colour of the cells on the dates that a villa was booked on. And the change I had to make was to colour the first cell red, and the last cell yellow, of each booking. Simple, ey? Yeah, thats what I thought. Thats why I said, "Sure, no problem, Dwayne. I'll have it done in 15 mins or less." Of course, that was before looking at the code. Anyway, an hour later after dubious debugging attempts, I finally fixed the problem.
There is just no limit to the crapness (if that's not a word, it is now!!) of the code. The original programmer obviously never heard of booleans, or fundamental topics like while loops. And its painfully obvious most of this code was stolen elsewhere to use in this program. I don't see any problem with taking code (as long as you're allowed to, of course) but only, ONLY if you can actually understand it. Don't put something that you dont know what it does into your system. I could not control my anger at how stupid some of the mistakes were in this one file. And that was before I even got to look at the supposedly "Valid HTML 4" in the code.... which was complete BS.
*Sigh* Anyway, rant over. Problem solved. And I don't get anything for doing either. Jeeze, I'm severly being ripped off. *Cries*. I have to keep relations high with Dwayne though, being the main provider of work sources for me, which of course, is the source of all things grand: money. Pretty much every website I work on these days are Villa websites, and 99% of the time, for Orlando. It's all pretty similar, which is a bugger, because people like Dwayne think I can just pick up a current website, copy it and change two things to make it a new website. Not only do I not like doing that because it means you miss out a lot, its also incredibly hard to maintain, and not very suitable. Sure, I've done it, and I can do it again. But I don't like doing it!! And thats bad!
Okay, okay, the rant really is over now. On to other topics, where is everyone tonight? Not many people on MSN Messenger, and those that are all away or something. I got no one to talk to! My playing on Star Ocean 3 has slowed down a bit, because I've got to an area with uber-difficult monsters (yeah, just the monsters are difficult, let alone what the bosses are going to be) so I've gone back to a previous area to train up my characters. Everyone of them has reached Level 25 now, but I'd like to make them ALL 28 before continuing on into the Ursaa Lava Caves. And that's difficult, because I have 6 party members, and obviouslly I can only fight with 3 at a time. I always play with my main character, Fayt, which is why he's already on Level 28. I'm usually forced to bring along Nel, so that she can heal everyone, especially when these monsters are dealing in big damage. So, the remaining character I have to decide between Cliff (who I like because he has big attacks), Maria (who I like because she has a gun), and Albel (who I like because he's voiced by Crispin Freeman!!). And no, that Roger Huxley dude who has a tail doesn't even cut it. He's still Level 8, and he'll probably be that way all the time - gawd, he's an annoying SOB.
axeman2002 still has my Metal Gear Solid 3, so I hope he's gonna get that back to me sometime soon! Gah! My driving instructor leant me copies of Star Wars Episode III and National Treasure (both of which I've seen in the cinema) to watch until I next meet for my next lesson on the 9th of August. I've also been watching a lot of other stuff. I finished watching Wolf's Rain, which was great - the original ending in #26 was crap, so I'm glad that the Ending Ending in episode #30 finished that off nicely,
but it was pretty sad that pretty much everyone died.... first all the humans, and then Toboe, and then the rest of the wolves, until only Kibe and Cheza remained. I've also watched a bit of Bleach (Damnit, Byakuya looks like a girl!!) and I've started watching the first episode of Beck (and heheh, the bits where they are speaking English makes me laaaaauuuugh out loud. They sound like drunken gnomes with lisps!!!). I also got around to watching Samurai Fiction, starring Tomoyasu Hotei, which was fun! Anything else to say? Nope, I dont think so. I've written too much already, so I'll be heading off... and since there is no one online.... it looks like I'll go and watch something else! Goodnight, world!!
PS: I sincerely hope I can get my LJ paid acconut back soon, hopefully tomorrow, to restore the features I'm missing out on. *I miss my icons* Niehaha! (I'm mad, I admit it!)Sorry, I got bored and had to write some more to keep my boredom from elevating into wanting to kill, y'know. Anyway, I never quite made that 3000 song target I was aiming for, mainly because I was too busy downloading other crap. According to musikCube, I have 2832 songs, which marks me 168 off... which is probably, what, 12 maybe 13 albums. So I guess it was pretty unlikely that I'd make the 3000 song target. Although considering I did start the month with approximately 2200, I have managed to collect a nice number of 680-odd songs. Mainly from soundtracks this time around, but there was a few music albums too. Speaking on music, I bagged myself a nice new piece of software for my music. I've been using iTunes for a while, and its nice, and the podcast feature is terribly handy, but, it suffers from a big problem of overusing all my memory. (And so does Firefox, for that matter.. gah!). I have several requirements for an MP3 player which made the finding of one pretty difficult. Firstly, and most importantly, it must work with, or have a plugin for
Audioscrobbler. Secondly, it must work as a Music library, so it can organise my entire +15gb collection. It must also have a nice interface, feature a ratings system for songs, and work with MSN Messenger's "What I'm listening to feature". It also has to work with FoxyTunes... in other words, a pretty specific set of requirements I have. It'd also be nice if it'd play AAC files, because I have about 30 of those, and some of which are my fave songs (*cough* Jimmy Eat World *cough* - don't ask why I recorded the CD in AAC format, just blame iTunes). musikCube has all these features... and hardly takes a bite out of my memory. Although on the core, it doesn't have much, plugins enable me to feature in MSN Messenger, support AAC (and incidentally, other formats too), a plugin for Audioscrobbler, and theres even a plugin to import all my ratings from iTunes into it's library which saved me about 100 hours of work! Whats groovy about it, is that the dynamic playlist option (much like iTunes) is built using SQL-like statements, for instance, my first created Dynamic Playlist, "My Top Rated" has the following WHERE statement: "rating > 4 AND artist not 'AC/DC'" - yeah, I don't like listening to AC/DC too much anymore.
Wow, I sure do write about a lot of boring crappy stuff. I should stop now, and try and find something to do, before everyone else I know dies from boredom, or of course, gets elevated to the state where they are wanting to kill. And as Gene from Kiss says, "THAT DOES NOT ROCK!" So, I'm off. Again. Hopefully for the last time.Just backtracking a little, heres an example of some of the code I was forced to maintain. *cries and whimpers*. I guess this wont mean a lot to some of you.
if($month == 1) {$daymaxl = 12;} else {$daymaxl = $month - 1;}
for($row = 1; $row <= 7; $row++) {
for($col = 1; $col <= 8; $col++) {
if(isset($_GET['id'])) $id=$_GET['id'];
$query = "SELECT * FROM booking";
$result = mysql_query( $query ) or die ("didn't querry");
//see if there's an EXACTT match
$num = mysql_num_rows( $result );
if ($num>0)
{
$ddd=($dom[$daymaxl - 1]) + $dayno;
$mmm=phpdate($year, $month, $day, "mmmm");
$yyy=phpdate($year, $month, $day, "yyyy");
$curser=0;
$Color="";
while($curser<$num)
{
And amongst other terrible attrocities, the programmer in question has a terrible habit for using the function,
mysql_result constantly, instead of something nice and simple like mysql_fetch_row into an array, which of course is not only about five times quicker, is also far easier to use. Some people, ey? Sheesh! (I have my suspicions that the original programmer didn't know how to use arrays, or even what they are). Oh, and of course, they use "SELECT * FROM", rather than just selecting the two fields out of the 14 to use. More waste. Oh, and you might also notice some bad spelling mistakes, like $curser, and querry, etc. I have to put up with that from both the programmer and Dwayne.Arrrr, this Shenmue inspired movie gives me the gigles:
Shenmue, and while you're at it, check out some of the other
Mega64 movies, the Metal Gear Solid one is pretty cool too.