About Dilantha

A web developer based in Sri Lanka. Works with PHP, CodeIgniter, drupal and jQuery.

Get MySQL Workbench working on Ubuntu 11.10

MySQL Workbench doesn’t work out of the box in the latest Ubuntu. These steps will get it working until Oracle gets around to updating the official package ;)


sudo add-apt-repository ppa:olivier-berten/misc
sudo apt-get update
sudo apt-get install mysql-workbench-gpl

Source: http://bugs.mysql.com/bug.php?id=62347

Update: Don’t know if Oracle has fixed this yet. This works in the latest Linux Mint as well.

Aptana PHP Formatting Tip

I like the Aptana PHP formatter. Its the only one that works well for me. I used to my one liner tags messed up a lot like this.

<?php echo $content
?>

What I noticed was that the ones with the semi-colons in place didn’t break to a new line.

<?php echo $content;?>

Now the auto-formatter (Keyboard shortcut to Command + Shift + F on the Mac) keeps things in the same line.

Commit Tips

If you are still using CVS and Subversion or moved on to something distributed its a good idea to keep in mind how to commit.

Commits and commit messages are pretty important. I’ve had single user repos for years and I still put decent messages and commit sensibly in case I need to go back and figure out something.

Here are a few tips that hopefully will help to do better commits.

  • A commit shouldn’t be a number of unrelated things.
  • Each commit should be a single step that you are doing to achieve something.
  • Your commit message should describe just the step you did.
  • No blank commit messages, blank means you did nothing. :)
  • In a traditional VCS like CVS or Subversion always do an update and merge any changes before you commit.
  • In a DVCS like Git or Mercurial commit what you did, then pull, update, merge, commit, and push. (This might change depending on the tool you use.)

If you keep your commits per step you will find you can pick and move, release, make patches or do pull requests easier.