@ayende You ought to try Mercurial. in reply to ayende 1 week ago
06
Jun

How to become a better .NET developer

If I can give one single piece of advice to ASP.NET developers anywhere, it will be this:

Learn another web development environment.

I really can not emphasise this strongly enough. From what I’ve observed, developers who only work with ASP.NET seem to have quite a bit of difficulty thinking outside of the Microsoft box. I am frequently confronted with indiscriminate and even inappropriate use of aspects of the .NET framework that don’t scale, such as DataSets, view state, or drag-and-drop programming. There’s nothing wrong with all these per se, but one of the most important things you need to know about how to use them is when not to use them. When all you have is a hammer, everything starts to look like a nail.

The ASP.NET Web Forms model in particular was originally designed to make web development look like Windows development, and ease the transition for VB6 developers from programming for rich Windows clients to the web. The result of this is that it has made the easy aspects of web development almost brain dead, while introducing a horrendously leaky abstraction layer that makes the hard things even harder, with masses of gotchas and pitfalls to trip you up if you venture outside it.

Languages such as PHP, Ruby on Rails or Python don’t have the same leaky abstractions, so developers tend to not only program “closer to the metal” but to think closer to the metal as well. This is why most of the cool sites, with stunning Ajax effects, tend to be written in these languages and target these platforms, while ASP.NET is largely languishing in the enterprisey world of Dilbert-esque cubicle farms.

I recommend you choose your alternative carefully, however. Rails and Python are the best choices. They will teach you patterns, practices, conventions, O/R mapping, MVC, and all round agile and pragmatic programming, and they tend to be taken up by smart and experienced developers who know what they’re doing. I have mixed feelings about Java: while you can learn a lot from it, like .NET it is very enterprisey, and at a time when everyone is getting excited about dynamic languages, Java is heading in completely the opposite direction. And I certainly don’t recommend PHP as a learning exercise: it is a beginners’ language — and a mind-bogglingly badly designed one at that — and while PHP guys are generally pretty enthusiastic and some of them are quite smart, and there are some decent PHP frameworks such as CakePHP and Symfony, the overwhelming majority of the PHP community simply don’t have what it takes to be programmers. Having said that, you need to know it, simply because it’s so pervasive.

You should also learn Linux if you can. It will teach you about modular design and the value of scripting everything that can be scripted. This is right at the heart of why Unix is Unix: a large part of its philosophy involves chaining text-based programs where the output of one can be passed as the input to another, to produce some fairly powerful command-based functionality, and scripting repetitive tasks so that their outcomes can be reliably reproduced. These are philosophies that seem largely lost in the world of Windows, which relies much more heavily on the visual, drag, drop and click approach of dialog boxes and wizards, even though they are every bit as essential if you want to have robust procedures and practices in place.

And whichever platform you take on board, you simply must familiarise yourself thoroughly with CSS, DHTML, JavaScript and Ajax, and at least one JavaScript framework such as Prototype or jQuery.

Personally, I still think that ASP.NET is technically the best platform on which to develop scalable, high performance, reliable web applications. However, in order to make the most of it, you need to have a good feel for what approaches you can import and learn from other platforms. Otherwise you will be stuck with the limitations and leaky abstractions of Web Forms.

20
May

Where are all the passionate .NET developers?

We’re looking to take on another developer.

The majority of our work is in C#/.NET, so obviously we’ve adjusted our skills requirement accordingly. However, what we are really looking for are smart people who get things done and have a real passion for what they are doing. If you’re smart and passionate, it isn’t a disaster if you don’t have two years of .NET experience, because smart, passionate developers can pick up pretty much anything very quickly, and besides, in this game you have to be learning very quickly all the time.

So, how can you identify the passionate ones?

For starters, I personally think that CVs tell you very little. When I see your average developer CV, my eyes tend to glaze over and all I see is white noise. They show that you have x years of experience in y platform, and that you know what all the current buzzwords are, but that is about it. They don’t tell me whether you spent those x years cutting and pasting code snippets out of those stupid PHP tutorials that teach you to write SQL injection vulnerabilities, or whether you were implementing recursive algorithms and Markov chains in your sleep.

No, the easiest way to get a decent first impression is to Google them and see what their online footprint looks like. You can typeset your CV in Comic Sans for all I care, but if we find you have a blog, we will sit up and take notice. Merely the fact that you are going beyond the 9-5 mentality and showcasing your skills to the world puts you head and shoulders above the crowd.

However, even then, there are blogs and there are blogs. Some developer blogs are very dry indeed — they consist of little more than a string of deadpan howtos and regurgitations of whatever SDK you are using. I’m not saying your blog shouldn’t contain any of those at all, but you need to convey some life with them. What’s the story behind the bug you’re blogging about? What’s your opinion on Hungarian notation? I don’t care if you say something I don’t agree with — the very fact that you actually have an opinion and aren’t being totally insipid is worth a tremendous amount.

Even better are contributions to an open source project. They don’t have to be in .NET — if all your publicly showcased code is in PHP, that’s fine. Rails is even better, simply because Rails developers seem to be the most passionate ones of the lot. One of the best conversations with another developer that I’ve had in a long time was with a Rails developer at MiniBar about a year ago. His enthusiasm was infectious.

And this is where my gripe is. Why don’t we see the same passion and enthusiasm in .NET land?

This is something I’ve noticed in general. PHP often has a reputation for producing a lot of bad code, but PHP developers are much more likely to blog, and their blogs frequently seem to have a lot more sparkle to them. The PHP guys that I know may not necessarily be brilliant coders, but they almost all have much more passion and drive than their .NET and Java counterparts. I think it’s fair to say that this exhibits itself in higher standards too, particularly visually: more often than not, PHP and Rails blogs are pure eye candy, and you certainly never see any of them producing anything as gross as purple and blue Lucida Sans.

