A Django site.
September 22, 2008

Hans Fugal
no nic
The Fugue :
» Gnuplot in Action

One of the oldest and most universally useful tools we have is gnuplot. It is also one of the least understood and most underutilized tools we have.

I can hear you now. "What do I need gnuplot for? I don't make graphs." Well that's exactly the problem. Everyone who works with data should be making graphs, and lots of them. Do you write programs that manipulate data? You need gnuplot. Do you want to evaluate performance or traffic on your website? You need gnuplot. Do you want to impress your friends with cool graphs of the growth rates of yeast and bacteria in sourdough or your weight loss and percent body fat? You need gnuplot.

I've been using gnuplot for years. I scraped up enough gnuplot skillz to make basic graphs and it has been invaluable. But I knew gnuplot could do more than I knew how to make it do, and whenever I tried to do something advanced it was only with great pain that I succeeded. Often I failed. Let's face it, gnuplot can be a bear to learn. Why? Well, mostly because of the documentation. Not that there isn't any, almost the contrary. There's a lot of documentation, but it's very much reference documentation. What the world has been lacking is a good introduction to gnuplot that isn't afraid to get nitty-gritty where it needs to, but doesn't just parrot the abundant but obscure documentation that's already out there.

We no longer need to wait. The book is called Gnuplot in Action by Philipp Janert, and it is an absolutely fantastic book. Really, I can't say enough good about it.

Janert walks the fine line between cheesy tutorial and dense reference with the skill of a circus acrobat. The writing is approachable, yet chock full of useful information. Nothing is rushed, but it doesn't plod. The text is sprinkled with beautiful graphs that expand your imagination and open your eyes to the possibilities of gnuplot.

In chapter 2, "Essential Gnuplot", the impatient reader is given a whirlwind tour of gnuplot basics. After just 11 pages you will know everything you need to know for 90% of the graphs you will ever need to create. In fact, you'll know more than I knew when I began reading it—I learned a couple things that I kick myself for never having discovered on my own.

Chapter 3 goes into more detail on dealing with data, and in that chapter I learned a ton. Several of the things I learned in this chapter have saved me numerous hours this semester alone. Chapter 4 picks up the remaining miscellany.

In part 2, all those nagging questions of polish are addressed. This is where I used to spend the most time banging my head against the wall, searching, plodding through various newsgroup threads. "How do I get this or that to look just right?" These types of questions are hard to find answers to in search engines. Janert takes us by the hand and explains each and every question I've ever had and a few I hadn't yet dared to have. Truly beautiful graphs are now within my grasp. What's more, it no longer seems like an exercise in pain but a simple recipe for success. After Janert explains these techniques they seem plain as the nose on your face, yet he's not condescending.

Part 3 dives into the deep dark secrets of gnuplot. 3D plots, color, multiplots, different coordinate systems, fitting, terminals, and a dozen other things you didn't even know that you didn't want to know. No doubt you'll skim this section the first time and come back to it when you need those dark magic tidbits.

Part 4 is arguably the most important part of this book, or perhaps second after part 1. Part 4 is a crash course on graphical analysis. What kinds of graphs you can create, when you should and shouldn't use them, how not to lie with graphs (and how to pick out people lying with graphs), and most importantly, how to go from raw data that you don't understand to organized data that you do understand and have pretty graphs to demonstrate to boot. All with practical examples that you can tweak for your own use.

Finally, there's a gnuplot reference in the appendix. This is a deluxe package and has everything you need to become a gnuplot guru. I am thrilled that this book is coming to dispel the darkness surrounding gnuplot.

I really have no cons to speak of, other than the prerelease PDF I had access to had some minor problems—the sort of problem I would expect to be resolved in the final stages of editing. I don't have experience with other Manning books, but having seen prerelease versions of other books from other publishers I'd say the current copy is par for the course. I'm certain they'll fix those things up and have an outstanding PDF in the end. I recommend springing for the dead tree version though, as I expect the reference at the end of the book and the examples throughout will be more accessible next to your computer instead of on the screen. (You already use quite a bit of real estate running gnuplot and/or editing a gnuplot file and displaying graphs.)

