Good lord, when do I get to actually program?

J

John Salerno

Ok, I've been reading an intro book to C# and I'm learning a lot of the
basics. I can follow along with all the sample code and understand
exactly what it's doing, but I know there's no way I'd be able to write
the code myself.

Also, it seems like every time I come here, or read info online, there
is so much complicated stuff that I haven't even seen yet. Basically
what I'm wanting to know is, how long do you expect it to take a
hobbyist to actually be able to write programs? I know right now I'm
just learning the basics, but I'm having trouble seeing myself bridging
the gap from basics to actual programmer. Did anyone here learn a lot on
your own, or did you have formal training?

Just trying to gauge how I'm going to progress, I suppose...
 
D

Dave

Lol, it can be frustrating, yes.

What is the extent of your knowledge at the moment?
Are you familiar with the Windows API?
Do you understand what a Console window is?
How about a web application?

I suggest starting out with a simple Console app to play around with the language. Using books, MSDN and news groups can be very
useful, but as a beginner there will be no better tool for you to learn with than your intuition. Just start coding and see what
happens. If you have VS.NET, the "Object Browser" will be your best friend. Also, MSDN's C# docs are really thorough.

It shouldn't take longer than a couple hours with the help of VS.NET to get a simple Console app running but doing something useful
is another story :)


Is there something in particular that you need help with?
 
A

Ahmed Qurashi

Yeah it is frustrating, and will require Sisyphean perseverence to become an
Architect.

I tell my students who are really struggling with getting started to
download a project from c#-corner or gotdotnet. Something small with only a
file or two. And just hand copy the program, line by line (no cutting and
pasting!). It will give you a feel for the mechanics of writing code which
is completely different from reading it. Look up every keyword, class,
member etc in the documentation along the way. When you are done
transcribing, compile and fix your errors and re-compile until you obtain a
successful build. Don't start celebrating just yet though. You'll have to
actually see if it runs first and consequently debug any runtime errors (you
may have to come back here for help on framework issues). Learn to use the
commandline tools csc, cordbg, and ildasm to get a deep understanding. After
you get the program to run, start hacking it. Making little changes and
seeing what happens. Just play around. You'll begin to learn the little
things no one mentions in books.

Then when you are ready think of a simple project. Just make sure it's
something that will hold your interest because you'll probably spend hours
working on it. Just begin step by step. Create a form. Create a control on
the form. Create an event handler on the control, etc. It's not all that
different than writing the tests used in production. Tiny steps.
 
A

Andrei Pociu

Greetings,

True, that can get really frustrating, you read 300 pages of a book and
you're still not able to code something useful. I was in the same situation,
however when I started coding real life applications all the things I
learned from those books came in handy... well, most of the things at least.

After you get the very basics of programming you can start searching for
tutorials on the web, for a more hands-on approach. Even if there are some
things you might not understand in those tutorials, you can ignore them and
just copy & paste and move on, because it's very difficult to find a
tutorial that you can fully understand with knowing just the basics.

So have look at the following websites for hands-on tutorials:

http://www.c-sharpcorner.com/
http://www.geekpedia.com/ (this one's mine)
http://www.developer.com/net/csharp/
http://www.wwwcoder.com/main/ (since you might be interested in ASP.NET
development with C#)

CodeProject, MSDN and the others are usually more advanced and more focused
on experts than on beginners.

Yours,
Andrei Pociu
 
G

Gabriel Lozano-Morán

I have been programming in VB6 for years and started learning C# January
this year. When I first started I had the same problems. There were a lot of
new things I had to learn, things I had never used before in projects:

1) Full OO
2) .NET base class library
3) Multi-threading
4) ADO.NET
5) Enterprise Services (COM+)
6) .NET Remoting
7) Delegates
8) XML Web Services
9) XML Schemas
10) XSLT
11) ...

The list seemed endless but trust me, you well get to learn and understand
it in time and it will all be clear but for me it came with a great cost. I
still don't fully understand all the details. For months I have been working
in the evening and in the weekends reading books, reading articles, visiting
blogs, ... It took me several months but I really enjoyed the learning
process and I still am joining it!

Gabriel Lozano-Morán
 
T

terry856

