Saturday, December 1, 2007

Unintended consequences

We recently decided to add events on Justin.tv to search as part of the enhanced site-wide schedule we're working on.

We thought that adding something to search would just require couple pieces of work. We need a new template for the type of search result, and then we need to add events to our search index. Shouldn't be more than a 30 minute project, all told.

Of course, as I begin implementing it, I immediately notice a complication: every other kind of searchable item on Justin.tv can be sorted by page views, in addition to newness and best text match. So now we have to decide whether to either:
  • Special case the sort code and remove the page view sort for events
  • Add a page views counter for events, requiring a small change to the database schema and a small amount of code in several places. [1]
Neither of these options is particularly difficult, but only because we got lucky and the original change was small as well. We decided to add the counter, if only to satisfy our own OCD. The "just a template" change winds up touching 6 or 7 different parts of the site. This is not a fluke, it's typical. New features nearly always require changes you would never have dreamed of prior to implementation.

This is why second system syndrome is so hard to avoid: It's like invading Vietnam or Iraq. At first everything seems perfectly fine, but the deeper in you get the more unforseen complications emerge. Eventually you find yourself under fire from all directions, and you just want to get it over with before you bleed out any worse than you already are.

[1] As a side note, this is why standard databases suck: part of the reason I want to avoid adding a page view counter to events is that it's going to require making a schema change. Of course, I could create a page_views table that solves the problem generically, but that would have been more work to set up in the beginning, when I had no idea I'd have this problem. And because schemas are costly to change in a running system, changing over to that solution would take yet more work now.

12 comments:

ebereeasler said...

Pin on titanium screws
A piece sunscreen with zinc oxide and titanium dioxide of titanium exhaust tips solid titanium screws has an open gap that is about a third and a half inch titanium wedding band and is titanium necklace mens about a third inch. These are titanium pans the

badgenius253♡ said...

Very good written information. It will be valuable to anybody who employees it, as well as yours truly :). Keep up the good work ? for sure i will check out more posts.

토토
경마
온라인카지노
토토

badgenius253♡ said...

You should take part in a contest for one of the highest quality sites on the web.
I’m going to recommend this website!

메이저사이트
온라인경마

sportstoto365 스포츠토토365 said...

Awesome! Its really amazing post, I have got much clear idea on the topic from this post.

토토
파워볼사이트
먹튀검증가이드

powerballsite 파워볼사이트닷컴 said...

something that is remarkable and should be learned. Thank you for providing this great info theres so much to learn.

프로토배당률
플레이볼24로하이
스페인축구일정

William Stephen said...

Thanks for sharing a remarkable post. The shared article is very informative and creative. It's very amazing. Traffic Lawyer Fauquier VA

joshjo said...

The Justin.tv Technology Blog offers insightful and cutting-edge content, diving deep into technological trends. Its concise yet comprehensive posts provide a valuable resource for tech enthusiasts. With a commitment to staying ahead of the curve, the blog is a must-read for those seeking to expand their tech knowledge.Reckless Driving Ticket Virginia

Ryan Josiah said...

Wonderful post! We will be linking to this great article on our site. thank you...
forsyth county dui attorney

Vincent said...

divorce attorney fairfax va
The article "Unintended Consequences" delves into the complex impact of decisions and actions, emphasizing the importance of critical thinking and foresight in decision-making. It uses real-life examples to illustrate the profound effects of unintended consequences, making the topic relatable and engaging. The article emphasizes the need for holistic thinking and the interconnectedness of systems, emphasizing the importance of the butterfly effect. Strategies for mitigating unintended consequences and minimizing their impact can be discussed. Ethical considerations in decision-making can help anticipate and prevent negative unintended consequences. A section on historical examples where unintended consequences played a pivotal role in shaping events would provide a rich historical context. The article's clear and concise writing style makes it accessible to a broad audience, from general readers to professionals in various fields. "Unintended Consequences" serves as a timely reminder of the intricacies of decision-making and the need for vigilance in anticipating and addressing potential outcomes.

Wilson said...

I was particularly struck by how interrelated everything in life is after reading this blog post. It serves as a reminder that even seemingly insignificant things we do can have far-reaching consequences. It's a reminder to be more thoughtful about our decisions because they have the potential to affect not only ourselves but also other people and the entire globe. Interesting reading! Thanks for sharing this blog. I'm recently visited this blog and it is very useful information to me. Abogados Divorcio Northern

Tara said...

"Unintended Consequences" refers to unexpected and often negative outcomes resulting from actions or decisions. This term highlights the unforeseen repercussions that may arise in various contexts, such as policies, technologies, or social changes. Understanding unintended consequences is crucial for making informed decisions and addressing unintended challenges that may emerge.Abogado Conducción Imprudente Petersburg VA






Robin said...

Thank you for helping people get the information they need. Great stuff as usual. Keep up the great work. abogado dui sussex vaspeeding in virginia reckless driving