The Flaming Lips

Oh March 12, 2010, The Flaming Lips played at Austin Music Hall.  This show is on my “top 5 events of my life and stuff I’ll probably reflect on when I’m dying” list.  It was incredible.

I have pages of stuff to say about it, but I’m trying to keep my blog posts smaller than a certain size.  I’m not sure what that size is, but this is too big.  I’m sorry, there’s just so much to say I don’t want to cut anything out.  This post is my description of the band’s show, omitting the comments about the venue, the pre-show, the warmup band, and the transition.  That’ll all get described over the next week.  I’ve never been to a concert that would take pages to describe.

The Prerequisites

Here’s a summary of some stuff that the omissions will mention and describe but are relevant to the show:

  • Either the acoustics in AMH suck, the band was playing too loud, or a combination of both.
  • I had an awesome position with a clear view of the stage.
  • The band set up their own instruments, so we got to see them and start the crowd interaction about 20 minutes before they actually started playing.
  • Laser pointers were handed out shortly before the show, with the promise that it was part of “an interactive show”.
  • The lighting rig included a backdrop that could be transparent *or* a video display.  There was a camera mounted on Wayne’s microphone with some video filters that made it look like they were recording an 80’s video.
  • I can’t remember the set list perfectly; if I say, “I think x was next” it means, “There may have been a song before it where nothing really notable happened”.
  • I haven’t bought Embryonic yet so I won’t recognize or know the title of any songs from it.
  • “Something notable” in a concert like this is not only a common occurrence, but makes almost every other show you could attend seem as exciting as a checkout line.

Now you’re up to speed on some stuff I didn’t feel like explaining in detail in two places.

The Show

If you’re an avid TFL fan and have been to one of their concerts, there’s probably no surprises here.  If you’re an avid fan, you probably have an idea what the show was like.  It’s so much cooler to experience it than it is to watch videos of it.  I’ll walk through what I remember of the show as accurately as possible (I wish I’d had something to type notes on!), then try to piece together a set list.

The show started with this weird dude that looked like a hobo who came out and read what I guess was a poem.  I didn’t understand it, partially because it was hard to hear him and partially because it sounded like it was one of those poems you are supposed to sit and think about.  He left, and Wayne made it clear he was going to do the hamster ball crowd surfing thing and made sure the mosh pit was well aware that they might want to secure their drinks.  After informing the mosh pit to stay alert, he left and some sound effects I recognized as the ones from the opening of Time Travel… Yes! started playing.  (I might have got the hobo/Wayne speech out of order.)

Some of the things I am about to describe are very strange. I promise I am not exaggerating anything.  If I can’t remember something clearly, I’m either not going to type it or say “I don’t remember”, so don’t assume I can’t remember so I’m using hyperbole.

The backdrop started a video of a nude woman walking around with some psychedelic filters over it.  Soon, her genitals started glowing and I was reminded of Old Gregg’s “mangina”.  As if this weren’t absurd enough, soon Miss Glowing Genitals sat down and assumed the birthing position.  This is when we discovered the video rig could be opened like a door.  One by one, the band members who weren’t Wayne emerged from the giant flashing vagina.  (It sounds a lot more gross than it was.  It was more like a large, football-shaped solid color portal than something from the pages of Hustler.)  Of course, after this Wayne’s crowdsurfing ball inflated and he started the walk around the audience.  I believe this sequence heavy with birthing imagery is meant to tie in to the new album, Embryonic.  Good thing I took all those literature classes, right?

Then the confetti starts.  On both sides of the stage, there were machines that blast confetti out and fans to blow it into the audience.  Lots of confetti; it was usually 30 second long blasts at a time.  There were lots of fog machines, lots of spots, a giant disco ball (if it were truly a ball it’d probably have an 18-foot diameter!), and lots of dancers in the wings dressed like DJ Lance.  We’re about 5 minutes into the show, 20 seconds into the first song, and my mind is already completely blown.  This is just the beginning.

I didn’t recognize the song they played while Wayne was surfing the crowd in his inflatable hamster ball (I guess it’s an embryonic sac in this interpretation).  It sounded familiar, but I couldn’t put a title to it.  After some crowdsurfing, Wayne returned to the stage and climbed out of his ball.  I didn’t recognize the next song either, but it was pretty good.  This is when the balloons were released.  There were between a dozen and 15 balloons, all about 2 feet in diameter kicked out into the crowd.  You’ve seen beach balls at concerts before; this was kind of the same.  Except these are *huge*, confetti is being blasted everywhere, there’s fog everywhere, there’s strobe lights, naked lady is still dancing on the video screen, the band is playing, and laser pointers are following the balloons everywhere.  I started taking pictures every few minutes because after trying to look at everything for a while my mind kind of overloaded and I had to look at something else for a minute.  2 songs in and my mind has been blown twice.  This pattern continued.

The Yeah Yeah Yeah Song (With All Your Power) was next.  They had some custom video for this song, and the lighting strategy changed a little bit.  At some point during the song, some new actors joined the DJ Lance crew in the wings; on stage right it was a man dressed up like a star or the sun and on stage left it was a giant walking catfish dressed like a sailor.  There’s still balloons, fog, confetti, and lasers everywhere.  I seriously would not have been angry if the show ended here, even if the tickets were double.

After this Wayne asked everyone to pop the balloons.  I was kind of sad, but he promised that there was a reason.  With the balloons popped, he told everyone to get the laser pointers ready.  In particular, he said if we were afraid to point them at him he wanted as many people as possible to do so, and that there’d be a part of the next song where he really wanted us to let him have it.  The song was either Vein of Stars or In the Morning of the Magicians; I can’t remember exactly which one.  The lights were very dim, and the video backdrop was a “space” scene with stars.  In the middle of the song, the screen said “Get your lasers ready!”, then counted down as the lights were killed.  It turns out Wayne had a big mirror, and as we all pointed the lasers at it the fog picked up and the result was like being inside the UPC scanner at a supermarket.  Incredible.  I tried and failed to get a picture of it, but it was one of the more beautiful parts of the show.  4 songs, 3 mind-blowing moments.