February 1, 2008

Jesse Stay
obfuscated, Uncle_Jesse
Stay N' Alive » OSS
» The Book is Off to the Press, but Wait — There’s More!

I'm On Facebook -- Now What??? - Order Today!I’m extremely happy and relieved to say that “I’m on Facebook — Now What???” is off to the press, and the eBook is now available for purchase on the HappyAbout.info site.  It has been a long time coming, but we’re finished!  “I’m on Facebook — Now What???” is now officially one of the first books of its type available for sale, anywhere.  Jason and I are pretty proud of that, and hope you enjoy it as much as we have enjoyed writing it.  If you’ve pre-ordered an eCopy, you have probably already received it, or will receive it in the next day.  Purchase your copy here!

We love reviews!  If you have a short review, we’ll post a link to Amazon.com for the book as soon as it is up, and you can post your reviews there.  The more reviews we have there I am told increases our visibility on Amazon, so feel free to write one up, but save it for when I post it here.  Also, you may start blogging about the book now!  Our publisher has a terrific affiliate program, so if you’d like to make a little money off of your review in your blog, you can do so here.  Also, don’t forget to add yourself as a fan to the Facebook Page, and subscribe to our blog at FacebookAdvice.com!  Thanks again to Jason for his hard work and example in writing the book - he has been an excellent co-author to work with.  Also, thanks to Lorenzen and Scoble for their great contributions to the Foreward and Afterward!

Wait, there’s more…

I’ve had so much fun writing this book, that I’ve decided to write another one.  Today, I just signed a contract with O’Reilly to write what will be probably the first published manual on Facebook FBML.  It will be a “small animals” book, which means it won’t quite be a full sized book, but it’s not quite a Pocket Reference either.  It will most likely be called, “FBML Essentials”.  So, if you’re a developer, anxious to develop Facebook applications, stay tuned!  I will probably be putting together a separate site for that book too, similar to what we have done for facebookadvice.com.  Please, feel free to share below your frustrations with Facebook development - I’d love to hear the most common complaints and perhaps resolve those in the book!

O’Reilly is also helping me get to Graphing Social Patterns West (no one has invited me to speak though, sorry - I am open for speaking engagements while I’m out there though!) March 3-4.  If I get any other appointments I might leave earlier in the week, so feel free to book me for your user group meetings, radio, TV, podcasts, or whatever while I’m out in the L.A./San Diego area (that is my home away from home, as my grandparents live there)!

Share this article with a friend...

Share this article with a friend...

Gregarious FeedFlare

October 26, 2007

Hans Fugal
no nic
The Fugue :
» Total Fitness in 30 Minutes a Week

Sorry, one more post on the topic of fitness and fat loss. I picked up ($4 with shipping) and reread Total Fitness in 30 Minutes a Week by Laurence Morehouse, Ph.D. and Leonard Gross, and it's as good as I remembered. For various reasons I didn't follow through with the plan laid out in this book last time I read it years back, but the principles I picked up stuck with me, and influenced my search for my custom and sustainable fitness program. I had a question that I thought was answered in this book, and so I picked up a copy and started reading. I'll give you a synopsis and review, then I'll divulge my (finally) finished custom plan.

First, this book is older than I am (1975). Naturally, that means we've learned some things that Dr. Morehouse (a Ph.D. in exercise physiology at UCLA) didn't know. On the other hand, most of what he did know back then, especially the basic foundation on which the program is based, is just as true now as the law of gravity remains. The book shows its age, but in ways inconsequential to successfully losing fat and/or gaining fitness. Indeed, it worked for people in the 50s, 60s, and 70s and there's no reason why we should be any different now.

