Programming

Programming

If you've got an interest in programming and web development, this category is for you!

The Programming category carries news and announcements about programming techniques, programming languages, development platforms and developer tools that we feel will be useful to developers who write software that builds upon or integrates with the Tucows platform. We know that our partner developers work on all kinds of web applications, so the articles we post aren't always Tucows-specific, but often cover general web development as well. Here, you'll find useful links, articles, advisories, opinions, how-tos and tutorials on topics of interest to web developers.

Windows Vista: Today's Scary Hallowe'en Experiment

'Jason' from 'Friday the 13th' and the case for the Windows Vista RC1 DVD.

I do most of my work on a 1.33 gig PowerBook G4, but I'm not going to say no to a company-issued computer with decent specs. Hence the other computer on my desk, a 3.0 gig P4 IBM ThinkCentre with half a gig of RAM, one of the standard issue machines here at Tucows. I use it mostly as a machine for testing sites and web applications in Windows, and occasionally, I'll do a tiny bit of Windows development on it. There aren't any important files on the machine, which made it a suitable subject for today's scary Hallowe'en experiment: installing Windows Vista RC1 (that's Release Candidate 1).

I got a copy of Windows Vista RC1 last night at a gathering held by Microsoft here in Toronto, where they invited a number of Toronto tech bloggers to see Vista in action and hear presentations on deployment and security. I took notes and will post them here later.

Earlier today, I attempted to install Windows Vista on my work machine and my notes from that experience appear in Global Nerdy, a tech blog I write with my friend George Scriban. The experience wasn't as smooth as I'd hoped.

Captain Christopher Pike from the original 'Star Trek', in his support chair.

Link

More "Ajax Experience" Notes Coming!

Let me take a moment to thank contributing blogger Tris Hussey for doing an excellent job on blogging the Blog Business Summit conference. Tris, you're doing an amazing job -- I salute you with a filet mignon on a flaming sword!

This is a quick note to let you readers know that I've got more posts about the Ajax Experience conference, and that said notes will cover more than just the swag at the conference (cool as it was).

I'd like to thank the organizers for putting on one of the best conferences I've ever attended. I could go on about how good it was, but I thought this photo of a projection visible from the lobby of the conference hotel, the Westin Boston Waterfront, would capture my feelings about the Ajax Experience:

View from the lobby of the Boston Westin Waterfront showing a projection that reads 'This is how it should feel'.

Swagging Like it's 1999: Ajax Experience Swag Report, Part 2

In this article, I continue with my look at the dot-com-bubble-esque swag and prizes being given away by the organizers and vendors at the Ajax Experience conference. If you haven't seen part 1 in this series, it's here.

Helmi

Helmi pen

Helmi, who bill themselves as "the only open source Ajax-based RIA development platform" were giving away the fanciest pens at the conference. The Helmi pens house a green LED, which gives off an eerie glow through their transparent barrels.

Google

Also present in the exhibit hall were Google, whose booth was essentially a recruiting booth. Instead of literature about their APIs or developer-centric events like the Summer of Code, they had half a dozen different pamphlets about job opportunities for Java back-end coders, UI and rich internet application developers and researchers.

Swag-wise, these were their offerings:

Google swag

  • Google gum: Haven't tried it yet.
  • Google pen: This one was pretty popular.
  • Google key fob: Optimizes searches for your house keys.
  • Google post-it notes: Handy for reminders, comes with subtle recruiting ad.
  • Google notepad: With lenticular cover that shows a different image depending on your viewing angle.

I asked if they were giving away the heated toilet seats for which their offices are now famous. They would've come handy in the Boston Westin Waterfront's aggressively air-conditioned conference rooms.

Apparently, if you asked really nicely, the folks at the Google booth had some of their coveted long- and short-sleeved t-shirts to give away as well.

Swagging Like it's 1999: Ajax Experience Swag Report, Part 1

Back during the days of the dot-com bubble, the quality and quantity of swag available at conferences was nothing short of amazing; I'd often have to buy a cheap duffel bag in order to haul the promotional booty, which I then gave as gifts to my co-workers. Here at the Ajax Experience, I'm feeling deja vu -- while the "exhibit hall" outside the sessions is occupied by only a handful of vendors, the swag and prizes available from both them and the conference organizers is impressive.

