TheSwamp

Code Red => .NET => Topic started by: Josh Nieman on March 05, 2008, 02:51:38 PM

Title: .NET Help
Post by: Josh Nieman on March 05, 2008, 02:51:38 PM
Maybe we should have a section in the Teach Me forum for .NET in general?  Seems lots of people are showing interest in this language...

anyways...

I'm having a bit of trouble finding some good beginner resources or basic setup how-to guides for starting out with either VB.NET or C# in .NET

I don't care which I learn, heck at this point, whichever one reveals itself to have better resources in distribution will win my practice.

I am a total noob though, and most of what I see is people already experienced, already knowledgable, already with a good foundation of knowledge of programming talking about .NET and I get lost quickly.

Any help for the newb?
Title: Re: .NET Help
Post by: Kerry on March 05, 2008, 02:56:36 PM
C# Programming Course (free)
Quote from: Jon Jagger
These are the full slides and notes for my 5 day instructor led course on C# Programming. All other instructor led courses I know of have to be booked "blind" - you don't know what you're getting until you get it. This course is different - you can look at it and decide. You can even, as an individual, learn C# from it. Feel free to publicise the course and to create hyperlinks to this page.


http://www.jaggersoft.com/csharp_course/index.html

... for a start.
Title: Re: .NET Help
Post by: quamper on March 05, 2008, 03:05:00 PM
The .NET Labs Section on the Autodesk web page has both the Videos and the lab
http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=1911627

This has the one video + some of the other verticals/other products videos
http://through-the-interface.typepad.com/through_the_interface/2007/11/devtv-introduct.html
Title: Re: .NET Help
Post by: Josh Nieman on March 05, 2008, 03:06:37 PM
The .NET Labs Section on the Autodesk web page has both the Videos and the lab
http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=1911627

This has the one video + some of the other verticals/other products videos
http://through-the-interface.typepad.com/through_the_interface/2007/11/devtv-introduct.html

Oh crud!!

I have the Autodesk downloaded to my desktop and forgot to check them out.  Man, I never see my computer desktop and sometimes forget the stuff I've put on it.

I think I have the other, too, but I'll be sure to check it out.

C# Programming Course (free)
Quote from: Jon Jagger
These are the full slides and notes for my 5 day instructor led course on C# Programming. All other instructor led courses I know of have to be booked "blind" - you don't know what you're getting until you get it. This course is different - you can look at it and decide. You can even, as an individual, learn C# from it. Feel free to publicise the course and to create hyperlinks to this page.


http://www.jaggersoft.com/csharp_course/index.html

... for a start.


Thanks much!  I've bookmarked this.
Title: Re: .NET Help
Post by: MP on March 05, 2008, 03:25:21 PM
The .NET Labs Section on the Autodesk web page has both the Videos and the lab
http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=1911627

{Smacks self upside head} Thanks Q, I didn't know that one existed.

http://www.jaggersoft.com/csharp_course/index.html

Nor that one; thanks KB.

Don't know about anyone else but I like the O'Reilly books, and am currently enjoying C# 3.0, Fifth Ed (http://www.oreilly.com/catalog/9780596527433/).
Title: Re: .NET Help
Post by: Glenn R on March 05, 2008, 03:27:57 PM
I would STRONGLY suggest you avoid the temptation to leap into anything relating to AutoCAD and start trying to learn programming from that, just because it's related to what you already know.

Instead, I would recommend you learn the constructs of programming and the language (whichever you choose) FIRST, before even attempting to apply it to AutoCAD.

I would search amazon for programming related books at the beginner level - there are some good ones out there.

Cheers,
Glenn.
Title: Re: .NET Help
Post by: David Hall on March 05, 2008, 03:35:57 PM
To add to everything thus said, I would go with C# (which I did) because you will find much more help here at theswamp for C# than VB.Net IMHO.
Title: Re: .NET Help
Post by: MP on March 05, 2008, 03:37:06 PM
I would STRONGLY suggest you avoid the temptation to leap into anything relating to AutoCAD and start trying to learn programming from that, just because it's related to what you already know.

Instead, I would recommend you learn the constructs of programming and the language (whichever you choose) FIRST, before even attempting to apply it to AutoCAD.

I would search amazon for programming related books at the beginner level - there are some good ones out there.

Cheers,
Glenn.

