Christian Biggins Design, Technology, SEO, General Ramblings. Something for everybody.

20Jan/092

Stupid Usability FAIL!

Ok, I know I have been neglecting this blog for a long time. Thats because most of my technical rantings have moved to Fliquid Studios. But, I needed to share one of the most ridiculous usability failures I have ever experienced.

Today I was searching for a simple tank volume calculator to work out how many US Gallons my fish tank is (179 for those interested), so I made a quick search on Google and then clicked on the second result. Well, the page loaded and then a javascript alert popped up saying "The Lightnin Tank Volume Calculator currently supports Netscape Navigator 6 and Internet Explorer 5." which wasn't too bad but then by clicking yes, sent me back to my Google results! So, basically they are saying that because I don't use IE5 (released in 1999!!!) or Netscape 6 (released 2002) and that Firefox only accounts for 20% of the browsing market share, I cannot view the page. Of course, I could disable javascript but why? If they don't want me on their site then that's up to them, but I can't see how they still have the 2nd spot in Google with this stupid approach to web development.

</rant>

24Nov/080

The common grep –exclude problem

grep is a file content searching tool for Linux. It is loved by programmers for its ease of use and swift search results (with customisable output). For example, if you forgot where you left your debug code, you can quickly display a list of the files that contain the code like so;

grep -ril 'var_dump' *

But, the problem with grep is that it is not possible to limit the subdirectories it searches within based on a pattern. A lot of people misunderstand the "-exclude" option, thinking that they can stop grep from returning results from SVN directories using it like so;

grep -ril --exclude=".svn/*" 'var_dump' *

Little do they realise that exclude is for file names only and grep has no functionality for restricting search based on directory names. grep can invert the found rows and only show the non-matching lines using the '-v' parameter and can remove the .svn directories but it is very slow;

grep -ril "'var_dump' * | grep -v svn

So, in comes ack. ack is much faster than grep (it uses perl regular expressions) and searches recursively and ignores revision control subdirectories (.svn) by default. Also, it displays the found code in a much easier to read format (if you opt to display the lines as opposed to just the file names);

ack To make things easier, ack is available in a lot of repo's for different Linux distributions.  I was able to get ack this easily;

sudo apt-get install ack

Done. Its also available as a perl script incase you cannot install it due to dictator sys admins (you know the type.).

If you code and use grep for your line-level searching, do yourself a favour and get ack.

21Nov/080

ER Diagrams from SQL files

A lot of people these days use graphical clients for creating their database schema's and therefor start with the Entity Relationship diagram and then have it generate the SQL for them. I prefer to write SQL directly as I seem to have an ongoing misunderstanding with most graphical clients but then I would need to somehow create an ER diagram for the SQL I wrote and this meant I'd double up on work a little bit. Today while searching for another application to do just what I want (and not cost me a cent) I found a post about something that will be extremely handy.

SQL Fairy SQL Fairy is an ER Diagram creator for Mysql and other databases but uses the raw SQL files and includes relationships (like foreign keys etc).

Sample Schema Its not perfect by any means, but its easy and gives a great representation of the database relationships. The lines representing relationships actually go over the tables which is a bugger and as it outputs directly to an image, you cant edit it. But, for a quick and easy ER, its bloody good.

As noted in the post I found this little gem at, its super simple to install and use, particularly if you are using Linux. I am on Kubuntu (for the record, my distro of choice is Fedora) and installed it as easy as this;

sudo apt-get install sqlfairy

Then, to generate the diagram was as easy as this;

sqlt-diagram -d=MySQL -o=sample_schema.png schema.sql --color

Unfortunately, it did fall over when my schema contained a SOURCE within the SQL, but apart from that it was quick and simple enough for me.

Now, if I can find an app that does the same thing but allows me to edit my ER first and give me multiple saving options (XML, SQL, etc) then I'd be extremely happy.

sqlt Man page
sqlt-diagram Man page

EDIT: About a year ago, MySQL released an application named 'Workbench' for this very purpose. An ER diagram program with reverse engineering capabilities from .sql files. The application was used by me on Windows for a while before a Linux friendly version was released. But, when Sun bought MySQL earlier this year, they made most of the MySQL applications commercial and were charging for licenses. Thats why Workbench was not mentioned above.

I am pleased to announce that it appears Workbench is free for download again. More information on Workbench can be obtained at its website.

This is the same schema as the above diagram done in Workbench using reverse engineering from an SQL file.

workbench MySQL Workbench

10Oct/080

