From the blog

Welcome to the blog, I tend to blog about work related things, so you'll often find useful snippets of code for Wordpress amongst other things.

Do’s and do nots of business websites

Earlier today I decided to have a little think about what makes a business website great and what, well, really doesn’t! The very first thing I thought was it’s, making a wonderful looking website, so wonderful infact that all your clients will immediately be like woah these guys really have talent, I want my site designed by them. Essentially this is a good way of thinking or at least the correct mindset. I’m sure that, I’m not alone in thinking this! However, there’s a little more to a wonderful website than it’s cover. As the sayings go “beauty is only skin deep” & “you cant judge a book by its cover”.

So what really does make a wonderful, purpose serving business website? Good question.

Here are some Do’s and Do Not’s from my own personal experience and view.

Do’s

  • Do make your new site look really eye catching, but more importantly remember the user experience. Don’t make it so eye catching and out there that the average client or onlooker is immediately put off, and won’t bother to find the information they want. Make sure navigation remains simple, nice menus rather than hidden buttons and links. Remember if you look at alot of the most successful websites used by the biggest base of users out there, most of them won’t have any massively out there or exciting UI. They will all have basic, easy to remember, easy to use UI and thats important to remember! Users are thickle and generally make there mind up about a site in the first minute of being on it.
  • Do make sure you don’t hide important information behind too many pages of link depth, users will not want to siv through to much stuff to get to what they want.
  • Do make sure you don’t forget thats its all very well having a nice new site that utilises jQuery or other javascript language to minimise the amount of pages you have in your website, but remember the consequences of doing so. Less content to be ranked, less pages to be indexed and altogether less chance of search engines picking up your site well (this particuarly applies to small businesses, intending to rely on search engine traffic to drive business).
  • Do make your unique selling points readily available.

Do Not’s

  • Do not Hide important information about who you are behind, to tricky or clever UI.
  • Do not hide information that you want a client to see at all, make sure they are confronted as early as possible with the information.
  • Do not make UI’s to clever, that anyone but the designer will struggle to know what to do.
  • Do not make the entire website based on one page (if you wish to rank well for numerous things in search engines).
  • Do not play any annoying sounds on load of your homepage or any other page, a customer who is confronted with loud sound all of a sudden is likely to first port of call close the browser window, that plus its just plain annoying.
  • Do not bury contact forms and ways to get a quote behind a form asking for an information overload, carefully design it so that you get exactly what you need to a minimum.
  • share save 171 16 Dos and do nots of business websites
Tagged: Leave a Comment

Opening Up For Advice

Over the last year I’ve been constantly if not more than constantly trying to ask myself, are we doing things the right way?

There are a million and one different ways to accomplish some of the tasks we undertake on a day to day basis.

Preferences are always going to change and perhaps there is not one best method of practise at all.

Im trying to open myself up here to ask anyone in the context of my company and I, what the next step could be.

We build lots of text based games, driven by simple php and mysql, php = mixture of functions and classes. I generally don’t like the idea of php frameworks for use with game design of this type, as games quickly grow code base hugely and you get the annoyingness of extra overheads in load time. However im very much open to new ideas as to how we could improve code. Maybe a new language, or maybe a different approach.

I wondered really if anyone out there has built a complex game on anything other than there own custom php code and mysql (obviously in the context of text based, browser based games and improving on php).

Also we do alot of client work, nice designs, baskets and checkouts all the usual stuff. Does anyone use a particular framework for similar things and found its really good? We spend far too much time repetitively coding things like checkouts and baskets for each customer.

Ideally its all about taking things up a notch and what could improve what we do.

I’d also like to know if anyone uses any particularly good checkout bundles or companies, to manage all there payments really easily. Ours is very disjointed atm. With payments for different sources ie mobile, card etc all being taken by different companies.

share save 171 16 Opening Up For Advice
Tagged: Leave a Comment

Connecting To Server With Putty Using SSH Keys & Port Forwarding

Quick and dirty tutorial to connecting to a remote server with ssh keys and putty.

Firstly you need to download putty and puttygen which can be found:-

Here – Putty Client
&
Here – PuTTYgen

Yes they are both the same page, you will find the download links for both here.

Once you have downloaded both the clients you will need to first generate yourself a key using the puttygen and then save it out to a file in a location you will easily be able to remember. Remember you need to generate a public and private key, but the private is the one of most use to you.

Im going to largely breeze over adding your ssh key to the server, as you should really know how to do this already before attempting to use putty with ssh keys and port forwarding.

