January 18, 2010

No formal education? No worries, become the most prolific writer of all time... or maybe the U.S. President...

Whilst some of the names found on the list of self-educated people that made a difference on Hacker News this morning are common knowledge to many, I was stunned by some of them, which perhaps I shouldn't have been.

I have pulled some of the more notable names from the list and will shuffle them in a slightly different order to purposely skew your sense of perspective:

For contributions to literature:

  • Samuel Clemens a.k.a. Mark Twain
  • Leo Tolstoy
  • Hans Christian Anderson
  • Jane Austen
  • William Blake
  • Charles Dickens
  • F. Scott Fitzgerald
  • Ernest Hemingway
  • Herman Melville
  • J.D. Salinger
  • George Bernard Shaw
  • Edgar Allen Poe

World Leaders & Influencers:

  • George Washington - U.S. President - I
  • James Monroe - U.S. President - V
  • Martin Van Buren - U.S. President - VIII
  • Zachary Taylor - U.S. President - XII
  • Abraham Lincoln - U.S. President - XVI
  • Andrew Johnson - U.S. President - XVII
  • Grover Cleveland - U.S. President - XXII & XXIV
  • William McKinley - U.S. President - XXV
  • Harry Truman U.S. President - XXXIII
  • Karl Rove - George W. Bush's chief strategist (W's Puppet Master)
  • Benjamin Franklin - One of the founding fathers of the U.S.A.

Science, electrical engineering and communications:

  • Nikola Tesla - Inventor and pioneer, arguably the father of electrical engineering as we know it today. Refined the A/C power that we use today.
  • Alexander Graham Bell - Inventor of the telephone.
  • Thomas Edison - Inventor of the lightbulb along with 1000 other patents.
  • Albert Einstein - E=mc² - 'nuff said.
  • Michael Faraday - "The best experimentalist in the history of science". Carried out pioneering work with electromagnetism.
  • Reginald Aubrey Fessenden - Built the first power generator at Niagara Falls.
  • George Westinghouse - Founder of the Westinghouse Electric Company.
  • Guglielmo Marconi - Credited as the father of radio.

For contributions to computer technology and software:

  • Steve Jobs - co-founder and CEO of Apple.
  • Steve Wozniak - co-founder of Apple with Steve Jobs.
  • Bill Gates - co-founder and CEO of Microsoft - until he retired handing the reigns over to Steve Ballmer. The richest man in the world.
  • Paul Allen - co-founder of Microsoft, owns 80% of TicketMaster.
  • Lawrence Ellison - co-founder and CEO of Oracle.
  • Thomas J. Watson - Founder of IBM.

For contributions to entertainment:

  • Allen Konigsberg - better known as Woody Allen
  • James Cameron
  • Walt Disney
  • David Geffen - co-founder of DreamWorks and Geffen Records
  • Stanley Kubrick
  • Steven Spielberg
  • Quentin Tarantino

For contributions to the automotive, aerospace and travel industries:

  • Henry Ford - Founder of the Ford Motor Company - learned about mechanics by repairing watches.
  • Soichiro Honda - founder of the Honda car company.
  • Orville Wright - co-inventor of the airplane.
  • Wilbur Wright - co-inventor of the airplane.
  • William Lear - the Lear Jet.

Other notables:

  • Richard Branson - of Virgin fame.
  • Richard Grasso - Chairman and CEO of the New York Stock Exchange.
  • Florence Nightingale

So if you have no formal education, and you're wondering what to try your hand at next, your most likely choices are most acclaimed writer of all time or U.S. President, and if they're not your bag, world changing scientist or founder of a megalith computer corporation.

Good luck!

Programming maxims to live by

Today I came across some maxims in The Art of Unix Programming by Eric Steven Raymond that I think should apply across all platforms. I found this extract particularly relevant:
  1. Rule of Modularity: Write simple parts connected by clean interfaces.
  2. Rule of Clarity: Clarity is better than cleverness.
  3. Rule of Composition: Design programs to be connected to other programs.
  4. Rule of Separation: Separate policy from mechanism; separate interfaces from engines.
  5. Rule of Simplicity: Design for simplicity; add complexity only where you must.
  6. Rule of Parsimony: Write a big program only when it is clear by demonstration that nothing else will do.
  7. Rule of Transparency: Design for visibility to make inspection and debugging easier.
  8. Rule of Robustness: Robustness is the child of transparency and simplicity.
  9. Rule of Representation: Fold knowledge into data so program logic can be stupid and robust.
  10. Rule of Least Surprise: In interface design, always do the least surprising thing.
  11. Rule of Silence: When a program has nothing surprising to say, it should say nothing.
  12. Rule of Repair: When you must fail, fail noisily and as soon as possible.
  13. Rule of Economy: Programmer time is expensive; conserve it in preference to machine time.
  14. Rule of Generation: Avoid hand-hacking; write programs to write programs when you can.
  15. Rule of Optimization: Prototype before polishing. Get it working before you optimize it.
  16. Rule of Diversity: Distrust all claims for “one true way”.
  17. Rule of Extensibility: Design for the future, because it will be here sooner than you think.
I think these are all great rules of thumb that every programmer should adhere to.

January 7, 2010

Why am I suddenly getting type or namespace errors in my ASP.NET web application

I just spent the last 20 minutes bashing my head against this problem, and I know that at some point it's going to come back and bite me again and I'm not going to remember how I fixed it, so this blog post is really just a reminder to my future self that this is how I fixed it - hopefully it will help others too.

I just added files from our source code repository that were contained within a folder within my APP_CODE directory. No sooner as I added them and I started getting the following error at every line that referenced objects contained in other files that resided directly in my APP_CODE directory.

"The type or namespace name could not be found are you missing a using directive"

I immediately checked that the namespaces were referenced correctly - and they were. I checked that the classes I were referencing were marked as public and that I could access them directly, and indeed, they were and I should.

My colleague @JohnMacIntyre (in a rare moment of brilliance) told me to check the web.config for the compilation settings. Sure enough I found:

<compilation debug="true">
    <codeSubDirectories>
        <add directoryName="helpers"/>
    </codeSubDirectories>
    <assemblies>
        <add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    </assemblies>
</compilation>

I removed the <codeSubDirectories> section and hey presto, suddenly everything works again. The order of compilation is top-down with the APP_CODE directory being compiled last consequently if you have multiple folders defined here, code in earlier folders cannot be 'seen' by code in subsequent folders but not the other way around and none of the code in these folders can see code in your APP_CODE folder, however code in your APP_CODE folder can see all the code in those folders.