Fully agree (http://www.theswamp.org/index.php?topic=11890.msg148327#msg148327). Difficult to do, akin to that "Harry met Sally" moment ... (paraphrased) "When you realize what you want to do with the rest of your life, you want the rest of your life to start as soon as possible". With programming that enthusiastic "jump right in" approach can be detrimental as one will often develop and employ really bad programming habits by coding application centric solutions right off. Better to defer until one's fundamentals are solid. Opinions vary. :)
Title: Re: .NET Help
Post by: quamper on March 05, 2008, 03:38:04 PM
I would search amazon for programming related books at the beginner level - there are some good ones out there.

I'm personally a huge fan of the Apress C# books..
Title: Re: .NET Help
Post by: MP on March 05, 2008, 03:45:00 PM
I would search amazon for programming related books at the beginner level - there are some good ones out there.

I'm personally a huge fan of the Apress C# books..

I find the Apress books hit and miss. However Troelsen is very credible author and his Apress book(s) same. I have this (http://www.amazon.com/Pro-2008-NET-Platform-Fourth/dp/1590598849/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1204748686&sr=8-1) one, just haven't read much of it yet as I'm powering thru the O'Reilly C# book as well as a Python one (yeah, need a life).
Title: Re: .NET Help
Post by: quamper on March 05, 2008, 03:47:16 PM

I find the Apress books hit and miss. However Troelsen is very credible author and his Apress book(s) same. I have this (http://www.amazon.com/Pro-2008-NET-Platform-Fourth/dp/1590598849/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1204748686&sr=8-1) one, just haven't read much of it yet as I'm powering thru the O'Reilly C# book as well as a Python one (yeah, need a life).

That one you linked is great! I also really like this one alot http://www.amazon.com/Illustrated-C-2008-Daniel-Solis/dp/1590599543/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1204749878&sr=1-1

If you are a visual learner that might be right up your alley as everything has illustrations.
Title: Re: .NET Help
Post by: MP on March 05, 2008, 03:50:34 PM
Thanks Q, I will have to check that one out.  8-)
Title: Re: .NET Help
Post by: Josh Nieman on March 05, 2008, 04:16:24 PM
Yikes...

Have to say, the suggestion to not dive into Autocad related stuff is a pretty offputting suggestion.  Typically I find pouring over soulless code and commands to be pretty darn boring if I don't care one cent about what it's doing or know that very quickly it's going to be to my benefit, even if it is just for creating good "habits"

I have bad habits with my programming as it is, and it's worked beautifully for me so far.  I don't do programs for anyone else, or for anyone else to pick up, nor will it ever hurt my feelings if someone looks at my code and says "EGAD that's the ugliest piece of garbage I've ever muddled through reading" so long as it does what I want it to.

All suggestions will be taken to heart, though, because I do have an urge to do this one "right" unlike my LSP and limited vb experience.

I'm just, VERY much, a dive right in, get it done, work hard, get results.. kind of guy.
Title: Re: .NET Help
Post by: Nathan Taylor on March 05, 2008, 04:21:43 PM
I would STRONGLY suggest you avoid the temptation to leap into anything relating to AutoCAD and start trying to learn programming from that, just because it's related to what you already know.

Instead, I would recommend you learn the constructs of programming and the language (whichever you choose) FIRST, before even attempting to apply it to AutoCAD.

I would search amazon for programming related books at the beginner level - there are some good ones out there.

Cheers,
Glenn.

Absolutely.

http://msdn2.microsoft.com/en-au/beginner/default.aspx
Title: Re: .NET Help
Post by: Kerry on March 05, 2008, 04:34:01 PM
I would STRONGLY suggest you avoid the temptation to leap into anything relating to AutoCAD and start trying to learn programming from that, just because it's related to what you already know.

Instead, I would recommend you learn the constructs of programming and the language (whichever you choose) FIRST, before even attempting to apply it to AutoCAD.

I would search amazon for programming related books at the beginner level - there are some good ones out there.

Cheers,
Glenn.

I concur, wholeheartedly. 
... and there are also the lessons at the Microsoft site to consider.

.. and give yourself TIME to learn properly.

an analogy ; if you're learning Bask ( or any language), don't expect to  participate in semantic debates in a hurry.
Title: Re: .NET Help
Post by: David Hall on March 05, 2008, 05:01:52 PM
I'm just, VERY much, a dive right in, get it done, work hard, get results.. kind of guy.
Ditto that, and it didn't work.  I ahd to learn about the basic things to get to the part where looking at Autocad code made sense.
Title: Re: .NET Help
Post by: Josh Nieman on March 05, 2008, 05:07:03 PM
I'm just, VERY much, a dive right in, get it done, work hard, get results.. kind of guy.
Ditto that, and it didn't work.  I ahd to learn about the basic things to get to the part where looking at Autocad code made sense.

That's what I'm finding out by reviewing some existing code snippets I'm finding on the net... this will be difficult, I think, and require a lot of patience, but I really think it will be an exciting result...

I know it may be a while before I can even begin developing this project I have an idea for, but I think it's worth it, because if I can accomplish it... the expansion of the limits of my customization/automation abilities would be quite exciting.
Title: Re: .NET Help
Post by: David Hall on March 05, 2008, 05:14:02 PM
thats the spirit!!  I read a couple of different books on C#, and went through the tutorials, which killed me b/c like you, I couldn't see why I was doing this when it doesn't apply.  Then one day, it just clicked, and it got a whole lot easier really fast!
Title: Re: .NET Help
Post by: Glenn R on March 05, 2008, 05:15:34 PM
I'm personally a huge fan of the Apress C# books..

Totally agree Q, with, as has been said, Mr Troelsen being one the best.
Title: Re: .NET Help
Post by: Glenn R on March 05, 2008, 05:17:57 PM
Then one day, it just clicked, and it got a whole lot easier really fast!

That's what I'm talking about. It will be a HUGE benefit (I'm speaking from experience here as are most others in relation to learning the constructs first) to you in the long run.
Title: Re: .NET Help
Post by: Josh Nieman on March 05, 2008, 05:23:28 PM
Thanks for the support, help, guidance, and opinions, guys.  I think I have everything available at my fingertips to succeed... now just to find time and apply myself properly.
Title: Re: .NET Help
Post by: Jeff_M on March 05, 2008, 06:24:31 PM
Josh, for when you DO get started on your project..... check out the free source code Sinc has made available. Granted, most of it is for Civil3d.....but the small section he has for base Autocad stuff might be enough to give you a jump start, and it's even split out into it's own Project.
Title: Re: .NET Help
Post by: Kerry on March 06, 2008, 04:38:03 AM
............... I like the O'Reilly books, and am currently enjoying C# 3.0, Fifth Ed (http://www.oreilly.com/catalog/9780596527433/).

I enjoyed the Fourth Edition ..

Currently using 11+ hours a week train travel to finish Troelsen's "Pro C# 2008 .."
at home, reading
"Pro Linq ... C#2008" by Joseph Rattz
and "Windows Forms in Action" by Erik Brown




Title: Re: .NET Help
Post by: Glenn R on March 06, 2008, 04:43:58 AM
I found Erik Brown's first edition (Programming Windows Forms in C#) excellent...what do you think of the second Kerry (Windows Forms in Action)?
Title: Re: .NET Help
Post by: Glenn R on March 06, 2008, 04:47:19 AM
As an aside, I just ordered from Amazon:

C# 3.0 Design Patterns
The Elements of C# Style
C# 3.0 Cookbook.

I received a couple of weeks ago:

Pro C# 2008 and the .NET 3.5 Platform
Pro LINQ (yet to start this one)

Has anybody bought any of Chris Sells' Windows Forms books and if so, what do you think?
Title: Re: .NET Help
Post by: MP on March 06, 2008, 06:16:15 AM
Skipping my 2.0 / VS 2005 books, or ones on order, I have ...

O'Reilly Press
C# 3.0 In A Nutshell, 3rd Ed. Albabara + Albabara
Programming C# 3.0, 5th Ed. Liberty + Xie
C# 3.0 Cookbook, 3rd Ed. Hilyard + Teilhet
Programming WPF, 2nd Ed. Sells + Griffiths

Apress
Pro C# 2008 ..., 4rth Ed. Troelsen.

Addidon Wesley
Effective C#, Bill Wagner*

Microsoft Press
Windows via C/C++. Richter + Nasarre

So to answer Glenn's question --

Has anybody bought any of Chris Sells' Windows Forms books and if so, what do you think?

I have his latest WPF book but I haven't read it yet. It's hefty for a O'Reilly book, though not a tome. Quickly glancing thru ... his writing style appears very conversational. Interesting note in the Preface, "Who this book is for" heading --

Quote from: Chriss Sells
... As much as I love the designers of the world who are going gaga over WPF,this book is aimed squarely at my people: developers. We're not teaching programming here, so having some sort of programming environment is a must before you read this book. Programming in .NET and C#is pretty much required; Windows Forms, XML and HTML all recommended ...

To me that suggests he's not going to waste his, or the reader's time talking about things said reader should already know, so I would guess the 800+ pages would cover a lot of ground, and at pace. I would think that would have far greater appeal to Glenn than a hand holding book that does review upon review of core material ad nauseum. But hey, it's been another challenging night for me, maybe playing interpreter should be left for those with all their marbles in one bag.

An aside, I believe the author made a mistake: environment should have likely been experience. A typo in the Preface? Is that a good sign?

Oh yeah, my name is Michael, I'm a bookaholic. Have been for as long as I can remember. I'll probably die with a book in my hand.

* Effective C# is a 2005 series book, but I just got it, so it crept into the list above.
Title: Re: .NET Help
Post by: Glenn R on March 06, 2008, 06:43:54 AM
Thanks MP.

I think I will start investigating the O'Reilly books after being a long time fan of the APress books.

I just started into the intro chapters on WPF in Mr. Troelsens Pro C# 2008 and it struck me that XAML, in principle, is similar to DCL...a separate interface definition file...funny huh.

I also notice, that like me, you seem to focus your choice of books on WinForms and not ASP for instance. I have a long background in writing desktop apps so that is what I decided to concentrate on, not ASP internet/browser type apps. There comes a time, with the amount of information that is .NET, that you have to choose one aspect of it and learn that, otherwise it's a VERY big monster to try to learn everything and I don't think you could do that well.

I had a quick look at through the interface and Kean has a new entry detailing some of the API's in 2009 and I noticed that Adesk have used WPF for some of new interface implementations...

I think I will order Windows Forms 2.0 Programming and then his WPF book, but let me know what you think of it when you get to it.

Cheers,
Glenn.
Title: Re: .NET Help
Post by: MP on March 06, 2008, 06:53:45 AM
... you have to choose one aspect of it and learn that, otherwise it's a VERY big monster to try to learn everything and I don't think you could do that well ...

It's true, you have to decide to be a specialist or a generalist: The specialist learns more and more about less and less until he knows everything about nothing. The generalist knows less and less about more and more until he knows nothing about everything.

:-D

Go back to sleep Michael.
Title: Re: .NET Help
Post by: MP on March 06, 2008, 11:28:52 AM
... it struck me that XAML, in principle, is similar to DCL...a separate interface definition file...funny huh.

Interesting observation Glenn. I wasn't too keen initially but after having read a bit by Charles Petzold on said topic I became quite intrigued. He's a bsaatrd that way, lol.

I also notice, that like me, you seem to focus your choice of books on WinForms and not ASP for instance.

I'm actually torn, because there are some cool things to done via the web, but I'm more inclined to do web stuff via python and related frameworks (after a brief foray into php).

I think I will order Windows Forms 2.0 Programming and then his WPF book, but let me know what you think of it when you get to it.

Will do; cheers.
Title: Re: .NET Help
Post by: Glenn R on March 07, 2008, 12:09:15 PM
Well, the three books I mentioned above arrived today and I have already completed 'Elements of C# Style' and I would have to say it's one of the best programming books I've read.

It's only 150 odd pages, with 40 or so being a recap on rules and an index, but I would strongly suggest acquiring a copy if you're serious about C#. I found, that after reading it and reflecting upon my coding style, that I naturally did what most of the suggested rules said to do anyway, however it's nice to have what I tend to do automatically put into words/rules.

BTW, it's a pocket book in size - not as big (width, height) as your typical programming book - very easy to read in one sitting in a couple of hours.

Cheers,
Glenn.
Title: Re: .NET Help
Post by: MP on March 07, 2008, 12:43:19 PM
... I have already completed 'Elements of C# Style' and I would have to say it's one of the best programming books I've read ...

After having read an excerpt on Amazon I'd say ... The unfortunate thing with a book titled thusly is that it will only be read by C# programmers. Like McConnell's "Code Complete", "Elements of C# Style", appears to host pearls of wisdom (the principle of least astonishment et al) that can be applied and adapted to near any development language, including the whitespace guide. A must have that's now in me cart. Thanks Glenn. :)
Title: Re: .NET Help
Post by: Glenn R on March 07, 2008, 01:06:46 PM
You're welcome MP.

The Principle of least astonishment was actually mentioned :)

I think I will get 'Code Complete' as I've heard a lot of good things about it over the years...have you read said prose?

Cheers,
Glenn.
Title: Re: .NET Help
Post by: MP on March 07, 2008, 01:13:47 PM
I read the first edition of Code Complete several years ago. Surprisingly good book (being MS Press) hardly any fluff, and certainly more than a single sit down read. While not a tome physically it is information wise (imo). I recently bought the second edition. Haven't read much of it but did recently re-read the chapter on pseudo code; most excellent.

:)
Title: Re: .NET Help
Post by: MP on March 07, 2008, 01:52:30 PM
ding (http://www.amazon.com/Elements-C-Style-Kenneth-Baldwin/dp/0521671590/ref=sr_1_12?ie=UTF8&s=books&qid=1204915691&sr=1-12) ding (http://www.amazon.com/Elements-Style-Sigs-Reference-Library/dp/0521893089/ref=sr_1_1?ie=UTF8&s=books&qid=1204915743&sr=1-1) ding (http://www.amazon.com/Elements-UML-2-0-Style/dp/0521616786/ref=sr_1_10?ie=UTF8&s=books&qid=1204915691&sr=1-10)
Title: Re: .NET Help
Post by: tjr on March 07, 2008, 02:47:24 PM
Contrary to the advice given here there is nothing wrong with diving in feet first and writing some code. Just look at some sample code you find on the web and you should be able to pick up on it. 95% of the programming people do is not that hard, especially the .NET stuff.

Also I would recommend staying away from C#, it's a horrid language to work with.
Title: Re: .NET Help
Post by: David Hall on March 07, 2008, 02:52:21 PM
Also I would recommend staying away from C#, it's a horrid language to work with.
care to elaborate?
Title: Re: .NET Help
Post by: Josh Nieman on March 07, 2008, 03:10:33 PM
Contrary to the advice given here there is nothing wrong with diving in feet first and writing some code. Just look at some sample code you find on the web and you should be able to pick up on it. 95% of the programming people do is not that hard, especially the .NET stuff.

Also I would recommend staying away from C#, it's a horrid language to work with.

I have to say you're the only person amongst the hundreds of testimonials that I've gathered on the subject that thinks this way... what, may I ask, pushes you to believe this way?

Same with C#... I've found more people actually recommend it for justifiable reasons, and most opinions are that either is equally as usable, but I've not come across anyone who's actually had something negative to say of either C#, C++, VB.NET, or any variation that can be used behind the .NET design.
Title: Re: .NET Help
Post by: Glenn R on March 07, 2008, 03:51:59 PM
Also I would recommend staying away from C#, it's a horrid language to work with.
care to elaborate?

Seconded Duh...
Title: Re: .NET Help
Post by: David Hall on March 07, 2008, 04:54:27 PM
I am by no means anything more than a novice using C#, and I have found it to be very easy to work with.  I spent the time doing the tutorials that were totally unrelated to anything I have ever done, and when I was done, I had a basic understanding of how the C# language worked.  I still have to look up almost everything, as I am unable to program full time.  But even having to look everything up, it comes back very quickly b/c the language is very easy to work with.

There are many many qualified individuals here at the swamp that use C# more often, if not full time, and are able to make Autocad do some very cool things.
Title: Re: .NET Help
Post by: Glenn R on March 07, 2008, 04:59:46 PM
No need to justify what you've done/are doing Duh, you're on the right track (learn to walk before you can run)...TJR put it out there with his...comments, let's see if he responds with a coherent argument.
Title: Re: .NET Help
Post by: sinc on March 07, 2008, 05:06:20 PM
Also I would recommend staying away from C#, it's a horrid language to work with.

You also recommend that everyone do all web development by hand-writing HTML and CSS in a generic text editor.

Are you actually serious about any of this stuff you spout, or are you just trying to create Borat reactions?
Title: Re: .NET Help
Post by: Glenn R on March 07, 2008, 05:30:56 PM
Also I would recommend staying away from C#, it's a horrid language to work with.

You also recommend that everyone do all web development by hand-writing HTML and CSS in a generic text editor.

Are you actually serious about any of this stuff you spout, or are you just trying to create Borat reactions?

Well said sinc. Not that I think you were over the top in any way shape or form, but I tend to moderate my prose for the predominantly American audience here, however, I think my Australian will come out from now on if this sort of thing (comments like tjr's) continues.
Title: Re: .NET Help
Post by: Josh Nieman on March 07, 2008, 05:33:58 PM
Also I would recommend staying away from C#, it's a horrid language to work with.

You also recommend that everyone do all web development by hand-writing HTML and CSS in a generic text editor.

Are you actually serious about any of this stuff you spout, or are you just trying to create Borat reactions?

Well said sinc. Not that I think you were over the top in any way shape or form, but I tend to moderate my prose for the predominantly American audience here, however, I think my Australian will come out from now on if this sort of thing (comments like tjr's) continues.

You sayin' us Americans are uptight? ;)
Title: Re: .NET Help
Post by: Kerry on March 07, 2008, 05:36:29 PM
<snip>  95% of the programming people do is not that hard, <snip>

I'm having trouble keeping my couth.

Title: Re: .NET Help
Post by: MP on March 07, 2008, 05:50:19 PM
Sincere thanks for keeping it civil thus far folks.

:)
Title: Re: .NET Help
Post by: Glenn R on March 07, 2008, 05:54:01 PM
Also I would recommend staying away from C#, it's a horrid language to work with.

You also recommend that everyone do all web development by hand-writing HTML and CSS in a generic text editor.

Are you actually serious about any of this stuff you spout, or are you just trying to create Borat reactions?

Well said sinc. Not that I think you were over the top in any way shape or form, but I tend to moderate my prose for the predominantly American audience here, however, I think my Australian will come out from now on if this sort of thing (comments like tjr's) continues.

You sayin' us Americans are uptight? ;)

Not at all ;) , but when people start typing carp instead of CRAP or bstaard instead of BASTARD...as an ozzy, you know you *should* tame it down for the prose sensitive...........  :evil:
Title: Re: .NET Help
Post by: Glenn R on March 07, 2008, 05:55:35 PM
Sincere thanks for keeping it civil thus far folks.

:)

Oooops! :) You posted whilst I was penning my reply...<sheepfaced grin>
Title: Re: .NET Help
Post by: StefanDidak on March 07, 2008, 06:57:17 PM
Not at all ;) , but when people start typing carp instead of CRAP or bstaard instead of BASTARD...as an ozzy, you know you *should* tame it down for the prose sensitive...........  :evil:
And here I was thinking those were just rapid-keyboard-syndrom induced typo's.  :-D
Title: Re: .NET Help
Post by: StefanDidak on March 07, 2008, 06:58:26 PM
Also I would recommend staying away from C#, it's a horrid language to work with.
Compared to what?  :-o
Title: Re: .NET Help
Post by: tjr on March 07, 2008, 07:10:41 PM
Contrary to the advice given here there is nothing wrong with diving in feet first and writing some code. Just look at some sample code you find on the web and you should be able to pick up on it. 95% of the programming people do is not that hard, especially the .NET stuff.

