Design Patterns Aren’t (That) Evil

I agree with much of Jeff Atwood’s writing when it comes to programming and development. I’d say on any given subject 90% to damn near 100% (congrats to him on his new adventure). But I think his post on design patterns, unfortunately, falls into a line of argument that I disagree with strongly – that *identifying* design patterns leads to complexity. Complexity because some engineers leverage them right from the get go without thinking about simplicity first. He even flags Head First Design Patterns as a potential complexity creator.

I understand the concern. Every once and a while you get into an argument with someone who is telling you your code stinks because it doesn’t employ pattern “so-and-so” and every once and a while you come across some needlessly complicated code because the developer thought pattern “xyz” was the appropriate solution and implemented it without thinking a few minutes more about the problem and putting together something far simpler.

Replace the word “pattern” in the above sentence with “technology” or “API” or “archetecture”.

Give it a try. It leads to the same place. And I’d say the problem doesn’t start with patterns (or technologies, or APIs, or whatever). It starts with the developer.

Does that developer start from a KISS viewpoint, or one enamored by buzzwords?

So Jake Says: Music and Design Patterns:

Chord progressions are design patterns. They give a common framework musicians can use to communicate. However, the implementation is left to the musician. You can play classically or bluesy. You can shred the progression. You can take the most “outside” ideas of modern atonal theory and apply them to the song. There are elegant implementations, there are common implementations, there are “outside” implementations, and there are bad implementations.

Chord changes aren’t represented in the core notation/language of the music, but you can use musical notation to spell out changes. You can also use shorthand languages to design the music. The sentence “12-bar in Bb, 2-5-1 turnaround, on my lead” gives away none of the implementation details (voicings/melodies, etc.,) yet the song is written in a breath.

Design patterns act the exact same way for programmers. They are, at heart, a common framework by which programmers can discuss a design. They can spend less time focusing on minutiae and more time discussing design and code.

Even if you are using Python or Perl and you don’t have to explicitly define an Iterator to loop through arbitrary collections, you could easily point to a “for x in y” statement and say “iterate through y” to describe part of an algorithm. You will be correct, and a coder from any paradigm won’t have to give it two thoughts.

Design patterns always exist, but are sometimes invisible.

Happy Easter

Emma is waking up at her grandparents right now and Richelle and me are just getting out of bed, making calls, and getting ready for the day. It’s a tradition we started last year, that I’m looking forward to as the years come.

Easter is a weird holiday, in that, as the article from Slate states below, has resisted commercialization and has retained much of its religious meaning. Having grown up in a house without organized worship of any kind, I don’t have many memories of Easter eggs or baskets. In fact, my fondest memory of Easter is one of recent years – that of my mom, calling me the night before from the nursing home, reminding me to bring her a chocolate egg.

That egg was important to her. To her, a Catholic who had doubts about the faith’s practices, Easter had to do with family and new beginnings.

I think the tradition we are setting up with Emma, with Richelle’s parents, is very much in keeping with that.

The events in Christ’s life, death and resurrection, point you in that direction, thinking about renewal, and what it means for your faith – for your life.

Every year I kick myself at not getting back in the habit of going to church. A habit I had only a short while as an adult that ended when Hunter, my nephew, died immediately after my confession on Saturday, September 15th 2001. A few days after 9/11.

For so many, they find solace in religion during times like that. I wish I could be like that. My instinctual reaction was the opposite.

As I get older, I am starting to realize that doubt, reason and faith are not necessarily at odds. That it is we human beings that demand straight lines and simple rules to dictate our universe and paradoxes upset our world so mightily that it can be hard to face the day when any light is shone on them.

tonypierce + happy easter:

today is one of the most holy days for Christians around the world.
today is the day that the Christian messiah, Jesus, came down from Heaven
and walked around and said, see, told ya I’m God.
everyone pretty much freaked out.

funny thing about Christians, they basically run the world
yet when it comes to their holiest days they act ashamed.
instead of wearing t-shirts that say Jesus
or putting a nice picture of Jesus on their door
or a nice poster of Jesus in their window
and say, Right On, Jesus,
they buy candy and paint eggs and hide them
and wear hats and have brunch
just like they’ve never even heard of Jesus
and dont marvel at what he did for them.

they act like dirty heathens, basically.

…the good book says that it’s not
the things that go in our mouths
that we should worry about
it’s the things that come out
of our mouths
that matter.

…get yourself in situations
where you get to say some badass shit

Slate: Happy Crossmas!:

