Thursday, March 11, 2010

Today I learned a little about robocopy and exit codes

So, not satisfied with the old DOS command "copy", I decided to step it up a notch and start using robocopy. This way, instead of overwriting the same files every time I rebuilt my solution in VisualStudio, I could skip over those and only update the files that had changed. And there was much rejoicing.

But lo, this tale would have ended much too soon and boringly if that was all there was to it. No, unlike copy, robocopy has the added bonus of exitting with a non-zero value when actually copying a file (and when not copying a file: either returning zero or not returning anything at all- it looks the same to me). VisualStudio interprets any non-zero exit code as "FAIL!". So, digging around, I found the way around this: in the bat file with all the robocopy calls, make the last line something other than a robocopy call, like: echo "Done."

Done. Yay!

Sunday, February 28, 2010

Code Coach

Regarding the state of the economy- a lot of what sucks about it right now is the bursting of the housing bubble, which has resulted in housing construction to dry up. What could really help get things moving again would be if someone were to make a program that was a graphical user interface for the housing code, something that translates from architectural regulation language to layman talk.

Oh look, a friend of mine did just that:
http://www.codecoachresidential.com

Definitely worth checking out if you're considering making some home improvements anytime soon.

Friday, February 12, 2010

British libel reform petition

(a) British libel laws have been condemned by the UN Human Rights Committee.

(b) These laws gag scientists, bloggers and journalists who want to discuss matters of genuine public interest (and public health!).

(c) These laws give rise to libel tourism, whereby the rich and the powerful (Saudi billionaires, Russian oligarchs and overseas corporations) come to London to sue writers because British libel laws are so hostile to responsible journalism. (In fact, it is exactly because British libel laws have this global impact that we welcome signatories to the petition from around the world.)

(d) Vested interests can use their resources to bully and intimidate those who seek to question them. The cost of a libel trial in England is 100 times more expensive than the European average and typically runs to over £1 million.

(e) Three separate ongoing libel cases involve Simon Singh and two medical researchers raising concerns about three medical treatments. They face losing £1 million each. In future, why would anyone else raise similar concerns? If these health matters are not reported, then the public is put at risk.

Sign the petition

Sunday, February 7, 2010

A little story about MetroPCS

So, last year from about February till around September I was on MetroPCS. I was content with their mediocre reception, but was always irked that while on the 45 $/month plan, I was actually paying around 52$ and change with taxes and fees. Then I saw that Boost's 50 $/month included taxes and fees. So I gave Boost a try and was again sufficiently satisfied.

Then this past week I notice that MetroPCS is advertising a plan 40$/month, taxes and fees included, with everything I want. Be still my beating heart, they know how to win me back. So Saturday, I return to MetroPCS. (The lovely sales rep who helped me get reconnected was very pleasant, by the way.) Then this morning, today, Sunday, I wake, try to make a call and get a "You have insufficient funds" message. How odd.

I take my phone back to the store with my receipt and am told that while I ordered and paid for the 40$ plan, the system actually has me on the 45$ plan, which is really weird because I was able to make and receive calls yesterday no problem. The guy who is helping me now asks his neighbor coworker who did this. His neighbor tells him who and wonders aloud why she did that. I notice him, the guy who's helping me murmur "I know why..." One mississippi. Two mississippi. Three mississippi. Ok, the suspense is killing me: "Why was that done?" I ask.

I won't forget what he said. Clearly I remember him saying "It's a confidential company policy."

Excuse me?! You mean there was a reason why I was overcharged? This was done intentionally, causing me miss calls for half a day, and making wait in line in this cramped crummy store for half an hour for this terse explanation? Whatever could this secret policy be? It couldn't be that there is a plan to get customers back in a store in the hope that they might buy some more stuff, could it? I try to get some clarification, but of course, it being confidential, get nothing. Just a "Okay, you're all set. Have a nice day."

Oh, MetroPCS. Alas, this rekindling of our love was so brief. Back to Boost I go.

Wednesday, November 18, 2009

AIR / SQLite

A friend commented on how little documentation there is out there on AIR's built in database, SQLite. So here's my code example

Thursday, November 5, 2009

Gay marriage

A couple other friends have weighed in on this so I figured I'd throw in my take (inspired by Adam Carolla) :

Gay marriage - it's like this: I'm in Atlanta. I'm very aware of the Braves and the Hawks. I'm a fan of them; I love going to their games. Sports teams in any other city are really not on my radar. I don't boycott them, and I don't contact my congressman to prevent them from playing. Why? Because how, when and how well they play doesn't really affect me, personally, at all. I think the same is true of most people who want laws passed boycotting gay marriage- they don't want similar laws passed for sports teams in other cities- but they don't make this connection. It would be absurd for me to be morally against other sports teams, or other teams in general that don't affect me. Next time you're chatting with someone who is against gay marriage, ask them why they don't want legislation banning sports teams in other cities. Or if you are such a person, ask yourself that and please get right back to me.