Sleep is more important than food

Something that’s stuck in my head for a long time is the statement that very successful people typically sleep an hour less than the rest of us, and use that extra hour to get a jump on the competition. Unfortunately for those of us who’d like to join the club, the amount of sleep we require seems to be hard-wired into our genetics. On top of that, it looks like we’re better off skipping a meal than we are skipping out on sleep.

Harvard Business Review – Sleep is More Important than Food

Say you decide to go on a fast, and so you effectively starve yourself for a week. At the end of seven days, how would you be feeling? You’d probably be hungry, perhaps a little weak, and almost certainly somewhat thinner. But basically you’d be fine.

Now let’s say you deprive yourself of sleep for a week. Not so good. After several days, you’d be almost completely unable to function. That’s why Amnesty International lists sleep deprivation as a form of torture.

Here’s what former Israeli Prime Minister Menachem Begin had to say in his memoir White Nights about the experience of being deprived of sleep in a KGB prison: “In the head of the interrogated prisoner a haze begins to form. His spirit is wearied to death, his legs are unsteady, and he has one sole desire: to sleep … Anyone who has experienced this desire knows that not even hunger and thirst are comparable with it.”

So why is sleep one of the first things we’re willing to sacrifice as the demands in our lives keep rising? We continue to live by a remarkably durable myth: sleeping one hour less will give us one more hour of productivity. In reality, the research suggests that even small amounts of sleep deprivation take a significant toll on our health, our mood, our cognitive capacity and our productivity.

Many of the effects we suffer are invisible. Insufficient sleep, for example, deeply impairs our ability to consolidate and stabilize learning that occurs during the waking day. In other words, it wreaks havoc on our memory.

So how much sleep do you need? When researchers put test subjects in environments without clocks or windows and ask them to sleep any time they feel tired, 95 percent sleep between seven and eight hours out of every 24. Another 2.5 percent sleep more than eight hours. That means just 2.5 percent of us require less than 7 hours of sleep a night to feel fully rested. That’s 1 out of every 40 people.

Great performers are an exception. Typically, they sleep significantly more than the rest of us. In Anders Ericcson’s famous study of violinists, the top performers slept an average of 8 ½ hours out of every 24, including a 20 to 30 minute midafternoon nap some 2 hours a day more than the average American.

How do video games solve the “two people shoot at the same time” dilemma?

I’ve always wondered how multiplayer video games – that is, those involving players distributed across a network – decide upon a winner in this typical situation: Player A and Player B fire one-shot-kills bullets at each other at nearly the same time (Player A’s fires 1/1000th of a second first). Being that each player is on their own machine across a network and that the time on their machines is not necessarily correct (a bit fast or a bit slow), the game server cannot simply trust the received data. How are these life or death decisions made?

I posed the question to Quora and only received unhelpful answers. Elsewhere, however, I was provided two good sources that each answered the question. First, from The Valve Developer Community – Source Multiplayer Networking page:

Multiplayer games based on the Source Engine use a Client-Server networking architecture. Usually a server is a dedicated host that runs the game and is authoritative about world simulation, game rules, and player input processing. A client is a player’s computer connected to a game server. The client and server communicate with each other by sending small data packets at a high frequency (usually 20 to 30 packets per second).

A client receives the current world state from the server and generates video and audio output based on these updates. The client also samples data from input devices (keyboard, mouse, microphone, etc.) and sends these input samples back to the server for further processing. Clients only communicate with the game server and not between each other (like in a peer-to-peer application). In contrast with a single player game, a multiplayer game has to deal with a variety of new problems caused by packet-based communication.

Basic Networking

The server simulates the game in discrete time steps called ticks. By default, the timestep is 15ms, so 66.666… ticks per second are simulated, but mods can specify their own tickrate. During each tick, the server processes incoming user commands, runs a physical simulation step, checks the game rules, and updates all object states. If the game is large or the servers busy dealing with a roblox hack, this may interfere with gameplay.

After simulating a tick, the server decides if any client needs a world update and takes a snapshot of the current world state if necessary. A higher tickrate increases the simulation precision, but also requires more CPU power and available bandwidth on both server and client.

Lag Compensation

Let’s say a player shoots at a target at client time 10.5. The firing information is packed into a user command and sent to the server. While the packet is on its way through the network, the server continues to simulate the world, and the target might have moved to a different position. The user command arrives at server time 10.6 and the server wouldn’t detect the hit, even though the player has aimed exactly at the target. This error is corrected by the server-side lag compensation)

The lag compensation system keeps a history of all recent player positions for one second. If a user command is executed, the server estimates at what time the command was created as follows:

Command Execution Time = Current Server Time – Packet Round-Trip-Time – Client View Interpolation

Then the server moves all other players – only players – back to where they were at the command execution time. The user command is executed and the hit is detected correctly. After the user command has been processed, the players revert to their original positions.

