Work at paulcarvill.com, the home of Paul Carvill on the web

link: paulcarvill at flickr

paulcarvill.com

Hi, I'm Paul Carvill and I'm a web developer. I am Head of Interface Development at LBi, Europe's largest digital agency.

I also like walking, cooking, Bollywood and rock 'n' roll.

Archive for the ‘Work’ Category

Blending with colleagues and clients on a Hyper Island

Monday, October 10th, 2011

I spent the weekend having my mind blown by Hyper Island, a bunch of Swedish hipsters / digital media industry experts, who conduct intense learning experiences in a converted prison on the Karlskrona archipelago.

Hyper Island master class, Karlskrona

Over a long weekend in Karlskrona, Sweden, along with my LBi colleagues, selected LBi clients and a handful of journalists (one of whom has starred in TWO Bollywood movies), I attended a Master Class in blending prepared specifically for us by Hyper Island.

I had mixed expectations. There was some trepidation — I knew only a handful of the 35 attendees — mixed with curiosity and hopefulness. What did they want with me? Why were there only two technologists going (the other one was from New York)? What would I be expected to contribute? I had visions of them asking me to build them a website in 2 days. Thankfully they asked nothing of the sort. But I did have one of the most intense learning experiences of my life. And I never thought I’d say that about change management.

Hyper Island blending master class, Karlskrona

As an overview of what we looked into over the 3 days, here’s a summary of the topics which stood out enough for me to remember them with no notes:

  • We started by looking at transformational business change. Why it happens, or why it doesn’t happen, and what happens next.
  • We talked about what we hated about our business, our jobs, and the way we did things.
  • We talked about ourselves a little bit.
  • We talked about a new, non-linear culture, where participation is the norm.
  • We learned that if our clients are no longer a traditional destination for their customers, we need to work with them to identify their customers’ world and make them ubiquitous in it.
  • We talked about learning from failed businesses, especially those who refused to change (or changed too late).
  • We talked about helpful and harmful beliefs which a business (and its employees) can have.
  • We talked about value not being held in products, but in customers.
  • We talked about creating market spaces around customers.
  • We learned about identifying desired outcomes (what the customer really wants).
  • We learned to identify waste, remove it, and and add value instead.
  • We talked about creating a case for change in order to succeed.
  • We talked about changing the business creatively and imaginatively, but in a structured, disciplined manner.
  • We learned to identify the main types of people in our business, those who could help and those who could hinder change.
  • We talked about picking the best people, getting early wins, taking risks and being brave.

Pier, Hyper Island, Karlskrona, Sweden

As so often in our industry, there were a few too many references to Apple, Inc. for my liking. Everybody can’t be an Apple, if only because so little is known about the way they run things internally. (Although actually I think we could definitely learn from mid-period sans-Jobs Apple, when first John Sculley and then Gil Amelio were in charge and they were rapidly going down the toilet. Those guys really did fail to put the customer first.) However David, Alan and Jonathan, our presenters over the 3 days, were obvious, outstanding experts in their fields, and had case studies, data and references coming out of their ears. I never once doubted their credentials.

The 3 day course was structured perfectly to first frustrate us, then to stimulate us and eventually to allow us to explore ourselves and our business in depth. The mix of international offices, clients and journalists was spot on. Our international LBi cousins were a fantastic bunch, the clients really seemed to buy into the experience (they were often more vocal than we were!) and I always felt I was able to be fully honest, and that what I expressed would be held in confidence by the group.

I’m aware that the power of what we learned felt strongest when it was still within the context of learning and exploration, facilitated by Hyper Island. I was wary of bringing all of our enthusiasm and verve home, to a possibly cynical crowd. But over several informal conversations since I’ve returned it really seems like a huge number of people are thirsty for change and improvement, and perhaps have been waiting for their voices to be heard.

Momentum will be important. It was great to be among like-minded individuals, and that will help when we need to continue pushing for new ideas and new ways of working.

