kmod's blog


Understanding Richard Stallman

I've never really understood Richard Stallman and what he fights for, but with this recent email of his to the gcc list (on a thread about the impact of the GPL vs the BSD licenses on the gcc vs clang projects, which is worth a read), I think I have a better idea.  It starts very simply:

Non-free software is an injustice.

After reading that, I think I have a much better understanding of both him and free software debates like the one that email was on.  I think this is a case of one side seeing the argument as a technical one, and the other seeing it as an ethical one.  The best analogy I can think of is abortion: it doesn't matter how many stats might be true about abortion leading to better lives, if you believe abortion is murder, then there's no way that the benefits could  justify it.  Furthermore, it'd be pretty understandable to think that people suggesting murder have pretty troubled consciences.  You'd be seeing the other people as saying "hey I think murder is ok, but to each his own right?" which is something that I hope you're not ok with.

In these cases it feels silly to try to reason with the side that sees it as an ethical problem, since to them it's inherently not about what is reasonable or not.  I'm not trying to say that that makes them "unreasonable", just that that particular point is one to which they don't think reason applies.  For instance, the "correct" reaction to A Modest Proposal is abhorrence, no matter how much "sense" it might make; it doesn't mean that you don't understand the need to fight hunger, just that you think eating babies isn't something that is in the class of things that can be justified.

I feel like whenever I realize this about a debate I relax a little, because there isn't much you can do: either you think there's an ethical problem or you don't.  While the ethicists can debate on it, I feel like there isn't much grounds to say that one ethical stance (issue vs non-issue) is more justified than the other.  I think the only thing to be done is what some hardcore FSF people are decrying as a "popularity contest", and to lay out the arguments for both sides and see how people feel.  For example, conspiracy theorists might be able to come up with a theory that can't be refuted and claim that whether it happened isn't a popularity contest, but I think people might say something like "most reasonable people would not agree with that argument" or that "the general agreement is that it didn't happen"; I think the same kind of resolution-system  applies to these debates.

Anyway, I don't believe that fetuses are people or that non-free software is an injustice; I'm happy to get the sense that popular sentiment is going in that direction as well, but so long as there are people who view the issues ethically, I don't think the debates are going anywhere.

Filed under: Uncategorized 1 Comment

New toy: USB microscope

As I've moved to smaller and smaller parts, I've spent more and more time inspecting small details of my boards.  I've bought a couple things that I use for this purpose: a simple 10x loupe, a maybe 2-3x magnifying glass that I took from a helping-hands thingamajig that I don't use, and this magnification visor.  That last one I use pretty regularly when I'm soldering, and has a flap that lets you choose between 1.5x and 3x which is pretty nice.  The other two I use when inspective my work afterwards, since they're slightly nicer but require a free hand to use.  I also use them to take pictures from my phone in order to increase the optical magnification.

The last thing that I've wanted, which I finally got, is a USB microscope.  I caved when I saw this one for only $27 since that's "what the heck" money, and to my surprise it's relatively easy to use (even on Linux) and has decent quality.  To get it working on Linux I had to install guvcview, which worked like a charm.

The microscope claims "20x-200x magnification", but it looks like the magnification is fixed at 20x and then I presume their software will do 10x magnification if you want.  The stand that comes only gives you enough space to barely keep the microscope above a circuit board with its components; I did some testing, and it looks like the maximum focal length is about a foot, so it's capable of taking much wider pictures if you can somehow keep it steady.  All the photos I took are at more-or-less maximum detail.

Here's a sample pic, of some hot-fixing I did on the board I was playing around with:


There were orginally four capacitors in a row here, but I took these two out and shorted them, and used some component leads to help the solder bridge the gap.

One thing that I check the most is the soldering quality on SMD parts.  Here's a pic showing some of that:


Unfortunately I'm not sure that this works so well for that purpose; I'm not sure what the biggest issue is, whether it's the glare from the LED backlight, or maybe if it's just a limit of using a mono-microscope instead of a bi-microscope (not sure what the actual terms are), which limits the perception of depth.  Here's a test with the backlight off, that I took to see if that reduced the glare:


I tried to not disturb the alignment, but it's basically impossible to keep the microscope exactly steady as you make any adjustments to it, such as changing the backlight power, or changing focus.

And lastly, a picture of where there was a fire:


For this picture I moved my lamp closer to the board and used that instead of the LED light, which I think gave a much nicer picture, though there is a big shadow from the microscope itself.


I'm not sure how much I'll be using this, but so far it's been fun.




Filed under: Uncategorized 1 Comment

