I’m a big believer that in order to be good at what you do, you need to pay attention to what everyone else is doing. For the longest time, I never understood why radio stations seem to interrupt you almost between every song with a reminder of which station you’re listening to. This becomes even more obvious when you’re listening to sports on the radio, and they specifically call it out:
“Let’s take a quick break for station identification on the Cleveland Indians Radio Network.”
Now, I understand that there is a law in place that actually requires radio stations to identify themselves, but I never really understood why. Last Thursday, Wil Wheaton posted an article similar to this one, reminding his subscriber readers who he is, and why you’re subscribed to him. In the same way that radio stations sometimes remind you who you’re listening to, I want to make sure you know there’s a real person behind this site, who cares about making this place a useful, informative, and reliable resource for software developers around the world.
You’re listening to Jeff Blankenburg. I’m a software developer, a dad, a husband, a golfer. I love board games (both making and playing them.) I love mobile computing. All flavors. I’ve published over 30 apps to various marketplaces. I play competitive volleyball at least once a week, and have been since high school.
I work for Microsoft as a Technical Evangelist. This means I spend my days educating myself and others about Microsoft’s development tools and technologies, with a specific focus on Windows 8, Windows Phone, and Azure applications. If you ever need any help, I hold virtual and in-person office hours every Thursday.
You can reach me just about anywhere, but here’s where I pay the most attention:
- Email: jeblank AT microsoft DOTCOM
- Twitter: @jeffblankenburg
- Blog: http://jeffblankenburg.com (but you probably already knew that)
- YouTube: http://youtube.com/jeffblankenburg
- LinkedIn: http://linkedin.com/in/jeffblankenburg
- GitHub: http://github.com/jeffblankenburg
Thanks for reading my articles. Your feedback and questions are what keep this thing going.
Let’s say, hypothetically, that you had created a game that simulated video poker. Users can download the app for free, and they play with free credits that can’t be purchased in any way, nor can they be cashed in for anything at all.
Is that gambling?
Let’s now say, hypothetically, that in this video poker app, you created an offer to all of your users to award the first person each month that achieves a ROYAL FLUSH a prize of a giant, stuffed teddy bear. The users still risk none of their own money, but playing the game “might” win them the prize.
Is that gambling?
Now let’s swap out that teddy bear for a $100 gift card. Does that change anything?
Now is it gambling?
I’m considering this approach with my app, to encourage more people to play more often, but I also am jail-averse. I’m also massive-fine-averse. But to me, this seems about as cut and dried as it can get. How could it possibly be gambling if the player never risks anything?
Please leave your thoughts in the comments. I am sincerely interested in your opinions, and if you know a lawyer that has any insight into this, I’d love a chance to chat with them.
As I mentioned in my last article, I recently published a new Windows 8 application called King Poker. One of the major challenges I had was around handling the giant variety of screen sizes that are possible with Windows 8.
In my numerous years of XAML and C# development, I’ve almost always had the good fortune to be working in a constrained box. In Silverlight, I knew exactly what size the control was going to be when it was embedded on a web page. In Windows Phone 7, there was only one resolution: 480 x 800. It allowed me to get lazy.
With Windows 8, laziness is no longer possible. You’re required to support 3 distinct resolutions out of the gate:
- 1024x768 (filled view)
- 1366x768 (minimum full screen resolution)
- 320x768 (snapped view)
I knew going into this project that I was going to be making extensive use of the Grid control. By setting the widths to “*”, I could have my content automatically scale to the size of the container, effectively scaling everything up to the appropriate sizes. I had another problem though: the amount of content I was presenting varied also.
ProTip: When layout a dynamic grid system, figure out what you want your layout to look like in fixed values on a 1366x768 screen. Set every ColumnDefinition and RowDefinition explicitly, so that it is EXACTLY the way you want it to look. Once you know those values, figure out what percentage of the width or height of the screen that takes up. Use these percentages as the dynamic values in your Column and RowDefinitions. Like this:
<RowDefinition Height="38*" />
<RowDefinition Height="36*" />
<RowDefinition Height="7*" />
<RowDefinition Height="5*" />
<RowDefinition Height="12*" />
At the top of each game, there is a “paytable” that indicates how many credits you will win for certain types of poker hands. Some games, like Jacks or Better, have only 9 different hands that pay out. Other games, especially those that include wild cards, can have as many as 15! Here’s two screenshots of my app (before I solved all of my scaling issues.)
|Jacks or Better (9 rows)||White Hot Aces (11 rows)|
As you can see, the paytables are different heights, and there’s a variable amount of space between the cards and the content below them. This was unacceptable, but I couldn’t figure out how to keep my paytable box a consistent height while having the content inside of it scale to fill it appropriately.
Discovering the Viewbox Control
Last night, after fighting with this issue for a couple of weeks, I discovered the Viewbox control. Not sure how this has eluded me for so long, but that time has passed, and I am a HUGE fan. Its simplicity is its genius. Wrap any content inside a Viewbox control, and it will automatically scale it to fill its container. What this meant for me was that I could set my paytable box to be a fixed percentage of the screen, and the text inside that box would simply scale to fill the box. This means that 9 rows can fit in the same box as 15 rows, because it will just make the font size smaller for me automatically.
Sidenote: I had already started writing an elaborate “Page_SizeChanged” method that was going to manually set all of the font sizes, image sizes, etc. based on the resolution of the user’s machine. I am so glad I don’t have to do that.
You don’t need to do this with everything. For example, I’m only using it for my paytable grid and the advertisement. Everything else is able to scale on its own by the default behavior of a Grid. Here’s some screenshots of the new interface, with many more rows, yet more available vertical space:
|Black Jack Bonus Poker (14 rows)||Deuces Wild (10 rows)|
You can see that now, my interface looks identical, regardless of how many rows I add to that paytable box. What’s also cool is that the second image, the Deuces Wild one, is actually at a significantly higher resolution than the Black Jack Bonus Poker one. Yet they look identical. THIS is exactly what I was going for.
Struggling with Dynamic Layout
So it may seem, at this point, that my problem is solved, and we’re done talking about scaling. Wrong. See those 5 card images? Their size is dynamically determined by the size of the grid cells they reside in. This works perfectly fine until I want to swap them out for other graphics (like when a user deals new cards, for example.) When I change their source, for a brief moment, they don’t have a width or height. More specifically, their width and height are zero. My intial solution (so far) to this problem is to determine what size the images are when they are loaded, and then set their MinHeight, MinWidth, MaxHeight, and MaxWidth equal to their “loaded” size, so that even when I swap out their source, they’ll remain the same size. I tried many different events until Tim Heuer suggested I try the ImageOpened event on each image. This is where I landed:
private void Card_ImageOpened(object sender, RoutedEventArgs e)
ResizeSingleCard(sender as Image);
private void ResizeSingleCard(Image i)
i.MinWidth = i.ActualWidth;
i.MaxWidth = i.ActualWidth;
i.MinHeight = i.ActualHeight;
i.MaxHeight = i.ActualHeight;
By doing this, each of our images are “locked” to their size for the duration of the user’s game session. I am also handling some weird stuff for the very unlikely situation that a user changes their resolution during a game session, but that’s not something most of us need to worry about.
In short, getting your app to scale to multiple resolutions is hard, but it’s much easier than I was making it thanks to the Viewbox control. Now to find a way to get this control into my Windows Phone version, and I’ll be set.
A special shout-out needs to go to Ryan Lowdermilk, because without his constant beta-testing and encouragement to clean up my scaling issues, I probably never would have fought through it to get where I am today. (Also, check out his great podcast, The Windows Developer Show. I’m hooked on this weekly broadcast of the latest news for Windows 8 & Windows Phone Developers.)
Today, I am setting out with a few old friends to set a world record. No, we’re not going to run 100 meters faster than anyone has before. No, we’re not going to circumnavigate the globe using only flatulence as propellant.
We are going to establish the world record for the time it takes to jump into all of the five Great Lakes. This bar has never been set before, but we anticipate being able to do it in just under 12 hours total. Here are the rules of our attempt:
- You must JUMP into each Great Lake. No toe-tapping - you must either jump off of a pier or some other structure or run completely into each lake. Full submersion is required.
- Clock starts when you are on land on the shore of the first lake, just prior to your jump, and stops when you are submerged into the fifth lake.
- Hydrologically speaking, Lake Michigan and Lake Huron are the same lake. For purposes of this record, they are considered to be divided by the Mackinac Bridge. If you choose to jump into Michigan and Huron at or near the Mackinac Bridge, you must jump / run into the lake on one side of the bridge, then return back out to land and jump / run into the other. Jumping / running into one and swimming over to the other side of the bridge is not allowed.
- Lake Superior is anything west of the Soo Locks in Sault Ste. Marie.
- Lake Ontario is anything east of the Burlington Bay Skyway - west of that is considered Burlington Bay.
- Lake Erie and Lake Ontario are divided by Niagara Falls. If you jump into Lake Erie and are then carried over Niagara Falls, for purposes of this record, that does count as jumping into Lake Ontario.
This will actually be the second world record for my companions on this trip, they previously set the record for traversing all 88 counties of the state of Ohio in under 24 hours. You can read more about this attempt here.
Just so this doesn’t come across sounding too incredibly serious, it’s not. Yes, we are technically setting a world record, I suppose, but we’re also getting a weekend-long road trip to spend some time together. Either way, it’s going to be awesome.
See you at ThatConference on Monday!
Want to contribute to your developer community? Want to know what your peers think of you?
Contribupendence Day. That's what today is. On July 3, 2008, I started a trend by writing recommendations for 5 people on LinkedIn, and I’ve continued this trend for the past 5 years, along with hundreds of other software developers around the world.
One of the things that I have found, in this wonderful developer community I am a part of, is that we've got some amazingly talented people in this industry. But when I look around at their profiles on the major social networks, you'd hardly know it. Hardly anyone has even ONE recommendation on LinkedIn. Facebook walls usually consist of nothing more than "Hey Steve, what are you doing this weekend?" But yet, when you're looking for that next job, what's the first place a new employer is going to look?
So let's tell the world about the people we work with. Or the people we WISH we worked with. No strings attached. Let's make sure that when someone looks up your friend online, that they find a glowing (and true) review from a peer. No embellishments, no lies. Just the truth. And do it with no expectation that they will return the favor. That's just selfish.
I picked five people to lift up today. So today, on July 3rd, I hope you will contribute to someone's independence from online mediocrity. If you have a blog, tell me who you tagged!
Here is my list for 2012:
Jeff Fansler - Jeff Fansler is someone that I would want to have on every single team I work on. He's a wise and compassionate manager of people, a focused and energetic speaker, and a knowledgeable and creative software developer. On top of all of those accolades, he's one of the few people I'd always sit down to have a beer with as well. Just an overall great person to know.
Mike Eaton – Quite possibly one of the most misunderstood people I have ever met, Mike is a knowledgeable, passionate speaker with a wonderful history as an independent developer. (He only appears to be grumpy most of the time.) He has stories to share that not only teach developers how to write better software, but he also dedicates a great deal of his time to educating developers on the business of software, and how to get better at that, as well. His KalamazooX conference is one of my favorites every year.
Doug Mair – Doug comes across as the shy, silent type sometimes, but I’m starting to think it’s an act. He gets up in front of conference audiences and shares his knowledge at a depth few ever venture into. Every time I speak with Doug, he has a new app he’s built, and one after another blows my mind. He has an affinity for the math behind user interfaces that is second to none, and I look forward to each opportunity I have to learn from him. He’s an accomplished developer who spends his free time making himself better every day.
Jennifer Marsman - Jennifer Marsman oozes passion for technology. You can see it in her energetic presentations. You can feel it when you're just in the same room with her. She knows her stuff, and she can't wait to share it with you. She's an evangelist's evangelist.
I would work with Jennifer on any team, in any place, at any company, and know that whatever she was given to do, it would be done on time, done expertly, and done thoroughly, with a level of care and thoughtfulness that few give to any of their work. Jennifer is awesome.
Sue Johnson – Sue is the model example for what a technical recruiter should be. She invests in relationships, and immerses herself in the community. At a time when most recruiters are content to blast us with spam, Sue does it differently. She actively sponsors conferences, and is more interested in hiring great people than just matching a few keywords. She’s doing it the right way, and it’s clearly paying off for her.
For those of you that have met me in person, you know I have a tendency to wear t-shirts with clever, ironic, and sometimes just arrogant words or artwork on them. But as I’ve looked around the landscape of the shirts that are being offered anymore, there are very few that truly appeal to software developers.
So, I was thinking about what kinds of sayings, pictures, or bold statements YOU might wear on a t-shirt. Here’s a few I’ve seen in real life that are in the vein of what I’m looking for:
- “your phone sucks”
- “VB6 developers can’t see sharp.”
- “</head><body>” (right under the neck of the shirt)
- “I don’t always test my code, but when I do, I prefer to do it IN PRODUCTION.”
What would you put on a shirt? Please leave your ideas in the comments. I might even make some of them into real shirts.
Several months ago, I was discussing a common problem I face all the time: I have multiple machines, but when I’m at my desk, I don’t want to have to use multiple keyboards and mice.
I started with hardware solutions. I looked for a KVM switch that would serve my purposes. I looked all over the place, and was incredibly disappointed. Most every KVM that I found ONLY used VGA video connections, and the ones that dared venture into the world of HDMI were marked up so high I couldn’t justify the price.
What is $220 more expensive about HDMI?
|IOGEAR 2-Port VGA KVM Switch||IOGEAR 4-Port HDMI KVM Switch|
So I mentioned this issue to my friend, Kevin Dutkiewicz, and he suggested a software solution instead. Mouse Without Borders. He had a laptop sitting next to his dual monitor gaming rig, and merely slid his mouse from those giant screens to his laptop screen effortlessly. He clicked on a browser, and started typing a URL, and it worked. I was impressed.
No effort. No switching. No nothing. Just move your mouse. That’s it. It seemed too good to be true. Oh, and it’s free.
I’ve included a video of my setup, which includes three different computers (a Dell XPS 8500 with dual monitors, a Samsung Series 7 Slate running Windows 8 CP, and a Samsung Series 9 laptop running Windows 7.) I think that seeing this effect is far more compelling than reading about it. So here it is:
Let’s start at the beginning: have you heard of Imagine Cup? It is the Superbowl of student technology competitions. For over ten years, Imagine Cup has gathered the brightest students from around the world to solve some of the toughest problems facing the world today with technology.
The finalists have already been selected, and part of the competition involves a People’s Choice vote. This allows us, professional software developers, to chime in on what we think is an amazing entry in this competition.
Head over to the voting booth, and check out the remarkable projects these students have put together, and then vote for your favorites!
I, like many of you, am an avid Amazon.com shopper. I would be willing to bet that I buy a few physical things from Amazon every month, and plenty of virtual goods, like music, books, etc. as well.
In mid-February, I actually ordered 4 different things in four different orders, on the same day. Normally, I just use my credit card. For whatever reason, this day I decided to use an Electronic Funds Transfer (EFT) from my ING Direct bank account #0002938475*.
As it turns out, I had a typo when I entered the bank account information. Nonetheless, Amazon allowed me to enter the information, make my four purchases, and receive merchandise two days later thanks to Travis Smith and his shared Amazon Prime subscription.
Ten days after my purchases has already arrived (and been given as gifts to my daughter, mind you), I received four letters in the mail from a company called TRS Recovery Services.
[Mind you, TRS stands for TeleCheck Recovery Services, which means the name of this organization is TeleCheck Recovery Services Recovery Services.]
Each of these letters indicated that my “electronic bank account payment [I] attempted as part of my recent order was not successful.” Each letter represented one of the 4 orders I had placed that day, and each one came with its own $25 returned check fee, totaling $100 for those of you unwilling to do the math.
I frantically called Amazon to determine what could have happened. They told me that TRS gets involved on faulty and fraudulent EFT issues, and that was probably what had happened, and that I should call them to resolve it. So I did. They explained that the bank account I had attempted to use for my purchases was closed, and that they were not able to get the funds for the orders I had submitted. I asked them for the account number in question, and that’s when we determined I had made a typo.
The woman on the phone told me that I have a right to dispute the fees, but that they are rarely waived, but that unless I could produce proof that I had paid for these items, she was going to need me to settle up on the phone immediately. Since I had checked my account, and knew that technically I had not paid for these items, I complied, and paid the balance of my items, less the $100 in service fees. I told her I would like to dispute those, as I received no warning from Amazon that there was a problem.
In order to dispute these charges, I have two options: fax or mail a letter to a physical address with my reference numbers and a “personal statement.”
It gets even better. While I was on the phone with TRS, but after I had given them my credit card information, I received an email from Amazon stating:
“At this time, we have requested that TRS Recovery Services cease any further collection action for the previous order(s) placed using your bank account.”
I’ve tried the dance of customer service with both Amazon and TRS, to no avail.
I faxed the letter this morning. I will keep you posted.
- Amazon took my order with a typo, processed the order, and shipped me my items without a single warning or problem. Shouldn’t I, as the consumer, be warned about a typo before I’m expected to pay a $25 service fee?
- In 2012, we still have companies that only accept fax or snail mail? This smells of scam every time I encounter it. Consumer Protection should specifically eliminate business practices that explicitly make it harder for the consumer.
- The title of this article is “The One Where I Stopped Using Amazon.” That’s a bold-faced lie meant to draw you into the story. If it would have fit, I probably should have titled it “The One Where I Stopped Using EFTs With Amazon.” My apologies for being misleading. They have the best prices on nearly everything. I have no intention of quitting Amazon for good. Does that make me a bad person? Would you?
- How would you have handled this situation?
* Account number has been changed to protect the innocent.
As many of you that follow me on Twitter know, I recently acquired a new bit of technology in my life: the FitBit. This article is a story about my first 30 days with the device, and how I’ve already lost 7 pounds.
This is not your father’s pedometer.
This has become a consistent subject of conversation with people I talk to, primarily because it’s a cool device that I always have with me, and I love talking about tech. When I show it to people, and give them my explanation that the FitBit keeps track of steps, calories, flights of stairs, sleep cycles, and more, the response is generally the same:
“Oh, it’s a pedometer.”
Perhaps in some ways it is, but for me, it’s incentive. The device wirelessly syncs with a base that plugs into my USB port, and my tracking data is automatically uploaded to their website (privately) so that I can see reports over time. Here’s my activity chart, for example (I work at a computer all day, don’t judge):
As you would expect, there are also achievements to be gotten. While I would have expected them to motivate me more, to this point, they’ve only been small blips of celebration rather than the motivation they are supposed to provide. That being said, I do look forward to the opportunities I have to get a bunch of walking in, and I keep an active eye on getting to my 10,000 step-a-day goal. (I’m only averaging ~5,000 steps per day right now.) I have the strong desire to take more steps each day, but that hasn’t been enough to actually get me outside taking some. I hope that as the weather turns warmer, my feeling on this will change.
With all of this rich data, I really thought that this device was going to be the thing that kept me aware of my activity levels, and would be the breakthrough I needed to finally lose some weight. It wasn’t.
Calories are more important than steps.
Part of the tools for FitBit include tracking for a great number of other considerations: your activities (you swam a mile today? log it.), your weight (a manual entry process, but they are coming out with a wireless scale that logs it automatically), sleep, heart rate, blood pressure, and even glucose levels. Obviously, you have to measure all of this data yourself, but it’s nice that you can keep it all tracked in one place. There’s also a journal for you to measure your mood, energy, allergies, and your thoughts on each day. All of these are great, but the greatest tool in their arsenal is the food tracker.
This is where gamification has affected me dramatically, and here’s the best part: it’s actually free for anyone to use, even if you don’t buy a device.
Never in my entire life have I really worried about what I’ve eaten. Don’t get me wrong, I haven’t been gorging myself on Twinkies and Hostess Pies, but I’ve also never been a guy to turn down another piece of pizza. That has resulted in my gaining about 4 pounds a year, every year, since high school. Yes, I am actually (as of today) 70 lbs. heavier than I was when I graduated high school. But I was also a three-sport athelete good enough to be a Division 1 collegiate diver. I graduated high school at 135 pounds, and don’t have any expectations of getting back to that. My target weight is 170.
Back to the food tracker. I enter everything I eat, after every meal. 80% of the time, the site already knows about my food. Most restaurants’ entire menus are listed, with nutritional information, and I can just search for my entrée. For the food I make at home, most of my groceries are represented, or a similar substitute is there. If there isn’t, they give you the ability to update their database with your new item in about 5 seconds, and then add that food to your log.
This little box is almost exclusively the reason I am losing weight:
There’s only three pieces of data, but they absolutely dictate how I’m going to eat the rest of the day. First, there’s how many calories I’ve eaten today. It’s a useful way to make sure that I have consciously added all of the food I’ve eaten. If the number seems low at 3:00pm, I probably didn’t enter my lunch food yet, and I should do that.
Second is the “under goal” number. This number, for me, is a "you will not exceed this number,” type of value. I never, ever let myself eat something that will take me over that limit. This is where the gamification, for me, comes in. If I get invited out to one of my favorite restaurants, I am not going to opt for the salad while crying little tears for my favorite foods. (I’m looking at you, 900 calorie Firecracker Chicken at Molly’s Woo’s.) Instead, I make compromises with myself. “I can have that delicious chicken, but I’m going to have to be careful at dinner. Maybe just a bowl of soup and some crackers.” By never letting myself go over the number, I am losing weight at a record pace (for me), and I’m still not hungry. In fact, I’m still eating whatever I want, for the most part. But I might only have 1 slice of pizza at a user group meeting instead of my standard three.
Finally, there’s the weight goal. This is how everything gets determined. When you first set up the tools (which again, are free for anyone to use), it asks you to set a weight goal.
Next it asks you about how aggressive you want to be in getting to your goals. I chose “Medium”, primarily because “Easier” seemed too easy, and “Kinda Hard” and “Harder” seemed almost unhealthy.
Every morning, I step on the scale, and add it to my FitBit log. Based on the weight I’ve lost (or gained, it happens), it will dynamically update my estimated date until completion. I don’t want to see that date move into the future, I want it to get closer to now. This is my motivator.
In short, I’m losing weight effectively for the first time in my life, and I haven’t even started adding real exercise to my regimen. As the weather warms up, I’m sure I’ll take a few trips around the neighborhood each night. It’s still very early, but I truly believe that having a consciousness about what I’m eating is having a direct impact on my life.
I think that the FitBit device is an astounding piece of technology engineering, and it is providing me with the confirmation that I’m a sedentary software developer that needs to get on his feet more. I don’t think that the device alone is enough to have an effect, however.
You need the desire to change your eating habits, if only slightly, and the willingness to record everything you eat. Omitting that Baby Ruth is only cheating the system for yourself.
If you do decide to pick up a device, add me as your friend on the site. My username, not surprisingly, is jeffblankenburg. I’d love to have a few more people pushing me to take a few more steps every day.
Finally, there’s apps available for using FitBit on the go (there’s also an API, if you’re feeling ambitious). You can’t sync your device remotely (unless you have the receiver plugged in to your internet-connected laptop), but you can enter your data, food, weight, etc. Here’s my picks: