Posterous theme by Cory Watilo

How To Read the Four-Hour Workweek

Note: If this post seems out-of-date, it's because it was actually written on November 30th, 2009, but I forgot about it until the 4-Hour Body was released.

Tim Ferriss has received a hailstorm of praise and criticism alike since his release of the Four-Hour Workweek and subsequent rise to fame. There are people that believe Tim Ferriss is full of shit. I find the man fascinating.

Clearly a man who can work four hour workweeks inspires both envy and jealousy. I recently finished the 4HWW and it's clear that this isn't the case at all. He has simply re-defined his career so that "work" involves fun activities. He's also been able to maximize productivity by aggressively delegating time-consuming tasks. It's pretty clear that he used the techniques he advocates, like hiring a personal assistant, to write the book itself. 

Reading between the lines, I found three main takeaways:

1. Ignore cultural norms and be realistic about your productivity.

Corporate America has become so wealthy that it has become bloated with fluff. An employee's role in an organization is to increase company's value by a greater amount than he or she is being paid. Often, this isn't the case. I don't have hard stats to make this case, but I know from first-hand experience that it's quite easy to fly under the radar at a large company. It's also true that companies assign work that isn't truly productive, often for bureaucratic reasons. 

Questions to ask yourself are: 
  • How much time do I spend truly creating value?
  • How much money is that time worth?

By positioning yourself such that you can create a direct path from work to revenue, you can double, triple or quadruple your earnings. Or you can simply work less.

2. Know how good is "good enough" and know that you can outsource routine work.

Once you're in control of your time and productivity, it's important that you find ways to maximize that productivity. While many people might have the propensity to deliver "perfect" work, perfection is rarely necessary. Additionally, many tasks, especially menial, time-consuming tasks, like e-mail, can be outsourced. Ferriss encourages readers to take a leap of faith and put somebody else in charge, thereby freeing your time to do what's important.

3. Maximize your mobility.

Ferriss lays out a complete guide for how to develop a high-margin, outsource-able business to give you the freedom of unlimited travel. The first two steps are sufficient but not necessary for this to be possible. I have friends who travel very frequently in spite of having 9-5 jobs. The desire to travel or live abroad may vary on a personal basis. A wide variety of professions allow frequent travel, such as consulting. You may also have career-oriented goals, or otherwise, that discourage from being abroad all the time. The point being that you can design your life around mobility if you choose to take control of your situation. 

My Conclusion

The 4HWW is a myth. My advice is to find the overlap between what you love and what pays you.

I love building software, and would inevitably spend a lot of time programming if I didn't have a job. I might as well do it with smart people and get paid at the same time.

This applies to nearly anything you might enjoy. Find the right community of people and form strong relationships based on what you love. There may or may not be overlap between what you love and a job market but that's up to you figure out.

Goals, Revised

Short-term

  • Become a significantly faster reader. Like proper sex education, reading is one of the core skills that permeates a central aspect of your life. Unfortunately, neither culture nor the education system in the United States dictates the importance of these crucial life skills.

    I recently came across Spreeder, which is a nifty Web application that could potentially help improve reading speed and comprehension. It emphasizes subvocalization elimination, and although it has an option for chunking, I suspect it doesn't help with chunking in practice, due to the way lines are actually laid out and scanned.

  • Reach prescribed weight levels (also known as "Rx") in Crossfit. I joined a local Crossfit gym nearly six months ago and I feel in better shape than I've felt in a long time. Regardless, it's highly intense, and I've barely reached the prescribed weight levels for women. Achieving men's Rx entails many things: 
    1. I'll be stronger than ever before.
    2. I'll have to maintain high levels of discipline.
    3. I'll have to maintain a better diet.
    4. I'll generally be pushing myself beyond my limits. 
  • Research and follow a more Paleo-style diet. True Paleo is somewhat absurd. The diet disadvocates salt, for christ's sake! It's quite trendy as well, and I more or less believe that everything popular is wrong. Regardless, there are sound principles underlying the diet that have led to rave reviews among its followers. It's also the de facto diet of Crossfitters, so I'm inclined to follow it to keep up with the better athletes in the program. Additionally, following a diet is a great test of discipline.
  • Solidify political viewpoints. I've made an effort to read a lot about economics and politics for the last two years, but I've barely touched the tip of the iceberg. On one hand, I've subconsciously sought to maintain a small identity to broadly consume facts and knowledge in an unbiased way, but on the other hand, people dish out respect based on how you to take a stance and defend it. 
  • Volunteer regularly. As a child of Mexican immigrants, engineering and technology has been incredibly empowering for my family. It has truly given us access to the spoils of the wealthy world, whereas much of my extended family is without them. More families can gain control of their own destiny if they happen to encounter the right passion and learning tools in their lifetime. My ideal volunteer job would involve the HIspanic population and technology. I nearly achieved this at the National Hispanic University but due to last-minute changes in their curriculum I wasn't able to help out.
  • Perfect my Spanish. Spanish is my first language, but it's pretty weak right now. It can be perfected in only a few months in a native Spanish-speaking country. 

