One Week on Joylent

Rob Rhinehart is a software developer who created a drink that has been the centre of much debate and controversy over the past year. The idea is simple; what we eat gets broken down into nutrients and chemicals and the body is pretty indiscriminate about how it obtains these. So why not just give it what it wants and be done with the hassle of cooking, balancing meals and tracking your nutrition? Why not work backwards, and throw all the ingredients your body needs to survive into one tasty (debatable), beige shake and live off that instead of food?

Watch their creepy ass Orwellian video above.

I must admit, I’m fond of the concept. Not only because of the time it would save me, but because of the granular control of your diet. No longer are you overshooting your sugar intake because of the ludicrous amount of sugar in modern foods, or lacking in essential nutrients because of you’re just winging it all the time. It’s the perfect daily intake, everyday. You literally cannot eat anything healthier. In theory.

Rob dubbed his shake Soylent ( after the 1973 Soylent Green adapted from the book Make Room! Make Room!

But there’s an issue. Soylent is only available in the states, but never fear, the recipe has been detailed on Rob’s website allowing the product to be picked up and spun into action for the EU by an ex-drug dealer in Amsterdam named Joey for his company Joylent ( Wonderful.

15 meals for €30. How could I resist?

For the next (working) week I’d give up food entirely. Living on 3 meals a day (approx 2100 calories) of a whey, oatflour, soyflour, maltodextrin and other assorted chemical mix.


I must admit I am favouring the original Soylent in my mind as Rob is constantly working hard to refine his formula and catch anything he has missed in making Soylent a 100% complete sustainable nutritional replacement for food. The inclusion of maltodextrin as source of carbohydrates is something the concerns me a touch as maltodextrin has a high gycemic response, meaning it breaks down to release sugar into the blood relatively quickly, causing insulin spikes. However Rob writes well informed posts about maltodextrin being coupled with oatflour for slow releasing sugars. Afterall, the body needs both. He also writes that Soylent’s overall glycemic response is within the normal acceptable levels.

Another concern is the lack of chewing. Some take up chewing gum to keep their facial muscles in good working order, but the real issue is that chewing holds the function of releasing enzymes as part of a pre-digestion stage of breaking food down in the mouth. Enzymes that Soylent potentially lacks. In fact, a study has linked long term feeding on powdered food with hypoglycemia and signs of systematic illnesses in mice (source: I guess in theory I could raise concerns with any food. I could talk about the carcinogenic nature of some foods, the effects of refined sugars, the list goes on. The fact is, Soylent isn’t as bad as it sounds. While you may not be replacing your entire intake with it just yet, I’m fond of it’s convenience for a quick meal on the go or when you have nothing in.

Day 1: Banana

I arrived at work and mixed up my first Joylent. Banana. It takes a bit of practice to get the consistency down. Initially I made it too thick and it was not pleasant. Mixing too thin will render equally disgusting results. The texture may also be an issue. I can taste the gritty feeling of the whey but I think it’s the oat flour or flax seed that just refuses to mix. I almost feel like I need to chew each gulp.
By lunch I was aware that my mental focus and energy levels were down, a kind of fog has been hanging over me all day, but it is Monday after all. There’s definitely a psychological aspect to food; even when I feel full in my stomach, I feel like my mouth needs to eat something. Its a strange sensation and one that I tried to rectify with chewing gum which helped temporarily.
Banana has a strange aftertaste of artificial sweetener that makes it difficult for me to keep down. In the end I only finished half of my third and final shake for the day and made a sandwich. It tasted amazing.

Day 2: Chocolate

Chocolate is much better. None of the artificial aftertaste and a lot more subtle than banana. I think it helps with making the texture more bearable. It kind of reminds me of a kind of chocolate weetabix flavour at this point. I could almost go as far as saying it tastes good. I still feel terrible though.

Day 3: Strawberry

Strawberry is good. I almost prefer it to chocolate. It’s made with real freeze dried strawberries so it doesn’t taste artificial at all. In fact, it tastes quite natural and refreshing. Like strawberry yoghurt. I enjoyed my strawberry day and felt a little more energised than previous days. I also took to drinking my third and final shake before I left work. It was extremely liberating to get home and have nothing to do; no cooking, no washing up, just me time. It bought me an extra hour of my day easily. The only downside was I did tend to get hungry around 9pm.

Day 4: Vanilla

Vanilla is good. My energy levels feel almost back to normal but not quite. I’m ready to give up and I decided to make this my final day. Perhaps it’s the radical shift in diet that has made me feel groggy and a phase out of food whilst fading in Joylent would be a more appropriate way to get my body used to an all liquid diet. The taste of vanilla is probably my favourite, it’s on a par with strawberry. I still miss the act of chewing something and feeling something in my stomach, which is, to me, the biggest drawback of Joylent. It’s just not as filling as a meal.

Conclusion and Ongoing Use

Can you live off Joylent? Probably. Would I recommend it? No. I left my experiment with a new appreciation of the psychological impact of food.

Did I feel hungry? Yes. A lot. Weighing myself at the beginning and end of the trial I noticed a slight gain in weight. Nothing significant, but enough to prove that the calories were there. My hunger was simply a side effect of consolidating my meals into 3 meals per day rather than my usual routine of eating little but often.

But will I still use Joylent? There are actually a large number of bags of Joylent sat in my cupboard right now (no banana). They sit there as my emergency meal when I either don’t feel like I can make the effort to cook, or just simply don’t have the time to cook as I have to get home and be straight out again. This is where I think Joylent, Soylent and other brands can offer something really sustainable. It’s almost the perfect quick meal, balanced, easily prepared, and fast.

Rob Rhinehart is funding a long term study on the effects of Soylent. I’m hoping this will lead to new developments, further revisions and credibility of a potentially great idea that isn’t quite yet the replacement for food it sets out to be.


Branded Emails with Devise

I’ve been working on some email notifications for both admin and client recently and needed some nice branded emails instead of the default plain text ones that rails gives you. So for this post, we’ll look at how to create branded emails for your own mailers, and carry the same design over to our Devise emails for when a user signs up.

Firstly, lets create a template. I used a free responsive email template generator I found online to create my template and tweaked it accordingly. Responsive templates can be a hassle, so save the time and get one from someone who knows what they’re doing and adapt it to your needs.

I put this in a file in my layouts folder called mailer.html.erb and edited the template to have a <%= yield %> tag where my content would be.

Now we can use our mailer template for any emails from a mailer we’ve created. We can use them on a per method basis, or, as I prefer, we can just set it as a default template for our class to use. For instance, in the top of my admin_notification_mailer.rb, just below the default from setting, we can add:

To use our mailer layout. Rails is smart enough to know to look in the layouts folder for this. But what about getting Devise to adopt this same template?

Simple. In our config/application.rb

Now anything we send from Devise will automatically use the ‘mailer’ layout we created.


Validating Booleans

I came across a little gotcha today and thought it would be nice to start a series of ‘One Minute Rails’ posts. The idea is they’re super short, practical posts that you can digest within a minute and gain a practical piece of knowledge or insight that you can take away and apply to whatever you’re working on.

I was working on an application today where the Users model called for an admin boolean and I wanted to make this a required field for all users, so I stuck on the standard…

…and my test were still failing even though I knew admin was now a required field, or so I thought.

To understand why presence: true doesn’t work for boolean fields, we have to take a peak at how Rails is validating these fields. Rails’ way of validating presence is to use .blank? to check if something is blank, but if you try this on a false value ( false.blank? ) it returns true, confirming that the field is blank and failing validation miserably. The trick is to check that the boolean field is either one of an array of specified values. We can do this using inclusion like so…

You’re not just limited to true and false here, you could have a string field and check that only specific values are valid, like colours;

A simple trick that will save you some serious frustration on those boolean validations.