Brookstone’s “Bluetooth-Enabled Smart Fork”

Can't make this up:

The smart fork that coaches you into healthier eating habits.
The HAPIfork is the world’s first smart fork. It’s an electronic fork that lights up and vibrates when you are eating too fast. As it takes 15-20 minutes to feel satisfied, by simply slowing down your pace while eating, you will consume fewer calories.

Pair with your smartphone or tablet over Bluetooth® to see your eating stats in real time.
Download the HAPIfork app for iOS or Android and connect it to your device via Bluetooth® to check:

  • How long it took to eat your meal
  • The number of "fork servings" (each time food is brought to the mouth) per minute
  • A timer to help you pace your fork servings
  • Actual intervals between fork servings
  • Your success rate and overspeed ratio

Filed under: Uncategorized 1 Comment

Treasuries are a Giffen good

A Giffen good is something that people buy more of as prices increase, seemingly working against standard supply-demand theories.  They're different from luxury goods, which have similar behavior; luxury goods are assumed to become more desirable as they become more expensive, since they are more status-providing.  A Giffen good, however, is purchased more because as the price rises, the consumer can no longer afford to purchase higher-quality goods.  Normally, these two effects -- wanting an inferior good less as it goes up in price, and having lower purchasing power as goods become more expensive on average -- combine so that you buy less of something as it becomes more expensive.  For a Giffen good, the opposite is the case.  Wikipedia, as always, is a good source of information on the subject:


So going back to the topic of the post: US Treasuries.  In light of the S&P downgrade of US sovereign debt, investors have done a "flight to quality", where they allocate more money to investments with lower risk.  Articles such as this mention how investors have "dumped equities in favor of traditional havens like gold and U.S. Treasury securities" (emphasis added).  Yes, because of the credit downgrade, people are flocking to US Treasuries -- the very thing the credit downgrade was about.

While it seems counterintuitive at first, it makes sense when Treasuries are thought of as a Giffen good.  In this case, all "prices" are measured in terms of risk.  Investors roughly have a certain amount of risk that they are willing to take on, which represents their "budget".  Treasuries are a cheap, but low quality, way of spending this risk budget.  The credit downgrade increased the risk -- or "price" -- of Treasuries, and suddenly everyone's risk budget has been slashed.  Because investors can't afford as much risk, they have to go back to buying the things that are cheap to satisfy their purchasing demands.  This explains why, when the S&P says that US Treasuries are not as risk-free, rates actually decreased.


Of course, this all assumes that the credit downgrade is the only thing on investors' minds, and it only directly affects Treasuries.

Filed under: Uncategorized 2 Comments

Credit card gift cards

I'm not sure why, but lately I've been seeing a lot of prepaid credit cards being advertised as gift cards. And why not -- it's like giving a gift card but without constraining where you can spend it. It's great for the credit card companies, since they make money, and good for the gift giver I suppose, since it seems more thoughtful than giving cash.

