Perspectives in Eclipse

As I mentioned a couple of weeks ago, I've been doing some Java work here and there. I don't mind it, and I even welcome the chance to get reacquainted with Java every now and then. For now, the tooling I'm using is a mixture of Vim, the command line, and Eclipse. It works OK, but it hasn't been a fully pleasant experience.

First I ran into a bit of trouble getting the Eclipse debugger to work with Tomcat and getting the project system setup just right. Turned out I was using the wrong project type (!) and once I fixed that I was able to work much better. The Eclipse debugger still sucks, particularly if you've been spoiled by the VS debugger, which, even with it's faults and limitations, is still very good and extremely usable compared to some other tools.

The "feature" that I have come to rather dislike about Eclipse, however, is Perspectives. I don't mind the core idea; it makes total sense: Have a way to configure different settings and options in the environment (particularly around window & UI layout and available options) based on a given context.

However, I find that the way Eclipse implements Perspectives gets in the way I work, for a few reasons. The first one is that there are just too many perspectives, some of which don't quite make sense to me. For example, I see very little reason to have completely different perspectives for Java and Java EE; they share to much in common. Also, the choice of which perspectives are easily accessible (that is, through the Window -> Open Perspective menu option) seems pretty arbitrary and doesn't always work out well (not too mention the fact that the contents of said menu depend on what the current perspective is, which doesn't help).

What I found more annoying about perspectives, though, is that switching between perspectives is a manual process most of the time, which seriously reduces their usefulness, as you have to constantly go through the UI to change the perspective back and forth. For example, Visual Studio also has something similar to perspectives, in the sense that the UI can be customized for certain contexts (such as when coding and when debugging), but the fact that those contexts exists is mostly transparent to the user: Visual Studio will switch between them automatically based on actions you make in the UI, such as starting the debugger. Not so with Eclipse. For example, the Debug perspective doesn't [always] activate automatically when you start the debugger, which I've found pretty annoying.

On the other hand, it's possible I'm just using it wrong ;-)

Technorati tags:

MDX

I've been doing some work this week working on SQL Server 2005 Reporting Services using MDX to query OLAP Cubes. It's the first time I had a serious project (that is, do anything significant) using MDX, and it's been an interesting experience.

After a while, MDX starts to sort of make sense, but I will say that, as far as query languages works, MDX has a pretty strange syntax; it's not very readable [1] and I found it pretty absurd that the facilities in the language to work with parameterized queries were so convoluted!

[1] It's probably more accurate to say that queries can be written in a very readable fashion, which is usually useless because it means using a structure that makes it very hard to introduce query parameters. Silly, if you ask me...

Technorati tags: ,

Developers and Trust

Ayende picked up on Jeremy Miller's latest post and commented on the whole idea of "trusting the developers in your team". I think it's safe to say that Ayende is right on the money: If you can't trust them, and you don't want to coach them and help them become better developers, what's the purpose? Why have you hired them in the first place?

However, it's not just a trust issue. I think I've said it in the past; but this issue it's also one of business and understanding of the world of software development. I've voiced my concerns to this line of thinking to people before around here, and one counterclaim I've seen brought up time and time and again by project managers and even owners of IT shops here is that they need the untrained, less skilled, less trusted developer.

It's not that they don't trust them; it's that they hire them to be untrusted and kept with low-skills because some tasks don't require "special" skills. Invariably, I hear stuff like "why would you hire a top-notch developer to create the web UI of the application?" Well.... in my experience, that's usually one of the places that a) is the most visible part of the application, b) is one that can take a lot of time during development, c) is easy to get wrong and others. Besides, this is definitely along the lines of the Mort issues discussed a while ago.

Technorati tags:

Some Impressions on VS Orcas

Some things I've noticed while using Visual Studio 2008 using the downloadable VSTS VPC image:

  • The IDE, in general, seems a bit snappier than what VS2005 is for me. This is good news, and I do hope it keeps this way.
  • Contrary to what I expected, the Workflow designer is not snappier. It feels significantly more slow than in VS2005. This is bad news, considering it isn't snappy by any means in 2005 :-)
  • Can somebody, please, put the stupid Task window out of its misery and stop bugging us with it? It used to pop up at inconvenient times in VS2005, still, but it keeps popping up all the time in Orcas. Extremely annoying.
