The Emperor of All Maladies review
Mood: happy
Posted on 2012-02-04 19:59:00
Tags: reviews books
Words: 82

The Emperor of All MaladiesThe Emperor of All Maladies by Siddhartha Mukherjee
My rating: 5 of 5 stars

This was an excellent book. I wasn't particularly interested in the history of cancer before reading the book, but the book is very well-written and held my interest all the way through. (not an easy task, given its length!) It's a story of many ups and downs (mostly downs), but it sounds like there's a reasonable amount of hope for the future. Highly recommended!

View all my reviews

0 comments

First, Break All the Rules review
Mood: thoughtful
Posted on 2012-01-27 23:08:00
Tags: reviews books
Words: 898

First, Break All the Rules: What the World's Greatest Managers Do DifferentlyFirst, Break All the Rules: What the World's Greatest Managers Do Differently by Marcus Buckingham
My rating: 4 of 5 stars


This past week I took some manager-y classes at work. One of the books we were supposed to read was First, Break All the Rules. I got a lot out of it and so I thought I'd review it. Here's what it's all about:

Keeping employees engaged is (or should be) very important for businesses, but a lot of companies don't do it well. Gallup did a bunch of studies and came up with a set of 12 questions that correlated positively with having engaged employees. They are:

1) Do I know what is expected of me at work?
2) Do I have the materials and equipment I need to do my work right?
3) At work, do I have the opportunity to do what I do best every day?
4) In the last seven days, have I received recognition or praise for doing good work?
5) Does my supervisor, or someone at work, seem to care about me as a person?
6) Is there someone at work who encourages my development?
7) At work, do my opinions seem to count?
8) Does the mission/purpose of my company make me feel my job is important?
9) Are my co-workers committed to doing quality work?
10) Do I have a best friend at work?
11) In the last six months, has someone at work talked to me about my progress?
12) This last year, have I had opportunities at work to learn and grow?

Note that there are are no questions about pay, benefits, etc., because those things are important to all employees, while these questions are better at identifying the best employees. The percentage of employees that answer yes to these questions varies a lot between "business units" of a company, and so seems to be tied to the manager (even questions like #2, which should be pretty consistent across a company). The 12 questions also correlate positively to productivity, profitability, retention, and customer satisfaction on a business unit basis. There's an elaborate mountain climbing metaphor, but the gist is that you need to have people saying "yes" to the earlier questions before you worry about the later ones. In fact, the first 6 are the most important.

So, managers are important! "People leave managers, not companies" is pretty true. There are four main things a manager needs to do to be a good catalyst: select a person, set expectations, motivate the person, and develop the person.

Select a person: Everyone has talents or strengths, and they're somewhere between hard and impossible to change. This is (not coincidentally) the theme of the whole Strengths Finder stuff, also by Gallup. When we're a child, our brain has a ton of pathways, but as we get older some get stronger as some go away. The ones that get stronger correspond to our strengths, things we're good at, and this is somewhat helpful in realizing that our strengths aren't really going to change. There are three main kinds of strengths: Striving (what motivates you), Thinking (how you think and come to decisions), and Relating (whom you trust and build relationships with). Finally, all roles require talent, even ones that might seem menial. (they give an example of talking to great housekeepers)

Set expectations: The key here is to define the outcomes you want your employees to accomplish, and not force them to take the steps you would take. Because people have different strengths, they may approach problems in different ways, and that's OK as long as the results are the same. Of course, in some cases the steps are required. (ensuring accuracy, safety, following industry standards, etc., etc.)

Focus on strengths: Don't try to fix people's weaknesses in most cases, because you won't be able to. Focus on their strengths and making them even...um, stronger. Try to find the right role for people that fits their strengths. Spend the most time with your best people to help them achieve even more. (this suggestion in particular is challenging) Sometimes you do have to manage around a weakness - try to devise a support system (give a Rolodex to someone who can't remember names), find a complementary partner, or find an alternative role.

Find the right fit: The Peter Principle says we promote each person to his level of incompetence. So...don't do this! The way around it is to have "heroes" in every role. If someone's a great software engineer but isn't interested in management, let her do that if she wants and don't force her up the hierarchy. (this is what lawyers do - even once you make partner, you still practice law!) For this to work, there have to be prestigious roles that are still individual contributors, and there needs to be broad bands of pay so you don't feel like you have to move up the ladder to get more money. If your organization is more traditional and won't let you do this, do your best to shield your employees from the rules. Thank goodness NI gets this :-)

--

Admittedly I'm easily suggestable, but I really bought in to the book and its philosophy. It's one of the commonly read books at NI, and we seem to try to follow a lot of its ideas. (borrowed, not owned)


View all my reviews

0 comments

it's-been-a-while links
Mood: tired
Posted on 2012-01-27 17:00:00
Tags: links
Words: 84

- A heavily annotated State of the Union. Having not watched the actual address, I found it pretty interesting.

- The Supreme Court ruled 9-0 that tracking someone GPS counted as a search, and requires a warrant - yay!

- Apparently Washington state has the votes to legalize gay marriage. Yay!

- How to nap - I've never really been much for napping. But maybe I should!

- Uncloaking a Slumlord Conspiracy with Social Network Analysis - graph theory to the rescue!

- Very odd story about a break-in in Philadelphia (via kottke)

0 comments

FlightPredictor: Android milestone, WP7 progress
Mood: cheerful
Posted on 2012-01-24 18:06:00
Tags: windowsphone projects android
Words: 267

FlightPredictor for Android has reached a milestone - as of the end of December payment, I've now officially made money on it! It cost $25 to register an Android account and I've finally made more than that on sales. Sales seem to be picking up lately: obviously the raw numbers are still pretty uninspiring, but progress is progress. Perhaps it's because of the four 5 star reviews it's gotten on the Android Market. I also sold one (yes, one!) copy on the Amazon Appstore, and am up to 11 cents in ad money from FlightPredictor Lite.

For Windows Phone, I've been hitting the app pretty hard, and have implemented a lot of features - enough, in fact, that I can make a list of everything I want to do before release. It's on a sheet of paper, but in case it gets wet or something, here it is:

- make it tombstone-safe (i.e. save state when backgrounded)
- show airport delays
- show airport maps
- will have to download these after app install - figure out how versioning will work!
- about screen (attribution)
- settings screen (necessary?)
- flight info - add when it was last updated, make sure nothing else is missing
- make live tile have an image with status/prediction for its background instead of text
- TODOs in code (down to 20 or so)
- show airline contact info
- make reloading flights on main page consistent
- send all flights (email/SMS)
- make real icons for app
- decide what to do about trial version and do it
- mutex in background agent for communicating? (see EvenTiles discussion)

So...still a long list, but these are all pretty well-defined tasks. Onward!

2 comments

two work vignettes; or, debugging is fun!
Mood: tired
Posted on 2012-01-19 14:20:00
Tags: essay work programming
Words: 414

1. I had a bug filed to me about a hang happening. It started happening after some code I submitted in September that seemed pretty unrelated - I added a flag to let some calls be made in a certain way that _could_ cause a hang, but I only made one call behave that way, and I was pretty darn sure that wasn't happening in this particular example.

So I tried to debug what was happening with the hang, but I don't have a lot of experience figuring such things out, so I asked someone over to help. It took a few hours and we didn't learn too much except it did seem to be related to the flag I added.

After stepping away from the keyboard a bit, I did some thinking, and realized that the only thing that made any sense is that my flag must be set on the call that was happening right before the hang. I couldn't see how that would have happened, but I had an outlandish and unlikely theory.

The next day, I was eager to check it out, and lo and behold the flag was being set! When my breakpoint got hit, I was giddy with happiness because I had reasoned out the problem. Although my outlandish theory was totally wrong (the real culprit was a 64-bit int being silently coerced to a 32-bit int...grrr), I was happy I had deduced what must be happening.

Lesson: I'm often eager to jump in and start debugging, but thinking about the problem (i.e. playing "What Do We Know?") can be valuable too.


2. I was debugging a different problem, and I knew some part of a data structure was returning some sort of error code from a particular operation. Unfortunately, I was debugging a release build, and so I didn't have an easy way of figuring out which one since there was very little debug information about local variables, etc.

So, I dropped down to disassembly (which never lies!) and stepped through one statement at a time. When I found that a particular call returned an error, I would "Set Next Statement" to before the assembly was setting up the call and then step into it. It took a little while, but I was comforted that I was guaranteed to find which part of the structure was returning the error.

Anyway, it was neat because I felt like I was totally in control of the executing code. Fun times!

0 comments

First Windows Phone 7 app published!
Mood: excited
Posted on 2012-01-14 11:11:00
Tags: windowsphone projects
Words: 29