Take it from some one who has been programming for over forty years,
there is no substitute for hands-on experience. Think yourself
fortunate to be starting with C# and the .NET Visual Studio: it makes
everything so much easier. Contrary to what some one advised earlier,
you do not need to worry about the Windows API at this stage: all that
is done for you. For me the golden rules are:
- Keep it simple. Avoid multi-threading, unmanaged code, COM and the
like; you can play with those later.
- Stay orthodox. Use what the development environment gives you for
nothing. Don't start inventing you own controls.
- Learn to get the best from dynamic help and intellisense. Believe
me, they're a godsend.

Don't be put off by all the smart alecs and show-offs writing to forums
like this. Most of them know nothing, which is why they have to show
how clever they. It's never clever to make things complicated: it's
only a sign of immaturity.

Above all, sit down in front of Visual Studio and code. Start with
"Hello world" and just add to it until you have exhausted the
possibilities. There are plenty of simple code examples on the Net,
but work with them; don't just look at them.

Forget formal training establishments. They are just rest homes for
tired developers.
 
G

Gabriel Lozano-Morán

Don't be put off by all the smart alecs and show-offs writing to forums
like this. Most of them know nothing, which is why they have to show
how clever they. It's never clever to make things complicated: it's
only a sign of immaturity.

I still learn a lot of new stuff by helping people on these forums with
issues they may encounter and I'm pretty sure that a lot of other posters
share this.

Gabriel Lozano-Morán
 
O

orekinbck

Thats the funniest thing I have read all day ... 'rest homes for tired
developers' !

I'm new to C#.NET, though I have been in IT for quite a few years.
Looking back on every training session I have done, I must say that 95%
of the time has been a waste. In the last training course I was forced
to attend, I played Solitaire for most of the time.

The key weakness with training courses is that most of us read alot
faster than we speak (horse racing commentators aside). If I had the
choice of 5 days off to study, or five days on a training course, I
would choose the study days every time.

Cheers
Bill
 
B

Bob Powell [MVP]

My advice to you would be to stop reading and start messing about.

You cannot damage the computer by writing code on it so whatever you do
you'll be learning.

Program something that has a visible result. Something like a graphics
program that draws lines or bounces a ball around. That way you can see the
results immediately.

Start off small with a new windows foms application. See if you can pop up a
message box in response to a button click.

The most important thing to do is to have fun with it. You'll never do that
with your nose stuck in a book full of code.
--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
W

Willy Denoyette [MVP]

John Salerno said:
Ok, I've been reading an intro book to C# and I'm learning a lot of the
basics. I can follow along with all the sample code and understand exactly
what it's doing, but I know there's no way I'd be able to write the code
myself.

Also, it seems like every time I come here, or read info online, there is
so much complicated stuff that I haven't even seen yet. Basically what I'm
wanting to know is, how long do you expect it to take a hobbyist to
actually be able to write programs? I know right now I'm just learning the
basics, but I'm having trouble seeing myself bridging the gap from basics
to actual programmer. Did anyone here learn a lot on your own, or did you
have formal training?

Just trying to gauge how I'm going to progress, I suppose...

If you are new to programming start by learning the basics of the OO
paradigm using one of the platform languages, stay away from forums like
these (or at least don't spend too much time on these) and certainly DON'T
get frustrated.
Begin with real small projects, don't use VS a decent text editor and the
command line tools are all you need, try to understand the basic concept of
the type system, move on to the types like ref/value classes and their
features , move on to inheritance and interface based designs. Don't spend
too much time with this you will learn while you move.
After that take your time to look at the framework, this is the core of
..NET. Start using VS, you get great help from intellisense and the MSDN
docs.Start with small console based projects, stay away from Windows Forms
for now, don't look at threading. Learn the platform specific features like
delegates move on to events. At the same time try to understand the runtime
basics, learn something about GC and the JIT.
After that you can start with Windows Forms, again start with small
projects, try to understand the event driven nature of windows. Take a
careful look at more complex issues like multi-threading, learn how and more
importantly when to use them (they are largely overused in .NET).
When you are there you can come back here post your issues and learn more
from others. But be prepared to accept that you can't possibly know
everything all the others together know, there is simply no need for it(and
no time)

Willy.
 
J

John Salerno

I appreciate all of those responses! I was a little afraid that I might
get some "Then just stop learning to program" replies, but you were all
very understanding and helpful.

Basically, my background is a year of C++ in high school (so obviously
not too indepth, but it's amazing how much of that has stuck with me
over the years and that is helping me remember and learn new things
now). I've always been interested in programming, for some reason. I
just find the subject fascinating, and I enjoy the learning process as
much as actually *doing* it, but I'd still like to make something
eventually! :)

