Sunday, January 22, 2012

Things every Web Developer wishes Web Designers knew

As a web developer I work with many web designers.  I have great respect for web designers as they can do things I couldn't.  I can code but I have no eye for design, I can spot bad design easily but I don't have the talent to create good designs myself.  Because of this I rely heavily on web designers in my projects.  However there are a few key things I rarely find that web designers can do that would help greatly in the smooth running of projects.  While web designers are artists they sometimes seem to forget that fundamentally they are working with technology and at least some basic understanding of the underlying principles of the technologies they use and the web in general is something that every web designer should have.

1. Source Control
Subversion, Git, Mercurial or whatever I would love my designers to be at least familiar with the basics of source control.  It makes collaborating on code and pushing out updates so easy that it is basically essential to any web project.  It's not very difficult conceptually so spend a day reading up on it to familiarise yourself with the basics.

2. How to set up a local dev environment
I know designers love their Macs but if you have bought a Mac it is essential that you know how to set up a basic dev environment in OSX.  If you want to dev locally and you have decided to use OSX it is absolutely the web designer's responsibility to know how to configure and use their own equipment.  I am quite willing to answer sensible/interesting questions about the setup but not questions like "I don't get it, can you do it for me?".  I have as much(or as little) interest in learning how to set up a MAMP stack as you do in a setting up a LAMP stack so don't expect me to waste time figuring out how to get a web app running under OSX.

3. Virtualisation
This is a must.  If you can't/won't figure out how to get the app you are working on running under OSX you must be able set up a virtual instance of the server to test/dev with.  Also for testing various versions of IE you are basically going to have to understand this.  It's not difficult to learn and can save hours of time and hassle and there are plenty of options out there for virtualisation.  I use VirtualBox, it's free and does the job but there are a ton of other programs out there that you can use too.

If as a web designer you can master these basic technologies you will find working with web developers a lot easier(as well as garnering considerable respect from them).  I don't want this post to come off as a rant but I strongly believe that if you want to work in the tech industry you must have a understanding and interest in the technologies that underpin your profession.

Thursday, November 3, 2011

Living in the cloud

These days many people own multiple internet enabled devices and it's becoming important to keep this data in sync across your phone, laptop, desktop and tablet.  This is not only necessary for convenience but also because the personal data, like photos, contacts and documents, is increasingly becoming a very big part of people's lives and backing this data up is essential.  Fortunately there are a bunch of services that make this super easy.  So here is a list of the best apps for simplifying your digital life and keeping all your precious data safe.

Email
What to use: Gmail
Gmail is awesome, email, contacts, phone calls, video conferencing, great search and lots more all from your browser.  If you're not using Gmail already you should be.  It's free to get a gmail address and access their services, you can even use your own domain if you don't want an @gmail address.  Also you get a massive amount of storage so you'll never need to delete an email, it also automatically filters spam and viruses.

What not to do:
Do not use the free email account(s) you get from your ISP.  Aside from making you look silly it's just bad practice to tie your email address to your ISP.  What will you do if you want to change providers or move?

Contacts
What to use: Gmail + Android
There is a lot of heated debate on the internet about iOS vs Android but one place where Android is definitely ahead of the curve is cloud services.  It integrates seamlessly with your Gmail, contacts and calendar.  So if you add a contact on your phone it is instantly in your Gmail account, likewise, if you add an event to the calendar in Gmail it will instantly appear on your phone's calendar.  If you lose, upgrade or reset your phone just sign in with your Gmail account and all your contacts, email and events will be there.

What not to do:
Don't keep your contacts all on a single device, like your phone, or spread across several devices with no centralised backup.  What's your plan if you lose your phone?  Also keeping your contacts centralised means you only need to make updates in one place.

Photos
What to use: Ubuntu One
Ubuntu One is great for backing up photos, you get 5GB free space and it will sync your files across Android devices and your computers.  The Android client has a great feature where as soon as you take a photo on your phone it is backed up to Ubuntu One and synced to your Desktop, Laptop and Tablet.

Unfortunately at the moment Ubuntu One is only available on Ubuntu(and its variants), Android and Windows.  So if you're on OSX check out DropBox.

What not to do:
Don't keep your photos on a bunch of poorly labeled DVDs.  First off it's a hassle if you want to look through your photos and they are spread across multiple DVDs.  Second, DVDs are a dead format, although they are still in wide use, they won't be for long(I don't own a single CD or DVD).  Thirdly, DVDs can degrade over time.

Files
What to use: Ubuntu One or DropBox
There are two options here depending on what you want to do.  Seeing as they both work in basically the same way I will outline the basic process here.  When you install the DropBox or Ubuntu One client it will create a folder within your home folder.  After installation any file placed in that folder will be automatically backed up to the server and synced to all your other devices.

