Tim\'s picture      Blogging Ottinger (tim)

2007-November-7

Monodevelop first impressions

Filed under: Linux, Windows, Programming

Last Revision: 8 Nov 2007.
Status: Ongoing

I’m trying now to get into web stuff. I am interested in three platforms: Django (because it’s what the cool kids are using), Rails (because that’s what the cool non-python kids are using) , and C# .NET (because that’s what businesses want to pay for). I figure the formula is 2 parts cool to one part commercial. I could also chase down some C++ web programming stuff, but who wants to do that?

I really don’t have much experience with web programming, other than creating a web interface in CGI and Python to get stats from an industrial balance machine several years ago. I gave java a miss, and didn’t learn any of those frameworks. It was primitive and didn’t have separation between logic and database and form, because each web page was (all told) maybe 50 lines of code. It was a simpler world, and less implicit. Now we have to know frameworks, and Javascript, and flash, AJAX and all that stuff. I hope to learn a little about all of these in time. It’s a long road, but that doesn’t mean it can’t be fun.

I’ve also decided to focus mainly on Unix and Linux development. I want to work in BSDs (including Mac OS X) and Linux for the rest of my programming time if possible. Working in Windows is just too ugly and the tools are weak. I would rather have bash or better for the command line, a software installer/unstaller that works, and an OS that doesn’t have to be rebooted several times a week. Being in Linx 100% of my personal time and most of my professional time is handy this way. I will use only open tools during my personal training.

I’m starting with C#, because making serving my customers trumps having fun. I’ve got some history with the language: about 7 months of exposure, which ended almost a full year ago. I am not a .NET person but have worked with the tools. In those days, I used VS .NET (which kinda sucked) and Resharper (which has my full endorsement). I wish I had a JetBrains development kit for Linux, but alas I do not. I do have MonoDevelop, though.

By the way, I did find a nice C# web tutorial at O’Reilly that suited my learning style and personal tastes as well as my newness to things .NET.

I installed via apt-get install monodevelop, collecting just about anything that apt-cache said was MonoDevelop-related. Apt rocks. I don’t have to chase down software on a dozen different sites, I don’t have to run a dozen custom compilers, I don’t have to waste time swapping CDs or the like. I don’t have to track down upgrades on a dozen mailing lists or web sites. It’s all so automatic, so easy, and so pleasant that it’s almost embarassing. The last time I had to set up a windows box, it was a good half-day or more just finding the pieces, swapping CDs, and other administrivia to do with licensing. For upgrades, it was the same hassle over again. Open source and APT are a combination that needs a better publicist. It’s amazing what other people have already done for you.