Technorati tags:

Bounded Mort

Nick Malik has posted another thoughtful piece on the whole Mort topic that's been going around these past few days. While I appreciate where Nick is coming from, I can't agree at all with his perception. Ayende also voiced his opinion on the topic here.

Trying to control and bound a developer and intentionally doing everything possible to keep him blissfully ignorant about the tools he's working on has not proven very successful so far, and frankly, I think it's not only a bad idea (as in, it doesn't work at all, abstractions are leaky and all that), but I also find the idea incredibly depressing and dreadful.

Here's just a few things that are incredibly wrong with this whole idea, imho:

  • It is a self-defeating attitude: It means you stop focusing on improving the situation and purposefully keeping it in a bad, unsustainable position.
  • It is really elitist, far more than any of the times the whole ALT.NET idea has been brought forward. It essentially means you just split the developer profession in two mutually exclusive, segregating communities (casts?): Those that know and do, and those who don't know and do.
  • There's no way to cross the bridge: Once you've started as one of these Morts guys, you stay there. The whole proposition is based on the idea that Mort has no need to learn anything new on the job (and possibly didn't even need to know much to start with). Indeed Mort should not try to learn anything or become smarter lest he tries to work around the walls of his prison (thus causing damage).
  • This, in effect means that once a Mort, always a Mort. Mort is not likely to look for a new work place, since he'd only be able to work as Mort anywhere else, anyway. No need to keep working hard trying to attract and keep those pesky developer types, whooohooo!.

Incidentally, this is why this whole idea is the wet dream of most project managers and IT shop owner's I've met: it promises cheap, untrained, replaceable labor, and low cost to ensure high personnel retention. Goodness gracious great balls of crap!

Now, is it good to try to make it easier for the developer to focus on solving the business needs? Absolutely. Is it good to try to raise the level of abstractions we work for so that we can concentrate most of the time in the parts of applications that actually matter? Again, absolutely agree. But making the leap from here that the obvious end result we should aspire to is to this? I mean, if that's the best we can do, we might as well just abandon all hope and give up.

An interesting aspect of Nick's proposition is that it is indeed a win-win situation for a company like Microsoft, while I'd say pretty much all IT shops (partners) in the MS ecosystem would come out loosing.  See, in Nick's ideal world, Mort would just drag and drop till he drops (sorry, couldn't resist :-)), while someone smart would create the tools and services he use. The next proposition in line would be that those tools would be done by MS (of course) and the services well, by none other than MCS [1]. Partners around could put in those Morts instead of supplying development talent, but, well, what do you know! Since Mort doesn't really have any special skill set (particularly none that's very software specific), well, the business themselves might decide to supply it! [2] 

And now we've just gotten round all the way back to the old idea of CASE tools and 4GL languages.

[1] I have no grudges against MCS; indeed I know many people working there. It's just the logical conclusion :-)

[2] This would also likely mean that those lucky enough to actually work on the Developer side would probably be able to get paid a lot more for their work, being a scarce resource and all...

Technorati tags: ,

It’s not the tools, it’s how they’re used

In my previous entry about Morts, Nick Malik left an interesting response. What caught my eye the most was his comment that:

"If you find yourself having to maintain a program that was not written to be maintained, don't blame the maker of the tools!"

I agree with this sentiment to a large degree. How people use the tools, is critical. But, that's only part of the story. See, a lot of tools don't lend themselves towards wiring maintainable code. Some of Microsoft's current tools fall in that category, unfortunately. For example, some don't lend themselves towards creating testable code. That's a big problem all by itself.

So I'd like to take Nick's comment and turn it an opportunity. Sure, it's the people using the tool that take most of the blame, however, the maker of the tool may (should!) have a significant responsibility in creating tools that encourage the creation of maintainable code. (Notice I use the word encourage here).

There's a thin, but significant line between tools that allow you to create crappy code quickly and then leave you high and dry, versus tools that encourage you towards creating good code. The key here is that the tools should make it as painless and natural as possible to do the right thing. This is not about wizards. It's not about visual designers. It's about code.