I think the next song was Yoshimi Battles the Pink Robots Pt. 1. Wayne claimed this was his first time playing acoustic on stage.  Steven seemed surprised but confirmed this after the song.  I find it hard to believe but I guess it could be true.  It was sing-along, and Wayne claimed we screwed him up and he had to start over in the middle of the first verse.  From there, it was still sing-along but his vocals were much more prominent.  It was a great performance of a great song.  In the 2nd verse, Steven started echoing Wayne’s lyrics through a megaphone; it caught Wayne off guard and for a minute I thought he was going to get the giggles and have to stop singing.

From here, my chronological order is almost completely screwed up.  Everything I say past here could have happened in just about any order unless I specifically say “x happened, then y”.

Remember when I couldn’t decide if Vein of Stars or In the Morning of the Magicians was played?  The other one was played at some point.  At one point, I remember seeing Wayne grab a particularly large balloon (this one was more like 3 1/2 feet in diameter), place it on the stage, then lay on it to pop it.  It looked like it would have hurt to hit the stage after that!

An awesome song was played that I didn’t recognize, Wayne told the band “play ??? the Leaves!” before it.  In this song, he had a big cymbal he was hitting and naked lady made an appearance again; she hit a cymbal in the video in time with him.  This song was incredible and probably one of the best songs they played.  I think as this song wound down, the band started playing solos and Wayne left the stage and reappeared at the back of the mosh pit, where he put on these giant foam hands that I’d spotted early in the show and wondered what they were for.  They were LASER HANDS.  Lots of green lasers were emitted, and looked really awesome.  Apparently he had trouble getting them to work, and they promised him he’d get to make up for it with his “psychedelic light wheel”.  This was a gong surrounded by some kind of weird sparkly LED light thing that the warmup band also used but you haven’t read that yet.  The song was Pompeii am Götterdämmerung, the lights were tinted red, the video looked like lava raining down, and there was so much fog and strobes that sometimes I really couldn’t see the stage.

At some point, Wayne said the next song was one they said they’d play every show until “the stupid war started by George W. Bush” is over.  We got a speech about the virtues of peace, and while I’m conditioned to treat such things as “hippy stuff” everything said was heartfelt and true.  Then he played Taps (though it seems like the trumpet used played itself) and this was followed by The W.A.N.D. I’m not sure if he meant for Taps or The W.A.N.D. to be the song they stop playing, but it’d be a shame if they quit playing The W.A.N.D. so I guess I hope they meant Taps.

Waitin’ for a Superman is probably one of my least favorite TFL songs; I should write a post on why.  I knew they were going to play it because I heard the sound crew fiddling with it while I was in line.  Before they played it, Wayne talked about a Mark Linkous, a member of Sparklehorse who recently committed suicide.  Apparently Wayne and Mark were pretty close, because even from 50 yards away I could tell it was an emotional speech.  Waitin’ For a Superman was dedicated to Mark Linkous.  I could tell by Wayne’s face that this was the only song of the night that wasn’t played for the crowd; this song was played for Wayne.  I enjoyed Waitin’ for a Superman for Mark Linkous on this night.  Now the song has a powerful memory attached to it, and I think I’ll enjoy it more in the future.

I think The W.A.N.D. was the “last” song, though the encore is such a tradition I don’t think it really holds much meaning anymore.  The first encore song was She Don’t Use Jelly, and the video backdrop was the music video for the song.  It was great to see this in concert, though I’m not sure how much the band enjoys it:

Wayne: Hey Steven, you play this every night don’t you?

Steven: Yep.

It’s probably true.  That’s the shame about big hits; I imagine eventually the band gets tired of playing it.

The next encore song was incredible, but I don’t recognize it at all.  Wayne said the name of it, but what I heard was “???ted ??? the ?ex”.  I eventually decided it was either “Addicted to Sex” or “Convinced of the Hex”, but had never heard the song so I couldn’t tell which was right.  The song was really good.  Naked lady made her final appearance of the night for this one.

I think it was during that song that Wayne pulled out a leaf blower from who knows where that had one of the big balloons attached to it with confetti inside; he then proceeded to use the leaf blower to inflate the balloon bigger and bigger until it popped and sprayed confetti everywhere; this took more than a minute and the balloon was huge by the end.  Neat!

I was just thinking to myself, “Man, this was incredible, but it would have been even better if they played Do You Realize?”  Well, that was the final song of the night.  I knew what it was as soon as the countdown began, and the performance was incredible.  I think the confetti blasters ran for the entire song.  Wayne had confetti/streamer guns he shot into the audience.  A few last balloons made the rounds.  After the song was “finished”, the lights dimmed and the band played a slower, quieter version of the final chorus.  It was the perfect ending to an incredible show.

Set List

I didn’t tweet the set list for this concert like I did for the CAKE concert.  This is mostly because my phone’s battery was nearly dead and the phone was the only camera I had so I was saving it for that, but also because I couldn’t peel my eyes off the stage.  This forum post has a set list, and I don’t have any contest with it.  I’m not going back through this post and replacing “I don’t know what the song was” with songs from this list because everything above here is just a braindump of what I remember of the experience.  Anyway, here’s the set list according to someone else:

  • Worm Mountain
  • Silver Trembling Hands
  • Yeah Yeah Yeah Song
  • Vein of Stars
  • Yoshimi Battles the Pink Robots Pt. 1
  • In the Morning of the Magicians
  • See the Leaves
  • Pompeii
  • Waiting for a Superman
  • Taps
  • The WAND
  • She Don’t Use Jelly
  • Convinced of the Hex
  • Do You Realize

