Imagine your toughest class in college. You had a choice: take notes and study throughout the semester—or wait until the last minute to cram before the final exam. Studying little by little might have taken up time when you’d have rather been out with friends. But by the time the final rolled around, you had a bank of clean, organized notes to use as a study guide. You probably sailed through the exam, no problem.

Or you went the other route. Skipped assigned reading and blew off study sessions. Left the hard work for when it really counted: finals week. Problem was, since you weren’t building knowledge and checking your understanding over time, you didn’t even know where to begin. You were starting from scratch—and between caffeine-fueled all-nighters and potential nervous breakdowns, you spent the same amount of time at work as the person who studied all along (although your final grade might have said otherwise).

I won’t ask which student you are in this scenario—but it’s pretty clear which is the better strategy, right? Put in a little extra effort now to make life easier later.

This is a lot like the choice developers have to make between unit testing and overall testing of their code.

Unit testing: Getting down to the nitty-gritty

Unit testing means isolating the smallest possible elements of a program’s source code, then testing them one by one to be sure they work like they should. It’s different than the overall testing you probably do just before releasing software, which simply tests that a program behaves correctly.

With unit testing, if there’s an error anywhere in the program, you don’t have to work back through all of your code to sniff it out. You can see which test failed, and from there, isolate your error and make a quick fix.

One of the more popular unit testing tools out there is PHPUnit, used to test code written in PHP. PHPUnit saves all of the unit tests you’ve previously written, making your code easier to maintain over time. (Think of unit tests like lecture notes you can refer to before a big exam.)

Just say “no” to skipping unit tests

Surely this is a part of every developer’s coding toolkit, right? Not exactly. Just like some students choose cramming over studying in chunks, many developers shrug at the idea of unit-testing their code. Why? Chris Cornutt at Sitepoint offers a few reasons: They think it takes too long. Or that their code is fine the way it is. Or that it’s just plain boring.

Those things may be true. But think about the alternative: You’re down to the wire and ready to send a program to a client—and you discover a bug. You have no way to figure out when or how it popped up, nor any way to verify exactly which parts of your code it affects. Better hope you’ve got some Red Bull handy, because you’re in for a long night.

Refactoring without tears

The other great thing about unit testing is that it makes major code changes, or refactoring, a breeze. For many developers, refactoring can feel like playing Russian roulette with your code. You don’t want to make too many changes for fear of undoing your hard work.

But if you’ve been adding unit tests to your test suite all along, refactoring is no big deal. Simply update your code, and then run your old unit tests against the changes you’ve just made. If any tests fail, you know exactly what to fix.

It’s the surest way to get your clients to give you an “A.”

Still not convinced that unit testing is the way to go? Learn more about PHPUnit here, or listen to this talk by Professor Richard Buckland on why smart programmers test in units.

Need code that works right, every time? Contact Atomic for help with your next web development project.

It’s almost the end of the year, and you know what that means. It’s time for 2014 countdown lists! These are Atomic’s predictions for the upcoming year’s major trends in web design. These trends entered the stage in 2013, and we think they’ll stay big in the year ahead.

1. Responsive design. We’ve highlighted responsive design before. But we believe it’s much more than a passing fad. As we enter the era of phablets and smart watches, smaller laptops and longer iPhones, we think responsive design (and, specifically, a move toward unification) is here to stay. It’s become clear that designers can’t possibly keep up with all of the screen sizes available. Instead, we need to be designing websites that scale to fit.

2. Flat design. Call it the Jony Ive effect. Flat design means getting rid of 3D-like effects like bevels and drop shadows, and opting instead for crisp, textureless swaths of color. It’s right in line with responsive design trends (flat colors load quicker), and with the release of iOS7 this fall, is sure to become a sign of the times.

3. Minimalist design. Remember when we all needed to show off our web design chops with animated buttons, pop-up windows, tons of photos, and type so bright you had to squint? If the number of minimalist sites we’ve seen lately is any indication, it’s time to give that up. Minimalism is flat design taken a step further, removing not just color effects but all unnecessary features and content. In 2014, think lots of black and white, simple menus, quiet animations, and definitely, definitely no WordArt.

4. Full-width background images. Not quite ready to face the look of a stark-white site? One way to make your site pop—but still stick with the times—is with a high-quality background image that fills the entire screen. This only works if it’s executed right, though—take some time to learn the CSS tricks you should know to make images look beautiful on responsive sites.

5. Print-inspired typography. Proof that print will never truly die? Nostalgia for a simpler, pre-Snapchat era? Whatever the reason, typography and layouts resembling print publications have being springing up all over the Web. Fortunately for designers, staying hip doesn’t have to be a design headache. Typography options are growing and using web fonts is easier than ever.

6. Parallax scrolling. Parallax effects go hand-in-hand with the scrolling website mega-trend. It means that different elements on a web page scroll at different speeds, giving a sense of 3D movement. To avoid giving your site’s visitors motion sickness, use parallax scrolling in moderation. Check out a few great examples here.

2014 is sure to bring its own crop of brand-new design trends (who knows what we’ll be reviewing this time next year?). In the meantime, if you want to be on the cutting edge in web design, these are the trends to follow. At Atomic, we’ll be keeping our eye on what’s next as we continue to deliver great design to our clients.

Is your site looking a little, well, “last year”? Contact Atomic to get your website with the times.