Also I would recommend staying away from C#, it's a horrid language to work with.

I have to say you're the only person amongst the hundreds of testimonials that I've gathered on the subject that thinks this way... what, may I ask, pushes you to believe this way?

Same with C#... I've found more people actually recommend it for justifiable reasons, and most opinions are that either is equally as usable, but I've not come across anyone who's actually had something negative to say of either C#, C++, VB.NET, or any variation that can be used behind the .NET design.

I'm still trying to figure out what pushes people to believe the other way. What does it hurt to dive in feet first and just start coding? Sure what you produce at first won't be so beautiful it will bring a tear to another programmer's eye, but it will get the job done and over time it will get better as your skills develop.

Also I'm the type of person that can't learn by reading books, tutorials, etc., no matter how hard I try. I need to actually get some sample code in front of me and mess with it before it clicks in my brain as to how things work. Perhaps I am alone on this but I highly doubt it.

I can see my "C# is a horrid language to work with" comment has also gotten a couple C# users upset so let me try to explain the reason I would say such a thing. Late last year I accepted the task of writing a Bill of Material application for AutoCAD that essentially used a DataGridView to provide an Excel like interface for constructing the BOM, with an interface for pulling part information from a proprietary DB (Progress) via ODBC and writing the fill BOM's out to a SQL Server 2005 DB for processing by our ERP system. I had started this project in C#, got about 3/8 of the way done and finally got so disgusted I had to give up on C# and write it in a different language for .NET.