Client and server hitboxes don’t exactly match because of small precision errors in time measurement. Even a small difference of a few milliseconds can cause an error of several inches for fast-moving objects. Multiplayer hit detection is not pixel perfect and has known precision limitations based on the tickrate and the speed of moving objects. Increasing the tickrate does improve the precision of hit detection, but also requires more CPU, memory, and bandwidth capacity for server and clients.

The question arises, why is hit detection so complicated on the server? Doing the back tracking of player positions and dealing with precision errors while hit detection could be done client-side way easier and with pixel precision. The client would just tell the server with a “hit” message what player has been hit and where.

We can’t allow that simply because a game server can’t trust the clients on such important decisions. Even if the client is “clean” and protected by Valve Anti-Cheat, the packets could be still modified on a 3rd machine while routed to the game server. These “cheat proxies” could inject “hit” messages into the network packet without being detected by VAC (a “man-in-the-middle” attack).

Another great article on the subject is Gamasutra – 1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond, which talks about the same subject from the perspective of a RTS game and in the age of dial up.

Building strength, power, muscle mass, and muscular endurance

Men’s Journal – Everything You Know About Fitness is a Lie

It all starts with understanding the four basic muscular aptitudes: strength, power, muscle mass, and muscular endurance.

Strength means how much you can lift once, and it’s the backbone of every sport on Earth, from the crouch-holding power of a skier to the one-finger pull-up of a climber.

Power is a more slippery term that means “speed strength,” or how much you can lift very, very quickly, and it gives you the explosive paddling speed to catch a big wave or the pedaling burst to fire your mountain bike up a grade.

Muscle mass can be a liability in sports like climbing, where it’s all about strength-to-weight ratio, but mass helps enormously with games like rugby and football, and it can support strength and power — not to mention make you look better in a T-shirt.

Muscular endurance means how many times you can lift a given weight in a row without stopping, and it’s the essence of running, swimming, and even a kayaker’s long-haul paddling.

Read More

Performance reviews that work

Samuel A. Culbert, a professor in the Anderson School of Management at the University of California has this advice about the use of performance evaluations in the workplace:

The New York Times – Why Your Boss Is Wrong About You

Performance reviews are held up as objective assessments by the boss, with the assumption that the boss has all the answers.

Now, maybe your boss is all-knowing. But I’ve never seen one that was. In a self-interested world, where imperfect people are judging other imperfect people, anybody reviewing somebody else’s performance — whether as an actor, a writer, a spouse, a friend or a worker — is subjective. It’s why when employees switch bosses, more often than not their evaluation changes as well.

Under such a system, in which one’s livelihood can be destroyed by a self-serving boss trying to meet a budget or please the higher-ups, what employee would ever speak his mind? What employee would ever say that the boss is wrong, and offer an idea on how something might get done better?

Only an employee looking for trouble.

Is there a way out? I believe there is, and it works for both government and business. It’s something I call the performance preview. Instead of top-down reviews, both boss and subordinate are held responsible for setting goals and achieving results. No longer will only the subordinate be held accountable for the often arbitrary metrics that the boss creates. Instead, bosses are taught how to truly manage, and learn that it’s in their interest to listen to their subordinates to get the results the taxpayer is counting on.

Instead of the bosses merely handing out A’s and C’s, they work to make sure everyone can earn an A. And the word goes out: “No more after-the-fact disappointments. Tell me your problems as they happen; we’re in it together and it’s my job to ensure results.”

Performance reviews aren’t the only ways to measure effectiveness, to be sure. Workers whose output is tangible and measurable — how much garbage is picked up, how many streets are cleared of snow — are increasingly evaluated according to numerical goals. I’d argue these measurements are similarly flawed. Workers are almost always better at coming up with metrics that lead to systemwide gains than bosses alone are. The key to systemwide success (as opposed to individual success) is still employees working together under the leadership of good managers.

Rings don’t come much cooler than this one

Keep watching until the second half of the video – it’ll make you do a double-take.

The history of the skyscrapers + what makes modern cities so expensive

By way of Market Urbanism is a feature article in The Atlantic by Edward Glaeser about the history of tall cities like New York, Chicago, Paris and Mumbai. Glaeser is an economist by trade and thus talks at length about the incentives and disincentives of building height restrictions and the challenges of preserving historical architecture while simultaneously serving the need for new housing spaces.

The Atlantic – How Skyscrapers Can Save the City

In the late Middle Ages, the wool-making center of Bruges became one of the first places where a secular structure, a 354-foot belfry built to celebrate cloth-making, towered over nearby churches. But elsewhere another four or five centuries passed before secular structures surpassed religious ones. With its 281-foot spire, Trinity Church was the tallest building in New York City until 1890. Perhaps that year, when Trinity’s spire was eclipsed by a skyscraper built to house Joseph Pulitzer’s New York World, should be seen as the true start of the irreligious 20th century. At almost the same time, Paris celebrated its growing wealth by erecting the 1,000-foot Eiffel Tower, which was 700 feet taller than the Cathedral of Notre-Dame.

