Close and Go BackBack to Viget

Tips for Writing Better Bug Reports

Josh Korr
Josh Korr, Web Project Manager, January 06, 2012

Though we might wish otherwise, bugs (or, more generally, defects) are a fact of life in software development. Unfortunately for developers, so are unhelpful and infuriating bug reports.

Bad bug reports waste time and money while everyone goes back and forth to clarify the necessary details. Perhaps worse, bad bug reports tug at developers' sanity and can put strain on the team dynamic.

I know this from experience -- not as a developer, but as a bug reporter who has infuriated plenty of developers in my time as a product/project manager. Because I love my dev colleagues, I've tried hard to improve my bug reporting. Here are some tips I've come up with along the way for writing better bug reports:

  • The first step is changing how you think about experiencing bugs, so you can report them in sufficient detail.
  • Next, be as specific as possible in providing that detail.
  • Finally, always try to reproduce a bug before you report it.

Let's look at each of those tips in depth.

Continue reading "Tips for Writing Better Bug Reports"

Preventing Broken Windows

Ryan Foster
Ryan Foster, Web Developer, November 29, 2011

When you see poorly written or poorly executing code in a project you've inherited, what's your first reaction? It probably depends a lot on context. Is it cruft? Meh, its not hurting anyone (yet). Is it failing on edge cases? I'll fix it when someone complains. Is it one of several sore spots immediately visible? This whole thing is junk and it's too painful to fix.

Continue reading "Preventing Broken Windows"

The Balanced Developer

David Eisinger
David Eisinger, Senior Developer, October 31, 2011

In preparation for a recent team offsite, I spent some time thinking about what I hold dear as a software developer. One idea I kept coming back to is the notion of balance. I see balance manifesting itself several ways in the work of a successful developer, some of which follow.

Speed Versus Quality

The most obvious example is the balance of development speed and quality. When building software, it’s never a good idea to write code as fast as possible without any attention toward maintainability, just as it’s never a good idea to spend such an inordinate amount of time designing and tweaking your software that it never ships to customers. The balanced developer focuses on delivering value both immediately and through the life of the software.

Continue reading "The Balanced Developer"

Using Object-Oriented Programming to Manage Control Flow in Rails Controllers

Patrick Reagan
Patrick Reagan, Development Director, September 28, 2011

This post made the rounds the other day and really left us all scratching our heads. In the post, the author gives an example of how he relies on the use of exceptions as a sort of modern day GOTO statement instead of using conditionals to manage control flow in a controller. His assertion that his typical approach to writing controller code involves "... put[ting] a bunch of conditionals in there for different situations" hints at a deeper problem that I've seen in a lot of Ruby and Rails applications.

Instead of working to refactor the code in the controller, I'd like to back up a bit and take a look at an alternative refactoring that relies on OO concepts while taking advantage of some of the facilities that Rails has to offer. In the end, we'll be left with more idiomatic Ruby and Rails code that is also easier to understand and maintain.

Continue reading "Using Object-Oriented Programming to Manage Control Flow in Rails Controllers"

Regular Expressions in MySQL

David Eisinger
David Eisinger, Senior Developer, September 28, 2011

Did you know MySQL supports using regular expressions in SELECT statements? I’m surprised at the number of developers who don’t, despite using SQL and regexes on a daily basis. That’s not to say that putting a regex into your SQL should be a daily occurrence. In fact, it can cause more problems than it solves, but it’s a handy tool to have in your belt under certain circumstances.

Continue reading "Regular Expressions in MySQL"

We're the Developers

at Viget Labs. We write about web development trends, tips, best practices, industry events, and our projects — all with an emphasis on Ruby on Rails.

Upcoming Events

Future Insights Live - April 29 to May 4
Future of Web Apps, Future of Web Design, Future of Mobile, and Future of Web in the Enterprise have joined forces to bring you our most comprehensive event EVER!

Contact Us

Have any questions, comments, ideas, or secrets to share? Let us know.


What color is the sky?

Sorry, you need to have Javascript enabled to use this form. (Don't blame us, blame the spammers!) If you'd like to contact us, please visit our Contact page.