I feel like there’s one song missing from this list.  I rearranged in two places. I remember the video backdrop for In the Morning of the Magicians was not the starfield, it’s hard to describe what it was. The balloons were already popped when this song was played, so Vein of Stars had to come first because it’s when the balloons were popped.  The forums list had Taps, Waitin’ for a Superman, and The W.A.N.D. in the wrong order.

The Opinion

This was hands down the best concert I have ever attended, and is etched onto the list of things I will remember forever.  The Flaming Lips did everything in their power to get the audience involved in the show.  They seemed to really like playing in Austin, though that could be the normal artist flattering the audience chatter it felt genuine.  The set was at times overwhelming.  Their heavy use of the soundboard to recreate the studio sound takes some of the fun out of hearing a song live, but all of the things happening on stage more than make up for this.  Some bands play through their songs but you get kind of bored because they wear out their repertoire of tricks/props and start repeating stuff.  Every song in this show had a unique backdrop and lighting setup, and almost every song had some unique prop or behavior of the band that made you feel like the song was part of a bigger performance.  Tickets were $35 and I feel like I stole something.  I feel like I paid for tickets to watch a filming of America’s Funniest Home Videos and instead I got a performance of Cirque du Soleil; it’s hard to believe that you can get a show of this quality for that price.  I think every show I attend will be diminished after experiencing this.  This is why I wrote such a monster of a post; I’m sorry for how big it is but I am just so excited that I experienced this I couldn’t bring myself to leave any details out.

Are there songs I wish they played?  Yep.  I’m listining to my TFL playlist right now and I’ve heard at least 10 I wish I’d heard.  But I own 6 albums and they’ve made 13, not counting bonus tracks and collaborations; I think they’d collapse of fatigue if I could force them to play the kind of setlist I’d love to see.  These guys played for at least an hour and a half and covered some of the best songs from their last 3 studio releases, and I am positive that the next time they play I’ll see a completely different catalog of songs, and eventually I’ll probably hear most of my wish list.  I am most thankful that they played Do You Realize? in this show, because it’s the best contender for my favorite song.  Without that song, I think I would have been slightly disappointed.  Next concert I’ll have my fingers crossed for any of the following, in no particular order:

  • Are you a Hypnotist?
  • All We Have Is Now
  • It’s Summertime
  • Fight Test
  • Turn It On
  • Feeling Yourself Disintegrate
  • The Gash (Battle Hymn for the Wounded Mathematician)
  • The Sun
  • Hit Me Like You Did the First Time
  • Pretty much the entire Clouds Taste Metallic album
  • My Cosmic Autumn Rebellion (The Inner Life as Blazing Shield of Defiance and Optimism as Celestial Spear of Action)

That’s  enough for the set list to more than two shows, so I suppose I’ll just have to visit a few dozen more concerts and hope I catch a lot of them.

If you have the chance to see The Flaming Lips, take it.  If you don’t, one day you will look back on your life and notice that it feels like there’s something you missed.  That’s the hole in your experience left by not attending the concert.

What does a software engineer do?

It is not uncommon for me to find myself in a social situation where someone asks me what I do.  When I state, “I’m a software engineer,” the conversation dries up pretty quickly.  My guess?  People ask what you do in an attempt to find something they might have in common with you.  Many of the people I meet aren’t software engineers, and it’s a field that definitely has an aura of mystery around it.  I might as well say I’m a mime for the reactions I get.  People are taught that it’s hard or the domain of geeks. It is the domain of geeks, but most of us know well enough not to start babbling about software design to people who aren’t interested.  Talk to us about movies, or TV shows, or explain what you do at your job.  Often, software engineers are curious and excited to learn about the intricacies of other fields.  Knowledge, particularly uncommon or obscure knowledge, can be a very powerful tool for software engineers.

Anyway, that doesn’t help explain what a software engineer does.   “Software engineer” is roughly interchangeable with “software developer” or “programmer” in my opinion; I might use any of these terms accidentally but they all mean the same thing to me (this will cause some friction with other software engineers, but it’s a good simplification.)  What I do is the same thing that any other engineer does, and it can be described thus:

I solve problems for my client, and ensure that my solution meets all of the constraints in which the client requires the solution to operate.

That’s a beautiful definition to me.  It’s indecipherable to non-engineers.  Let’s talk about what it means.

Solving Problems

This is pretty self-evident.  Programs are created to solve problems.  Microsoft Word exists because people want to write letters, reports, books, and a myriad of other document types.  Microsoft’s engineers solved this problem by developing Microsoft Word.  The specifics of the problems I solve aren’t important.  Software engineers satisfy whatever needs the client expresses.

Good software engineers have a special talent for describing problems in very discrete steps.  Think about giving directions to someone.  You could tell them, “It’s 10 miles away at a heading of 210 degrees", but that won’t help them.  What they want is, “Follow this road until you reach a 4-way stop sign.  Take a left onto Oak Street.  Follow that for 5 miles, if you see a McDonald’s you’ve gone too far…”  So, too, must software engineers find a way to express a problem in very simple terms.  Computers aren’t as smart as you may believe; you can’t tell a computer to fix a cup of coffee.  You have to tell it to walk to this drawer, open the drawer, remove a filter, then close the drawer, and so on.  Good software engineers can break complicated problems down to these tiny steps, then get the computer to follow the steps.

It’s not all simple.  Here’s a variation of a famous problem in Computer Science:

A salesman needs to visit 10 cities on a sales trip.  He has to start from Boulder, Colorado and end the trip there as well.  Given a timetable of flights to and from each city over the next few months, determine the flights the salesman should take to spend the least amount of time on his sales trip.