I'm sure the credit card companies make quite a bit of money off these things. First, there's the transaction fees that they charge on any credit card transaction, that I doubt they waive for products they market as gift cards. Second, there are the hefty maintenance fees that they charge, up to $50 a year. Third, there are activation fees (though thankfully I haven't any evidence of a card that charges both an activation fee and maintenance fees). Fourth, and possibly most lucratively, is that the credit card company gets all the money that you don't spend on the card.

And this is a story about how much work it was to spend almost all the money on the cards. When you think about it, how exactly would you charge $100 on a credit card? Unless you have a lot of time on your hands, the only way to do that is with the cooperation of the merchant. Some brick-and-mortar cashiers are nice enough to ring up your transaction separately. Some online merchants (, for instance) let you pay with multiple credit cards and specify each one.

Oh wait, did you forget about the one dollar holds that most merchants issue to make sure your credit card is valid? It's ok, I did too. That means that you have to ask the merchant to put $99 on the card. Or you have to get them to put the hold, wait the few days until it disappears, then go back. Too much work for a dollar? The credit card company is counting on you thinking that.

I found what I consider to be a decent solution: I used my prepaid cards to buy myself Amazon gift cards. Amazon gift cards, compared to the prepaid cards, are far more flexible. They are applied automatically to any purchase on, can be used partially or to pay for part of an order, and never expire. This is great, since I can just transfer the money to my amazon account and be comfortable knowing that I'll spend it eventually.

Oh, but what billing address did your gift giver sign you up for? Of my three cards, one was easy, since they only had one of my addresses. For one of the other two, I had to try a number of address+phone number combinations until Amazon could get the charge through. For the other one, I had to go to the gift card site and enter my billing information.

In the end, I managed to get all but $2 of the money transferred to Amazon. And spent an hour doing it. Not that I'm not thankful for the money that I received, but if you're considering giving someone one of these prepaid gift cards, do everyone a favor and get them an Amazon gift card instead.

Filed under: Uncategorized No Comments

Brawny vs wimpy cores

Interesting writeup in favor of brawny cores, by Urs Hölze:


Seems like the big argument is that many operations are latency-oriented, rather than throughput-oriented.  This is clearly true for web processing when a user is waiting for a result, but he makes the point that throughput-oriented batch processing is latency-sensitive, and becomes moreso as you add more cores (because you wait until all jobs to finish).

Filed under: Uncategorized No Comments

Chrome defaults: Windows vs Linux

I have a list of tabs that I open every day, which I store in a folder in Chrome.  Recently the size of this folder passed some threshold, and now Chrome asks me if I'm sure I want to open so many tabs at once.

Interestingly, the default choice on Windows is "Yes", whereas the default choice in Linux is "No".  I assume they did this deliberately, so that makes me wonder what this says about Windows versus Linux programs and users.

Filed under: Uncategorized No Comments

Email reminder services

I'm a big fan of email reminder services, since my email inbox is the only thing that I reliably check on a regular basis.  It's extremely convenient for me if I can set up something to ping me via email to remind me when I need to do something.

So I've used a couple services over the years: first, I used, which was a pretty cool site.  But the company behind it eventually closed down, and shut down the service.  So I switched to, which was also pretty good.  But now they've decided to discontinue the service.  Now I've decided to try out  I've only just entered in my reminders, but it seemed pretty painless and I assume that the reminders will work as I want.  Let's hope that they stay around...

What is it about these products that make them so hard to maintain? mentioned how they spend a disproportionate amount of their time dealing with spam, which I suppose makes sense.

Filed under: Uncategorized 1 Comment

Google Native Client

I saw this interesting blog post today about where the Native Client (NaCl) team is going.  I thought the idea was really intriguing: you compile your code once to LVM bitcode, and then each browser has a JIT'er that will turn that into fast native code.  It seems like a possible natural progression from sending scripts across the web; now, the site owner can do a one-time compile step on their powerful server, and get a lot better performance for their clients.  Cool.

But then I thought -- wait isn't this like Java?  The promise of Java was that you could take your code, compile it once, and then run the resulting bytecode anywhere.  I think there are a couple things that NaCl can and will do better than Java: better security model (I think the problem with Java was that developers were limited to writing "Applets", which wasn't great), and better performance.  But neither of those seem like they're fundamental to the two designs; it seems like you should be able to design a good JIT'er for Java bytecode almost as easily as for LVM bitcode, and it seems like the security of the two systems could be made just as good.  Maybe it's just the right time for NaCl, or maybe Google/the open source community will execute better.  Or maybe NaCl will meet the same fate as Java on the web.

Filed under: Uncategorized No Comments

Worth more than you’ll pay?

I remarked today to someone that a PS3 is "worth more than I'd pay for it".  (Specifically, receiving a PS3 as a gift is worth more than I'd pay for it.)  What I really meant to say is "worth more than the maximum I'd pay for it".  So the question is, is that true, and are there are things for which that statement is true?  Or the reverse, something that's worth less than the maximum I'd pay for it?

I think it's true, which means that I'm irrational about PS3s.  Or that the standard concept of "rationality" fails to capture some sorts of value, such as the value in terms of how I received something, not just what I received, and that there may be non-monetary forms of value.  Another example that I've thought of is airport food: It's probably worth the price to me, but I'm not going to pay it out of principle.

I feel like these are pretty classic cases of (economically) irrational decision-making.  I don't want to pay the airport prices since I feel like vendors are being too greedy; this is similar to the ultimatum game where people don't accept small amounts of money because it shows that the other person is being too greedy.  And received the PS3 must hook into some other suitable irrationality.

I haven't, though, been able to think of something that's worth less than the maximum that I'd pay for it, except for things that I buy by mistake, or things that turned out to be less valuable than I expected them to buy when I bought them.  I might be missing something, but if this is true, it means that my irrationality is asymmetric: I'll hold off on buying things that I probably should actually buy, but I (seemingly) don't buy things that I shouldn't buy.  Perhaps it's just that when I buy something, I'll automatically inflate the perceived value of the item to match what I pay, even if it wouldn't be worth that separately, and then later when it resets I interpret that as "discovering" it wasn't worth as much as I thought, instead of "realizing".

Filed under: Uncategorized No Comments