Microsoft Expression Studio Web 2

Through my University, I was able to get a bunch of Microsoft development and design software for nothing. This is obviously a vain attempt by Microsoft to lure me to god-awful .Net development or something similar. But, at the end of the day, I am an open source developer and a big fan of the GPL and GNU etc, so I'll stick with my Java and PHP thanksverymuch.

But, while browsing dzone tonight, I happened to notice an interesting article titled "Expression Web 2 for PHP Developers-Simplifying Your PHP Applications".

Well, my first impressions were that it was like a lightweight Dreamweaver. ick. I am a text-editor user. I like IDE's, but when they are IDE's and not pretending-to-be-tech-savvy-drag-and-drop-designers-come-IDE's.

The fact that Web 2 has drag and drop html components. Ergh. Who in their right mind would choose to scroll down a list of available tags and click-and-drag one instead of simply typing '<p></p>'?

Anyway, for an HTML editor, it might be fine. But you dont need anything other than Notepad++ (for syntax highlighting) for coding HTML.

Anyway, I am looking for a new IDE, so I thought I'd give this Expression Web 2 a go (even though the thought of coding PHP in a Microsoft product made me feel a little queezy).

Well, I got as far as this;


   1:  <?php
   2:   
   3:  ?>

And thats it. Wanna know why? Because it wouldnt let save it as a .lib while keeping it registered as a PHP app. Come on, you expect me to consider this a 'serious' development application when I can't register my own extensions? If I select 'php' in the 'save as type' when saving, it either removes the .lib extension and replaces it with .php or it adds .php to the end (ie form.lib.php). And, heres the best part, if I type the php opening and closing tags in and then try to save, it gives me an error saying that because I have php tags, I need to save it as a php file.. ARRRGH!!!!

Searching and viewing the help files gave me nothing. And I'm not going to start giving my libraries a .php extension, sorry Microsoft.

At least now I can try Netbeans 6.5 Beta with PHP support. I hope they dont still force every file you edit to have its own project. So painful. Maybe it's time I wrote my own IDE.

8Oct/080

Christianbiggins.com moved to Wordpress platform

I have been toying with the idea of moving to a self hosted wordpress blog for quite some time and I finally bit the bullet and did it. The main driving force behind this decision was;

  1. More control. I can edit code, add plugins, modify anything I want,
  2. Owned posts. With Google owning everything posted to Blogger, I preferred that my posts remained mine, on my servers. Blogger didn't even provide an export service to make it easier to remove your blog.
  3. Pages. I can post on pages about my work and my projects without needing to follow a blog-style 'post'. This means I can have non blog content.
  4. Hosting on my server means that I can integrate with other sites and services that I own or host.
  5. Still works with Windows Live Writer. This was a must. Live Writer is used for all my posts.
  6. Solid codebase. Wordpress is used extensively throughout the web with a huge community base. There are heaps of available plugins, widgets, themes, tutorials etc and as its PHP based, I can tinker myself.

So, as Wordpress provided an import script from Blogger, it was a no-brainer. Of course the import failed a few times and I got a fair few duplicate comments, its all here now.

So, the site is now Wordpress with the BloggingPro theme and a few other plugins used also.  It is very much still a work in progress as I move over all the changes I made on Blogger. I am also going to add more content to the pages and other stuff too. Keep watching this space.

23Sep/080

Web services that dont work. My #1 frustration

I can understand when things are in a public beta stage and are still going through testing, that things may not work. But, when a web application has been launched and there is no trace of ‘Beta’ or ‘testing’ anywhere on the site or service then you’d expect things to work ok and in this age of extremely competitive sites and services, it is simply unacceptable when they dont work as required.

Today, I decided that I needed some ‘Bookmark this’ buttons at the bottom of my posts as I have implemented on Skylines Australia.

socialnetworks 

So, as my blog is with Blogger, I thought there must be a widget or a pre-written piece of code out there to do it for me. I came across Sharethis and Addthis.

Sharethis
I registered at Sharethis and I filled out the form for my blogger button and I followed the prompts to put the widget on my blog and impatiently hit ‘save’, excited about this new addition, I refreshed the blog to be presented with this;

1. A new side widget with nothing in it.
sharethis1 2. A link underneath my posts that does nothing (because of javascript errors)
sharethis2 So, that was it for Sharethis. It had already wasted too much of my time.