This is called the Traveling Salesman Problem.  For more than 30 years, we have tried to find a way to break this into simple, efficient steps that will yield the best solution in the shortest amount of time.  For 30 years, the answer has been, “You must try every combination of flights and compare the time it takes.”  This can take a long time.  If there’s 10 cities and 8 candidate flights between each city, there’s more than a billion possible solutions (my calculation may be wrong, it’s quite late for statistical analysis!  If it is wrong, it is too small).  Add an 11th city and there’s 8 billion solutions.  In the real world, the trip would likely involve more than 20 cities and hundreds of flights between each city.  It can quickly approach a point where if the computer tests 1,000 paths per second it will take so long to finish the calculation that the salesman will have died aeons ago and the sun has fizzled out.  So software written for this task tries a few thousand trips and picks the best one out of that.  It’s not the best solution, but at least it’s a solution.  Part of a software engineer’s job is recognizing hard problems like this and explaining to the client why they cannot be solved perfectly.  The software engineer that finds a way to solve any of these problems in a practical amount of time will become very famous in the community.  In fact, there’s a list of 7 of these problems known as the “Millennium Problems” that carry a $1 million bounty.  It’s been 10 years since the bounty was posted, and none have been claimed.  Not all are related to software engineering directly, but a solution to many of them would turn modern mathematics inside out and thus have a dramatic effect on software engineering.

Meeting Constraints

This is one where I could ramble on for hours, and this post is already longer than I want.  The client never wants any old solution to a problem.  Usually the client needs it to be fast, small, accurate, bulletproof, or any number of other things.  Would Microsoft Word be so popular if it used 3 Terabytes of storage (as of today that’s multiple hard drives)?  Would Youtube be a success if videos took 9 hours to download?  Would Facebook be popular if every page took 15 minutes to load?  What if MSN messenger took so much memory it was the only program you could run?  Now you have a concept of the kinds of constraints software engineers have to respect.  It’s not enough to just solve a problem, I have to make sure that the solution satisfies whatever constraints the customer wants. 

Those are the externally visible constraints; the user sees them.  There’s also constraints the user won’t ever see, but still matter to the software engineer.  These have to do with how the code is written.  These constraints include complexity, quality, communication, effort, budget, and time.  These constraints are also very related to each other, and satisfying one usually means sacrificing another.  For example, code complexity makes it harder for developers to understand what they are doing.  Complicated code decreases quality, makes communication more difficult, increases effort, and can increase budget and time.  However, fixing complicated code takes a lot of effort.  When a project is over budget or running late, quality and complexity usually suffer.  But when you increase complexity and decrease quality, you tend to have more bugs and spend more time fixing them.  We call this a tension between the constraints because when you work on one, it has effects on another as if they were connected by a rope.  I suppose you could call it a tradeoff as well; that fits.  Good software engineers understand dozens of these constraints and strive to reach the best balance among them while staying within time and budget.

That, in a nutshell, is what a software engineer does.  Software engineers solve problems, but ensure that the solutions are satisfactory.  It’s not magic, it’s a rigid scientific approach to describing solutions to problems.  In the next post, I’m going to talk about some quirks software engineers tend to share and some myths surrounding software engineers.

On New Year’s Resolutions

So I’ve already missed one of my resolutions multiple times.  That resolution was “blog about something once a week.”  The biggest problem I have is I wait to blog until I have something epic to talk about; I need to work on producing smaller posts about interesting topics.  No one wants to read a blog with 4 posts/year.

I need a better WordPress theme, and I need to spend some time learning how to customize WordPress better.  I really don’t like how it’s tough to get from my landing page to the blog, and it’d be nice to have a login link somewhere.  There’s a couple of books that look promising; I hope they don’t prove to be cruddy.  It’s a shame that libraries don’t carry relatively recent computer books, but it’s not like they’re rolling in dough.  Funny that there’s always money for rockets and prisons but we can’t fund education or healthcare.

This looks like week 9, so maybe I’ll meet my goal for the rest of the year.  Here’s a couple of extra resolutions for the heck of it:

  • Maintain my current weight; stay under 150 pounds.
  • Lower my triglyceride count; it’s still > 900 which is horrible.

Hopefully I’ll do better about meeting those two resolutions than this one. 

For some reason Windows Live Writer’s bullet lists are broken.  Hooray!

I have broken my body, and now I must repair it.

Let’s talk about what’s been going on inside my body on an average day for the past few years.

I started the day with whatever breakfast I felt like.  Sometimes it would be leftovers, but I’ll pick “kolache day” as a representative sample.  On these days (twice a week) I’d stop by Kolache Factory on the way to work and pick up two delicious bacon and cheese kolaches around 8:30 AM.  This is a somewhat sweet bread roll stuffed with bacon and cheese.  When this hit my stomach, the process of converting that bread roll to sugar started.  It was slowed somewhat by the fats, but we aren’t talking healthy fats here (I can’t find information about what kinds of fats the kolache contained; I’ll just assume the bacon and cheese contributed a good bit of saturated fat.)  The carbs were quickly converted to sugar.  This caused an increase in blood glucose, which caused my pancreas to increase blood insulin.  This didn’t affect me much because lunch was usually at 11 or 11:30.

At lunch, my “I don’t like what’s in the cafeteria” food was a bacon cheeseburger on a wheat bun with tater tots.  Let’s talk about what this did to my body.  The bun, though it is “healthy” wheat, is made from enriched flour which is quickly converted to sugars.  The cheese and meat contain saturated fats.  The tater tots are a one-two punch: finely chopped potatoes are digested into sugar very quickly and the oil is unlikely to use unsaturated fats.  Bacon, as usual, doesn’t contribute much.  I washed it all down with a sweetened tea; I like tons of sugar so we’ll say it’s probably 1 cup of sugar per 2 quarts.  Despite the fat content of the food, the volume of carbohydrates I dumped into my stomach resulted in a huge blood glucose spike.  This caused the pancreas to produce a higher volume of insulin.  At this point let’s diverge to an analogy.

