Navigate/Search

Archive for the 'RubyOnRails' Category

Wolff Olins, the Olympic logo and a load of crap..

Wednesday, June 6th, 2007

Well, it looks like I’m number one on Google for Wolff Olins and load of crap!

http://www.google.com.au/search?hl=en&q=Wolff+Olins+load+of+crap&btnG=Search&meta=

It only took a day to get to number one - I’ll be happier when I can further up the results for more ‘flattering’ searches for them.

Update: “Wolff Olins” or “Wolff Olins Olympic Logo” has me at #2 and #4 in the results - astounding!

I like to think of it as an experiment in branding and brand management :)

For those seeking a more measured analysis - then look here

What a load of….

Tuesday, June 5th, 2007

Well the new 2012 Olympics logo is out!

The 2012 Olympic logo

What a load of shit….

It looks like about 15 minutes of cutting out with the ‘good scissors’ followed by some coloring in with Dad’s highlighters from work.

For this, you can thank Wolff Olins - the worlds leading brand oriented something or other.

Lets all help Google associate them with a total load of crap

Update: A comment on Wired by ‘Beep’ remarked the logo looks a lot like… well ahem, let me quote him:

Looks like Lisa Simpson going down on a dude.

Microsoft Expression Web Designer

Thursday, November 9th, 2006

Quite possibly the best HTML / CSS editor ever created.

No, I’m not kidding.  

This isn’t Frontpage, its in a different class and its seems well beyond the stagnent Dreamweaver and Homesite in terms of usability.

Nvu doesn’t even compare.

Just steer clear of the whole ASP control thing and use its intellisense and properties editing to produce lovely xhtml and css compliant code (by default!).

I can switch between hand editing, properties dialogs and drag and drop without thinking - and its html preview seems pretty spot on with the results one gets in Firefox.

Its a .Net 2.0 application and absorbes a hefty amount of disk space (800MB!) but runs very quick

In Beta 1 now - I’ve only had one crash, other than that its been rock solid for about 18 hours of html editng

Download it here: http://www.microsoft.com/products/expression/en/default.mspx

RadRails was SadRails (for a little while)

Sunday, April 16th, 2006

I just  upgraded to 0.6.2 of RadRails and was experiencing some weird behaviour when saving files.

Basically I was getting an exception and the file wasn’t saving.  Whats worse, if you were saving on close, it would throw the error and close the file but not save.

My problem was installing over the top of an existing copy of 0.6.1, if i moved the old c:\radrails directory to one side and did a fresh install all turns out okay….

That may have been in the instructions, but pfft, who reads them huh?

Application error (Rails)

Saturday, April 15th, 2006

Years ago, when ASP was first taking off it wasn’t uncommon to discover errors when surfing the net.

Those first ASP apps seems to break so often, their little VB errors calling out to the wild.

Today I’ve been immersing myself back into Rails, and what have I discovered?

Rails sites seem to have the same affliction, three times today I’ve visited various ruby sites to be struck by variations on ‘Application error (Rails)’.

Now, if the measure of a community is how it eats its own dogfood then its great these guys are running Rails, but its a disturbing fact it seems to be so unreliable?

And now I await the flames :)

What’s the most productive language/framework/tool you’ve ever worked with?

Friday, February 3rd, 2006

Okay, a call to arms.

What toolsets/frameworks etc have you ever used that you have instinctively found to be productive (And which have continued to be so).

At first thought I believed RubyOnRails was and is my most productive web dev language, but I feel it is missing a true IDE to really work.

And by productive, I’m thinking of user visible features and business applications.  A statement that lisp allows me to solve towers of hanoi in the least amount of code really doesn’t ring my bell!

What’s wrong with PHP

Wednesday, February 1st, 2006

I’ve extracted this text from an internal email I sent some time ago, it sums up my feelings:

….

Now PHP, you might think from this list that we hate it, that’s not true, many of the guys here would probably agree with the points below, but they will also say it works just fine and none of these points are the end of the world - many of them can be avoided with discipline.

Positives

  • It’s productive, you can write a lot of code quickly.
  • It performs, we haven’t had any performance issues that couldn’t be solved.
  • It’s simple, people can usually pick the basics of the language up in a few days.
  • For small sites/small code bases on a UNIX platform it does work, we process over 100,000 business messages a day with it and as I said, it works.

Things you should be careful about with large code bases/a lot of applications

We run about 600,000+ lines of code in PHP, in a large environment, the unstructured scripting background of php really comes under pressure.  Much of what I say here probably also applies to languages like Perl or the like, but these have been our experiences

PHP upgrades can result in broken scripts/programs

  • Upgrading php often changes language features resulting in scripts that crash or error when they used to work.
    • For instance, they made it illegal to redefine a function in a class from one version to another, resulting in our whole db layer crashes because it had defined the function ‘get_class’ twice which was no longer permitted.  This just doesn’t happen in Java or C

It can be abused

  • It can be extremely difficult to maintain structure in the language without either very experienced staff or extremely comprehensive reviews, you can get into bad habits very quickly and your scripts can devolve to crap and become a maintenance nightmare. 
  • It doesn’t enforce typing, pre-declared variables, class naming or function naming conventions, you will have to invent methods for doing this, we have copied java and the standards used in some large php applications.

It keeps changing its mind

  • Ways of working change between version, for instance, how it access web request variables has at least 4 variations resulting in a different way of working for each script.
  • Function names in the API are changed between versions, or use inconsistence conventions.

It’s not as portable as it claims

  •   Scripts that run on Windows may not run on Unix and vice versa
  •  File IO is a common issue
  • Specialist extensions may compile on Linux but not on Solaris or work inconsistently on Windows (we had issues with its xslt handling about 18 months ago)

