This blog is now obsolete. Go to scott.arbeitman.id.au for all new content.

0

Amazing Solar Technology

| Wednesday, December 19, 2007
I've always believed that technology would be the key to averting global disaster related to climate change. Finally, we're really starting to see green technology take off. While the 90's will be remember for the Internet boom, the next 10 years will be remember as the green boom. Both will be equally important in similar ways, such as leading to unprecedented economic growth, as well a empowering individuals in new ways.

Here's an example of a technology that, if what they say is true, could effectively remove the need for polluting power plants forever. It sounds like hype, but watch the video, do the research and decide for yourself.

0

Free Knowledge

|

I often brag that I received a better education at McGill University than many of my high school friends who went to top universities in the US, and at a fraction of the price. (With the US dollar on par with the Canadian, it is only slightly less attractive).

But now, thanks to iTunes and independent university initiatives, everyone can have access to the world's most brilliant scientists, professors, and lecturers. And you can pick your curriculum from multiple courses at multiple university. And it's totally free.

One article discussing this phenomenon is from the New York Times, which discusses Walter H. G. Lewin, a physics professor. A really good read which reminds me of my Physics 101 professor, Bob Moore, which I once commented "splits the atom, like, daily." Although I certainly struggled through the assignments and remembering the equations, I definitely learned to appreciate physics by watching a crazy person ride a unicycle on a lecture stage or calling Americans "barbarians" because we (they) use inches and not centimetres.

Anyways, if the thought of free lectures interests you, why not check out some of the great content available on iTunes, or MIT's Open Courseware? If you're looking some interesting business-related content, check out Melbourne Business School's Leadercasts which my team here at MBS worked on.

0

In the (Jewish) Holiday Spirit

| Wednesday, December 12, 2007
Enjoy.





0

Another Clever Person

| Friday, December 7, 2007

I'm loving this whole World Wide Internets thing, as there is no shortage of smart people who are writing things that I can read any time I like. Apparently, blogging is really hip with the kids these days, just like the MTV and the YouTube.

My mom suggested a couple of years ago to read The World Is Flat: A Brief History of the Twenty-first Century by Thomas Friedman which was a good call. I've since lent this book to a number of my friends.

Today I read his really satirical account of America as seen through and Iranian intelligence estimate. Simply brilliant. Here's an excerpt:

Our fears that the U.S. was engaged in a covert “Manhattan Project” to achieve energy independence have been “assuaged.” America’s Manhattan Project turns out to be largely confined to the production of corn ethanol in Iowa, which, our analysts have confirmed from cellphone intercepts between lobbyists and Congressmen, is nothing more than a multibillion-dollar payoff to big Iowa farmers and agro-businesses.

This is exactly what we need. Just like we "needed" the atomic bomb and we "needed" to land on the moon. Except this time it's not just the free world at stake; it's the whole world. At least Australia, my adopted country, has started to take this issue seriously lately.

0

If You Only Read One Blog...

| Thursday, December 6, 2007
He's quite mainstream these days, but every new post just reaffirms that Joel Spolsky is one of the smarted guys out there. His recent Yale talk posts are particularly good, but also among my favourite are:
I don't have an wish link widget yet, but if I did you'd find his three books on there as well.
0

Highest Level of Giving Made Easy

| Sunday, December 2, 2007
Maimonides, one of the most important Jewish scholars, wrote of eight levels of charity. The highest is
...endowing him with a gift or loan, or entering into a partnership with him, or finding employment for him, in order to strengthen his hand until he need no longer be dependent upon others...
Thanks to the Internet, this way of giving is actually the easiest to accomplish thanks to the phenomenon of microloans: small loans (less than $200) made to individuals to help fund a business venture. Web sites such as Kiva make this extremely easy. Simply pick the individual you want to sponsor, choose a loan amount, and use Paypal to complete the transaction. The whole process took me less than 5 minutes.

Interested? Check out a worthy cause below and get involved!

0

I'm Leaving to Scotland

| Wednesday, October 3, 2007
This month was rather intense, especially since I'm on holiday. Thanks to everyone for their support.

I'm leaving good old Boca Raton today to head to Scotland, and then on to London and Europe thanks to Contiki.

I will probably leave my laptop in London, so please forgive me if I don't respond to your e-mails, or become an apparent Facebook creep.

After Europe, I will be heading to Hong Kong for a couple of days before returning to Australia. The day after my return, I will starting a new job at Melbourne Uni. And it will be my birthday!
0

Something good happenned to Mozy

|

The earlier adopter that I am, I signed up for the Mozy online backup service a couple of months ago. The service was -- and I believe still is -- in public beta, at least for Mac clients. For those who never heard of it, Mozy offers unlimited online storage for only $4.95 USD per month.

In the beginning, Mozy really pissed me off. It didn't reliably backup. I get errors like


Error: ((Null) (Null)))

But yesterday, after attempting a backup, my Mac did something it never does: it froze. I was ready to move Mozy into the trash.