Long-term

  • Take a transcontinental trip. I'd like to take a trip worth blogging about. I've taken a few epic trips--namely, to Japan and Colombia--but they have only lasted 2-3 weeks.I only saw a single country both times. There are 227 countries (I think) in the world, and that's a huge amount of unique cultures, places and people to see before I die. I can cover more ground by taking long and infrequent trips. The natural breakdown of regions is by continent, more or less, and I can cover the small ones in one trip. South America is the ideal choice: it has thirteen countries, and most countries speak Spanish, which will help me work toward my goal of perfecting the language.
  • Perfect my French. I took nearly six years of French in school. This clearly has to be utilized at some point. I'm not sure I'm a big fan of France, as a country, but fortunately there are plenty of French-speaking African countries. 
  • Get a Master's degree. Ideally, I'd like to go to Stanford for a degree in Symbolic Systems, or something similarly unconventional. I'm not sure I like the traditional university model, that is, paying tens of thousands of dollars for a fancy name on your resume. Traditional education systems will see a collapse in the next 10-20 years and it'd be good to be on the cutting edge of whatever alternatives arise.
Ongoing
  • Be a good friend. One unfortunate aspect of entrepreneurship is that you are forced to seek out the help of acquiantances to push your mission along. Pushing a startup forward also requires a solipsistic focus on your venture. It also takes a lot of hard work, and it's easy to neglect important relationships in one's life. This is a trade-off I don't want to make, and I'd like to take advantage of my time having a "normal" job to re-focus on what's truly important in life: the relationships in my life.
  • Stay hungry. I don't think this will be difficult to do. Comfortable is boring.

How to password-protect a Django site with .htaccess

I recently had to password-protect a subdirectory of my site and found existing documentation on this to be wholly inadequate -- at least applied to sites utilizing Apache and Django. The problem is that to password-protect a subdirectory, one must write rules in an .htaccess file residing in the parent directory. Since Django projects use a hand-written URL dispatcher, the directory structure of the resulting Web site doesn't reflect the structure of the internal storage system.

Fortunately, the solution is simple. Instead of writing your Apache directives in an .htaccess site, write them where your Django configuration resides. This will typically be your httpd.conf or site-specific configuration files you've created in your Apache sites-available/ directory.

I made a copy of my existing configuration under the location "/subdirectory," and added the following directives.

 <Location "/subdirectory">
    AuthType Basic
    AuthName "My Secret Site"
    AuthUserFile "/path/to/.htpasswd"
    Require user username
    ... 
</Location>

Be sure to use the "htpasswd" command on Unix to make an .htpasswd file in a directory on your server. Change the path in my sample above to where you store the file. Be sure that "username" matches the username you create using htpasswd.

That's it. If you know how to do this without duplicating my existing configuration, please post how to do so in the comments. That would be much appreciated.

Objective-C for Web Developers, Part III

(This is the third in a three-part series for programmers with tips on making the leap from Web to the iPhone)

Your interface and business logic need to be connected manually