The language is ridiculously verbose, for example:
Code: [Select]
Form x = new Form();Why do I need to declare that x is a Form when I am assigning it a new instance of a Form? I shouldn't have to type that nor do I want to. Also why do I need to use "new"? If form is a class the language should know that I am not creating an alias for it but creating an instance of it because I am using the ()'s.

I don't care for the cast system.
Code: [Select]
string i = ((string) 11);I don't find this readable at all. I would prefer an explicit cast call or something similar, as when revisiting code I can pick it up faster.

I also don't care for the way arrays are defined.
Code: [Select]
MyClass[] mc = new MyClass [60]I also would prefer an explicit call of something like mc = array(Myclass, 60) or something like that for the same reasons I listed for the cast system.

And my final reason for disliking C# so much are the stupid braces and ending everything with ;. To me they are pointless and actually hinder my reading of the code instead of helping it.

So basically that sums up why I would call C# a horrid language and why I would never recommend it to anyone. I am not looking for a "Borat reaction" and I am certainly serious about the "stuff I spout" because, well, it's my opinion. I'm not rectally extracting my statements, I'm speaking from my experience.
Title: Re: .NET Help
Post by: StefanDidak on March 07, 2008, 07:16:46 PM
And my final reason for disliking C# so much are the stupid braces and ending everything with ;. To me they are pointless and actually hinder my reading of the code instead of helping it.
I'd love to hear your opinion on C and C++ then if you don't like stupid braces and ending lines with ;.  :evil:
Or, actually, perhaps I should ask what languages you do consider elegant and effective.
Title: Re: .NET Help
Post by: Kerry on March 07, 2008, 07:33:06 PM
tjr,
only 4 issues ?  :-)

