C# Beginings

G

grif

hey guys!

I've been posting a bit in the actual c# forum but the last day or so has
been pretty quiet so I thought that I would jump into the fray here.

I've recently started learning C#...in fact been at it for like 2 days so
far. I have to say...for a complete programming newb like myself...visual C#
is really easy to learn the basics off. It reads really clearly and the
compiler gives pretty darn clear error messages to follow. I'm already
adicted to it I think :)

I grabbed a copy of SAMS learn C# in 21 days and i'm following through the
lessons on that...currently up to day 5 and explanation of classes and
objects etc...its taking a bit to get my head around those differences but
the actual code seems to make sense at this stage. I'm already fairly
competent (for a beginnner) at writing various conditional statements and
controlling the program flow. The SAMS book initially, focuses more on the
console rather than the windws forms apps etc. For a beginners text I
thought it was pretty well written.

I was just wondering how long it took you all to get really competent at C#
and understanding .NET well? It seems the basics are actually fairly
straightforward and the syntax is pretty easy...I just keep expecting the
next stage to trip me up and stop my progress cold. I'm guessing that the
advanced stuff is fairly tricky...like multi threading and regex's and web
services etc.

Anyway, I started learning mainly because I want to eventually make my own
(self use) project that can strip some web results with multi-threading for
me to use and process locally. Hopefully in a month or so I might have an
idea of where to even start lol :)

Cheers
Griff
 
J

Jesse Houwing

Hello grif,
hey guys!

I've been posting a bit in the actual c# forum but the last day or so
has been pretty quiet so I thought that I would jump into the fray
here.

I've recently started learning C#...in fact been at it for like 2 days
so far. I have to say...for a complete programming newb like
myself...visual C# is really easy to learn the basics off. It reads
really clearly and the compiler gives pretty darn clear error messages
to follow. I'm already adicted to it I think :)

I grabbed a copy of SAMS learn C# in 21 days and i'm following through
the lessons on that...currently up to day 5 and explanation of classes
and objects etc...its taking a bit to get my head around those
differences but the actual code seems to make sense at this stage. I'm
already fairly competent (for a beginnner) at writing various
conditional statements and controlling the program flow. The SAMS book
initially, focuses more on the console rather than the windws forms
apps etc. For a beginners text I thought it was pretty well written.

I was just wondering how long it took you all to get really competent
at C# and understanding .NET well? It seems the basics are actually
fairly straightforward and the syntax is pretty easy...I just keep
expecting the next stage to trip me up and stop my progress cold. I'm
guessing that the advanced stuff is fairly tricky...like multi
threading and regex's and web services etc.

Anyway, I started learning mainly because I want to eventually make my
own (self use) project that can strip some web results with
multi-threading for me to use and process locally. Hopefully in a
month or so I might have an idea of where to even start lol :)

Cheers
Griff

Welcome to the community :)

As for regex being tricky, it isn't any more or less tricky than in any other
platform/language. Actually once you've gotten the hang of it... it's easy!
(not everyone would agree ;)).

Jesse
 
M

Mark Rae [MVP]

As for regex being tricky, it isn't any more or less tricky than in any
other platform/language. Actually once you've gotten the hang of it...
it's easy! (not everyone would agree ;)).

I'd agree that it's not any easier or harder in C# than in any other
language but, after nearly 20 years of programming, I still find it
extremely difficult...
 
S

Scott M.

I think you'll get different answers as to how long it took for people to
get used to C# and .NET because many people will have been coming to it with
very different backgrounds.

Some will be coming from Java and others from VB, some will come from C or
C++ and, still yet others from other environments.

And then there are people (like you) who are learning programming for the
first time (no bad habbits to break!).

