x404.co.uk
http://www.x404.co.uk/forum/

Learning to program
http://www.x404.co.uk/forum/viewtopic.php?f=4&t=8591
Page 1 of 2

Author:  james016 [ Tue Jun 01, 2010 9:02 am ]
Post subject:  Learning to program

Hi all

In the last few days I have decided that it would be a good idea to learn to program. Mainly to expand my skill set and career options (way down the line). I have downloaded Visual Studio 2010 Express and have run through a couple of the tutorials.

Can anyone recommend any good beginner guides/books for VB and C# as I'd like to start with them though most likely one at a time. I was looking at the O'Reilly and Wrox websites but there are many books to choose from.

Many Thanks

Author:  EddArmitage [ Tue Jun 01, 2010 9:19 am ]
Post subject:  Re: Learning to program

Rob Miles is a teacher at Hull Uni, and a MVP, and he provides links to C# learning stuff (I wouldn't bother with VB.net), as well as his Yellow Book. If you come up with specific dificulties then I'd head over to Stack Overflow, but be aware that there are some rather detailed, obscure, dificult, (scary) questions asked there, although if you're willing to do some work and provide a minimal working example, you tend to get good answers.

Author:  forquare1 [ Tue Jun 01, 2010 9:33 am ]
Post subject:  Re: Learning to program

I don't have any book recommendations but:
Stay away from the X for Dummies books. Basically, once you've read one for programming, you've read them all for programming.

Apress and O'Reilly are both really good publishers and I would really recommend pretty much any book from them that you find, especially O'Reilly.

EDIT: VB isn't a bad language to start off on, though C# or Java may be best as they are somewhat similar, meaning you can almost learn two languages in one.

Author:  Nick [ Tue Jun 01, 2010 10:03 am ]
Post subject:  Re: Learning to program

I know a lot of people slate VB, and although it's not my favourite language - it is very simple. I personally think it's a good place to start, but don't limit yourself to it - after getting to grips with the basics I'd suggest moving on quickly to something like C or Java.

Author:  EddArmitage [ Tue Jun 01, 2010 11:00 am ]
Post subject:  Re: Learning to program

Sorry - just to add some clarification to my VB comment. Essentially, the advice not to learn VB first was because nearly everything you can do in VB.net you can also do in C#. There are a number of concepts I think it is important to learn early on, though, even if at a later date you use a language that doesn't implement them. I'm thinking of things like:

[list=]
[*]Static classes
[*]The ternary operator
[*]Case sensitivity - it's tricky and a pain to suddenly have to remember that case matters.
[*]Semi-colon line termination - as above
[/list]

Actually, as I'm writing this list, I think the main thing is that the look and feel of VB is less like a lot of more-modern C-like languages, such as Java, C++, Objective C, PHP, ...

Just little deviations in style more than anything else:

[list=]
[*]Code blocks are limited by curly braces in C#, and START-BlockName - END-BlockName
[*]VB has IF-THEN-ELSE-ENDIF style conditionals; C# has if(){} else {} styled ones
[*]C#'s keywords are more like what I'm used to from other languages
[/list]

Maybe I'm being fickle, and it has been a few years since I've done any real .Net development, and in that time VB does seem to have gained some features (Modules still confuse me, though! :oops: ). Either language will do you fine, and both have dot-net at their heart, but personally I would choose to learn a C-style language first, before a "wordier" BASIC-type language.

Author:  finlay666 [ Tue Jun 01, 2010 4:26 pm ]
Post subject:  Re: Learning to program

VB is a bad language to start with, simplest reason is that a lot of how you do things in VB are very different in other C style languages, and most of what you will learn you will have to re-learn at a later date with any other language.

C# (or as much as I hate to say it.... Java) are better to start with for also learning OO principles

What kind of programming do you want to do, what do you want to be able to make? Depending on the nature of what you want to be able to do really dictates where you should start.

I highly recommend the MCTS foundation in .Net development (70-536 IIRC) as a good starting block to learn the features of .net (and you can get a qualification doing that and another exam too)

I'll have a look when I get home at the books I used to learn from although I transferred from C++ so syntax etc wasn't a problem

I'd suggest Java or C# to start with (avoid C++ until you are competent, it gives you a lot of ways to do very bad things which you will do as a beginning dev)

Author:  Fogmeister [ Wed Jun 02, 2010 3:12 pm ]
Post subject:  Re: Learning to program

What Finn said.

Author:  james016 [ Fri Jun 04, 2010 10:37 am ]
Post subject:  Re: Learning to program

While waiting for the books to arrive I have been working through the tutorials on MSDN. I have played about with the Picture Viewer one and have managed to code it using the menu bar. What I would like to do is show the version number in the Message box that pops up when I click on the Help ==> About menu item. How do I do this as a Google search has left me scratching my head.

Author:  EddArmitage [ Fri Jun 04, 2010 1:33 pm ]
Post subject:  Re: Learning to program

Having seen it here, it would appear to be something like
Code:
String strVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();


to retrieve the version number as a string.

Author:  finlay666 [ Fri Jun 04, 2010 1:35 pm ]
Post subject:  Re: Learning to program

You would need to include System.Reflection also

Author:  EddArmitage [ Fri Jun 04, 2010 1:37 pm ]
Post subject:  Re: Learning to program

finlay666 wrote:
You would need to include System.Reflection also

Bah! Just include all of System.*! (8-p)

Author:  finlay666 [ Fri Jun 04, 2010 10:35 pm ]
Post subject:  Re: Learning to program

EddArmitage wrote:
finlay666 wrote:
You would need to include System.Reflection also

Bah! Just include all of System.*! (8-p)


No need to introduce bad habits including libs that arent needed!

Author:  forquare1 [ Fri Jun 04, 2010 10:51 pm ]
Post subject:  Re: Learning to program

finlay666 wrote:
EddArmitage wrote:
finlay666 wrote:
You would need to include System.Reflection also

Bah! Just include all of System.*! (8-p)


No need to introduce bad habits including libs that aren't needed!


I know it's a bad habit, but don't compilers get rid of unnecessary libraries? Or rather just don't include them?

Author:  finlay666 [ Fri Jun 04, 2010 11:56 pm ]
Post subject:  Re: Learning to program

forquare1 wrote:
I know it's a bad habit, but don't compilers get rid of unnecessary libraries? Or rather just don't include them?


Nope, you should have to do it yourself, it's why VS2005/2008 has a Remove & sort function for specified libraries to include

I think it's to do with loading DLL's among other things

Author:  EddArmitage [ Sun Jun 06, 2010 9:55 pm ]
Post subject:  Re: Learning to program

finlay666 wrote:
EddArmitage wrote:
finlay666 wrote:
You would need to include System.Reflection also

Bah! Just include all of System.*! (8-p)

No need to introduce bad habits including libs that arent needed!

Sorry, I wasn't being serious. This probably wasn't the thread for it though.

Page 1 of 2 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/