Open up putty, enter the host as whatever it needs to be either an ip address or a host name like google.access.me.com and specify the port as 22 if it isn’t already.

Then head down on the left hand menu to the SSH list which will probably be shut, click the plus to expand the list and head to the AUTH tab. Here enter the user you want to auto login with and specify the path to your key using the browse file function.

If all is correct head back to the “session” tab and move to the right hand side, and save your settings under any name you like, this is to ensure that you can pick up where you left off when returning to the same connection again.

Now you have done that hit open and you should with any luck either be presented with a enter passphrase for key authorisation, enter that and youll be in.

Port Forwarding Mysql From Remote To Local

Should you like us sometimes want to dev locally to a remote database, Putty can be used to tunnel a mysql connection from a remote server to your local mysql port. To do this in most cases simply forward the following or well at least for me.

Navigate to the following.
Connection -> SSH -> Tunnels -> Options Controlling Port Forwarding

L 3307 port destination to
the remote database.
remote.db.name.net:3306

Add that in, head back to session save it and then open it and wollah you should now be able to dev locally to the remote database, by forwarding mysql to your local ports.

This is just a quick and dirty tutorial and not meant to be a fully comprehensive guide, however if theres something you want to know I may be able to help, so leave a comment.

share save 171 16 Connecting To Server With Putty Using SSH Keys & Port Forwarding
Tagged: Leave a Comment

Simple Directory Protection with .htaccess

To deny access to a folder or directory, simply create a new .htaccess file inside that directory.

Then depending on the authorisation type you want to use you can make rules to allow or deny access.
View some examples below.

Allow by Ip

order allow,deny
allow from 85.189.58.21
deny from all

This denys anyone not on ip 85.189.58.21 access to your folder.

share save 171 16 Simple Directory Protection with .htaccess
Leave a Comment

PHP frameworks CodeIgniter, Zend & Symfony

Lately I have been considering PHP frameworks and using them to speed up development of small projects, whilst also considering the MVC (Model, View, Control) approach. Most people looking for a PHP framework seem to stick with CodeIgniter, Zend or Symfony. Each with there own advantages and disadvantages. Which one is best is all down to personal taste and its very difficult to make an educated selection of the framework thats best for you. Its baffled me infact, that I can’t put my finger on the framework that I think works for me the best.

So I plan to try and develop a small project in each of these frameworks and decide after that which one I think is the best for me.

For more complex sites, I will continue to use my own custom framework as it helps to keep down page load speeds and ease of understanding.

Check back here over the next month or so, to see what I get up too. As I will be posting all about my experiences with the frameworks.

share save 171 16 PHP frameworks CodeIgniter, Zend & Symfony
Tagged: Leave a Comment

Keeping Your Apache Server Name The Same

Just blogging this for future reference:-

Using several aliases on the same domain and keeping the same apache server name for all can be achieved by entering this into the apache config for the vhost.

UseCanonicalName On

If you wish to let Apache select your server name automatically the default in most configurations of apache is set to:-

UseCanonicalName Off

share save 171 16 Keeping Your Apache Server Name The Same
Tagged: Leave a Comment

Link MAMP & mysql to mac os x terminal

Last night I trawled the internet trying to find the answer to how to hook up my mac os x terminal to my mamp mysql using the > mysql command in the terminal.

For mac os x 10.5.6 Leapoard users this command worked just fine.

sudo ln -s /Applications/MAMP/Library/bin/mysql /usr/bin/mysql

I also noticed attempting to use the mysqldump command resulted in this error: “-bash: mysqldump: command not found”

To solve it cd into “/Applications/MAMP/Library/bin/” and run the same command and you’ll have much better luck icon smile Link MAMP & mysql to mac os x terminal

share save 171 16 Link MAMP & mysql to mac os x terminal
Tagged: 1 Comment

Recursively delete .svn folders from a folder or directory

Use this simple command to find and delete .svn subversion folders from within a folder or directory using mac linux terminal command line.

find ./ -name ".svn" | xargs rm -Rf

Example with folder path
find ./images/ -name ".svn" | xargs rm -Rf

share save 171 16 Recursively delete .svn folders from a folder or directory
Tagged: Leave a Comment

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….

share save 171 16 My Personal Transition Of Design And Programming Practices
Tagged: Leave a Comment

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

share save 171 16 Mysql Dump Ignore Tables And Rsync To Remote Server
Tagged: 4 Comments