I’m bad at cooking bacon, but it’s because I’m not patient enough to use the tools I have.  I use thick cookware; either cast iron or cast aluminum.  This cookware takes a while to preheat.  I tend to get impatient and start putting the bacon in the pan before the cookware has matched the heat of my pitiful electric stove.  When I don’t hear that satisfying sizzle, I turn the heat up on the stove.  Eventually, the cookware reaches the temperature that the original heat setting would have caused.  This produces the sizzling effect I want and I assume the pot is the appropriate heat.  A couple of minutes later, the pot reaches the actual temperature I have set my stove to, and before I have time to react the bacon is overcooked.

This is what happened in my body every day at lunch.  I dumped a ton of easy-to-digest carbohydrates into my stomach, which resulted in rapid conversion to sugars.  The glucose in my blood is like the bacon in the pan.  My pancreas is in charge of making sure that there’s enough insulin to process the sugar in the bloodstream; it’s like me watching the bacon to make sure it cooks.  My pancreas noticed blood glucose spiking (the bacon isn’t sizzling) so it produced more insulin (the heat gets increased.)  The insulin did whatever it does and brought my blood glucose down (the pot reaches the right temperature and the bacon sizzles.)  But there was too much insulin!  Soon, blood glucose crashed beneath the threshold desired by my brain (the bacon overcooks.)  Since my brain knows it can’t manufacture glucose without fuel, this translated into hunger and a craving for something with easy-to-digest carbohydrates.

Now we’re at 3:00.  My lunchtime dose of carbs guaranteed I’d be short on energy within a few hours; the rapid spike and decline of glucose caused me to reach for the vending machines.  Sometimes I did “good” and ate a banana.  However, that just caused another spike/crash cycle that I didn’t notice because the crash coincided with supper.  My suppertime habits were more varied than breakfast and lunchtime, but I still favored easily-digestible carbs.  I generally ignored bedtime cravings because I knew it wasn’t good to eat before bed.

I was putting my body down a dangerous path.  I wasn’t aware of it, but I was creating a situation similar to diabetes. The rapid intake of carbohydrates led to dangerous levels of glucose, which led to dangerous levels of insulin, which led to cravings for more carbohydrates.  All this time, I didn’t need the carbohydrates and most of this energy was being stored as fat in my midsection.

The Intervention

Last month my employer required a cholesterol screening; it helps satisfy the insurance companies. Glucose? Perfect. Blood pressure? Great! Pulse? Perfect.  Good cholesterol?  Low.  Bad cholesterol?  Not measurable due to other factors.  Triglycerides?  944.

A normal triglyceride count is somewhere between 100 and 200.  Anything greater than 400 is considered high risk for stroke or heart attacks.  1,000 or greater is a guarantee that you will eventually develop pancreatitis; I don’t know what it is but I know for sure if my pancreas regulates glucose I do not want it to be ruined. 944 is my triglyceride count after 10 hours of fasting.  I know that my “normal” count is probably much higher.  It doesn’t take a decade of study to decide that this is an unsustainable state for my body.

The Resolution

My physician wants to do some other screenings, but for the time being has advised me to perform 40 minutes of exercise 4 times per week and consider the South Beach diet.  I’m currently preparing for Phase 1 of South Beach.  In this phase, carbs are very carefully regulated and must only come from hard-to-digest sources.  Years of the carbs-glucose-insulin-crash cycle has made my body respond to glucose poorly; Phase 1 is designed to correct this by completely removing the cycle.  I’m not starting yet, but I am trying some of the foods to make sure I’ve picked things I’ll like eating.  Let’s talk about how today is different than usual.

I started the day with a trip to the treadmill.  I walked on “rolling hills” for 40 minutes and burned 200 calories.  More important: my heart rate was elevated, I required deep breaths, and my body was under stress.  This will increase the efficiency of my heart and lungs.  This will increase my muscle density, which increases the amount of calories I burn at rest (important, since I have a very sedentary job.)  I went back home and fixed a 2-egg omelet with a small amount of diced peppers and a slice of turkey bacon cooked in olive oil (I was patient and let the cookware preheat for 10 minutes!) This provided practically no carbohydrates (a few grams from the green pepper) and an abundance of unsaturated fat from the egg and oil.  Presumably, my free-range eggs contain Omega 3, which is important for controlling triglycerides.  The turkey bacon is 97% fat free; it might contain a little bit of saturated fat but its effect is negligible considering how much less it contains than pork bacon.  There’s cholesterol in the eggs, but from what I’ve read in the South Beach diet book it’s not much to worry about: there’s as much good cholesterol as bad.  I might swap an egg substitute for real eggs later, but I think the possibility of getting Omega 3 from the eggs might be worth it.  I’ll have to ask.

Since breakfast didn’t produce many carbs, I got listless around 10:30.  So I ate a light mozzerella cheese stick.  This put a little bit of fat along with protein in my belly; both take a while to digest and neither has a big impact on blood glucose.  My hunger was satisfied and I did not produce more insulin; it’s a win.

Lunch was a salad: romaine, baby spinach, ham cubes, half a boiled egg, a teaspoon of bacon bits, and 4 croutons.  The 4 croutons are probably the biggest worry but my hope is that the fat from the ham and fiber from the lettuce and spinach will regulate the digestion. I also doubt 4 croutons is a serious amount of carbs; a quick search turns up 4g for 2 tbsp, which means I probably ended up with 1 or 2g of bad carbs.  Not bad, considering my wheat bun, tater tots, and sweet tea added up to roughly 90g; that’s more than a 90% decease in intake.  I washed this down with an unsweetened tea; the caffeine may increase my appetite later but I cannot make it through an afternoon without it.

