Friday, October 15, 2004

Blogging on Demand #3

Okay, this isn't a technical search that brought someone to my blog, but I thought it's be quite an interesting thing to write about since it's something I have (I think) a fair degree of experience in. And often colleagues at work ask me about it.

Mostly, they ask 'Why?'

Learning VB.net (via Yahoo)

Well, it's nice and vague, and I guess it is the title of my blog, so why not write a bit about my experiences learning VB.

Know that you know nothing
This I learnt after about 2 minutes playing with Viual Studio. I came from programming VBA and (gasp!) Access, thinking, 'Hey, know how this stuff works. I can write code that talks across applications, I know what a Select Case does.' I learnt very very soon that I didn't know diddly. I could talk for hours about the differences between VBA and .NET, but I'm not going to. You could try looking here for some inspiration. The 2 things that struck me first were

  1. The .NET framework is huge. To paraphrase Douglas Adams "The .NET framework is big. Really big. You might think the MS Word object model is a bit overwhelming, but that's just peanuts compared to the .NET framework."
  2. working with objects in VB.NET is completely different to working with objects in VBA. Nicer, I'll grant you, but nonetheless very different.
Unless you're really forced very hard to produce something concrete, it's very difficult to pick it up and start typing away.

In fact, I'll go as far as to say that I was so clueless about VB.NET when I first picked it up that even the help docs were next to useless for me. I mean, MustInherit? What's that all about?

Quickly, though, you'll notice something quite nice, though.

The world wants to help you (for free!)
It's true. There are a million and one places to find out about .NET. ASP.NET, WindowsForms.NET, Microsoft, everyone. If you need to find something out, it's all there. The .NET community rules. Honestly.

I sometimes post entries about webcasts and other various resources online. I love 'em. The web is a beautiful, beautiful thing for learning. But...

You can't beat a good bit of study
Unfortunately here's the pisser. Although there is more free interactive, lecture-based AV stuff out there than I have time to watch, there's nothing like sitting down for a few hours and reading. Studying is something that just unfortunately won't go away. No matter how far we advance in presentation techgnology, styles and material, if you really want to learn about something, you've got to graft for it. I tried learning a bunch of stuff through fluffy online tutorials and stuff, but when it came down to it, I learnt far more and got a much deeper understanding of the subject though just solid reading. In a way I'm lucky. I get the tube for an hour in the morning and an hour in the evening. There's 2 hours every day to just read and read and read.

An oh my, there are some books out there.

I'mk not going to start reviewing books, I can't be bothered, and hey, it's my blog. I found the Unleashed series and the teach yourself ... in 21 Days from Sams really good introducions to .NET. Personally I tend to stay away from the 24 hours books, butthat's just me.

The Dummies series is quite cool right at the very very beginning. In fact, it was this book that first made me think 'What, you can get a computer to do ANYTHING YOU WANT? Cool.'

Write stuff
I generally dont like doing the tutorials in books. I tried it, but here's the scenario I usually find:

Picture the scene. I'm sitting at home in front of my computer, book on my lap doing a tutorial. I type what it says in th book, nodding sagely at every line, saying to myself, yep. yep. Uhuh. Understand that.

Run it. Get an exception, AND THEN (here's the important bit) what do I do? Cancel the Unhandled Exception Dialog box and scour my code checking it against the book looking for the typo. Useful? I think not.

Instead, I just read the stuff think of a similar, but not identical problem, and try to solve that. Or, think of a task loosely based on the book example, but incorporate into it something I already know. I always find that where I thought I know loads, I actually know diddly when I come to integrate something that isn't in the book into the code I'm writing. Might just be me, though.

Or, do something kind of unrealted, but using just one bit of the stuff in the book. My favourite aplication I wrote, the one I'm most proud of, and the one I tell my friends (well, if we're being honest here, friend...) about is ASP2WMP which I wrote to explore remoting a bit. I got tired with populating a datagrid with the Northwind Products table. So I did something completely unrelated, but using just one apect of what I'd read that day. In fact, ASP2WMP was developed in several stages as I learnt about more stuff from the book I was reading at the time.

Answer questions
When I was getting my head round ASP.NET, I started answering questions in the ASP.NET forums. Sometimes I'd play it safe and stick to what I was absolutely sure of, but sometimes I'd try and solve a problem I wasn't too sure of and then come out with an answer. They weren't always particularly bad answers, either.

I don't know about anyone else, but I am very very lazy. That's why I started programming. I figured 'I really can't be arsed with all this work. Why can't I get a computer to do it instead?'. Well, being lazy, I really can't be arsed making problems for myself. The downside? No problems, no solutions. So I tried solving some other people's problems instead. I find that once I explain something to someone, it makes it much easier or me to crystallise that knowledge in my head too.

I think that's about all I've got to say about how I'm learning VB.NET. This is all just based on my own experience, mind you.

Oh yes, just one quick note, there's nothing annoys forum types (not me, but I occasionally see some pretty terse replies) than people eho just can't be arsed looking. So before you start asking other people questions, make sure you've checked:
  • The Help Files
  • The MSDN Library
  • Google
  • The forum itself, to make sure nobody else has come up against the same thing before
Just wanted to share. Sorry it's such a huge beast of a post. If you've got this far, then my heartiest congratulations to you. And thanks.

No comments: