Day 4 with a pistachio

I ate a pistachio today. It wasn’t really that worth it.

I weighed 172 pounds this morning, about 1.5 pounds down from yesterday which was expected, though my expectations have virtually no basis in any reasonable science or math.

Consistently the hardest part of this is the mood. It’s not depression or sadness, really, it’s just being kind of neutral. An overwhelming sense of “meh.” I do still feel joy and smile at things that make me happy, but my motivation for things like contributing (what I like to think were) witty comments to conversations has dwindled to near nothing. It’s probably a combination of energy levels and the lack of at-will snack intake throughout the day, but it’s one of the worst parts of this experiment.

Overall, energy levels are tolerable. I do occasionally have a hard time focusing my eyes, which is a new, unexpected, and not too awesome. I’ve been concerned about the need for glasses lately anyway so maybe this process is making that issue more apparent, or maybe I am slowly dying inside. Who knows? Probably doctors…

 

 

 

Beer on a very empty stomach

After the sandiegojs meetup last night, I went out with a few of the attendees for beers down the road, curious to see how my body would react to alcohol after not eating for 72 hours.

Turns out it’s no big deal. I had expected the old adage regarding eating food before drinking to mean that I would get dangerously trashed after one beer since there is almost literally nothing in my digestive system at all. I had two and a half ShockTop beers and after a couple hours at the bar I felt surprisingly normal and confirmed this by blowing a .06 on a personal breathalyzer*

I felt fine in the morning, if not better than I did the previous morning. I don’t know if that’s due to a shift in how my body is producing glucose, or if it’s the 350 calories and 40 grams of carbohydrates consumed the night before. It’s amazing how easy it is to disregard the nutritional values of beverages. 2.5 beers tripled my calorie consumption over the previous 72 hours.

So, as far as I’m concerned, eating before drinking is irrelevant. Since I generally want food after a few beers regardless, I’m going to wait to grab something until I’ve had a couple drinks from now on.

*Yes, I have a personal breathalyzer. It’s handy for experiments and settling arguments about who can drive!

A balance between AMD and vanilla JavaScript

My environments tend to be the most productive when I combine global variables with AMD modules and that bugs both the AMD crowd and the vanilla crowd.

I’m not shy about proclaiming my love for requirejs and AMD-compatible JavaScript modules, but sometimes they can suck the life out of me, too. I flip flop between wanting libraries like jquery and underscore as modules without global namespaces and then just wanting them available anywhere, at any time. On the one hand, they are used often and having to define them as dependencies is just an extra annoyance for something that should be considered convenient, and on the other hand you lose what modules actually are dependent on.

I also alternate between wanting to specify exact dependencies for each model vs depending on a module aggregator but then it ends up requiring you to depending on even more modules and the way to actually define those in AMD is kind of frustrating.

I can do write dependencies the commonjs way:

[cc lang=’javascript’]
require(function(require){
var Klass = require(‘Klass’);
});
[/cc]

Or the AMD way

[cc lang=’javascript’]
require([‘Klass’],function(Klass){
// Klass passed in as argument
});
[/cc]

Both ways require duplication. The CommonJS method requires you to build a series of variable definitions with function calls and the AMD method requires you to duplicate identical words and also maintain appropriate order.

If you end up defining every template or model you need for a module then you can get some lengthy dependencies. Anything over 4-5 dependencies becomes cumbersome to manage. When you explicitly add jquery & underscore to that dependency list then you only have 2 or 3 more modules you can really deal with happily and that’s not enough.

I wrote a quick grunt task (located on github: grunt-require-dir) to bundle up a directory of arbitrary files to a single file composed of require calls, allowing me to deal, at least, with dependencies based around subject. This allows me to automate the bundling of directories like templates or models into a single “aggregator” or “accessor” module. This removes my ability to know exactly what is dependent on what, but it provides greater flexibility to refactor and starts to bridge the gap (for me, anyway).

I’ve also started to think of jQuery, underscore, and Deferreds as features that are just part of my environment, essentially labeling them as global dependencies and having my modules use them as global variables. So sue me.

It’s also interesting to note that, with AMD and requirejs, your global namespace is significantly more pristine. So why avoid it? Why not have first class features of your application or framework occupy that space now? It’s not poisonous and provides loads of convenience. Use AMD where it benefits you and ignore it when it doesn’t.

Day 3 without food

I definitely had dreams about eating pizza last night and my stomach was rumbling when I woke up. I licked a spoon of some Activia light yogurt I served for breakfast out of habit and it tasted disgusting. I would guess it is due to losing a baseline expectation of sweetness with regular sugar and having artificial sweeteners just tasting foreign and effing horrible. I threw it away and made my son an omelette. Then I rinsed my mouth out and brushed my teeth to get the taste out of my mouth.