The power of feeling in the room at Hyper Island was obvious from the start. The group had a fierce collective intelligence, were hungry for change and want to create true blending, not just talk about it. Talking about blending when we really mean ‘working in cross-discipline teams’ is not enough. Again and again we asked how we could apply what we learned and discovered to our everyday work. I feel we have been given permission to propagate change. Hyper Island’s expert facilitation techniques ensure you see the problem clearly, as well as the route to a solution. But you are entrusted to find your own way there.

This might include finding new ways of working more closely with clients; finding new ways of generating ideas; entrusting decisions to people other than ourselves; saying ‘no’ more often, and offering a better alternative. We might need to be ready to teach others our skills and give others responsibility; be more honest, and accept others’ honesty; identify clients’ and customers’ real needs, and address them. And so on.

One of my favourite messages from the whole experience was this line from David:

“Customers don’t care what department you belong to and who owns what asset or technology or who reports to whom – it’s the unified experience they value.”

In other words — you are what you make, not what your title is. So, what have you made today?

Lighthouse, Karlskrona, Sweden

I felt privileged to have been invited to join the Hyper Island weekend. I thoroughly enjoyed it, and feel energised and invigorated. I highly recommend them to anybody wishing to look at their business in a new way.

Some other views on the weekend:

HR, PR, QR. Pick two.

Thursday, September 29th, 2011

How to handle a Python BadKeyError exception in Google AppEngine

Tuesday, June 1st, 2010

This drove me nuts an hour tonight. If you’re trying to get an entity key using something like:

yourKey = someString
candidate = Candidate( key=db.Key(yourKey) )

and you get a BadKeyError, it’s because the string you’re sending in isn’t the right length. Also, AppEngine doesn’t return None from the Key method but instead returns a BadKeyError exception. You can handle this by doing:

yourKey = someString
try:
   candidate = Candidate( key=db.Key(yourKey) )
except db.BadKeyError:
   # handle the exception here

Increasing memory limit for PHP in Rackspace Cloud Sites

Sunday, February 28th, 2010

If you install more than a few modules in your Drupal implementation the chances are that it’ll run out of memory and you’ll start seeing blank pages and odd behaviour. The fix for this is to increase the amount of memory allocated to PHP, which you can usually do in your php.ini file. But if your hosting is Rackspace Cloud Sites you don’t have access to the php.ini file. You must instead put your PHP settings in a .htaccess file in the root directory of your hosting space.

Here’s some example settings:

php_value memory_limit 96M
php_value upload_max_filesize 50M
php_value post_max_size 50M

Now, here’s the important bit: once you’ve made put those lines in your .htaccess file and FTP’d it to your webspace, the changes might not appear to have taken effect. I had to delete the original .htaccess file and upload a fresh one for my changes to be picked up. Hopefully this might help somebody else in the same situation.

N.B. Rackspace’s support had next to no idea of what I was talking about. Their Livechat support service was as useful as telephoning someone in a library and waiting while they went off to find the information. They obviously don;t support individual applications hosted by them, but I’d have expected a little more help.

In bed with CSSEmbed – using data URIs and mhtml to reduce HTTP requests

Friday, February 12th, 2010

My team at LBi have added a pimped version of CSSEmbed into the continuous integration process of the project we’re working on. CSSEmbed is a tool by Yahoo’s Nicholas Zakas which takes CSS files as input, searches them for usages of image URLs, locates each image file being used via its URL or filepath, converts it into base64-encoded data and embeds that data back into the stylesheet in the form of a data URI, replacing the original URL. This has the effect of reducing the number of HTTP requests your browser has to make to load all of the images a page requires — everything in the stylesheet is downloaded in a single request. Because the number of concurrent HTTP requests your browser can make is limited, using CSSEmbed increases the browser’s chances of downloading all assets as quickly as possible.

Image by jek in the box

Performance