My first Windows Phone app has hit the Marketplace! It's a port of PasswordHash for generating passwords from a master password and a domain, and here's the Marketplace page.

0 comments

Maphead review
Mood: tired
Posted on 2012-01-11 23:44:00
Tags: reviews books
Words: 83

Maphead: Charting the Wide, Weird World of Geography WonksMaphead: Charting the Wide, Weird World of Geography Wonks by Ken Jennings
My rating: 4 of 5 stars


Enjoyable book! I wasn't sure about it at first, but it brought out the (somewhat) closeted maphead in myself. There are chapters on lots of different map-related topics (geocaching, the Geography Bee, roadgeeks, etc.) and while some are better than others, it was a good read. It helps that Ken Jennings is a pretty entertaining writer.

(paper copy, available for borrowing)

View all my reviews

0 comments

most depressing football game ever?
Mood: okay
Posted on 2012-01-10 15:06:00
Tags: essay football
Words: 196

As someone who was rooting to LSU, last night's 21-0 loss to Alabama in the national championship game (ESPN, Wikipedia) was the most depressing football game I've ever seen. Alabama made 5 field goals (plus one missed one, and another one that was blocked) and while LSU's defense kept them out of the end zone until 5 minutes left in the fourth quarter, the fact that they were able to attempt 7 field goals is an indication that their offense was just good enough.

Of course, the real fault was the LSU offense - the defense kept them in the game much longer than they deserved. Time after time they'd throw short-to-negative-yard passes and the Alabama defense would jump all over them. But the fact that they were in the game until the middle of the fourth quarter, yet could never score or even get close, made it all the more painful and depressing.

(the most devastating game I've ever seen, of course, is The Comeback, when the Houston Oilers were leading 35-3 in the third quarter and managed to lose. I watched the whole game and went to my room and cried after it was over...)

0 comments

#FitBit review (and my health goals)
Mood: happy
Posted on 2012-01-09 11:58:00
Tags: reviews
Words: 484

I got a FitBit for Christmas! I've been wearing it for almost two weeks, so I thought I'd write up my impressions so far.

How it works: The short version is that it's a pedometer with Bluetooth, so it automatically syncs your data to the FitBit website. (it stores your data on the device for up to 7 days, so as long as you sync it before then it will maintain the data at 5 minute intervals) It also measures floors climbed (apparently there's a tiny barometer inside: neat!), and, in my informal testing, does a good job of accurately counting steps and measuring distance.

The device itself is tiny and cute, and has a small OLED display (works well except in direct sunlight) where you can cycle through steps, distance, floors climbed, calories burned, the current time, and your current "activity score" (in the form of a flower), which measures how active you've been over the last hour or so. It comes with a belt clip, which is convenient.

My goals: The website does a good job of gamefying exercise - you get badges for number of steps per day and total, and the same thing for number of floors climbed. Here's my public profile, and you can also keep track of how friends are doing and such.

I'm sticking with the fairly standard goal of 10,000 steps per day (or really 70,000 steps per week) which is high enough that I have to go out of my way to get it, but not so much that it feels impossible to do on a regular basis.

To help, I've come up with some checkpoints throughout the day - 1000 steps by the time I get to work, 3000 steps when I get back from lunch, 6000 steps after my afternoon walk, 7000-7500 when it's time to leave work. That still means I have to take breaks during the day and walk around the floor, etc, but it's not a crazy amount all at once, and keeps me from worrying about it too much; as long as I hit the checkpoints I'm on track.

Incidentally, this is usually a fair bit harder on the weekends unless we're running a ton of errands or something. (grocery shopping is particularly step-friendly :-) )

Results: It's still early, but I did my first 70,000 step week last week, and have been at (or very close to) 10,000 steps every day. So: success so far, but the tricky part will be maintaining this throughout the year.

I think I'm going to try this by worrying a bit less about my weight. I would like to lose some weight, but all the recent articles showing how hard that is have left me a bit wary of that goal. So even if I don't lose weight, being active every day in a quantifiable way will still improve my health. We'll see how it goes!

2 comments

pre-Friday links (or; first links of 2012!)
Mood: cheerful
Posted on 2012-01-05 10:42:00
Tags: gay links
Words: 219

- Rumor is Nokia will be announcing the Lumia 900 at CES next week - if they do, I'll almost certainly pick one up...even if I have to switch to AT&T. (grumble grumble)

