Somewhere in the overlap between software development, process improvement and psychology

Posts tagged “c#

Linux GUI Development: Monodevelop 2.6 review and screenshots

This blog is part of a series looking at programming tools on linux and covers MonoDevelop 2.6

MonoDevelop 2.6 is awesome 🙂 I first tried MonoDevelop about a year ago and gave up quickly. It just wasn’t usable, but these days it’s a totally different story. I’m quite drawn to Mono and MonoDevelop because I used to be a .net developer and really like C# as a language.  Also as an old Delphi developer the .net framework has an intuitive design and structure since they were both designed in large part by the same guy – Anders Hejlsberg. I saw him present on LINQ in LA, he’s a clever dude.

Mono is an open source project to make .Net compliant tools, compilers, runtimes etc. able to run not just on windows, but on linux, android, mac etc. MonoDevelop is an open source development environment for Mono providing GUI designers and language support for C#, Java, Boo, VB.Net, Python, Vala, C, C++, Oxygene (Object Pascal based .Net language, though not available in the current version of MonoDevelop).

Installation

I was able to install it directly from the Ubuntu Software Centre, it ran straight away with no issues. Not quite 10/10 though. I tried to write a “hello world app”  and  it wouldn’t compile 😦 A quick google later and I found that the default .net framework target in the project options needed changing from 2.0 to 4.0 then it was fine. 9/10

First Impressions

Starting up MonoDevelop you’re greeting with a very MS Visual Studio like welcome screen with links to create stuff, recent stuff and web links. The IDE has a very solid and elegant feel, it doesn’t start with a million views and tabs like Eclipse, is visually pleasing (unlike Lazarus) and incorporates platform theming well (unlike Eclipse/SWT). 10/10

MonoDevelop Welcome Screen

GUI Designer

The GUI designer is embedded in the main window in a similar fashion to MS Visual Studio, with widgets in a toolbox controlled by layout containers (fixed, aligning, tables etc.). Widgets are added to a window by drag and dropping and although there’s nice to have features like alignment guidelines missing the designer is solid, platform themed and doesn’t crash. It slightly frustrating to me that I can’t just double click on a button to create a default click handler and start writing my code but I can double click in the signals box (on the right) and do it from there.

MonoDevelop GUI designer

Brilliantly, it can handly some old c# .net forms I wrote which used custom visual inheritance to make a new form frame for an unusual app which I assumed would break it!

The only downside here is that many of the properties seem oddly named and aren’t consistent across different types. I keep having to hunt around for where to find the text property for different objects. There’s little relationship to WinForms either if you’re using GTK# in terms of property and event names. Oh yeah, and alignment/guide lines aren’t there yet when dragging components around.

Putting together a simple form is a trivial matter completed in seconds. 8/10

Code Editor

The code editor supports all the normal modern stuff like colour control, code folding, code completion etc. and again is neat and elegant. The code completion helper in particular is very easy to use as is the code snippets tool box. Obvious problems are underlined as you type and the link between the visual elements and code is easy to work with.

MonoDevelop - Code Editing

MonoDevelop - Code Errors

The only downsides for me are the refactoring interaction which features a visual arrow that jumps to suggested places to put the new code – it doesn’t jump to very sensible places sometime; the compilation errro/warnings which are shown inline embedded in the code. These can make it a little hard to read the code until you’re used to them. You can of course turn them off. Overall though, it’s excellent. 9/10

Language Features

Writing C# in mono is brilliant. From the mono project website:

The Mono C# compiler is considered feature complete for C# 1.0, C# 2.0 and C# 3.0 (ECMA). A preview of C# 4.0 is distributed with Mono 2.6, and a complete C# 4.0 implementation is available with Mono 2.8…

That means the language supports OO constructs, iterators, anon methods, generics, statics, extension methods, LINQ, memory management, reflection, threading and much more…

Between LINQ and the mono framework implementation of the powerful MVC pattern loading stuff into object graphs and presenting that in editable for to users is a high level programming exercise.

As an easy language example here’s  working with a collection of TestBlob entities:

private List<TestBlob> blobs = new List<TestBlob>();

...
StringBuilder sb = new StringBuilder();
for (int n=0;n<blobs.Count;n++)
{
      sb.AppendLine(blobs[n].Name);
}
....

Simplez! 😀

10/10

Feedback Process

There’s a little feedback button on the bottom of the IDE that lets you quickly send feedback to the community. I did this regarding my frustration over clicks from the visual designer direct to code handlers and another minor issue. Within the day I had a friendly response describing how my comments had been listed as two bugs on the public bug tracking system on xamarin.com and explaining how to add myself as a subscriber should I wish it.

MonoDevelop - Feedback

That’s awesomeness on toast! 10/10

Conclusions

The solid GUI designer, integrated debugger and high level language support for cross-platform development provided by MonoDevelop is brilliant. It’s easy to knock up a quick app to do something. My 7yr old son and I have been using it do develop a calculator as an introduction to programming basics and he things it’s a good easy to use system.

Getting going with the MVC pattern can be a little frustrating if you just want to programmatically put a bunch of things in a listview (btw if you do this use a treeview not a listview even if that sounds crazy at this point) but that’s a common hurdle for most modern day languages/gui widget sets.

The mono and monodevlop communities are large and active and the web is full of c# tutorials and info. I’ve found that guidance written for MS developers in c# is directly applicable to c# in mono. This is now my favourite cross-platform development environment and technology.

Category Score
Installation 9/10
First Impressions 10/10
GUI Designer 8/10
Code Editor 9/10
Language Features 10/10
Feedback process 10/10
Overall 93% – Excellent
Advertisements

Ngrams for nerds

Pictures that are worth 500 billion words!

Google Ngram Viewer shows graphs of how many times words or phrases have occurred in a set of 5 million books over the years. They’re a really interesting way of seeing trends in information and relative importance between words. It’s free and easy so check it out.

Here’s some I recently ran that I found interesting. I ran most of them from 1950 onwards and  the info only goes up to 2008.

Comparison of programming languages

Programming Languages

Ngram link – When looking at this you’ve got to mentally remove the baseline Java and Pascal references from the 1950 as they’re about coffee, islands and mathematicians. Interesting to see Java so dominant.

Programming paradigms

Programming Paradigms

Ngram link – I found this one really interesting. Compared to the others in my query “structured programming” had a lot more books written about it. I wonder how much this is a reflection of the rise of the internet… these days although there are lots of programming books the primary source for learning a language is online material?

Methodologies

Methodologies

Ngram link – I was a little surprised to see RUP so much more prevalent than agile but then I did have to add “software development” to the term to avoid including the bendy and stretchy. Also as with the previous one I suspect that there’s a difference here between a vendor driven process with supporting books and a more open source philosophy on agile as a generic umbrella for methodologies, and therefore more online sources. As Ivar Jacobson says: “No one reads process books

Shareware, Freeware and OSS

Shareware, Freeware and Open Source

Ngram link – This one speaks for itself 🙂 I wish I could have worked out how to add “expensive vendor products” to the query!

User Stories vs. Use Cases

User Story vs. Use Case

Ngram link – Ah yes, this argument again. Interestingly this dominance of use case over user story in written books correlates with query stats between user stories and use cases on by blog and the ivarjacobson.com site. Personally I think they’re both great and complimentary, I often use them together on software projects.

Windows vs. Linux

Windows vs. Linux

Ngram link – Yep, Linux beats Windows at every turn.

More Ngrams!

For more fun with Ngrams watch this very funny video explaining this stuff