Whoops: David Heinemeier Hansson

I noticed that I’ve been saying whoops a lot when developing with rails. I don’t know if I picked that up from watching David’s screen casts or whether I did it already. In any case I’ve decided it would make an appropriate system alert sound.  So after a bit of messing about I managed to extract it from the rails 15 minute blog screencast.

Whoops in .aif format (Mac)
Whoops in .wav format

To install use it on a Mac, copy it to ~/Library/Sounds and select it in System Preferences -> Sound

Whoops also features at the end of this video:

Tags:

Wishlix - Wish Lists Set Free

Check out my Ruby on Rails project (and little experiment) called Wishlix.

Wishlix lets you create wish lists for your events such as weddings, birthdays and baby showers.  Items can be added from both on-line stores and the high street.

It’s intentionally simple. I have lots of ideas that would make it more elaborate but I’m waiting to get some feedback from real users to find out what features are most important. It would be great to hear from you if you have any suggestions.

Tags:

ALA: Beyond DOCTYPE

We could spend hours explaining why our sites broke, but wouldn’t it be better if they didn’t break in the first place?

read more | digg story

Tags:

More Fasthosts Accounts Hacked

A few weeks back one of my clients was stung by problems at FastHosts.

They developed a number of web sites and useing a Fasthosts hosting package. Without warning all of their sites were deleted and no backup was provided. Fasthosts didn’t give satisfactory detail as to why they did this, but we think it may have been something to do with the recent major security breach.

Further to this I received the following email from them today.

Dear Customer,

We wrote to you on 18th October 2007 advising that you change the password on your Fasthosts account in order to prevent any unauthorised account access following the network intrusion we previously communicated.

Whilst we have found the vulnerability that caused this issue, and have instigated a system wide security audit to improve and enhance our current security, we also advised you to change your control panel password as a precaution.

Today we have been made aware that a small number of our customers who did not change their passwords have experienced a compromise to their FTP space.

As a result, in order to totally protect all of our customers, we have today implemented an automatic password change for every control panel & FTP password that was not previously reset.

To ensure complete security when communicating your new passwords to you, we will take the stringent measure of sending the new control panel password via Royal Mail.

Please note that the email password reminder system will not work from the time you receive this mail, to the time you log in with your new control panel password.

UNDER NO CIRCUMSTANCES WHATSOEVER SHOULD YOU TRY TO REUSE ANY OF YOUR OLD PASSWORDS

We apologise for the inconvenience that this will cause you during this period, but trust you understand that our primary concern is for our customers and for the security of their websites and data. Unfortunately, an automatic password change is the only way of ensuring that all of our customers are totally secure.

If you have any questions relating to this, please contact our Customer Support team on 0870 888 3600 or customersupport@fasthosts.co.uk, and they will be more than happy to help you.
Thank you once again for your understanding and cooperation in this matter.
Yours sincerely,

The Fasthosts Team

I don’t think Royal Mail is much more secure and reliable than Email. Perhaps they should be using TNT instead.

Tags:

Free IMAP on Gmail

So at last Google are rolling out their most requested for feature, free IMAP access.

Reportedly some users have IMAP anabled already (although not me yet!). If you have IMAP access on your account, let us know your findings in the comments.

Tags:

The Secret of Gmail’s Adwords Targetting

Screen Shot of GMail

Tags:

CakePHP for real

A nice article by Fluxx describing his experience of using CakePHP in a real world app - TuneShout.com. What makes this article interesting is that TuneShout is a little more creative than your standard ‘create a blog’ example. It demonstrates using CakePHP as more than just a toy. Interestingly he recommends the 1.2 branch which is still in alpha.. It’s just a shame there isn’t much documentation.

Tags:

Eclipse Europa and PDT

If you follow my blog or if you are working on projects with me, then you may well be using the EasyEclipse setup I rave about on one of my previous posts.

So just to keep things complicated, I’m currently experimenting with switching away from EasyEclipse/PHPEclipse and trying out the latest official Eclipse (Europa) along with the PHP plugin PHP Development Tools (PDT).

PDT is being developed by Zend and IBM, which may add some standardisation between Eclipse and other popular IDEs.

Possible reasons to think about switching:

  • PDT makes Eclipse behave more like it does with Java projects.
  • PDT seems to be more actively developed than PHPEclipse.
  • It’s noticeably faster (on OS X at least).
  • The dock icon works properly.
  • The GUI has improved slightly in Europa.
  • Most importantly - the default colours are nicer.

*I’m not sure how many of these improvements are due to using Europa or PDT, as I upgraded both at the same time.

If you are convinced and want to give it a try, here’s how to get it going:

Step 1

Download and install Eclipse Classic from http://www.eclipse.org/downloads/

Step 2 

Install the following plugins through Help >  Software Updates > Find and Install

Choose ‘Search for new features to install’ and add these remote sites:

Name: PDT
URL: http://download.eclipse.org/tools/pdt/updates/

Name: Subclipse
URL: http://subclipse.tigris.org/update_1.2.x

Select the update sites, and also Europa discovery site and click ‘Finish’.

Select the required components to install, but deselect ‘Integrations (Optional)’ in Subclipse.  Press the ‘Select Required’ button to select the required packages for PDT. Follow the steps to install each plugin.

 Step 3

Restart Eclipse when prompted.  If you have been using EasyEclipse, you may need to change the default workspace path to /Users/<your user>/workspace, as by default it looks in ~/Documents/workspace.  It did for me anyway - none of my projects showed up until I changed it.

Step 4