The first key concept to get straight is that the language is one thing
(C#), but the framework, which provides all the servies the language needs,
is something entirely different. They work so nicely together though, that
most new folks can't distinguish between what the language is doing for them
and what the framework is doing for them. The framework is extremely
powerful and most of what you need done is done by the framework. You'll
use C# to "talk" to the framework. However powerfull, the fraemwork is also
separated from the language enough so that other languages can "talk" to it
as well. In fact, all the different .NET languages "talk" to just the one
..NET Framework.

So once you get this concept down (and learn about what the Framework is
responsible for and what it provides), the next big step is to (as you say)
get your head around Object-Oriented Programming and all of its concepts
(abstraction, encapsulation, polymorphism, inheritance - a.k.a. "The 4
Pillars of OOP"). This is where the bulk of your learning will take place
and can take many years before you can really claim to understand it well.

Believe it or not, learning the language (C#, VB .NET, J#, C++ .NET) will be
the easiest part of what you are learning. Knowing where to use curly
braces and semi-colons, learning the reserved words, learning how to write
program flow control and decision making statements, etc. are all pretty
standard things and is just a matter of memorization.

I would say though that after about 6 months of consistent practice, you
should be fairly proficient, but the learning doesn't end (these groups are
proof of that). Since the framework is really the engine driving the bus
and the framework is HUGE, after you get your OOP stuff down, you are free
to try to explore that in much more detail.

Good luck!

Scott M.
 
M

Michael Starberg

grif said:
hey guys!

Hi grif.

First off, I'd like to give the frown of a disclaimer that you seem too
skilled and ambitious to be a newbie.

That said, your post is similar to one I did a few years ago; just wanted an
opinion on how other people viewed system development.

Now that that had been said, I hope you don't mind me treating you as a
newbie and a pro, alternating.
I've been posting a bit in the actual c# forum but the last day or so has
been pretty quiet so I thought that I would jump into the fray here.

This is a fray. And it the posts moves fast from top to bottom. So in a few
days, nobody will remember this post. =)

But that is the charm of the newsgroup. Fast 'complete' questions, Fast
answers.
I've recently started learning C#...in fact been at it for like 2 days so
far. I have to say...for a complete programming newb like myself...visual
C# is really easy to learn the basics off. It reads really clearly and the
compiler gives pretty darn clear error messages to follow. I'm already
adicted to it I think :)

Hehe. I am just waiting for the leaders of the world declaring 'war on
programming-addiction'. Maybe C# will be like coke or heroine, while you can
get away with some pot JavaScript. =)
I grabbed a copy of SAMS learn C# in 21 days and i'm following through the
lessons on that...currently up to day 5 and explanation of classes and
objects etc...its taking a bit to get my head around those differences but
the actual code seems to make sense at this stage.

Learn several langauages at a time, is a great way to learn to code.
I'm already fairly competent (for a beginnner) at writing various
conditional statements and controlling the program flow. The SAMS book
initially, focuses more on the console rather than the windws forms apps
etc. For a beginners text I thought it was pretty well written.

Sams 21 days are known to get you into the 'fray' fast.
However, it is not enough. You need some academica as well.

Stuff like Ordos(N^2) or Ordos(Nlog2N) is mandatory to code well.
Hence, you need to get the 'system-engineering' part of programming.

You must know why BubbleSort sucks and why Quicksort is quick. And also be
able to explain why a BubbleSort is faster than a Quicksort on an already
sorted list.

Also, if you don't know what happens if you break 3NF in a database, and if
you don't want that, you won't have any solution to your problems.

Maybe you you want to break 1NF and 3NF per design. Why?
How much crack do you have to take to even begin to ER-model a violation of
BCNF?

So, some studies are required to be a good programmer.
No drugs are needed though, except for coffee or tea =)
I was just wondering how long it took you all to get really competent at
C# and understanding .NET well? It seems the basics are actually fairly
straightforward and the syntax is pretty easy...I just keep expecting the
next stage to trip me up and stop my progress cold. I'm guessing that the
advanced stuff is fairly tricky...like multi threading and regex's and web
services etc.

I wrote my first program when I was 8. I can't remember if it was a abc80
http://hem.passagen.se/kate66/abc80.jpg

or a Esselte 100 (except mine was blue)
http://www.pugo.org/media/collection/computer/esselte_100-1.jpg

Anyway, this was my first real program (words translated to english):

10 INPUT "WHAT IS YOUR NAME"; X$
20 PRINT "HELLO "; X$

So to answer your question, it has taken me a lifetime to learn how to code.
And I still think I suck at it! =)

But I really don't. I think I am a fairly good coder.
Anyway, I started learning mainly because I want to eventually make my own
(self use) project that can strip some web results with multi-threading
for me to use and process locally. Hopefully in a month or so I might have
an idea of where to even start lol :)

Well, if you want to learn to code fast, pick a simple 'project', like a
calculator that parses text and can only add and maybe subtract. Then move
on to code an object oriented tetris.

The key is; don't do it in one langauge. Instead of doing a super-tetris in
C#, I suggest you spend your time doing the boring calculator in C#,
whitespace, Java, C++, Delphi and AJAX/div/JavaScript and why not ASM?

THAT will teach you how to code
Cheers
Griff

Cheers Grif And Good Luck
- Michael Starberg
 
M

Michael Starberg

Actually once you've gotten the hang of it... it's easy! (not everyone
would agree ;)).

Jesse

I don't agree.

RegEx is a 'write only language'.

Hence, you can type a Brillant RegExp that makes sense to the author, but
are very hard to grasp as a maintainer.

I hate RegExps, but that may be because I have seen it overdone into
bombastic 100-dimension expressions. If the brainiac wasn't that brill
(bug), or the requiriments changes, you typically tear down and rebuild the
algorithm from scratch using loops.

