My Personal Transition Of Design And Programming Practices

This week I’ve seen a real transition in my own personal way of thinking towards design and development. Particularly with how it relates to the development of our online games. After just over 2 and a half years of programming full time, I’ve noticed some really key and distinctive transitional periods in my developing lifespan.

When I first started out it was a case of get it done no matter how or what and learn along the way. This particularly involved little planning, especially planning programming techniques around the design. I would hit hurdles and obstacles all the time, but being the pragmatic problem solver that I am, I’d find ways to jump them or ways around them (thank god for google). At this stage I took little to no notice of design as my css and general knowledge of design technique was so poor that I was stuck well within the table age.

Things quickly moved on and before I knew it all the problem solving had left a lasting imprint of php, html, css and ajax in my head. Enough to be competent (at least so I thought) but not enough by far to be the master. Not knowing that at this stage is possibly the biggest downfall I had. A bit like a guy fresh out of college with his honors degree and first job, I set off to change the world and make amazing looking websites. Uh oh, I might hear you say! Uh oh, indeed. Not long after I began to see my designs not really working out as I wanted or not functioning as well as needed and browser compatibility wasn’t great (I partly blame this on the comfortability and lovability of my new mac, making me not want to look at the far more popular windows based browsers. Damn you internet explorer!).

However I buckled up, hung in for the ride and got things working, with less than sexy solutions at times. After this I began to realise the importance of planning and careful structuring of code, so much so that I even started to do it myself icon smile My Personal Transition Of Design And Programming Practices This became especially important with the development of my companies online games. Massive code bases with hundreds of thousands of lines of code and files. Making use of functions, class’s and sub version made a massive difference to how we developed and maintained our code base.

Yet recently something more radical has changed than just the methods that we used to serve up a page to a player or user. I don’t now think about going in all guns blazing to make the ‘best’ looking website in the quickest time possible, as most of the time this isn’t possible. Im more interested in simple but effective design with clever and efficient coding beneath it. Especially so with our online text based mmorpgs, users are more thickle than you think and care less about the fact that it looks good, and more about that it works good. Simple designs tend to be more backwards compatible and also more compatible with the gathering pace market of mobile and netbook gaming. So generally I now tend to think a bit like google I guess, make it work good, make it look okay, but most importantly make sure the whole experience ‘works’ for the user.

So its interesting to see how I’ve gone from struggling to stay afloat, to swimming too hard and finally to staying calmly and nicely afloat.

I wonder if anyone else will have had some interesting personal development stories….

Mysql Dump Ignore Tables And Rsync To Remote Server

Not having had huge experience working with mysql dumping and rsync. This afternoon I was faced with the task of taking a backup of one our busy, very database intensive games using mysqldump command, but I also needed to exclude some rather over sized tables from the dump. After which I wanted to pipe over the mysqldumps to our remote secure testing server using rsync which id also never used before.

So the first things first I let our users know the site is going down in 5 mins I then sabotage our db_connect functions so that users a directed to a page with no connection attempts or db calls on it.

I then write the command to dump data and tables ignoring a few tables which id already flagged as potentially large and time consuming to dump.

My command looked a little like this:-

mysqldump -u username -p --ignore-table=database.tableA, database.tableB -B database -K > /path/to/outputfile.sql

With quite a few more ignores hehe but hopefully you’ll get the gist.

I then just wanted to dump the structure of the troublesome tables.

So I did something like the below.

mysqldump -u username -p database table1 table2 -d > /path/to/outputfile.sql

Notice the -d, this is very important as it signifies no data just structure.

Now I have my two files I want to sync them accross the our test area located on another server, this time using a rsync

I used ssh with rysnc and my final command looked like this.

rsync -a -e ssh backups/ username@server:/home/google/backups

Which simply took my backups directory on the server i was connected to already and synced it with the credentials entered here. Seemlessly and with all permissions etc carried over.

Now thus I had achieved what I needed to and all that was left was to load the files into the database for the test area. By simply:

mysql -u username -p database < /path/to/inputfile.sql