In practice getting the best performance out of cssembed is something of a balancing act, and takes some trial and error to get right. The size of the CSS file bloats pretty quickly once you start embedding even relatively small images in it. My first attempt increased one CSS file from around 80KB to almost 900KB! Now, while this file only takes one HTTP request to fetch, it also blocks downloads in that request channel for the entirety of the time it takes to come down the wire. After some experimentation we found the sweet spot was to embed images that were less than 1k in size, as the increased CSS file size was in a much better ratio to the number of HTTP requests saved.

We’ve tested this using PNG, GIF and JPEG in Firefox, Safari, Chrome and IE versions 6, 7 and 8.

Comparison

Here’s a comparison of a page I picked at random from our current project, showing data for using data URIs, both with and without Gzipping of the transfers:

Page size (KB) Number of
HTTP requests
Avg cold cache download time (ms) Avg warm cache download time (ms)
Using data URIs 540 45 792.30 726.60
Using data URIs, gzipped 235 45 802.00 748.30
Using original css/images, gzipped 194 56 882.60 771.00
Using original css/images 483 56 849.00 773.60

That’s a 19% fewer HTTP requests. Pretty impressive!

Pimping CSSEmbed

With some great help from my fellow LBi-ers Andrew and Raul, we amended CSSEmbed to take more arguments than the standard version, including a maximum image size to convert to data, a .txt file listing the CSS files to convert, a file extension to append to the outputted files and a directory to output to.

Continuous integration

Here’s a quick list of the steps we took to automate our CSSEmbed process:

1. Create a manifest of the stylesheets you want to embed image data into
2. Add an ant target that executes the cssembed jar twice, once to create files containing datauris (for modern browsers) and then again to create mhtml files (for older version of IE). Supply argument lines as necessary. Our ant targets do the following:
a. Supply root URLs to be prepended to relative URLs in the stylesheet, so the cssembed jar can locate the image files
b. Specify output directories: /datauri and /mhtml, respectively
c. Specify a file extension for the mhtml files: mht
d. Specify the location of the manifest .txt file
3. Amend your page’s head to serve the appropriate stylesheets to each browser

Here’s one of our ant targets:

<java jar="tools/cssembed-0.3.5.jar" fork="true">
     <arg line="--root '${deploy.home}/${project}-build/'" />
     <arg line="-o '${deploy.home}/${project}-build/assets/css/mhtml'" />
     <arg line="--maxsize 1"/>
     <arg line="--mhtml --mhtmlroot http://${project}.build/assets/css/mhtml/" />
     <arg line="--outextension mht" />
     <arg line="'tools/css-manifest.txt'"/>
</java>

A brief word on mhtml

The reason we output the mhtml files with a different file extension and put them in their own directory is to work around some presentation bugs in IE7, specifically IE7 on Windows Vista. IE7 on Vista doesn’t seem to like parsing PNG files as mhtml data unless the data is hosted in a separate file and served up as Content-Type: text/plain. Putting the mhtml files in a seperate directory with the ir own file extension means our client can use Apache directives either to serve either files with that extension as plain/text, or to serve any files from a particular directory as plain/text. It gives them the option and adds no performance overhead at all.

Serving it all up

Finally, with some clever use of conditional comments, we can produce valid markup that will let each browser download just those files it needs to. Here’s how to do it:

* Stylesheets for all browsers go here
<link rel="stylesheet" href="/path/to/styles.css" />

<!--[if gt IE 7]>-->
 * The datauri stylesheets go here.
 * Modern browsers and IE > 7 will see them.
 *
 * Note that the opening tag of the
 * conditional comment above is fully
 * enclosed in an HTML comment.
 *
 * All IE browsers read the conditional
 * comment and act on it, so only IE 8
 * sees these links

<link rel="stylesheet" href="/datauri/styles.css />

 * Note again that the closing tag of the
 * conditional comment below is fully
 * enclosed in an HTML comment