the first ... has to do with type safety and basic inheritance ...

the second ... you don't need to cast in that situation .. read the help.

the third ... "you would prefer" does not count as a constructor method.

the fourth .. the ';' and the 'stupid braces' are for the delineation of code blocks ... and is an advice for the reader to take a breath.
the alternatives look run together like a novice's vb code ..


I really thought you'd  have some better cases than these  :lol:
Title: Re: .NET Help
Post by: tjr on March 07, 2008, 07:38:01 PM
And my final reason for disliking C# so much are the stupid braces and ending everything with ;. To me they are pointless and actually hinder my reading of the code instead of helping it.
I'd love to hear your opinion on C and C++ then if you don't like stupid braces and ending lines with ;.  :evil:
Or, actually, perhaps I should ask what languages you do consider elegant and effective.
I personally have no use for either C or C++ as I have yet to do anything that requires the low level capabilities or the speed of either. I guess if I needed the speed I would consider something like Pyrex (http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/) or Psyco (http://psyco.sourceforge.net/introduction.html). I haven't used either but they seem fairly straightforward.

In case you haven't guessed by now my preferred language for general tasks is Python (http://www.python.org/). For general desktop/console apps I will use either Python (http://www.python.org/) or IronPython (http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython) (I like System.Windows.Forms). For AutoCAD .NET extensions I use Boo (http://boo.codehaus.org/) exclusively but would consider VB.NET over C# if I were forced to use a MS provided .NET language.
Title: Re: .NET Help
Post by: tjr on March 07, 2008, 07:51:36 PM
tjr,
only 4 issues ?  :-)

the first ... has to do with type safety and basic inheritance ...

the second ... you don't need to cast in that situation .. read the help.

the third ... "you would prefer" does not count as a constructor method.

the fourth .. the ';' and the 'stupid braces' are for the delineation of code blocks ... and is an advice for the reader to take a breath.
the alternatives look run together like a novice's vb code ..


I really thought you'd  have some better cases than these  :lol:

Kerry:

I'm sure I could come up with more reasons than I provided if I would go back into my original project and dig around, however I have neither the time nor the ambition to do so.

The first item may have to do with type safety and basic inheritance but it isn't required as I know and use other .NET languages that don't require it.

For the second Item I'm sorry I didn't give a good example, how about DBDictionary nod = (DBDictionary)trans.GetObject(db.NamedObjectsDictionaryId, OpenMode.ForWrite);? I still don't like it.

Once again for the third item I know and use a .NET language that operates in the fashion I described. I prefer it.

Fourth item: Are you implying professionals use languages that have braces and semicolons and novices use VB?

Like I said before I am speaking from my own experiences with C#. I found it to be a horrid language and I wouldn't recommend it to anyone.
Title: Re: .NET Help
Post by: StefanDidak on March 07, 2008, 07:53:49 PM
In case you haven't guessed by now my preferred language for general tasks is Python (http://www.python.org/). For general desktop/console apps I will use either Python (http://www.python.org/) or IronPython (http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython) (I like System.Windows.Forms). For AutoCAD .NET extensions I use Boo (http://boo.codehaus.org/) exclusively but would consider VB.NET over C# if I were forced to use a MS provided .NET language.
Personally I would consider the ACAD.NET/C3D.NET API's very good examples of how NOT to create an API for .NET and would agree that VB.NET is a closer match (especially for people without a C/C++ background or C# experience) for it because of its persistent use of variants and minimal documentation.

The question about what makes a horrible language will largely depend on the background of the developer. C# was a logical evolution from C/C++ and as such provides a much better match for people with a C/C++ background. Similarly VB.NET is a better match for those with a VB/VBScript background.

Personally I would recommend C# over VB.NET (or other .NET capable languages) if someone is starting out and has to undergo the sometimes frustrating learning curve involved. Not so much because of language per-se but rather because C# is more supported outside of the scope of just writing small tools. Once someone really gets into development they will find certain needs or desires for tools that help with their development and projects and most of those seem to revolve around C# (a little less for VB.NET and quite a lot less for many other languages). Lots of Visual Studio addons, for example, are primarily aimed at C#. Getting a start on a language that looks intimidating at fist can in the long run be a better bet.
Title: Re: .NET Help
Post by: Kerry on March 07, 2008, 07:56:49 PM
<snip>
Fourth item: Are you implying professionals use languages that have braces and semicolons and novices use VB?
<snip>

I didn't say or imply unprofessionalism. I said it looks a mess (to me).



<snip>
Like I said before I am speaking from my own experiences with C#. I found it to be a horrid language and I wouldn't recommend it to anyone.

Yes, I got that .. I was looking for your rationale.
Title: Re: .NET Help
Post by: StefanDidak on March 07, 2008, 07:59:35 PM
For the second Item I'm sorry I didn't give a good example, how about DBDictionary nod = (DBDictionary)trans.GetObject(db.NamedObjectsDictionaryId, OpenMode.ForWrite);? I still don't like it.
Good example. That's one of the things I mean with the ACAD.NET API being a really bad example of a .NET API. That casting stuff isn't because of C# or the language constructs but rather how Autodesk decided to layer a managed code layer on top of their COM layer via Interop. A proper .NET API wouldn't require such ugly casts.
Title: Re: .NET Help
Post by: MP on March 07, 2008, 08:14:04 PM
My opinion is that pretty much every computer language I've seen has the capacity to produce really ugly code. Conversely, even seemingly cryptic languages have born visually pleasing code. It depends a lot on the author. For example, even masm is pretty when born of Charles Petzold's keyboard. Having said that I understand Tim's preference for Python and Boo etc. They are very wrist friendly and expressive compared to the curly braced languages and have addressed many of the C# issues that understandably irk Tim. Having said that I enjoy C#, and it, like Python, has a place in my toolbox.

It's a suggestive topic at best; born of our own experiences, pragmatics and sense of aesthetics. At the end of the day if you find a language you enjoy programming in, and you can efficiently produce solutions that fully meet your specs you're doing well. Even more so if people will pay you to do it and there's good peer support.

I would like to remind everyone Tim didn't take shots at anyone, he simply stated his opinion and preference, which he is fully entitled to, and I would encourage everyone to do same, and avoid personal, derisive comments etc.

That said my own experience being that more flak is drawn if one dismisses product A, rather than espousing, and concentrating on the merits of product B, which this tangent illuminates.

:)