- Speaking of Nokia, here's Nokia Maps 3D (using WebGL!) May not work with every browser - worked for my Firefox at home but not at work, but Chrome seems to handle it. Unfortunately there's only city-level data for a few major cities, but it's pretty awesome to pan around London...

- How Doctors Die - pretty sure I linked to a similar article some time ago. Anyway, it's hard to know when to "give up hope", and I hope if I'm in that situation I can get good advice from my doctor.

- The Battle Over Gay Marriage Set To Go Nationwide - looks like 2012 will be a big year. Go Washington, Maryland, and Maine! (and boo North Carolina, Minnesota, and New Hampshire)

- Welcome to the Age of Overparenting - thoughtful article about backing off and giving kids more independence. (thanks David!)

- The United States Government Debates Whether the X-Men Are Human Beings... In Real Life

- 2011 Lesson #2 : Don’t Carpe Diem - don't stress about enjoying yourself every single minute! (also, things are more fun in retrospect, which if fine) (thanks Liz!)

- Why do we pay sales commissions? - good article from Fog Creek.

2 comments

The Money Culture review
Mood: cheerful
Posted on 2012-01-04 22:29:00
Tags: reviews books
Words: 76

The Money CultureThe Money Culture by Michael Lewis
My rating: 3 of 5 stars

The book is a collection of short (3-4 page) vignettes about the financial industry in the 1980's. The are three sections: about America, Europe, and Japan. The stories were occasionally interesting but I'm not familiar enough with the 1980's for most of them to really resonate (although I did learn about leveraged buyouts, I guess). Anyway, it was OK enough.

View all my reviews

0 comments

Happy New Year! (for civil unions)
Mood: cheerful
Posted on 2012-01-03 14:31:00
Tags: gay
Words: 15

Now civil unions are legal in Delaware and Hawaii, thanks to laws passed last year.

0 comments

final links of 2011
Mood: confused
Posted on 2011-12-30 14:02:00
Tags: links
Words: 212

- Is Windows Phone's consumer focus killing it? - sad article suggesting that one reason WP7 isn't succeeding is that the carriers can't customize it enough. (i.e. bundle crapware, etc.)

- Bishops Say Rules on Gay Parents Limit Freedom of Religion - this is one of the toughest areas where the rights of the Catholic Church to serve who they want meet the principle of the government not funding groups who discriminate. I think the government's made the right call here, but it's very tricky. (also: Catholic Charities received almost $3 billion from the government in 2010? I had no idea they received so much...)

- A long article about how hard it is to lose weight for some (most?) people, and how your body works against you. Depressing!

- Information about "Big Bird" was just declassified: in the 70's we were taking extremely high resolution pictures of the Earth and then jettisoning the film canisters to be collected in midair!

- Everything You Know About Education Is Wrong - money isn't enough, and teacher feedback and instructional time matter.

Year end stuff:

- The 11 best psychology books of 2011 - I got "Thinking, Fast and Slow" for Christmas and haven't read any of the others...

- Finally, a best articles of 2011 list if you're looking for more time to waste.

0 comments

taking joy in fixing a badly broken LJ app
Mood: cheerful
Posted on 2011-12-29 17:10:00
Tags: lj for webos essay palmpre projects programming
Words: 211

After the latest LJ release, I got a few emails saying LJ for WebOS was badly broken, and lo and behold they were right.

I was not excited about fixing the app, since I knew the code for parsing posts, which is most of what broke, was pretty brittle and terrible. (c.f. "don't parse HTML pages with hand-written state machines") And I don't even use the app much anymore, and it's certainly not going to sell many more copies since it only works on webOS phones, which are not exactly flying off the shelves, and new ones might not exist. So I toyed with the idea of dropping support entirely, but that just felt wrong, even though I'd rather be working on new shiny apps for Windows Phone 7.

Last night I took the first serious stab at fixing things, and it turned out to be much more fun than I had hoped. The app was so nonfunctional it felt like writing a whole new one, and it turns out the new page format is a bit nicer to parse to boot. So I've fixed maybe 60% of the issues already, and hopefully I can fix the rest by next week sometime (pending New Year's festivities) and get back to WP7.

2 comments

Practical Cryptography review
Mood: okay
Posted on 2011-12-28 17:48:00
Tags: reviews books
Words: 253

Practical CryptographyPractical Cryptography by Niels Ferguson, Bruce Schneier

