MathJax

Friday, May 31, 2013

Make cool stuff happen

The bad news about adulthood is that good things don't just happen by themselves. The natural good news follow-up is that you can make great things happen for yourself and for others pretty much whenever you want.

You're the boss of you, so you have some choices to make, if you realize you have them:
  • You can stay out late or you can make the most of your daylight.
  • You can dress for your own convenience or to class up the joint.
  • You can stay at home bored or you can plan things for you and your friends.
  • You can coast or you can thrive.
  • You can use your freedom to atrophy or you can push yourself to greater heights.

Raise the bar.
Be the change you want to see in your life.
You don't find yourself. You make yourself.


Thursday, May 30, 2013

The most hated object in the universe

Stupid cube.

The Rubik's Cube fiendishly pits our desire for completeness against our aversion to experiencing loss against a backdrop of a puzzle where progress is often visually counterintuitive.

Wednesday, May 29, 2013

Perfect practice makes perfect

To get good, you must practice. This takes work.

If you practice without any theory, you risk developing bad habits. On the other hand, you don't want to get so distracted by theory that you cut into practice time.

So what is the right amount of theory? Enough to avoid bad habits and increase the effectiveness of your practice. All else is noise.

Go practice.

Tuesday, May 28, 2013

Speaking to software

Users of software! Who among you doesn't want this feeling?



A lot of effort goes into making software as simple as possible to use. Classics like Don't Make Me Think! catalog ways to make user interfaces intuitive. On the whole, this is a good thing. Competition in our choice of software is driving everything to be as simple as possible, and no simpler. But software can be more, much more. And not later: right now. The catch? You have to work for it. You have to learn your software's language.

Software is built of thoughts. What you see on a screen are images and words. What you hear are sounds: alerts, sometimes voices. What you feel are vibrations. These are all approximations of the logical world in which your software lives. You interact with this world by typing, clicking, tapping and speaking. Most of our typing, clicking, tapping and speaking is directed against objects presented to us by the user interface: pre-canned and pre-suggested actions. The user interface is a guide to the software's world of thoughts, helping you navigate your way to the solutions you seek.

What if you could interact with your software without a guide? What if you could describe your intent without having to navigate pre-trod logical paths? What if you could construct entire sentences for your software to interpret, beyond the limited vocabulary of "this thing" and "that action"? What if you could bypass the interpreter between your carbon and silicon brain and tell your computer what to do in a language it already speaks instead of trying to hunt for the way to prod the guide to suggest the action you already knew you wanted in the first place?

Think of Plato's Cave. The UI is just the shadows against the wall. Rather than limiting yourself to grasping at these shadows, with a lot of software there is an underlying language you can use to give direct orders. Think "keyboard shortcuts times one hundred."


Just past the covers, a lot of software that you already use has such languages. Excel has formulas. Outlook has rules. All of office has macro support. Your operating system has a command line and a shell you can use to help automate common tasks. If you build web pages, getting to know HTML, CSS and maybe even a little JavaScript will give you much more freedom than what you can experience from within a graphical editor.


Some software is built to be used primarily through its language. If you edit a lot of text for work, you might be familiar with the great vi or emacs. For the price of learning a small grammar and simple vocabulary for text manipulation, you can multiply your productivity at the keyboard.

But this is all on you. Nobody is going to make you think. A world of riches and reclaimed productivity is waiting for you if you can speak to the software you use day-to-day in its native language, not just through a graphical interpreter. Learning the language of a piece of software has the same thrills as learning a foreign language: pride in being able to guide yourself around a new country and the fun of figuring out how to most effectively curse.

This is why software developers should study foreign languages. Studying languages is the study of expressing thoughts, and we are a business of constructing goods made of thoughts. The best software and services enable us to do more than we could by translating our intent into action. The more we can express, the more efficient this communication becomes. In a way, we're all cyborgs now. We can either passively consume via our silicon brains, or we can use them to bend the world to our will.

Monday, May 27, 2013

Focus

Focusing is hard. When talking about focusing on a job or on a lecture, we have this image of paying as much attention as we can all the way through. We're doing it wrong. Tae kwon do does it a little differently.

In a tae kwon do strike, focus is the point in space and time at which all our energy is directed. Only in the last few inches of a strike do the muscles tense, and in those last few inches you put forth everything you have. The muscles immediately relax after impact.

Focus enables you to throw faster strikes, more powerful strikes, and more strikes period. Let's examine a uniformly tense strike and a uniformly loose strike.