Addthis
So the next thing to try was Addthis. Their site looked nice and to be honest, the button looked nicer and more functional than the Sharethis equivalent. So, I thought I would give it a go and register.
addthis This was what I was presented with after registering. No disabling of the form before putting your details in, or even a nice notification page (this is all that was on the page, just some centred text). My registration still went through as gmail was quick to notify me of the successful Addthis registration.

Maybe I just need to stop being lazy. Its not a hard thing to add to the posts and it’d only take me 30mins or so to whip something up. But after these two dismal attempts at attracting me as a user on their sites, I started to think of other sites that constantly irritate me.

Shelfari
This is actually a fairly good site. I do use it and I generally like it. But their search engine is attrocious. What respectful web site in the 21st century has a crap search? None. Searching and indexing has advanced so much in the past 10 years that there is simply no excuse for bad search engines. This site constantly makes me use the advanced search to put everything in to find a book. eg. Searching for ‘A year in tibet’ gives me a crap load of books, mainly about the lord of the rings. But if I go to the advanced search and put in the title and author, I get the book I was searching for which has the exact name I was searching for. Not to mention on  this site how you can mark a book as ‘Plan to read’ and then next time you come back, its set to ‘Already read’ and ‘I own this book’… Not sure what happens between visits but I dont read that quickly.

Blackout Rugby
This site is a great online Rugby game. FYI, I love rugby. I bought a team-signed Waratahs jersey on Saturday night. Thats beside the point. This game is great, but lacks the finesse of something with more time under its belt. For example, up until a few months ago, the site used a flash-only navigation. This meant that if I logged in on my 64Bit Fedora machine (with no flash support), I had to try to guess the URL of the pages I wanted, which also lead me to a big fat SQL error (and likely, an injection opportunity which I promptly notified them about). They have now implemented a fall back navigation menu for no flash support. The other area this site falls over is in stability. The site has been down so much over the past month (maybe 5 days at least) due to them moving hosts twice. When you are charging money for a ‘premium’ membership, this is simply not good enough. You cannot expect to grow your user base when you take usability so lightly.

In conclusion
Web site owners and operators need to realise that if their product does not work, they will lose their users. It is that simple. If something doesn’t work, the user will go elsewhere. If something isn’t accessible, the user will go elsewhere. If something is too complicated, the user will go elsewhere. With the level of competition and new-and-improved up-and-comers in all areas of the internet, its never been more important to ensure that your service works. Even if it means removing functionality to ensure that the core of the system is as bug-free as possible. Or just stamp a ‘Beta’ on it.

5Sep/080

Code merging. Its awful without good tools.

No developer likes to merge their code in with other code after finishing a big project. Its a royal pain in the ass. I find myself having to do it at work a lot (we have a largish team) and at home because at home, I somehow find that I have 84 copies of the same thing. So, I need to merge them together occasionally to keep things maintainable.

Merging is by far 10 times easier on Linux than windows. Linux is such a good development environment (apart for .net – but then, who uses .net anyway?). I would recommend getting VirtualBox, Fedora (or Ubuntu) and installing them on a windows machine. Even if you only use it for coding, profiling and merging / deploying. Its worth it and takes bugger all time to set up.

I am using Ubuntu on my VirtualBox. I prefer Fedora, but I found it hard to get higher resolutions with it. Anyway, I’m off topic.

Once you create your two directories or files that you need to merge or create a diff for. You can open one of the three programs;

My personal favourite is Meld. There are others out there. If you use something else, let me know about it.

Using one of these apps takes the hard work out of merging. In meld, you can match custom rules (for example, you can match all files in the ‘cache’ directory) and then ignore them.

Then, once your files / directories are merged, you can use something like KDESvn to commit them (if you are not savvy enough with the command line SVN client).

All done. Merged, Committed and time for a beer.

If you are unlucky to be on a Windows machine. No real biggy, but your choice of free clients becomes slim.

TortoiseSVN is the app of choice for interacting with an SVN repo.

Once you have the directories, you can merge them with WinMerge. I do find this app a little lacking. It doesn’t display the files in a heirarchical view, so diffing 10,000 files (which I did yesterday) just lists them all one by one and not within their directories.

I have heard a lot of good things about Beyond Compare but it is not free.

Let me know what you use for comparing, diffing and merging files.

16May/080

Google Doctype

Google has just released 'Doctype' into its sites. Doctype is an html/css/DOM reference in a wiki form. It allows submissions from anyone and includes tests on DOM elements performed in each of the current main browsers (Not including Opera).

I will definately be contributing to this.

Another fantastic Google site/product/page/whatever.