But for simple things like validating if a email-address looks like one in
JavaScript, RegExps are great!

Agreed?
- Michael Starberg
 
M

Michael Starberg

Mark Rae said:
About six months...

I just have to brag and top my dear hero Mark...

6 weeks, as I am fluent in Delphi, it was easy... =)

RipOff
- Michael Starberg
 
M

Michael Starberg

I 100% agree.
Thanks for an excellent post.

I was focusing on 'languages', but your perspective on the 'framework' was
great.

- Michael Starberg
 
M

Mark Rae [MVP]

But for simple things like validating if a email-address looks like one in
JavaScript, RegExps are great!

Yes definitely. I have a whole rake of JavaScript validation routines, quite
a few of which use regular expressions most of which I've unashamedly
pinched from other sites etc.

I hardly ever use regular expressions in C#...
 
M

Michael Starberg

Mark Rae said:
"Michael Starberg"
message
I hardly ever use regular expressions in C#...

Nope,

Real Men(tm) uses linq or lambda expressions.. or a foreach.

But back to learning.
I think it must be hard for a newbie to learn how to code nowadays.

Just rambling:

Here is an ExpressionTree of T that takes an IQueryable<MostThings> that is
hidden by Extentions, Implemented by the class Sequence<What>, just to hide
the actual IQueryable<<>AnonymousType0'2[]>().Where<T>(lost => cw("I think I
am lost"));

If you or me would come from nowhere, I think we would think linq was really
hard.
Commodore-128, Atari-ST and Amiga was a great start, no?

I learned ANSI-C on a frekkin Digital VAX.

By learning slowly, I think anyone can become a coder.
But I am impressed by the young teens that manage to learn .NET and C# in
like days.

Impressive
- Michael Starberg
 
J

Jesse Houwing

Hello Michael,
I don't agree.

RegEx is a 'write only language'.

Hence, you can type a Brillant RegExp that makes sense to the author,
but are very hard to grasp as a maintainer.

I hate RegExps, but that may be because I have seen it overdone into
bombastic 100-dimension expressions. If the brainiac wasn't that brill
(bug), or the requiriments changes, you typically tear down and
rebuild the algorithm from scratch using loops.

But for simple things like validating if a email-address looks like
one in JavaScript, RegExps are great!

Agreed?
- Michael Starberg

This is also partly due to the fact that:
- people don't know enough of regular expressions to use a truly good tactic
to tackle the problem (usually leading to enormous expressions)
- people never embed comments in regular expressions (?#.....)
- poeple never use verbatim strings in C# to make their expression readable
- even the best C# programmers usually try to avoid regex (and parser/scanners
for that matter) like the plague, never truly mastering the technique.
- if you've had to maintain expressions from others, you probably hate regex
by now, while you should hate the others in fact

So these are the rules for Regex use:
- Use them right
- make them as simple as possible
- split the problem into multiple expressions, use passes for easch step
in the validation (as you would do in C#)
- combine the strength of regex with the raw power of C# when needed, don't
try to do everything with an expression. (also don't try to do everything
with string manipulation)(or is that part of use them right)
- comments, comments, comments (or is that part of make them as simple as
possible)

:)


Jesse

who has been teaching a regex class for the past 3 years and can still be
surprised by both the strange things people try to do with regex and the
powerful expressions I'd never before thought possible
 
M

Michael Starberg

Jesse Houwing said:
Hello Michael,

Hello Jesse

This is also partly due to the fact that:
- people don't know enough of regular expressions to use a truly good
tactic
Indeed!

to tackle the problem (usually leading to enormous expressions)

No Shit! =)
- people never embed comments in regular expressions (?#.....)

comments, comments, comments!
- poeple never use verbatim strings in C# to make their expression
readable

RegExps readable? What planet are you from, dilbert? *S*
- even the best C# programmers usually try to avoid regex (and
parser/scanners for that matter) like the plague, never truly mastering
the technique.

Too me more serious, you really have to master it.
- I would trust a Sensei in RegExps creating good ones.

Too bad that most coders suck at it. =)
- if you've had to maintain expressions from others, you probably hate
regex by now, while you should hate the others in fact

I hate the lame coders, that thinks they mastered it. Not RegExp per se.
So these are the rules for Regex use:
- Use them right

Thanks Master of The Obvious. =)
- make them as simple as possible
Yes

- split the problem into multiple expressions, use passes for easch step
in the validation (as you would do in C#)

Hmm. That would give a O(N) or even a O(N^2) problem.

If you need several expressions, RegExps are not the way to go. Use for,
foreach and while instead... .. ...
- combine the strength of regex with the raw power of C# when needed,
don't try to do everything with an expression. (also don't try to do
everything with string manipulation)(or is that part of use them right)