Despite the awesome theological implications (Christians believe that the infant lying in the manger is the son of God), the Christmas story is easily reduced to pablum. How pleasant it is in mid-December to open a Christmas card with a pretty picture of Mary and Joseph gazing beatifically at their son, with the shepherds and the angels beaming in delight. The Christmas story, with its friendly resonances of marriage, family, babies, animals, angels, and—thanks to the wise men—gifts, is eminently marketable to popular culture. It’s a Thomas Kinkade painting come to life.

On the other hand, a card bearing the image of a near-naked man being stripped, beaten, tortured, and nailed through his hands and feet onto a wooden crucifix is a markedly less pleasant piece of mail.

The Easter story is relentlessly disconcerting and, in a way, is the antithesis of the Christmas story. No matter how much you try to water down its particulars, Easter retains some of the shock it had for those who first participated in the events during the first century. The man who spent the final three years of his life preaching a message of love and forgiveness (and, along the way, healing the sick and raising the dead) is betrayed by one of his closest friends, turned over to the representatives of a brutal occupying power, and is tortured, mocked, and executed in the manner that Rome reserved for the worst of its criminals.

We may even sense resonances with some painful political issues still before us. Jesus of Nazareth was not only physically brutalized but also casually humiliated during his torture, echoing the abuses at Abu Ghraib. In 21st-century Iraq, some American soldiers posed prisoners with women’s underwear on their heads as a way of scorning their manhood. In first-century Palestine, some Roman soldiers pressed down a crown of thorns onto Jesus’ head and clothed him in a purple robe to scorn the kingship his followers claimed for him. After this, Jesus suffered the most degrading of all Roman deaths: crucifixion. Jesus remains the world’s most famous victim of capital punishment.

To his followers, therefore, his execution was not only tragic and terrifying but shameful. It is difficult not to wonder what the Apostles would have thought of a crucifix as a fashion accessory. Imagine wearing an image of a hooded Abu Ghraib victim around your neck as holiday bling.

slacktivist: Practice resurrection

Hope you had a great St. Patrick’s Day

Even though you wouldn’t know it by my name – I’m Irish. It’s something I was was dimly aware of as a teenager, and something I’ve come to embrace as I’ve gotten older and realized my last name isn’t that of my biological father.

So what is St. Patrick’s Day? According to my friend Ron and a link he posted, something mighty bad. According to David Plotz at Slate, something to take pause of and be thankful for.

Me? The lack of cultural upbringing I had leads me to think of something far more recent – the North Ireland peace process and the hope it brings for the world. Differences that seem intractable and unbridgeable can be met. And not always does it need to lead to blood.

And yeah, I’ll have a drink to that.

Using Our Powers For Good

I recently re-read Rebecca Blood’s 2003 BlogTalk presentation: “waging peace: using our powers for good”. It is worth revisiting by anyone who is a blog evangelist or critic. Taking a look at the daily lack of cross linkage on memeorandum.com, unfortunately, it seems almost prophetic.

…People agree most readily with the things they already believe, and everyone has only 24 hours in a day. Because of these two factors, weblogs are too often enclosed in echo-chambers of their own making.

In the book ‘Data Smog’, David Shenk says: ‘Birds of a feather flock virtually together’ and this is certainly true of weblogs. He goes on to say: ‘The problem… is that people are tuning in and becoming informed–but they’re tuning into niche media and they’re acquiring specialized knowledge. As our information supply increases, our common discourse and shared understanding decrease. Technically, we possess an unprecedented amount of information; however, what is commonly known has dwindled to a smaller and smaller percentage every year. This should be a sobering realization for a democratic nation, a society that must share information in order to remain a union.’

Let me add that it’s not just specialized knowledge that we are accessing. It’s news and opinion about current events. The Web has given us the ability to retrieve news accounts from around the world. It used to be that most people got their news from just a few sources. This limited access meant that most of us were evaluating events from a common pool of information about the world, or at least a pool that was common to the people around us. But Web users can choose to get their news from wherever they like. And factual accounts of the same events quite often differ substantially in their wording, emphasis, and in the conclusions they draw. We now have the ability to choose from among news accounts until we find one that we feel gets it right.

Now, I don’t advocate returning to the pre-Web world of local newspapers. But there are consequences to the wide access we have gained.

Democracy depends on groups of people coming to terms with one another, and devising solutions that will address the needs of most, if not all, of its citizens. Even a system like mine, in the United States, where majority rules, cannot afford to completely ignore the needs of anyone not in the winning party. Democracies simply cannot function unless citizens and policy-makers can talk to one another and achieve some sort of common ground in addressing the issues of the day.