I’m looking forward to an afternoon snack consisting of some nut mix my wife and I made last night.  Again, it’s fatty, but it’s unsaturated fat.  The fat content ensures I’ll fill up before I eat too many.  Nut carbs mainly come from dietary fiber, which is digested slowly and do not produce the dangerous cycle that quickly digested carbs contribute to. The walnuts are a source of omega-3; this makes them something I need to consider frequently.

I don’t know what supper’s going to be tonight, but I’m going to be more careful than I have in the past.  Since I haven’t really started phase 1 I haven’t communicated the kinds of meals I need to my wife yet, so I can’t expect results to be much different.  Soon, we’re going to try out a few phase 1 recipes to get a feel for what they’re like and which ones taste good.  Once we’ve got enough variety to last the 2 weeks of phase 1, I’ll be well on my way.

My body is broken, and its my fault.  I can fix it, and it’s going to take a while, but the longer I delay this the harder it will be and the more likely I’ll develop a condition that makes it impossible to live normally.

I Joined a Project for Fun

User ident on the XVBT forums asked for some comments and suggestions about his project.  I took a look at it and decided the number of comments sans explanation of fixes would exceed the size of a post, so I asked if I could join the project and make some lessons out of refactoring it.

The project itself is a neat little tool for automating ImageShack uploads.  On the outside, it looks pretty slick.  After inspecting the code, I have a bad feeling that it doesn’t work anywhere near as slick as it looks, but that’s why I’m here.  The application is an almost perfect example of what WinForms development does to suppress good software design practices.  In this ~3,000 line application, 2,600 of the lines are in ClientForm, the main form of the application.  This form is responsible not only for UI interaction, but all of the application logic.  There’s many other errors that are more related to what happens when a novice writes a large application than what WinForms inflicts upon you: dozens of unused methods, huge areas of commented-out code, no consistent naming conventions, etc. There’s at least a wrapper for the ImageShack API, but I haven’t peeked inside of that yet to see if it needs some work as well.  It looks like it was lifted from a blog by a man named Bryce Thomas, then converted from C# to VB.  I’m not sure if any attribution is currently given; if not I’m going to fix that.

The code for the client itself is not under any particular license, but does happen to have this notice at the top of each file:

' DX Coders
' Copyright 2001-2009 Simple Coders
' All Rights Reserved 
' Created: 09/06/09                                   *
' Author: Johnson

' NOTICE:  DX permits you to use, modify, and 
' distribute this file in any way.   
' DX takes no responsibility on how you use 
' this code. It is strictly for learning purposes
' and is not designed to cause harm. If you decide
' to reuse this code please give credit where credit is due.

I have entertained the notion that the developer(s) (there is a mysterious second developer involved that I’ve never met) are planning to have me clean up their application for free, then cut off my access to the project and sell it.  I would be disappointed if this happens, but I decided that the experience of reworking an application from a mess into something polished is something I need more than defense against my hobby work benefiting someone else.  The comments above mean that, should they excommunicate me from the project I have no qualms about releasing the source code and promoting the project as a fork under a very permissive copyleft license.

I have one concern at this point.  The code looks like it’s either a mishmash of examples gathered from various forums or the result of running a C# to VB .NET converter on a pre-existing project.  Indeed, one of the more questionable bits of code is admitted to be the result of running a converter on some C# example code.  If you have written an ImageShack upload client and this one looks familiar, please contact me with proof.  I will not work on a project that was ripped off.

As I work on refactoring, I’m going to make posts that detail why I did what I did.  I’m going to cross-post these onto the blog.  I’d normally do them *only* on the blog, but I don’t want to undermine XVBT’s policies by taking discussion of a user problem offsite.  I’m already skirting the edge by taking on a full project.

UI Control Naming Conventions

Microsoft was kind enough to publish a set of design guidelines for developing class libraries, and I use the book Framework Design Guidelines that is based on them daily. This has settled many disputes over the conventions our team should follow, and it’s the basis of many suggestions I make on the XVBT forums. The guidelines help lay out the practices that the .NET Framework team tries to adhere to when designing types. If everyone adheres to the guidelines, then the entirety of the .NET ecosystem will be consistent and usability will increase.

The guidelines have an odd position in the documentation. I find that most of MSDN and Microsoft’s other efforts are focused on helping the application developer. Contrary to this position, the design guidelines are focused on developers of class libraries that will be used by other developers. This is what I do, so it’s great for my demographic to get some love. However, the lack of focus on application development means there’s some important guidelines that aren’t there.

Chapter 3 of the books involves naming guidelines; you can follow along sans commentary online. The chapter discusses capitalization conventions and how to name every aspect of your code from variables to interfaces to DLLs. One omission that would be useful for application developers is guidelines for naming controls in applications.  I’ve experimented with 3 approaches, and each has its disadvantages.

1. Hungarian Notation

If this is established as the guideline, Hungarian notation is used for each control. That is, a text box for name input becomes txtName and a list view for displaying songs becomes lvSongs. Optionally, a leading underscore might be used, but I tend away from it when using this convention.

One benefit of this notation is familiarity. VB6 developers in particular favor this approach because it follows the generally agreed-upon conventions used in that language.  Another benefit is an increase in understandability.  When you see txtName, it is clear that this is a text box that represents a name.

One drawback is the naming guidelines use a strong DO NOT guideline to condemn Hungarian notation.  Nothing else in .NET uses Hungarian notation. This makes applications that follow the notation seem like they stick out a little. Another drawback is the notations aren’t really standardized. Most people agree on txt for TextBox and lv for ListView because these controls have been around forever, but newer controls like TableLayoutPanel and Grid don’t have agreed-upon prefixes. Also, how do you decide what to use for custom controls, UserControls, and third-party controls? One more drawback is this notation makes code brittle to change. Maybe your prototype starts with a TextBox but later you switch it to a NumericUpDown. This means you not only have to change the control and any logic that worked with it, but you also have to hunt down all references to the variable and rename it. (I admit I’m a relative newbie to Presentation Model patterns and it could be that this is less of a concern in those since the form would likely expose the control as a typed property, but I think it’s still applicable.)

To me, the drawbacks seem to outweigh the benefits. However, this is the convention I learned when I started in VB .NET many years ago, so I find it most comfortable and no matter how many arguments against it I hear, it’s the one I use.

2. Suffixes

When following this guideline, you pick a descriptive name and suffix it with the type of control. Use of camelCase or PascalCase is disputed, but generally I see PascalCase used more prominently with this technique. Using the examples from above, we’d use NameTextBox and SongsListView.

This has practically the same benefits and drawbacks as Hungarian Notation. You’re still identifying the type of control alongside the purpose, and it’s still clear from the variable name what kind of control is at work. This is technically a form of Hungarian notation, so still falls afoul of the DO NOT guideline. The problem with standardized prefixes is eliminated: since you use the full type name there’s no need for agreement. This technique is still brittle if you change controls.

Personally, I find that this convention clashes with how I think about the UI and makes it harder for me to find the variable, but this is probably because I’ve used Hungarian notation for years. I’ve tried following this guideline, but I find that more often than not I forget if I chose ItemCount or NumberOfItems as the prefix, and knowing the suffix doesn’t help me find it. Perhaps my naming discipline is poor, but it just doesn’t work for me.

3. Plain Old Variable Names

When following this guideline, you pick a descriptive name for the control and use that. There’s dispute over casing and usage of a leading underscore, but I find that two camps are the most prominent: PascalCase and _camelCase. Using our example controls, we would use Name and Songs or _name and _songs.

There are a few benefits to this approach.  One benefit is you aren’t using Hungarian notation so you aren’t falling afoul of any DO NOT guidelines. Another benefit is the code is no longer brittle if you change the control type.

Despite the benefits, there are many drawbacks to this approach no matter what casing convention is followed. If we’re writing a custom control or a custom UserControl that needs a text box for a name, then Name is already taken by Control.Name and we’ll have to pick a different name like PersonName. This can lead to accidental use of Name when you meant PersonName, and since you aren’t using the first name that came to mind you’re going to spend a lot of time trying to remember what your 2nd choice was. In addition, this casing convention is used for properties and constants, so if you have many of those your controls will be buried among them in Intellisense. This is why many people use the _camelCase convention, but since this is a very common convention for private fields it’s not much better.  Is _songs the control that represents the songs or a collection of songs? If you’ve got 20 properties with backing fields and 5 controls on the form, you have to wade through 25 entries if you can’t quite remember the correct name. _camelCase also looks particularly heinous when used as the x:Name attribute in XAML.

I find I am always dissatisfied when I use this convention.  If I use PascalCase then I almost always get the controls mixed up with constants. Even more often, the control name clashes with a property that I want to have and I end up having to pick a worse name for the control.  Then, I can’t remember the name I picked.  If I use _camelCase then the controls are buried among property backing fields, and name clashes still happen.  If _songs is the control that represents a list of songs and I want a Songs property, what do I do for the backing field? (There’s a few answers that involve generating the property value in different places, but most of them wouldn’t occur to a novice.) No matter how I try to follow this convention, I don’t like it.

I’m sure there’s other approaches I haven’t thought of, but these are the three I’ve tried. All of them have drawbacks that seem to outweigh the benefits, but I side with Hungarian notation out of familiarity. If there were guidelines to follow, I’d settle on the method they suggest, but there are none so I have a hard time deciding if I’m right.  What do *you* do?

Documenting SyntaxHighlighter so they don’t have to

I upgraded to the new SyntaxHighlighter today in preparation for a couple of posts that hopefully I’ll make by the end of the month. (Topics: explaining and condemning default instances (VB .NET “feature”), a neat discussion of SRP that was generated from an XVBT post, and a possible series on creating design-time experiences for WPF controls.) My installation experience was less than desirable.

There is no documentation for installation on the SyntaxHighlighter wiki, or if there is documentation it’s not linked from the main page. There’s barely documentation for the features as well. There’s four or five “look what I can do” pages that demonstrate its features, but no pages that tell you how you can do these fancy things too. There’s some cool features, but the only way I can figure out how to make them work is to dive into the JS myself. Lame. For example, on the demo page there’s a demonstration of highlighting lines; what’s the syntax for this? Also, what’s the “html-script” attribute do? How am I supposed to find it.

Anyway, here’s how to install SyntaxHighlighter based on my experience:

  1. Copy the scripts, styles, and src directories to a location on your server. (Maybe src isn’t required; I included it just in case.)
  2. On the page that you want to highlight code, make sure to import brushes, import styles, and call the magic code that does the work. For example, if you want to highlight some C# code, your page header needs to include:
    <script type="text/javascript" src="scripts/shCore.js"></script>
    <script type="text/javascript" src="scripts/shBrushCSharp.js"></script>
    <link type="text/css" rel="stylesheet" href="styles/shCore.css"/>
    <link type="text/css" rel="stylesheet" href="styles/shThemeDefault.css"/>
    <script type="text/javascript">
        SyntaxHighlighter.config.clipboardSwf = 'scripts/clipboard.swf';

    Do not load anything before shCore.js, or you will get errors.

  3. That’s all I would have needed to have an effortless install of SyntaxHighlighter; it’s a shame the documentation isn’t there. Before you get all “it’s a wiki: do it yourself” high-and-mighty on me, go try to add it yourself. You can’t. The leaf pages of the wiki are editable, but I can’t seem to find a way to edit the main page. Perhaps there’s a way to add a new page, but there’s no way to enumerate the pages on that wiki so without a link from the main page any new “Installation” page is going to be invisible. So I would, but I can’t. Hopefully, someone will eventually create an installation page so silly people like me don’t have to spend 20 minutes discovering that the order of the brushes really matters. Or maybe it’ll never happen and this page will be the only documentation for it. Who knows.

