# Tuesday, August 14, 2007
« Learning to program, part 1 - What you c... | Main | Quickest way to free Silverlight trainin... »
This is Part 2 of a series answering the question:  Where do I start as a programmer:

16/08/2007 update - Fixed links

Historically, programming languages are often introduced with their Hello World example. It is completely trivial but also quite an informative place to start.

A Hello World may look like this, for a .NET Console application:

...in C#

class Program
{
   static void Main(string[] args)
   {
      Console.WriteLine("Hello World");
      Console.ReadLine(); // press Enter to close
   }
}

...in VB.NET

Sub Main()
   Console.WriteLine("Hello world!")
   Console.ReadLine() 'press Enter to close
End Sub

I won’t go into the exact details of this sample, but I will mention that the purpose of this trivial example is to illustrate that you are scripting a conversation between the computer and a program.  Magic does not live here.  Computers are just following instructions.

The value of starting a project on a rich framework like the Microsoft.NET framework is that plenty of the elemental pieces required to construct these scripts are supplied for you and arranged in a discoverable fashion. 

An exhaustive list of the pieces that are supplied in the framework is documented in the MSDN Library that you can install with the Express Editions and also online.

Follow the white rabbit, neo…

Start with some good quality learning guidance focused on Visual Studio:
…and don’t forget the web is littered with good and not so good programming tutorials.

Read other people's source code

The problem with tutorials is that they often leave off some important details in order to keep the example simple, thus you can only go so far reading tutorials.

Reading other people's source code can be very helpful in understaning how a technology is used in practice.  Some sources:
Start a project

Lots of people (ok, me – but probably plenty of others too) need a project to really get the programming juices flowing.  I need a problem to solve; otherwise I’ll just stare at the File -> New dialogue for hours.

What does this mean for beginner programmers?  Don’t think you have to look for problems that are new to science and have never been solved before.  Download.com  probably has hundreds of “note taking” applications, and “home movie database” applications.  The benefit of  starting a project at this stage of your career is not to solve a new problem – it’s what you pick up along the way.

Be generous with the constraints of your project.  Learning works best when it’s fun.  The last thing you need when starting programming is the stress of project constraints!

Start a blog

Grab an account at Blogger or one of the other blogging platforms and record your experiences.

Even if it is just “this is what I learned today” and “this is what I don’t understand today” posts there is still value in blogging:
  1. Blogging forces you to stream your thoughts down into words.  The cathartic effect this can have on your thoughts while learning a technology can hardly be understated. 
  2. Blogging is a great way to open a conversation with other people who are doing the same thing

For blogging on the train?  Try Windows Live Writer, but I often just use Word then copy-and-paste when I get connected again.

Be aware of support:

Of course, the blogosphere has a wealth of information ;-)

Some others:
...and there are literally hunderds more sites on the web of various quality and reputation...

What Else?  I'd love to hear from anyone via comments here on this topic.  What other bits should people go and get for programming on day one.

Listening To:  DAT323 Inside T-SQL (with Itzik Ben-Gan) from Tech.Ed '07.
Tuesday, August 14, 2007 2:14:01 PM (AUS Eastern Standard Time, UTC+10:00)  #    Disclaimer  |  Comments [3]  |  Related posts:
Learning to program, part 1 - What you can use

Wednesday, August 15, 2007 9:41:43 AM (AUS Eastern Standard Time, UTC+10:00)
Thanks Jimbo - as usual, u da man! I'll let you know my progress Sensei ;-)
Shane
Thursday, August 16, 2007 11:35:47 AM (AUS Eastern Standard Time, UTC+10:00)
Coupla broken links in your post Jim:

* ".NET Framework Quick Starts and Samples"
* "and also online."
Shane
Thursday, August 16, 2007 3:18:47 PM (AUS Eastern Standard Time, UTC+10:00)
Thanks Shane - The links should be fixed now.

James
Comments are closed.