Tense limbs arrive at the target after relaxed limbs (try it on a soft, non-living target). It is more difficult to adjust a tensed limb's trajectory. Maintaining a tense limb while in-transit to the target or after impact causes excess fatigue.

Loose limbs collapse upon impact rather than causing the target to collapse; otherwise, they are superior in all stages of a strike. We conclude that focus is actually not about capturing the value of concentrated energy but about capturing the value of relaxation. The milliseconds of focus in a strike are only possible because of the relaxation before and after.

We can relax and tense our minds in the same way as our bodies. Chronic stress and worrying lead to the same fatigue and inflexibility mentally as tense strikes lead to physically. Avoiding or ignoring important problems rather than solving them is analogous to the collapsing of a loose limb at the moment of impact.

Spiritually, holding grudges against the penitent fatigues and fixates the soul. Dogmatically clinging to a nonjudgmental stance in the face of egregious immorality is like a loose limb collapsing on impact.

The applications of focus are endless. The alternating relaxing and tensing in a strike is tae kwon do's staccato music.1 Writing's similar rhythm is a rhythm of brain-dumping and editing. Programming is a rhythm of implementing and refactoring. Try replacing intense, temporally diffuse concentration at work, school and play with focus. Find the music in what you do. Get the most out of your body, mind, and soul.





1 Tae kwon do's martial nature does not negate its musical qualities.

Thursday, May 23, 2013

Digital etiquette: Accept: R, Decline: r

Reply-all when accepting a group event invitation sent out via email or Facebook. Reply only to the organizer when declining the invitation.

Make it easy to adhere to this convention when designing an event or calendar system.

Stay classy.

Wednesday, May 22, 2013

Test harnesses for black box tests vs. white box tests

Most unit testing test harnesses are for white-box testing. They're designed to stay out of the way and allow the programmer to write quick checks for a unit under development. If any unit test fails, the build should break and the build should fail.

When managing automation for black-box test cases against a system, the rules are different. In rare instances the tests will be ready ahead of a significant amount of feature work. Black box integration tests can rarely be complete before the functionality under test is nearly code complete, so authors of automation for black-box tests control the risks of holding up feature completeness by writing test skeletons which will fail until the test can be complete early on in feature development. Since these tests always fail, black-box test harnesses need a means to separate tests which are under development from tests which are complete.

The same goes for tests which have caught bugs: to reduce noise in a continuous deployment pipeline, these tests need to be disabled, but there is great value in running these tests in a separate workflow so that the fix can be detected by the automation.

White-box unit test needs/expectations:
  • Fast individual tests
  • Mocking of dependencies is always okay
  • Event injection can speed up tests
  • Test suites are built up gradually as the individual units are developed
  • Tests often fail for obvious reasons by default
  • There is no environment to gather details around for repro purposes; just re-run the tests!
Black-box integration test needs:
  • Mocking of dependencies defeats the purpose of integration tests
  • Asynchronous waiting for dependent services and normal system behavior is a fact of life
  • Tests will often depend on one another in order to run suites in a reasonable amount of time
  • Tests routinely fail for reasons different from what is explicitly under test
  • Capturing environment data for a repro is necessary
  • Tests are defined in combinatorial clumps rather than gradually, as new functionality is built up. Mutators, Pairwise testing, Model-based testing, and any approaches based on filling in code coverage gaps generate large numbers of test procedures which are most conveniently managed as a group.

Tuesday, May 21, 2013

Fun and Mastery 2: Morale events that actually boost morale

Does your place of work have "morale events"? Are they successful at increasing morale? Would you like them to be?

Here are the steps of running a typical morale event:

  1. Spend money
  2. Feed and booze employees
  3. Hope that it worked
Regular morale events of this sort rarely maintain their potency with employees over the long run. Regular exposure to such rituals tends to jade or entitle employees. Rather than throwing more effort into step 3 above, let's see if our recent lesson on fun can help.

Individually, we experience fun when we try low-stakes tests of our skills; can organizations do the same thing at a group level? Consider activities related to the practice of your organization and see if you can make available small challenges around that. Studying how kids play, these challenges should be:

  • Qualitatively different from business-as-usual
  • Experimental
  • Voluntary
  • Low-stakes
  • A natural creative extension of the organization's ability
In one of my most memorable team meetings, the high-level dev manager running the show (Tom) said he was off to grab a guest speaker. A moment after he left the room, an attendee's (Dave's) phone rang. Tom told Dave to look under his laptop. The note under the laptop told us that Tom had gone to a secret location with a bunch of ice cream bars and we would have to decipher a series of clues involving tiny programming challenges and some crypto libraries in order to find him before the ice cream melted. The guest speaker, was, of course, a ruse. 

