Archive for October, 2006

misleading

Sunday, October 29th, 2006

I recently discovered that EastWest are having a big sale on their Quantum Leap Orchestral softsynths – their entry level Silver version is now only $US295, or around $AU400 – so I’m very tempted to buy it pretty much immediately.
However, I can’t find any decent samples of what it sounds like. On their page they have a bunch of samples that sound absolutely amazing – you’d think it was a real orchestra.
However, when you dig a little deeper you see that the samples were recorded with their $4,500 Platinum version NOT Silver.
The Platinum version has more than 100GB of samples, compared with less than 10 for Silver – so I’d really like to know what the silver quality is really like. I’ve found a few samples by users of the library, but they’re of mixed quality. I want to see what an expert can get out of it. I had hoped that the samples on EastWest’s Sounds Online site were re-recordings of each sample piece with the relevant library, so you could compare Silver -> Gold -> Platinum. I might have been convinced to save for Gold if I could hear the difference. But since I can’t I’m going to take the gamble on Silver instead.
The challenge will be finding it for less than $500. From Soundsonline I can get it for $US295 and an undisclosed amount of shipping, from AudioMidi I can get it for $US285 and $US65 shipping – for both of those there’s the chance that customs may intercept it and charge me GST. From EastWest Samples in Australia I can get it for $AU445 and $AU13 shipping, but that’s _before_ GST.
So I’ll probably just end up going to Better Music here in Canberra, sure, I’ll have to pay the GST, but I won’t have to pay shipping and I’ll get it right away.

that’ll do

Sunday, October 22nd, 2006

ok, another change in template, and a different syntax highlighting plugin and I’m realatively happy for now….
But I still don’t like fixed-width layouts.

Saturday, October 21st, 2006

Ok, that’s a little better – it’s still fixed pixel width, but at least it’s wider.

I guess I’m going to have to get round to making my own theme one of these days.

Gah

Saturday, October 21st, 2006

…that previous post is an example of why fixed-pixel sized layouts are a fucking stupid idea.
Just Don’t Do It.

Learn to use the dynamic reflowing nature of HTML. A web page is NOT a static paper page – you don’t know how big or small the viewing device is going to be.

I should’ve been able to increase the width of the column to allow for the long code lines, but no – fixed pixel size and images meant that doing so makes it look like crap. Then I found another theme to use – one that looks really nice. The code didn’t wrap in that theme, but you needed a magnifying glass to read the page. “No problem!” I thought, I’ll just increase the text size. Nope, WRONG. Bitten by px again.

So this is a plea to all designers and would be designers from those of us who lack the design ability, but want to be able to use your creations.
Please make your templates appropriate for a WEB page, not a piece of paper
If it breaks when I increase the font size by only one or two levels, then your design Does Not Work.

Simple Seaside steps

Saturday, October 21st, 2006

To try to get a better handle on Seaside, the Smalltalk based web application framework – I decided to start reimplementing some of the simple example and demonstration web applications I’ve seen around for other frameworks. The idea being that not only will it give me more exposure to Seaside, but it will also show me how to translate the ideas.

The obvious first example is Hello World – I won’t bother showing how it’s done in another framework for that one, because it’s too simple, but I will show you what’s required in Seaside.

Smalltalk [Show Plain Code]:
  1. WAComponent subclass: #HelloWorld
  2.   instanceVariableNames:
  3.   classVariableNames:
  4.   poolDictionaries:
  5.   category: ‘Stuarts-Examples’
  6.  
  7. HelloWorld>>renderContentOn: html
  8.     html heading: ‘Hello World!’

As you can see, there’s not much required there – the first part is a standard Smalltalk class declaration – I’m creating a new class called HelloWorld which is a subclass of WAComponent.
renderContentOn: is the method that does the work.

Now for something slightly more functional, I’ll take the little example Howard Lewis Ship used in his recent Tapestry 5 screencast.
This basically lists numbers 1 to 10 with links on them, and shows you which one you clicked.

First, the Tapestry source:

Java(TM) 2 Platform Standard Edition 5.0 [Show Plain Code]:
  1. package org.example.helloworld.pages;
  2.  
  3. import org.tapestry.annotations.ComponentClass;
  4. import org.tapestry.annotations.OnEvent;
  5. import org.tapestry.annotations.Persist;
  6.  
  7. @ComponentClass
  8. public class Start {
  9.   private int _index;
  10.  
  11.   @Persist
  12.   private int _selected;
  13.  
  14.   public int getIndex() {
  15.     return _index;
  16.   }
  17.  
  18.   public void setIndex(int index) {
  19.     _index = index;
  20.   }
  21.  
  22.   @OnEvent(component="choose")
  23.   public void choose(int index) {
  24.     _selected = index;
  25.   }
  26.  
  27.   public int getSelected() {
  28.         return _selected;
  29.   }
  30. }
  1. <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
  2. <title>Hello World</title>
  3. </head>
  4. <h1>Hello World</h1>
  5.  
  6. Please choose a number between 1 and 10:
  7. </p>
  8.  
  9. <t:comp type="Loop" source="prop:1..10" value="prop:index">
  10.   <t:comp type="ActionLink" id="choose" context="prop:index">${index} –
  11. </p>
  12.  
  13. <t:comp type="If" test="prop:selected">
  14. You chose: <strong>${selected}</strong>
  15. </p>
  16. </t:comp>
  17.  
  18. </body>
  19. </html>

Not much there, just the fairly basic HTML template to create the page, and the component behind it providing the data.

Now for the Seaside version:

Smalltalk [Show Plain Code]:
  1. WAComponent subclass: #NumberChooser
  2.   instanceVariableNames: ’selected’
  3.   classVariableNames:
  4.   poolDictionaries:
  5.   category: ‘Stuarts-Examples’
  6.  
  7. NumberChooser>>rendererClass
  8.   ^WARenderCanvas
  9.  
  10. NumberChooser>>choose: aNumber
  11.   selected := aNumber
  12.  
  13. NumberChooser>>renderContentOn: html
  14.   html
  15.     heading: ‘Hello World!’;
  16.     paragraph: ‘Please choose a number between 1 and 10:’;
  17.     paragraph: [
  18.       1 to: 10 do: [:val|
  19.         html anchor callback: [ self choose: val ]; text: val.
  20.         html text: ‘ — ‘
  21.       ]
  22.     ].
  23.  
  24.   selected ifNotNil: [
  25.     html paragraph: [
  26.       html text: ‘You choose: ‘; strong: selected
  27.     ]
  28.   ]

That’s a little smaller, mostly due to Smalltalk / Java differences, but it’s interesting to see how similar Tapestry and Seaside are in concept at least for this simple example (admittedly that’s Tapestry 5 which won’t be out for a long time yet, but Tapestry 4 is the same concept with a bit more typing)

Anyway, off to find some more examples to try!

Perfect timing

Wednesday, October 18th, 2006

I received an email today from iPOWER telling me that the machine my account was on had experienced multiple hard drive failures, and as a result all data had been lost.
I just confirmed cancellation of that account yesterday ;)

If at first you don’t succeed…

Sunday, October 15th, 2006

Once again I’ve been attracted by the lure of Smalltalk. So again, I’m going through tutorials and re-aquainting myself with the concepts. Maybe this time I might actually find something I want to do in the language, but otherwise it’s a way to pass a Sunday afternoon / evening.

Oh and yes- I’m back, had fun, and haven’t got round to putting up photos ;)