Note
The file submission referenced in this post is no longer available on File Exchange.
I love Google, and not just because it is the best performing stock I bought this year. Jonathan Archer has written some very solid code for sending a query to Google to find out how many hits a query would generate.
What do I like about this code? First thing that caught my eye was that it was doing something that is not traditionally a technical computing task. This is more of a scripting problem, and MATLAB does it quite well. A strength of MATLAB is the flexibility to do lots of diverse things in one platform and bring that data into MATLAB for further numeric analysis.
The second thing that I liked about this code was the pleasant surprise I had to see how long the code was. Yes, you read that right. I knew that something like this could be done very simply, but crudely, in MATLAB in a few lines of code. Jonathan took the time to build all kinds of input validation, error trapping, and caching of prior results.
Third the comments are clear, the code itself is well structured.
These kinds of things are what makes for good code. MATLAB does not require you to be a computer scientist to write working code, but if you do have these skills you are going to be a in great position to get the full power of MATLAB.
Comments
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.