Microsoft is in a unique position to provide this, but so far some teams within it insist on making the default way of creating applications to be the one that favors quick and dirty over the one that favors maintainable code. The latter does not need to take longer, be more complicated, or be harder than the former, but some tools insist on making it that way. Choosing the right abstractions, by the way, is a key step here.

Technorati tags: ,

Developer Skill and Writing Maintainable Code

There are some discussions going on at this time on the community around the topic of
writing maintainable code and the different trade-offs a given "project reality"
might force on the developers involved in it. Very much worth reading and highly
recommended everyone reads and participates. Jeremy Miller beat me to it with some
good comments, as well.

My own personal opinion on the matter is a bit of a mixed bag (and so at times I might
seem to contradict myself).  On one hand, I find myself in total agreement with Ayende and Sam (just to name some of the most vocal proponents) that raising the level and knowledge of the developers that are going to be receiving the application is a critical step. I am a strong believer, learned from my own personal experience, that there's no amount of tooling and supervision/control that can "fix" the deficiencies of the team members themselves. It just simply doesn't cut it.

I believe says it best when he says that "Because my view is that having the developers learn a better way to build software is much less costly than continuing to produce software that is hard to maintain". I couldn't have said it better.

I am, however, sensitive to the dilemmas brought up by JDN and Frans Bouma, both of which have articulated their concerns and point of view in very provocative and thoughtful ways. I'm sensitive because I've found myself in their position a few times, and I've made the same choice they've argued in some of those occasions. However, my experience also shows that making that trade off, at those times I've made it, has eventually shown to have been a less than optimal decision.

Given this, I'm firmly in the camp that a) you should strive to avoid making that choice if at all possible, and b) you've got to be pragmatic about it. Sometimes, yes, organizational dynamics and politics play a role here, even if we disagree with it. So sometimes that might be the right choice to make, but rarely (if ever) for purely
technical reasons. And the whole "other developers might not get it" is, in the end, a red herring and tends to obscure the real reasons and motives behind it.

Why is it a red herring? Because it is usually a sign of the "we want to have a few highly skilled developers and lots of unskilled, cheap developers for the 'easy' stuff" mentality that pervades a lot of the companies in our profession, and it's just one I can't agree with. It's not that everyone should have 10 years of experience building extremely complex applications, but rather that everyone should have the opportunity to do their work to their best of their abilities. Inevitably, I find that this sort of mentality tends to set bounds that developers can't later cross easily without a lot of push back from management and the organization, leaving unskilled developers without a path they can collaborate with their more skilled, more experienced peers to grow their own skill set.

In many ways, this is a topic that strikes close to home for me, for several reasons. First of all, this kind of discussion is one of the reasons I decided to quit my last job and start my own company. In my point of view, the whole concept that the people are the key ingredient that make/break a project is absolute key. It's not about how much experience and knowledge the developers have. This is a significant component, for sure, but one that can be acquired with time. What is absolute key is the attitude: 

  • A willingness to constantly learn and look for new opportunities for personal/team/product improvement. 
  • A commitment to satisfying the client/costumer/user.
  • A commitment to being ethical, honest and professional about your work and your own capabilities and limitations.
  • Awareness of your context and that of your project/product.
  • Caring about what your doing and being enthusiastic about it.
  • Being critical about your own work and those of others, even if your believe others are above you or have different responsibilities (say, project manager or architect). Note this is not about constantly criticizing other people's work; it's about thinking critically about what the work that's being done by the team as a whole and the results.

I've seen many developers that lack one of this. Some are just 9-5 guys [1] that just want to get through the day without caring about the end result. Others have no desire for learning new things or getting out of their comfort zone. Others simply don't care about what other people do or what they do, usually manifested by them saying they're done implementing something and when you go look it doesn't even compile. Others will just do what their told to do and never even stop considering if it makes sense or if indeed it is the best way to do it.

Like Ayende, I refuse to be just a replaceable cog in a big machine; I want to make a difference and continuously learn and grow my skill set. I wouldn't have it any other way.