<!--<![endif]-->

<!--[if lt IE 8]>
 * The mhtml stylesheets go here.
 *
 * Only IE < 8 will see them.
 *
 * This whole section is inside an HTML
 * comment, so only IE browsers read the
 * conditional comment and act on it.
 *
 * Only IE < 8 sees these links

<link rel="stylesheet" href="/mhtml/styles.mht" />

 * Note the closing HTML comment tag below.

<![endif]-->

<!--[if lt IE 7]>
 * Here's an example of another conditional
 * comment, for supplying IE 6 stylesheets
 *
 * This is nothing to do with cssembed, it's
 * just here for illustration

<link rel="stylesheet" href="/ie6styles.css" />

<![endif]-->

Now whenever our build script runs, our CSS files are checked for image URLs and new CSS files are created with image data embedded. At runtime each browser downloads the appropriate stylesheets using almost 20% fewer requests than before. This means the page is ready faster than it was before we used data URIs, and we've freed up bandwidth for other activity to take place.

Get Git to ignore Python .pyc files

Monday, January 4th, 2010

This will tell Git to ignore the files you specify by listing them in a special file, which you will tell Git the location of. This will only work on your local installation of Git. If someone clones your Git repository and adds files of the type you are ignoring, those files will be noticed and tracked by Git unless they also tell Git to ignore those files. For more on ignoring files on a per-repository basis, look here.

In Terminal:

git config --global core.excludesfile path/to/excludesfile

Then create your excludes file:

vim path/to/excludesfile

and add the files to exclude, using wildcards if necessary:

*.pyc


Why front-end developers are so important to the future of businesses on the web

Thursday, September 24th, 2009

or How traditional businesses who have moved to the web regularly undervalue their front-end web developers, and are worse off because of that

Distinction
The roles of web developers and web designers have been around for over 15 years now, and the role of a client-side or front-end web developer started to mature into a distinct entity around 10 years ago, as the content-presentation-behaviour layer paradigm became embedded in people’s working methodologies (and, with the introduction of Google’s then-new search algorithm, when the need for cleanly structured, easily indexable pages became, for businesses, not just an aspiration but a necessity). Unfortunately the perception of the front-end developer’s role remains somewhat coloured by an early association in observers’ minds with the other, loosely related role of the web designer. The role of web designer is an extremely important and valid one, but it is very different to that of the web developer, and the lack of a clear distinction between the two, in some people’s perception, is unhelpful and does both roles an injustice.

Skill set
The web developer (sometimes also called a client-side developer, front-end developer, web architect or front-end engineer) has a huge skill set and a job description to match. They are often expected and required to excel in many disciplines, and have good working knowledge of many others. They exist at the point where art, design, interaction, programming and behavioural and performance analysis intersect. Given the time, support and ambition of a good business, being a web developer can be an extremely fulfilling job. However, the role of a web developer is often misunderstood within even the most progressive and well-meaning of businesses.

Perception
The danger can be that front-end developers, working in a user-focused area, are seen as performing a superficial function — applying a polish to the heavy lifting done by another developer, say, or that dread comment, “making things look nice”. Let’s be clear, making things look nice is the sole responsibility of the designer. When front-end developers spend much of their time deploying underlying data received from a backend database into their views, or pages, they might mistakenly be thought of as merely translators or interpreters, transferring a graphical image — the Photoshop-ed design — into markup and style rules, purveyors of what is sometimes almost mockingly referred to as a ‘black art’ of making pixels lay out correctly onscreen. While this perception is perhaps unfortunate, it is understandable. It is a particular problem where a development workflow is — some might say artificially — segregated into database infrastructure/domain modeling/server side workflows/front-end workflows. In smaller organisations a front-end developer has the opportunity, if she wishes, to input into any of these areas. In larger organisations, the increased granularity of functional areas means those opportunities are greatly reduced, and as you can see from the segregation model above, the front-end development work comes at the end of a long chain of events and decisions which essentially shape and restrict the front-end developer’s choices.