Experienced Web developers can traverse up and down the DOM tree like wild monkeys. The iPhone SDK utilizes .xib files that are XML-based as well for the UI, but the Web model doesn't quite carry over. Imagine, instead, that for each DOM element that you access in your JavaScript code, you have to write special instructions indicating you want to access them. There are two steps for writing these instructions:

  1. Define a property in your header file that serves as an "outlet." Here is an example:

    @property (nonatomic, retain) IBOutlet TextField *myTextField;
    

    (be sure to define this property under @interface in the header and file and to @synthesize it in your implementation file)

  2. Open up your .xib file in Interface Builder, and make the connection. You can right-click on the view you want to become an outlet or on the File's Owner to accomplish this.

    Carefully remembering to do this will save you a lot of grief.

Do you have other relevant tips? Please post them!

Objective-C for Web Developers, Part II

(This is the second in a three-part series for programmers with tips on making the leap from Web to the iPhone)

Memory management can be a Good Thing!

As Web developers move from building static pages to rich Web apps, our browsers begin to buckle under the weight of heavy JavaScript. There's not a lot we can do about this beyond high-level optimizations aside from praying that V8 gains more market share rapidly. For those that haven't written production code in C, it can seem quite daunting. It shouldn't be. There's a fundamental rule that iPhone owners can follow from the time they write their first app (from the Apple Objective-C Memory Management Rules):

You take ownership of an object if you create it using a method whose name begins with “alloc” or “new” or contains “copy” (for example, alloc, newObject, or mutableCopy), or if you send it a retain message. You are responsible for relinquishing ownership of objects you own using release or autorelease. Any other time you receive an object, you must not release it.

This explains why many constructors for Foundation classes have a class method "counterpart." One example is NSString:

+ string
– init
+ stringWithCharacters:length:
– initWithCharacters:length:
+ stringWithString:
– initWithString:
+ stringWithCString:encoding:
– initWithCString:encoding:

The difference between the class methods and the traditional constructors is how memory is managed. For all classes prefixed with init, the caller is the owner. For all class methods, the callee determines ownership. This materializes like so in your code for the two types of constructors:

- (void)manipulateString:(NSString *)_string {
    NSString *newString = [[NSString alloc] 
        initWithString:@"Sample String"];
    // do stuff...
    [newString release];
 }
 

- (void)manipulateString:(NSString *)_string {
    NSString *newString = [NSString 
        stringWithString:@"Sample String"];
    // do stuff...
}
 

Additionally, if you are creating objects and returning them, use "autorelease":

- (NSString *)returnString {
    NSString *newString = [[[NSString alloc] 
        initWithString:@"Sample String"] autorelease];
    // can't release the string before returning it!
    return newString;
 }
 

I recommend reading the Memory Management Rules before beginning your first serious project. It will most certainly be a problem for amateur Objective-C developers. Practice makes perfect.

(Continue to part III...)

Objective-C for Web Developers, Part I

Having recently forayed into the world of iPhone development, I've had to adjust to the unique software stack that comprises the iPhone SDK. My first love is and always will be Web development, but the Apple platform is well-architected and produces beautiful software quite easily. Here are a few tips for new developers that come from the Web world. The followings tips should help guide you over the bumps of jumping from the world of Javascript and CSS to Objective-C and Cocoa.

Visual Attributes of Strings

Good Web developers and designers advocate flexibility above all else. Flexibility can be a blessing and a curse. HTML and CSS provide an inherently restricted toolset, intended to accommodate a widespread number of unknown use cases, giving the user maximum control. While Web designers become increasingly sophisticated and can build designs that are both aesthetically and flexible (see the CSS Zen Garden* for examples), it is a rare gift. Fortunately, for the rest of us, the iPhone/iPod is a single interface, with the iPad coming to stores soon. Having a limited number of devices on which our iPhone app can be viewed means that we know exactly how the app is being visualizing. 

The limitation materializes into more feedback about the visual attributes of Strings, for instance. One of my favorite code snippets is the ability to check the text size:

 // Calculate the expected size based on the font and
 // linebreak mode of your label
 
 CGSize maximumLabelSize = CGSizeMake(280, 9999);

// Use default system font (Helvetica) at size 16 for
 //     programmatically created label
 CGSize expectedLabelSize = [((UILabel *)instruction).text
                 sizeWithFont:[UIFont systemFontOfSize:16.0]
                 constrainedToSize:maximumLabelSize
                 lineBreakMode:UILineBreakModeWordWrap];

 // Create my label programmatically...

