Thursday 20 September 2007

Common Lisp Tutorial

Peter Seibel writes about the dated links in the Google results for "lisp tutorial" and suggests that if we think Practical Common Lisp is a worthy lisp tutorial, we should link to it with that text.

So, if you're looking for a common lisp tutorial, have a look at Practical Common Lisp .

There you go.

Thursday 12 July 2007

Erlang, Amazon Web Services and SSL

I hacked together a test that authenticates to S3 and retrieves the bucket listing. That worked with or without ssl, but couldn't verify the peer when using ssl, so I needed to figure out how to use a CA root certificate with Erlang. I'm certain there are far better ways to do it, but this is what I came up with.

I used my browser to check which root certificate AWS uses (Verisign/RSA Secure Server CA), and picked the certificate from http://curl.haxx.se/ca/cacert.pem. That's a modified version of the ca root certificate bundle that comes with Mozilla based browsers. It contains the certificates in pem-form that Erlang understands. The pem portions in the file look like this.
-----BEGIN CERTIFICATE-----
MIICNDCCAaECEAKtZn5ORf5eV288mBle3cAwDQYJKoZIhvc
A1UEBhM......
..............CYCPgmc4RKz
1g39NTUJWdrTJXwT4OPjr0l91X817/OWOgHz8UA==
-----END CERTIFICATE-----
The correct certificate needs to be copy-pasted to it's own file. I named my copy verisign.pem. An alternative way to obtain the certificate is described here.

A root certificate is useless unless you can be certain that it hasn't been tampered. I ran
openssl x509 -noout -text \
-in verisign.pem -inform pem
and checked that the output matched with my browser's information on that certificate. That's probably nowhere near paranoid enough.

Using the certificate with ibrowse is easy. The last parameter of ibrowse:send_req/5 accepts necessary ssl options. A query using ssl with peer verification looks something like this
ibrowse:send_req(
"https://somehost/path",
[], get, [],
[{is_ssl,true},
{ssl_options,
[{verify,2},
{cacertfile, "verisign.pem"}]}]).
Here, {verify, 2} sets peer verification on and cacertfile provides the path to the root certificate. See the ssl-module documentation to learn more about the options.

I'm interested in learning if the Erlang's strength in distributed programming, fault tolerance and management would be a good fit with Amazon EC2. What do you think?

Sunday 8 July 2007

Adobe Flex, First Impressions

During the last couple of weeks, I've been working with Flex to see if it would be a better fit for the app I'm working on than AJAX.

It is.

Here's what I like about Flash/Flex:
  • Good support for OOP (OOP is a natural fit for UI development)
  • ActionScript is also a functional language (like Javascript)
  • Binding (a mechanism for stringing UI controls to data structures with minimal effort)
  • The platform is robust, compared to browsers
I don't like the sluggish compilation step during debugging.


It looks like Flash/Flex is pretty well positioned and moving forward in many fronts:
  • Open Sourcing parts of the platform and development tools attracts developers
  • Flash support is getting better on mobile devices (Nokia, Apple)
  • Flex is gaining foothold as an alternative UI for business applications (SAP)
I think Flex is well worth learning.

Friday 22 June 2007

Happy, Self-deceptive Entrepreneurs?

Andrew Wright writes about the difficulty of making realistic risk assessment.

It's the same feature as in Christopher S. Putnam's article , just placed in a business setting. Andrew points to a British survey that suggests that enterpreneurs are more prone to overly optimistic thinking than people on average.

Sooo... If happy delusions are necessary to avoid depression, and enterpreneurs are more optimistic than people on average, then entepreneurs should also be happier than people on average. Right?

Wednesday 20 June 2007

35% of coding time spent on IE/FireFox incompatibilities

David Berlind reports his discussions with Tim Hamilton of OpenTeams.

My experiences resonate with Tim's. I can't say if it's been 35% for me, but it's a big pain. However, it hasn't been enough to stop me using FireFox as the main develoment platform and only work around the incompatibilities in IE, even if I only have to support IE. The development tools available for FireFox are that much better.

Another problem I frequently encounter is the performance of javascript when the size of the dataset increases.

The latest Flash Player versions feature a JIT compiler ... I think I'll have to find time to play with Adobe Flex and Microsoft Silverlight a little. Bummer!! For some reason I fancy the idea of being able to create rich apps on plain browsers.

Tuesday 19 June 2007

Still Waiting ...

More than two months since I've signed up for EC2.

Travis Reeder has migrated three apps to EC2 and has summarized his experiences.

He also provides some advice on how to build apps on EC2. Which all make sense, but point number 3 might prove difficult if your data is highly structured.

Sunday 17 June 2007

Videos about Type Systems

A couple of Google videos about type systems.

Faith, Evolution, and Programming Languages
Philip Wadler


Advanced Topics in Programming Languages Series: Parametric Polymorphism
Phil Gossett



Phil Gossett's talk is based on papers from Wadler.
Wadler's talk covers more than just type systems, including
  • lambda calculus
  • Java generics
  • Links: Evolutionary Type System (mixing typed and untyped languages in a controlled way)