Frustration
In such cases the development workflow is one-way, negates the developer’s architectural, organisational and behavioural skills and occurs late in the development process. This chronology minimizes the opportunity for the front-end developer to have effective input into, and feedback from, the interaction design they are now expected to code. This is a sad state of affairs and undoubtedly leads to frustration, feelings of being undervalued or ignored, and an extreme cases disenfranchisement and resignation, either in the figurative or practical sense. A good business will understand how highly-nuanced user behaviour is, and value skilled interpretation and shaping of that behaviour in the interests of improving their digital offering.

Value
The modern web developer has huge amounts of value to offer a business. Indeed the type of professional you often find in this role encapsulates the very best the web has to offer:

  • up-to-date knowledge of available and emerging technologies
  • extensive experience of implementing de facto web standards and programming patterns
  • database configuration and data manipulation
  • implementation across multiple platforms and legacy software applications
  • provisioning for mobile devices
  • data aggregation
  • graphics sourcing and creation
  • search engine optimisation (SEO)
  • a thorough understanding of the aesthetics and parameters of designing for the web

Further, the best web developers have wealth of knowledge and understanding around interaction design, user needs, hierarchies of data, navigation systems, user journeys, wireframing, design brief interpretation, focus group and usability testing and the art of a finely polished product. Largely gone are the days of HTML-monkeys, spending days on end converting Photoshop comps to pixel-perfect layouts. A web developer’s role is broad: from developing in what Yahoo!’s Nate Koechley calls ‘the world’s most hostile development environment’ — the browser — and ensuring cross-platform and cross-browser consistency, to working with art directors and designers and remaining true to their vision, to considerations and implementations of accessibility, usability and the overall user experience. A web developer is responsible for everything that sits on the client side of the web stack — the content, presentation and behaviour layers. Few other roles touch so many other key aspects of a business as does a web developer’s. Good businesses realise what an asset they have in their front-end web development team, and welcome their input into the product development process. Even better businesses have a User Experience team which encapsulates all those values, skills and judgements necessary to make great websites. Members of those teams are part of a feedback loop that results in great products, not just acceptable implementations of the first good idea that came up.

Slow
Large businesses and organisations move slowly. They may find it hard to understand they have developers whose skills and interests cross the boundaries their job descriptions impose on them. In addition, large businesses like to modularise their development teams into clearly segmented areas for planning and accountability. End-to-end developers don’t really fit this business model. Web development, certainly rapid prototyping at least, is moving away from monolithic relational database installs and towards schema-free, fluid data repositories like CouchDB and MongoDB. Many other layers of the application stack are now capable of being managed by a web developer. Most developers of this ilk, who are able to own the whole process from from domain and model definition, through to server infrastructure and on to a useful and appealing user experience, are running their own consultancies or are employed by the more enlightened web properties. Some examples of this type of person are Jeff Croft, Dan Rubin, John Resig, Jeffrey Zeldman, among many others. Functionality, data storage and interaction are increasingly moving to the client side (HTML5, Gears, RIAs, iPhone and Android web apps). The web stack sits on top of any technology, making the web developer one of the most versatile members of any business, let alone the technology department.

Undervalued
Unfortunately my experience has been that most large businesses massively undervalue their web developers, employing them in narrowly defined roles as the guys who make the site look nice, or fix the Javascript bugs that make the page break in IE. Larger business and the public sector have made moves towards working seriously on accessibility and usability, but the thinking behind such strategies remains superficial, those conceptual areas misunderstood. Too many people think of them in terms of awards and rating levels, not in ongoing process of improvement. Most of this work is also likely to be outsourced to a specialist third-party.