Recalibrating my tastes and lessening my food addictions are one of the desired outcomes of this diet. Craving a bowl of spinach vs a reese’s peanut butter cup will be considered one of the successes.

I weigh 173.6 pounds today which is a 2.4 pound loss, more than I was expecting considering I haven’t produced much waste. If that trend continues this experiment may be over sooner than I expected. I also tested my blood sugar today and it was at 83 mg/dl, which is a normal (overnight) fasting blood sugar level, but I’m not sure what normal would be at this point.

I do feel slightly more sluggish lately, not in a lazy way, but more of a “zen” or “chill” way, for lack of better words. I’m more likely to shrug things off, take things slowly, and chill on the couch. Again, it’s hard to tell what exactly is causing this since I did just move back to a standing desk at work so wanting to sit down and relax after 8-9 hours of standing makes sense.

About midday I started to feel off and down so I went to Sprouts and bought a bunch of parsley (45 cents worth). First bite tasted phenomenal, and after eating about a half a cup I started to feel better.

Calorie total by the end of Day 3:

Making our total 164 calories after 72 hours. According to standard armchair scientist sources, around the 3 day mark is when your body starts turning towards fat stores so am interested in the way I feel going forward. Maybe I’ve already hit that point.

Day 2 without food

Woke up feeling great and think I can attribute that to finally getting a decent night sleep. I did go to bed early and my wife took toddler duty so I had about 8 hours of sleep for once.

I started having cravings when a coworker brought in a breakfast sandwich but that subsided pretty quickly. There was a free lunch of pizza and salad that was damn hard to resist, but away from the smell it didn’t bother me much.

am, though, thinking about food almost constantly. It reminds me of quitting smoking several years ago and what I know about withdrawal of other addictions. I don’t think there’s any doubt that some foods invoke addiction and withdrawal in people, but it’s hard to determine whether those effects are due to tens of thousands of years of evolution trying to tell my body what it needs to survive, or whether or not those are drug-like addictions created by consumption of genuinely addictive food.

I did get briefly concerned about water poisoning with me consuming little but drinking about a gallon of water a day. I don’t know what it takes to actually succumb to water poisoning, but just chugged an 8-oz can of V8 (30 cal). Which tasted effing amazing.

Being home and not eating is the worst part so far. I didn’t let my food stock go low before I started this so there are many things I actually want to eat but can’t and I do miss the quick bursts of happiness by eating certain snacks and food. It does feel like I am less able to quickly elevate my mood through food, but retraining myself there might not be a bad thing…

Day 1 without food

After eating my final real meal the night before at 9:00pm, the next day went pretty smoothly up until lunch, when the smells of other people’s food started to hit me. It was a strange feeling, I definitely wasn’t yet “hungry” but I wanted food badly. After the smells died down I was clear for the rest of the day up until 3, where fatigue started to set in. Being tired is probably a combination of a few things, I recently went back to a standing desk at work and my toddler was up for a lot of the night. I’ve regularly been tired for some time due to being overcommitted and stressed, so this experiment is giving me more motivation to go to sleep early and get better rest.

I did have 6 pieces of asparagus and 2 bertolli ravioli last night. I wasn’t actually hungry but my wife made dinner and felt guilty for starting this experiment without first telling her. She is very supportive, she wished me luck and told me she thinks the experiment is stupid, that I am stupid, and that if I get cranky she’s pulling the plug. She loves science.

I started this weighing around 180 pounds (taken the night before starting this) and, after 37 hours of eating just the asparagus and ravioli, now weigh 176 pounds. That’s already more than I expected, but shows how much waste was/is present in my system and isn’t likely indicative of any fat or muscle loss. I’m really interested in how quickly I burn through stored fat once my digestive tract is clear. Really shallow and unscientific estimates place my loss at about 1.5 pounds a day given no consumption and average (for me) activity,

I’m expecting 160 pounds to be a good stopping point, with 150 being an absolute bottom if I choose to go further.

I’m still not “hungry” in the way that I would expect to feel yet. I definitely want food, and there are cookies in the break room that I would destroy with vigor, but I’ve never been a responsible man with cookies so that’s not much of a change.

Personal Experiment : The No Food Diet

I’ve been questioning the idea of how much food one really should be consuming over the course of normal routine and got curious as to how long I could last without eating at all. The questions started when thinking about how abundant food is for a lot of people now and that the hunter/gatherers of thousands of years ago had to endure long stretches of time with minimal or no food at all. Over the past couple hundred years (or even less), food has become far more available and that’s not enough time for a population to regulate itself by way of evolution or mass population decline.

