Posts Tagged ‘reuse’

On being cleverly lazy – my talk at the WebExpo in Prague

Monday, October 19th, 2009

I am currently in Prague, Czech Republic and gave a talk on re-use, professionalism and ease of development at the WebExpo.

Webexpo Prague by  you.Webexpo Prague by  you.

Today I am going to have a longer chat with the people at the University about accessibility and creating a WAI-ARIA enabled framework for web applications.

For now, here are the slides of the WebExpo presentation and the audio recording of the talk. There was a video streaming, too, and it is up to Microsoft now to get this out as a recording.

Slides

Audio recording

You can download on being cleverly lazy as an MP3 - 36MB or see other audio options on archive.org

Notes / Transcript

Today I will talk about the fact that being cleverly lazy will make you a better developer.

First of all, I am Chris, a developer evangelist. This means I am a developer who evolved into a role where I can tell other developers how to have an easier life and tell my company what other things developers would want to make it even easier for them. I’ve written a developer evangelism handbook if you are interested in learning more about this role and why your company would benefit from having someone like me.

Cleverly lazy

Let me quickly define cleverly lazy here. Lazy is “I don’t want to do it” wheres cleverly lazy is “I don’t want to do that ever again so I do it right this time”. In development the difference between lazy and cleverly lazy is that lazy products do the job but are impossible to maintain whereas cleverly lazy products do the job, are easy to understand, extend and are built on a solid base.

Evolving the web

Our job as developers, designers, planners and organisers of web products is to evolve the web. We should have the chance to concentrate on building solutions that make people happy to use them rather than having to work out how one browser or another fails or how we convert data into a format the web technologies can display and understand.

In order to achieve this, we need to be free to do new things rather than worrying about the past.

The feature loop trap.

One problem is that as developers, we stand in our own way. The biggest trap that there is for developers is the feature loop:

  • As developers we love to take a complex problem and tackle it. We love solving problems, that is why we become developers.
  • We then normally and quite quickly find a simple solution to the complex problem.
  • We then release the solution to the world and get feedback.
  • This is where it goes pear-shaped. We get stuck in a feature adding and feedback loop until the elegant, easy and simple solution becomes a complex one again.
  • Other developers will find our former simple solution and will think “hey, this is a complex problem, let’s make that easy!”

This keeps us from evolving as web developers. We don’t develop the web, we fill it up with solutions to the same problem.

My solution

The next issue is that as developers we love to find solutions ourselves and not use other people’s information. We appreciate other people’s work but in the end we only trust ourselves to come up with the best solution ever.

Short attention span

The problem with finding and building own solutions is that we tend to lose interest in them really fast and then leave them behind as we already another complex problem to simplify. This leads to lots of half-finished solutions on the web that don’t get any love any longer.

Unmaintained code is a security problem

All the code that is not getting any love stays unmaintained on the web and becomes a wonderful attack vector for new security threats or vulnerability exploits. Nothing beats being up-to-date when you want to build secure systems.

Things web developers must know to do their job.

Looking at our job as web developers, here are the things you have to be aware of to build things that people can use.

  • The technologies involved
  • How browsers deal with these technologies and how they fail to support them
  • Security concerns and attack vectors
  • Usability and accessibility of the product
  • Internationalisation of our products
  • Performance concerns
  • Multiple platform support
  • Flexibility of the interface

Browsers suck

Browsers are the bane of our existence as they are unpredictable, unreliable, there are hundreds of them (in various configurations) and they are not being updated by people out there.

That is a lot to know and deal with. The good news is that you don’t need to know all of it.

Good developers are like librarians

Librarians are great people. Instead of knowing everything that is in the library they know exactly where to find the information to solve a problem. As a cleverly lazy developer you should do the same.

Build on a solid foundation

Web development libraries came around for one simple purpose: Make our life as developers easier and our work as web developers predictable. They make browsers suck less and work around differences in browsers. They allow us to use web standards and get results instead of bugs to fix.

Build with components

If you build web applications and interfaces take a look around for what has already been created for you. Almost every library comes with widgets that are tested, work for everybody regardless of ability and can be changed to your needs. If you build your own component you are very likely indeed to forget some very necessary functionality that a collaborative product already had put in.

Use a good debugging environment

You can’t write great products without being able to know what is going on. Luckily enough nowadays we have great debugging tools like Firebug, Yahoo Profiler, JSLint and validators of all kind.

Plan for extensions

If you build a solution, plan a way so that people can extend it without having to change the central code. The central code should only have to change when there is a new browser or platform to be supported or there’s a security fix. Other than that people should be allowed to extend by listening for events or using other API hooks into your product.