For the cost of some ice cream and a little bit of creativity, we got in some bonus programming practice, had some fun exercising their brains and working together, and deepened our pride for being on such a team. Neither jadedness nor entitlement accompanied this morale event. This experience is the target of every teambuilding exercise and every morale event. This is the mark which is so often missed.

If you're planning a morale event, you're still allowed and encouraged to spend money to feed and booze employees, but a small bonus challenge for your team can transform your check-box event into a fun and enduring milestone on your team's path to mastery.

Monday, May 20, 2013

Fun and Mastery

In college I started having a hard time thinking about fun in the abstract. Unsure of how to fill my free time, I started wondering if I had lost some capacity for fun. This bothered me for about eight years.

Last year a friend recommended the short-yet-transformative Mastery by George Leonard. This required reading for anyone who wants to be excellent at anything has some unexpected insights into the nature of fun.

Mastery
 points out that young children get very good at a variety of tasks very quickly--stuff we take for granted, like balancing and speaking. What do children do? They play. Playing is fun. Children will walk on curbs when out walking and play word games when they're bored and away from media sources. They're practicing skills by going slightly outside of what they normally do. They're engaging in low-stakes challenges of their current skills and loving it. This is fun.

Of course, kids don't realize this is what they're doing. They're just thinking, "Hey, this is fun." Then we grow up, spend tons of time doing homework and meeting obligations on our calendar, checking off achievements, and we can forget about going taking those tiny, low-stakes experiments against our skills.

So there you have it: a formula for rediscovering fun. Take something you're doing (anything: your job, your workout, your hobbies, social situations) and test yourself with little low-stakes challenges. Do it backwards. Do it faster. Do it on one foot. Do it with a new tool. Do it in fewer actions. It's fun!

Friday, May 17, 2013

Mirror Image: Anorexia is dumb

It's also a disease, it's also a problem, it's also something I'm not qualified to say much about since it's not part of my life experience or training.

My focus in these posts is to get guys to wake up and stop refusing to see a problem that is sabotaging them in more areas of life than they realize: excess flab. It took me a long time to get to the point where I finally realized my situation and said never again.

Let's take a time-out and focus on what I'm trying to say, because I think it would be very easy to take some things I write when talking about weight issues the wrong way. It's a delicate topic and most people who deal with it have some baggage around the issue.

I'm not saying you're worthless if you're fat.
I'm not saying you're lazy if you're fat.
I'm not saying you need to do what I did.

I'm saying your looks matter because so many first impressions are so firm and so involuntary.
I'm saying prioritizing healthy weight loss will bring with it more benefits than you realize.
I'm saying--now, for the first time--that I don't wish for anyone to get to the point where I was when I started my weight loss. I don't expect others to be motivated the way I was motivated, and I don't wish that motivation on anyone.

If you are struggling with anorexia, please get help. If your friends and family have expressed concern, please let them help. There is such a thing as too much weight loss. I feel dumb writing that: it's so obvious.

Anyway, we're full of exhortations against anorexia in the West. Given the relative rates of anorexia and obesity in the country, we pay way too much attention to anorexia vs. obesity. People think of anorexics as at one point skinny girls, and that tugs at the heart strings in ways that the image of a fat guy simply doesn't. So please, don't get all anorexic on us. But don't let that stop you from waking up.

Wednesday, May 15, 2013

Mirror Image: Looks matter

I might be alone in this, but the main message I got from TV growing up was that looks don't matter. I internalized a lot of hand-wringing about how beauty is in the eye of the beholder and how our image of what is attractive is unreasonable. I took these as excuses to ignore the development of my own looks. This was stupid.

Your looks are the first part of your first impression. Just as a first impression take can take a lot of future interactions to change, looks can drastically affect the merit of a first impression. "A stitch in time saves nine."

Losing 50 pounds in four months showed me the contrast. Put on your best face. Get your best body. Lead your best life.

Tuesday, May 14, 2013

The master must be a hobbyist.

Practice is the key to mastery (read the book!). Part of practice is accepting long plateaus. Progress is bursty and fueled by time spent plateaued.

When working towards mastery in a craft that is part of your profession, customer needs will dictate the lion's share of your craft's development. 

To subordinate customer needs to your craft is to abandon the path of mastery in your profession. 
To surrender all practice outside customer needs is to abandon the practice of your craft.

This is why the professional master must also be a hobbyist. Only as a hobbyist can you practice your craft for its own sake. Only as a hobbyist can you playfully experiment within your practice. Putting aside your craft as a hobby means your are mastering your profession but not your craft.