You see it in the open source world too. My friend Sam McGeown recently lamented the fact that there are no real .NET WordPress killers. I don’t think it’s likely that there ever will be either: open source is generally acknowledged to be very much a second class citizen in the Microsoft ecosystem, and far too many open source .NET projects simply peter out and die completely after a year or two.

Some people think the problem is that Microsoft has been dragging its heels over open source for far too long. This is true to an extent, but apart from that, the problem is that the .NET (and to a lesser extent, Java) ecosystems are just too enterprisey for their own good. They tend to find their niche in large development teams in large companies, where developers are generally small fish in a huge pond. In the enterprise, you are spending all day every day implementing frustratingly crazy business rules, and you are not writing code for the end users but for their bosses, who often won’t sign off on an Ajax drop down search if it costs them an extra five hundred pounds. In an environment such as that, code gets written to the lowest common denominator and there can be little impetus to pull out all the stops and go the extra mile. The way up the career ladder is not to become a better developer, but to step off the coding ladder altogether and into project management, or enterprise architecture, or an MBA, and make way for another generation of mediocre programmers.

Unfortunately, nearly all the developers in the .NET ecosystem seem to have most of their commercial experience in that kind of setup. They can maybe offer us seven or eight years of experience as 9-5 developers, but the passion just isn’t there. Sure, there are people who buck the trend, but I can’t avoid the conclusion that the overwhelming majority of smart, passionate, enthusiastic developers work with PHP, Rails and Python.

21
May

.NET by day, Rails by night

Here are a couple of interesting blogs for anyone who falls into the “.NET by day, Rails by night” category. Softies on Rails is a blog about Rails especially geared towards Microsoft coders by a couple of developers in Chicago, and A Fresh Cup is Mike Gunderloy’s new blog chronicling his reinvention of his career. (Gunderloy, for those of my readers who don’t keep up with who’s who in the world of software development, is a fairly well known author in the Microsoft world.) Back at the start of the year, he announced that he had had it with the Borg and was jumping ship. It looks like Rails is his framework of choice in Life After Microsoft.

Personally I’m not a great one for language wars. I tend to adopt a fairly pragmatic approach to the whole issue, which is why I do both .NET and PHP, as well as anything else that I am required to get my teeth into. Most of my development experience over the past six years has been in .NET, and I don’t see that changing too drastically in my day job, but I do think it’s a good idea to have some experience of other languages and platforms as well. A lot of developers only learn the bare minimum needed to do their jobs, and the result is often www.worsethanfailure.com.

Rails is a particularly good platform to learn as it teaches you all the latest best practices in web development: Model-View-Controllers, O/R mapping and the like, and important concepts such as “Once and only once” are drummed into you right from the word go. The Ruby language also contains a lot of advanced features such as closures and other functional paradigms, which can make for some pretty nice looking code. Plus, of course, there’s all the Ajax whizziness that can help you write really cool apps very easily.

11
Aug

Online documentation pains

When I’m learning new programming languages, concepts and things, I like to have the documentation available for download as a self-contained unit that I can refer to on my computer, rather than having to connect to the Internet to browse through it all online.

There are various reasons for this. The first is speed: since many APIs are overwhelmingly humungous these days, a quick, easy to use search facility and straightforward overviews and walkthroughs are a must. A .chm file is the best option — you can search it quickly and easily, and it usually doesn’t take more than a few seconds to find what you’re looking for. Individual HTML pages are not quite so good though, since searching is less straightforward. And accessing something on your hard disk is much faster than surfing the web, due to network latency and other similar factors.

Secondly, I prefer to spend the bulk of my time offline to help eliminate distractions. I’m not saying you should work offline exclusively: I have found a lot of help from online resources such as the ASP.NET forums, experts’ blogs, tutorials and the like. However, I do like to be disconnected from the Internet when I’m trying to work my way through some tricky problems. It helps to reduce distractions such as those Wikipedia loops that it’s so easy to get into — you know the kind of thing I mean, where you end up clicking on one interesting looking link after another for a while and suddenly realise that you’ve spent two hours reading a whole lot of total drivel and completely forgotten what you went online for in the first place.

Furthermore, at present at least, we still only have dial-up connectivity to the Internet at home rather than broadband, so going online is slow and cumbersome, though hopefully this will all change after we move house at the end of this month.

A lot of programming languages and platforms do quite well in this respect. The .net framework is a good example: the SDK documentation comes with examples, quickstarts, howtos and API specifications that you can install on your computer to refer to as and when you need it. PHP and Python are also pretty good, with comprehensive, searchable, easy to follow documentation available for download in CHM format.

Java is a bit more awkward. You can download the J2SE and the J2EE documentation, but they are a bit more fragmented, and contain a lot of links back to the web — in particular, from J2EE stuff to J2SE stuff, which is a little bit annoying. I’ve also found Ruby on Rails pretty frustrating. It would be great to have one download that covers both Rails and the Ruby core API, rather than having to go online all over the place, but there isn’t one. You can get a number of CHM files, but they seem to be strewn all over the place and don’t cover everything. This is a real shame, because I would love to be able to get my teeth into Rails in my spare time, and it seems that you can’t do that quite so effectively offline.

Still, at least the documentation is comprehensible and reasonably structured, which is a lot more than can be said for Perl. I really, really hate the Perl documentation. Look at the index, for starters — a list of cryptic, obfuscated and sometimes downright misleading names such as perlboot, perltoot, perllol, perlre, perlrun, perlpod. I can just about make sense of it, but it takes twice as long to find what you’re looking for as anywhere else. To a beginner, it is probably the most confusing, incomprehensible and intimidating mess you are ever likely to encounter.