One big surprise is AOL's table. Ever since The September That Never Ended, AOL has had a pretty bad rep among the developer set. In the meantime, other "portal" players -- Google, MSN and Yahoo! as well as portal-like entities such as Amazon and eBay -- have been boosting both traffic and developer love by becoming programmable by providing APIs, through which specialized sites and mash-ups can be built. What, you might ask, is AOL doing here?

It turns out that they're here to woo the developer community and promote their developer site, dev.aol.com and their APIs and encouraging developers to use AOL services for their mash-ups. They've been surprising a lot of developers (myself included) by opening their pitch with "Did you know that MapQuest is an AOL property?"

They realize that they're late to the party, so they've gone to some trouble to make sure that their swag is good. They've created a series of "mash-up" t-shirts, like the "Geek" one I'm showing in the photo below:

Joey deVilla shows off his AOL 'Geek' t-shirt.

There are 6 shirts in the set. They're called "mash-up" shirts because you and your friends can wear different ones and rearrange yourselves -- that's the "mash-up" -- to form cute nerdy catchphrases. They've been very popular; people have been lining up for them here. Here's the set:

AOL's collection of geek-oriented 'mash-up' t-shirts.

Some of these shirts may seem weird out of context: "Garden" will make people think you're into horticulture, and wearing the "unwalled"  may convince people that you're either homeless or have poor impulse control.

Also on their table: USB cable extension cords, developer-friendly stickers (I found the Unix-hacker-friendly chmod 777 aol sticker amusing), quick reference sheets and a postcard announcing a contest for the best mash-up using AOL APIs. They've also included an AOL-branded sprial-bound notebook in the knapsack given to every attendee (I'll cover the knapsack's contents in a later entry).

Other goodies on the AOL table.

AOL's going to have a long, tough climb towards respectability, but they seem to be working hard at it.

The Ajax Experience's Opening Keynote

'The Ajax Experience' banner.

Maybe I'm getting old, but trying to catch all the interesting stuff at the Ajax Experience conference feels like running a marathon. The conference is packed with sessions and other activities; days 1 and 2 each have 12 or more hours in their schedule. Here's my first report, covering the opening keynote.


After a nice breakfast -- kudos to the organizers for going above and beyond the standard "continental" and throwing in some eggs, sausages, bacon and home fries -- the conference began in earnest with a quick "welcome" keynote by the Ajaxians, Ben Galbraith and Dion Almaer.

I imagine that for the organizers of a conference, doing a keynote has got to be physically trying. They usually have had very little sleep the night before, what with the last-minute preparations and things that always arise before the start of a conference. As a result, opening speeches by conference organizers are fairly lackluster -- but this one wasn't! Instead, we got a lively, funny, well-rehearsed start to the conference.

In addition to the typical bits of information about the conference, Ben and Dion gave an Ajax "state of the union address", in which they shared their thoughts about the current state of Ajax.

They posed this question: What the conference would be called if Jesse James Garrett hadn't coined the acronym "Ajax"? They listed a number of possibilities, including "The JavaScript Experience" and "The DHTML Experience", but then explained that although at least correct to one degree or another in a technical sense, these names would fail to capture the true meaning of what we're doing, and that's building better user experience for web applications.

It's for this reason that they say it's "Ajax" and not "AJAX": Asynchronous JavaScript and XML describes only a portion of the technical underpinnings and fail to capture the real revolution in how web apps are being written today.

"Everything old is new again," they said. It's true -- the technical prerequisites for Ajax have been around since Microsoft introduced XHR (that's the popular shorthand for XMLHttpRequest, the browser technology that makes Ajax possible) into Internet Explorer in 1997. Being a browser-specific feature, it wasn't used by many developers. Even when XHR was finally implemented in Mozilla-based browsers in 2002, it wasn't one of the features that was touted inthe press release. We'll have to assign bonus cool points to Brent Ashley, who figured out that there might be some very interesting uses for XHR before the wave of applications like GMail, Google Maps and Oddpost led Jesse James Garrett to coin the buzzword after which this conference is named.

