ASP.NET Core middleware to measure request processing time

posted by Jeff | Monday, May 30, 2016, 11:37 AM | comments: 0

One of the things that ASP.NET Core promises is a faster, streamlined processing pipeline. Naturally, you start to wonder how fast your pages render before being spit out into the tubes. With the fantastic ability to chain middleware in the pipeline (think HttpModules and HttpHandlers, only without the bazillion events), it's super easy to wrap most of the processing in a timer.

In high level terms, a request comes into the app and it is then "seen" by whatever middleware you have configured in the Startup class. If you've fired up a new project, you've already seen some of the included middleware configured in the Configure method using extension methods like app.UseMvc(), for example. These helper methods are likely calling something like app.UseMiddleware<T>(), where T is some type that includes an Invoke() method to do stuff, and a delegate to hand off processing to the next middleware. (This is all well documented, so I won't get deep here.)

It makes sense, then, that you can create your own middleware, and register it first in Configure to capture the time it takes for the entire process. Even better, you can do it inline without having to create a class for this simple output. It goes like this in the Startup class:

public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
	app.Use(async (context, next) =>
	{
		var sw = new Stopwatch();
		sw.Start();
		await next.Invoke();
		sw.Stop();
		await context.Response.WriteAsync(String.Format("<!-- {0} ms -->", sw.ElapsedMilliseconds));
	});

	// all the other middlware configured here, including UseStaticFiles() and UseMvc()

Hopefully that's straight forward. Each middleware calls the next, so while they execute in order up until they reach those next calls, they execute in reverse order after that for any code that falls after the next call in each middleware. The important part here is that it injects a comment at the end of the stream with the number of milliseconds it took to execute the rest of the middleware pipeline, which likely includes all of the MVC bits. So with that in mind, a few caveats:

  • This is not well tested. I can see it write out some (really fast) execution times on pages, but I'm not aware of any unintended consequences.
  • I would rather write to the headers collection, but unfortunately it's read-only by the time the last line fires. I'm sure someone more clever than me can figure out a way to do this.
  • I'm not sure what the consequences of doing this are on non-HTML output. I don't see the time being appended to static files, for example, but I'm not sure what it does to images that are streamed out from the MVC framework, for example (i.e., images taken from a database blob and written out from an action method).
  • This doesn't measure whatever overhead is involved in creating and managing the pipeline itself. I haven't looked very deeply into this to know what's going on, but as the point for ASP.NET Core is to ditch a lot of the crusties that came with old ASP.NET, I imagine it's not significant.

Have fun, and if you have ideas about how to improve this, do let me know!


Comments back, running the ASP.NET Core RC2 bits

posted by Jeff | Monday, May 30, 2016, 12:48 AM | comments: 0

I finally got around to updating my blog app to ASP.NET Core RC2, which is to say I spent a lot of time on it because it's so different than RC1. The tooling isn't great yet, and I encountered new weirdness with Entity Framework Core, plus deployment issues. I'm sure there will be blog posts about it all eventually, and a lot of opinions about how the brave new world of .NET as OSS hasn't exactly been a great experience. I see the vision, but it has been rough.

That said, RC2 means the bug I had before is gone, where the CAPTCHA on comments broke because the framework couldn't read your IP address. People don't comment on the blog itself much anyway (usually it's just friends on Facebook), but it works again.


The female celebrities of Instagram

posted by Jeff | Saturday, May 28, 2016, 8:05 PM | comments: 0

I used to make jokes about Instagram, calling it "Instapoopy," because the version they had for Windows Phone back in the day was crap. But a friend of mine at work made a very good point about the service in terms of why he liked it. "It's not really about politics or anything, it's just people sharing moment with pictures." When I switched to a Nexus Android phone, I kind of got what he was talking about, and for whatever reason, Instagram suggested a lot of celebrities to follow in things that I was already familiar with. Mind you, social media isn't exactly real life, but what's great about these women is that they present a life that's far more normal and humble than you would expect.

  • For example, there was Sutton Foster, of Younger fame, and of course a great many Broadway shows. She's the triple threat, kind of dorky, and my age. Her humility despite her fame is interesting.
  • Foster's co-star, Hilary Duff, presents a surprisingly normal life, as a parent.
  • Olivia Wilde is already going beyond being pretty, and she's doing indie films, charity work, producing, being a parent with Jason Sudeikis.
  • Jaclyn is a woman from Suicide Girls with tattoos and dual-noserings who posts some naked photos from time to time, and is sort of a micro-celebrity, but she's interesting because she posts photos from motorcycle trips all over the west.
  • Ariel Winter is the younger daughter from the show Modern Family, and she's been in the press for divorcing her emotionally abusive mother and getting a breast reduction and letting her scars show in the red carpet. Most recently she posted prom photos. Imagine being 18 and living in a Hollywood world.
  • My favorite might be Daisy Ridley, who went from being mostly unknown to a core figure in the Star Wars universe. She puts a sense of humility and respect on display, fascinated with the world she has been thrust in to. I only hope she stays humble in light of the unprecedented fame she's acquired.

Why refusing to hear opposing view points makes you suck

posted by Jeff | Wednesday, May 25, 2016, 3:30 PM | comments: 0

When I was in college, there was a gentleman named Larry Simpson, who was appointed the director of multicultural affairs. My understanding is that he passed away from a brain tumor some years after I graduated, and that's sad, but I remember many of my conversations with him very vividly.

Ashland University was, as you might expect, a fairly conservative place in terms of its politics, and its political science department in particular, despite constant denial, was extremely right leaning. Larry was heavily involved in residence life (I was an RA for two years), so as part of our training, it wasn't unusual to have him speak to us. What was interesting, however, was that he was the first black Republican I had ever met. Even in the early 90's, the party wasn't exactly inclusive. Imagine my surprise (not to mention that of the minorities in the res life staff) when Larry told us that he though affirmative action was wrong and unnecessary. His argument against it was sound and logical, and the only reason I could rationally disagree with him was that his argument was predicated on ideal conditions. (Sidebar: This tends to be why I can't fully back ideologies from either extreme... they make too many assumptions about context.)

Larry took his share of shit from others. One of the black residents on my floor candidly told me that he thought Larry was a "sellout." Honestly, that statement made me really uncomfortable at first, because I liked Larry even if I disagreed with him, but the resident had a very different perspective about racial identity and social classes. His family struggled in poverty, and it was ultimately a wrestling scholarship that brought him to the university. Having originally grown up in an inner-city neighborhood, not really seeing color, and not really knowing how rough it probably was at the time, this was likely the first time that I realized that race wasn't the only issue that challenged people, but also social class and economic status. Indeed, our perspectives are very heavily influenced with our experiences. If Larry's story was vastly different (it was), then it makes sense that his perspective would be different. Race alone did not define his experience.

And that brings me to Oberlin College, just 35 miles to the north. It was a school even then where, as Larry put it, "Their minds are so open there that their brains might fall out." A feature written in The New Yorker (if you can get beyond its pretentiousness and ridiculous writing style guide) talks about the activism on-campus for... something "better." The truth is that I don't entirely get what it is that the students are after other than for college to be easier. I get the concerns around the politics of racial identity, conformity, "the man," and all of that. These are not new issues. I'm frustrated with the move from quiet, private expression of "-ism's" to the very public and implied convictions of the same variety. ("Make America White, er, Great Again!") These are struggles that we still deal with today, and while I'm believe there is progress, I'm not naive enough to think that these are solved problems.

What strikes me about this piece, and other incidents at other colleges is this complete bullshit notion of having "safe spaces" where you don't have to hear anything that may offend you or cause you to disagree. This isn't liberalism at all. This is exactly what the right has been engaging in for decades, and it isn't any better. If you want to seclude yourself in an echo chamber for a big group hug, nothing changes. College is supposed to expose you to as much knowledge as possible, and some of that comes from things that make you uncomfortable. Suck it up and deal with it, because it doesn't get easier after college.

Let me make it clear, I'm not suggesting that it's OK to tolerate a little racism. But uncomfortable history? Learn about it. Unpopular opinions? Hear them, and understand where they come from, even if you don't agree. Isolation from these things is hypocrisy at its worst, and likely the very thing that you're rallying against.

I would think that over time, any individual, based on more experience and more data, would become more and more moderate, and less likely to adhere to rigid ideologies. There's too much nuance in life. But it seems the opposite happens. People get less flexible and more entrenched over time. We've gotta stop being like that.

I thought Larry Simpson was kind of full of crap when I was in college. It's funny how much I learned from him anyway.


When I used to talk about finding balance all of the time

posted by Jeff | Tuesday, May 24, 2016, 5:00 PM | comments: 0

One of the themes I see in my blog posts from the 2004 to 2006 years, which included the time leading up to and including my divorce, was an almost relentless pursuit for balance. (It still isn't clear from reading then that I had any sort of big life issue, except when it was.) I found that my priorities and basic functioning were all out of whack. In those days, I found balance by way of coaching, being a roller coaster nerd, working (occasionally) and being social.

These days, I find that I'm not very balanced at all, and it's starting to wear on me a bit. Symptoms include anxiety, trouble sleeping, mental exhaustion and the occasional visit from IBS, something I don't get that often anymore. I can't say that I'm entirely surprised, I just think that I'm starting to realize that living in the Sunshine State alone isn't enough to keep me operating at a high level.

Alas, I can't balance things out by coaching, because the opportunity for coaching juniors volleyball here sucks. Whereas the metros in Ohio each have hundreds of high schools, we have a couple dozen. Maybe 250 kids out of 1.3 million residents play varsity volleyball, so USAV barely exists. The problem with my other hobby is that it's the same thing I do for a living, so it's hard to engage in that when much of the time I need a break from it after hours. So I've come to realize that part of my issue is that I need a new hobby, or at the very least, need to follow through on some of the other things I liked to do, but don't follow through on.

I'm also in one of my, "Hey dude, you should really take a vacation," modes. I'm going about 18 weeks between meaningful trips, and that's way too long. Me and my little family unit have our half-day trips to theme parks and such, but it's not a real vacation. I spent about 24 hours on the ground in Ohio for a roller coaster opening, without the family, and that doesn't count either. I know from experience that a solid long weekend, not more than three months apart, goes a long way to recharging, but I forget.

I realize now that the cruises we have taken are such a happy place for me because of the glorious, forced disconnection they impose. I get on a boat, someone hands me a fruity drink, and tells me where to eat, and I can completely switch off. That is so far from daily life that it pulls me the other way, into a balanced state.

The bottom line is that I know what a balanced life looks like, and I need to enforce it.


Outrage: The new American way

posted by Jeff | Wednesday, May 18, 2016, 2:30 PM | comments: 0

Have you noticed lately that people aren't happy unless they're outraged about something? Outrage has become a national obsession that drives our politics and much of our culture, and yet it requires practically no effort and results in absolutely nothing happening.

Nowhere is this more true than in social media. Enormous amounts of energy are poured into being outraged about something (examples include Obama, vaccines, climate change, GMO's, the LGBT "agenda," etc.), and the outrage is rarely based in any fact. Instead, it's ripe with hyperbole and willful ignorance, broadcast in an echo chamber where beliefs may not be challenged. "Like and share" is not activism. It requires no effort, and there is no risk. It's just people putting a lot of time into being pissed about something, reinforcing themselves with an electronic mob. If that weren't infuriating enough, it's often intended to thinly veil a sense of victimhood or hate.

The truth is that so much of the outrage isn't directed toward anything that is, in a meaningful way, affecting people adversely. The outrage comes after a decade and a half of our culture insisting that we be scared of something, whether it be terrorism, the economy, income disparity, or some nonexistent threat to your way of life. While the world certainly comes with challenges, as does life itself, the constant outrage doesn't change anything. It doesn't move you or others forward.

Imagine, if you will, that people would instead use this time spent on outrage to learn and study things like economics, anthropology, the sciences... most anything that would result in a better understanding of the world. Or, in lieu of education, what if the time was spent working at a soup kitchen in an urban church, or building a house for Habitat For Humanity, or helping out at Give Kids The World Village? These are the kinds of things that improve the world, and make you more of a contributing citizen of it.

I'm not suggesting that it isn't important to be civic minded. Far from it. What I'm saying is that all of the bullshit outrage accomplishes nothing, and it dumbs-down our culture. There are amazing and great things going on all around you, if you choose to see them and get involved. But you'll never see them if you don't put down you goddamn phone for a minute and stop tapping "like" and "share."


Participation trophy

posted by Jeff | Friday, May 13, 2016, 7:55 PM | comments: 0

Simon did a local parks & rec soccer league for a couple of months this year. He wasn't particularly good at it, but he seemed to enjoy it and made some progress throughout the season. At the end of the season, at a team gathering, everyone on the team got a trophy. For showing up.

I get that my kid is 6, and every day we make decisions about what to do to help him, and when to let him "struggle." I already thought it was a little weird that there was no score keeping, but I could roll with that. However, I was a little taken aback by the idea of granting trophies for showing up. It's not like we could deny that with all of the other kids getting one. A trophy implies some kind of achievement or above-average accomplishment. There isn't anything special about showing up.

There have been a lot of jokes made about participation trophies, especially in relation to millennials. I have some first-hand experience with this. Back in 2005, when I was coaching varsity volleyball at a small, private high school, I recall having a conversation with the girls about what it means to be exceptional. My assistant coach, who was at most only five years older than some of them, totally understood this as well. When a few kids were putting volleyball second, and missing a practice, for other things (like Spanish club and who knows what else), the talk was necessary. The kids insisted, "We need all of these things for college entrance and resumes," etc.

Me and Liz broke it down like this: Every kid in college is going to have all of the same things in their past, and you will not be special. A large volume of activities in high school doesn't make you well-rounded... it just means you're average at a lot of things. However, if you commit to something and work hard to be better at it, that's something that can make you stand out. Otherwise, you're just showing up. The kids found this perspective wholly depressing, but admitted we were probably telling the truth.

I think that overall, the millennials get a bad rap and a silly stereotype. I am, after all, part of the slacker Generation-X. (And suck it, world... we made the Internet what it is today, and we're the new industrialists.) However, the stereotypes are at least partially rooted in some upbringing, and I saw it first hand. Little Sally "deserved" play time, and didn't have to earn it, if you believe what their parents had to say.

The bottom line is that I want my kid to have a happy childhood, but I don't ever want to give him the impression that showing up makes you special. That would not serve him at all.


The Newsroom: Best TV show ever

posted by Jeff | Friday, May 13, 2016, 7:06 PM | comments: 0

Last year, we quickly watched through the first two seasons of The Newsroom on Amazon Prime. It was on HBO a few years before. The show was widely known indirectly for one of the first scenes in the series, where Jeff Daniels' character goes on a rant about how the US is not the greatest country in the world to a bunch of college kids. Considering he plays a news anchor, his assessment about what we suck at made for a fantastic alternate reality, where some news agency actually wanted to be about... the news. The third season went Prime, and we just finished it.

I'm a big fan of Aaron Sorkin, and especially for those of us that worked in TV in some capacity, his show Sports Night was an effort that we didn't get enough of with only two seasons. Of course, I also dig things like A Few Good Men, The Social Network and The West Wing seasons that he wrote. But for him to revisit TV, and specifically news, was a welcome endeavor. We're in an age where actual news on TV is scarce, and the public at large isn't that interested in truth. Imagine then, a news organization, led by a Republican news anchor, that believes the public can handle something better, call out political bullshit, and above all, embrace the importance of bona fide, professional news gathering and reporting.

The show explores those ideas in the context of actual news events, and I think that's brilliant. It also includes plenty of the interpersonal drama that you would expect, and every character is so incredibly well written and developed, it's hard to dislike any of them. (The most surprising is easily Olivia Munn.) But the thing that I couldn't help but smile about at the end of most episodes was the idea, the hope, that real news and a society that wasn't willfully ignorant could be a thing. Maybe it's naive, but it's a good dream.

Highly recommended, watch all three seasons.


The inability to understand the concept of consequences

posted by Jeff | Wednesday, May 11, 2016, 9:14 PM | comments: 0

Kids with ASD are developmentally all over the map, at an age when kids already are wildly different in terms of progress. As Simon nears the end of kindergarten, he's made huge progress in a lot of areas, and we continue to learn coping strategies around his autism related challenges. It's still a mixed bag, as he can read nearly at a second grade level, but can at times struggle with clothing that's inside-out. As an adult it's hard to understand that this is possible, but as someone who appreciates the atypical ways in which an ASD brain is wired, it makes sense.

Our current challenge has proven to be tough to crack. Simon is having a hard time understanding the concept of consequences, or even basic cause and effect. At first, one may write off his behavior as six-year-old defiance. However, when he believes that his sadness is caused by others reacting to his own actions, and he can't reconcile that his action caused the reaction, it takes him to the kind of meltdown that we would typically associate with some other circumstance or social contract that he can't reconcile.

Here's a concrete example: Simon sucked in some medicine via a syringe, for reasons we can't understand, he randomly spit it out. It's not the waste that's an issue, but not knowing how much he might actually have taken. In any case, this caused anger on our part, and his response was that we were making him feel bad, and to please stop. We've had similar scenarios in the last few months.

The frustrating thing here is that we haven't had a successful strategy to help him understand this. When we try to explain it, he wants no part of it. I'm sure we'll eventually figure out a way to get through to him, but trying to understand how he sees the world in this way is difficult.


The Cleveland visit, and nostalgia

posted by Jeff | Friday, May 6, 2016, 4:25 PM | comments: 0

It was very cool (literally and figuratively) to get back up to Cedar Point this week. When the media event started to wind down, I felt rather melancholy. Part of it may have been the infrequency with which I get to visit, and I'm sure being there without Simon and Diana was also a bummer. Quite honestly, the highlight of my day was easily the video call I did with Simon before he had to go to school. He got to see the ride run, and I walked up to the station where he got to see a few trains dispatch. The joy on his face was priceless.

I had the chance to meet up with friends, talk about old times, and I even had a few minutes with my favorite CEO. It was an intense 24 hours. Granted, I've come to realize that so much of my remaining love for Ohio is centered on Cedar Point. Cleveland in the bigger sense, honestly, is still a feeling of, "I'm done with that."

This time, just landing at the airport made me feel glad to not live there. The trees were still without leaves, the sky was gray, and it was depressing. The airport is half-closed, the surrounding area is trashy, and it just feels wholly depressing. Getting into the suburbs did feel a little better, and I was overjoyed to have lunch at the Winking Lizard in Avon (on the way back, too). Then that cold, gray trip down SR 2 made me sad again. Fortunately, when I arrived at Castaway Bay, which was open just for press, the sun peeked out, and I met friends for dinner. Outside of Cedar Point, that's how the day on the ground in the area went. It was a love-hate thing.

When I think back to our late July, 2011 visit, we felt as though our social world was more appropriately aligned with Cleveland. While I didn't have a super extensive social network in Seattle, having changed jobs at MSFT made me feel to an extent a little isolated. In reality, we had a pretty good circle of friends. After making the terrible decision to move back to Cleveland, we found that the nostalgia definitely warped our sense of belonging. It was such a great move in the financial sense, paying for just the one house, but professionally and socially, it wasn't a great idea.

That's where I think this quick trip has given me some peace. That 2011 decision really nagged me, even to this day. While I don't hate the place where I was born, this trip made me understand that I was there for too long, and the nostalgia does not trump that reality. I can visit Cedar Point and my friends in and around the park, but that's really the limit of my attraction to the area. I liked Seattle better than Cleveland, and Orlando is a fantastic tie. We're people best suited with views of Mt. Rainier or Space Mountain.


Valravn review

posted by Jeff | Friday, May 6, 2016, 3:19 PM | comments: 0

I decided with only a few weeks to go to fly up to Cleveland for the Valravn media day at Cedar Point. I ended up not going up to Carowinds last year for the Fury 325 opening and regretted it, so I wasn't going to make that mistake twice. Unfortunately, I don't think the rest of the family will make it up there this year, because our big Alaska cruise is going to be epic, and epic in cost.

In any case, here's what I posted on PointBuzz:

I had my first laps on Wednesday, for the media preview. Once I got beyond the extreme green glow of the Raptor lift at 4:45 a.m., I was impressed with the scope and size of Valravn in real life. It's quite a bit more impressive than any photo can really show.

From a design standpoint, this is the evolution that you would probably expect for the dive coaster category. While I imagined it wouldn't be vastly different than Shiekra at Busch Tampa, I was pleasantly surprised. Here's the thing... the taller drop is, obviously, longer. It's probably only a fraction of a second, but it just seems to drop forever. It's fantastic. If you're sitting in the back, it tosses you out of the seat and seems to hold you just away from the train. It doesn't feel like any other first drop.

The other thing that impressed me is the forces in the first two pull-outs. If you're standing in the middle of it all, you can appreciate that these are fairly compact, and presumably that's what makes them feel as extreme as they do. G junkies will love it.

After the second vertical drop, it's the roll that I found extraordinary. I'm not sure how they did it, but this is the perfect floater roll, and it seems perfect in any seat of the giant trains. It was totally unexpected. The airtime hill also doesn't mess around, with some pretty solid air. The restraints do not impact these moments at all.

The left and right ends of the train offer different experiences. While the right will pop your heels over head in the first inversion, the left does that for the roll. Front offers easily the best visual on any coaster ever (you can literally see the entire park), the back has that crazy push out of the seat on the vertical drops. I can't pick a favorite. They're all good in different ways.

I can't give enough credit to the design team for the way they integrated the ride, the new walkways, the marina gate, into one beautiful and consistent package. While the views from the main midway are certainly impressive, walking into the area from either end is the most visually interesting thing in the park since Corkscrew.

I think the ride will be a huge hit in a park that seemed to have it all. I bet it will be good for Blue Streak traffic, too.


It's about the next vacation

posted by Jeff | Saturday, April 30, 2016, 9:00 PM | comments: 0

Something I've noticed in the last year is that I seem to always be very focused on the next vacation. I'm not saying that's a bad thing, necessarily, but it makes me wonder if what I'm doing in between is somehow not adequate, exciting or something else. Granted, it's really intense now, because my next big vacation is a cruise to Alaska, which will easily be my longest in duration, distance and expense in my lifetime. (Yeah, I'm kind of kicking myself for that, because it's coming so late in life.)

Part of this I suppose is caused by cruising. Prior to 2013, I saw cruising as a way of getting on a germ-infested flotilla of death (thanks, Carnival), but we had such an amazing time on our first cruise aboard the Disney Dream in early 2013 that I fell in love with the experience. Once we moved to Orlando and had easy access to Port Canaveral, we took full advantage of the three-day weekend cruise, and realized that cruising would be a great way to experience a lot of places we haven't previously been, to sample different cities and countries and perhaps revisit them for longer periods of time later on. That's where I think we're headed, hoping to do some European tours in the next two or three years.

But truthfully, even the short-term trips here and there are something I look very forward to. Summers have generally meant weekend trips up north. We've also done local weekends at places like Legoland and Clearwater. Heck, we've even done passholder rates at Disney resorts for hardcore, all-grownup experiences without Simon, literally a few miles from our house. I treasure these experiences.

I don't dislike daily life. I'm fortunate to have such an adorable little family and a job that mostly goes well. But I have to say, when we leave town, we do it right. The experiences-not-stuff lifestyle is for real. That's how we roll.


The EV future is also autonomous

posted by Jeff | Tuesday, April 26, 2016, 9:39 PM | comments: 0

We decided last year to buy a Tesla Model S despite the cost, because we felt so strongly about going all-electric. It's the future. I know a few other owners, and none of us are wealthy, not by a long shot, but our enthusiasm for EV's is intense. I'm sure we all had our own justification (for science, American can-do, gadget fetish), but I know that being part of an amazing future is certainly part of it.

If you're watching certain headlines, then you know that there is a bigger vision in play for Tesla. It's an ambition shared by Google, probably Apple and maybe Detroit... self-driving autonomous cars. Sure, we were supposed to have flying cars by now, but traffic accidents are a problem because people suck at driving. Cars have been able to park themselves for a few years, and the Model S will do that. It also takes adaptive cruise control to the next level by also steering the car and changing lanes by simply clicking the turn signal. It's like magic.

Unfortunately, while the car ships with the hardware for all of this magic, the software is a $2,500 upgrade at the time of order, or $3k if you want it after the fact. It was hard enough to justify the car in the first place, so this was not an option I could justify. Tesla benefits from having as many people as possible using it though, because it records data and sends it back to the mothership for analysis. As a tease, they're offering a 30-day trial of the software, so I got to try it today. It blows my flipping mind. I don't trust it, and I can't believe that it works. But there it is.

This is our future. Think about it, there will come a day when you can drive without driving, and I suspect that the biggest problem won't be the technology, but government regulation. Made in the USA.


Death to merchant accounts

posted by Jeff | Monday, April 25, 2016, 3:00 PM | comments: 0

After 15 years, I am finally without a merchant account. These are the things that you once needed in order to accept credit cards. I first obtained one in 2001 when I started taking orders online for CoasterBuzz Club. I also used it when I had to essentially resell tickets for events we did. This arrangement resulted in three fees: A monthly fee for the account itself (plus an additional cost for the company that did the Internet gateway for the charging), a per-transaction fee and the discount fee, which is a percentage of the transaction. Collectively, this meant about $35, plus 3.7% + 25 cents on each transaction. That means even if I didn't take a single payment, I was spending $420 a year. After using three different banks over the years, it kept going up. Granted, if you process cards in person, swiping or using the chip, the discount rates are much lower, and if you're doing volume, the monthly fee basically doesn't exist. However, for someone who has never exceeded $10k in a year by very much (when I was selling tickets), it's way too much.

For the last few years, I was hoping that Square would finally open a gateway and start taking Internet-based transactions. They're the people who have been sending out the little swipe readers for phones for years. They finally did start doing ecommerce, recently I think, but the API and documentation aren't super clear. Then I noticed that Stripe was doing it, and you could literally be up and running in under an hour. Sure enough, the payment part of the code for the resurrected PointBuzz Premium took a half-hour tops. What's nice is they also generate receipts by email, and you can set the name to be anything you want on the credit card statements. Their discount rate is lower, but transaction fee higher, compared to Square, but it's basically a wash.

In any case, I'm really pleased with Stripe. They have tokenization and such available too, so you could do recurring charges if that was your thing. It's the speed to market that impressed me the most. They delay the first deposit by a week, but otherwise, it's remarkably fast to get started. Huge thumbs up.


Content has value, because you wouldn't be asking for it if that were not true

posted by Jeff | Tuesday, April 19, 2016, 3:00 PM | comments: 0

Musicians have easily taken the brunt of the abuse around the notion that content should be free. There is never ending irony in the idea that something sought out by people is simultaneously declared as having no value. Photographers seem to win second place in this realm, and a range of content creators, mostly on the Internet, make up the rest.

Today, a PR agency representing a major travel service was working on some kind of bullshit "listicle" piece that they were pitching to their client, and they wanted to use the data from the CoasterBuzz 100, which is the top 100 roller coasters in our database. This content is valuable to me for a lot of reasons. There was effort that went into calculating it and aggregating the data automatically, it's very frequently viewed by users, it has great search engine juice, etc. It's one of the few times I've actually achieved any of that by design. In any case, this is how the conversation went via email around the use of this content (some light editing for clarity). Watch how the change in tone happens...

Agency: Happy Tuesday! We were reaching out for permission to mention CoasterBuzz.com in our upcoming [client name removed] press release around summer travel. Please let us know if you need anything from us to make this happen! Thanks!

Me: I'm not sure you really need permission, but what's the context?

Agency: Ok, that's easy! We just want to cover our butts. We're putting together a summer index list that'll cover summer travel that includes beach destinations, national parks and amusement parks. We're using the CoasterBuzz rankings to figure out the amusement park rankings by number of top coasters.

Me: That's not a mention, that's reusing content. You'll have to be more specific about what you're going to do and how you will attribute the data to CoasterBuzz.

Agency: We're taking a list of top 50 cities in the US and using the CoasterBuzz rankings to help us identify the cities with the most top rated roller coasters. We'll mention that we used information from CoasterBuzz and link the list to the press release. Do you need further details?

Me: That's still vague and unsatisfying. The attribution doesn't really help me... you're just using content for free. I'm not OK with that.

Agency: I explained exactly how we're using the data in my previous email. [gives example]

We continue this for all 50 top cities in the US. We also pulled top rated beaches, identified whether or not they have a national park, their average weather, etc. From all of this data, we create a travel index for consumers to reference as they're thinking about their summer travels. Does that make sense?

We're also pitching this content to top tier consumer and travel media as well as distributing a national press release (which isn't cheap). We're essentially driving more eyeballs to the CoasterBuzz website and increasing potential traffic.

What terms would you be OK with?

MeIf you want to pay for use of the data, that would be fine, but I'm not interested in eyeballs. They don't pay for the hosting services or software. If that's something you can budget for, do let me know, otherwise, I'm not willing to allow the repackaging of our content.

AgencyWe'll look elsewhere.

Awesome, right? When you want something for free, there's nothing quite like making it sound like you're doing me a favor. I can assure you that after 17 years of doing this, it's not a favor. I've had mentions in the LA Times and on NPR, and I can assure you that there's no flood of traffic that comes from these mentions. And in those cases, at least it's around something newsworthy, not generating content for the purpose of marketing. What started as a "mention" was really redistribution of content for free.

Content has value. If it didn't, you wouldn't be asking for it.


Collaborate and contribute vs. order taking and kingdom guarding

posted by Jeff | Tuesday, April 19, 2016, 11:00 AM | comments: 0

I was chatting with a coworker yesterday about the various kinds of IT work environments that we've been in. It was largely in the context of the kind of influence we have, depending on our career stage. I was making the point that it's easier to "sneak in" the right things when you get further along, a perk that I've enjoyed a bit in recent years. There is definitely a difference in the flavor of environments that are out there, ranging from the full-on IT-as-innovator shop to the stodgy old heads-down status quo.

When I say "IT," really I mean the software end of things. The hardware and infrastructure side of things is a different beast, though this is slowly changing as more companies adopt a devops world of virtualized everything and stop buying racks full of silicon that they'll eventually throw away. On the software side of things, there tends to be two m.o.'s at play, and it's striking how infrequently the shops fall somewhere in between (at least in my experience).

The first is the world where IT is a collaborator and contributor to the business. Good ideas come from everywhere. The IT people are engaged and understand the context of the business, so everyone from a junior developer up through management is able to identify an opportunity and suggest it to the other parts of the business. Those other segments embrace the ideas, and together the ideas are refined to turn a drip of awesomesauce into a steady flow. These are the companies that end up doing truly great things.

The other end of the spectrum is where IT is relegated to a customer service organization. Its intention is to take orders as they come along, and guard the kingdoms that they've set up. The other business segments aren't interested in getting ideas or innovation from IT, and IT is happy to just keep its head down until called upon. It will tell the business "no!" because of "security!" and other reasons that sustain its kingdoms. People are hired not for their ability, but because they can conform to this model and not ask too many questions.

I don't have to explain which scenario is better for any business, but the cultural leap to get from passive IT to full collaborator is not an easy one to make. The old stereotypes of the socially challenged guys in the basement who set up your printer are hard to shake. It isn't just the perceptions outside of the basement either, because there's a self-fulfilling prophecy among many software workers that, "This is where we belong." But consider this: The software people of the world are indexing the world's information (Google), making social interaction more global (Facebook), teaching cars to drive themselves (Tesla)... why would you not want the same kinds of forces that are changing the world changing your business? If you don't enable this culture, your competition will.


Civic doody

posted by Jeff | Wednesday, April 13, 2016, 6:50 PM | comments: 0

I don't know if others had this experience, but in grade school in the Cleveland school system, in the early 80's, we had something called citizenship lessons, which I suppose would be more broadly classified under the realm of social studies. As early as grade three, I remember learning about the Western Reserve, and how the townships in Northern Ohio were drawn out. Of course, there were lessons about the bigger issues of how the federal government worked, too, but I found it all very interesting, and it was probably some of the most practical knowledge I gained in school.

I assume that they still teach this stuff in school, but either there's a retention problem or people just don't care. I think one of the most critical things about government, and participation in it, is understanding how it works. If recent political discourse is any indication, people have no f'ing clue.

For example, we're all familiar with the usual nonsense ranging from, "Obama is gonna take my guns," to, "Cruz is gonna repeal Obamacare." You shouldn't need to be a constitutional scholar to know that there's a Constitution, or that Congress makes (and repeals) laws, not presidents. The basic principles about the three branches of government seem completely lost in the discussion.

It isn't much better at the local level. People don't seem to know or care about the various districts and municipalities they're in. When I lived near Cleveland, we were in six separate taxing districts (city, school, county, library, park and vocational school). Here, we're not even in an incorporated municipality, something lost by our neighbors who call city hall for the town that we share a zip code with. (You would think as a homeowner one would want to know who they're paying taxes to, and what local issues will come up in the elections.)

My intention here isn't to say, "What a bunch of morons." I'm just frustrated that people won't engage at a basic level to understand their surroundings. I don't want to live in the movie Idiocracy.

(Sidebar: There's a certain irony that the immigrants that so many people don't want actually learn this stuff to become citizens.)


Another Azure outage, and why regional failover isn't straight forward

posted by Jeff | Saturday, April 9, 2016, 9:23 PM | comments: 0

It's been a rough month for my sites in the East US Azure region. On March 16, a network issue made it all fall down for about four hours. Today, on April 9, just a few weeks later, I've endured what might be the longest down time I've ever had in the 18 years I've had sites online, including the time an ISP had to move my aging server and fight a fire in the data center. It will probably be awhile until we see a root cause analysis (RCA), but the initial notes referred to a memory issue with storage. The sites were down for around 7.5 hours this time, and the rolling up time over the last 30 days is now down to 98.5%. That's not very good. Previous outages include the four hours on 3/16/16, two hours on 3/17/15, and two hours for the epic, multi-region failure on 11/20/14. Fortunately, none of these involved data loss, which is the thing that cloud services should achieve the most. I moved in to Azure about two years ago.

Here's the thing, I know firmly that CoasterBuzz and PointBuzz don't support life or launch rockets. The ad revenue lost is really not that much, which you could probably guess considering how much I complain about it. Still, the sites are an important time waster for a lot of people, and I've spent a lot of years trying to get some solid Google juice. When the sites are down, it harms the reputation of them for users and for search engine bots that are trying to figure out how important the sites are. There is a cost, even if it isn't financial.

My costs are lower, while my flexibility and toolbox are better since moving to Azure. No question about it. The hassle free and inexpensive nature of SQL databases in particular are huge, especially the backups and ability to roll back to previous points in time through the log. That said, the down time for all but the broken 2014 incident were regional issues, and the only way to get around that is to have everything duplicated and on standby in another region.

If the only issue was the apps themselves, this would be super easy to handle with Azure Traffic Manager. Sites go down, boom, they route to a different region. Where things get less obvious is when you have a database failure. Today's failure appears to have been caused by a failure of the underlying storage for the databases, so the apps returned 500 errors. In this case, ATM would presumably reroute traffic to my stand by region, where I would have the sites ready to go and pointing to the failover database, also in the other region.

In today's case, I'm not sure if that would have worked. The documentation says that the database failover won't happen until the primary database is listed as being "degraded," but for the entire 7.5 hours today, it was listed in the portal as being "online." It most certainly was not. The secondary database won't come online until the other fails. I assume I could manually force it, but I'm not sure. I'm also not sure what happens when the original comes back online in terms of synchronization, and designating it back as the primary. And what if the apps went down but the databases were fine? Traffic would roll to the other region, but wouldn't be able to connect to the local databases because they're not failed over (and no, I don't want to connect to a database across the country).

So really, there are two issues here. The first is the cost, which even for my little enterprise would add up a bit over the course of a year. The secondary databases in another region would add around $25 per month. Backup sites would cost another $75 a month. ATM cost would be negligible. An extra hundred bucks seems like an awful lot for what I'm trying to do. I did see a good hack suggestion that says you can put the backup sites in free mode, and manually scale up if you need them, then point ATM at them.

The second problem is that the automation is far from perfect. In the sites down, databases up scenario, it would fail. Today, if the databases were "online" but really not, it would fail. I wouldn't feel comfortable getting on a cruise knowing that while I'm at sea there could be a problem.

This is mostly academic, and I realize that. If I have to deal with a few hours now and then with the sites down, so be it. Like I said, they're unimportant time wasters. It's just that 98.5% uptime in the last 30 days sucks. I know they can do better.


When will things go horribly wrong?

posted by Jeff | Saturday, April 9, 2016, 3:34 PM | comments: 0

It's not lost on me that I've got a pretty good life. I've worked pretty hard for much of it, made changes where I could, and paid particularly close attention to the quality of people I allow into my life. I have a good job, have great friends, a darling wife and child. I'm not rich, but I do OK. This is what I think we generally aspire to, and I'm generally happy.

But then you hear about things that happen to other people, just arms length from you. Someone gets cancer, a child is hurt, a job is lost or a couple splits. You start to wonder when it will happen to you. I don't think this is an issue with having a morbid perspective or anything, but I do believe that one knows intense happiness because they've experienced intense pain. Once you know that's possible, I suppose you're on the look out for it.

At this stage of my life, it's not that I fear death. I got over that a long time ago. Now what I fear is not having enough time with my wife and child (or them with me, in the more worrisome scenarios). I hate all of that "everything happens for a reason" bullshit that people use to rationalize death. I found it freeing when I accepted that the only "reason" is that everyone eventually dies, period. I can't change that, so I'm not going to stress over it. But again, now it's just that I don't want to squander the time, or have it taken from me.

I know, this all sounds horribly pessimistic, but sometimes the brain goes where it goes. I like my happy bubble, and I don't think it's entirely unreasonable to want to stay in it. We've been without any serious and instantly scary challenges for a few years, and I'd like to keep it that way. As rational as I try to be, emotionally it's still possible to feel as though you're "due" bad things.

So if karma is a thing, hopefully I've got some good stuff stored up.


A remote day at work

posted by Jeff | Friday, April 8, 2016, 3:00 PM | comments: 0

At last weekend's Orlando Code Camp, we (as in, my employer) had a table in the common area set up to talk to people. One person asked what it was like to work remote, and the best I could describe is that it's "different." I think generally that there are more pros than cons, and as an employer, you aren't limited by geography to have the best people. Silly "command and control" environments are obsolete, and if anything, you are judged more fairly because you have nothing to show for your work other than the results. You don't get points for showing up if there isn't a place you're showing up. An entire book was written about why it's awesome.

But the question seemed to be more about how you work. I suppose it's different for everyone, but my routine goes something like this:

  • 7:30 a.m., roll into the home office, handle email, prepare for whatever is in store for the day.
  • 9 a.m., at some point during the hour, most of my projects have had our daily stand-up meeting. That's where each person on the team says what they did yesterday, what they will do today, and if they have impediments. This usually takes less than 10 minutes, and follow-up conversations happen after if necessary.
  • 10 a.m. - noon, somewhere in that window I typically shower if I didn't when I got up.
  • Lunch: Time and duration varies based on meetings. If I stay home to eat, most of the time I don't take a very long break, maybe 15 minutes. If things are slower, I may stream a show for background (The Daily Show is typical). If time permits, I'll go out for lunch, and it's not uncommon for Diana to come along. We've even gone into Walt Disney World a few times for lunch!
  • Afternoons tend to have the highest density of work, but they aren't without meetings.
  • I usually intend to wrap up by 5 p.m., but sometimes I don't realize what time it is and I go longer.

The weirdest thing about this is that it's not unusual to do actual work for more than 9 hours in a day, but it's also easier to fit in things like haircuts, a Christmas concert at school, or said Epcot for lunch. Since the job requires billing clients, I can see that total time, billable or otherwise, tends to average between 40 and 42 hours a week. All things considered, that works out consistently. Projects have budgets, so you can't usually arbitrarily work extra just because. I've put in longer weeks, but I don't think that has happened more than two or three times in two years.

My year working remote at Humana was pretty similar to this routine. The point of contrast is that I don't spend time in the car commuting. I'm not racing out of a building at 4:30 or getting in at the crack of dawn to avoid traffic. That time instead is spent working or having the flexibility to do life stuff. It's pretty fantastic.

We happen to have an Orlando office, so those of us who are Orlando based do try to come in Tuesdays and Thursdays. It varies, as I'll skip out when there are long meetings (in my case, sprint review and planning) or if I really need a little extra time out of the day. But it's a nice arrangement because I get to hang out with people and talk about work and be social. On those days, I tend to get there by 8:15 (beating traffic, mostly), and then leave in the afternoon whenever I'm at a logical stopping point. Then I finish at home until 5-something. I still tend to get a solid 8 hours of work done, no problem.

Can everyone work this way? I'm not sure. I don't think so. I find it very easy, and the collaboration tools and phones and screen sharing all make it work pretty well most of the time. It feels more efficient to me. I love "coming home" instantly and seeing my darling wife and child. Professionally, it's great to work with great people, all over the country.