However, when people can choose their news and information from an unlimited variety of sources, they usually will choose sources that confirm their pre-existing biases. According to theFolklorist.com, confirmation bias is ‘a tendency on the part of human beings to seek support or confirmation for their beliefs.’ It makes sense, if you think about it. The only basis we have in evaluating any source of information is the set of information–including opinions–that we have already decided is true. Very few people will be inclined to choose primary sources of information that consistently put forth ideas that just seem wrong.

This isn’t deliberate malice. It’s a simple matter of choosing, from the available sources, those that seem most accurate, and those that seem most accurate will always be those that most closely reflect one’s own view of the world. So while the Web, in theory, makes it possible to explore many more points of view than ever before, in practice, few people actually do this to the extent that they can.

Read the whole piece.

Share It When You Can Find It: Investigative Journalism

88 percent of newspaper coverage is ‘churnalism’: rewritten wire copy and PR. Only 12 is derived from reporters initiative or is fact checked.

That’s the state of newspaper journalism in Britain according to what Nick Davies has written in his book “Flat Earth News”. You can read more about “Flat Earth News” in a recent London Review of Books article (via dangerousmeta).

No wonder the majority of Americans no longer trust the media and folks like Jeff Jarvis are making an issue of it.

We have a clue we are being spun. And I bet that niche media’s pursuit of ‘authenticity’ – the practice of wrapping news in greater and greater extremes of opinion to seem ‘genuine’ – folks probably feel at an instinctive level the exploitation.

In this environment, it has become more and more difficult to find investigative journalism you might care about or might need to know about.

There are many initiatives that have sprung up over the past few years that attempt to address how investigative journalism can be pursued, developed, created and funded.

Scott Rosenberg shares his doubts about one of the latest, “ProPublica”, a non-profit driven by some big names in traditional journalism.

Think about a story the Philadelphia Inquirer recently published: “Philadelphia faces shortage of housing for mentally ill”. It was front page of the Local section. Some editor thought that I, as a reader, would find that story interesting or pertinent.

In a world driven purely by linkage, PageRank, traffic counts, and other topic based story algorithm filtering systems – would I see that story? Would that story even be written? Who is its audience?

Think about it. And what it means for your knowledge of others that sit outside your topical or social spheres.

Now I’m not saying that algorithm driven – or crowd driven – news filtering is bad. Far from it.

Nor am I saying that a world where only ‘experts’ provide access to the news stories is good. Again far from it.

But the folks who *do* say one or the other are selling something. And it is at our expense.

Charles Rocks

For most Web-tier development the following Firefox plugins provide me a great set of tools to get my job done:

Lately however, I find myself needing to trick out my local hosts file for more and more work, in addition to needing to change JavaScript script behavior, on the fly, loaded from various hosts.

Charles lets you do that and a whole lot more. It’s become am integral part of my toolbox. It’s worth the license fee.

And its written in Java so your investment is cross-platform. I’ll be migrating to OS-X soon and not needing to find a replacement for this is great.

Google criticized for helping homeless ‘gimmick’

 : who we are:

the things we accept,
those we defend without shame,
reveal who we are.

You would think a company expanding a service that helps homeless get off the streets (by providing them with a consistent means of being contacted) would be a non-controversial thing.

After all, providing one service to the homeless (lets say clothes) doesn’t preclude providing other services (lets say, job training, or housing). And having choices for services isn’t necessarily a bad thing. Thankfully we have a number of service providers for homeless families and individuals in our area.

But you would think wrong.

Both Mathew Ingram and Michael Arrington let Google have it for trumpeting its involvement in San Francisco’s Project Homeless Connect especially when alternatives like Community Voice Mail exist.

In fact, I’d say the verdict from the digerati – overall – was cynical and negative.

All I know is that I wish – I wish – services like these existed when I fought through my bout of living on the streets. I know from experience how important it is to have a steady means of contact when looking for work, dealing with family, or simply finding a place to sleep.

CNet: Google expands free phone number and voicemail project.

Getting Started With Jython

Sun’s hiring of two of the biggest names in Python-land – Ted Leung and Jython’s Frank Wierzbicki – and my experiments with Django – has encouraged me to dip my toes in Jython. Here’s a few decent starting points:

IBM developerWorks: Charming Jython

IBM developerWorks: alt.lang.jre: Get to know Jython

ONJava: Tips for Scripting Java with Jython

JythonWiki: Learning Jython (just starting this one, but this looks most comprehensive)

And of course the home page: The Jython Project