Points for Style

Points for Style

It’s been years, but I can still remember my lab partner’s frustrated exclamation clearly. “It’s not a rule. It doesn’t matter!”, let out in response to seeing the results of our automatically graded submission of a program in a mid-level Computer Science course. Our work was functionally perfect, but the grading tool had subtracted several points over incorrect indentation size and other various style errors. He was right, technically, as we had adhered to the implementation requirements and using our program would produce indistinguishable results from our classmates’, but the faculty had chosen to take a stand. They chose to force us to care about style, or at least notice it. They chose to enforce a few basic style guidelines at a time when it seemed irrelevant, a time when we did the vast majority of our programming as a single developer in a vacuum. I’m not going to say I saw the light immediately, and I don’t remember a single student arguing in the system’s favor early on. I did, however, adopt good habits that I would later come to be thankful for when I learned what is a shocking truth for many young devs:

Style is not extra credit. Style matters.

Now the vacuum is gone and there is no auto-grader, just a group of incredibly smart fellow developers whose time is valuable and sanity should be protected. I’ve been a strong advocate of vigilant style practices for quite a while, but Shockoe turned out to be a place where justification for that is omnipresent. Due to the nature of our business, every developer makes contributions to a wide array of codebases, and has a hand in reviewing even more. We’ll wrap up a project and deliver it to the client, who then shows it off to the rest of the company and stakeholders. Soon we get feedback… management loved it! And guess what, they want a bigger, better phase 2! This is fantastic news, but it’s time to start planning, and “bigger and better” usually means additional resources. That means bringing new developers onto the project. Getting up to speed on a project quickly is a crucial skill for us, and we want to make that transition as smooth as possible. A little extra time considering style and writing cleaner code up front could make the difference between the next developer brought on grasping it instantly or spending an entire afternoon pulling their hair out.

Every new developer at Shockoe, usually on their very first day, is invited to a repository where an internal fork of the Idiomatic.js style guide lives and asked to study it. We have eyes on each others code constantly. Every user story is a pull request that gets reviewed, critiqued, and signed off on by a coworker.

I’ve known a lot of developers to be hesitant to request stylistic changes to another’s code, and I shared those feelings once too. It can feel like you are pointing out insubstantial issues, or that style is a personal choice and you might offend them. What we need to remember is that we are all trying to improve. If another developer reviews my work and thinks “I would write this differently” then I want to hear how. Several times, seemingly minor comments or questions have sparked a discussion that roped in multiple colleagues and left us all writing better code.

So don’t be satisfied with code that gets the job done. Strive for code that actively helps the next dev down the line, that they will thank you for, because when that time comes, you could be on another project, thanking someone else in kind.

Interested in what it would take to kick off your project?

Our experience and core services include strategy & transformation, user experience & design, mobile application development, and API management.

Functional Javascript Programming and Data Processing With Underscore

Functional Javascript Programming and Data Processing With Underscore

At Shockoe.com, many of us heavily use Underscore JS within our Javascript codebases. Underscore provides a number of great functions that implement very common Javascript programming tasks, but a lot of the docs aren’t super self explanatory. It can sometimes be difficult to figure out how to use the various functional programming concepts that Underscore implements in your day-to-day code.

Fortunately, an excellent example data set fell into my lap the other week!

One of my coworkers handed me a giant CSV file containing all of the states in the United States, and asked me to turn it into a JSON array. While I tackled this task with the bulk text editing tools built into my text editor of choice (shout out to Sublime Text 3), this struck me as a pretty nifty data set to do some simple bulk data processing on.

We’ve made this JSON file available on Bitbucket for the public, and I’ll be using it as the demo data set for all of these examples. Get the JSON from our Bitbucket, and place it within the folder you intend to run these examples from, in a file named cities.json.

If needed, get Underscore.js from npm. Just run npm install -g underscore.

Now spin up a node.js instance, and run

The rest of these examples assume these variables will be defined and unmodified.

Let’s go ahead and do a couple of simple operations.

Underscore also really encourages javascript code reuse by making small functions that only accomplish a single task. Take the following utility function:

Using just this one function we can do a number of things, such as counting the number of cities in each state:

Grouping the list of cities into an array of cities for each state:

Getting rid of all of the cities in the state of Virginia:

How about getting rid of cities in _any_ Virginia (looking at you, WV):

Metalling with Titanium: Building my first Alloy application

Metalling with Titanium: Building my first Alloy application

 

Event listeners. Callback functions. Asynchronous programming? These words were foreign to me when I first started working at Shockoe LLC the first week of October 2015. But somehow, I needed to use these things to create a mobile application in the next two months.

I wasn’t completely new to programming. I had recently taking Java programming courses and was learning other languages like C++ and C# by watching online tutorials. Before I started working at Shockoe, I was told to learn JavaScript as that was predominately what I would be using to create Titanium Alloy applications. Going through the tutorial on CodeAcademy taught me little about the language. It seemed to be mostly a tutorial on what programming was. But I figured that since I had the gist of programming, I wouldn’t have much of an issue as anything could be solved with a simple Google query.