So it's about lots of different things. I love working with people that are critical about my work; they make me be a far better developer, and by listening to their opinions and sometimes different alternatives they propose I myself learn a lot. Sure, it's sometimes hard to listen to it all, but it's much worth it.

Arguing about the right things
I think one aspect that has tended to mud a bit the discussion is that we put a lot of different things into the same bag, which makes everything more confusing. For example, some people have mentioned MVP/MVC, ORM and TDD as important aspects in achieving maintainability, which some people have reacted a bit against.

From my point of view, the problem here is that we're mixing practices with tools. For example, TDD is a practice, and one that indeed is (imho) very important in facilitating the creation of maintainable code. But by itself it is no silver bullet (my friend Sam, for example, always talks about using the full set of 12 practices proposed by eXtreme Programming, not just TDD).

On the other hand, ORM and MVP/MVC are tools (yes, patterns are just design/coding tools, in the end), and sure, they can significantly help in producing maintainable code. But they are just tools, and you have to evaluate their impact and usefulness in each case. Some projects might simply not benefit from using ORM
(for example, this is rarely a useful component in the integration project's I've worked on), while it might reduce the amount of hand written code in your typical business application (and less code will always mean more maintainable code). But others might prefer for certain applications the use of code generation instead of an ORM and, you know what? That might be a perfectly valid choice in the context they're in. What's key here is
that they've done the analysis and choose what they believe it's best for them given their context.

Note: It's perfectly possible that the choice still turns out to have been the wrong one in the end, given that many times you start out with limited information from which to make your decision; but that's life.

It's about the future

One key issue I've seen again and again is that many developers don't even care about writing maintainable software, simply because they're not the ones that will have to maintain it. It's a very pervasive mentality in some circles that has been brought, in part, by the outsourcing of software development (something I make my living off, by the way). For example, in Colombia, a lot of companies have no internal software developers anymore, so external providers come in, create the initial release of an application and go away, many times never to see that code again except for one or two fixes during stabilization.

This means many developers don't really learn about the value of writing maintainable software because they it's easier to justify to yourself the writing of poor code when you think "I'm not going to maintain this later on, so why should I care?". This is not only a very egotistical point of view (and easy to fall on) but also ethically challenged. But what's worse is that it is a complete fallacy: you're still maintaining your code, and every day you write poor code in a project it's more code you have to maintain. It's just a lot of people seem to think otherwise and lie to themselves as a defense mechanism against the pain their going though every day on their project.

[1] there's a difference between wanting to have a life outside of work (good) and not giving a shit (bad).

The Wrong Mort

My good friend Sam Gentile pointed to me Nick Malik's post on "Tools for Mort", in which Nick responds to some comments made by Sam a few days ago. I don't particularly agree with Nick's point of view. Several things bothered me about this post.

Why are we talking about Mort again?

First of all, I've said in the past that I don't particularly care in the Mort/Elvis/Einstein personas. Besides the fact that they tend to split users/developers around what I believe are the wrong areas, they are way too misinterpreted all around. Just bringing up the whole Mort topic is a sure way to turn a discussion in an unproductive direction.

What's worse, Nick apparently thinks Morts are the great Agile developers fighting the corporate world. Frankly, I have no clue where he got that idea from, but what do I know.

Look, it's great that there are people leveraging office and other platforms to solve business problems and get work done. There's a lot of really good use cases for that technology. However, it doesn't mean all software projects should be solved that way. In some scenarios, these kind of tools are great for solving immediate issues, but many times they are not suitable for building long-lasting, scalable solutions. Both sides of the software spectrum have different needs and deserve different solutions.

However, let's be clear about why the term Mort got a bad reputation: It was typically applied to people who didn't quite understand the tools/environment they were working on, creating half-assed applications that while did the trick initially, were a living hell to maintain because they didn't respect the most basic principles of good software development (in many cases, were not even aware they existed). Hey Nick, let's be honest here: your "Mort" friend was definitely no Mort if he was doing continuous integration and automated unit testing [1].

Sam doesn't get Agile?

Nick goes on to say:

