Tuesday, January 27, 2009

complexity

Fire up a program like Eclipse or Visual Studio and start a new project. Blam! It creates a dense forest of code files, text files, configuration files, XML files, directories, subdirectories, assistant directories, deputy directories, acting deputy subdirectories, and special liason to the ad-hoc subcommittee directories.

Java and C# people seem to think this is great. "Look at all this work the tool does for you!"

I disagree. "What IS all this stuff?" I wail. "What's it for? What's it doing? My program is already hopelessly complex and I haven't even started writing it yet! Guido, take me away!" A tutorial may tell me to start on one file and ignore everything else, but that's completely unsatisfying psychologically. I feel like I'm learning nothing because I'm at the mercy of so much auto-generated stuff I can't even hope to understand.

This, I think, is my biggest barrier to learning the "enterprisey" languages.

I admit, starting a project in TurboGears or Django does something kind of similar, and I tolerate it there. I think that's because I know Python well and can handle a limited amount of temporary mystery. It's when I'm trying to dip into a brand-new language and a brand-new environment that I want a small, digestible bite of mystery to get my mind around.

[ADDENDUM]

I'm beginning to think that what might get me over this hurdle is a C# tutorial that specifically avoids Visual Studio and similar IDEs... that gives projects and examples in old-fashioned code files in a text editor - and as few files as possible - even if that seems crazy to VS junkies, if it means the examples are a lot more painstaking and a lot less impressive. But that's what I need - I need to feel like the code I'm writing really encompasses the problem, isn't just a little flourish atop a vast understructure that I didn't write and don't understand. Then, after a while of that, I can start dipping into the IDEs and perhaps appreciate the code generation, rather than dreading it.

Any pointers to a C# tutorial along those lines would be most welcome.

7 comments:

Matt Wilson said...

I'm glad you pointed out how TG and django (and a lot of other projects) do the same thing.

I was attracted to scripting languages like perl and python because it was so easy to make one tiny change and watch happened. No mysterious compiling and linking had to happen.

Sure, there's times when complex scaffolding is unavoidable, but I don't like a whole bunch of decisions made for me right of the bat.

Noons said...

There was nothing wrong with "Hello world!"...
And look: no xml needed for anything!

Bryan said...

Amen! I bought a copy of Visual C++ once and never got it working.

Another side effect is when you try to get your code to compile _outside_ the IDE. They hide the dependency paths somewhere and it takes longer to get the code compiling independently than it does to write the code. The end result? You can't share the code without great pain.

dwelden said...

I suspect it is intentional to put those vendor handcuffs on you. How do you drop vendor M and switch to vendor S if you can't port all of that crap because you don't have a clue what 7/8 of it is for?

Python is so much better, I only drop down into the muck of C#, etc., when I have to.

Gareth said...

Hi,

I sympathize!

For c# try out "hello, world!" in SharpDevelop.

Regards,
Gareth

sillyevar said...

I learned C# using VIM and makefile and the command line compiler, just like I learned python, perl, C, C++ and pretty much everything.

THEN once I understood what was going on, I started using Visual Studio, and I had better understanding of how imports (using statements), assembly references, global.asax, app.config, and Settings.cs all fit into the picture.

The stealsoft tutorials are pretty good, as is the MSDN documentation.

Yes, I also learned C# in the "internet way", without a book.

amcrouch said...

Hello

I could not agree with you more about Visual Studio (as I said here. It use's a vast amount of memory and churns out hundreds of temp files. If I could work in VIM the whole time I would.

I tend to use Visual Studio to create a project and then remove all the files it adds that I have no use for and move the stuff I do need into the directory structure I want. All rather needless really.

A bit old but this had some tips about non VS C# hacking.