Learning C# in 21 Days - Progress and Questions thread.

Associate
Joined
13 May 2004
Posts
1,491
Location
Wales, Wrexham
Okay, i havea copy of SAMS Teach Yourself C# in 21 Days in front of me, and i have just finished reading Day 1, and even though the theory behind the code was quite tough, i think i sort of understand it.

So i'm going to post in here my progress, okay it may take me longer than 21 days, but 21 days is my initial target.

Okay, so in Day one i've learned the basics of what programming entails, the idea behind C#'s introduction to the world and so on, reasons why it is a good programming language to learn and basic principles behind all programming languages.

There was a part on Encapsulation, Polymorphism and Inheritance, and i want to write out what i take them as, and wouldn't mind knowing whether i am along the right lines or whether i have grasped the wrong end of the stick.

Encapsulation refers to Objects effectively, an object that defines a circle outputs a circle, though the way the circle is worked out is 'encapsulated' in such a way that it keeps the user oblivious. If the object outputs a circle, all the inner workings out are irrelevant

Polymorphism covers quite a few things, if you were to feed an object certain arguments and depending on what arguments are fed into the object, different outputs are created - based on the information fed in, the output could be a square, circle, triangle.

Inheritance i find quite hard to explain, and i know the above two are rather hazy, so if anyone can summarize them in a way that makes more sense, i would be grateful!

As for the actual code itself, you are asked to copy the code that is in the book without any explanation as to what the code does, or why it is there.

Hello World was easy enough, the first WinForm application was a bit different however, for example

private TextBox txtBox1;

I assume this is defining a textbox with the name txtBox1?

Then further along

this.txtBox1.Location = new System.Drawing.Point(16, 32);

The (16, 32) appear to be co-ordinates, it is defining txtBox1's location however what does the whole 'this' thing actually mean, is there a way you can explain it? Obviously it has to be there to work, but what exactly does it do?

Sorry if i sound like a complete newbie, but well.. i am. (to C# at least!)
 
That actually makes quite a bit of sense, so each new dog 'Inherits' the properties defining a dog, yet gains new properties based on whatever else we may do to it.

Trying to get a headstart on Uni isnt as easy as i'd first thought!
 
Don't want to knock you off course, I'd really question jumping in to WinForms at this stage.

Console applications (i.e. command prompt windows) are a much better environment for learning the basics :)

While i would agree it would keep things much simpler, i'm following the course of the book - as i skim through most of the later lessons appear to contain console.writeline and so on, so i imagine this was an example - though being curious i just wanted to know.. XD
 
I'm not saying he is or is not right. What I'm saying is that anyone who thinks they can learn a language in 21 days needs mental help. It takes time, it takes trying to all sorts of carp with the language to understand one. Buying a book and following examples is probably the worst way of learning a language IMO. Like many threads in here, I recommend learning by doing. Let him set himself a task "by December I want to build an email client" that approach starts you on the path to learning a language, reading a one these "21 days" books is pointless.

I am not under the illusion that i can learn the language in 21 days, and i don't think the book even intends you to teach it to a good enough level after 21 days, all i wanted to do was pick a decent method to start from scratch, i have no belief i will be anything other than below average when the 21 days are up.

Although i do respect your points as well, it does make me want to follow an internet tutorial, the book contains far too much theory, although that could come in handy in the future.

I doubt i'll be building an Email client by december, but that would be a decent goal ;p
 
Thanks for the overwhelming response, after reading some of the feedback i actually looked in the sticky at the top of the Programming board and took a look at the first thing under c#.

Lesson one on there, when combined with the book is quite helpful - and the actual layout in terms of chapters is pretty much the same, the book may go deeper into the theory, but the website goes deeper into the code. With a decent mix of both, i reckon i'll do alright as far as learning goes.

As for an initial goal, i'm not sure what could really be realisitc - in my computing class ~5 years ago i made an appointment booking system with added features in VB, so making something similar wouldnt be too bad, though i feel once i get to the database stages it will be slightly trivial.

Any suggestions as for first projects? As previously mentioned an e-mail client sounds good, though also very hard i'd imagine!

A way to catalogue and rate my DVD collection could be quite good, but i'll see what you guys think.

I'll post a Day two update later on :-)
 
Back
Top Bottom