My rating: 5 of 5 stars

This book is somewhat of a sequel to Applied Cryptography. Where that book is a long list of lots of different neat cryptographic algorithms, this is a much more practical book which gives solid advice on what algorithms, etc. to use.

It also hammers again and again that security is only as valuable as its weakest link, and often that won't been the cryptography. As such, it covers a ton of different ways security can be compromised, including using cryptographic functions in the wrong mode, not verifying every protocol message back and forth, bad pseudorandom number generators, side-channel attacks, attacks on the clock, etc. It was kind of depressing, honestly :-) The first sentence of the preface is "In the past decade, cryptography has done more to damage the security of digital systems than it has to enhance it." Later section titles include "Cryptography Is Very Difficult", followed by "Cryptography Is the Easy Part".

It talks about Diffie-Hellman and RSA in some depth (which means a bit of math), and works through designing a secure protocol. But, its practical advice is to use ones that exist already, and be very very careful. As the authors note repeatedly, "there are already enough insecure fast systems; we don't need another one."

Anyway, this is an invaluable book if you're working on security in any shape or form, and I found it quite interesting regardless.

(paper book, available for borrowing)


View all my reviews

0 comments

More Windows Phone impressions
Mood: geeky
Posted on 2011-12-24 22:28:00
Tags: windowsphone
Words: 532

I've spent a few more days playing around with Windows Phone 7, so here are more impressions comparing it to my Palm Pre:

- The Pre has a physical keyboard (and no virtual one), so I wasn't sure how I'd adapt. The virtual keyboard on the Focus S isn't as good as a physical one, but it's pretty good, and I'm impressed with the predictive text. It's also nice to always have the keyboard available - on the Pre it was a bit of a mental hurdle to slide it out.