"Do you really mean that Microsoft should make a priority of serving top-down project managers who believe in BDUF by including big modeling tools in Visual Studio, because the MDD people are more uber-geeky than most of us will ever be?  I hate to point this out, Sam, but Alpha Geeks are not the ones using TDD.  It's the Morts of the programming world.  Alpha geeks are using Domain Specific Languages."

From this sentence alone it's clear to me that Nick is obviously not aware of Sam's extensive and continuous efforts talking about "agile architects" and railing against BDFU. Really, you might want to look a bit around before making those kind of comments.

Now, Morts are the ones doing TDD? Wow. color me surprised. Alpha Geeks use DSLs? Really? AND THEY DO NOT DO TEST DRIVEN DEVELOPMENT? WOW.

Hummm...not quite. Most of the so called Morts have no freaking clue what Test Driven Development. People like the Code Better guys, Ayende and a lot others are precisely doing that: Trying to raise the level of awareness in the community about TDD/DDD and improving the way they write software. They are the ones trying to improve our field by making developers more aware of how they work and get them to write better software that not only works and solves the business problem it is intended to solve, but that is also maintainable. At least grant them that much.

I think Nick is also a bit confused about the whole Alpha Geek business. A lot of them do use dynamic languages and yes, a lot of them use them to create domain specific languages. But what makes you think they don't need TDD? Quite the contrary, Nick, they are far more reliant on TDD and automated unit testing.

Nick then says that "We [Microsoft] are the singlehanded leaders in the space of bringing BASIC developers up to modern computing languages.". Humm.... certainly true, you moved them over to VB.NET. It's certainly possible to write Object Oriented code in VB.NET. That, however, doesn't mean they are. Let's face it, there are millions of developers out there using VB.NET and (yes) C# that are still writing essentially procedural code (if they are lucky). Just because you declare classes doesn't mean you're doing OOD.

It's the tooling

But that's all mostly irrelevant to the discussion. I got the chance to speak about this with Sam and others during the past MVP summit, so I do think I have an idea what the fuzz is about (and because I happen to agree with the consensus). See, none of us are arguing that Microsoft has not done significant contributions to the community and even to the Software Developer profession, because they have.

What we do argue about is the tooling coming out of Microsoft and the way it is meant to be used. A lot of the software coming out of DevDiv these days seems to be very focused on building something quick. That's not a bad thing by itself, we all want software could be developed faster and that we could deliver it to the business as soon as possible.

What is a problem is that the tools enable that quick result at the expense of something else; something fundamentally important if you're not writing sample applications or "quick-n'-dirties". They are fundamentally non scalable (and I'm not talking about performance here), and unmaintainable if you just stick to the whole straight from the db databinding and drag and drop style of development Microsoft is so proud about. Better people than me have argued this more vehemently that I ever could so I'm not going to repeat it here.

I think that, at a fundamental level, there's a significant disconnect here. What some part of the community spends its efforts in is to try to raise the awareness, knowledge and capabilities of developers everywhere as a means. For them this is a key point in getting better software, with better and faster results. Instead of dumbing down the tools to suit the unwary developer, they are trying to smart up the developer to use the available tools more effectively.

[1] Somehow, I can't imagine Nick's Mort doing TDD while writing Excel macros, but maybe I'm just being cynic...

Technorati tags: , ,

Using Visual C++ 6.0

I've been spending most of my time this week back in the unmanaged world, writing C++ code again in good old Visual C++ 6.0. To make it even more fun, this was OLE DB with ATL. To be honest, took me a couple of hours to get the hang of it again, but after that my C++ started to come back more easily.

I did finally remember one of the reasons I moved off C++ to the managed code: Strings. Man, dealing with strings in C++ is just painful, even with CString, CComBSTR, _bstr_t, std:string and std:wstring at your disposal. Or maybe, that's just another reason it can be a pain in the neck. Anyway, if you find yourself writing OLE DB code again, the RowsetViewer tool in the MDAC SDK is a godsend :-).

One thing that I can say in favor of Visual C++ 6.0: The thing is freaking fast compared to Visual Studio 2005. However, I didn't remember there was no obvious way to change the font and font size, so using VC++ 6.0 on a hi-res screen isn't a particularly nice experience.

Technorati tags: , , ,