Blog

  • A Viable Business Model for Facebook

    Facebook’s second quarter revenue is expected to be $1.1 billion. That would give them roughly $4.4 billion per year, not exactly a number that justifies the $100 billion market cap they were/are hoping for. Compare that to Google’s $37 billion last year with current $200B market cap and Facebook isn’t even a player yet.

    The endgame has arrived and the whole world is on Facebook today. Those that aren’t are seen as eccentric and are beginning to get depressed about losing touch with their kids.

    What business model would make sense for Facebook now? Clearly advertising isn’t cutting it. They have a problem of “intent”. People go to Google to find things and if those things are in an ad, they click that ad. With Facebook the only intent is to “facebook”, not find a plumber and potentially click an ad. So as far as I’m concerned advertising will never work for Facebook.

    So what should they do? Well, for starters, they have a dossier on just about every literate person on the planet with Internet access. Their data extends beyond just their own website facebook.com. They have data on most of the websites their members visit and what those members do on each website. They know who you are, where you are, who your friends are, who their friends are, where you were born, what you and your friends look like, who you communicate with most frequently, what you like, which websites you visit most frequently, how you get to those websites,  which pages you visit on those websites and all the usual demographic cruft.

    In short, Facebook is the most complete and most current database of dossiers on individuals globally that the world has ever seen and it’s effortlessly updated in real-time.

    So who might be interested in that? Any intelligence agency on the planet. Is there any money in that? Lets find out.

    The Department of Defense in the United States 2013 budget is going to be roughly $525 billion. How much of that might they spend on surveilling people globally in real-time? Looking at the budget for the National Reconnaissance  Office (NRO), the guys who launch and manage our spy satellites, is instructive.

    The NRO’s budget for 2010 was roughly $15 billion. If Facebook can also be considered a global array of data gathering nodes similar to our spy satellites, then surely $15 billion would be a reasonable number to throw around in a conversation with the folks who launch and operate the data gathering nodes?

    And that’s one customer, albeit the largest customer. Remember that the USA has intelligence partners around the world. An example of this is the five signatory states in the UK-USA signals intelligence sharing agreement which are: USA, UK, Canada, Australia and New Zealand. All these folks have significant budget they can also contribute.

    Another budget item that might be instructive to look at is the cost of ECHELON which is not public data. But the scale, size, importance and multi-decade nature of the project (started in the 70’s and still going strong) is a good illustration of how seriously the USA and it’s partners take signals intelligence and the scale of the budget available for it.

    To be a “Google”, Facebook would have to bring in $40 billion a year in revenue which would take them to Google’s valuation of $200 billion. Right now they’re stuck at $4 billion a year.

    Facebook is the only social network that matters and will be forever thanks to it’s network effect. It’s hard to believe that the smart people Facebook keeps gobbling up haven’t considered chatting to the global intelligence gathering and cyber security community. The data they have is game changing and something the global SIGINT community would never be able to gather on their own.

    Trying to visualize the conversation Zuckerberg might have with the global intelligence community, it reminds me of a quote by Richard Gere’s character in Primal Fear who is a famous defense lawyer describing the conversation he has with new clients: “Have you been saving up for a rainy day? Guess what? … it’s raining!”

    Footnote: There is the hard problem that publicly working with the intelligence community would kill Facebook. But then the intelligence community has never been very public and one wanders if there are ways to productize the desired data into something that appears benign and have contractors buy it on the agency’s behalf. Food for thought.

  • 11 Questions Every Startup's Money Guy Should Be Able to Answer in Her Sleep.

    Every profitable business has a Money Guy. Sometimes it’s the CEO, sometimes it’s another member of the exec team. Money sticks to this persons hands for reasons unknown. They know how to get the best deals for anything they buy and they have a habit of making more money than they lose. If you don’t have someone like this in your business then you are almost certainly not profitable and never will be.

    Often this persons title is Chief Financial Officer or Chief Operating Officer. They are the ones who update the cash flow plan and know how much cash the business has on hand at all times. They are the money guy. You’ll know your money guy rocks when you wake them up in the middle of the night and they answer every one of these questions as if it’s a reflex:

    1. When do we run out of money?
    2. What is our next revenue target date and amount?
    3. Are we going to make our target or are we slipping?
    4. What are the two most effective things we can do to increase revenue?
    5. How are we doing with regards to implementing those 2 most effective things?
    6. What are our top two sources of customers?
    7. Are either of those sources at risk of disappearing overnight?
    8. What are our two biggest expenses?
    9. Have we done everything we can to lower those expenses?
    10. Are we at risk of facing a large bill in the near future?
    11. Now that you’ve been woken up, is there any current or future problem in the business that will make it hard to go back to sleep?

    Other awesome Money Guy attributes:

    1. Your Money Guy discovers surprising ways to save significant amounts of cash on big expenses.
    2. Your Money Guy isn’t constantly moaning or complaining, but occasionally will assemble the team and lay out hard facts that put some acid in your gut.
    3. Your Money Guy always has your important financial data on hand, often memorized for impromptu brainstorms or planning sessions.

    The culture I’ve described here is unfortunately not what you find in most nascent businesses which is why most of them fail to make that critical four year mark. Also not that this does not apply, or put differently it is unable to be applied to the paralel universe of West Coast Technology Startups in the USA. But it’s something I’ve observed in businesses around the world including profitable USA businesses.

    Often Money Guys are seen by tech entrepreneurs as people with green eyeshades who work under dim green lamps and aren’t fun at parties. But without the Money Guy, the parties end, entrepreneurs become employees and the innovation ends. Your Money Guy is the person who makes sure your business has enough oxygen to dive deep, take those big risks and come up for enough air to do it again.

  • Stop Being a Recruiter and Start Being an Entrepreneur

    The Valley has taken some criticism for massively incentivizing the smartest people in the world to work on problems that won’t really benefit our species – like how to get more ad clicks. But that’s not what really bugs me.

    What really bugs me is that in SV, nothing is built to last. Everything is built for an exit.

    Imagine a party and a room full of silicon valley entrepreneurs. You are a new entrepreneur to the area and you want to meet the guy who is everything you want to be. Go on. Admit it. It’s that guy in the corner surrounded by people, who arrived 2 years ago, started his company 18 months ago and just sold it to Google for $20 to $50 million and now works for them. That’s the guy everyone wants to talk to because they want to be that guy. That is the epitome of SV success. And it is a massively destructive culture.

    SV is attracting the worlds most talented engineers and tech business people. The founders, staff and investors of these companies hope that these folks will build a product for 18 months to 3 years, have the company acquired by a large incumbent and have the product killed within 2 years. Only the team remains as employees for the acquirer.

    The dominant business model in SV is not innovation and entrepreneurship but recruitment. And if you arrive in SV and are hoping to build to get acquired, you are really an aspiring recruiter. Your strategy is to assemble a team, find a project that is intellectually interesting enough to them to keep them all in one place for 1.5 to 3 years, and have them demonstrate their talents to a large tech incumbent who is hiring. When the hiring event occurs, the incumbent will acquire the company for somewhere between $1 and $4 million per engineer. The deal will be cash for investors and an earn-out for founders, both of these being the equivalent of recruiting fees.

    What makes me sad about this is that many real and talented entrepreneurs who could be building innovation and job creation machines are caught up in this. They are mentored into thinking this is the way things are done and their potentially world-changing businesses are eaten by the system.

    Most of the rest of the world has a wonderful natural selection system for defining business success. Good, healthy successful businesses generate cash and lots of it. They create jobs, make people profoundly happy and satisfied and create new products and services that improve lives. They grow organically with their customers as they develop a pattern of making people happy.

    Silicon Valley is a wonderful place to raise investment capital for a technology business. My investors are amazing individuals and have empowered us tremendously as entrepreneurs. But basing a business in The Valley feels to me like clearly stating your intent to exit and not build. And I think every entrepreneur’s intent should be to build and not exit.

  • The Basic Ketogenic Diet

    Note: Please note that if you are interested in a Ketogenic Diet used to treat Epilepsy or Pediatric Epilepsy, please start at Johns Hopkins who are the pioneers in this field. The wikipedia page for the Ketogenic Diet diet also has information on the diet as it relates to treating epilepsy. The diet below is simply for rapid and effective weight loss and uses a 1 to 1 fat to protein ratio rather than the 4 to 1 fat to combined protein and carbs ratio of the Ketogenic Diet pioneered by Johns Hopkins used to treat epilepsy.

    [wp_ad_camp_3]

    Disclaimer: I am neither a doctor nor self proclaimed nutrition expert so please consult your doctor before starting any diet or taking any action that affects your health and wellbeing.

    After finishing Gary Taubes latest book, which seems to have rapidly become the cornerstone of a new approach to nutrition, I’ve become very interested in the Ketogenic diet. The speed of weight loss I’ve seen is incredible and my energy level has remained high. The science behind a ketogenic diet is solidly backed up by Taubes research published in “Good Calories, Bad Calories” and “Why we get fat“.  According to Taubes’ research, it may also be the only way for people who have become severely insulin resistant, to effectively lose weight.

    The Ketogenic diet has always lived on the fringes of diet lore and has been seen as extreme. But the reality is that the low glycemic index diet (Low GI Diet) is effective because it is close to, but not quite, a ketogenic diet. Other diets like the South Beach Diet are also only effective because of the reduction in carbs and consequently insulin levels.

    The science behind this diet looks solid and it is part of the massive shift in nutrition research we’ve seen in the last few years. Prominent sport physiology experts like Tim Noakes have come around to this way of thinking and Tim in particular has said that everything he wrote about “Carboloading” in Lore of Running is wrong. (Lore of Running is considered the running physiology bible by many and contains much more than nutrition advice)

    I’ve decided to put together a “Basic Ketogenic Diet” for my own reference and because the Ketogenic diets out there are either targeted at extreme bodybuilders (and usually cycle in carbs) or are peppered with pseudoscience and superstition. If you find anything technically wrong in this article please correct me as loudly as you’d like in the comments and please cite your source.

    First a summary of the science behind the Ketogenic Diet.

    Keep in mind I’m summarizing hundreds of pages of explanation and supporting data into a few paragraphs:

    [wp_ad_camp_1]

    When you eat carbs your blood glucose level is raised and your pancreas secretes insulin. This insulin puts your muscle and fat cells into “storage mode”. Your fat cells store away the glucose as triglycerides. Insulin also prevents your fat cells from breaking down those triglycerides back into fatty acids and releasing them into your blood stream for use as energy. This is important: Insulin both causes fat absorption and prevents fat from being used as energy.

    If you were to eat sugary snacks throughout the day you are keeping your insulin level high which constantly keeps your fat cells in a state of absorption and prevents the release of fat and its use as energy.

    Eating fat and protein does very little to raise your insulin level.

    So the bottom line here is, if you want your body to burn fat – meaning if you want your fat cells to break down triglycerides into fatty acids, release them into your blood stream and actually use them as energy – you need to keep your insulin level as low and absolutely avoid spikes in insulin.

    A note on calories: Counting calories or increasing exercise output, according to the research of Taubes and many others, is a bad way to try to lose weight because what usually happens is instead of your body burning fat to make up for the deficit in calories, it simply decreases the amount of energy it expends. So you end up lethargic and still fat.

    There is a lot more to this, but the science above is the rationale behind all Low GI, Low Carb and Ketogenic diets. It is why you lose weight on these diets while consuming the same number of calories.

    Low Carb and Low GI diets work because they cut out carbs that cause spikes in insulin, which you now know will cause fat absorption and prevent fat burn.

    The Ketogenic diet takes this one step further. It keeps your insulin level low which puts your body into fat-release-fat-burn mode, but also significantly increases the fat content in your diet and teaches your body to use fat as energy. Your body (your liver in particular) will enter a state of Ketosis and will break down fat into fatty acids and ketone bodies which will be used as energy.

    During the diet you can measure how much fat your body is burning by monitoring your output of acetoacetate using Ketostix. When you enter a Ketogenic state, you will see a Ketone output of 5 to 20 mg/dL (According to “Why we get fat” by Taubes and my experience). The Ketostix I have also measure blood glucose which is useful to test for Ketoacidosis which you are not at risk for unless you are diabetic.

    Note that Ketostix are used by diabetics to test whether they are entering a state known as Diabetic Ketoacidosis which is very dangerous. In this case they will see very high ketone levels accompanied by blood sugar levels of greater than 240 mg/dL. You should be seeing blood sugar levels of zero (according to your Ketostix) during your diet.

    Please note that the diet outlined below is not the “Cyclical Ketogenic Diet” used by bodybuilders. It is a basic Ketogenic diet which I’ve found to be the most effective fat burning diet available. I’ve modified this diet from the classic Ketogenic diet used to treat epilepsy which recommends a 4 to 1 ratio of protein to fat. I’ve found that I can reach a state of Ketosis with a 1 to 1 ratio of fat to protein provided I keep the carbs very low.

    Without further ado, the basic Ketogenic diet:

    What you’ll need

    The Diet

    Note, you can eat as much of the foods below as you like, but I’ve found that I quickly feel full eating this diet. Don’t overeat and more importantly, don’t under-eat and make sure you’re getting the calories you need to function. This is NOT about cutting calories, it’s about releasing fat reserves and teaching your body to burn them.

    [wp_ad_camp_2]

    Drink lots of water during the diet (but don’t go crazy). I find this helps increase my metal clarity and energy.

    Taubes and others recommend not starting an exercise program at the beginning of this diet because during the acclimatization period you will not have enough energy and it usually results in people quitting the diet.

    During the diet, measure your rate of fat burn by measuring your acetoacetate output with your Ketostix. Do this every time you visit the loo. You should see 5 to 20 mg/dL, and I’ve noticed it’s particularly high after a very fatty meal. Blood glucose (if your ketostix show this on a separate color tab) should be zero at all times. If it is not zero and above 200 mg/dL you may want to consult your doctor.

    One of the most effective tricks during a diet is routine. Eat the same meals over and over or plan your meals ahead for the whole week. I’ve found it effective to pre-make dishes on Sunday and have them ready for the week. That makes it incredibly easy to stick to the diet because I avoid thinking which means I avoid creativity and creativity requires decision making which leads to hard choices. Just avoid the hard choices and have it all planned and some of it ready to grab and go.

    The Leafy Green Salad recipe:

    This is a recipe for a basic very low carb salad with lots of flavor. It’s great to add to any high-protein, high-fat meal.

    • Spinach, lettuce and/or mustard greens.
    • Red peppers
    • Tomatoes.
    • Optional raw onions.
    • Optional green beans raw.
    • Balsamic vinegar and olive oil dressing with salt and pepper. Use lemon and lime very sparingly if you add it. The vinegar actually reduces the glycemic index of this salad (and other foods).

    Below I have outlined three days with a total of 9 meals that you can mix and match as you like. At the end I include a list of Ketogenic-safe ingredients you can add or subtract as you like. Remember the key is to have a high fat, high-protein and no-carb or very low carb diet. That means absolutely no sugar.

    • Day 1
      • Breakfast: 2 eggs done any way with yolks. Sausage containing no carbs or sugar. Bacon.
      • Lunch: Chicken with as much skin and oily gooey bits as possible. Steamed spinach or broccoli.
      • Supper: Steak with cheese. Fried mushrooms. Leafy green salad.
      • Before bed 1 glass of wine with a slice of cheese.
    • Day 2
      • Breakfast: 2 egg omlette with friend mushrooms, cheese and chopped parsley.
      • Lunch: A whole duck breast if you can get it or chicken again with as much fatty skin as possible. Leafy green salad.
      • Supper: Hamburger made with high fat mince without the bun. The mince can contain the usual paprika, chopped onions and garlic if you like, but absolutely no syrup or sugar. Add Cheese, tomatoes, lettuce and any other leafy low-carb greens you like.
      • Before bed 1 glass of wine with a slice of cheese.
    • Day 3
      • 2 eggs done any way with bacon and usual no-carb sausage.
      • Steak with cheese. Leafy green salad.
      • Salmon (or other fish) fried and served with Bok Choy and your leafy green salad.

    You can mix and match the meals above and get a good Ketogenic burn going where you will notice rapid weight loss.

    Eat as much as you want ingredient ideas:

    • Beef,
    • Steak,
    • Hamburger,
    • Prime Rib,
    • Filet Mignon,
    • Roast Beef,
    • Chicken,
    • Duck (awesome if you can get it because it is very high fat),
    • Any Fish, Tuna, Salmon, Trout, Halibut,
    • Lamb,
    • Pork,
    • Bacon,
    • Ham,
    • Eggs,
    • Shrimp,
    • Crab,
    • Lobster,
    • Butter,
    • Oils (Olive Oil, Flaxseed oil, etc.),
    • Salt, Pepper, Soy Sauce,
    • Spinach,
    • Lettuce,
    • Mustard Greens,
    • Celery,
    • Cheeses,
    • Oysters,
    • Abalone.

    Add for variety but in moderation:

    Read the ingredients (if applicable) and make darn sure they contain no sugar:

    • Avocadoes
    • Mustard (with no sugar or carbs),
    • Tea no sugar with milk
    • Coffee black no sugar
    • Heavy Cream
    • Broccoli,
    • Cabbage,
    • Bok Choy,
    • Kale,
    • Asparagus,
    • Mushrooms,
    • Cucumbers,
    • Olives,
    • Celery,
    • Green Beans,
    • Brussel Sprouts,
    • Peppers (Red, Green, Jalapeno, Habanero),
    • Onions,
    • Nuts preferably almonds,

    You absolutely must avoid all sugar on this diet because it is the highest GI carbohydrate that will very quickly spike your insulin and destroy any Ketogenic effect. Other foods to avoid roughly in order of damage they will do to the diet:

    • All sugar.
    • All Bread.
    • Did I mention avoid sugar?
    • All traditional carbs like rice, pasta, wheat, potatoes, even the low GI ones like beans and lentils.
    • Beware of sauces that contain sugar or things like corn starch.

    Effects of the diet:

    • You will see rapid weight loss of up to 6 pounds for a 200 pound person in the first 48 hours. This is your kidneys releasing water as they expel their sodium due to the absence of insulin. It’s what you’ve usually heard described as “water weight”.
    • Then you should see continued weight loss of anything from 0.25 to 2 pounds per day (an eighth to half kilo lost per day). But this varies greatly between individuals and is affected by a wide range of factors including your current weight and insulin sensitivity.
    • For the first week you may experience slightly decreased mental clarity. This clears up after a week as your brain gets used to burning ketones for energy instead of glucose.
    • According to data in “Why we get fat” your Vitamin C needs actually decrease on a low carb diet, so don’t feel the need to massively supplement.
    • Research has shown (also from Taubes) that LDL (bad) cholesterol will elevate slightly but clump size will be increased which is a net positive because larger LDL is less likely to stick to artery walls. HDL (good) cholesterol is significantly elevated with a very low carb diet like this which is a very strong net positive. This also has other great health benefits e.g. Lower insulin reduces the risk of hardening of artery walls.

    What about alcohol?

    I’ve found a glass of wine on it’s own or with a small slice of cheese before bed seems, anecdotally, to increase my fat burn rate. Anything more than a single reasonably sized glass has the opposite effect.

    Beer is the devils poison. It contains carbs in the form of maltase which raise your insulin level just like sugar does. The alcohol is turned into citrate in your liver which produces fat and that fat is efficiently stored thanks to your now raised insulin levels.

    So absolutely no drinks with sugar. That means no sweet cocktails either. I also don’t buy the idea of low-carb beers.

    I would imagine that one shot of spirits  wouldn’t be a problem provided it doesn’t contain any sugar and is something like Vodka, Whiskey or Tequila. I’ve heard they add caramel to tequila “gold” (the cheap crap) so avoid that.

    I’ve found that drinking heavily, meaning several glasses of wine followed by cocktails or shots, has a deleterious effect on my ability to burn fat and my energy level. The effect seems to last 72 hours or more.

    Conclusion

    Once again I’d like to reiterate that I’m neither a doctor nor self proclaimed nutrition guru. But it does seem that both doctors and “nutritionists” including government sources have been pulling the wool over our eyes since 1960 about what we should be eating. The ideas that “fat makes you fat” and “lower calories to lose weight” are so entrenched in our consciousness that many people find the latest research difficult if not impossible to swallow.

    If you would like to learn how this came to be, check out Planet Money’s excellent segment on “Who Killed Lard?” and the rise of Crisco and hydrogenated vegetable oil. It will give you an idea of the political forces that influence dietary advice.

    As Gary Taubes commented: If we are going see a change in the advice that governments and health authorities are handing out, it is going to take 20 years which is a lifetime. So rather than wait for those slow moving wheels to turn, take matters into your own hands.

  • 12 Surprising things you probably don't know about weight loss

    I just finished reading Gary Taubes book “Why we get fat” after hearing him interviewed on Russ Roberts excellent econtalk podcast.

    Gary wrote a book called “Good Calories, Bad Calories” a few years ago which is quite technical and includes a long history of how the state of nutrition got to where it currently is. “Why we get fat” is a well written distilation and update of his previous book.

    The following surprising facts are from “Why we get fat”:

    1. Lower testosterone or lower estrogen makes you fat because it has an inhibiting action on LDL which causes your fat cells to absorb more fat. That is why we get fat as we get older.
    2. In an experiment, mice had their ovaries removed which removed their estrogen. They ate more and got fat. When their diets were limited they got fat anyway and became sedentary to compensate for the fact that they were storing away so many calories. This illustrates a recurring concept in the book: We are not fat because we eat too much. Instead, we eat too much because we are fat.
    3. Beer is the perfect beer-belly creator because when you drink beer the alcohol is turned into citrate in your liver which aids in fat production. That’s fine, but the problem is that the carbohydrates in beer in the form of maltase cause an increase in insulin which put your fat cells into storage mode. So the new fat that the citrate produced is quickly and efficiently stored… where else but your beer belly.
    4. A high protein, high fat diet raises your LDL (bad) cholesterol slightly, but massively raises your HDL (good) cholesterol which has a strong net positive effect on your overall cholesterol.
    5. A high protein, high fat diet causes your LDL (bad) cholesterol to appear in larger clumps which are less likely to stick to your artery walls.
    6. High insulin levels caused by carbohydrate intake cause atherosclerosis (hardening of arteries).
    7. Up until 1960 the popular advice from nutrition experts was to stick to a low carb diet. Gary includes a huge amount of data and historical quotes to support this. After 1960 we somehow got screwed up and started thinking that carbs should for the base of the food pyramid.
    8. Fat does not make you fat. Carbs make you fat because they boost insulin levels which put your fat cells into absorption mode and prevent your fat cells from breaking down triglycerides into fatty acides and glycerol and releasing them to be used as energy.
    9. The reason you instantly lose 3 to 6 pounds when starting a low carb diet is because your high insulin state has been signaling your kidneys to absorb sodium which causes them to retain water. When you lower your insulin levels for the first time your kidneys release that water and you lose (in my case) 4 pounds in about 36 hours.
    10. When you eat only protein and fat, your body goes into a state of ketosis after a while which means you are using fat as energy. You can buy ketostix at your local pharmacy and perform a urine test to see if your body is in a state of ketosis and at what level. The ketostix I have include a blood glucose test on a separate color panel which is also useful data.
    11. Gary attacks the idea that you can only lose weight by decreasing calories in or increasing calories spent through exercise with the following illustration: If you accidentally over-ate 25 calories per day for 20 years you would gain 50 pounds in weight. Most of us eat outside of that narrow threshold, but our bodies manage to self regulate somehow.
    12. Most diets fail because we decrease calories consumed which simply causes us to decrease our energy expenditure and stay the same weight.

    It’s a great book and completely changed my view on nutrition and physiology as it relates to diet.

  • Enough Pretending to Ban Assault Rifles. Just Do It.

    Until January this year I lived in Elizabeth, Colorado for a year and a half which is 30 miles from where the shooting occurred 3 days ago. Many of my extended family still lives there. My brother called me in France from Cape Town to tell me it was going on in real-time, via Reddit, so I got hold of my nephew in Denver who was watching the opening of Batman, but thankfully at a different theater. It’s a connected world.

    While living in Colorado I went to a gun range in Montana and played with just about every gun they had including of course a 50 caliber handgun an AR-15 and a fully automatic assault rifle that was similar but older for legal reasons. Then did a gun course later in Colorado. I don’t own any guns.

    According to the news an AR-15 assault rifle was used in the Aurora Cinema Shooting on Thursday night along with a shotgun and two handguns. The AR-15 is an M-4 assault rifle used by the US military in places like Afghanistan and Iraq. The main difference is that it is semi-automatic. In other words it can only fire as fast as you can pull the trigger. There are a few hacks available to fix this like bump-firing where you attach a device to the stock that keeps pulling the trigger thanks to the recoil.

    I never had much of a point of view on this, but I’m beginning to strongly question why on Earth we need to be able to own AR-15 assault rifles. They tried to ban them in California but there are “California Legal” AR-15’s available. The Federal Assault Weapons Ban was another half hearted attempt – the law only banned weapons made after the law passed and it expired in 2004.

    The AR-15 is a mean weapon. It fires a .223 round at an extremely high velocity and a single shot to a human can do terrible damage. A single shot to the body can cause brain damage due to hydrostatic shock. Contrary to what they tell you in movies, there is no such thing as a “Flesh wound” and every gunshot wound is serious.

    The idea that making the AR-15 semi-automatic somehow makes it safer is absurd. On a course I attended our instructor trained us to fire in bursts of 3 to four which is the only way to stay accurate with an assault rifle. So you’re really just removing 2 to three rounds from each shot and ensuring the shooter maintains the discipline of not holding down the trigger too long.

    The AR-15 has a short barrel which makes it useless for hunting, even though a few unsporting folks use it to hunt. It’s designed for close quarters assault style combat. When you hold and point it you are hunched over the weapon in a combat stance designed to minimize recoil, present a small profile and keep you moving aggressively forward.  It’s designed to very efficiently kill multiple people in close quarters in a war setting.

    Magazine sizes of 60 rounds or more are available from sites like gunbroker.com for the AR-15. Imagine a single AR-15 with three magazines of 20 to 60 rounds. I don’t think “home defense” captures the possible uses for that configuration. [Edit: After writing this article I discovered a 100 round AR-15 magazine was found at the scene in Aurora according to this article.]

    The argument for the need to “defend ourselves from the government” is absurd because they already have the tanks and the nukes and they’re not going to let us have any.

    The argument for home defense doesn’t hold water either because your AR-15 may be up against another AR-15 or an illegal M-4 or how about 5 guys with assault rifles.

    There’s never going to be a scenario where you are “fully equipped” with legal weapons to “take all comers”. So lets stop fantasizing, lets keep weapons for sport legal and stop lying to ourselves that we are somehow empowered because we have an assault weapon stored in the place you will probably be furthest from when the boogie man comes to visit.

     

  • Time for a Linode downgrade

    My credit card number was stolen a few days ago by someone in Palo Alto right after my site was on Hacker News’s home page. I’m going to choose to believe they are unrelated. Interesting though since I don’t live or work in California and this card has never visited there. On the positive side, Visa Signature customer service is worth every penny and 2 new cards arrived on my doorstep in France in 48 hours.

    But moving on to the point of this blog entry… it forced me to look at all the recurring fees I’m paying for and either update the card number to my new card or ditch the service.

    I discovered my Linode fees had crept up to $115 a month for three servers and one getting backed up. So I ditched the two dev servers and was still paying $60 for a Linode 1536 instance with backup fees.

    • So I deleted log files and brought the disk space down to 12 gigs from 50 gigs.
    • Added more aggressive log rotation to protect from running out of space.
    • Optimized Apache to only have 5 children.
    • Optimized nginx as a reverse proxy so slow clients won’t hog the apache children by setting a shorter proxy timeout.
    • Added mod_status to do real-time checks on how many apache children are busy and what site they’re serving. (This server actually runs 3 sites including skipthepie.org and the website for my sister’s amazing Cape Town restaurant.)
    • Set MaxRequestsPerChild for apache to be 100 to make sure the apache kids don’t grow if there’s a memory leak.

    This of course assumes you’re running nginx in front of apache as a reverse proxy, without which you absolutely can’t run a medium traffic website on nothing but thin-air.

    Once it was all done, I shrunk the disk down to 20 gigs, rebuilt the server as a 512, got my $36 prorated refund from Linode (thanks guys, very nice policy!!) and I’m now paying $25 a month for hosting instead of $115 (Or saving $1080 per year)

    Not exactly rocket science or Earth Shattering, but always nice to keep things lean and mean.

     

  • Static Stretching injured my lower back

    I’m a runner and I do 3 to 5 miles 3 times a week. About 3 months ago I started doing a new static stretch in addition to my current routine. I stretch before and after my runs for about 20 minutes each time. The new stretch was sitting with legs out in front, touching my toes and putting my head on my knees.

    About a month ago my back started hurting. Not during my runs, but outside of runs. Then a few days ago I was loading groceries in the car and bang. Severe back pain, so bad that if I sneezed my legs half collapsed.

    I immediately stopped running and stuck to my stretching routine. No improvement. 2 days later I stopped stretching and within 24 hours a marked improvement and 48 hours later even more so.

    A friend’s back was severely injured in a kiteboarding accident and shared his recovery story with me earlier this year at a skiing trip. Much of the recovery was strengthening his back muscles so they could re-support his spine. Interesting part was that right after the accident his back muscles went into spasm to protect his spine. Which indicates how important those muscles are to support the spine.

    So I googled whether static stretching can weaken back muscles.

    I ran across this: http://www.nytimes.com/2008/11/02/sports/playmagazine/112pewarm.html?_r=1

    Turns out I’ve been working hard during the last 3 months to weaken my back muscles. So I’m seriously rethinking my stretching routine and will probably do the bare minimum to retain flexibility and focus on dynamic stretching as the article suggests from now on.

     

     

  • The Rise of the Data Smuggler

    I always thought the idea of physically smuggling data was absurd. Even physically transporting data seemed silly to me because if you have broadband you can simply upload or download it. For really big data I have a gigabit connection at a data center where I rent space, so sometimes I’ll do a massive download and just show up at the facility with a 1.5 terrabyte drive and hit the local Starbucks while it takes a few minutes to copy over what I’ve downloaded.

    I have either given or thrown away countless USB thumb drives I’ve been given as gifts from Google AdWords and other companies. What’s the point?

    Two things changed my mind about why physically transporting data is interesting. A conversation with Sebastian Thrun (creator of Google Street View) that I had a few years back where he told me that Fedexing data is, and probably always will be, the highest bandwidth way of moving data around. That’s why Google uses Fedex to send hard drives from their Street View vans back to headquarters.

    The second thing that changed my mind was a new law in the UK that makes it illegal to not hand over encryption keys if the police want to decrypt your data. The penalty is two to five years in prison for simply refusing to hand over the keys. The logical outcome is that a lot of energy will now be spent on hiding the existence of encrypted data.

    I think two fields will emerge. The first is the art of hiding encrypted data when transferring it across a wire. If time is not a factor then this may be the way to go. Simply altering the sequence or transmission times of TCP packets can encode data, although it will be very low bandwidth.

    The second area where I think you’ll see more activity is the physical hiding of data. The reason I think more energy will be spent in this area is because it allows for very high bandwidth. If you can hide a 2 terrabyte drive and take a 6 hour journey to get it fro A to B, your bandwidth is 776 Megabits per second. Try and get that on your cable modem or ADSL link.

    Data storage devices that self destruct aren’t interesting when it comes to solving this problem. A self destructing drive lets police know that you have data that you never allowed them to decrypt, so presumably you’ll get your 2 to 5 years. The data needs to be invisible.

    Storing data on or inside your body may be one solution. According to Scientific American:

    The human brain consists of about one billion neurons. Each neuron forms about 1,000 connections to other neurons, amounting to more than a trillion connections. If each neuron could only help store a single memory, running out of space would be a problem. You might have only a few gigabytes of storage space, similar to the space in an iPod or a USB flash drive. Yet neurons combine so that each one helps with many memories at a time, exponentially increasing the brain’s memory storage capacity to something closer to around 2.5 petabytes (or a million gigabytes). For comparison, if your brain worked like a digital video recorder in a television, 2.5 petabytes would be enough to hold three million hours of TV shows. You would have to leave the TV running continuously for more than 300 years to use up all that storage.

    I’m not sure I would want to upload data directly to my brain, lest I overwrite the breathing function. But biological data storage is clearly worth looking at if your intent is to hide data.

    So maybe Johnny Mnemonic wasn’t so absurd after all:


     

  • PHP array() is a little scary

    Push 100,000 elements onto a PHP array() where each element is a four element associative array (a hash in Perl speak). Here’s the data being pushed:

    array(
      'owner' => 100,
      'host' => 'www.example.com.co.uk',
      'path' => '/this/is/an/example/path.html',
      'hostkey' => '1111'
    )
    

    The memory grows by over 80 megabytes.

    Pushing takes less than a second or two but shifting off the first 1000 elements takes over 17 seconds on my machine.

    Now take that same data and create a basic FIFO class that has push() and shift() methods. Use pack() and unpack() to store the data in a long string. Total time to push 100,000 and shift the first 1000 elements is around 1 second. Total memory is 7 megabytes which is less than 10% of PHP’s internal array()’s consumption.

    PHP’s splFixedArray class which is advertised as mainly having a speed advantage doesn’t fair much better. With a fixed array created of 100,000 elements and loading and unloading the same associative array() it grows by 75 megs but is very fast at half a second. Just for fun I pushed 100,000 elements on an splFixedArray which are simply the values of the test associative array concatenated into a string and it’s still weighs in at 13 megabytes.

    Here’s the FIFO class:

    class wfArray {
            private $data = "";
            private $shiftPtr = 0;
            public function __construct($keys){
                    $this->keys = $keys;
            }
            public function push($val){ //associative array with keys that match those given to constructor
                    foreach($this->keys as $key){
                            $this->data .= pack('N', strlen($val[$key])) . $val[$key];
                    }
            }
            public function shift(){
                    $arr = array();
                    if(strlen($this->data) < 1){ return null; }
                    foreach($this->keys as $key){
                            $len = unpack('N', substr($this->data, $this->shiftPtr, 4));
                            $len = $len[1];
                            $arr[$key] = substr($this->data, $this->shiftPtr + 4, $len);
                            $this->shiftPtr += 4 + $len;
                    }
                    return $arr;
            }
    }
    

    Here’s the test script using the FIFO class with the array() tests commented out.

    require_once('wfArray.php');
    error_reporting(E_ALL);
    $p1 = memory_get_peak_usage();
    $stime = microtime(true);
    //$arr = array();
    $arr = new wfArray(array('owner', 'host', 'path', 'hostkey'));
    for($i = 0; $i < 100000; $i++){
            //array_push($arr, array(
            $arr->push(array(
                    'owner' => 100,
                    'host' => 'www.example.com.co.uk',
                    'path' => '/this/is/an/example/path.html',
                    'hostkey' => '1111'
                    ));
            if($i % 1000 == 0){ echo $i . "\n"; }
    }
    $i = 0;
    while($elem = $arr->shift()){
    //while($elem = array_shift($arr)){
            $i++;
            if($i > 1000){ break; }
            if(! ($elem['owner'] == 100 && $elem['host'] == 'www.example.com.co.uk' && $elem['path'] == '/this/is/an/example/path.html' && $elem['hostkey'] == '1111')){
                    die("Problem");
            }
    }
    echo "\nTotal time: " . sprintf('%.3f', microtime(true) - $stime) . "\n";
    $p2 = memory_get_peak_usage();
    echo "Grew: " . ($p2 - $p1) . "\n";