The Power of a Good Simple Code Example

Written by efimor on April 29, 2008 – 5:38 pm -

Recently I came across this article – Use the YouTube API with PHP. I didn’t plan on creating a YouTube mashup, but thought it would be a good exercise. In fact this is the first PHP script that I am trying out. But with some HTML and CSS knowledge and armed with a good example I was able in short amount of time and little effort, to create –> my first API page <– which shows tech related YouTube videos sorted by rating and views. It is simple and not perfect, as it seems few non tech related videos get in. but still, my first mashup page works! Cool.  

Thumbs up  to Vikram Vaswani who provided such a good example, explanations and links to extra resources!

Simple examples of working code are priceless, as you can build on top of them until they become more complex and the desired result is reached. They can be a huge time saver. Of course you need to know enough to read and understand what is going on in the example. But good examples will be simple enough to demonstrate the point, and will eliminate the need to read a lot of documentation.  

As they say “one picture is worth 1000 words”. Same goes for a simple code example, that you can just copy / paste and it works!

Have you ever needed a developer’s help and got the arrogant response: “Oh, it is so easy, no problem. Just do this and that”, then you try it for a while and it never works. So you ask this smartass to show you how simple it is, and for an hour the developer will sit with your computer trying this and that until he gives up and admits it is not so simple.  

On the other hand, there are other developers that when you ask them for help, will say “let me check and I will come back to you”, and after an hour you get an e-mail with a simple working example. Problem solved!

Collecting simple code examples that work well will pay off big time. Having friends to share the examples with, is the way to go. 

So if you have good examples or know sites that have – Just bring it on!


Posted in Development | 1 Comment »

One Comment to “The Power of a Good Simple Code Example”

  1. Qiana Says:

    Well said.

Leave a Comment

RSS