object-oriented programming

design patterns

Rethinking Design Patterns

Many developers consider the book Design Patterns a classic. So what's a design pattern? A design pattern systematically names, motivates, and explains a general design that addresses a recurring design problem in object-oriented systems. It describes the problem, the solution, when to apply the solution, and its consequences.

By Jeff Atwood ·
Comments

object-oriented programming

Your Code: OOP or POO?

I'm not a fan of object orientation for the sake of object orientation. Often the proper OO way of doing things ends up being a productivity tax. Sure, objects are the backbone of any modern programming language, but sometimes I can't help feeling that slavish adherence

By Jeff Atwood ·
Comments

xml

When Object-Oriented Rendering is Too Much Code

Let's say you wanted to generate and render this XML fragment: <status code="1" /> <data> <usergroup id="usr" /> </data> Here's a fully object-oriented way of building it: System.Text.StringBuilder sb = new System.Text.

By Jeff Atwood ·
Comments

software development concepts

The He-Man Pattern Haters Club

Richard Mansfield has a bone to pick with object oriented programming: Certainly for the great majority of programmers – amateurs working alone to create programs such as a quick sales tax utility for a small business or a geography quiz for Junior – the machinery of OOP is almost always far more

By Jeff Atwood ·
Comments

programming languages

Why Objects Suck, Revisited

I recently blogged about how pure object oriented programming is oversold. Well, evidently Paul Graham agrees with me: Object-oriented programming generates a lot of what looks like work. Back in the days of fanfold, there was a type of programmer who would only put five or ten lines of code

By Jeff Atwood ·
Comments

object-oriented programming

Inherits Nothing

Have you ever noticed that new .NET developers have a tendency to use inheritance for... well, everything? On some level, this is understandable, since inheritance is used throughout the framework; everything in .NET inherits from a root object. There's one big difference, though: we're writing crappy

By Jeff Atwood ·
Comments

software development concepts

Why Objects Suck

There's been a lot of discussion recently about the Object to Relational mapping problem, which is a serious one. This Clemens Vasters blog entry summarizes it best: Maybe I am too much of a data (read: XML, Messages, SQL) guy by now, but I just lost faith that

By Jeff Atwood ·
Comments

programming languages

Hungarian Wars

I've found a number of blog posts about the pros and cons of Simonyi's Hungarian Notation, most notably, this blog post commenting on the extreme polarity of the reprinted MSDN article rating: This single image really cuts to the heart of the debate, pointedly illustrating what

By Jeff Atwood ·
Comments