Getting Started With C#, Part 2

G

Gene Wirchenko

Dear C-Sharpies:

So now I have my C# book (Wrox's "Professional C# / 3rd
Edition"). On the back, it shows it being the book after "Beginning
Visual C#".

Should I get the beginning book? If so, which book do I get?
Have a look at

http://ca.wiley.com/WileyCDA/WileyTitle/productCd-0764543822,descCd-authorInfo.html
which has an apparent full title of "Beginning Visual C#, Revised
Edition of Beginning C# for .NET v1.0". Version 1.0? Even I know
that .Net is up to 4 or so. There is also
http://ca.wiley.com/WileyCDA/WileyTitle/productCd-0470502266.html
for "Beginning Visual C# 2010". If I should jump the beginning book
way, which book should I go with? I will be writing code for Windows
XP systems (and not 7) for at least a while.

Over 1000 pages to read. Just like uni again. And here I am
asking about YA book.

Sincerely,

Gene Wirchenko
 
A

Arne Vajhøj

So now I have my C# book (Wrox's "Professional C# / 3rd
Edition"). On the back, it shows it being the book after "Beginning
Visual C#".

Should I get the beginning book? If so, which book do I get?
Have a look at

http://ca.wiley.com/WileyCDA/WileyTitle/productCd-0764543822,descCd-authorInfo.html
which has an apparent full title of "Beginning Visual C#, Revised
Edition of Beginning C# for .NET v1.0". Version 1.0? Even I know
that .Net is up to 4 or so. There is also
http://ca.wiley.com/WileyCDA/WileyTitle/productCd-0470502266.html
for "Beginning Visual C# 2010". If I should jump the beginning book
way, which book should I go with? I will be writing code for Windows
XP systems (and not 7) for at least a while.

Over 1000 pages to read. Just like uni again. And here I am
asking about YA book.

2010 = 4.0

Wrox usually have 2 books:

Beginning XXX - for people with no/little programing
experience and need help with basic programming concepts and
how to use the IDE etc.

Professional XXX - for people with programming experience
that does not need help with basic programming concepts
and IDE - it outlines the syntax of the language in
the beginning and then goes directly into various types
of programming database, XML, GUI etc..

Arne
 
R

Registered User

Dear C-Sharpies:

So now I have my C# book (Wrox's "Professional C# / 3rd
Edition"). On the back, it shows it being the book after "Beginning
Visual C#".

Should I get the beginning book?

Read the first three chapters and then ask the same question. From the
back of the second edition

- quote -

This book is aimed at the experienced developer, although no previous
knowledge of C# or .NET is assumed.

- end quote -

regards
A.G.
 
J

James A. Fortune

Dear C-Sharpies:

     So now I have my C# book (Wrox's "Professional C# / 3rd
Edition").  On the back, it shows it being the book after "Beginning
Visual C#".

     Should I get the beginning book?  If so, which book do I get?
Have a look at

http://ca.wiley.com/WileyCDA/WileyTitle/productCd-0764543822,descCd-a...
which has an apparent full title of "Beginning Visual C#, Revised
Edition of Beginning C# for .NET v1.0".  Version 1.0?  Even I know
that .Net is up to 4 or so.  There is also
 http://ca.wiley.com/WileyCDA/WileyTitle/productCd-0470502266.html
for "Beginning Visual C# 2010".  If I should jump the beginning book
way, which book should I go with?  I will be writing code for Windows
XP systems (and not 7) for at least a while.

     Over 1000 pages to read.  Just like uni again.  And here Iam
asking about YA book.

Sincerely,

Gene Wirchenko