That done, I fired up MonoDevelop (the only C# available at my windows-free house) and started plugging.

The reader should realize that my version of MonoDevelop is 0.14, which is very pre-1.0. Everything is new and experimental, though it was actually pretty stable. I did have a couple of crashes but overall most of the features worked. The guys at MonoDevelop are doing a good job of building an IDE that may someday compete with Eclipse (of which I have version 3.2, clearly further developed).

I have found that there are some nice features in MonoDevelop, but it clearly needs further development. On the other hand, VisualStudio needs development and I could only tolerate it as a C# development environment because I’d installed Resharper. Giving a choice between raw Visual Studio and MonoDevelop, the superior ideology of MonoDevelop pulls me more than the click-n-code-behind features in VisualStudio.

Nunit

The integration isn’t excellent like Eclipse’s JUnit support, but it’s usable and even nice in some ways. Getting some unit tests up is a prerequisite activity for doing anything you might want to keep or write about, so getting NUnit up was a no-brainer first step.

It should have been. Actually, I created the test source via the menu and got a source file as one would expect. I had to check a box to have it added to the project, which violated the principle of least surprise.

Of course, adding an NUnit source file to your project doesn’t mean you get the NUnit library reference for free. I had to add that next. Then, having NUnit tests and a reference to NUnit.Framework wasn’t enough, when I told the test to run, they seemed to run but did nothing.

To get the tests to run, I had to go rebuild the whole application and then try to run them again. Monodevelop does not run the tests when it builds the application, though that would be really nice. I also didn’t see a hot key combo. I need to keep looking for that. I have to do mouse navigation with multiple selections to run the tests. That’s not the way to handle something you want people to do as often as possible.

I did like the results pad, with its little graph. It’s cute. Still, in either of the two views of test results, clicking on a failed test doesn’t navigate to the code with the failed assertion. That’s a little tedious.

Oh, ugliness. If I build and the build fails, focus doesn’t move from the UnitTests view to the build errors. You may not know why your test results haven’t cleared, but this is why. More mouse travel to select the tab for builds, then click on the error, then fix, then click on the unit test tab and two more clicks to run the tests. Sigh.

Programmer Aids

If you do a new project for .NET, it will create an .asp and an .asp.cs for you, but the app won’t run. You have to go change some project settings first. That struck me as sloppy. Luckily google (my smart friend) knew what to do. You have to go to Project/Options/Configuration/*/ASP.NET Options and turn on “Autogenerate CodeBehind members before compilation.” That seems to get the raw package running. This may indicate that professionals don’t use this option, and I should maybe not have turned it on. Being new at this, I don’t really know.

Completion works nicely. I was very comfortable with the way the program responded to the . (dot) command and control-space. It was all that I expected. Well, most of the time.

Code Templates (snippets) work. It doesn’t always seem to place the cursor as directed, but it works.

Oddly, no “create class” right-click option in the solution viewer. Why not? I don’t know. It’s a small thing, but handy. The File/New/General/EmptyClass menu navigation worked fine, and gave me what I expected. I just wish it had been a bit easier to reach, along the lines of Resharper or Eclipse. Actually, I wanted to instantiate a class in the test, and let the tool create the class for me as a remedy for the compile error, but that’s expecting MonoDevelop to be a refactoring tool again.

If you type a name that isn’t recognized, don’t expect MonoDevelop to know what to include like Eclipse does. You need to know where all your stuff comes from. If I were a C# pro, I probably wouldn’t mind. As-is, I spend too much time in google and in my C# book trying to recall where C# keeps its arrays and lists and regex and what-not. I mostly have spent time in other languages this year, and C# is just different enough in enough ways to keep me having to refer to materials. Sigh. I suppose Eclipse is a better coping mechanism for casual Java use than MonoDevelop is for casual C# experimentation.

Refactoring? What refactoring? After some poking around, I found a “rename” refactoring. That’s better than nothing, but only barely. This may be the biggest impediment to MonoDevelop adoption. Fortunately, Ben Motmans, Jeffry Stedfast, and some other developers are working on this even as I’m typing the words. Sadly, I was unable to find a repository that would allow me to install the work in progress. In Debian, frequently developers maintain their own versions in a repo so that you can point your package manager at them. I guess if there is such a thing for MonoDevelop, I’ve not found it with google.

Philosophy

There is a strong temptation to start with HTML coding when all you see is the .asp file. This is where you start the app process, and I suppose plenty of tag-slingers would do just that. I personally am not very good with the whole .html asthetics thing, and so I’m more comfortable creating an app and putting an HTML hat on it. Still, I’ll go with the flow.

Plugins

The plug-in thing seems broken both socially and technically. I can’t find more than a very few MonoDevelop add-in repos through google, so I don’t know if they really exist. Where do they come from? I also couldn’t put any of them into the repo manager. I understand the feature is kinda new, but still.

Conclusion

With all the little problems with programming in the small (lack of programmer aids and hints, excessive mouse travel, lack of shortcuts, scant refactoring tools, limited browsing, funky wizards) I think that MonoDevelop 0.14 is just not ready for serious use in commercial or open-source projects. I will continue to piddle with it, but I really hope that they can address some of these shortcoming soon. Otherwise, I’m likely to revert to gvim and make for C# development in Linux.

If you are a monoDeveloper proggie, why not look into making the whole NUnit thing work better, and maybe add a feature to search the libraries for referenced types. Perhaps you can reduce the amount of mouse travel a guy has to endure in a normal hour of programming. I think that this project is a good idea, and it should continue and become great some day. Most of my complaints seem to me to be small matters of programming to fix. Hopefully you all can have a very solid 0.16.

1 Comment »

The URI to TrackBack this entry is: http://tottinge.blogsome.com/2007/11/07/monodevelop-first-impressions/trackback/

  1. You can make money on Rails. It’s becoming the new default choice for new web development in a lot of shops. Django doesn’t enjoy the same enterprise mindshare but people are starting to notice it. You’ll like Django.

    Comment by Darrin Thompson — 2007-November-7 @ 05:40

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.

Get free blog up and running in minutes with Blogsome | Theme designs available here