The obesity issues in the United States are a pretty telling indication that we really just weren’t meant to eat as much food as we are now. Not even just McDonald’s or Oreos, all food is food. The base animal urges that drive us to consume large quantities of calorie dense food are now more likely to work against us. Those urges made sense 50,000 years ago; if a tribe made a big kill or found a large crop of edible plants, our instincts would drive us to consume as much as possible for as long as that food source is available. But if that food source is available all day every day, our urges end up working to our detriment.

So I’m not eating for a little while.

I’m not laying down much of a plan and I’m going to be flexible in my adherence to it. One starting rule is that I am limiting myself to one raw vegetable a day around the size of my fist. I would omit food completely and may some days, but having that rule will allow me to move forward without facing a dramatic hard fail scenario. I’m also concerned about the way your body prepares yourself for food when the aroma or sight of it is around. Since I can’t blind myself to food existing around me, I want to have the option of providing some sustenance to assuage any concerns relating to bodily fluids being generated in excess without food to digest.

It’s little more than a fast combined with personal exploration. It is depressing that I can call it that when there are millions of people on the planet who have no choice but to go without food. Maybe I should tally up the savings on my food budget and donate that. If anyone knows any good charities, please let me know.

p.s.
Oh, beer. I probably shouldn’t have beer but I’m leaving the option to have one every now and then because I’m only human. And the generation of fermented beverages has been around for ages, so that fits, right?

Update: The full experience

  1. Personal Experiment: The No Food Diet
  2. Day 1 without food
  3. Day 2 without food
  4. Day 3 without food
  5. Beer and a very empty stomach
  6. Day 4 and a pistachio
  7. Day 5 and first doubts
  8. Bringing back the food

Unapologetically AMD

I’ve been working with JavaScript AMD modules for the better part of a year now and they have completely revolutionized the way I write JavaScript. Requirejs 2.0 brought in some excellent changes and, most importantly, made the shim concept a first class configuration option to make non-compliant code more easily usable.

Unfortunately, AMD adoption seems to be relatively low and the bulk of what you get as AMD-compatible libraries are things written as regular, all-encompassing, terrified of dependencies JavaScript libraries with an AMD wrapper around them. Using tools like Backbone and Backbone.Marionette combined with requirejs almost feels like cheating when it comes to writing single-page JavaScript applications, but I’m always left with a bad taste in my mouth when I try to look for other tools. You can go far organizing an application structure that is eminently extensible and maintainable and then feel like an unwashed slob as you try and wedge some jQuery plugin into a Backbone view that requires some obscure DOM structuring.

Everything seems to want to act as a plugin to something else, which is to say have only one dependency. This mindset forces code down a rabbit hole of duplicated code, omitted features, or substandard implementations. AMD is one of these answers to dependency management and packaging. It’s not a full answer, and it has some quirks, but the benefit is vastly greater than the cost.

I’m done with fitting square pegs into round holes and am now experimenting with an ecosystem of no holds barred, fully AMD modules that are compatible/complementary to Backbone, but we’ll see.

I just know I’m now done with shimming the world.

Uploaded a string-format implementation to github

string-format.js on github

This is an implementation heavily inspired by both console.log and perl’s sprintf implementation.

All you get are 3 simple replacements that allow you to ease the pain of variable interpolation in JavaScript.

It was kept to a bare minimum to make this a no-brainer to include in projects. Minified and gzipped it comes to around 550 bytes.

 

Keyboard battle & The Kinesis Freestyle2 keyboard

Getting further in the quest for the ultimate, mid-priced ergonomic solution I got the Kinesis Freestyle2 keyboard with the V3 risers. I opted for the V3 over the VIP3 due to reports on the size of the wrist pads and fear that it wouldn’t fit on the Workfit-A.

I tried the Goldtouch before committing, albeit an older version, and found the keys a bit harder to press than I was looking for. It probably wouldn’t have been a problem on a more secure desk, but the Workfit-A is requiring some extra consideration due to the wobble effect.

The 2 largest problems I had with the Goldtouch version I tried was the ctrl key was located too far off to the left, beyond the left limit of the normal keyboard, and that the spacebar extended too far. Those problems might seem minor but the less comfortable a solution feels the less useful it is. For the record, both those issues seem to have been fixed in current versions, so my experience is already outdated.

Old Goldtouch vs New, compare which letter the space bar extends to on both, and the location of the ctrl key.

The Kinesis, though, is excellent. Coming from a Microsoft ergonomic keyboard, it was not much of a shift at all. Having the halves completely split is extremely nice, I didn’t expect it to be so useful.

I’d recommend it but also can’t compare this to the newest Goldtouch, so this is not as complete a comparison as I expected.