I'm young and I make emotionally-charged posts in a stream-of-consciousness style. Drunk with passion, I will be wrong most of the time. Call me on it and help me learn. It is embarrassing to look back at my mistakes, but I will grow.

Thursday, September 21, 2006

Why I would probably use .NET instead of Python for any project I do in the near future

I want to start off by saying that I really, really, love Python. Python is a great language. I like the way it feels, I like the way it works, and I like that it's always there for me when I'm in need.

Now, having said that, if I were going to start on a web project in the next... 20 minutes, or few hours, or weeks, or months, I'd probably use .NET (VB or C#). Why? Because you can get a whole lot more done in a whole lot less time.

1. I don't have to remember every class I want to use

I jump into my new project, type a few lines at the command line to start a new project with Django, or import web.py, or whatever crazy cool new hip happenin' web framework I want to play with (don't get me wrong, they are all really cool and have lots of advantages, especially the way database functionality works, MVC, and pretty url handling). I start on my first page, the index page. I jump into the function that will display the contents of the page. Oh, crap, what's the function to send a 200 OK HTTP response? Oh, crap, what's that function called that parses the template I made? Oh, crap, what's that function called that selects the data I want from the database and passes it to my template? I'm too forgetful for that kind of stuff. I need intellisense. And, yes, I know Vim 7 has C-x u. But, I've never gotten that to work. And I tried, I tried really hard, I swear. And, typing C-x u is a pain in the damn ass anyways. Why can't it just pop up when I hit the period key?

2. Debugging isn't really really really really really easy

In .NET, I start my page in "Debug" mode, and set a breakpoint on something I think might break. The code runs until my breakpoint, and then I can just move the mouse over anything that I have a question about -- did this function call work the way I expected it to? Does this variable have what I expected it to have in it at this point? All that stuff is right there, really cool, working perfectly. I can even watch variables change value while stepping through the code. It's all so visual and easy to use. I have never seen anything that exists like this for Python code.

3. I don't have to type 3000 pounds of HTML to get a table on the screen

Ok, now, I really believe in semantic markup, and sometimes .NET really gets on my nerves because everything is table-based and ugly, and I know I'm not supposed to use tables for layout. However, sometimes you really don't want to type html head title blah blah blah just to get some things on the screen really quick. It should be pretty trivial (especially considering CSS has absolute positioning and all kinds of nice fancy stuff) to just drag some stuff on a screen and get rolling. I'll admit it, this isn't really a good excuse to use .NET, the other 2 stand on their own. I could live without this if the other 2 were present.

Now, of course, there are things I can't stand about .NET. One of them is that I can't use Vim. I love Vim, I am too addicted to the hjkl layout to switch to anything. I gave Emacs a good week or two before I couldn't take it anymore, so please don't try to convert me. Actually, I found something cool a while back that lets you edit .NET code in Vim, but you had to pay for it, and I'm stingy. I won't even link to it because I find it so disgusting that someone would rip the whole Vim idea and then try to sell it. I hope they don't make a cent, honestly.

Another thing I don't like about .NET -- no one does unit testing. I want to unit test everything, I want it to be a nice integrated part of the GUI. But, it's just not there.

I don't understand why there hasn't been a lot of movement toward some really nice environments that directly compete against .NET and friends in the Linux world. Maybe I'm just not looking in the right places. The best I could find is pida, which, by the way, I think is really really cool. But, alas, there is not a large fanbase, and there is not a lot of development going on with it from what I can tell.

1 comment:

Lion Kimbro said...

Hm; I think everyone into .NET on Linux is using Mono.