Not that I walk any of this talk particularly well, but hey, I am trying to improve.
Title: Re: .NET Help
Post by: tjr on March 07, 2008, 08:37:44 PM
In case you haven't guessed by now my preferred language for general tasks is Python (http://www.python.org/). For general desktop/console apps I will use either Python (http://www.python.org/) or IronPython (http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython) (I like System.Windows.Forms). For AutoCAD .NET extensions I use Boo (http://boo.codehaus.org/) exclusively but would consider VB.NET over C# if I were forced to use a MS provided .NET language.
Personally I would consider the ACAD.NET/C3D.NET API's very good examples of how NOT to create an API for .NET and would agree that VB.NET is a closer match (especially for people without a C/C++ background or C# experience) for it because of its persistent use of variants and minimal documentation.

The question about what makes a horrible language will largely depend on the background of the developer. C# was a logical evolution from C/C++ and as such provides a much better match for people with a C/C++ background. Similarly VB.NET is a better match for those with a VB/VBScript background.

Personally I would recommend C# over VB.NET (or other .NET capable languages) if someone is starting out and has to undergo the sometimes frustrating learning curve involved. Not so much because of language per-se but rather because C# is more supported outside of the scope of just writing small tools. Once someone really gets into development they will find certain needs or desires for tools that help with their development and projects and most of those seem to revolve around C# (a little less for VB.NET and quite a lot less for many other languages). Lots of Visual Studio addons, for example, are primarily aimed at C#. Getting a start on a language that looks intimidating at fist can in the long run be a better bet.
All very good points, especially the tools available to the C# developer. However I, and I'm sure a lot of others out there, do not have a full version of Visual Studio due to the fact that they can't justify the cost. So instead our options are the Express Editions (which can't use add-ons) or using SharpDevelop. I personally use SharpDevelop because I like the integration of a lot of the open source .NET tools. I'm sure if I were programming as my primary job I could talk my company into providing me with a copy of VS but as I'm electrical engineering first, programmer second my hands are kind of tied.
Title: Re: .NET Help
Post by: It's Alive! on March 07, 2008, 08:55:28 PM
For the second Item I'm sorry I didn't give a good example, how about DBDictionary nod = (DBDictionary)trans.GetObject(db.NamedObjectsDictionaryId, OpenMode.ForWrite);? .

could have been

Code: [Select]
DBDictionary nod = trans.GetObject(db.NamedObjectsDictionaryId, OpenMode.ForWrite) as DBDictionary;
Title: Re: .NET Help
Post by: It's Alive! on March 07, 2008, 08:59:27 PM
...but rather how Autodesk decided to layer a managed code layer on top of their COM layer via Interop. A proper .NET API wouldn't require such ugly casts...

This is not a correct statement. The .NET API wraps Native ObjectARX/C++ code

PS there really is never a need to “Wrap” a com API., as the .NET compiler will create Runtime Callable Wrappers (RCW) 

Title: Re: .NET Help
Post by: StefanDidak on March 07, 2008, 09:07:08 PM
...but rather how Autodesk decided to layer a managed code layer on top of their COM layer via Interop. A proper .NET API wouldn't require such ugly casts...
This is not a correct statement. The .NET API wraps Native ObjectARX/C++ code
Then it's still an awful job from an architecture perspective!  :-D
It's just a total mishmash of (inconsistent) layers in order to expose internal functionality to a third party outside world (instead of engineering an actual API for both internal and external use). For example, just look at how for an average C3D addon you generally need to (from managed code, that is) interact with the .NET API and the COM objects for Land/Map, etc.
Title: Re: .NET Help
Post by: tjr on March 07, 2008, 09:09:17 PM
<snip>
Fourth item: Are you implying professionals use languages that have braces and semicolons and novices use VB?
<snip>

I didn't say or imply unprofessionalism. I said it looks a mess (to me).



<snip>
Like I said before I am speaking from my own experiences with C#. I found it to be a horrid language and I wouldn't recommend it to anyone.

Yes, I got that .. I was looking for your rationale.
Your response to the first item was my answer to your second item, I've used it, I don't like it and I wouldn't recommend it.

It's funny the way this whole thread ended up the way it did. If this topic had been in the Lagniappe section and had been about something like toast toppings I highly doubt I would be on the brink of bringing the "Australian" out of someone for saying creamy peanut butter is horrid and that I prefer crunchy. I guess it all depends on what you're passionate about.
Title: Re: .NET Help
Post by: It's Alive! on March 07, 2008, 09:27:06 PM
Then it's still an awful job from an architecture perspective!  :-D

I have to disagree, while the .NET api for Autocad might have its flaws here and there,
It’s very well written. (i.e. no mishmash ) … just my opinion though.  :-)
Title: Re: .NET Help
Post by: StefanDidak on March 07, 2008, 09:36:59 PM
Then it's still an awful job from an architecture perspective!  :-D
I have to disagree, while the .NET api for Autocad might have its flaws here and there,
It’s very well written. (i.e. no mishmash ) … just my opinion though.  :-)
OK, that's it! You're going to have to report to the nearest GAC (good architecture center) where I will personally expose you for 48 hours to dozens of well designed API's and download 22 years of development experience into you via the new neural interface. Whooaaahahhaa (insert evil sound track here). Oh, wait, I'll have to adjust the release forms and disclaimers to exclude PTDD (post-traumatic development disorder).  :-D

Actually, the .NET API for ACAD all on its own doesn't present such a mishmash, you're right, that's only when you get into the verticals. But from dealing with SDK's and API's in the past 22 years I do have to say it's been close to the worst I've seen (there's one I worked with that was even worse, a $25.000 SDK license for a product that shall remain nameless where the docs shipped onto 17 badly photocopied sheets of paper).
Title: Re: .NET Help
Post by: Josh Nieman on March 07, 2008, 10:01:56 PM
Thank you very much for sticking to your guns TJR.  It's good to see coherant and backed-up statements from BOTH sides, and yes, as you guessed, you're not alone... I'm very much like you in regards to learning style.  I'm trying to bite the bullet on this one, because I've heard from many who share similar learning styles as we do, who've said they should have just done it the step-by-step way by the book in the first place as it would have saved them time.  CmdrDuh seems to be one as well.
Title: Re: .NET Help
Post by: Kerry on March 07, 2008, 10:14:41 PM
Josh, I went back to your original post.

<snip>    most of what I see is people already experienced, already knowledgable, already with a good foundation of knowledge of programming   <snip>
Any help for the newb?

The answer quite simply is to study and become knowledgable ... either by hard earned experience or by standing on the shoulders of those who have been here before us.
There is no magic pill for this one.
Title: Re: .NET Help
Post by: MP on March 07, 2008, 10:21:31 PM
The answer quite simply is to study and become knowledgeable ... either by hard earned experience or by standing on the shoulders of those who have been here before us ...

... (well said) and when you've time, energy and interest do learn more than one language: A good mechanic keeps more than a single vice grip in his toolbox.
Title: Re: .NET Help
Post by: Glenn R on March 08, 2008, 04:46:43 AM
This turned into an interesting discussion - thanks to all.