Trending Topics Aren’t the Problem

Shel Israel says Twitter’s trending topics aren’t useful. For the most part, I agree. I’ve been watching people game trending topics for months; sometimes to the extent that I expect “trending topic” or “trend” to become a trending topic instead of the target phrase.

But I disagree with Shel’s views that trending topics are the reason why Twitter is of decreasing utility:

But Trending Topics, has become all-too-often a list cluttered and dominated by banalities, contests and silliness that is of no interest or use to a great many people, particularly those of us who use Twitter for business, or to learn about events in the world; nor is not useful for actually meeting new people with whom you share common interests.

I think it’s a little early to declare Twitter useless for networking and business, but it’s getting there. Trending topics aren’t the problem though. Sure, trending topics are less useful these days because you see more #ohnoyoudiint than #iranelection but this is a symptom, not a cause.

The reason Twitter is of diminishing utility and will eventually be worthless is because the general populace is becoming interested. When Twitter was small, its users mainly consisted of social media and programming nerds who recognized its potential as a networking tool. This group of people was most interested in discussion about their niche interests, and Twitter helped bring them together. (I might add that IRC did this long ago, but I will concede that IRC is much less discoverable since you have to find a server and a channel, and there’s fragmentation.) The dream of this group of people was to bring Twitter to the masses, so that everyone could benefit from the wisdom of authorities in their fields.

This is where reality hits hard. There are many individuals that are passionate enough about topics to make it both their career and their hobby. However, “many” in this case is a minority compared to the general population. Most people aren’t passionate about their job, and don’t really care to be. These people want to come home and escape; they want to talk about celebrities, TV shows, and anything else that’s only useful for entertainment value. This is your majority, and when they come to Twitter they’re not interested in talking about Twitter killing newspapers or which framework you can use to write Sprawling Business App 2.0; they want to talk about the guy on Comedy Central or American Idol.

I don’t think Shel is ignorant of this pattern, in fact he states that it happens without making the point I’m making:

This may seem like a trivial topic, but it is not. There was a time when thinkers had great vision for television. NBC pioneer David Sarnoff envisioned bringing opera and symphony into America’s living rooms. News pioneer Edward R. Murrow thought that the distribution of news on television would level abuses by tyrants and corrupt public officials. Educators dreamed of using television to educate the masses.

And we ended up with American Idol.

But yet, it still seems like he’s missing something:

Twitter is the fastest growing computer-based technology in history. There is no end to that growth trend in site. It has the potential of letting each of us find others who share our interests and passions without intermediation by bosses, government, advertisers or anyone.

Is this not what the pioneers of television probably said to themselves? “This technology has limitless potential for enriching the lives of all humanity. People will use this to improve their lives.” Joe Public didn’t care about opera and symphony: centuries of conditioning programmed him to believe these are frilly things to be enjoyed by the rich (good job, aristocracy!) People who had invested their wealth in television were forced to provide programming that people would watch, which led us astray from the initial vision. The same thing happened with Facebook. The early adopters were mostly college students interested in social media, since you had to be a student to sign up in the first place. The potential for communication was realized, and people decided that everyone should have access. Joe Public saw that he could use Facebook to tell his friends what bar he’s at, and never looked farther. It’s the same with Twitter: social media people see an invaluable tool for connecting yourself to people with great ideas, but the populace sees a tool for finding people that like the same kind of parties as you.

This pattern seems as if it will repeat forever. The solution is to keep these tools secret and closed only to those who value the personal connections, but this is analogous to the old aristocracy protecting the secrets of reading and writing from the masses. The populace ruins social media, but deserves the chance to use it for their personal enrichment. Trending topics are not the problem.  The problem is that most people don’t care about enriching their life, and this causes trending topics to be useless.

Ordering of numeric conditional tests

I’m reading Code Complete and something caught my eye in chapter 19. At first I wanted to argue with it, but the more I thought about it the more I liked it.

The idea concerns the situation where you need to test if a variable satisfies an inequality, for example, if you need to know if min < n < max. I’ve always done it like this:

if (x > min) && (x < max)
// -or-
if (x < lower) || (x > higher)

I did it this way because I liked having the comparison variable on the left and the constant on the right. McConnell suggested that the organization should look more like the inequality:

if (min < x) && (x < max)
// -or-
if (x < lower) || (higher < x)

I initially rebelled against this part of the chapter simply because it was not what I liked, but the more I think about it the more I like it. Almost every time I have to code an inequality like this I make a mistake, and I always write extra tests for these cases. I think if I start writing the conditions this way, I can increase the probability that I’ll get it right the first time.

Using a TextBox as an Adorner

I was fooling around with an adorner in a test project and decided to use a TextBox instead of a ComboBox for convenience.  Unfortunately, I found I couldn’t type into the TextBox.  According to Jim Nakashima, this can be addressed by setting the AdornerPanel.IsContentFocusable property, and he’s right.

I am bothered by the “bug” that sends “Delete” input to the designer instead of the TextBox.  I don’t call this a bug, I call it a showstopper.  Oh well, I guess I’ll be able to use TextBox controls in my adorners when we are able to drop VS 2008 support in 5 or 6 years.