But, after restarting, something amazing happened. Mozy is running perfectly. I now have 3 different restore options (desktop client, online client, or DVD mailing). Growl is now supported. I get visual confirmation that an upload is in progress. It's faster. It shows real upload progress (although still a bit inaccurate with the time remaining). I'm a happy customer.

For those who don't perform regular backups, you should. And I suggest giving Mozy a try.

0

In My Country There Is Problem

| Thursday, September 27, 2007
Apparently there is a problem in my country too.

0

iPhone: Apple should support Google Gears

| Saturday, September 22, 2007
A major criticism of the iPhone is the lack of an SDK, which prevents developers from writing custom applications. The only way for your application to run is via the mobile Safari web browser as a standard web application (HTML + Javascript). So this really raises the question: what do you want to do with an SDK that you can't already? This isn't strictly an iPhone issue, as we could try to develop a framework for all applications regardless of their target platform, i.e. when should one write a web-based application or write a so-called "desktop" application.

Under most circumstances, a web application is probably preferred because:

  • there is no overhead in installing or updating the application

  • data is stored remotely, so it's accessible regardless of where you are or which computer you are using

  • it will run on multiple operating systems with little extra work



So what's missing? Naturally, there are a few things:

  1. Access to other applications, either currently running or otherwise installed on the system

  2. Using the application when no Internet connection is present, although I tend to agree that also think that this has diminishing returns

  3. Security; individuals often think twice about storing private data on third-party servers



I'm probably in the Apple camp with regards to the first point. We don't want applications to interact with each other (or with the Phone OS itself) because this may have security implications for the owner and the network. I don't want to have an anti-virus running on my phone or iPod, to be sure. And I don't want to risk the possibility of my phone being hijacked to run some scams using my voice minutes. The risk is just too great.

So how can Apple help mitigate the second and third point without introducing a complex SDK? Easy! Apple should support the Google Gears on mobile Safari (and regular Safari, for that matter). With Adobe's support for Google Gears in AIR and Apple's adoption, we may see the Gears API become the de facto standard API for occasionally connected web applications.

Wouldn't that be nice?

1

Great New Feature in Opera 9.5

| Thursday, September 20, 2007
People often tease me for using Opera as my preferred web browser. This hurts my feelings.

Recently, Opera released an Alpha version of their 9.5 release. One important feature that I don't see on any changelog is how Opera offers to remember passwords using its "wand". Now, when you submit a form on any site, Opera, like most browsers, offers to remember your username and password. However, this is now done asynchronously so that the page continues to load in the background.

Why is this so great?

If you're like me, you're never quite sure if you've entered the right username/password combination, and you might be hesitant to save the information until you're sure its correct. Now you can be sure you are saving the right info because you can wait for the form to submit and the new page to load.

It's the little things.
0

Funniest Music Ever

| Saturday, July 21, 2007
For those who remember William Hung of American Idol fame, I strongly recommend checking out "Wing", who has a large catalogue of albums available on iTunes.

Update: Most of you probably already knew that there was a whole episode of South Park about this singer. Despite being a South Park fan, I totally missed that one until now.
0

Building a Better CFLOOP

| Saturday, June 23, 2007
ColdFusion 8 introduces slightly improved looping for arrays, as well a new way to loop over the contents of the file. Unfortunately, I don't believe these changes go far enough and, as I'll demonstrate, even better results can be accomplished even with older versions of ColdFusion.

My improved looping tag uses a little known ColdFusion feature, the <cfexit method="loop" /> tag. When used inside a custom tag, this returns control to the top the tag's "end" execution mode. This is ColdFusion's way of allowing custom iterators.

Here's what the syntax of my array looping tag:


<cfimport taglib="/custom-tags/loop/" prefix="loop" />

<loop:array array="#myArray#" index="i" element="e" cycle:shading="light,dark" cycle:odd="true,false" cleanup="true">

</loop:array>


Let me break it down:

  • array: this is the array you want to loop through, just like a regular CFLOOP

  • index: again, just like in CFLOOP, except this attribute is not required and has no defaults. it simply is not set.

  • element: the current item in the array. By default this a variable called element

  • cycle:variableName: the tag sets variableName to one of the values based on current index. This is inspired by a similar function in Rails. For example, in the above example, the variable odd will either have the value of true or false depending on the iteration number.

  • cleanup: This is perhaps the nicest feature. cleanup will remove references to all variables created during the iteration of the tag. This eliminates the need to var-scope lots of variables inside a CFC. By default, this is true.

Update
I've posted the code on github.
1

ColdFusion and YAML

| Tuesday, April 24, 2007
One interseting thing in Ruby on Rails that's sorely missing in ColdFusion is YAML. For those who don't know, YAML is similar to XML or JSON, and is a way to represent complex data or objects. YAML is extrememly lightweight and less verbose than XML.

After a little server configuration, it's easy to turn YAML text in a file into a ColdFusion structure.

I'm using JYaml as my YAML parsing library, but other options are available. Unfortunately, JYaml requires Java 5, which is not the standard ColdFusion operating environment. To remedy this, download a Java 5 JRE and follow Ben Forta's concise directions. Don't forget to put the JYaml jar file in your classpath and restart your ColdFusion server.