Career progression
One further, worrying, complication is the lack of clear career progression for front-end developers. Once you’ve spent a year or ten working in every nook and cranny of every browser out there until you can code progressively enhanced web pages blindfolded, what next? Economics and management structures mean there’s only so many architect or senior engineer roles to go round. The other option is to specialize in something and move forward from there. Current trends would seem to be leaning towards a big need for performance specialists in the next 5 years, as the client side moves ever further towards accommodating distributed, complex web applications. Page views will also continue their inexorable rise, placing stress and demand on infrastructure, databases and hardware, and thus even greater stress on a fast, responsive user experience.

Know your value
What does this mean if you’re a front-end or client-side web developer? Know your value. What are your skills? Are you a developer, an engineer, a User Experience architect or an Interaction Designer? Advertise your value. Shout about it. Don’t be knowingly undermined or ignored. Create a User Experience team within your business. If they’ve already got one, join it! Your job is incredibly important, and your present employer needs to realise that, as they stand to benefit.

Updated, 29th September 2009: just fixed a couple of typos

Technology can, and will, save the newspaper publishing industry

Tuesday, August 25th, 2009

Nik,

This started out as a comment on Nik Silver’s post but quickly turned into a post of its own.

I won’t get into the details of the extent to which the newspaper industry is dying, or why, because there are plainly more than enough commentators doing that already, many of them ill-informed and/or self-important. It’s pretty easy to stand on the sidelines of an industry experiencing a decline, in circulation though not necessarily in power or influence, and shout out well-meaning advice, much as one might stand on a river bank and shout “try boogie boarding” to a swimmer experiencing some trouble in the choppy water. But for all their chutzpah, some of these commentator’s suggestions do contain elements of truth which the newspaper industry would do well to acknowledge, and indeed sections of which have already done so.

Act like a startup

The point which irritates you so, Nik, understandably, the instruction to ‘act more like a startup’, is a naive one, and I’m not altogether sure the people shouting it from the river bank really understand what they themselves mean. But in its naivety and potential for misunderstanding there are some interesting concepts. ‘Startup’ is a useful shorthand amongst the never knowingly buzzword-averse self-congratulatory internet community for the kind of dynamic, vibrant, go-getting bunches of technically savvy kids that bubble up on a regular basis from sun-kissed California or, at a stretch, from the environs of a grey roundabout in London, to invent a cure-all solution to everyone’s online needs that will change your life, alter your children’s futures and also enable your fridge to tell you when you’re out of milk, and whose businesses seemingly run on smiles and laughter instead of cold hard cash.

People in other industries don’t run startups. They run ’small businesses’ — decidedly less glamourous — or, gasp, they are self-employed — about as far from glamour as it’s possible to get (all that paperwork…) But most people have never worked for a startup, and so don’t understand how they operate. Most startups do actually have investors, whether they are parents, friends, extended family or even plain old bank loans. Further, any startup you’re ever likely to hear about through TechCrunch or similar has proper, big investment from other businesses, and a smaller portion still have insulation from market forces and major investment from venture capitalists, themselves usually branches of multinational investment banks. So, how to reconcile these two views of startup culture? The answer is that startup culture is a concept based on a perception of the startup ecosystem as a whole. That’s where the idealism bordering on the fantasy originates. But while the distinction is important, it’s the perception that we’re interested in, and that could be helpful to the newspaper industry.

Culture and DNA

Simon’s point, that startups and pre-web established businesses have vastly different origins and thus business models — different corporate DNA, as he says — is a good one, but even he would have to admit that that is a weakness of the newspaper industry, which will need to adapt to survive.

My point, which I’ll illustrate here, is that when people tell newspapers, or any other industry, to act more like startups, the are invoking the visible perception of the startup culture as a whole, not any single element of it. And of that whole, people see only the successes. Of course, there is one benefit of this view — your sample is self-selecting — we only need to look at those startups which became successful and ‘made it’ (got bought, IPO’d) because they must have been doing something right. But if ‘traditional’ businesses can harness just a little of the spirit of that culture, the — yes — idealism of it, then they’ll be well on their way to changing themselves for the better.