Convert your EasyEclipse projects to PDT projects. Right click on each project and choose ‘Convert to PDT Project’. Note: you must be in the PHP Perspective/PHP Exlporer window for this option to be available.

Step 5

Have lots of fun with the new colours and options.. And let me know how you get on.

Sorry it’s been a while since my last post.  I’ve recently moved house and office so it’s taken a little while to get back to blogging!

Tags:

Associating .thtml files with PHP in Eclipse (for CakePHP)

If you are working with CakePHP, you will know that the view template files have the file extension .thtml. If you want syntax highlighting and PHP parsing for these files in Eclipse, you will need to take the following steps:

  • Open up the Eclipse preferences from the ‘Window’ menu > ‘Preferences’.
  • Navigate to General > Editors > File Associations.
  • Select .thtml if it is already there, add it if it isn’t.
  • Add ‘PHP Editor’ in the Associated Editors box and make it the default.
  • Navigate to General > Content types.
  • Select ‘PHP Source File’ and add .thtml to the file associations.

.thtml files should now be PHP parsed and highlighted. Thanks to cakebaker for this tip!

Tags:

My Perfect Mac-Eclipse-PHP-Subversion development setup

Eclipse is a truly great piece of software. Anyone developing with PHP (or many other languages for that matter) should consider it as a serious option for an IDE. And like a lot of great software, it’s free.

I use it most:

  • For PHP/HTML/CSS
  • On my Mac
  • With Subversion

If that’s you too, then I have one or two tips for getting things running smoothly. Most of this will be helpful if you use Linux or Windows too.

Step 1 - Download and install EasyEclipse for LAMP

EasyEclipse is a set of great distributions pre-configured with plugins for specific types of development. Eclipse actually has a very easy to use plugins system, but EasyEclipse makes getting up and running even quicker.

» Download EasyEclipse for LAMP

Step 2 - Set up your development environment

When developing in a team using Subversion (or other version control software), you normally need a local development environment to test your work before committing it to the repository. I have had great success using MAMP. It’s a simple Mac package that installs Apache, MySQL and PHP in one go. You get a neat little utility to start and stop the services, easily change the document root and so on. Another similar package that’s available for PC too is XAMPP, which is also very good.

» Download MAMP
» Download XAMPP

XAMPP is more feature rich, but MAMP has been around on Macs a bit longer - It’s bit more stable and easier to use if you are using a Mac.

Step 3 - Eclipse setup - Welcome Screen

Fire up Eclipse. For some rather odd reason, Eclipse has a random, sort of surreal startup screen the first time you run it. This caused me to ditch using it the first time I experimented with it, as I didn’t have much time or patience at that specific moment to work out what it was. And once you have closed it that single first time, there doesn’t appear to be any obvious way of getting it back ever - so it seems kind of pointless.

Eclipse random startup screen

Click the small cross next to ‘Welcome’ at the top, and you will see a familiar looking IDE layout.

Eclipse has a very well thought out (although a little bulky) windowing system. It uses the initially confusing terminolgy ‘views’ and ‘perspectives’. The ‘views’ are the panels, or little dockable windows. The perspectives are pre-defined layouts of views for pre-configured for specific types of tasks - such as PHP Web Development.

If you mess your windows up or get lost, simply do the following:

Window Menu > Open Perspective > Other

Select ‘PHP‘ from the list and click ‘OK‘. Everything should be back to near normality.

Step 4 - Eclipse setup - Turn off some annoying features, turn on some great ones

A lot of this is down to personal taste, but I think I’m fairly typical of an ex-Dreamweaver-code-view-will-do developer who’s learnt the error of his ways. So my preferences might be good for you if you fall in to that category. At the very least it will show you how to find the right options (and Eclipse has loads of ‘em)

To get to the Eclipse preferences, choose ‘Preferences‘ from the ‘Window‘ menu.

Because Eclipse has so many options, they have a really neat search feature that allows you to keyword search for the specific options you want. So type ‘PHP‘ in the ‘type filter text‘ box to get the options specific to PHP.

Eclipse Preferences

Each node in the list has a different page of options. Here’s what I normally change on a new install. With the PHP node selected:

  • On the ‘Appearance‘ tab, I select ‘show line numbers
  • On the ‘Typing‘ tab, I switch offWrap double quoted PHP strings‘, ‘Wrap singe quoted PHP strings‘, ‘Close double quoted strings‘, ‘Close single quoted strings‘, ‘Close brackets and parenthesis‘ (they might be good features when you get used to them, but I gave it a good go and in the end decided they are just annoying)

Step 5 - Create projects - Import your sites

  • In the ‘File‘ menu, choose New > Project.
  • Select SVN > Checkout Projects from SVN, click next.
  • Choose ‘Create a new repository location‘, click next.
  • Type the URL of your Subversion repository, click next.
  • Enter your login details and choose the folder you want to check out. Click next.
  • Important: Choose the option ‘Check out as a project configured using the New Project Wizard‘ (the default). This way Eclipse will send you to the new PHP project wizard next, which is really handy. Click finish.
  • Choose PHP > PHP Project from the list and click next.
  • Choose a location for the files to be stored. I usually work with the default ~/workspace (so set your document roots in MAMP/XAMPP to the directories in this location). Click Finish.

You should see your files in a window called ‘Navigation‘ on the left. If you right click on a file, the Subversion options are all in a sub menu called ‘Team

That’s all folks, I’ll leave the rest up to you. Post comments if you have any questions or corrections and I’ll try to answer them.

Tags:

Next Page »