And not just any people. Dr. Morehouse worked for NASA on exercise programs for the astronauts. Thanks to him astronauts on extended missions were able to walk (if a little shakily) rather than be carried on stretcher when returning to Earth. Low gravity is worse than sitting in front of a computer when it comes to atrophying muscle.

If I had to boil this whole book down into one paragraph, this would be it: Eat balanced meals, exercise with a balance of simple equipment-free strength training and aerobic exercise 3 times a week for a total of 30 minutes a week, live a bit more actively (take the stairs, etc.), and take note of and respond to feedback to stay on track. To get into shape (generic good shape, not athletic shape), that's all you need. To lose fat, you chart your course of 1 lb a week on a piece of graph paper. If you're above the line that day, you eat a little less (skip that piece of pie or extra helping). If you're below, you eat normally.

The book and method are very straightforward. There's no gimmicks here. It won't get you ready to run a race or climb Mount Everest. There's no confusion here between being an athlete and just plain getting in shape. The book is a little wordy, and could be half as long and just as informative. But that may be because I'd already convinced myself of most of the points he drives home in this book and didn't need the persuasive arguments.

This book is very much along the same lines as the Hacker's Diet I reviewed the other day, except it emphasizes exercise much more (for its own sake, primarily, not as a primary means for losing weight). Both use the simple view: calories in and calories out. Both emphasize the importance of feedback and the realities of measurement. Both give you a sustainable and easy-to-follow program (this one is easier than hacker's diet since you don't have to count calories).

So combining these two books and everything I've read from the web (everything from fat-loss zone heart rate cardio training to the bodybuilder mantra "cardio is useless for fat loss"), I have come up with my own personal plan. Time will tell if it works.

If I'm going to exercise, it's going to be swimming. I told myself that many many times over the years, and I meant every word. So I go swimming 3 days a week. There's my cardio. It's also part of my strength training, when doing intervals. The other part is on the other 3 days when I do some simple equipment-free strength training (5-10 minutes). I'm basing my exertion on the combination of perceived exertion (primarily how hard I'm breathing) and heart rate. I aim for staying aerobic and jumping the lactate threshhold on the hard intervals.