Read, use and write documentation

If you build something, document it. There is no such thing as code that explains itself, that is a myth and an arrogant one at that.

Use the web

One of the really cleverly lazy things to do these days is to use the web to build your product rather than building your product and putting it on the web. Distribute your content on specialised systems like Flickr, YouTube, Delicious and LinkedIn and then put it together in a centralised CMS. That way your site will be easy to maintain and not vulnerable to a single point of failure.

Use APIs

To achieve this you need to use APIs. APIs can take a lot of your time to read up on and understand which is why it is a good plan to use YQL as an in-between to avoid going crazy on authentication and understanding what parameters go in and what data comes out.

An example

As an example, let’s take a look at a web site built solely from data on the web, using YQL and PHP.

Thanks!

Thank you, remember if you use what is out there you have time to be creative. I want us to write code most of our time, not to fix bugs.

Working in the now – video of my talk at Paris Web released

Friday, December 19th, 2008

Paris Web – one of my favourite conferences last year – just released all the videos of the presentations. Most of the presentations are in French, but mine is in English:

In the talk I advocated re-using components and systems we already have to work faster, deliver better and have less hardware and software overhead in doing so.

These are:

Resisting the Feature Creature – Geek Meet Craiova

Tuesday, December 2nd, 2008

me speaking at geek meet in craivoa - Photo by Irina Aldoescu My talk at the Geek Meet in Craiova/Romania last week covered a topic that I consider terribly important right now. As developers we are constantly shooting ourselves in the foot and create new and improved bullets to make it hurt a bit less instead of not doing that.

We constantly complain about the world, our colleagues, the market and of course our “stupid company” but at the same time we got noone to blame but ourselves for a lot of the stupid things that happen to us.

As developers we have this tiny little bad adviser living in our heads: the feature creature*.

This one keeps telling us constantly not only to add more features to our solutions but it also gives us a terribly inflated sense of what our job is to bring to the world.

It makes us arrogant and ignorant to the solutions that other developers – just like us – already developed and offer for use. In short, it makes us do the same jobs over and over again as we know best instead of telling us to have a look around at what has already been done and tweak or extend it to our needs.

Instead of spending time on creating well-documented software that is built to be customized and allows for plugins and extensions we keep building the same software types we refuse to use ourselves as they don’t exactly do what we want.

Maybe it is time to shut the little feature creature up and work together on bigger, better and more stable solutions. It is not about who can make the fastest and smallest and most optimized code. This is an extra step we should take when we need exceptional performance, not the common use case.

If you want to go nuts on bringing the best out of hardware and technology, go and do some stuff in the demo scene, this is where I got rid of a lot of my bad habits.

I’ve put the slides up on SlideShare:

* The feature creature is not my invention, I heard it from a speaker in 2004/2005 at the PHP conference in Amsterdam, but for the life of me I cannot remember who it was. He was ranting about Struts a lot, I remember that.

Paris Web – Working in the now

Friday, November 14th, 2008

Yesterday I was one of the speakers at Paris Web and my talk was “Working in the now”:

me showing the slimming benefits of crowded trains. Photo by Xavier Borderie
Originally I meant to talk about HTML5 goodies and how to simulate them with Flash and DHTML right now (writing a small abstraction library) but seeing the latest rounds of crashes and layoffs I changed my stance and talked about things that we could be doing now to both secure our jobs and not lose all the momentum the standards movement got in the last few years.

I’ve explained the reasons and my thoughts on the subject in detail in another post here. In the talk I advocated re-using components and systems we already have to work faster, deliver better and have less hardware and software overhead in doing so.

These are:

The feedback so far was great, but there was also a lot of “yeah this is open source, but what if the company running it goes down and how can I trust it” questions. I will write something longer abut this soon, it is just very interesting to see that there is a big problem with free things and trust.

Working in the now

Friday, October 31st, 2008

I just finished my slides for the upcoming Paris Web Conference entitled “Working in the now”. Originally I planned to have a cool presentation showing things we will be able to use in HTML5 like native audio and video and their Flash and JavaScript equivalents that can be used right now.

Then I heard even more about the cost-cutting exercises the market (yes, and my employer) is going through and ditched the original idea. Instead I am giving a presentation that shows how we can right now use systems we don’t use to save money and time and work more efficiently. I think this is a better message to give out right now than to catch the latest technical craze out there.

We are not working in happy times right now and I am getting a terrible sense of deja vu.

2000 called, they want their silly decisions back

Seeing the economic downturn and the stock market debacles right now I am painfully reminded of the first .com crash and the effects it had. Back then I worked in an awesome technical team that created and ran a massive ecommerce site that had great products, happy customers and a totally mental money spending plan. Hence it went bust.

