Monday, December 26, 2011

Reflecting Back and Looking Ahead

While 2011 may not officially be done just yet, it's safe to say that the bulk of it is. =)  And it's that time of year to reflect back on the past year and start looking ahead to next year. I'm not one to make New Year's Resolutions (unless "surviving through the end of the year" counts as a resolution), but it doesn't mean I have no ideas about what I'll be doing in the upcoming year. =)

But first, looking back on AQ, I see three major accomplishments and improvements that I'm absolutely thrilled about. The first and most difficult was figuring out a solution to how people could list custom locations for letterboxes. In the end, I spent months developing that feature, and improved numerous additional features that the changes touched. The geocoders were upgraded and improved, trip planner searches, area searches, linear searches and rectangular searches were expanded to work with events, blogs, and and even virtuals. The trip planner was updated to support much more detailed route information--a significant improvement, albeit an incomplete one. Maps showing the coordinates used now showed up, and listing custom locations that geocoders can't find was significantly improved. And even after I got the custom locations feature up and running, I then had to go in and carefully remove all of the old code that AQ used to use.

But darn it, the update worked, and life was good. =)

I did run into numerous problems, and some of the updates broke stuff that--frankly--should never have broken. And they wouldn't have broken had I run regression tests on them. Without getting too technical, regression tests are simply a way to have a computer automatically run a bunch of tests on the website to check that everything still works as expected whenever I make a change. Many times, a tweak in one part of the code can break something in a completely different (and forgotten) section of code.

And that became my second great update for 2011: regression tests. I started with nothing, but built up a test scaffolding that could check AQ for thousands of different problems with the click of a button. After a a couple of months, I had several hundred tests up and working--and surprisingly, it even caught some bugs that had been on AQ since day one!

This was largely a silent update, though. None of you will ever see this code in action--it's strictly for myself. The benefit to you is two-fold, however. First, I'm less likely to break stuff when I upload changes. Secondly, I can spend less time debugging problems and more time working on new feature or improving existing ones. =)

As of today, there are nearly 2,000 regression tests that I can run with the click of a mouse button on my development machine. For a website as large and complicated as Atlas Quest, it's really nowhere near enough. I'd prefer to have over 10,000 regression tests. Perhaps 100,000 tests could really put AQ through its paces, but for now, there are nearly 2,000.

I don't sit down and develop regression tests anymore. Well, I do still create them, but I create new ones when I'm developing a new feature or editing an existing feature. Whenever a bug is reported and found, I create a regression test that can check for that problem in the future, fix the bug, and make sure the regression test passes. So the number of regression tests continue to grow quickly, but that's in conjunction with whatever feature I'm working on at the time. When I first started creating them, I sat down and merely started creating them to have a base to start with. As I develop and improve features, though, I flesh them out more.

And the last big project I tackled was a dramatic improvement of the Trip Planner. What is available today is something I've wanted to create for years, but the time and effort involved with such a massive update never seemed worth it. A little bit ironically, what made the effort worth it this time was due to my first big project of the year: custom locations.

When I developed custom locations, it completely and utterly broke the existing trip planner. And while the trip planner certainly had its flaws, it was also a very popular option for people. I considered chugging the trip planner completely rather than spend the effort to rewrite it to work with the new changes, but I knew that would put me in the doghouse with a lot of people. It might be a lot of work, but rewriting the trip planner to work with the new geocoders and custom locations was a must.

Knowing where I've always wanted to take the trip planner, however, I made sure to design it in such a way that eventually I could extend it to fill my original idea for the feature. So during the creation of custom locations, I laid the foundation for what would later become the trip planner of today.

Fast forward a few months and now I look at what it would take to create the trip planner of my dreams, and it no longer seemed so far out of reach anymore. There was still an enormous amount of work to do, but I already already laid down a solid foundation to build from. I wouldn't have to start from scratch like I would have had to do before the custom location feature. The awesomeness of the feature was now worth the effort required to create it.

And create it I did. Along with over 500 regression tests for the trip planner that I can use to make sure whenever I make a tweak, I don't break anything. Some bugs did slip through, but considering the thousands of lines of new code I created, it was one of the most successful updates ever with very little downtime or problems. Previous updates of this magnitude, I'd dedicate two or three days for nothing but fixing bugs. This time around, only five bugs were found during that timespan. Unprecedented!

There were hundreds of smaller updates throughout the year. I started the state themes, one new state theme each month. I fixed typos, updated the layouts of many pages, replaced the weather widget, upgraded the server software, improved slow queries to help keep the website running fast, and so forth. But when I look back, it's those "big three" features I'm most proud of. They weren't easy or quick--in fact, part of the reason I enjoyed working on them so much was because they were a challenge and made me think. =) Admittedly, a lot of the smaller and less technical changes I kind of find boring and monotonous. I really do thrive on building features that are an intellectual challenge for me!

And each of the new features, I feel, took AQ to a whole new level. More reliable, more stable, and easier than ever to sort through the tens of thousands of letterboxes listed on AQ for those handful that matter most to each individual.

I didn't mean for this post to get so long..... I'll save my "looking ahead" thoughts for tomorrow! =) Feel free to share your favorite updates from the year in the comments!

4 comments:

BBStacker said...

Ryan: Got to admit that to date I love the custom location upgrade the best. I use it quite a bit. The fact that I can use it on a Mystery Box and it shows up in my search is tremendous. The trip planner is awesome but to date haven't really put it to the test on an actual trip. Soon, man, soon. Thanks for all the hard work.

Teresa said...

I agree, the custom mapping feature does take it to a whole new level. Thanks!

Mark and Sue said...

Ryan,

You've done a fantastic job with all of the ongoing changes. I always think back to that initial test website you had me test before AQ went public.

You've come a long way, Tortuga!
Well done!

Mark

Rabid Quilter from California said...

Ryan, you're AWEsome!!

~~Doublesaj & Old Blue~~