Live data from Hacker News

Show HN: My C# Tutorial Series: Coding Basics. How am I doing so far?

jeremymorgan.com

21–30 of 42 posts

Re: Show HN: My C# Tutorial Series: Coding Basics. How am I doing so far?

#21
One thing that jumped out at me right away is your indentation style which is a wee bit messy. New programmers need to be taught good/consistent coding style in the early stages of their development as well as how to use the language. Your examples should reflect what are generally accepted, though not mandatory, conventions.

The first thing I do if I'm coaching/mentoring a C#/.NET novice is to get them to follow the C# Coding Conventions [1] with Allman style indentation [2] and the Design Guidelines for Developing Class Libraries [3].

One other thing I would do is liberally sprinkle the tutorial with links to relevant further reading in the MSDN docs. A lot of new devs are overwhelmed by the MSDN library and often have no idea where to begin looking for reference material. Giving them good entry points so they can familiarise themselves with the official docs would be a beneficial addition.

[1] http://msdn.microsoft.com/en-us/library/ms229042(v=vs.100).a...

[2] http://en.wikipedia.org/wiki/Indent_style#Allman_style

[3] http://msdn.microsoft.com/en-us/library/vstudio/ff926074.asp...

Re: Show HN: My C# Tutorial Series: Coding Basics. How am I doing so far?

#22

FYI >> Using Statement - Defines the scope for your application’s objects and disposes them when they’re done. This isn’t super important now, but I’m going to cover some other ways we can implement using statements in C#. What you need to know now is it’s including the types in the System namespace in your scope so you can use them. This is entirely wrong. The 'using' in your example is the using directive, not the…

After looking at the documentation I believe you're correct. I'll fix my explanation of this so it doesn't confuse. Thank you.

My reason for focusing on the command line is simply because I want the reader to focus on the code, and the nitty gritty. The possibility of mistakes is high, which they'll learn from.

Visual Studio is the greatest tool I've ever used and you can't really build anything valuable without it but as a new programmer it also serves as training wheels that can build bad habits and hamper learning. That's my reason for doing the notepad / command prompt angle.

Re: Show HN: My C# Tutorial Series: Coding Basics. How am I doing so far?

#23

I find interesting that you took the approach of explaining a console application instead of a form app. More interesting from a technical point of view but maybe less interesting for a someone who just wants to hack something together to see what happens. When I started using C I always found hard to follow this tutorial because I like to use what I learnt in my own programs but I really did had no ideas of what con…

as I explained in another question it's mostly so the reader can get really "hands on" and write the code out by hand without code completion and other assistance. It may not be for everyone, but for core language stuff I think it's essential. Later in the series I'll definitely be integrating Visual Studio more

Re: Show HN: My C# Tutorial Series: Coding Basics. How am I doing so far?

#24

One thing that jumped out at me right away is your indentation style which is a wee bit messy. New programmers need to be taught good/consistent coding style in the early stages of their development as well as how to use the language. Your examples should reflect what are generally accepted, though not mandatory, conventions. The first thing I do if I'm coaching/mentoring a C#/.NET novice is to get them to follow the…

Thanks for the feedback. I'll make a note of that as the style I present the samples in, since this is tutorial for beginners the last thing I want to do is spread my bad habits.

Re: Show HN: My C# Tutorial Series: Coding Basics. How am I doing so far?

#25

My background: C# pays for my family, my wife is constantly jumping on and off random tutorials to learn some programming (interested in C# because of my dayjob and Python as a nice beginner's language with lots of learning resources). If I look at this article I feel that the flow is missing. It is well written, has nice screen shots and explains a lot. But it seems to hop around a lot. I don't quite know who you're…

I don't take it as bashing, I appreciate honest feedback. If everyone only contacted me telling me how great I am or how bad I am neither would help, so I prefer a good mix.

My aim here is for the serious beginner. By that I mean someone starting out who may have tinkered with a language or two but really wants to learn C# in depth. That's why it's so verbose and I try to cover the topics. A hacker who wants to learn the basics should probably go elsewhere.

I'm honest enough with myself to have already thought this through, and I may throw in some quick hacky stuff specific for what someone is searching for, but for the most part I want these to be a very thorough introduction to the language.

Re: Show HN: My C# Tutorial Series: Coding Basics. How am I doing so far?

#26
post #17

Great start Jeremy, I've read the entirety of chapter 3 and skimmed chapter 1, you have a solid foundation. However, I have a few, hopefully constructive, critiques: (1) As mentioned by qwerty69, links to the other chapters would help a great deal. (2) Your target audience is "newbies"? If that's the case, it makes sense that you would provide a little more explanation for critical concepts such as variables. In chap…

(1)I'm likely going to put in some sort of menu system for this on the side of the articles, I haven't figured out a great way to do it yet.

(2) Yes my target audiences is newbies who want a very thorough introduction. I plan on doing a whole tutorial on variables, my rough draft on types is huge, probably already bigger than this chapter was and I didn't want to crowd it up.

(3) You're dead on about the fluff, I probably should have let this sit a day and came back to it to strip it out. I may even use your suggestions verbatim.

Thanks!

Re: Show HN: My C# Tutorial Series: Coding Basics. How am I doing so far?

#27

What's your target audience? It seems too verbose for programmers and too specific to a toolset for those who are just starting out.

My target audience is newbies who want a very thorough course on the core language. It's not really intended for people looking for quick hacks to problems. Nothing wrong with that but I'm shooting more for the audience looking for a fairly deep understanding, though I know that target audience is much smaller.

Re: Show HN: My C# Tutorial Series: Coding Basics. How am I doing so far?

#28

Probably a minor point but it seems your screenshots all show Visual Studio rather than one of the express editions? This might be the best tool for the job, but IIRC VS has a non-trivial price tag which a beginner might not be willing to spend.

Yea I actually haven't installed express yet because my internet connection was at dialup speeds, I'll be replacing the screenshots, I plan on using express 2010 or possibly one of the 2012 versions for future tutorials. I know not everyone has the cash to fork out for MSDN or (as in my case) a company willing to pay for it.

Re: Show HN: My C# Tutorial Series: Coding Basics. How am I doing so far?

#29

I find interesting that you took the approach of explaining a console application instead of a form app. More interesting from a technical point of view but maybe less interesting for a someone who just wants to hack something together to see what happens. When I started using C I always found hard to follow this tutorial because I like to use what I learnt in my own programs but I really did had no ideas of what con…

as I explained in another question it's mostly so the reader can get really "hands on" and write the code out by hand without code completion and other assistance. It may not be for everyone, but for core language stuff I think it's essential. Later in the series I'll definitely be integrating Visual Studio more

I think you've made a good choice with keeping VS out of the picture. Understanding the basics of compiling from the command line is where I start with novices. No point blowing their minds with a gazillion IDE knobs and dials. You could take this further and teach some basic command line debugging :)

Re: Show HN: My C# Tutorial Series: Coding Basics. How am I doing so far?

#30
post #14

You've made a couple of interesting decisions (that I may not have done if I were writing this myself): * Picking CSC over Visual Studio for compiling initially * Explaining namespaces thoroughly in part 2, then glossing over them in 3 (I also don't know if I entirely agree with what's under "Using Statement") No major criticisms with structure/style/order. I find that when teaching a programming language you just wi…

My explanation of the using statement needs some work as another HN member pointed out, and I'll be modifying it. I am starting with CSC so people can get their hands dirty on the core language stuff, I'll be moving into Visual Studio as we start building more advanced stuff.

Also I'm going to fix some indentation issues as well. Thanks for the feedback!

Post reply on HN