CGRect newFrame = myLabel.frame;
newFrame.size.height = expectedLabelSize.height;
myLabel.frame = newFrame;

(originally pulled from Stack Overflow)

(Continue to part II...)

Sports in the Digital Age

Nuggets advance scout Chad Iske has the NBA at his fingertips.

With a few strokes on his laptop keyboard, Iske can:

• Find out exactly how many times a game Lakers guard Kobe Bryant posts up, and how effective Bryant is from that spot.

• See how often the Mavericks run a blindside pick to free up Dirk Nowitzki at the top of the key.

• Break down data to determine how successful Suns guard Steve Nash is when he drives left, whether he's more likely to shoot or pass in that situation, and whether he's more likely to go to the rim or pull up for a jumper.

But Iske doesn't simply get raw statistical data. He can also pair the data with video clips of every player and every play. And it's all available online within half an hour after each game ends.

The service is provided by Synergy Sports Technology. It is basketball scouting for the digital age, and 26 of the NBA's 30 teams use Synergy. The company even offers a way for a team's coaching staff to prepare a set of video clips that can be downloaded to an iPod and given to players.

Sports are becoming hi-tech. I've been a long time baseball fan, and it's simultaneously sad and exciting to see the game change over time.

In the MLB, we have seen the rise of specialists. There is no longer a binary division between hitters and pitchers; the categories are highly segmented. Pitching-wise, in addition to starters, a well-rounded bullpen staffs middle relievers, long relievers, setup guys and closers. Similarly, the batting line-up isn't solely comprised of eight full-time fielders. Bench and utility players exist in any line-up and are often swapped out depending on whether they hit well against the handedness of the opposing pitcher.

Technology has changed baseball from the bottom up. The Michael Lewis book, Moneyball (2003), discusses innovations by the 1998-2002 Oakland A's in detail. The book attributes the A's success to their redaction of traditional baseball norms that are essentially meaningless--like if a hot prospect has a "good" face for baseball--and they embrace statistical insight. Namely, the team treats individual plays like financial derivatives. They slice up the field with a multitude of gridlines and record the every play that is hit into an individual sector. Given the configuration of each specific player, such as the hitter, pitcher, teams playing, or the weather that day, they can analyze the winning plays in the game. They subsequently draft the players that add the most value to the configuration of their (even if the player in question is not a popular choice) and make coaching choices based around the micro-specific strengths of each player, thereby eliminating the guesswork. The book is a great read, and I highly recommend checking it out.

While sports fans will have to adjust to the changing style of professional sports, technology innovation permeates hobbyist and extreme sports. One that is particularly affected is paintball. The sport was borne in 1981 with a cattle-marking gun called the Nelspot 007. The marker (a less hostile name for "gun" that paintballers use) was slow-firing, clunky and innaccurate. Jams were frequent and expected. Fast-forward to today's markers and you have 20-30 balls per second of highly accurate, consistent shots. The result? The move from slow, strategic war-like gameplay to lightning-fast and hyperactive gameplay that resembles an american football match more so than a chess game.

I personally feel like something sacred is lost each time a record is broken or new rules are instituted for a changing game, in spite of my love for technology and innovation. What are your thoughts? In what other ways are sports affected?

Avoiding the Education Problem

Good companies pay you to learn.

Paul Buchheit, Startup School 2009

I made a broad generalization in last blog post, claiming that working at large companies will stifle the speed of your learning. This isn't necessarily true.

Industry experience at any company can provide a valuable educational experience.

I made that generalization, because, in my experience, I felt the bureaucracy of my employer was actually stifling my learning. Since I'm in the software business, a huge amount of resources are available at virtually no cost, through the Internet and open-source. Hence, a company better provide damn good resources for your education if they expect you to learn more effectively than self-education, which I would consider the alternative.

For certain individuals, the only way attain their educational goals is by working at a large company, like Google, Microsoft, Apple, or Amazon. Google, for instance, fosters a strong academic environment. There are projects that these companies are uniquely capable of producing. For individuals whose goals align very strongly with said companies, they will likely have good experiences there, in spite of the company's bureaucracy.