And that's why I need to go code some tank AIs now!

Monday, May 13, 2013

Try it: Count to bonus

If you're following a workout at home, you have some rep-based exercises. What if you're pushing yourself past the prescribed amount? Count to bonus.

Instead of "..., 24, 25, 26, 27" try "..., 24, 25, bonus, bonus."

You can also start your bonus reps during an introduction for an exercise you already understand well. In this case, the counting would look like "bonus, bonus, 1, 2, 3, ... ."

Counting to bonus helps you stay engaged for the same amount of time you were before. You're not waiting for the next exercise, you're not skipping ahead, you're not taking an early break, and you're not spending extra mental effort getting worked up over how many bonus reps you got in. You got to bonus. Good job!

Friday, May 10, 2013

Mirror Image: Pull-up vs. Leg-pulling

"Does this inability to do a pull-up make me look fat?"

People can put up a surprising amount of resistance to accepting that they are overweight and that it matters. I know I did. What I recommend is that if you've never been below the "overweight" BMI category, try to get there and see what happens. It's not a perfect measure--for athletes. Which brings me to the Tip of the Day:

Tip of the Day: Men in their 20s aren't allowed to dismiss an overweight BMI unless they can do three pull-ups.

Go ahead and jump up to that bar--cheat on getting your chin up for that first one if you want. Now go all the way down. Come on, all the way. Straight arms. Good. Now back up. Chin above the bar. Strong back, bring the bar to you. Good, we'll call that two. Back down again. Back up: okay, last one, come on, you're almost there, dude! You can almost dismiss your overweight BMI due to your massive athleticism! You're so close! Chin up!

Did you make it?

Never be fat again.

Thursday, May 9, 2013

Tip of the Day: Stoned

You've probably heard that you shouldn't weigh yourself every day. The human body can easily fluctuate by about 5 pounds day-to-day, so you don't want to get bummed out and you don't want to get cocky. Still, that number...just...stares at you.

My solution? I bought a scale that I can use to weigh myself in stone, not pounds. Since a stone is equal to 14 pounds (roughly three times the variation in daily body weight), the numerical fluctuation in my measurement is reduced. At 6'3", I don't have anything to worry about as long as I'm clocking in under 14 stone.

Tip of the Day: Weigh yourself in stone.

After all, why use a unit of measurement precise enough for harvested produce when measuring something as dynamic as your body?

Tuesday, May 7, 2013

Tip of the Day: Don't out-eat your workout

Anyone can out-eat any exercise program. Overeating makes exercise less fun. Fortunately, regular exercise makes over-eating less desirable.

Enjoy your food when you're hungry. Stop when you think you might be full. Bring it when you exercise.

Monday, May 6, 2013

The hard parts

Eagle Scout. Pilot. Black Belt. P90X. NaNoWriMo. Building that app. You can list many more achievements which are often-attempted and seldom-completed. Many goals start out fun but get tiresome after a few weeks. Sometimes we want to be seen as wanting a goal more than we want to achieve it. Often we let short-term excuses derail a future goal.

Tip of the Day: Embrace the Hard Parts.

I knew when I started Power 90 that many, many people quit in-home workout programs. I recognized that in a 90-day workout program, most of the days would be normal, maybe even a little fun. Obviously, then, the days that make people quit are the tough days--the days when you're tired, you're busy, you're already doing something active or you just don't want to.

I looked forward to the tough days.

I looked forward to them because I knew that if I could finish my workout on those days then I would succeed. Sure enough, the hard days came. I was ready. I knew I was more than capable of forming a compelling reason to skip that day's workout. I would consider those reasons after completing that day's workout--meaning I worked out anyway. I completed Power 90 and lost 50 pounds.

Then I completed P90X.

So next time you set a new long-term goal, anticipate and get excited for the hard parts: the hard parts are what get you there.

Saturday, May 4, 2013

Mirror image: Diamonds are forever, flab isn't

If you think you can never be good looking because you're presently overweight, you are so, so wrong. You haven't even seen how attractive you really are yet, and neither has the world.

In the US we've overcome malnutrition, poor dental hygiene and a wide range of skin issues, but so, so many of us are carrying around too many extra pounds. If that includes you, you probably have amazing looks to unleash once the fat goes away.

Don't let flabby cheeks, that double-chin, that gut, those thighs permanently negate the great physical assets that you do have. Your skin, your bones, your muscles, your mind, your soul--these will all be the same. Your fat is what is leaving.

Fight your flab for your chance to to show the world your best looks.