I have good news and bad news :). The bad news is that it gets even
"better" than that. After you have read many 1000+ page C# books, you
will have barely scratched the surface :). I suspect that the other
posters (almost all of whom have excellent C# programming skills) have
either understated the amount of time they actually devote to C# or
have inadvertently given the impression that the amount of effort
required is less than it actually is. IMO, to get good at programming
in C#, you will have to go after all the C# knowledge you can from as
many sources you can with an effort that borders on the fanatical,
maybe even greater. But the good news is that you might be able to
accomplish your immediate goals with substantially less effort than
that. More good news is that, according to Anders Hejlsberg, C#
develops slowly, so once you get caught up, it won't take as much
effort to stay current. The bad news about that is that C# has been
around for long time and you have a lot of catching up to do. Just as
your unix knowledge is not going to waste, the C# knowledge you gain
will not go to waste either. Here's a clue: The order that you read
the C# books in is important. For example, I recently bought the
following comprehensive C# book:

Pro C# 2010 and the .NET 4 Platform, Fifth Edition
Apress 2010
Andrew Troelsen
ISBN-13: 978-1-4302-2549-2

It is over 1500 pages. It did me very little good because I have
separate books that go into more detail for almost every subject area
covered in the book. I kept it for the few nuggets I might find that
are not available elsewhere. That book would have helped more had I
read it a year or more ago. Each C# book is different and each one
contributes to the gestalt of C# consciousness. In addition to books,
some potential learning resources include:

C# Language Specification http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf
C# Language Specification 4.0 http://www.microsoft.com/download/en/details..aspx?displaylang=en&id=7029
Visual Studio 2010 Trial Versions http://www.microsoft.com/visualstudio/en-us/try
MSDN Library http://msdn.microsoft.com/en-us/library/ms123401.aspx
Windows 7 and Framework 4 SDK Developer Center
http://msdn.microsoft.com/en-us/windows/bb980924.aspx
University C# Professional Development courses (assumes familiarity
with programming)
Microsoft's Professional Developer Conference videos
microsoft.public.dotnet.languages.csharp
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/topics?lnk=srg
C# General Forum http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/threads
MSDN Visual C# Developer Center http://msdn.microsoft.com/en-us/vcsharp/
Microsoft's Visual Studio 2010 and .NET Framework 4 Training Kit
Object Browser (Visual Studio 2010) http://msdn.microsoft.com/en-us/library/exy1facf(v=VS.100).aspx
Mono http://www.mono-project.com/Main_Page

Some helpful Non-C# books:

Design Patterns - Elements of Reusable Object-Oriented Software
Authors: Gamma, Helm, Johnson, Vlissides (The book is actually more
about software maintainability)
Concurrent Programming on Windows Author: Duffy
CLR via C#, Third Edition Author: Richter

Learning C# from reading one book is like trying to become fluent in a
foreign language from reading one book. One way to avoid knowledge
redundency is to use ebooks. I usually buy the paper version of
ebooks I find useful. My personal programming philosophy is that you
ignore either Microsoft software technology or open source software
technology at your professional peril. The beauty of C# is that since
it is now "their" idea, Microsoft provides lots of resources to
promote it. IMO, C# is the heart of Microsoft software technologies.
I like climbing steep learning curves. It causes your replacement to
need to be much more capable than your employer hoped for :).

Actually, I think you already know more C# than you let on.

James A. Fortune
(e-mail address removed)
 
G

Gene Wirchenko

On Tue, 26 Jul 2011 12:42:18 -0700 (PDT), "James A. Fortune"

[snip]
Actually, I think you already know more C# than you let on.

Ah, no. I have never written anything in C#, not even a "Hello,
world!". I probably know a lot of concepts that will be useful in C#,
but that is a different thing.

Sincerely,

Gene Wirchenko
 
J

Jeff Johnson

Dear C-Sharpies:

So now I have my C# book (Wrox's "Professional C# / 3rd
Edition"). On the back, it shows it being the book after "Beginning
Visual C#".

Should I get the beginning book? If so, which book do I get?

Learning C# is NOT the issue. The C# language is not that big or complex.
The true hurdle is the .NET Framework. This is what you will have to use to
do virtually anything non-trivial in C#. The language is just your gateway
into the framework.

I'm not saying you can "learn C# in 21 days" or anything like that, but even
if you memorized the entired ECMA standard, it would kind of be like
learning about all the parts of a car without ever having driven it. The
roads and traffic and all that other stuff would be the framework....

So, as James says, pick one book and start to play around. Eventually you're
going to have a question that a book won't answer (and let's be honest:
almost all books out there touch on exactly the same stuff and--more
importantly--DON'T TOUCH on exactly the same stuff) and that's when you'll
need to head out to the 'Net.
 
J

James A. Fortune