Tim,

I have actually been toying with the idea of looking at IronPython as a lot of people here seem to taking an interest in python in general, however the lack of braces just really throws me when looking at example code...I just can't seem to delineate where things start and end.

I know a little study on the matter would alleviate this though and am willing to try it eventually.

Cheers,
Glenn.
Title: Re: .NET Help
Post by: Glenn R on March 08, 2008, 04:47:54 AM
... for saying creamy peanut butter is horrid and that I prefer crunchy. I guess it all depends on what you're passionate about.

Prefer crunchy myself as well ;)
Title: Re: .NET Help
Post by: Glenn R on March 08, 2008, 05:18:10 AM
Probably old news to some: IronPythonStudio (http://www.codeplex.com/IronPythonStudio)
Title: Re: .NET Help
Post by: tjr on March 08, 2008, 09:40:39 AM
This turned into an interesting discussion - thanks to all.

Tim,

I have actually been toying with the idea of looking at IronPython as a lot of people here seem to taking an interest in python in general, however the lack of braces just really throws me when looking at example code...I just can't seem to delineate where things start and end.

I know a little study on the matter would alleviate this though and am willing to try it eventually.

Cheers,
Glenn.
The biggest complaint people have when they start out with Python is the fact that code blocks are controlled by white spaces instead of braces. However once you use it a while it you will come to realize that it forces you to write readable code.

Here is a little IronPython script I wrote to quickly view a XML config file we have for our batch plotting program. I find it very easy to follow.
Code: [Select]
import clr
clr.AddReference('System.Windows.Forms')
clr.AddReference('System.Drawing')
clr.AddReference('System.Data')

from System.Windows.Forms import (
    Form, Panel, Label,
    TextBox, DockStyle, Button,
    ScrollBars, Application, DataGridView,
    DataGridViewColumnHeadersHeightSizeMode,
    MessageBox, MessageBoxButtons,
    MessageBoxIcon
)

from System.Drawing import (
    Point, Size
)

from System.Data import DataSet


class PlotConfigForm(Form):

        def __init__(self):
            self.Text = 'Batch Plot Config Viewer'
            self.ClientSize = Size(1050, 650)
            self.MinimumSize = Size(500, 200)
            self.ds = DataSet()
            self.ds.ReadXml('ERM Batch Plot Configurations.xml')
           
            self.setupDataGridView()
       
       
        def setupDataGridView(self):           
            self._dataGridView1 = DataGridView()
            self._dataGridView1.AllowUserToOrderColumns = True
            self._dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize
            self._dataGridView1.Dock = DockStyle.Fill
            self._dataGridView1.Location = Point(0, 111)
            self._dataGridView1.Size = Size(506, 273)
            self._dataGridView1.TabIndex = 3
            self._dataGridView1.DataSource = self.ds.Tables[0]
           
            self.Controls.Add(self._dataGridView1)
       
       
       


Application.Run(PlotConfigForm())
Title: Re: .NET Help
Post by: Josh Nieman on March 08, 2008, 03:31:38 PM
I wasn't looking for a magic pill, just more some help to find a good PRODUCTIVE path to start myself on.

I've begun the "Quick Start" tutorials that came with the Microsoft Visual C# Express Edition, beginning with the "Create Your First Application" guide.  I like the interface, thoroughness, and ease of following the tutorial.  It explains things well, it keeps it simple, and I found I was able to go through them quite easily.

I'm still getting used to the interface between the Form/Design, and Code and how to get to the specific code for each item from the toolbox you put into the form, but it is very nice.  I was used to the VB editor in Autocad, is all.  This, however is cool... and wow... SO SO SO much more to do and so much more flexibility than I had seen before this.

Exciting things are sure to follow.

Thank you all for the numerous replies, insights, tips, opinions, and guidance.  You're all quite the invaluable resource.  I only wish I had more to offer in return.
Title: Re: .NET Help
Post by: Glenn R on March 08, 2008, 03:53:10 PM
You'll get there Josh - just give it some time...walk before you can run grasshopper.

This would be very informative and it's video - the MSDN webcasts are actually very, very good:

Visual C# Soup to Nuts (http://www.msdnwebcastportal.com/DesktopDefault.aspx?tabindex=2&tabid=21)

Cheers,
Glenn.
Title: Re: .NET Help
Post by: MP on March 08, 2008, 04:01:45 PM
Wow, there's a lot there; thanks Glenn.
Title: Re: .NET Help
Post by: Glenn R on March 08, 2008, 04:05:31 PM
Yeah, there's a lot there and elsewhere on MSDN if you can find it. I quite like Bill's presentations and there's a Soup to Nuts series for ASP as well if I remember rightly.

I went through the C# one and found it excellent for what it is. It's like all the programming books I buy, penned by different authors...in each you will find something that none of the others mention...unfortunately this leads to buying more books...which is not a bad thing in my book ;)

Cheers,
Glenn.
Title: Re: .NET Help
Post by: MP on March 08, 2008, 04:25:13 PM
Yep, every book has it's own pearls.

As for buying books, you're talking to a hopeless junky.

Thanks again for the vid link; awesome

:)
Title: Re: .NET Help
Post by: Glenn R on March 08, 2008, 04:32:23 PM
Us junkies got to stick together ;)

Just noticed there's a WPF series there as well....there goes the download quota  :-)
Title: Re: .NET Help
Post by: MP on March 08, 2008, 04:34:46 PM
(http://www.theswamp.org/screens/mp/awesome.png)
Title: Re: .NET Help
Post by: Glenn R on March 08, 2008, 04:39:00 PM
pretty damn cool
Title: Re: .NET Help
Post by: David Hall on March 09, 2008, 04:21:42 PM
very cool find
Title: Re: .NET Help
Post by: Kerry on March 09, 2008, 05:35:38 PM
yep :-)
http://www.theswamp.org/index.php?topic=14095.0
Title: Re: .NET Help
Post by: sinc on March 12, 2008, 12:28:05 PM
Then it's still an awful job from an architecture perspective!  :-D
I have to disagree, while the .NET api for Autocad might have its flaws here and there,
It’s very well written. (i.e. no mishmash ) … just my opinion though.  :-)
OK, that's it! You're going to have to report to the nearest GAC (good architecture center) where I will personally expose you for 48 hours to dozens of well designed API's and download 22 years of development experience into you via the new neural interface. Whooaaahahhaa (insert evil sound track here). Oh, wait, I'll have to adjust the release forms and disclaimers to exclude PTDD (post-traumatic development disorder).  :-D

Actually, the .NET API for ACAD all on its own doesn't present such a mishmash, you're right, that's only when you get into the verticals. But from dealing with SDK's and API's in the past 22 years I do have to say it's been close to the worst I've seen (there's one I worked with that was even worse, a $25.000 SDK license for a product that shall remain nameless where the docs shipped onto 17 badly photocopied sheets of paper).

