Journal

Simple Disjoint Image Swap With JQuery

Having spent a good 9 months intensively studying PHP and gettting to a pretty good standard, I'm onto Javascript now, specifically jQuery. Despite the many awesome and tempting effects, I'm starting at the beginning and solving the kinds of problems that you come across in a typical web project. Here I document how to perform a basic disjoint rollover or swap image. This script will allow you to hover over a thumbnail and display a larger preview of that image. Continue reading...

Changing Textmate Key Commands

I've found it a little annoying that Textmate's default key commands for switching tabs is different from that of Safari and Firefox. Textmate defaults to ⌥ ⌘ ← and ⌥ ⌘ → whereas the browsers are ⇑ ⌘ [ and ⇑ ⌘ ]. Every time I have to move my hand to the cursor keys it slows me down and is less comfortable. Strange then that it took me so long to get around to changing Textmate's defaults, particularly as it's so straightforward. Continue reading...

Free 100% Cross Browser 2/3 Column Layouts

A couple of months ago I put together two cross-browser, pixel-perfect two and three column fixed width layouts. I'd found that when slicing Photoshop comps at work that the YUI Grids Framework was just too inflexible when having to specify precise widths. YUI sets everything in ems so you have to calculate widths. In fact you need to calculate twice as IE requires a different value. Continue reading...

Is There Such a Thing as a Simple Web App?

As a professional development exercise over the last couple of weeks, I've built myself a new blog using the PHP5 framework I've been putting together. I was getting a little frustrated with Wordpress and my reliance on the plugins of others. Inevitably they break after one of Wordpress's many critical security updates. What initially started as a small project with intentions of simplicity quickly grew into a fairly complex application. It's difficult to launch a modern web application of any sort without a level of complexity and it seems that managing that complexity is one of the skills of application development. Continue reading...

Custom Block Widths with YUI Grids

Having just started my first job as a professional web developer, I'm now trying to integrate some of the site building techniques I've learned into the company's way of working. Something I've not done before is to slice up Photoshop compositions (I'm a programmer) and turn them into nice XHTML/CSS sites. For site structure I use Yahoo's User Interface suite, a highly researched, optimised and cross-browser set of tools designed to increase productivity for basic site structuring. However, it needs a bit of customisation to build sites that are not within one of Yahoo's standard bundled templates. Continue reading...

Making Zend Framework Applications Portable

I recently put my first Zend Framework application onto my Slicehost slice only to be greeted with the inevitable pages of errors generated by not found pages and the like. Clearly this wasted the time I value so much and so I thought I'd write a few notes on how to avoid this if you are transferring applications to production servers. Continue reading...

Syntax Error When Creating XML/RSS Views

I was recently trying to render an XML view in the Zend Framework for an RSS feed but couldn't get past a syntax error generated on line 1 of the XML view file. The answer is to turn off short tags in your PHP config file This is good practice anyway as if you use short tags you reduce the portability of your code. It was a frustrating one and took me longer to figure out than I would have liked, mainly because I thought it was me using the framework incorrectly! To solve this, simply turn off short tags in your php.ini. Continue reading...

Finder Button to Show/Hide Hidden Files in OS X

I recently found Henrik Nyh's cool 'Open in Textmate' script which includes the ability to be added to the Finder toolbar in OS X. I also often find the need to show hidden files in the Finder and run Shane Duffy's AppleScript to do so. I though it would be great if I could have the 'ToggleHiddenFiles' script as a button on the Finder toolbar too so I created one. Continue reading...

How to Code a Web App?

I've hit a bit of a problem with my study of PHP. Over the last 3-4 months I've become well up to speed with the syntax and understand the theory of object orientation. However, when I'm sitting in front of a text editor's blank page, I have no clue on how to go about building a well coded, extensible web application. Continue reading...

Simple PHP Twitter Status Badge

The concept of learning by doing is one I firmly believe in. The intention of 'rolling my own' blog is that inevitably I will happen upon and have to overcome many typical programming problems as I implement new features. One such problem was how to add the 'latest Tweet' feature that the twitterRSS plugin solved on my old Wordpress blog. Continue reading...

Frameworks - The Advancement of Technology

I've been thinking a lot lately over the best approach for learning PHP. I don't mean the syntax, there's only one was to learn that, but the learning that takes place through the practical application of techniques that ultimately results in a well designed web application. One of the strengths of PHP is its shallow learning curve and a basic application (typically usable by only the author) can be knocked up very quickly with little experience. Continue reading...

Media Temple's Grid-Service Not That Good Really

Whilst optimising the code for my site I learned a few interesting things about my host Media Temple's Grid-Service (gs) product. The upshot of it all being that I don't think it's very good. I hear nothing but praise for their (dv) dedicated virtual servers but Grid-Server? To test I put on a Continue reading...

Speed Up Your Site - Compression

Continuing with my mini-series on website optimisation, probably the single most important factor a fast loading site will have is a lightweight footprint. The more data the server has to send to the browser, the higher your bandwidth usage will be, the harder the server will have to work and consequently the slower your site Continue reading...

Speed Up Your Site with Image Sprites

Reducing HTTP requests is a great way to decrease the load time of your site without sacrificing any of the content. Each and every component of your site be it a HTML file, image, or external CSS file requires a HTTP request to fetch the data. HTTP requests take time so the fewer of them you have, the faster your site will load. Continue reading...

Guide: Audiophile Quality Sound for Student Dollars

Over the last couple of months I've been testing a new breed of budget sound system based on a Trends Audio TA-10.1 Class-T amplifier, a Moodlab Concept zero oversampling digital to analogue converter (DAC), and iTunes. This $400 (+ speakers) combo completely outclassed my $1400 Rotel RA-01 amp and RCD-01 CD player and made me remember why I love music so much. Continue reading...

Setup Guide for MAMP, Parallels Desktop and Wordpress

There's a large community of Mac web developers using MAMP as their development environment of choice. For the uninitiated, MAMP is an integrated web development solution combining Mac/Apache/MySQL/PHP into a single, easy to install and well featured package. Through some extensive research into Mac web dev environments, I believe that MAMP is an optimal solution. If you want to change or add modules to the PHP build that Leopard ships with then you're getting into compiling and all sorts of deep OS stuff. I'm not too keen on that. Continue reading...

Tutorial: Intelligent Wordpress Navigation Menus

Creating an 'intelligent' navigation menu for Wordpress is a good challenge for PHP beginners. In this context I take intelligent to mean that the menu knows which page is being displayed and highlights the appropriate menu item. The navigation menus on this site are an example of this technique in action. In this tutorial I'll show you how to create these menus. Continue reading...