Read More

The best fixed-width programming font for Windows OSes: Inconsolata

As I round into the last year of a solid decade of being a professional software developer, I’m becoming more and more aware of how important it is to make your working environment as comfortable as possible. This extends beyond your keyboard, mouse and chair into the realm of software: Is your development environment making you log more keystrokes and mouse movements than needed? Are you taking it easy on your eyes by providing a high-contrast interface with a decent font size?

That last question, spurred mostly by my transition to a MacBook Pro as my development machine, had me settle on Menlo. Back on my Windows machines at home, after sifting through a number of options mentioned here by Jeff Atwood I decided on Inconsolata. Tracking down a TrueType (TTF) version took a few more minutes but eventually led to success – I’ve mirrored the file I found locally here for others to download – enjoy.

Inconsolata TrueType (TTF) Font

The radically improbable series of events that led to modern spaceflight/rocketry

Author Neal Stephenson (of Snow Crash fame) wrote a piece on the strange set of coincidences that occurred in the last half-century to lead to modern society’s expertise in rocketry and space travel. It’s one of those Catch-22 pieces of writing that make you wonder at how crazy the world history we take for granted actually was.

Slate.com – Space Stasis: What the strange persistence of rockets can teach us about innovation

The phenomena of path dependence and lock-in can be illustrated with many examples, but one of the most vivid is the gear we use to launch things into space. Rockets are a very old invention. The Chinese have had them for something like 1,000 years. Francis Scott Key wrote about them during the War of 1812 and we sing about them at every football game. As late as the 1930s, however, they remained small, experimental, and failure-prone.

There is no way, of course, to guess how rockets might have developed, or failed to, were it not for the fact that, during the 1940s, the world’s most technically sophisticated nation was under the absolute control of a crazy dictator who decreed that vast physical and intellectual resources should be hurled into the project of creating rockets of hitherto unimagined size.

These rockets, which were known as V-2s, were worse than useless from a military standpoint, in the sense that the same resources would have produced a much greater effect had they been devoted instead to the production of U-boats or Messerschmitts. Accordingly, the victorious nations showed only modest interest in their development immediately following the war. It is reasonable to suppose that little more would have been done with them, had it not been for another event, happening at the same time, even more bizarre and incredible than the seizure of absolute control over a modern nation-state by a genocidal madman. I refer, of course, to the sudden and completely unexpected development of nuclear weapons, undertaken over the course of a very few years by a top-secret crash program atop a mesa in New Mexico.

Read More

Getting XenonMKV to work with Windows 7 64-bit

XenonMKV is a terrific program for converting videos in the MKV format to an MP4 that an Xbox 360 can play.

After upgrading my desktop PC to Windows 7 (64-bit), I found that the MP4 files I was outputting only worked if I changed the version of MP4Box.exe used to 0.4.5 (defaults to 0.4.6). After that I had no problems.

Study: All net job growth in the U.S. since 1977 has come from startups

There was an interesting piece in the HBR blogs a few days ago that was written in response to President Obama’s State of the Union speech – specifically, the part about job creation. The author takes note of how job creation in since 1977 has been entirely due to startups, but that the President’s go-to crew for ideas on how to foster growth consist of all the wrong people for the job.

Harvard Business Review: Looking for Jobs in All the Wrong Places: Memo to the President

According to a recent study by the Kauffman Foundation, for example, all net job growth in the U.S. since 1977 has been due to start-ups. The data show that if you took start-ups out of the picture and looked only at large established firms, job growth in the U.S. over the last 34 years would actually be negative.

“When it comes to U.S. job growth,” said Kauffman Foundation economist Tim Kane in his report, “start-up companies aren’t everything. They’re the only thing.”

In your address last night, Mr. President, you correctly noted that, “The first step in winning the future is encouraging American innovation.” Here, too, start-ups are the driving engine of our nation’s global innovation leadership.

It is startups who have generated virtually all of our nation’s major technological breakthroughs in the last hundred years — from cars and planes to semiconductors, PCs, software, and the Internet — and in the process sparked the creation of whole new industries and millions of new jobs. And as economists have demonstrated, this kind of start-up-led innovation is the source of virtually all economic growth and increases in living standards in the U.S.

In other words, Mr. President, everything depends upon start-ups: Job creation. Our standard of living. Our prosperity as a nation. The American Dream itself.

So if the target of national policy is job creation, then the bullseye of that policy must be centered on startups. Yet policy makers in both parties continue to aim at the wrong target.

Last month, Mr. President, you held a summit meeting with 20 of the nation’s top CEOs to look for ways to spur job creation. But Fortune 100 CEOs are exactly the wrong people to talk to about jobs. Big Business is not a major job creator. Indeed, as one commentator put it, the guest list at this summit meeting represented “a who’s who of outsourcing American jobs.”