Friday, September 2, 2016
Wednesday, June 8, 2016
What do you do and how long have you been at bbcom?
I’m currently a Principal Software Engineer and have been working at Bodybuilding.com for about 8 years now. In addition to normal development, I’m responsible for helping my team of client-side engineers, software engineers, and QA in whatever project we’re currently working on. I also have a helping hand in guiding the technology we use at Bodybuilding.com along with the other technical leaders.
Linux or Mac?
Mac, but only slightly. There are some applications and utilities on my Mac that just aren’t there, or aren’t as good, on Linux. That being said, a good portion of my work is spent in the command line, so as long as it’s not Windows, I’m not super picky.
What is a typical day like for you?
The mornings are fairly consistent, with a daily scrum to discuss what we’ve been working on and what’s coming up. After that, my day is spent in a combination of working with the other members of my team, meetings, and heads down with my headphones on getting some work done.
What is in your developer tool box?
#1 - An IDE. Depending on what I’m working on, it’s either IntelliJ or Sublime Text. #2 - Slack. Getting push notifications on my phone when someone needs me and I’m not online is a huge help. #3 - Google Chrome as my preferred browser. #4 - Spotify. Music is important to my development mojo. #5 - Terminal.
What are your favorite pro tips?
alias yolo=‘git commit -am “Deal with it” && git push -f origin master’
Honestly, the best tip I can give is "stay in the flow”. It’s tough to get back in once it’s broken, so do everything you can to minimize distractions.
What did you code up today?
We’re currently in the process of migrating upwards of 28,000 articles to a new CMS system living in Amazon Web Services (AWS). Today, I continued on with the migration script to download every image from an article and upload it to S3. In addition, tweaking and fine-tuning the process to make sure the cutover is as seamless as possible to our readers.
What has been the most challenging problem you’ve had to solve?
Last year, we update the wrapper (header, footer, and sidebars) across our entire site. This was a HUGE project. Every technical team was involved in updating around 15 different Java and PHP applications, migrating our front-end code to use a new build system and AngularJS, site-wide feature enhancements like search and a new navigation, and countless other features. This was all completed in just a few months before the holidays. In all my years working at Bodybuilding.com, never have I seen collaboration between such a large group work as smoothly as it did.
Any crazy Bbcom stories?
The only one that comes to mind is the “poo-nami”. I think that one should be left up to the imagination.
What is the best thing about working at Bbcom?
You get to work on the coolest, most cutting edge products, with the coolest, most knowledge people around. There’s a lot to love about working at Bodybuilding.com.
Thursday, May 19, 2016
How to Make it Work
We Need to Be Restrictive
Third-party apps are generally fine to leave open-ended, using the
~ shorthands. More often than not, we want the latest bug fix. But as we're developing our own interdependent apps, we need to lock down the version request. It's verbose, but in most cases the only way to restrict the version to a set tuple, while allowing pre-releases within that tuple, while also rejecting any version outside of that tuple, is:
-0is literal text and
z+1is one more than the number represented by
1.2.3-0 <1.2.4. Note that we need to explicitly use the
-0part of the version; without it, Bower will only look for stable releases, and, in effect, we could have just said
=1.2.3. With the
-0, though, we gain several things:
- Bower will consider pre-releases acceptable, and pick up the latest
- Bower will refuse
1.2.4and higher, pre-release or otherwise, ensuring that the team gets the version they're working on.
- Bower will consider the
1.2.3release valid for that range and prefer it over the pre-releases, meaning the app that is requesting the version doesn't necessarily need to update its
bower.jsonin order to release. Ideally, at release time,
bower.jsonspecifies exact version numbers, but if a version was missed then this notation won't break the desired behavior.
>=1.2.4-0 <1.2.5, they will ensure that they don't accidentally pick up version
1.2.3when it becomes an official release.
Note that you can try these with your own private Bower registry. Create a new git repo, register it with your Bower server, and then iterate over changes to the readme file, while releasing the various tags. Then you can test with
bower info [your-bower-project]#[request version here].
spacecharacters – for example,
bower info test-semver#\>=1.0.0-0\ \<1.0.1– or else wrap the whole
package#versionpart in quotes, like
bower info "test-semver#>=1.0.0-0 <1.0.1". (For reference: how the command line uses spaces and angle brackets)
Examples of Favoring Stable Releases
|Bower assumes you want the latest stable release. |
|Only pre-release versions are greater than |
|Essentially the same as the above example. We want the latest patch greater than or equal to |
|none||Declaring a stable version with no range will not return any version if the stable version doesn't exist; Bower assumes you want the exact stable version requested and will not return the pre-release versions.|
Examples of Pre-release Tags
Apparently, Bower considers anything with a pre-release tag as simply a marker to get a pre-release. It considers the "latest" to be the highest in an alphabetically sorted list of tags. Therefore, pre-release
|The range really only limits the numeric triad to |
|Note that the pre-release tag doesn't even exist, and moreover there is no "dot number." Bower sees no foul in this. It muses, "Ah, you want a pre-release. Here's the latest pre-release!"|
|This actually works! Cumbersome as heck, but it does enable separation of pre-release tags.|
The End (v1.0.0-a.1)
Hopefully this guide to how Bower handles SemVers reduces your aches and pains. If you'd like to read more, check out the section below.
References and Further Reading
Wednesday, February 24, 2016
This tech talk describes how we created a new microservice-based architecture using Amazon Web Services technologies as well as a Java/Spring stack. Our goal was to greatly improve our ability to handle spikes in image-upload traffic without manual intervention. As a result, we created autoscaling RESTful services using Spring Boot and AWS Elastic Beanstalk. Image-processing logic has been encapsulated into highly scalable Amazon Lambda functions.
Wednesday, January 27, 2016
Other than the applications themselves, the most valuable assets developed during the project have been our opinions on what defines a RESTful architecture. Even months into the project, we found ourselves in long debates that led to redefining our views of RESTful architecture. Each of these cycles triggered new breakthroughs and pitfalls in our implementation. Even now, months after the launch, we still find ourselves re-evaluating past decisions and making significant changes in our implementation to align with the newest visions. The pieces of that newest vision were collected together into a presentation named "What Is RESTful?" that was used multiple times internally to achieve a common base understanding from which the more interesting conversations around implementation grew. Even this presentation has gone under multiple revisions and has recently achieved the SemVer status of 2.0.0. This 2.0.0 version was recently presented at the Bodybuilding.com Fall 2015 Tech Talk and is now available for online viewing. We expect to use this presentation in future posts and presentations as a launching point to dive deep into the finer aspects of our implementation and the software technology that grew from our vision. It is certain that we have not gotten everything right, and we encourage feedback, both constructive and critical, in order to develop the 3.0.0 version of this vision.