Ubuntu One
For personal file storage I prefer Ubuntu One because of it's large free capacity and great Ubuntu and Android integration(as discussed previously). 

DropBox
For storing files you want to share with other people and work on collaboratively nothing beats DropBox.  It supports Linux, Windows and OSX.

What not to do:
Do not keep all your important files on a single computer or on random usb sticks and DVDs, it's annoying to maintain, not automated and prone to failure.

Bookmarks and History
What to use: Chrome Sync
This will sync your bookmarks, history, form data, etc across all your computers using your google account.  It's really easy to set up and works flawlessly behind the scenes.  Of course this assumes you are using Google Chrome as you web browser, if you're  not using Chrome already then get it now.

Documents
What to use: Google Docs
Google Docs is a full featured office suite inside your browser providing document, spreadsheet and presentation apps.  It also has amazing collaboration tools for real time editing of documents by multiple users.  Add version control, sharing and access control to this and you have one awesome document management system.  Admittedly the web interface isn't as full featured as Libre Office or MS Office but it is good enough for 99% of use cases.  You can always edit documents on your desktop and just upload them to Google Docs.

What not to do:
Don't just keep all your important documents in poorly organised folders on your computer.  Don't keep revising and re-sending documents via email, just add it to Google Docs and then give access to the person you want to share it with, they will even be able to see your changes in real time.

Books
What to use: Amazon Kindle
The Amazon Kindle Store is a great way to buy books.  They are cheaper, easier and can can be synced across all your devices and accessed from anywhere. It means you don't have to throw out your book collection every time you move to a different country and don't need to have bookshelves and piles of books cluttering up your house.

What not to do:
Whatever you want, I can't argue that I don't like the feel of a real book in my hands and in the right setting a bookshelf can look great but if you live a rather transient lifestyle like myself maintaining a physical book collection is not viable.

Games
What to use: Steam
Steam allows you to purchase games via their store and then install them locally to your computer.  The great thing about it is you can install Steam on any computer, log in and all your games are there.  This means no more game DVDs, remembering CD Keys etc.

What not to do:
Don't buy physical copies of games. They will often require you to have an optical drive and you will need to actually keep track of physical DVDs and CD keys.


The risks of cloud storage
While cloud storage is very reliable and hassle free it is worth remembering that your data is being stored on someone else's server.  If the company storing your data closes, stops service or experiences technical failures it is possible you will lose data.  Most free services provide a paid option which comes  with guarantees about data loss.  If this is a concern make sure you read the terms of service thoroughly.  

The hosting of your data on someone else's server also raises some privacy concerns so again if this is something you worry about make sure you read the terms of service.


Note: I am not bothering to mention solutions like Deja Dup or Apple's Time Machine as I believe they are unnecessary.  I like having a clean install of my OS and find it strange people go to great lengths to preserve their current install when 9 times out of 10 it would just be quicker to format and re-install(it only takes an hour).  If you are using an OS like Ubuntu that works out of the box, comes with everything from word processing to torrent clients pre-installed and has an awesome app store then setting up after a fresh install is no hassle at all.  Drive imaging backup tools only encourage people to stick with their slow bloated, years old installs.

Saturday, October 15, 2011

Install memcached with PHP on Ubuntu 11.04

Memcached is a great tool for optimising your website.  It can be used to cache commonly used data in memory for fast access.  This can help greatly in increasing speed, reducing DB load and scaling your site.  To find out more check out the memcached site here.

Here is a short guide to installing memcached on Ubuntu.  This is a guide to installing via the command line but if you prefer a GUI you can install via the Ubuntu Software Center.

Open a terminal(Ctrl + Alt + T) and enter the following:

sudo apt-get install memcached

sudo apt-get install php5-memcached

sudo /etc/init.d/apache2 restart


to test memcached is up and running enter:

telnet localhost 11211

if it connects you are good to go.
*Note to quit telnet enter Ctrl + ] then Ctrl + d then enter "quit" and hit enter.

To test that memcached is working with Apache and PHP see the instructions here

Friday, September 9, 2011

Install Humble Bundle on XBMC Live

I recently purchased the latest Humble Bundle and wanted to get the games working with my XBMC Live setup.  I have put together this guide for setting up Humble Bundle 3 games with your XBMC Live setup.  This guide assumes you are using the install files provided as part of Humble Bundle but should work equally well for files downloaded directly from the game website.

I haven't finished writing guides for all games yet but I will add them to this post as they are published:

Install Revenge of the Titans in XBMC Live

Install Steel Storm in XBMC Live

Install Braid in XBMC Live

Install And Yet It Moves in XBMC Live

Install Osmos in XBMC Live


Have Fun!

Install And Yet It Moves on XBMC Live

I recently purchased the Humble Bundle 3 and have been setting up the games to run on my XBMC Live Box.  Here is a short guide to installing And Yet It Moves on XBMC Live.