Finding staff is hard

  • You just can’t hire PHP programmers of any quality, they don’t seem to be available where we are.
  • We’ve had to train people in PHP, or hire people who are often inexperienced ’script hackers’

It’s not a free as you think

  • The leading PHP Development Environment (Zend) is between $250 and $1500 dollars U.S.
  • The Zend accelerator (to cache scripts/improve performance) was a couple of grand PER PROCESSOR
  • A leading free version of a script accelerator - didn’t work, every 20th page failed to load before we quickly abandoned it.
  • There is only one implementation of the langauge - the one by Zend. 

It lacks a decent interactive debugger

  • The version in Zend Studio 3 and 4was problematic and would often stop working (my personal experience)
  • Version 5 doesn’t come close to Eclipse for Java.

The PHP community is often immature

  •   Few people are writing big and REAL applications in this language (or so it seems)

Long running scripts are unreliable

  •   On a couple of occasions, we’ve needed to write scripts which process a lot of XML or database activity, we’ve often found they crash after a period of running (like over 10 or 15 minutes), PHP’s memory collection does not seem robust enough for that kind of thing, it would rather be run over and over again than have 1 large program.

Error handling is hard

  • Php 5 has exceptions, we don’t use it yet, but we have had trouble making sure our scripts have a coherent mechanism for reporting and logging errors

If you are going PHP then

  • Hire programmers with a software engineering background
  • They will resist the urge to hack which comes so easily to the self taught/web developer
  • Go object oriented
  • It helps with keeping structure and enforcing a software engineering attitude
  • Maintain separation of responsibility between application layers,
    • It enforces structure and maintainability, otherwise people will hack and hack and hack
    • E.g., Model - View - Controller or  Business/ Data access/ View layer

  • Get a good set of third party libraries
    • We use ADODb for a our data access layer, but PHP 5 has its own version, use it or something like it.

Establish standards

  • Come up with standards for managing script configuration, use of global variables methods of accessing request variables, function names, class usage.

Creamy (secret) Goodness…

Wednesday, January 25th, 2006

Today I whipped up a quick proof of concept for work, it involved a (secret thingy) + RubyOnRails, MySql and Ajax.

Way cool, but at the moment, I can’t say any more because its a bit hushy.

Agile Web Dev w/Rails: slight oversight with its file upload sample…

Saturday, January 21st, 2006

Well, I’m working my way through this book as part of my rails learnings… and hit a snag a couple of days ago that i just couldn’t understand.

I was following the file upload option where you insert the uploaded image into a database and i could not for the life of me figure out whilst my pictures were not coming back complete (they downloaded partially and then were cut off).

Getting the image properties revealled that the image was only 64KB in size, a highly suspicious number and one of those boundary numbers that programmers love to pick, so the problem had to be intentional and not just some random quirk. At first I thought it was webbrick or ruby or rails having some config setting about limiting the size of file uploads (PHP has an option to do this, although by default its much larger than 64KB)

I eventually found the problem, MySQL BLOB columns are only 64KB in size! Rails was silently filling the column with data and when it fit no more, not returning any error message.

If I hadn’t spent the last 3 years working with Oracle, then I would have probably found this earlier, BLOB’s in oracle are max out at 2GB or some such thing.

So I changed the datatype of the column to LONGBLOB, and now have oodles of space.

This helped: http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html

This text for google: Ruby file upload limited to 64KB with MYSQL

Review: Komodo 3.5 and RubyOnRails

Tuesday, January 17th, 2006

Summary

A basic IDE who’s support for RubyOnRails is fairly slender (more like a 0.9 release) Offers basic syntax checking for Ruby, includes interactive debugging but it is unusably slow on this test system

Really rates as a slighly advanced text editor: Download Here

This is my first time at using an komodo for any language.

Test System

Dell Inspiron 8500, 1GB RAM, 2.4Ghz PIV, Windows XP Pro (SP1)

Notes

  • Starts quickly, familiar IDE Interface, scans system for Ruby without issues (on Windows)
  • Creating a Project from an existing Rails directory worked fine.
  • When generating code with ‘ruby scripts/generate xxx’ the project directory doesn’t not automatically show the new code, you have to ‘import from directory’ once more for it to pick up code.
  • Has ability to watch files for changes, useful for checking ‘development.log’, but it is unusably slow with a large file (4.5MB), also it does not interpret the colour coding esc chars in the file.
  • Has syntax highlighting and syntax checking (missing comma’s, brackets) but no useful code completion. Does not suggest any methods.
  • Remote and local debugging is incredibly slow, minutes will pass between starting debugger and reaching first breakpoint, next breakpoint takes just as long. Instructions for setting up remote and local debugging slightly incomplete and contains typos (See ‘Notes: Debugging setup below).
  • Debugging contains usual features (watches, breakpoints, step into etc), but again, very, very slow
  • Does not contain code formatting, refactoring, links to ruby documentation (besides help menu) or anything else that you might have come to expect from Java IDE’s such as Eclipse or IntelliJ

Notes: Debugging setup

Debugging worked fairly easily, only comments are that when local debugging you need to provide your c:\rails\yourapp in the Directory box AND load the script\server from c:\rails\yourapp

I was loading the script\server file from c:\rails\ and providing the directory as c:\rails\yourapp and just getting the default rails app turn up.

Remote debugging mentions that you need to provide a servername:port, where you get the port from is not mentioned in the ruby instructions (maybe it is mentioned elsewhere, I haven’t looked).

You can set the port explicity in ‘Edit’ | ‘Preferences’ | Debugger | ‘Listen for debug connections on port:’ or you can look at what port it currently is using by selecting ‘Debug’ | ‘Listener Status’

Hope this helps someone, I’d personally wait for version 4.0

Disagree? I’m happy to be corrected