I think you're still suffering from the same problem I was, in that since Autodesk has been pushing .NET for all customizations for a while now, we expect to actually get a .NET API.

And while we largely DO have a .NET API for the core product, we do NOT have one for Civil-3D.  The portion that is specific to Corridors has a managed DLL created for it, but that's about it.

For the rest of it, we are actually using the Active-X API from inside of C#.NET, which is possible, but it's ugly.  It's the basic reason we end up with all those obnoxious variants and so forth.  And of course, there is no ObjectARX documentation, either, so we are left digging through the ActiveX/VBA docs to try and figure out what we need to know, which is particularly onerous to newbies to .NET.

I heard a comment from someone at Autodesk, too, that there would not be a .NET API for C3D because "it's not necessary".  I couldn't really understand that comment, especially since other parts of the company are heavily pushing .NET, but I've stopped expecting consistency from Autodesk.
Title: Re: .NET Help
Post by: sinc on March 12, 2008, 12:41:59 PM
In case you haven't guessed by now my preferred language for general tasks is Python (http://www.python.org/). For general desktop/console apps I will use either Python (http://www.python.org/) or IronPython (http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython) (I like System.Windows.Forms). For AutoCAD .NET extensions I use Boo (http://boo.codehaus.org/) exclusively but would consider VB.NET over C# if I were forced to use a MS provided .NET language.

I actually agree with you about Python and Boo.  I actually wish that C# had taken more from Python, but I would hardly call it a "horrid" language to deal with.

Personally, I've never liked VB, and do not view it's lack of curly braces as a redeeming feature for the rest of the syntax.  I'm surprised that you would say you would prefer VB over C# for such a minor reason.  But to each his own.

As far as using Boo, the problem there is that it is still a young and relatively unknown and unsupported language.  Sure, it's got its core of rabid followers, and it is powerful and has major potential, but it is not a mainstream language at this point.  And any time you choose to use a language that is not mainstream, you have to deal with additional complications, and have more-difficulty in using that language in a large development effort.  And you always run the risk that the language will NOT end up being a mainstream language at all - it may instead merely be the precursor for a not-yet-invented language that becomes the mainstream language.

For example, 15-20 years ago, there was a big debate about which one to use, C++ or Objective-C.  C++ was by-far the nastier of the two, but for various reasons we don't need to get into, it "won".  However, the entire crop of current languages - Java, C#, Python, and even Boo - took many of the ideas and principles straight from Objective-C, and all these new languages are far more like Objective-C than they are like C++.  (And to be fair, Obj-C stole many of those principles from an even-earlier language - Smalltalk.)

So although I agree with you that Boo is a "nicer" language, and undoubtedly a "better" language, I still do not agree with you that C# is "horrid".  By contrast, it is remarkably close to where Boo is at.  Boo is better in many respects, but C# is surprisingly clean, considering it was a Microsoft effort.  By contrast, take a look at C++, and then you'll see a REAL example of a "horrid" language.

And of course, it is difficult right now to get any more "mainstream" than C#, at least if you are working on Windows.  That is a significant advantage.
Title: Re: .NET Help
Post by: StefanDidak on March 12, 2008, 12:43:53 PM
I think you're still suffering from the same problem I was, in that since Autodesk has been pushing .NET for all customizations for a while now, we expect to actually get a .NET API.

And while we largely DO have a .NET API for the core product, we do NOT have one for Civil-3D.  The portion that is specific to Corridors has a managed DLL created for it, but that's about it.

Exactly. And guess what, I've been digging in corridors for the past few days again and wondering, not just about the API design, but rather the architecture itself and the naming conventions that seem almost designed to be confusing on purpose. Wasted half the day yesterday when digging into OffsetBaseLines in a Region. Halfway through things crashed badly, rebooted the VM and thought "where was I, oh, right, OffsetBaseLines" so I ran that in the search in the CHM, got to IAeccOffsetBaseline, started casting the items in OffsetBaseLines to IAeccOffsetBaseLine to extract the data in the hierarchy below it. Only of course to discover I wasted most of the day doing that because it's IAeccBaseBaseLine, not IAeccOffsetBaseLine items in the Items! The cast survived and strangely enough all properties and collections functioned, though of course the data I was expecting was all wrong.

Spending an hour to figure out where to find a flag for a corridor that is Out-Of-Date was also a lot of fun, seeing as there isn't one. And oh, the one that really cracks me up is how you can use an empty assembly and basically hide things resulting in zero SortedStations but if applicable one or more AdditionalStations (which is odd because SortedStations returns the interval stations as well as additional stations except in these cases where the behavior becomes inconsistent).

Quote
For the rest of it, we are actually using the Active-X API from inside of C#.NET, which is possible, but it's ugly.  It's the basic reason we end up with all those obnoxious variants and so forth.  And of course, there is no ObjectARX documentation, either, so we are left digging through the ActiveX/VBA docs to try and figure out what we need to know, which is particularly onerous to newbies to .NET.

Absolutely. I'm a definite n00b when it comes to ACAD/C3D but I've been in the 3D/CGI development field for over 18 years and I've never had a harder time picking up on an SDK/API and there's been, oh, quite a few!  :-)

Quote
I heard a comment from someone at Autodesk, too, that there would not be a .NET API for C3D because "it's not necessary".  I couldn't really understand that comment, especially since other parts of the company are heavily pushing .NET, but I've stopped expecting consistency from Autodesk.

I'm with you on that one! Then again, I might be a little biased here since I contracted for Autodesk/Discreet in a distant past and have seen things from both sides of the fence.  :-)

Personally I think it's a shame to provide a .NET layer that is suffering from the things it suffers from. I can imagine that someone who has not had any .NET experience, regardless of language, gets confused, has to jump through various hoops that are possible but uncommon enough in general, and it ends up providing the perception that all this .NET stuff is too difficult, too messy, etc. when it really isn't, just the API is and the fact that you end up doing COM/AX instead of actual .NET.

Title: Re: .NET Help
Post by: sinc on March 12, 2008, 12:47:55 PM
Personally I think it's a shame to provide a .NET layer that is suffering from the things it suffers from. I can imagine that someone who has not had any .NET experience, regardless of language, gets confused, has to jump through various hoops that are possible but uncommon enough in general, and it ends up providing the perception that all this .NET stuff is too difficult, too messy, etc. when it really isn't, just the API is and the fact that you end up doing COM/AX instead of actual .NET.

You don't even have to be new to .NET to get confused.  I think I have it down pretty well at this point, and I *still* hit times where I do something brain-dead because I forget I'm working with a mixture of .NET and COM objects.

And I think this has a large part to do with why the whole Undo/Redo mechanism seems to be so flaky with C3D.  I find myself using the StartUndoMark and EndUndoMark in everything, even if I am also using transactions, because it's the only way I know to guarantee that UNDO will work the way I want.