The importance of writing efficient code

Standard
A sneak peek of my new personal site!

A sneak peek of my new personal site!

One week and one website down! Here I am, at the beginning of another week, and I can’t stop smiling about how great everything has been so far. Class has been a really great blend of lectures, group and solo work, one-on-one advising, and lots of fun and laughter, which is helping us all to become good friends. It’s also been entirely exhausting and totally exhilarating.

By Day 3 we were already being assigned our first project — building a one-page site from scratch. (Talk about hitting the ground running!) Above, you’ll see a glimpse of my soon-to-be relaunched personal site. It’s not going live just yet, as I plan to beef it up a bit in the coming weeks before making the switch for real at danielleawebb.com.

Since I have some experience with the wealth of knowledge a HackerYou course throws at you, I wanted to focus on ensuring the code in this first project was as organized and efficient as possible. “Oh, I’ll go back and clean that up later,” I told myself countless times during the part-time course. And, as you’ve probably guessed, those files and folders are still a mess a year and a half later. Not this time, though. This time, I forced myself to care if I was writing even the smallest of CSS properties a second time. A good example of this efficiency can be found in the text shadow that I added to much of my display copy. Rather than adding one line of code to each selector where I wanted the shadow, I wrote it once like this:

.textShadow {
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
}

Then, wherever I wanted to add shadow to a particular element, I simply added a class of “textShadow”. Continuing to train my brain to think about code in this way will have an incredible payoff in terms of productivity later when I start working on tight deadlines with more output than I’m used to.

I also worked hard to make use of the keyboard shortcuts in Sublime Text. For any Sublime user out there who doesn’t know about the Emmet plugin, I highly recommend incorporating it into your practice. This cheat sheet has saved me so much time already in only the few days I’ve been using it so far.

Increasing efficiency and productivity is my main focus right now as I know that time will equal money once we start taking on clients and projects. In the meantime, though, there’s still satisfaction in knowing that you didn’t spend five minutes on something that could be done in two.