On Tue, 26 Jul 2011 12:42:18 -0700 (PDT), "James A. Fortune"


[snip]
Actually, I think you already know more C# than you let on.

     Ah, no.  I have never written anything in C#, not even a "Hello,
world!".  I probably know a lot of concepts that will be useful in C#,
but that is a different thing.

Sincerely,

Gene Wirchenko

The more concepts you know coming in, the better. Be sure to write
your "Hello, World!" program before reading the Design Patterns book
or you might end up with a program that is far too complex for the
task at hand. I wonder how some in this NG would write a "Hello,
World!" program that allows for tremendous flexibility or
maintainability.

James A. Fortune
(e-mail address removed)
 
A

Arne Vajhøj

Learning C# is NOT the issue. The C# language is not that big or complex.
The true hurdle is the .NET Framework. This is what you will have to use to
do virtually anything non-trivial in C#. The language is just your gateway
into the framework.

I'm not saying you can "learn C# in 21 days" or anything like that, but even
if you memorized the entired ECMA standard, it would kind of be like
learning about all the parts of a car without ever having driven it. The
roads and traffic and all that other stuff would be the framework....

The mentioned book actually covers quite a lot of .NET besides the
C# language.

My old version (.NET 1.1) covers C# in 250 pages and then start
at Windows GUI, database access, XML, files and registry access,
ASP.NET, web services, COM & COM+, remoting and Windows services.

Obviously the .NET Framework areas are not covered in detail, but
enough to learn namespace, some important classes and general
concepts. In practice enough to be able to Google after more
info.

Arne
 
J

Jeff Johnson

The mentioned book actually covers quite a lot of .NET besides the
C# language.

Yes, and many (most? all?) books do. I actually learned more about the .NET
Framework from a VB.NET book than anything I've ever read since, short of
MSDN! My point was that when you learn any .NET language, you actually have
to do two things: learn the language syntax AND the Framework, and it also
can help immensely if you learn to differentiate the two early on.
 
J

James A. Fortune

On Tue, 26 Jul 2011 12:42:18 -0700 (PDT), "James A. Fortune"


[snip]
Actually, I think you already know more C# than you let on.

     Ah, no.  I have never written anything in C#, not even a "Hello,
world!".  I probably know a lot of concepts that will be useful in C#,
but that is a different thing.

Sincerely,

Gene Wirchenko

Repost:

You'll want to write your "Hello, World!" program before reading the
Design Patterns book. I'd like to see what some of the posters in
this NG would come up with for a "Hello, World!" program that follows
the Design Patterns book guidelines for maintainability.

James A. Fortune
(e-mail address removed)
 
R

Registered User

Repost:

You'll want to write your "Hello, World!" program before reading the
Design Patterns book. I'd like to see what some of the posters in
this NG would come up with for a "Hello, World!" program that follows
the Design Patterns book guidelines for maintainability.
Maintainability shouldn't be a problem as long as the business rules
are defined in advance. Then potential designs can be considered which
satisfy the business rules. What are the business rules beyond dumping
'Hello World' to the console?

I tease because I can ... and also because I appreciate your
informative insights.

regards
A.G.
 
G

Gene Wirchenko

Maintainability shouldn't be a problem as long as the business rules
are defined in advance. Then potential designs can be considered which
satisfy the business rules. What are the business rules beyond dumping
'Hello World' to the console?

I tease because I can ... and also because I appreciate your
informative insights.

Think of internationalisation i18n and localisation.

Sincerely,

Gene Wirchenko
 
R

Registered User

Think of internationalisation i18n and localisation.
Should internationalisation i18n and localisation be parts of the
solution? I can't answer that question without an understanding of
user and business needs, wants, goals and definitions. If the content
is to be always delivered as "Hello World!" and never as "Bonjour tout
le monde!" adding localization will be a waste of time and money.

Good requirements and design analysis must be based upon what the
business purpose is, the minimal functionality which is core to
satisfy the business needs, the possible ways the proposal might be
satisfied, and how success will be measured.

In terms of maintainability, the design of the classic, single-line
'Hello World!' app seems totally appropriate. Overthinking an
undefined problem won't lead to a suitable solution and can easily
introduce technical debt.

regards
A.G.
 
J