Many user interface specialists have eschewed web development in favour of building so-called "fat clients" because of the severe constraints imposed by working within the browser. These constraints had a silver lining; Ben and Dion pointed to a quote by Marissa Mayer (Google's VP of Search Products and User Experience) in BusinessWeek:

Creativity is often misunderstood. People often think of it in terms of artistic work -- unbridled, unguided effort that leads to beautiful effect. If you look deeper, however, you'll find that some of the most inspiring art forms -- haikus, sonatas, religious paintings -- are fraught with constraints. They're beautiful because creativity triumphed over the rules. Constraints shape and focus problems, and provide clear challenges to overcome as well as inspiration. Creativity, in fact, thrives best when constrained.

They talked about how far Web 2.0 can go with the current set of constraints. We've got web applications that are coming close to providing a user experience similar to desktop apps. We've got interesting approaches like Comet,where the server continually pushes or streams data to the web client rather than the web client doing the polling. We're only seeing the first appearance of JavaScript frameworks, which are emerging with different philosophies, from MochiKit's "JavaScript sucks" point-of-view (Mochikit's slogan is "Making JavaScript Suck Less") to Dojo's "JavaScript is T3H SEXY".

As for whether our current constraints will be loosened, Ben and Dion don't think that will happen any time soon. Although IE7 fixes some problems, it runs only on Windows XP and later versions of Windows; Ben and Dion said that "IE6 will always be with us". There are some interesting developments with SVG and Canvas, but these have only been implemented in Firefox and Safari. As for things like Flash or Microsoft's "Flash-killer", WPF/E, time will tell.

Stressing that the Ajax Experience is about the User Experience, Ben and Dion talked about the introduction of a design track to the conference and also encouraged people to attend the accessibility presentations.

It was a well-done opening keynote, and it set the stage for a very busy, very informative day 1 at the Ajax Experience. Well done, guys.

My "Ajax Experience" Itinerary

'The Ajax Experience' banner.

From Sunday afternoon until Wednesday night, I'll be reporting from The Ajax Experience in Boston, the premier gathering of developers interested in building Ajax-ified web applications.

Take a look at the conference schedule. Content-wise, it's pretty meaty (six tracks!) and seems to offer something for Ajax developers of all levels. It's also pretty intense, with Monday's and Tuesday's sessions running until 6:45 and evening panel discussions running until 9 p.m.. I don't think I've seen a schedule this hardcore since the Ruby on Rails conference back in June.

Over the next couple of days, I'll be posting my general impressions and detailed notes and photos from the sessions I attend. I'll also be incorporating my notes into an internal training session at Tucows.

I have to tip my hat to Brent Ashley, local developer and longtime friend of Tucows. He's a presenter at the conference and as such, was entitled to two freebie passes, one of which he gave to me. He'll be doing a talk on alternate transport mechanisms, which I will attend.

After the jump, I've got a table of the sessions I'm considering attending. If you've got any suggestions or recommendations, let me know what you think in the comments.

more »

DemoCamp 10: Monday, October 23rd

Toronto DemoCamp logo

The next session of DemoCamp -- the Toronto area's show-and-tell for the software development community -- takes place this Monday, October 23rd at the MaRS Centre (101 College Street, right by Queen's Park subway station) from 6:30 p.m. to 8:30 p.m., followed by a social at a nearby pub. There's no admission to attend, and you're encouraged to ask questions!

The rules of DemoCamp are simple: NO POWERPOINT (or any other slideware)! We want to see working applications or prototypes in action, not marketing spiels! We're pretty open about what's demo-able at DemoCamp: desktop software, web applications, embedded software, hardware hacks, hobbyist projects, corporate applications, whatever. As long as you can demonstrate it and be interesting, it's fair game!

This is the 10th DemoCamp, and it'll feature the following presentations:

  1. Online Grading and Code Review, presented by Jennifer Campbell, Sana Tapal and Andrey Petrov
  2. BrokenTomb.com, the world's first commercial Smalltalk host
  3. PBJ-Web 0.1
  4. The effervescent Sacha Chua presents: Livin' la Vida Emacs!

If you've got something you'd like to demo, there's one slot available! You can sign up to take this slot over at the wiki page for DemoCamp 10.

This will be the first DemoCamp that I will not be able to attend; I'll be in Boston at The Ajax Experience, getting all JavaScripty and XMLHttpRequesty and blogging it here.

Upcoming Conference Appearances

The next month is going to be a busy one for many of us here at Tucows. In additional to the usual work stuff, some of us will be making appearances at the following conferences:

CASCON 2006 (Toronto)

CASCON 2006 logoI got a last-minute invitation to IBM's CASCON 2006 conference, which runs from October 16th through 19th, where I'll participate in the Social Computing: Best Practices panel. I'm thinking of catching the "Introduction to AJAX Technologies" workshop on Monday and the "Rails/DB2" workshop on Tuesday afternoon. Note that admission to this conference is free, including the food!

The Ajax Experience (Boston)

Ajax Experience logoHere's a good one -- Brent Ashley, who will lead the Ajax Transport Layer Alternatives session, gave me a complimentary pass to The Ajax Experience, which runs from October 23rd through 25th. This looks to be a very meaty conference for techies and I plan to take copious notes and share them with the developers here at Tucows as well as you, the readers.

ISPCON Fall 2006 (Santa Clara)

ISPCON logo ISPCON Fall 2006 is the premier conference for internet service providers, wireless providers, VOIP providers and internet businesses. Tucows people will be all over this one -- on the exhibit floor, doing the opening keynote and leading a couple of sessions! For the full details, check out this entry; to get a free pass to the exhibit floor and the keynote, see this entry.

Samples from SitePoint's "State of Web Development 2006/2007" Paper

SitePoint has recently published the State of Web Development 2006/2007 report, a 53-page document based on a survey of 5,000 web developers. Read on to find out what questions the developers were asked and to get a taste of the results.

more »

PHP Developers: Most Likely Type to Switch to Ruby on Rails

Rather than use words, let me let the graph below do the talking:

Graph: ' Developers who indicated they plan to start using Ruby on Rails

This graph comes from SitePoint's report, The State Of Web Development 2006/2007 -- 53 pages of "results, analysis and commentary on the state of Web Development in 2006/2007" based on a survey of 5,000 web developers. If you can't pony up the $795 single-user fee for the report, there's a free preview of the report as well as an article on the graph shown above.

A Student's Guide to Startups

It's on my long weekend reading list: the latest essay posted on Paul Graham's site -- A Student's Guide to Startups, which at first glance looks it an examination of the considerations of whether you should start or join a startup right after graduating, or after having been "seasoned".

Graham's an engaging writer and speaker. If you've got the time, go take a look at another essay of his, The Power of the Marginal, which is derived from his talk at RailsConf 2006 in Chicago, which took place in June. Better yet, if you want to catch his presentation mojo in action, check out the video of his keynote, which was shot by the nice folks at ScribeStudio.

Securing Your PHP Configuration

PHP logo Over at Ayman Hourieh's Blog, there's an article titled Checklist for Securing PHP Configuration, which lists several good changes to make to the php.config file of a production machine.

Sang Shin's Free Online Training Courses

[via dzone.com] Sang Shin, who runs the javapassion.com site ("the site of people who have Passion for Java Technology"), has some interesting free online courses:

More details after the jump.

more »

bytefx: Nice JavaScript/DHTML Effects in Just 2K

bytefx describes itself as "a fast, lightweight and crossbrowser library with some useful special effect [sic] for your web pages. I'm not sure how well it mixes with other JavaScript libraries, but its effects are visually pleasing and can be useful for your web applications.

developerWorks' Series on Ajax and REST

IBM's developerWorks has posted the first article in a series on Ajax and REST. In the article, author Bill Higgins states that as web applications become more "immersive" -- that is, more like traditional desktop applications -- there is an increased tendency to violate the web's architectural style: representational state transfer, a.k.a. REST. He walks through an explanation of what REST is, the dangers of breaking the REST architectural model and how Ajax can be used to build stateful-client/stateless-server applications that are both "immersive" and in harmony with REST.

A Quick IronPython Tutorial

If you've been meaning to try out IronPython -- the Python implementation that runs on .NET -- since its recent 1.0 release, the blog Learning Python has a tutorial for putting together this simple "Hello, world!" GUI app, where the button text changes to "Hello, world!" when clicked:

'Hello World' application in IronPython. /

How to Encrypt Passwords in the Database

One school of thought states that the best way to store users' password information is not to store the passwords themselves, but rather hashes of the passwords. When the user first signs up for an account, your application creates a hash of the password and stores that in the database. When the user logs in, your applocation creates a hash of the password entered by the user when logging in and compares it to the hahs of the password stored in the database.

This approach has the advantage of maintaning user privacy; you wouldn't be able to find out what your users' passwords are without a great deal of work. The downside is that you can't email a password reminder should the user forget his or her password (instead, you email them a link leading to a page that lets them define a new password.)

The article How to Encrypt Passwords in the Database covers handling password hashes with source code in PHP and VB.NET/ASP 2.0.

C#'s "Coalesce" Operator

Here's something I didn't know. C# for .NET 2.0 has the ?? operator, called the "Coalesce" operator. I'll explain what it does after the jump.

more »