Showing up to work on the first day taught me that that wasn’t the case. Edwin, the CEO at Shockoe, assigned me to work on Fighting Mongooses, a name with which I’m now beginning to understand the logic behind.

The concept behind the app sounded pretty simple but integrating various devices, a server, a database, and mobile OS’s turned out to be far more complex than I had anticipated.

The first week or two was spent just trying to figure out what was actually happening in this partially built application.  I slowly started to figure out what the different pieces of code were doing to understand the logic. I used what was already available to piece together a rudimentary working application to fulfill the initial requirements and to prove I could fit in at Shockoe.

From there, I slowly expanded the capabilities of the application and learned more about Appcelerator, Titanium, and JavaScript along the way. After a month and a half of working on Fighting Mongoose, it has taken on a bit of my own personality. It is no longer another developer’s application that I was given to complete and that is a great feeling.

There is still a lot that I need to learn to get near the level of the other developers here, but I have had some great guidance and help while working on the Fighting Mongooses project.

I still have much that I wish to accomplish with the application and feel more comfortable and confident each day with what I’m doing.

I recently found an old version of the app on a device I used for testing about a month ago and it’s amazing to see for myself the progress that I have made since.

I look forward to see the kind of progress I can make in the next month on onward here at Shockoe.

 

 

Shockoe Wellness Program

Shockoe Wellness Program

There’s a reason the stereotypical image of a software developer is a slovenly mess, a large mass in a black t-shirt covered in potato chip crumbs, the reason being is it’s often true. And while we can’t prevent the ever-growing threat of black t-shirt wearing, we all do our best to keep those black t-shirts themselves from being ever-growing. Here at Shockoe we incorporate several exercises into our daily routine that we hope will improve our overall health. Collectively this is known as the Shockoe Wellness Program.

To keep our metabolisms engaged and the blood flowing through our brains, we’ll often take a stroll along the canal walk near the office. It’s also a great way to unplug from work for a little while and come back to any problems or tasks with a fresh mindset. Inside the office, ping pong is another great outlet to work through bugs and raise our heart rates. And for anyone who doubts the ability of ping pong to raise your heart rate, you’ve clearly never seen the crazy wall and ceiling shots we try every day and the mad dash of our developers to recover the balls as they go flying into the kitchen or under desks.

However, when you work in a profession that has you sitting and looking at a computer screen for eight hours a day, fitness is only one of your concerns. Here at Shockoe we incorporate several exercises throughout the day to help preserve our posture and eyesight. There are two main problems that face those who sit down for a living: forward head posture and anterior pelvic tilt. Speaking generally, from a blenderized knowledge of several internet tidbits, forward head posture comes as a result of, among other things, staring at a screen and inclining one’s head forward. Anterior pelvic tilt means that one’s hips have rotated forward, as a result of weakened hamstrings and abs and tightened lower back and quads due to sitting for long periods of time. To counteract forward head posture, we perform a series of neck exercises 2-3 times a day. Here is the video guide that we follow for these exercises. Vastly more information than I could ever provide about anterior pelvic tilt and the ways to counteract it can be found here, though the exercises that we tend to perform are the quad stretches and occasional stomach vacuums.

To help improve our eyesight, we utilize the 20-20-20 rule, which states that if you spend a lot of time looking at something directly in front of you (e.g. a computer screen), every 20 minutes you should look at something 20 feet away for 20 seconds. It also helps to roll your eyes and blink a lot during these breaks.

Shockoe Bods, a sub-branch of the Shockoe Wellness Program, is also very near to our hearts. It was through the Shockoe Bods program that we began a quest to each be able to do 100 pushups. For a while, every morning after our stand-up meeting we would crank out huge sets of pushups. However, we soon found that this was tightening our pecs and making us hunch over at our computers. We needed to add a complementary back exercise as well, so we hung a pullup bar near the bathrooms and encouraged people to do as many as they can every time nature called. For some, “as many as you can” was less than one, and that was perfectly ok. The prevailing wisdom is if you can’t do a pullup, simply hang on the bar for as long as you can, and the first pullup will come after being able to hang for 45 seconds.
All this may seem like a lot, but in total it may add up to ten minutes every day, which, in my opinion, is worth it to not be hunched over a walker by the time I’m 30. Every developer at the office is a huge fan of Bojack Horseman, and to paraphrase a touching moment from this past season: “It gets easier, but you have to do it every day. That’s the hard part.”

Shockoe Helps Homes.com House Hunters Find Perfect Rental

Shockoe Helps Homes.com House Hunters Find Perfect Rental

Mobile technology is changing the fundamental interactions between business and customers in meaningful ways not foreseen a decade ago.  Even a traditional business model, like car rentals, has been disrupted by a rapidly expanding company with what seemed a niche idea, due to the flexibility that mobile technology gives consumers.