Assuming your .cfm file and .yaml file are in the same directory, creating a ColdFusion structure out of it is a easy as:


<cfscript>
Yaml = CreateObject("java", "org.ho.yaml.Yaml");

configFile = CreateObject("java", "java.io.File").init(ExpandPath('.')&"/settings.yaml");

settings = Yaml.load(configFile);
</cfscript>


Dumping the "settings" variable reveals exactly the structure you were expecting.

One caveat: you may experience unexpected behavior when trying to access your struct's properties using dot notation. Instead, use the "associative array" with square brackets option.

So do this:

value = settings['credentials']['username']

not this:

value = settings.credentials.username
2

Site Layouts and Application.cfc

| Sunday, April 22, 2007
A common problem for any site developer is maintaining a consistent layout across pages. Many frameworks have been designed to simplify this. Model-Glue, for example, can handle this by having the site template as the last view included in the response cycle. This a heavy approach if all you want to do is view decoration.

Let's take a look at solving this using the onRequest method in Application.cfc to capture our outputted content, and then placing it within a template. Here's a skelteton onRequest method:


<cffunction name="onRequest">
<cfargument name="thePage" type="string" required="true" />
<!--- Magic will happen here --->
</cffunction>


For those of you familiar with onRequest, you'll know that if we don't manually included the requested page, ColdFusion won't send any content to the browser. This might strike some people as odd, but it opens a world of possibilities. For example, see my previous post on using Application.cfc as the application controller in an MVC framework.

In this case, instead of invoking a method within the Application.cfc, we'll store what ColdFusion would have outputted into a variable using the cfsavecontent tag. We'll then include another .cfm page, which will have access to all the variables in the onRequest function, including the just-saved content of the included page. Thus, the onRequest magic looks like this:


<cfsavecontent variable="contentForLayout">

<cfinclude template="#ARGUMENTS.thePage" />

</cfsavecontent>

<cfinclude template="Layout.cfm" />


Now, the code within Layout.cfm has access to the contentForLayout variable which contains the dynamic region of your page. A simple layout could simply output the content within the HTMl body:


<html>

<body>

<cfoutput>#contentForLayout#</cfoutput>

</body>

</html>

Naturally, you've have a much more complex layout, where you'd include Javascript, stylesheets, a header, footer, etc.

Another very important consequence of this is that your Layout.cfm has access to all the variables available within your Application.cfc so there is no reason which your layout cannot content dynamic content.
1

Using Application.cfc as your application controller

| Thursday, April 19, 2007
A few months ago, I was experimenting with Model-Glue for an application. One thing that struck me as odd was that certain events which are normally handled by the Application.cfc (onRequestStart, onRequestEnd) were handled by Model-Glue controllers.

Rather than moving custom application event handling logic in a seperate controller, why not handle them with the Application.cfc? After all, the Application.cfc framework is a well-documented, frequently used ColdFusion features which already handles many application-level events.

To that end, I've written yet another ColdFusion MVC framework I call "Boca", which is Rails-esque insofar as mapping event names to controller methods (handlers) to view pages without configuration. But what makes Boca unique (and uniquely ColdFusion) is that Application.cfc serves as the controller for all application events. A sample Application.cfc would like this:


<cfcomponent displayname="My Great Application" extends="BaseApplicationController">

<cffunction name="onApplicationStart" ...

<cffunction name="onSessionStart" ...

<!--- Custom Event Handlers --->

<cffunction name="addToCart" access="public" returntype="void">

<cfargument name="productId" type="numeric" required="true">
<!--- Do application logic here --->

</cffunction>

<cffunction name="signIn" access="public" returntype="void">

<cfargument name="username" type="string" required="true">
<cfargument name="password" type="string" required="true">
<!--- Do application logic here --->

</cffunction>


</cfcomponent>


While I cannot make the source code public, I can offer insight on how to accomplish this in your application. The secret is using the onRequest function in Application.cfc to intercept calls, call the appropriate function within the Application.cfc, and include the corrent view page(s). This can all be done in less than 100 lines of code. To reuse this filter across Application.cfc files within your site, simply extend the base component which implements the onRequest method, and don't override that method.

If, like in other MVC frameworks, the event contains the union of FORM and URL scopes, I suggest invoking the event handlers using the event as the argument collection of the handler method like so:


<cfset event = StructNew() />
<cfset StructAppend(event, URL) />
<cfset StructAppend(event, FORM) />
<cfinvoke method="#action#" argumentcollection="#event#" />


You the get better event documentation by enumerating the arguments and types for your event handler (although this is optional, since ColdFusion supports dynamic arguments, and will also preserve the name-value pairs passed in). See the sample component above for an example.

A consequence of this approach is that variables set (and not var-scoped) within the event handlers are available in the view pages included within the onRequest method (this is a well-documented Application.cfc behaviour), saving Model-Glue like usage of event and view-state components across controllers and views.