4 ms·
How to Learn C# Part 2 - Namespaces
- ericHosick 14y agoIf you are trying to explain what namespaces are, conceptually, then it may be better to talk about the general idea of scope.
- JeremyMorgan 14y agoI thought about covering scope and some of those issues, but the article started to get really long. I do agree it ties in with the subject matter well, and will likely be 2nd part to the namespace discussion.
- Spearchucker 14y agoIt's pretty well written, and decent reading for a beginner. You do name this a C# tutorial, so I assume your objective is to teach new programmers the C# language. To that end I'd say that there are many such resources already, and ask what you intend doing better than established tutorials? Ever since I discovered the formal world of architecture I've thought of doing a tutorial that starts at the end. Describe a simple problem, for example order entry. Then identify the high-level components, e.g. Order Manager, Customer Entity, Data Access Component, and so on. Use a diagram, a bit like the component model at http://wittenburg.co.uk/Entry.aspx?id=5919c0a5-dcb5-4e5d-be02-80932dc29fc4 http://wittenburg.co.uk/Entry.aspx?id=5919c0a5-dcb5-4e5d-be0.... Then create a new blog post/chapter on how each component is built, integrated and tested. Finish off with a very real deployment scenario, such as Heroku. Or Azure. THAT, I think, would be of huge value to aspiring developers.
- mattmanser 14y agoI'm going to be honest, as not being defies the point of your post. You say it's for absolute beginners. If this is something you'd like to do, you need to think of it from an absolute beginner's perspective. The first post: Why bother with csc. You don't give enough information to make it worth it. There's no mention in the first post of how the console works, how to open it, navigate using cd, etc. You don't tell them to create the new helloworld.cs file in the csharp folder, notepad++ will probably save to the user documents folder by default. So if they even manage to open the console, they'll probably be in the wrong place and most of your commands will fail. Even skilled power users capable of complex Excel, etc. will probably trip up on these. Personally I don't even know why it goes into csc, which I've never used in 7 years coding c# professionally. Lots of books do this too, I just don't understand why! msbuild, yes as an advanced topic, but csc? Why would you self-compile or write C# without visual studio? Especially as you ask them to download visual studio. You also don't tell them how to run the code. If they do notice the play button, it'll close as soon as they run it, as the consoles automatically close on run in the default debug mode, unless you ctrl+f5. That means no-one will see your program run unless you put a Console.Read() or Debug.Break() in there, which will be very confusing. The 2nd post: I feel the namespaces post is far too complex and is focusing on completeness in the subject rather that comprehension. All an absolute beginner needs to know about namespaces is that to use certain bits of built-in functionality they need to reference the dll and then use a using statement. A new programmer's not going to be mucking around with namespaces, all their code will run in the namespace of their project. OTOH they will need to know they need to change the namespace if they cut and paste code though, to fix the problem that will inevitably occur because they've introduced a new namespace by accident.