I'm convinced you can't lose weight in a reasonable amount of time without adjusting your diet, unfortunately. The numbers just don't add up otherwise. Every pound of lean mass you add burns some 10-20 kcal a day, and you're a lucky bodybuilder if you can add 1-2 pounds a week. That gets you no closer to burning off that extra pair of twinkies than the hour of jogging. Exercise alone, in the sense of that thing you do for an hour in the morning, is not enough to raise your energy usage enough to create a calorie deficit without adjusting your diet (especially since if you have too much fat you've probably been eating a calorie surplus). No, you have to adjust your diet. That doesn't mean you have to starve, it just means you need to be conscious.

Exercise does, however, apparently act as an appetite suppressant, and it will make you feel better and so you'll be a hair more willing to walk instead of ride, stand instead of sit, etc. Water is apparently another appetite suppressant, and it is important to drink plenty for other reasons especially when losing fat, so drink plenty. If for no other reason than because it fills your stomach partially, water can suppress your appetite if you drink it before a meal. So on my above-line days I'll be drinking a couple glasses before meals.

Dr. Morehouse says not to lose more than 1 lb a week. The consensus on the web is similar, but says 1-2 lb a week. I'm a little too impatient for 1 lb a week, but probably too lazy for 2 lb a week, so I'm aiming for 1.5 lb a week. I shall have lost my goal 40 lb by mid April.

To recap, I'm watching feedback (heart rate and weight) to fine-tune my eating and exercising in order to stay on track for a reasonable goal. No starving. Only the exercise I like. Reasonable and sustainable. Why don't you play along at home?

October 19, 2007

Jeremy Robb
scothoser
Scothoser's Corner
» Book Review: War of the Worlds by H. G. Wells

Ever since I was little, I loved the story of War of the Worlds. I saw the original movie (not the Tom Cruise version), I listened to the original radio production... I just never read the original book. For some reason best known to fate, I never read the classic version by H. G. Wells.

Well, I opted to rectify that this last week. I started the book, which was a gift from my parents over the weekend, and it was difficult to put it down. The story is written as an autobiography regarding the events starting one weekend in June, when Martians landed on Earth, and began their reign of terror upon the inhabitants of late 19th Century London. The story is classic, having been remade in various forms throughout entertainment. Aliens, killing men that resist, and eventually eating those that don't. Yes, it's a classic tale.

But other than the story, the real captivation into this world is the prose. It's been years since I have read anything from the turn of the century that wasn't a translation of a more ancient text. Description was heavy, palpable, almost visual in what was and was not included. Written in the first person (as it was a fictitious autobiography), you are brought along the adventures of a philosopher as he struggles to understand the world that was turned upside down by an alien force of immense power. Forced to accept his position as vermin in the new order that has apparently consumed him, he walks down levels and levels of emotion, with a new character taking a different route and getting lost. It's also interesting to see how the main character takes the events of the fall of the Martians, and the eventual restoration of Man as the dominant life form on the planet.

All in all, this book is fascinating, and keeps a hold of you by virtue of the prose alone. If you enjoy a good story, love good prose, and wish to have a non-supernatural book to enjoy for Halloween, I would highly recommend reading it.

Next up? I think I will find some Jules Vernes stories I haven't read. ^_^

September 29, 2007

Hans Fugal
no nic
The Fugue :
» Total Heart Rate Training

I’m still swimming. This may be the longest I’ve stuck with any exercise program (excluding things thrust upon me like basketball practice or getting out of bed). Naturally, being the technical sort that I am, I want to make sure I’m using this exercise time efficiently, so I picked up Total Heart Rate Training by Joe Friel at the bookstore (and put it down before I left—reading it over several visits while my son played with the Thomas trains). This is an informative book with lots of information, but it’s not for the weak of heart—literally or figuratively. The book is written by and for obsessive-compulsive athletes (the most common variety is known as triathlete). You have to be absolutely bonkers to follow this book religiously. But it can be useful to the thinking fitness swimmer, with a grain of salt.

The first problem with this book is precision. Not a lack thereof but an overabundance and misunderstanding of it. In physics, or any practical math, you can get in trouble by giving more significant digits than your measurements warrant. You can fool yourself and others into thinking you have more precision than you do, which leads people to jump to incorrect conclusions and make silly and/or dangerous decisions. Heart rate monitors will give you absurdly accurate heart rate measurements. But I posit that you can’t measure how that maps to your body’s metabolism (the zones) with anywhere near that accuracy, at least not while exercising. What’s more, as a swimmer anyway, you can only check the monitor during rests at the end of the pool, where it’s just as convenient to take your pulse with the pace clock (it takes 6 seconds to get ±5 bpm). The heart rate charts in the appencides are what really give it away, though. Running, Biking, Swimming, etc. each have their own 2-page chart with some 60-odd entries on where the zones begin and end, to the nearest bpm. If that doesn’t sound absurd by itself, take a look at this graph I made from the swimming chart:

Swimming Heart Rate Zones

They say a picture is worth a thousand words. Notice how the relationship is almost completely linear. I’m no exercise scientist, but how much do you want to bet the body is not so perfectly conformant? I bet it varies depending on the day, conditions, what you ate, etc. There might even be some nonlinearities. So we have a chart with a bunch of numbers and no graph, that is overly precise.

That wouldn’t be so bad on its own, but the author actively disparages traditional measures and formulas for being too inaccurate, when of course the reason they are too inaccurate is that they are too precise. The most obvious example is that your maximum heart rate is 220 minus your age. This gives you a bpm, but really it’s only good to within 10 or 20 bpm. He rightly says that this is not accurate. But he says it’s as likely to be way wrong as not, because it’s a statistical measurement. i.e. it’s a bell curve. Hello, 95% confidence of being within 2 standard deviations hardly qualifies as “as likely as not” to be outside. If he really wanted to convince me he would have stated the confidence intervals and said just how far off from that number you are likely to be. Then he would have compared that error with the error in pinpointing the zones in exercise. I think we’d find that maximum heart rate, while not perfect, isn’t as bad as all that.

While being absurdly precise and complicated (to the delight of obsessive compulsive triathletes everywhere), this book is also somewhat lacking in rigor and logic. Besides the examples above, there’s an issue I blogged about previously: the so-called fat-burning zone. As you may recall, the fact is that your body burns more fat per calorie when in an aerobic metabolism. This leads people to call the aerobic zone the fat-burning zone. People get lazy and forget to put in the disclaimer that you have to work longer to burn as many calories, which leads to confusion. Trainers and self-righteous OC athletes retaliate by pointing out that you burn more calories per time unit by working out harder—up into anaerobic, and so “the fat-burning zone is a myth”. Well it’s not a myth, it’s perfectly valid if you’re willing to work out longer. Instead of elucidating the topic with clarity and stating both sides of the issue without bias, the author falls squarely, if not extremely, on the myth side.

Still, there is a lot of good information in here on how the body works, what’s going on in the various zones, in which zones you can best spend your exercise time in order to achieve your goals (the information for a fitness swimmer is in there, if a bit hidden behind the triathlete-like goals). Numbers that are useful if you take into account that they are too precise, etc.

I’ll give you an oversimplified summary of what I learned in the book. Referring to that graph above (by the way, I had no control on which colors were used—they’re just GNUPlot’s default colors), notice that the x axis is the lactate threshold. He claims that LT is a better base point than maximum heart rate, because you can directly observe it without killing yourself. Sounds good to me.

At the border of zones 1 and 2, aerobic respiration accounts for almost all of the energy produced. Aerobic respiration primarily uses fat and is much more efficient, but less powerful, than anaerobic respiration. If you’re fit you can stay in zone 2 all day long.

At the border of zones 4 and 5, enough anaerobic respiration is happening that various easily-observable changes occur, and the exercise benefits change too (especially those related to heart). Oversimply put, training above LT will train for speed in shorter (non-endurance) races, and also do various good things for your heart.

At the border of zones 5b and 5c, almost no aerobic respiration is occuring—it’s all anaerobic. This is because you’re demanding more power than aerobic respiration can keep up with. Anaerobic respiration is done not from fat stores but from stuff stored in the muscles themselves (for immediate access and powerful energy). There’s only so much of this fuel, so you run out of steam quickly above LT, but especially up here. This is sprinting stuff, and you can rarely keep it up long enough to even measure heart rates much into zone 5c.

For me, I am going to aim at increasing my LT and staying mostly in zones 2 and 4, (apparently zone 3 is a waste—little more benefit than zone 2 but requiring a lot more recovery) but doing interval training shooting up into the above-LT zones, mostly for the heart benefits. I figure that will meet my goals best, i.e. I will enjoy the exercise more and not leave the pool exhausted, I will burn more fat per calorie, and the interval training will give me enough edge to keep things interesting and improve my cardiovascular health (not to mention increase LT—doing intervals with sufficient rest to “cycle” the heart rate from low to high and back to low is one good way to do that). And I’m going to do it by taking my pulse with the pace clock periodically, and paying attention to how my body feels and how hard I’m breathing.

Of course, the most important thing is to keep on just doing it, and that’s going well because I’m enjoying learning the Total Immersion swimming method, and I’m finaly getting into the more interesting drills. It won’t be too long until I graduate to swimming again, at which point I’ll review that book. I’m looking forward to seeing if I can swim a 500m in under 10 minutes with ease. That’s something I had to do regularly as a lifeguard and even though I was more fit then (or at least less fat) I always struggled with swimming 500m non-stop, and my times were usually 10-12 minutes. If I can swim a 500m with ease in under 10 minutes in my current shape, it will be a testament to the TI method. Stay tuned!

August 3, 2007

Jeremy Robb
scothoser
Scothoser's Corner
» Getting Published: The Goal and Process

In my last post, I mentioned that I was working on a book, using Google Docs to write it from various locations. The book is coming along fairly well, and is about a third of the way through the first revision. But, because I'm the geek that I am, I wanted to know how I could get the darn thing published when I got it done.

Well, it seems that there are a number of steps that one needs to take to get published within the world of fiction and non-fiction. From what I've researched, it's a difficult process being handled by several people that remove the writer from the publisher. Here are the steps that are recommended by those in the publishing world:

Write the Book
The first step is to write the blasted thing first. Finish the manuscript, and revise it as much as you can. The idea here is to make it look as sellable as possible at first look. Also, be sure you format the book correctly. The most common font used is Courier, the font size is 12 pt. You also want to double space the pages, to make it easier for the agent and publisher to read and review.

Next, determine how long your book is going to be, by number of words. There are two schools of thought here as to how to count the number of words, but if you use the word processor word count, you should be fine. If you are writing a novel, you want to be between 60,000 to 120,000 words for a first book. This isn't a set rule, but a general rule of thumb. At 4,000 words per chapter, and 20 chapters, you would be doing well at just about the middle ground. If you find your book is too short, you could submit it as a novella, or a short story. Otherwise, you may want to look into the story again, add some sub-plots, develop the sub-plots a little more, etc. That can add more depth to your story, and more words to your word count. ^_^

The Query Letter
Now that you have written your book, have a good story, nice word count, and formatted the manuscript, it's time to look for reputation. This means finding an agent. Why an agent you ask? Because it's their job to pitch books to publishers, which can be a lengthy process for a writer to try themselves, and they are more likely to get the book published than a writer trying to get it out there.

The Query letter needs to be formatted a specific way, much like a business pitch to your boss. No one is going to read the full 80 pages of research done to support change, unless your boss literally has nothing else to do. The same with an agent. They get hundreds of submissions a day, and often judge the book by the query letter. Nathan Bransford has a really good description of how to write a query letter that he considers amazing. Check out his blog, and you will see why he will be the agent of choice once my manuscript is ready for review. ^_^

The Partial and the Manuscript
If your agent likes the query, they will often ask for a partial. THis is usually the first 30 pages or so of the book. If you have already provided the first couple pages on a website somewhere, you can mention that in the Query letter, and bypass the partial request. Once they read the partial, like what they see, then they move on and ask for the manuscript.

Once the manuscript is at the agents, they will read through it and do some preliminary editing. This is pretty much at the discretion of the agent, and at no time is the agent entitled to give you any feedback on your work. Please remember that before you threaten their lives, or the lives of their family when they just tell you that they can't or won't publish your work.

To the Publisher
If everything is ready, then they will send it on to a publisher, and try to get the interest there to publish the book. There are a number of months involved in this process, so don't be surprised if you have heard nothing for months on end. That generally means that the agent is busy trying to get it pitched correctly, and get the manuscript printed. Now would be a good time to start another writing project, if you have nothing else to do.

On the Shelves!
If the stars are in alignment, and the planets are favorable, then the book is then published. At that point, you can relax, right? Wrong! If you have a good agent, they will most likely be asking you about your next book, and what other projects you have planned for.

Anyway, I thought I would add these little gems of wisdom that I have gleaned since I started writing my book for publication. Hopefully they will be of help to any other new writer, particularly if you are looking to start for the first time. For my credits, I would like to thank Nathan Bransford for having such an informative blog, and the good writers at the Absolute Write Forums for providing a lot of this information. It really takes the mystique out of the writing and publishing business.