Recently I began creating game modules for a game called Neverinter
Nights, and for a while I was using a script generator to make the
scripts I needed. But one day I started reading about what a couple of
functions did, and once I began to really *see* what they were doing as
I wrote them myself, I picked up that scripting language in a matter of
days. Granted, it's not a high-level programming language, but it was a
decent accomplishment.

For now I think my goals are to learn the basics of C#, then move on to
Windows Forms, then finally Web Forms (still not sure what these are,
anyway). I don't really know a lot about API, ASP.NET, .NET Framework,
etc. etc. Like I said, my background is slim and I'm purely a hobbyist,
at least for now. (Let's just say no one's going to hire me as a
software architect any time soon!)

But I plan on re-reading all these posts and keeping at it. It's
something I enjoy, I just need to remind myself not to get overwhelmed
with too much at once.
 
J

John Salerno

John said:
I appreciate all of those responses! I was a little afraid that I might
get some "Then just stop learning to program" replies, but you were all
very understanding and helpful.

Basically, my background is a year of C++ in high school (so obviously
not too indepth, but it's amazing how much of that has stuck with me
over the years and that is helping me remember and learn new things
now). I've always been interested in programming, for some reason. I
just find the subject fascinating, and I enjoy the learning process as
much as actually *doing* it, but I'd still like to make something
eventually! :)

Recently I began creating game modules for a game called Neverinter
Nights, and for a while I was using a script generator to make the
scripts I needed. But one day I started reading about what a couple of
functions did, and once I began to really *see* what they were doing as
I wrote them myself, I picked up that scripting language in a matter of
days. Granted, it's not a high-level programming language, but it was a
decent accomplishment.

For now I think my goals are to learn the basics of C#, then move on to
Windows Forms, then finally Web Forms (still not sure what these are,
anyway). I don't really know a lot about API, ASP.NET, .NET Framework,
etc. etc. Like I said, my background is slim and I'm purely a hobbyist,
at least for now. (Let's just say no one's going to hire me as a
software architect any time soon!)

But I plan on re-reading all these posts and keeping at it. It's
something I enjoy, I just need to remind myself not to get overwhelmed
with too much at once.

P.S. Right now I have SharpDevelop and Key of C# as IDEs, along with
UltraEdit and other text editors. I don't have any Microsoft IDEs yet,
because I'm waiting for the final release of the Express Editions, then
I plan on getting the one for C#, and eventually Web Developer.
 
S

Steve Walker

"Willy Denoyette said:
If you are new to programming start by learning the basics of the OO
paradigm using one of the platform languages

I agree with Willy, absolutely. You can learn the C# language very
quickly, particularly if you have previously used C++. You can find out
how to achieve a particular objective using the framework classes as and
when you need to do so; the library is huge, and much of it may never
actually do something you want.

Properly understanding object orientation will take longer, but it is
worth doing, and it will make writing large, complex programs much
easier than trying to write them using a procedural style.

A good book on design patterns may also help, even if much of it seems
incomprehensible to begin with. The point of this is that it will
explain certain ways of structuring systems which have proven to be
useful for others and which you can then apply to your own problems.

I like "Patterns of Enterprise Application Architecture" (Fowler), but
it is focused on building corporate systems, and I think the value of a
lot of it only really hits home if you already have experience of the
problems being solved.
 
J

John Salerno

Steve said:
Properly understanding object orientation will take longer, but it is
worth doing, and it will make writing large, complex programs much
easier than trying to write them using a procedural style.

Yes, you couldn't be more right. After learning a scripting language, I
think I'm inclined to look at a program procedurally (plus, it just
seems like the default way of writing a program, i.e. one thing happens
after another). Object-oriented program is starting to take shape for
me, but I'm still not quite comfortable with it yet.
 
J

John Salerno

Gabriel said:
Why not download the Visual C# Express Edition at
http://lab.msdn.microsoft.com/express/vcsharp/ and play around with that?

I'd like to, but I've heard that sometimes you have to reformt to
completely get rid of the betas, and I don't want to do that. I'm afraid
if I just uninstall it (even by following all those detailed steps),
that something might somehow get left behind and affect the final
version when I install that.

Unfounded concerns?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top