.... which we tend to agree with. =)
- comments, comments, comments (or is that part of make them as simple as
possible)

Jesse

The guru Knuth said:
- Whenever you feel the need to comment your code, check your code and see
how you can improve it to get rid of the comment.

Knuth has obviously never done any RegExps. =)
who has been teaching a regex class for the past 3 years and can still be
surprised by both the strange things people try to do with regex and the
powerful expressions I'd never before thought possible.

And I am calling it RegExps. Silly me.
Is the first lesson all about that it is called 'regex' and not 'RegExp'?

For real Jesse, thanks for a great post.

My Best Regards
- Michael Starberg
 
G

grif

Hey Michael and others!

Thanks for such an in-depth reply and you are right that i'm not a complete
newb, maybe to programming but not to technology. I used to be in the army
and I guess you could say specialised in remote sensing etc so I've sort of
developed a good grasp on the logic of what a particular application does.
Call it Psuedo code if you like :) Othert than that it is what i've sort of
picked up over the last few years of just reading...i read pretty much
anything I get my hands on.

Your right about the big FOUR being the pillars of a OO system and its
something that is taking much longer to grasp than just simply learning the
code...so i'm sort of getting my head around that before I go any further :)
I really just want to give myself the ability to code well and thats not
something I can learn simply by ROTE learning codes and expressions
etc....to excel I will need to get into the backend and kick the engine
around to see how it works :) Hence my need to understand everything, rather
than just the actual code :)

Anyway, thanks again for your response...and I apologise in advance for any
newb questions I might ask here from time to time lol :)

Cheers
griff

"Michael Starberg"
 
M

Michael Starberg

grif said:
Hey Michael and others!

Thanks for such an in-depth reply and you are right that i'm not a
complete newb, maybe to programming but not to technology. I used to be in
the army and I guess you could say specialised in remote sensing etc so
I've sort of developed a good grasp on the logic of what a particular
application does. Call it Psuedo code if you like :)

I call it thinking :)
Othert than that it is what i've sort of picked up over the last few years
of just reading...i read pretty much anything I get my hands on.

Your right about the big FOUR being the pillars of a OO system and its
something that is taking much longer to grasp than just simply learning
the code...so i'm sort of getting my head around that before I go any
further :) I really just want to give myself the ability to code well and
thats not something I can learn simply by ROTE learning codes and
expressions etc....to excel I will need to get into the backend and kick
the engine around to see how it works :) Hence my need to understand
everything, rather than just the actual code :)

That's the spirit. You'll be wizard in notime with that attitude.

Nothing is easy or hard, just interesting or boring. You can never become a
good coder if you don't like to code.
Anyway, thanks again for your response...and I apologise in advance for
any newb questions I might ask here from time to time lol :)

That is why we are here. To read and answer newbie questions and to laugh at
the really silly ones. :)
Cheers
griff

Every question is simple, once you know the answer.

One way to become a good coder is to read this newsgroup. I have gotten a
lot of inspiration over the years, just by reading questions and answers.

- Michael Starberg
 
S

Scott M.

Anyway, thanks again for your response...and I apologise in advance for
any newb questions I might ask here from time to time lol :)

No apologies needed. That's why these forums exist. Good luck!
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

grif said:
I was just wondering how long it took you all to get really competent at
C# and understanding .NET well? It seems the basics are actually fairly
straightforward and the syntax is pretty easy...I just keep expecting
the next stage to trip me up and stop my progress cold. I'm guessing
that the advanced stuff is fairly tricky...like multi threading and
regex's and web services etc.

http://norvig.com/21-days.html

Arne
 
A

Alan T

Hi scott,

Your opinion is great. Learning the framework itself is important, as there
are many .NET languages can 'talk' to the framework.
Do you suggest a good book that describe the framework?
I would like to read that book along with a C# book.
 
S

Scott M.

Hi Alan,

Most "language" (VB .NET, C#, J#) will have *some* discussion on the .NET
Framework. While there are many books out there on just the Framework, I
really do prefer reading a book that discusses it in the context of the
language I'm learning. In other words, if you read generically about the
Framework and find that it works based on "types" and types can be converted
from one into another, your next question might be, "How do I convert from
one type to another type then?". But, what you'll find is that each
language may have its own particular way of doing the same thing. So I
think you'll get more bang for your buck (and time) if you stick with books
about the language but read the chapter(s) about the Framework thoroughly.
Once you get the basics of the Framework down, you can then do research on
the specific things you want to learn more about.

I haven't looked at C# books for 2005 too much yet, but the Microsoft Press
C# Step by Step was pretty good.

Good luck!

-Scott
 

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