Step 1 - get the .deb file
Download the deb file from the Humble Bundle website.  You will need to transfer the deb file to the home folder on your XBMC Live box, my guide to using FileZilla to copy files to XBMC Live.

Step 2 - install the game
Open a terminal, see 3 ways to access the terminal on your XBMC Live box,  and enter the following.

sudo apt-get install libtheora0 libopenal1
sudo dpkg -i andyetitmoves_1.2.1_i386.deb

Step 3 - create launcher script
There are 2 ways to do this the command line way or the GUI way

The command line way:

mkdir scripts

cd scripts

nano andyetitmoves.sh

now paste in this:
#!/bin/bash
fluxbox &
/usr/games/AndYetItMoves
killall -9 fluxbox


Now press Ctrl+X and then Y to save and exit

chmod +x andyetitmoves.sh

The GUI way:
Using FileZilla create a folder called "scripts" in the home folder on your XBMC Box.

Download this file and copy it to the "scripts" folder.



Give the file execute permissions, first right click and then select "File Permissions".  Check all the "execute" checkboxes and hit ok.



Step 4 - Add shortcut to launcher
Now you just need to set up a shortcut to the game launcher script in the XBMC Launcher Addon.  Follow my guide to Add a Shortcut to Launcher Add-on in XBMC to create a shortcut for the new script file.

Step 5 - Fix profile saving bug
There is a bug in the config file of the And Yet It Moves installer so that your profile and settings will not be saved, to fix the problem do the following:


edit this file

~/.Broken Rules/And Yet It Moves/common/commonConfig.xml

and change "Company"  tag from "Broken Rules" to ".Broken Rules"

source ivl @ http://andyetitmoves.net


And that's it, you can now launch the game by going "Programs" -> "Launcher".

Install Osmos on XBMC Live

I recently purchased the Humble Bundle 3 and have been setting up the games to run on my XBMC Live Box.  Here is a short guide to installing Osmos on XBMC Live.


Step 1 - get the .deb file
Download the deb file from the Humble Bundle website.  You will need to transfer the deb file to the home folder on your XBMC Live box, my guide to using FileZilla to copy files to XBMC Live.

Step 2 - install the game
Open a terminal, see 3 ways to access the terminal on your XBMC Live box,  and enter the following.

sudo dpkg -i Osmos_1.6.1.deb

Step 3 - create launcher script
There are 2 ways to do this the command line way or the GUI way

The command line way:

mkdir scripts

cd scripts

nano osmos.sh

now paste in this:


#!/bin/bash
fluxbox &
/opt/Osmos/Osmos
killall -9 fluxbox

Now press Ctrl+X and then Y to save and exit

chmod +x osmos.sh

The GUI way:
Using FileZilla create a folder called "scripts" in the home folder on your XBMC Box.

Download this file and copy it to the "scripts" folder.



Give the file execute permissions, first right click and then select "File Permissions".  Check all the "execute" checkboxes and hit ok.



Step 4 - Add shortcut to launcher
Now you just need to set up a shortcut to the game launcher script in the XBMC Launcher Addon.  Follow my guide to Add a Shortcut to Launcher Add-on in XBMC to create a shortcut for the new script file.

And that's it, you can now launch the game by going "Programs" -> "Launcher".

Install Steel Storm on XBMC Live

I recently purchased the Humble Bundle 3 and have been setting up the games to run on my XBMC Live Box.  Here is a short guide to installing Steel Storm on XBMC Live.


Step 1 - get the .deb file
Download the deb file from the Humble Bundle website.  You will need to transfer the deb file to the home folder on your XBMC Live box, my guide to using FileZilla to copy files to XBMC Live.

Step 2 - install the game
Open a terminal, see 3 ways to access the terminal on your XBMC Live box,  and enter the following.

sudo apt-get install libsdl-net1.2
sudo dpkg -i steel-storm-burning-retribution_2.00.02818_i386.deb

Step 3 - create launcher script
There are 2 ways to do this the command line way or the GUI way

The command line way:

mkdir scripts

cd scripts

nano steel-storm.sh

now paste in this:

#!/bin/bash
fluxbox &
/opt/steelstorm/steelstorm -basedir /opt/steelstorm
killall -9 fluxbox

Now press Ctrl+X and then Y to save and exit

chmod +x steel-storm.sh

The GUI way:
Using FileZilla create a folder called "scripts" in the home folder on your XBMC Box.

Download this file and copy it to the "scripts" folder.



Give the file execute permissions, first right click and then select "File Permissions".  Check all the "execute" checkboxes and hit ok.



Step 4 - Add shortcut to launcher
Now you just need to set up a shortcut to the game launcher script in the XBMC Launcher Addon.  Follow my guide to Add a Shortcut to Launcher Add-on in XBMC to create a shortcut for the new script file.

And that's it, you can now launch the game by going "Programs" -> "Launcher".