Why can’t the same principle apply in the home rental space?

Homes.com is part of the fifth-largest real estate listing portal network with over three million homes represented in the United States and that’s the question that they asked us at Shockoe.com.

Since then, we have been working with Homes.com to enchance their collection of iOS and Android apps.  One of the first joint projects was released on October 16th to great acclaim.  Homes.com’s industry knowledge guided the thoughtful design and solid codebase that Shockoe supplied and the brand new Homes.com Rental app is averaging 4.9 out of 5 in the Google Play Store and 5/5 stars on the iOS App Store in just a week’s time.  And as a recent study showed, app ratings are now more critical to rankings, thus exposure, than ever before

So how did Shockoe and Homes.com do it?

The new Rentals app was built with today’s sophisticated renter in mind.  The app is the first in the market to offer current commute times for points of interest such as user’s place of employment, gym or shopping, tailoring the app to today’s ever busy consumer.  This of course hits the three keys to mobile real estate: geolocation, geolocation, geolocation.

Now, on-the-go consumers can easily browse an expansive database of rental listings on the Homes.com app, which has built-in extensions to Homes.com’s sister site ForRent.com.  ForRent.com is the exclusive provider of apartment listings on the Rentals app. Homes.com developed the smartphone app for effortless use on both iOS and Android devices and included iOS7 features such as natural navigation gestures.

“With year-over-year rental search traffic growing on Homes.com by more than 514 percent on mobile devices, our first priority in designing the rentals mobile app was to create an optimal shopping experience for renters,” said Brock MacLean, executive vice president of Homes.com. “The new app allows consumers to customize searches, instantly view and save listings, and connect with agents or property managers. Whether a renter is searching for a place to celebrate, create or unwind, the place to find it is Homes.com.”

The mobile app enables potential renters to tap into current listings filtered by user preferences.  Filters run from standards like price, size and type of residence to many extras like fireplaces, parking or (a mobile first for the industry) pet-friendly rentals. Map searches are made simple with slide and tap navigation, all while referencing a geo-targeted map for an easy view of points of interest throughout the search experience.

How did Shockoe create this for Homes.com in such a short timeframe?

From the beginning, Dominion tasked Shockoe with building the revisions in the Appcelerator Titanium codebase to create an amazing user experience across multiple operating systems and devices while improving overall app performance.  Rebuilding a unified codebase for Homes.com within Titanium offered Shockoe.com a chance to make big changes to simple usability and interface aspects of both mobile app experiences. For example, the older version of the mobile app made dynamic selection difficult in the area overview map.

Due to past experience, the Shockoe development team decided a whole new map design was necessary since the map function is a crucial. While it sounds daunting, we know it would end up being a major time saver since the redesign would be built just once in the Appcelerator Titanium toolset.  The new map function would then be instantly reflected across both iOS and Android versions for multiple form-factors and the functionality could be re-used and applied to other projects down the road for Homes.com.

Shockoe has been a longtime partner and evangelist of Appcelerator.  The cross-platform nature of Titanium enables us to meet deadlines and budgets that would be impossible had we designed for each platform separately.  Our experience with Titanium makes an already accelerated schedule even shorter.

We at Shockoe look forward to collaboration with Homes.com and their sister site ForRent.com in coming up with new and interesting ways to help the companies enhance products and tie themselves together in the mobile environment.  With an economical foundation on which to fortify their ability to acquire and cross-sell their customers in the mobile space, look for many more good things to come from the teams at Homes.com and ForRent.com.

How can Shockoe help your business take a great idea and make it a disruptive force in your industry?

Download the new Homes.com Rentals apps – [Google Play] [Apple App Store]

About Homes.com®
As one of North America’s top online real estate destinations, Homes.com® Rentals inspires consumers to dream big. From affordable houses to luxurious estates, condos, apartment rentals and more, Homes.com features nearly 3 million property listings and a user-friendly format, making finding your next home easy. Visitors to the Homes.com blog will find a collection of rich content and posts on DIY projects, painting, organization tips and more, providing the ultimate resource for everything home related. From finding your first apartment to buying your first home, upgrading, downsizing and everything in between, Homes.com is an inspiring and engaging partner in every phase of the home buying or renting process.

Homes.com is a division of Dominion Enterprises, a leading marketing services and publishing company headquartered in Norfolk, Virginia. For more information, visit www.dominionenterprises.com.

About ForRent.com®
As one of the nation’s leading online home search destinations, ForRent.com® inspires renters to discover their next apartment, loft, townhouse, or condo. ForRent.com features rental listings in a user-friendly format, making finding your next home an easy exploration. Visitors to ForRent.com’s apartment living blogFacebook pageTwitter account and Pinterest boards will discover relevant content and can join the conversation surrounding their home decorating style, rental tips and more, serving as the complete resource for renters in every part of their living experience.

Page 1 of 3123