James A. Fortune

Maintainability shouldn't be a problem as long as the business rules
are defined in advance. Then potential designs can be considered which
satisfy the business rules. What are the business rules beyond dumping
'Hello World' to the console?

Well, for starters, what if the string can change from 'Hello, World!'
to 'hello, world!!'? Is changing the text in the code editor the most
maintainable way to structure the code? That is a simpler case than
Gene's internationalization and localization idea.

James A. Fortune
(e-mail address removed)
 
R

Registered User

Well, for starters, what if the string can change from 'Hello, World!'
to 'hello, world!!'? Is changing the text in the code editor the most
maintainable way to structure the code? That is a simpler case than
Gene's internationalization and localization idea.

A better place to start is with the business rules and requirements.
Thus far the only thing known is the application needs to output
either "Hello World!" or "hello world!!" There's a switch involved
somewhere and two possible cases have been disclosed. Automating this
switch is impossible without knowing it's selection conditions.

My proposal would be to abstract the switch out of the application by
using dependency injection via the command line.

regards
A.G.
 
G

Gene Wirchenko

On Sat, 30 Jul 2011 18:50:53 -0700 (PDT), "James A. Fortune"

[snip]
Well, for starters, what if the string can change from 'Hello, World!'
to 'hello, world!!'? Is changing the text in the code editor the most
maintainable way to structure the code? That is a simpler case than
Gene's internationalization and localization idea.

I did not come up with that idea. If you wanted to illustrate
how to do i18n, using "Hello, world!" would be a simple example. HW
could be used as an example for many things. Another example is
source control.

Sincerely,

Gene Wirchenko
 
J

James A. Fortune

Registered User said:
A better place to start is with the business rules and requirements.
Thus far the only thing known is the application needs to output
either "Hello World!" or "hello world!!" There's a switch involved
somewhere and two possible cases have been disclosed. Automating this
switch is impossible without knowing it's selection conditions.

My proposal would be to abstract the switch out of the application by
using dependency injection via the command line.

regards
A.G.

I apologize for the latency issue that my posts are experiencing. I
was thinking more of being able to change the output to any string
desired. My knee-jerk reaction was to read an XML file to obtain the
string. Dependency Injection has a case where XML is read to
determine what the dependency itself is, so it seems to be a level
more abstract than reading a value from an XML file. I would be
interested in hearing more of the reasoning behind your proposal.

Gene Wirchenko said:
I did not come up with that idea. If you wanted to illustrate
how to do i18n, using "Hello, world!" would be a simple example. HW
could be used as an example for many things. Another example is
source control.

Sincerely,

Gene Wirchenko

How about:

Being able to change the "Hello, World!" string arbitrarily is a
simple case of the internationalization and localization example Gene
cited.

James A. Fortune
(e-mail address removed)

Consider what should be variable in your design. This approach is the
opposite of focusing on the causes of redesign. Instead of considering
what might force a change to a design, consider what you want to be
able to change without redesign. The focus here is on encapsulating
the concept that varies, a theme of many design patterns. -- Design
Patterns (GoF)
 
R

Registered User

Registered User said:


I apologize for the latency issue that my posts are experiencing. I
was thinking more of being able to change the output to any string
desired. My knee-jerk reaction was to read an XML file to obtain the
string. Dependency Injection has a case where XML is read to
determine what the dependency itself is, so it seems to be a level
more abstract than reading a value from an XML file. I would be
interested in hearing more of the reasoning behind your proposal.

In terms of design patterns dependency injection via the command line
satisfies all defined business rules and requirements without
introducing technical debt.

One thing that has not been considered is the business purpose of the
classic Hello World application. What changes can be made to better
satisfy that business purpose? It's never a bad idea to ask the
question "What problem were we originally trying to solve?" My
dependency injection suggestion would be subtraction by addition ;)

What started out being described as the Hello World app is evolving
into something totally different as requirements are gathered. These
things happen.

For all practical purposes using EA we can abstract away the input and
output. Both ends can be simply viewed as services. Perhaps they might
hang off an ESB but that detail is unimportant at the moment. All that
is left is the unknown piece in the middle. More requirements
gathering is needed before further abstractions can be made.

regards
A.G.
 

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