Blog of Rob Galanakis (@robgalanakis)

Thank you, Rico Mariani, for reminding me how bad I was

A little while ago I read two great articles by Rico Mariani, a MS employee who usually blogs about performance in .NET (though python being an OO language the same advice applies there). The articles in question were these:

Performance Guidelines for Properties

Performance and Design Guidelines for Data Access Layers

I’d suggest at least skimming over them. He talks about, for property accessors, not allocating memory, locking, doing IO, having side effects, and being fast. For the DAL article, you should really read it, but the part that was especially relevant is “Whatever you do don’t create an API where each field read/write is remoted to get the value.”

It was a shocking reminder of my early days programming. Every point mentioned in those two articles, I was hands down guilty of. I don’t mean, I’ve done that sort of thing occasionally. I mean, I designed entire systems around everything you shouldn’t do with regards to properties and DAL design. To be fair, this was years ago, I was new to programming, in way over my head, and didn’t have people to turn to (no one at the studio could have told me what an ORM was or given me these suggestions about properties), so I don’t feel much guilt. And I learned better relatively quickly, well before reading those posts.

I work with a lot of new programmers, and experienced programmers who aren’t focused on higher level languages. The articles, most of all, reminded me how far I’ve come and how lucky I am. The new programmers haven’t had a chance to make the epic mistakes I have. The experienced programmers trained in a world without such useful managed languages, high quality bloggers, and sites like Stack Overflow; a world I’ve never known and I’ve benefited by learning best practices and new skills, and finding and breaking bad habits.

I remember at the time thinking how great some of their features were, the same features that, as Rico points out, are really terrible ideas. I felt fortunate that I already followed his guidelines, and even more fortunate that few people were around to witness the hideous abuses of them!

3 thoughts on “Thank you, Rico Mariani, for reminding me how bad I was

  1. TechNeilogy says:

    Whenever I’m writing code — but especially when I’m tempted to be proud of it — I step back and remind myself that what I’m proud of today is what I will consider garbage tomorrow when I’ve learned a little bit more and am a little bit wiser.

    1. Good advice.

      Also Neil I wanted to subscribe to your blog but I can’t find the RSS feed? That’s the major problem I have with Blogger sites, they are either not there are all or really hidden. Yours doesn’t appear to be there at all.

  2. […] a previous post, I linked to Rico Mariani’s performance advice for Data Access Layers. On G+, Tyler Good […]

Leave a Reply