- Live tiles are nice, but they serve two distinct purposes. One is for commonly used apps: aside from live tiles, all you get are all apps (minus games; see below) in a big alphabetical list, although there is an easy way to jump to a particular letter. The other is a replacement for notifications: you can "pin" various pieces of data (like, say, flights you're tracking!) and they can be updated by background apps. I wish there was a way to organize tiles better, and maybe a way to see apps in most recently downloaded order.

- You can't bookmark apps in the marketplace in case you see one to buy later. That makes me sad.

- It's nice that there's a common framework for making trial apps (and as a developer you can limit it however you want), and you can upgrade by buying the full version without having to redownload. But there doesn't seem to be a standard way to get from the trial app to the Marketplace to buy it, and most trial apps don't even have a button in the app to upgrade?? Maybe I'm missing something?

- Pretty sure this is a hardware issue, but the light sensor on this Focus S is a bit wonky; sometimes the screen brightness flickers lighter and darker.

- The People hub is a nice aggregation of Facebook and Twitter.

- On my Pre, I'm used to opening my Twitter client, tapping any links that look interesting (which opens them in separate cards), then reading them one by one. This is harder now, since to emulate it I have to click a link, and then press the back button, and hope all my tabs stay around. And it means I have to set all links to open in new tabs, so I have to remember to close each one when I'm done with it, which I've forgotten multiple times.

- Having an "accent color" that you can change (with lots of good options!) is cool. Most built in apps use the current accent color as a background on their icon, so it really changes the look of the phone. (it also means I have to decide whether to use the accent color background for my apps or not...jury's still out on that)

- The way Windows Phone does "multitasking" is by making a long press on the back button show recently used apps that are still in memory and can restore themselves to their previous state. This works well enough for, say, switching to PasswordHash, generating a password, and switching back to IE. It can take a few seconds to restore state, which is a bit of a bummer

1 comment

Samsung Focus S w/ Windows Phone 7 - initial thoughts
Mood: geeky
Posted on 2011-12-21 15:01:00
Tags: windowsphone
Words: 178

Last night my Windows Phone developer device came in (thanks, Jared!) - it turned out to be a Samsung Focus S. I was initially a little disappointed that I didn't get a Nokia Lumia phone, but I was still eager to play around with Windows Phone on a real device.

(some of my impressions are probably colored by the fact that my main phone is still an original Sprint Palm Pre, which is a bit long in the tooth...)

Even so, this phone is quite nice. Setup was painless, and I like the fact that I didn't have to jump through any extra hoops to use it without a SIM card.

The screen looks quite nice - even though the resolution's only 800x480. Scrolling is very, very smooth.

I'm liking the whole live tile home screen thing, although I'm looking for more apps that have interesting/fun live tiles.

Anyway, point is I'm quite happy with the phone/OS, and I'm looking forward to getting one of my own! Hopefully tonight I'll get a chance to try my apps out on it...

1 comment

Stop SOPA! Write your Congresspeople!
Mood: worried
Posted on 2011-12-19 10:11:00
Tags: activism
Words: 369

TL;DR: Write your Congresspeople to oppose SOPA - it takes less than a minute!

There's a new bill aimed at stopping piracy, and it is extremely dangerous to the Internet's health.

The Stop Online Piracy Act (SOPA) makes it easy for IP holders to, if they see infringing content on any other website, stop online ad programs and block access to credit card payments without appearing before a judge or any sort of court order.

A refresher on how it works now: under the Digital Millennium Copyright Act (DMCA), if an IP holder finds infringing content somewhere (say, on YouTube), they can file a takedown notice to YouTube and YouTube is required to respond unless the person that posted the content objects (in which case presumably the IP holder will sue). YouTube is a good example of a "safe harbor" under the DMCA - as long as they respond to takedown notices, they're not required to police their own content. Which is a good thing, because it's nearly impossible to guarantee that no one is posting any sort of infringing material on your site.

Under SOPA, though, just one piece of infringing content anywhere on the site gives the IP holder power to block the entire site, possibly even including messing with the site's DNS entry. This is someone akin to bombing a city block because some guy is selling shady-looking DVD's on the corner.

There's lots of other bad stuff in it, but that's the upshot. Many people involved with the creation of the Internet (including Vint Cerf, one of the "fathers of the Internet") have written an open letter warning about it. Even the Business Software Alliance, who only exists to stop piracy, has serious reservations about it. Many Silicon Valley founders have also written an open letter blasting SOPA. Reddit has said they may have to shut down if it passes.

So: please write your Congresspeople! The bill is still in committee, but is scheduled to be voted on (to go out of committee) on Wednesday...the good news is that it seems like the backlash is having an effect, but as many people as possible need to let their legislators know that this bill is bad, bad, bad.

0 comments

a few holiday pictures
Mood: cheerful
Posted on 2011-12-17 12:59:00
Tags: pictures
Words: 18

Taken over the past few weeks:

Also: a perler bead LabVIEW icon! (now on my desk at work)

3 comments

just a bunch of links
Mood: busy
Posted on 2011-12-13 14:30:00
Tags: politics links
Words: 264

Sorted by the amount of politics, in ascending order:

- The Day I Saw Van Gogh’s Genius in a New Light - was Van Gogh partially color deficient? His paintings, viewed through a filter, suggest they might be.

- A technique for memorizing the two-letter Scrabble words...or at least the ones that start with "a".

- Looks like we're pretty sure the Chinese military have been attacking US companies such as Google, Lockheed Martin, and RSA. Frightening but not surprising.

- Fancy tax graph - the graph is a little confusing, but the different colors/percentage indicate the marginal tax rate, and the y-axis is how much percentage of the total tax revenue that was generated from that marginal rate. You can clearly see the effect of the Bush tax cuts, as there was a sharp drop in the amount of income that was generated by higher tax brackets.

- Speaking of tax policy, a comparison of Newt Gingrich, Rick Perry, and Herman Cain's tax plans. The graphs are very tall because the tax cuts for the rich are so huge.

- Lowe's pulled its ads from the show "All-American Muslim" because right-wing groups complained that it was "propaganda" for Muslims or something. This really really makes me sad. Lowe's has faced some backlash but is not planning on restoring their ads.

- I angrily tweeted earlier, but: Rick Santorum says that "science should get out of politics". This is the backward-est thing I've heard in a long time, and still angers up my blood every time I read it...

- Romney Accidentally Crashes Married Gay Vet’s Date While Trolling for Anti-Gay Votes - whoops!

1 comment

The Guinea Pig Diaries: My Life as an Experiment review
Mood: busy
Posted on 2011-12-13 13:36:00
Tags: reviews books
Words: 385

The Guinea Pig Diaries: My Life as an ExperimentThe Guinea Pig Diaries: My Life as an Experiment by A.J. Jacobs
My rating: 4 of 5 stars

I picked this book up at Half-Price Books and was pleasantly surprised. The hook is that the author spends one month (and one chapter) trying out a bunch of different ways of living. The list of things he tries includes strictly unitasking, outsourcing as much of his life as possible, living very rationally (to the extent of trying 40 different toothpastes to find which is best, although if you include the time spent deciding I'm not sure this is actually rational. But I digress!), emulating George Washington, and being his wife's devoted servant (which seems fair after all she has to put up with :-) ).

I was hesitant about the book because I was afraid it would be excessively gimmicky. The author mostly avoids this (although there is one chapter where he describes posing nude, which doesn't really fit with the rest of the book), and he gives a good background as to why he thinks this experiment will be valuable, as well as ending each chapter with how he hopes to take the lessons he learned and apply them to his life after the month is over.

During one chapter he tries "radical honesty", which includes a similar discussion as Lying, the Kindle Single I read a while back. He comes to the conclusion that it works great for your own flaws and mistakes but he has a harder time calling out other people's (a.k.a. being a jerk) which makes sense to me. The author also interprets "radical honesty" to mean you basically speak every thought aloud, which seems to be taking the concept a bit far.

Things I'd like to work on:
- I try to multitask a lot even though I'm not very good at it. His unitasking chapter convinced me to try to cut down on this and stay focused on whatever I'm doing.
- George Washington was very civil and proper. I guess I could do that more?

The author has a couple of similar books - one is "The Year of Living Biblically" and one is "The Know-It-All" (a year spent reading the encyclopedia). After having read this book I'm eager to give these a shot!

(paper book, available for borrowing)


View all my reviews

2 comments

Setting values on a view: webOS vs. Android vs. Windows Phone 7
Mood: curious
Posted on 2011-12-11 13:00:00
Tags: essay palmpre windowsphone programming android
Words: 574

Now that I'm working on porting FlightPredictor to a third platform (Windows Phone), I have a better idea of the differences between the platforms. This post is about one of the more common things to do: taking values in code and making them show up in a view.

For reference, here's a screenshot of the flight info page of FlightPredictor for Android:

This view is one of the most important ones in the app, and there's a ton of information on it. Let's focus on just one part: how to make the flight times (the "4:35 PM - 5:50 PM" in the upper-right corner) show up on screen.


webOS:
For a blast to the past, let's look at Mojo first. This is the old application framework that is only used for older phones today.

In Mojo, each view is an HTML page, so in our HTML page for the flightInfo view, we include the following:

#{-publishedDepartureTimeStr} - #{-publishedArrivalTimeStr}
(I'm deliberately omitting the layout stuff...maybe I'll cover that in a future post!)
The #{} syntax means to use the property from the templateModel of the scene. (the - means don't escape any HTML in the property). So, my Flight object has these properties, and when pushing the scene I call
this.controller.stageController.pushScene({name: 'flightInfo', templateModel: event.item}, event.item);
The event.item is the Flight object, and since I'm passing it as the templateModel, that's it! All in all, this is pretty simple - as long as the property's already defined in the Flight object, I only have to change one thing (the HTML source of the view) to get it to show up.

--

Now, let's look at Enyo, the new application framework that is used on the TouchPad (and some newer phones). In Enyo, views are defined by JavaScript that generates HTML. (for a real introduction, see Enyo Basics - From the Bottom Up) Here, the FlightInfo kind includes this for the view:
{name: 'currentFlightTimes', allowHtml: true, content: ''}
and then in the create code for the scene, we have:
this.$.currentFlightTimes.setContent( flight.publishedDepartureTimeStr + ' - ' + flight.publishedArrivalTimeStr);
Here we have two things to do, but it's still fairly straightforward to make new properties show up.


Android:

Things are considerably less happy here. First, we have to define the TextView in the layout's .xml file:
<TextView android:id="@+id/flightInfoCurrentFlightTimes">
Then we have to create a variable for this TextView in the Activity class:
private TextView currentFlightTimesView;
Then, in the constructor for the Activity class, we have to get the view:
currentFlightTimesView = (TextView) findViewById(R.id.flightInfoCurrentFlightTimes);
And finally, when we set a flight, we have to set the text on that view:
currentFlightTimesView.setText( flight.getOriginalDepartureTime().getTimeStr() + " - " + flight.getOriginalArrivalTime().getTimeStr());
So that's a total of 4 changes to make, in two different files. This is significantly more irritating than either webOS version, and it really shows up when you have ~20-30 of these to add to the view.


Windows Phone 7:
Back to a world of happiness: with data binding, we can go back to a Mojo-like model and just add this to the XAML:
<TextBlock Text="{Binding PublishedFlightTimes}">
Admittedly, in this case we'd have to add an extra property for this (or make two separate TextBlocks), but there are plenty of cases where I just want a property that already exists. In any event, it's much simpler than Android. Hooray!

So, the final count:




OSChanges
webOS - Mojo1
webOS - Enyo2
Android4
Windows Phone1 (maybe 2)

I would be very curious to see what the corresponding number is for iOS - is there a way to do simple templating?

2 comments

webOS lives!
Mood: hopeful
Posted on 2011-12-09 16:52:00
Tags: palm
Words: 49

webOS will be open-sourced (including the awesome Enyo framework), and HP says they'll make webOS tablets again at some point. I'm very surprised they committed to that, but it seems like webOS's future is a bit more stable now.

Best of all, the webOS employees still have jobs! Hooray!

0 comments

On a revenue basis, webOS >> Android
Mood: energetic
Posted on 2011-12-07 11:23:00
Tags: palmpre projects android
Words: 266

I worked for around 3 months on FlightPredictor for Android. It's not a particularly pretty app, but it is very functional, and I am proud of it.

Since I released it 3.5 weeks ago, I have sold a grand total of 20 copies. At $1.99 each, minus Google's cut and taxes, that amounts to around $20. (and I had to pay $25 to register in the Android Market, so I haven't even broken even) There's even FlightPredictor Lite, a free trial version with ads (that have made me 3 cents so far).

On webOS, a platform whose future has been very uncertain since August, and despite the fact that I haven't released any new apps in a while, and have only made minor updates to FlightPredictor HD (mostly adding airport maps at users' requests), and there's no free trial version, I'm still making $10 a day. Obviously there are a lot of factors helping me out there (TouchPad firesale, the fact that FlightPredictor HD is still a featured app and is in Pivot), but maaan. If I wanted to optimize for revenue, I should have doubled-down (ahem) on webOS.

I guess that makes FlightPredictor for Android somewhat of a labor of love, which is odd since I don't plan on getting an Android phone. It was fun to learn how to make an Android app, though, even if it was frustrating at times.

The Windows Phone version is coming along slowly (busy time of year), and I'm hoping playing around with a developer phone will give me more ideas of how apps generally work on WP7.

0 comments

FlightPredictor progress, a few links
Mood: determined
Posted on 2011-12-02 13:41:00
Tags: projects programming links
Words: 407

The sales of FlightPredictor for Android have still been pretty flat, but it did at least get 2 5 star ratings! And it looks like more people are downloading FlightPredictor Lite, which will hopefully translate into more sales down the line. (as for the ads, I have made a whopping 3 cents so far...so that's not looking too promising)

Having said that, I'm excited to jump into the Windows Phone version. Having just finished a port makes it easier to know how to start, although I'm trying to be careful to port it intelligently, using the nice features of C# and XAML, rather than just making it a direct port. I plan on working in Windows Phone for the foreseeable future so I'd like to take the time to learn how to do things right.

One of the big wins from the Android port was being able to test the updating in the background functionality relatively early. This is one of the riskiest parts, as it's done almost entirely differently on every platform, and it's also somewhat time-consuming to test. I've made a list of basic stuff I need to have ready before I can test that, and I'm just working down the list...there are a lot of parts to FlightPredictor and just sitting down with no plan can be overwhelming, which this helps with.

In the meantime I've been reading a lot about Silverlight and such, and I discovered this free ebook by Charles Petzold(!) about Windows Phone programming, which has been excellent so far. (ironically enough, it's been very handy to read on my TouchPad...) There's also the 31 Days of Mango covering features that are new (and less discussed elsewhere).


A few links:

- The Democrats are trying to extend the payroll tax cut, but the Republicans won't vote for it because they're paying for it by raising taxes on people that make more than one million dollars a year. People affected by the payroll tax: 160 million. People that make more than one million dollars a year: ~350K.

- News Corp (parent company of Fox News) made a gay marriage guide! I know corporations aren't people (ahem), but the cognitive dissonance level is still pretty high.

- Crazy story from the New York Times: apparently Ambien can help people in vegetative states become more responsive and, in some cases, recover to some extent. This makes the long-term prognosis for people in vegetative states even more uncertain...

0 comments

Go earlier/later

This backup was done by LJBackup.