whatspop
A log of things made by Kunal Anand
Data visualization, interface design, programming, music, and art

Note

Mars Science Laboratory

One of the last projects I supported at the Jet Propulsion Laboratory was the Mars Science Laboratory. Most of my technical contributions were directed at testbed development and issue tracking. However, one of my fondest memories at the lab involved sitting in the cafeteria post-PDR (preliminary design review) having a conversation with MSL’s EDL engineers and researchers. I’ll never forget particular phrases such as “this will never work” and “there’s really no way to test this”. After some back and forth, one of the engineers ended up uttering the infamous Yoda quote. We all laughed, finished eating, and went back to work.

I still remember looking at the rover when it was just a SolidWorks rendering and a series of crude animations. While mechanical engineers were discussing fabrication, budget cuts from the top had everyone wondering if the project would ever be completed. Flash forward 6 years later and MSL is now on the “Red Planet”! To say I was choked up upon hearing “touchdown confirmed” would be the understatement of 2012.

I joined NASA full-time when I was 20. The people, culture, and workplace significantly shaped me into the person I am today. I wouldn’t have ever learned how to debug difficult programs or pushed myself to solve incredible challenges over a short period of time. I’m forever grateful.

While the organization may not be as sexy as a multi-billion dollar social network, it is without a doubt the most inspiring place to dream big.

August 7, 2012


Note

Toro + Nestful - Testing PHP with Ruby

I was happily prototyping a series of API endpoints in PHP when I realized that unit testing couldn’t give me a realistic measure of quality assurance. Historically, I’ve found unit tests great for covering specific algorithms and routines, but poor at simulating real client experiences over the web. The best way to assess an API is through the eyes of a client that’s architecturally decoupled from the API codebase. Simulate an HTTP request is not the same as actually making said request. Test-savvy engineers will recognize this as integration testing.

My familiarity with Ruby combined with a Google search led me to the Nestful gem. A few lines of Ruby allowed me to put my API through its paces while supporting authentication and JSON serialization/deserialization with a RESTful wrapper. A gem indeed!

Let’s get to some tangible examples of how this was useful. I’ll start by sharing a minimal/fake server backend in PHP using Toro:

Ok, now that we’ve got all that server stuff out of the way, let’s start writing some tests. If you’re unfamiliar with Toro, then you should become acquainted. If you’ve worked with object-oriented PHP, then will only take a few minutes get up to speed.

Now, once you get the Ruby gem installed (gem install nestful), you’ll be able to write two simple tests:

To spell it out, both tests are attempting to access endpoints that we have not created. In both of these cases, we expect to receive a 404 error. Now before we start testing the user creation endpoint, let’s define two helper functions:

Here are some pertinent tests that you could write to test the above server:

As you can see from the featured test methods, Ruby’s expressivity coupled with Nestful makes for intuitive integration testing. The above tests should be constructed in a manner non-Rubyists can grok pretty quickly. I’m certainly please with how this turned out and will be sure to use Nestful to continue testing future backends.

August 7, 2012


Note

Generative Architecture

A couple Sundays ago, I was tinkering in Processing to come up with a script to generate sustainable living architectures. After running the script for a few minutes, I was left with thousands of randomly generated sketches. While some of the sketches are interesting and beautiful, the majority are just noisy and repetitive.



Coincidentally, I stumbled on this incredible TED talk by Michael Hansmeyer called Building unimaginable shapes. While the presented algorithm isn't novel, the final output is incredible. In my particular case, I was inspired to create structures that adhered to a set of parameters (width, height, volume, spacing) rather than applying random folds, as the output in many cases can be impossible or impractical. That said, I am interested in adopting some of the techniques from Hansmeyer's talk in future sketches.



With a couple of tweaks, this output could be used for large posters and prints. I'd be lying if I said I was not tempted to re-use this sketch as artwork for a future EP that I've been casually producing.



Additionally, I am curious to see what this might look like running in the browser with Processing.js or WebGL.



This is the first time I've been hacked up Processing code in many months. I'm looking forward to spending more hours learning more about architecture, structure, and 3D visualization techniques.

August 1, 2012


Note

Closing The Gap

The city that I grew up in used to feel like a big place until I learned how to drive. Distances that seemed to span hours by walking were compressed to minutes, all thanks to a car. And the gap continues to narrow. Advancements in transportation now allow us to soar through the sky and arrive on the other side of the world within a single day.

Digitally, we've seen the gap close exponentially. From what used to take minutes and an awful amount of modem noise to connect to a server now takes a few microseconds. Today, we can fold the world and transmit a message to a loved one before we even think of what we want to say. Vast quantities of knowledge is only several keystrokes from attainment.

To admit that I'm excited about this curve would be a massive understatement. When I allow my imagination to run wild, I can't help but think of living with a networked mind capable of sharing information faster than a neuron burst. I can even foresee airplanes being replaced by loosely theorized technologies such as teleportation. All of this and more seems entirely possible. Or is it?

The largest obstacle to innovation isn't the lack of tools or vision - it's education. How can we hope for future generations to create the future if they lack access to relevant and inspiring knowledge repositories? Fortunately, this gap is also narrowing. Institutions are unlocking their valuable courses while independent educators are creating new content in the form of digital books and videos. These new educators are currently free of an economic model that would compel them to achieve a level of profitability. However, it's not hard to see how these efforts can be transformed into something financially rewarding.

I'd like to think that the most successful companies attribute their particular successes to closing gaps. Value is there for individuals that want to roll up their sleeves and solve difficult problems.

June 25, 2012


Link

99 Coins

The BBC Worldwide recently released the inaugural episode of its indie gaming podcast 99 Coins. I created the 8-bit inspired music that's interleaved throughout the episode.

November 22, 2011


Picture

I designed a cover for a mixtape that I'm putting together called Phases. This was also posted on Dribbble.

November 7, 2011


Note

ToroPHP Redesign


I went ahead and re-designed the ToroPHP project page. If you're looking for a fast and intuitive router for PHP, look no further than Toro.

October 11, 2011



 
Content and layout by Kunal Anand. Connect with me on Twitter, Facebook, or email.
My views/opinions expressed here in no way reflect those of my employer.