Morale was down the chute and a lot of very gifted people left IT to find their happiness elsewhere. Other, mostly technical people went “underground” and worked in agencies doing mind-numbing work for a paycheck until the market recovered and we were asked to “push the envelope” once more. If anything, the crash killed not only a lot of investment portfolios but it also killed great teams that worked together. This is happening again right now. You hardly find the heads of those who made stupid money-spending decisions or repeatedly flogging dead horse projects on a fence post but the blame (and job cuts) is administered first and foremost on the shop floor.

Diminishing headcount means bleeding of talent

As Douglas Crockford wrote, if there are layoffs to be made, better be swift about it (paraphrased). That works in the US, but in Europe the issue is a bit bigger.

You cannot just fire or “let go” people nilly-willy but there are a truckload of laws, consultation phases and methodologies to go through. These are great as they protect the rights of the employees but they also force employers to keep people in a state of flux for quite some time.

This state is terribly dangerous as morale is down, people are not working effective and instead spend their time wondering what the bleep is going on and who might not be there any more next week. The very sought after and talented people will brush up their CVs and not hang up on headhunters any longer and in general you will destroy the social groups that built over time and forged very successful professional teams.

This even happens in the groups themselves – instead of huddling together and making sure everybody works at peak efficiency people stop sharing and try to shine above the others. Even worse, anything that is out of the ordinary – for example business trips that have been planned months before – is seen as favoritism or “useless expenditure while others are laid off”.

In essence, layoffs are terrible and while they are an amazingly effective short time cost cutting exercise they actually will leave you with a far less effective company – as you not only get rid of some headcount but also a lot of talent.

What will (probably) happen now

The last time we were in this situation the people in charge of the business in IT companies felt cheated by their techies and fled into the arms of companies that promised effective working and immediate results with minimal technical knowledge or overhead. These were half-baked framework solutions and “enterprise CMS solutions” giving you the chance to build a cookie-cutter site quickly but requiring a lot of work every time you need to build something bespoke (never happens, right?).

I don’t quite think this will not happen this time, but we will see a lot more solutions that take a stance of being for “mashups”, “hacking” and “open to developers” but are in reality a cloaked way to tie developers to a certain framework, brand or environment. If that means it is easier for developers to build great solutions for end users and get a share of the money they made with ad sales that is great. Personally however I would love the web as a whole to improve and companies understand that distribution and decentralization as concepts are immensely powerful.

What will surely happen is that a lot of startups will go the way of the Dodo, and frankly I don’t care. I love innovation and I think having a small, new, struggling company with gifted people gives you a very fertile ground for it. On the other hand I have seen far too much money and time spent on ideas that were simply blatantly ripped off or stupid. In the current startup circus it is more important how you sell your image and what the hype potential of your product is and not what it helps the end user to achieve. I am generalizing a bit here and I shouldn’t – there are a lot of amazing startups and I do use a lot of products built by them I would hate to see go. Others however, I am happy to see die and the only thing that annoys me about them is the hype and money and time spent on them where other products and ideas struggle to get minimal funding. The fast rise and fall of startups make people not believe in long-term planning and giving people a chance as a way to get better results. We will only have another “death list” of failed innovation ideas that will become a rubber stamp for “let’s never touch this again”.

What we should be doing now

Well, a lot of the control is out of our hands. When push() comes to shove() money is the only decision factor and it would be arrogant for us as techies to claim we have an understanding or impact into how this whole game works. What (IMHO) we should be doing right now is to be as effective as we can and shout louder than ever that the natural effectiveness of good developers can save a company a lot of money if they listen to us. This includes first and foremost re-using of good information and code and this is where it is about time we stop navel-gazing and look around us. CSS frameworks, JavaScript libraries and tutorials are out there and all of them want to do one thing: make our work environment less random. Instead of seeing this as an opportunity we dismiss them most of the time as they are not right for what we want to achieve. All of the ones I am using are open source though and have very responsive development teams. So instead of writing yet another bespoke solution and not getting the time to test it why not build on something tried and true and extend it to what we need it to do?

The same applies to hosted services and “the cloud”. Instead of writing awesome long treaties on the subject or listen to hour long inspirational presentations about it why not just use what is out there? Why not do some internal presentations showing people how cheap it is to host files on S3 and do heavy computation on virtual machines rented for pennies instead of rendering work computers useless for hours on end?

I am very much looking forward to giving my Paris Web talk and I would love if I can inspire some people to go back to their managers and show them just how much is out there to use for free, if we only stop thinking about building everything ourselves over and over again and use what people offer to us anyways.