Readiness to fail

To outsiders, startup culture shows a willingness to experiment, and a readiness to fail. Never mind that startups themselves are atomised to a massive extent — there are a dozen startups devoted just to monetizing the upload of pictures to Twitter, itself still, ostensibly, a startup — to an observer the startup ecosystem is willing to try any possible avenue of revenue, no matter how niche, and if it doesn’t work to try another one. Low overheads and low headcounts means it’s relatively pain- and friction-free for a startup to close down and it’s proprietor to try again another day. Many entrepeneurs are famously serial startup start-uppers. Newspapers, indeed most big businesses, for good or bad, can’t afford to try their hand at every passing opportunity that comes along. They have overheads, high staff levels, investors and strong unions to consider. But those same factors also mean they have the infrastructure and the backing to take well-considered risks, and they should take risks more often. One hindrance to a newspaper is the line of editorial policy that runs through everything they do. Newspapers, to some people’s fury, sometimes represent more than just business interests. They represent a political ideology, a social responsibility. They also represent decades or centuries old brand names. But the industry is surely mature enough that a newspaper can diversify its voice enough to allow some of its ventures to fail admirably? What is a brand name if it’s not strong enough to absorb an under-performing product.

Relentless innovation

To outsiders, startup culture looks relentlessly innovative. And it is. They’re often solving problems you never even knew you had. Usually small, driven by a strong independent spirit and urge to be the first to market, they are unusually open, agile and responsive to customer requests — having ’strategic agility’, in Simon’s words. They literally cannot afford to lost their market niche due to bad software or bad will. To this end, one of the most important points is that startups are not afraid to be in beta. Having your software released in beta status has become such a fetish it’s almost a parody. But the meaning is plain to see — the software is a work in progress, and will progress based on customer feedback. To come out of beta signifies an end to progress. I’m sure we’ll grow out of this silly fad, but for now it’s a useful shorthand that your software vendor is listening to you.

Technology can save you

The last point I’ll make, probably the most important one, is that startup culture — the culture everyone in the media is referring to when they talk about startup culture, not small business culture and your local council’s small business forum — startup culture is technology-led. That is, technology is the driving force behind the products, the innovation, the business itself. Technology is the fabric of the new economy, it pushes at what’s possible, and an industry has sprung up to exploit that. Three of the biggest failing industries right now are the music industry, the film industry and newspaper publishing. Three content-led industries right there. Run for years, decades, by content people. Content people and lawyers. While content producers excel at producing what they produce, and lawyers will always be necessary, neither of these groups is in any way qualified to predict where technology could take them, or how it threatens them. The music industry in particular buried it’s head in the sand and hoped technology would go away. Hollywood got a clue, a little too late after spending most of it’s technology energy on DVD copy-protection, ignorant to the fact that for every developer writing encryption software there were 10 more able to write decryption software. The music industry is pulling out of its nosedive. So how did these two behemoths manage it? Technology. The film industry, led by technology, is deploying digital cinema distribution, special 3d camera’s and projectors, and, led by sony, a technology company, Blu-Ray discs for home viewing. The music industry has been pulled out of its hole by, among others, Apple, and I’m sure Amazon and Nokia are helping out too. That leaves newspapers. While certain players are making headway based on technology platforms which were designed and built this century, many, many more are struggling to even comprehend how technology can not only help them, but save them.

I have the luxury of speaking from the trenches, working daily on the nuts and bolts of news on the web in the software development of a national newspaper, rather than on the board of that same newspaper having to make massive strategic decisions about the future of the company. But, if I had one piece of advice for anyone working at a newspaper and wondering where the future was going to happen, or how it might help them, or how they might help themselves, I’d point them in the direction of their technology department, if they have one. Go grab a software developer and ask them what they could build for you. If it’s one the web, it starts here, in ideas and code…

A collection of links about JavaScript and the MVC development pattern

Wednesday, August 19th, 2009

I’ve been doing most of my JavaScript development over the past 12 months in a Model-View-Controller pattern. This separation of function has a multitude of benefits for a programmer — it enables writing of clearer, more readable code, can result in more modular, reusable code and, perhaps most importantly, it enables a Test-driven approach to development.

Now A List Apart has published their own JavaScript MVC tutorial. It’s very useful, and very easy to follow. I recommend it as a starting point if you’re interested in this method of development.

Developing JavaScript in an MVC pattern is an especially good fit for web developers familiar with the now widespread, if not quite ubiquitous, separation of form and content in their programming methodology. Something like the paradigm which you apply to delivery of web content using HTML to provide data and CSS to provide the look and feel can be applied to JavaScript in an MVC pattern, where the Model provides the data, as might a server-side database, the Controller plays the part of the web server delivering that data and the View is the browser itself, rendering content to the page.

I’d also encourage developers to roll their own MVC framework rather than dive right in and using one of the existing ones, at least initially. It will give you a much better understanding of the pattern, it’s benefits and probably pitfalls, and will let you comfortably learn to extend your programming prowess at your own pace.

Note: you could also implement JavaScript on the server side using MVC, with the caveat that your View function is possibly less conceptually decoupled, but once you’re happy with the pattern this shouldn’t hamper you too much.

A List Apart: JavaScript MVC by Jonathan Snook
“At this stage of JavaScript and Ajax development and adoption, we need to consider separating our code’s components—MVC-style. Such separation may not be necessary in every situation—in some cases, it may even make things needlessly verbose. As our applications get more complex and require JavaScript interactions across multiple parts of our sites, however, separating JavaScript into Model, View, and Controller parts can produce more modular, reusable code.”

Ben Godfrey: Client-side MVC is maturing
“MVC is the dominant model for UI development in the desktop world. A modified form is very popular in web development. It makes a lot of sense to stick to MVC for RIA development. RIAs running in the browser (or Flash or AIR) bear close resemblance to desktop applications.”

A list of JavaScript MVC libraries and associated stuff:

I don’t use any of these, but they might be helpful for developers in a hurry. To be honest, the vast majority of my stuff is really VCS (View, Controller, Service), where the Service layer may be a remote API or HTML fragment which you needn’t model, but adding a Service layer isn’t a great leap once you’ve made the conceptual jump from more basic procedural JavaScript programming to MVC.

IE6 state of play linkage

Friday, August 14th, 2009

A few links to recent IE6 coverage.

Digg the Blog: Much Ado About IE6
“This goes directly to why most folks use IE6: they don’t have a choice. Three out of four IE6 users on Digg said they can’t upgrade due to some technical or workplace reason…Giving them a message saying, ‘Hey! Upgrade!’ in this case is not only pointless; it’s sadistic.”

BBC News | Technology: Microsoft backs long life for IE6 [support will continue until 2014, four years beyond their original deadline]
“‘Friends do not let friends use IE6,’ said Amy Barzdukas, Microsoft’s general manager for Internet Explorer.
‘If you are in my social set and I have been to your house for dinner, you are not using IE6,’ she said. ‘But it is much more complicated when you move into a business setting.’”

blogs.msdn.com | IEBlog: The Engineering Point Of View
“The engineering point of view on IE6 starts as an operating systems supplier. Dropping support for IE6 is not an option because we committed to supporting the IE included with Windows for the lifespan of the product. We keep our commitments.”

MoD to stick with IE6 despite security concerns
“According to parliamentary written answers received by Labour MP Tom Watson, the majority of [government] departments still require staff to use IE6. Most have plans to upgrade to the more secure IE7, and some to IE8, but the Ministry of Defence (MoD) has no plans to change.”

Conclusion: IE6, at least in corporate environments, isn’t going away for a few years yet.