Saturday, December 20, 2008

Snow

I'm considerably less enamored with winter today than i was yesterday. But while i was out there shoveling, one of my neighbors down the street got stuck with her car inches from freedom. Her front wheels were caught in the hard packed snow that the plow had left at the end of her driveway. So despite having 90% of the car in the road, the car refused to go anywhere. She's a good deal older than i am, so i walked over, cleared out the snow behind both front wheels, and then another neighbor and i pushed the car into the street while she drove.

She was grateful, but i really hope she doesn't get me something for Christmas.

Me? I'm nearly 50. I hope to shovel snow for another 30 or 40 years. If i don't, i hope it's because Global Climate Change has made it moot. It's not that i'm rooting for it to get warmer. That's a disaster i seriously don't wish for. It's that the alternative explanation is that my health won't allow it. And i'd rather live to be a healthy old bastard who shovels his own snow, helping out the younger 70 year old women down the street as needed, thank you very much.

I got to listen to quite a few podcasts while waiting for the driveway and walk to become cleared. For example, a recent study showed that humor is contagious, out to the third degree of separation. IMO, that's much better than passing around the flu. And, i've managed to do better than usual in that regard this season, so far. That tidbit is from Scientific American. This is a show that doesn't insult my intelligence, always has something interesting to say, and does it with a bit of humor. And, it's free for download. What more could you possibly want?

My biggest problem wasn't a sore back or arms. It was 20 degrees F (-6 degrees C). My biggest problem was overheating. My feet were hot in my new boots and wool knee sox. My thighs were a bit chilly, because jeans aren't so hot after all, my head was warm with hat over hood. But i probably shouldn't have also had the sweater on. My solution was to take my gloves off. I didn't just do that for the picture. Nothing wrong with my circulation.

Thursday, October 16, 2008

Less Filling

Went to the dentist first thing this morning and got a filling. As first appointment of the day, there was no waiting. My tongue is about the size of New Jersey now. When i need to do something, i now have to check if it can be done while having a tongue that big. I can type, apparently.

After he took the needle out, i said with enthusiasm, "I like needles!". Then i added that i just wanted to say something he hadn't heard before. He said he doesn't hear it often.

I probably should have had breakfast first. But i was in such a hurry to get there on time. Can't eat now. Hey - it's a new diet! Weight loss is guaranteed! Or is it wait loss?

I woke this morning with sore neck muscles. I was reminded of the Steve Wright line.

When I woke up this morning, my girl friend asked me, "Did you sleep well?" I said, "No. I made some mistakes."

Saturday, September 20, 2008

What spider is this?


This spider is prowling my basement. Any ideas what it might be?

I don't have arachnophobia. These things eat other things that would otherwise bug me.

Darn - the image is clipped. Use your browser to "view image" to see more of it, like the whole quarter.



Best guess so far - a Dark Fishing Spider.

Thursday, August 14, 2008

Spaced Out

This question was posted to the Astronomy and Space section of Yahoo! Answers. I've copied the question verbatim. There were several replies complaining about spelling and that it was the wrong category. Such a wasted opportunity for "Best Answer" of an easy question. Then, i've copied my reply, verbatim.

I juz need sum help!! sumone??

okaii so ive been wiv my bf for ova 2 yrs now nd hes been acting wired l8ly so i asked him wat was up i ended up geting out of him that he doesnt feel the same neymore hes realli confused bout it all i dunno nd he says he doesnt wanna brake up yet.. were giving this week end ago 2 c wat happends but im so confused i juz love him so much i dun wanna loose him plz advice sum1 plz!!

This is Astronomy and Space, so expect some weird, even hostile answers.

We'll approach this as an engineering problem. What are the requirements? Clearly, you want to attract and keep your boyfriend. There are three things you'll likely want to do.

First, you want to be good looking. An attractive appearance is a proxy for health. You want him to think that you are healthy. Cut to the chase - ask him to start exercising with you. It could be walking, biking, running, swimming, whatever. And it would get you both off your butts doing nothing. Just making out isn't going to firm up your relationship.

Second, you want to appear smart. To do that, you have to pass some good ideas by him. This is hard, so one way to do that is to ask lots of people for advice. Yahoo! Answers isn't bad for this. You'll have to decide what is good, however. And, as has been mentioned, you might want to invest some time in spelling and grammar. You may have great spelling and grammar and are just doing this for style. How would i know?

Third, you want to appear happy. It can be such a drag to be with someone who is cranky or demanding. Be happy and and avoid being a nag. Learn some jokes. More than half of all jokes fail miserably, so you need a bunch of them. Learn what kinds of jokes he likes. But if you become a nag, your relationship is destined to the death spiral. He'll withdraw, you'll want more, and nag more.

Best of luck, and clear skies.

Tuesday, August 12, 2008

Is it right time now to start to bicycle on the road?

No. It was time at least three decades ago.

When i lived in Boston, the bicycle was by far the fastest way to get around town. When i lived in Philadelphia, the bicycle was by far the fastest way to get around town. Philadelphia police had several officers patrol by bike. I would say it's quickest in Detroit, but Detroit has nowhere that i want to go.

But if you haven't started biking around town, it's a good time to start. If everyone biked or walked places, there would also be health benefits - reduced diabetes, heart disease, better sex lives, and so on.

(more Yahoo! Answers).

Wednesday, July 16, 2008

Yahoo Answers

I've been goofing around with Yahoo! Answers of late. This is a sort of general forum where people can ask questions, and other people can answer them. I already have a Yahoo! email account, so it was totally painless to start.

I've no idea why i started. It's not like Yahoo! Answers is new. Nor is that i'd never heard of it before.

There's a section under Science and Math called Astronomy and Space. I do astronomy. Some of the questions looked easy. For example, every few minutes, someone asks if the world is going to end in 2012. The Mayan calendar flips over then - sort of like we did going from 1999 to 2000. Did we survive? There are no Mayans left to flip the calendar over. And someone has been saying that there is a planet out there, Planet X, that is going to strike the Earth in 2012. (We'd have seen it by now.) There's some other nonsense too. After typing in my answer for this a half dozen times, i started a file for frequently asked questions. Someone even asked people not to ask this question. That held the flow back for... less than 20 minutes.

When you ask a question, Yahoo! Answers generates links to similar questions. It's hard to imagine that you wouldn't notice that your exact question was already asked - and has answers - well before you get through the asking process. These people just want to ask for whatever reason. They aren't going to be deterred.

So, one day, i ran out of questions i could answer. It's not that somehow the river ran dry. It's just that Yahoo! doesn't let people answer an infinite number of questions. Once you start answering questions and they get picked or voted as the best, then Yahoo! Answers lets you answer more per day.

So what kinds of questions do i ask? Well, there are two kinds. First, i ask questions for which i think there isn't an answer. Second, i ask questions that will evoke some humor. Third, i ask questions for which i already know the answers. Despite these strategies, i've managed to learn something. Highly unexpected, but welcome.

Here's an example question - though i posted it under mathematics.


Why is the line at the bank that i pick always the longest?

There are five lines at the bank. They're more or less the same length. I do my best to pick the shortest one. I note who is at the end of each of the other lines. All four are served before i am. Should i apologize to the people in front of me for picking their line - thus slowing their service?


I'm hoping it's funny because it's common experience. After all, you only have a 20% chance of picking the fastest lane, so most of the time at least one other line is faster. You feel that despite your best efforts, there is no justice in the Universe - someone got ahead of you that shouldn't have. Everyone feels like that. But i've added another twist. The other four end-of-line people get served first. Is that fair? Am i such an intrinsically unlucky person that i should apologize to the rest of my line for slowing them down?

Of course the four other end of line people really were in front of you. They should be served before you. It's the people behind them that are in any way behind you. So, the answer is "no". The Universe works the way it should up to this point.

Yahoo! Answers are nearly a complete waste of time. It's the blind following the blind. Neither the questioners nor the answerers have much in the way of a clue what they're saying. And i'm not just talking about the ones who can't type. Is the best answer from the novices any good?

And what if you really know what you're talking about? What good does it do to say that the Earth won't be destroyed? The only help you can give seems to be when the student has copied the question verbatim from their homework. (I've asked people to tell me where they're going to school - but no responses yet.) And if you know the answer and bother to give it, aren't you bursting with pride?

Perhaps the right thing to do is to write a Yahoo! Answers bot. This bot will have the answers to a bunch of questions, and when one of them gets posted, it will spit out the canned answer. The trick here is to recognize that the question matches an answer. Step two would be to let the bot scan all the questions and answers, figure out what the best answers were, and feed those as canned answers in the future. It might be fun.

Just three more days to answer my question on Yahoo! Answers. Feel free to copy and paste from this blog entry.

Saturday, July 12, 2008

New car

In 1986, i was working for Harvard University. I took the subway (the T) to work.

One night, i had a dream. I dreamed that instead of taking the T home, i got on a bus instead. There's a bus station right there at Harvard Station. No purpose in mind, just a whim. And instead of going South, i went North up Massachusetts Ave. The bus made many stops and people got on and off as one might expect. At one of these stops, i got off. Again, no purpose in mind, just a whim.

I walked further North down the sidewalk. There were lots of businesses on both sides of the street, but nothing of interest. This didn't bother me.

Then i came across a Chevy dealership. For no apparent reason, i walked into the showroom. A salesman walked up to me and asked me if he could help. I said, "No, i'm just looking around." He dangled some keys and asked me if i wanted to test drive a corvette. "It's free", he said. I said, "Sure", and drove the bright red car around the block and back to the showroom.

I got out, and he said, "I can let you have this car for no money down." I thought "no way", but signed the papers on a whim.

The drive home included a really fun bit on the Jamaica Way. It has all these small hills and turns. All dreams should be this much fun. The trip ends coming down my street. There's a parking spot that's very close to my house, and just after a driveway, so it's a smooth shot to park.

The car comes to a stop. I pulled out the key and looked forward. Right there is my 1978 Dodge Omni. I think, "That's right. I already have a car!".

That's when i woke up. No alarm. It was daylight. My bedroom was on the first floor, facing the front of the house. I got up and looked out the window. My Omni was exactly where it was in the dream. And behind the Omni was an empty parking space. It was a very vivid dream. I had the distinct notion that my brand new corvette had been stolen.

Friday, July 11, 2008

Birthday Gift

I bought a camera to give my wife for her birthday. It's a fairly low end digital camera. That's now an 8 mega pixel camera that can do 30 frames per second 640x480 video with sound. Wait a minute - 640x480 is better than TV (NTSC). Our son plays violin and piano, and the old camera can do video, but without sound. Our camcorder works, and has excellent optics, but is ten years old or so, and therefore is analog. I can't just send a clip to my friends and family by email. With a small, 1 GB SD card, the new camera can record approximately 13 minutes of highest frame rate, highest resolution video. That's more than the couple tunes our son usually plays. I can always get a bigger card. In fact, i own a 16 GB card that is in use in another device.

Well, i picked up a Fuji at the Grocery store. They didn't have the model i was looking for, but i figured i could return it if i didn't like it. Well, it's impossible to know if you're going to like it, because the box doesn't say everything you need to know. It turns out you need to install a driver to get it to work. The CD is supposed to have drivers for Windows or the Mac. But i run Linux, so this is a non-starter. Worse, the CD didn't come in the box. WTF? And, there was a note in the box that has the Fuji tech support phone number, and a hand scrawled note that said that the pictures from this camera were fuzzy. That's right, this camera had already been returned by someone as defective, and was being sold as new, though obviously, it wasn't refurbished or anything - they'd have noticed that there was no CD, and that there was this hand scrawled note. There were also a few pictures of some guy's family on the camera. I couldn't check them out on my larger computer screen because of the driver issue.

So, i brought the camera back, but apparently, the receipt was not in the bag. When i buy tech items, i always leave the receipt in the bag, just for this sort of thing. Apparently, i didn't buy it via a credit card - but rather my debit card (which is a Visa, BTW). They couldn't find the record of my purchase on their computer, and would not accept it without a receipt. I went back home. The receipt turned up on my kitchen table. Why was it there? Oh. I always put my grocery store receipts there. That way, when i'm unpacking groceries, i can check to see that i got everything i wanted, and can check that the prices were what i'd expected. So my habits conflicted - buying tech, and buying at the grocery store.

So, i did some research on line to see if i could find a camera that doesn't need a driver. I just want something that plugs into USB and mounts like a hard disk. No big deal. Nothing. Not a single ad, not a single review, nothing mentioned this critical issue. Not one product talked about compatibility with Linux. By the way, having to have the CD to install a driver is a pain for everyone, not just Linux users. Let's say you're at a friend's house and take some pictures. They say, "hey, could you send me a couple of those?" You say, "can't i just plug it into your computer and give them to you now?" If you have to install a driver, the answer is "no, you can't". Not unless you bring the CD with you. So, i'd avoid Fuji and Kodak at the moment, without regard to what computer and OS you use.

Well, my old camera is a Samsung. It still works. I like it. It just doesn't do sound with it's videos. It can store over 300 pictures on it's quarter gig SD card. So, i looked up Samsung cameras, found a cheap one, and ordered it. It's a Samsung 860. I'm happy to report that it does not require a driver, and just mounts like a disk drive. The camera is nice. It's very small - fits in my shirt pocket. It has two misfeatures. It does not have a look-through view finder like my old one. You must use the view screen. The view screen is hard to see in bright daylight. Also, it doesn't have a case. My old camera has both.

There's a third misfeature. Well, you might call it a misfeature. You see, it's so nice, that i want it for myself. My wife has lost two cameras already. I don't really want to give it to her. Yes, i picked it because it is cheap enough that i won't cry if it's gone, but it is really nice. And i also don't want to give her my old one. So, i'm going to have to buy a second one.

A funny story. I ordered a 1 GB SD card with the camera so i'd be all set when it arrived. The SD card arrived several days before the camera. I checked it out - it works fine. Only, by the time the camera arrived, the SD card was lost. I haven't found it yet. So, while at work, and on lunch break, i went to Best Buy, paid just over twice as much for another 1 GB SD card. But when i got home, and wanted to put it in the camera, i couldn't find it! I checked the likely places at the house - i hadn't been home long, and it didn't show up. I couldn't remember bringing it home, so i went back to the office and checked my desk. Nothing. The next day i was out at Walmart, and bought a third 1 GB SD card. I nearly lost it, but did manage to get it into the camera. Well, a week later, the second SD card showed up. It was in the refrigerator. I had gone out to lunch unexpectedly, and still had my bag lunch at the office. So i put the new SD card in my lunch bag so i wouldn't forget to bring it home. When i got home, i put my lunch into the fridge. Next up was a week a vacation. It didn't appear again until i was cleaning the fridge of old science projects. Maybe i like my chips cold. That's it. That's my story and i'm sticking to it.

Friday, July 04, 2008

Tor: Orphans of Chaos

I just I just finished the book, Orphans of Chaos, written by John Wright, and distributed by Tor books. Tor has this deal where they give out a free book every week. You can sign up for their mailing list. Each week, they send you a link to the new book. They have PDF, html, and moby formats. I read the book on my n800 pocket computer, using FBReader. This application reads html and moby formats. Evince reads PDF. FBReader with moby seems to be the best. The moby format comes from the Palm pilot. It's all one file, and supports styled text and embedded images.

So Tor.com is't just giving these books out from the goodness of their hearts. This book is no exception. The idea seems to be to hook you on the book, the author, or both. In the case of Orphans of Chaos, it ends with End of Part OneTo Be Continued in Part Two, FUGITIVES of Chaos, From John C. Wright, Available now in hardcover!.

Without any real spoilers, here are some notes. If you start reading this, and it seeems boring, note that the book starts pretty slow. It starts to pick up speed at around 20%. I don't have page numbers to give you, due to the electronic nature of the books. At the 50% mark, it's moving pretty fast. And, it ends with the above cliff hanger.

I liked the author's style, once he got going. It should be a good series.

One of the other books in my queue from Tor is Old Man's War. I have seen this book at Borders.

I also finished Interplanetary Hunter by Arthur K. Barnes. This is a light and fun little Scifi book, seemingly wriitten in the 1950's. At least, if it was written back then, it could be considered hard science fiction. But it doesn't take itself too seriously, so any science errors can be easily forgiven. For example, we know a bit more about Venus since then. I found it highly enjoyable. And, it's a great book all on it's own.

Thursday, July 03, 2008

Delusional

In the masthead of this blog, there is a dictionary definition of delusional. And, i claim not to be there. At least not yet. Predelusional, whereever it it headed, is not delusional. Being delusional is having a false persistent belief or opinion not substantiated by sensory or objective evidence. This sounds like something else, though. It sounds like faith. Faith is belief in something without proof or evidence. Being delusional is having faith. Having faith is being delusional. If being predelusional is not delusional, then being predelusional is being faithless. There's something to be proud of.

"We must have faith", said Spock. He could have said, "We must have delusions." If they're really the same, then delusions can't be bad while faith is a good thing. Does it matter what your faith is in? Does it matter what your delusions are? It shouldn't.

OK, so let's say you are going to start a big project. If you don't think you'll finish the project, it is foolish to start it. What if you don't know? Then what do you do? You have faith that you'll finish it. Lie to yourself, if needed. Create the delusion. Delusions are good.

Perhaps life is a journey, and though i'm not delusaional, i expect to get there eventually. The road to salvation is narrow, as the razor's edge.

Thursday, June 26, 2008

Maintenance club

Let's say you need to have a car. Maybe you have a job or something. Much of the cost of the vehicle is in the purchase price. One way to reduce the purchase price is to buy vehicles used. Another way is to own them longer. Either way, you have a vehicle that requires more maintenance. Need a reliable car? Have more than one. Since used cars often cost a tenth of new cars, you may be able to afford several.

I know something about that. I've changed an engine, fixed brakes, and so on. But i have a car in my garage that needs work, and i'm not doing anything about it.

But let's say you know nothing about car maintenance. What do you do? You need help. Get together with someone like me who knows what they're doing. You get help. But what do i get?

I've come to the conclusion that working on cars would be more fun, and therefore actually happen, if i had someone to do it with. So the great idea is the maintenance club. Each club member has some junk car. A club 'meeting' consists of descending on a club member's car for a few hours to achieve some goal. Everyone's junk gets some love in a sort of rotation. Maybe one of the junks is a '48 Chevy restoration project, or a 60's Jag.

But the thing that makes it work isn't that you get your car fixed. The thing that makes it work is that it's a social event. Bring out the pizza and beer, if that's what it takes.

Tuesday, June 24, 2008

Mortgage basics

I just read a two part bit on how mortgages work. This guy often talks about math or programming things that are esoteric and difficult. Worth the time to read, if the time can be had. And, most of my blog reading is about science. These two posts, but especially the first, are really easy to read. There's an error in the formula, but the example is right. It should be

Payment = P*(i/1-((1/1+i)^n))

where P is the Price of the house - or really the money to borrow, i is the interest rate: 0.0575 for 5.75 percent, and n is the number of payments - 360 for a 30 year mortgage. There are rounding issues, so this should be considered approximate. Payment is the payment per period, which is per month for most mortgages.

I learned that i accidentally picked a pretty good mortgage, and then five years later, did a pretty good refinance to lower interest rates. I made some very small mistakes (maybe tens of thousands of dollars), but have recovered from them, mostly in the refinance.

This is Detroit. A friend's folks died last year, and left him and his siblings a house. They all own houses, so they put it on the market. A year later, it's still on the market, but at less than 20% of what they'd started it at. It hasn't sold. Calling it a buyer's market is generous. It's foreclosure city. I assume it's impossible for at least three to five more years to sell my house.

But the banking industry is so greedy that they may have provided me an out after all. It used to be that getting a second mortgage was a last resort sort of thing. But now, banks are trying to sell these loans as "using your equity". And, they're quite aggressive about it. So, perhaps, i could suck all the equity out of the house as cash, and walk away from the house. My equity is probably enough to buy a similar nearby house (perhaps in foreclosure) outright. No loan of any kind.

Mark's articles talk about how there is a conspiracy in the finance industry. Short term profit greed drives it. But there seems to be something similar in the automotive industry. Why sell small affordable, high efficiency, low margin cars, when large high margin vehicles are selling? In fact, offering any small cars at all will just encourage people to buy them. Chrysler sells cars with hemi engines (big powerful engines). GM sells the Hummer. Ford sells the F-150, which was a small pickup when i was a kid. Then, gas went over $4 a gallon and for some reason people don't want to put $100 of gas into their tanks at a time. In the course of a month, gas hogs have gone out of style.

OK, so Ford has the Focus, a 4 door sedan, which if equipped with a 5 speed manual probably can get the kind of gas mileage that my car gets, assuming you drive it the way i drive mine. And sales have skyrocketed. They can't keep up with demand. This is a real problem. It takes awhile to get the pipeline moving. But the demand for the F-150 has dropped to the floor. Even luxury car sales have dropped. What's a Ford to do?

So, the automakers, not just Ford, have claimed that they didn't see this coming. Ford's solutions (available in Europe) won't be available in the states until 2010. That could mean summer of 2009. Chrysler made some investments last year that might pan out around then. GM makes noises, but i'm still waiting for product. This, despite the fact that my car was made in 2000 by GM. As far as i can tell, they don't sell it now.

But from my perspective, the idea that gas will go up isn't news. Maybe i was driving three times as far as anyone else, and so i noticed it sooner. But it was important to me twenty years ago. Well, total cost is also important. In a year, i'm currently spending $3,500 on gas, $800 on insurance, under $1000 on maintenance, and zero on amortization for my fleet. That's $5300 for 35,000 miles, or about 15 cents a mile. That's a quarter of what the government thinks people spend. Actually, it's less than that. My Saturn has increased in value, and maintenance has been much lower. But it freaks me out that i'm paying over a dime a mile. It's 60 cents to go to the grocery store. So i go on my way home from work, saving 60 cents.

Sunday, June 22, 2008

Can we go to a moive?

This weekend, i've been treating my son to several movies. He's been away at music camp. We went to see Get Smart, by accident. I can't read the ticket with my contacts in. I'll bring my reading glasses next time. So, it was theater 8 instead of 7. We'll have to see Indiana Jones later.

But he asked me if we can see The Happening, which is listed as Action/Adventure, Thriller and Politics/Religion, and rated R for violent and disturbing images. The trailer makes it look like deeply disturbing horror. I said, "no", and not just because it's rated R. I like to sleep at night too. He said, "Good".

Thursday, June 19, 2008

When i got the car, i looked it up in Kelly Blue Book and found that it's retail value was $1,450. I've put 70,000 miles on it, so i expected it's value had migrated towards zero. But one of the guys at work suggested it should be worth something. I looked it up again. It's now worth $3,560. That's right. I put 70,000 miles on it, and it's value has increased by two grand. I attribute this to increased fuel prices.

I talk about how cars don't have investment value. And you might think that this is a windfall. However, the car still works, and replacing it with something that gets as good gas mileage is unlikely. So it's not for sale.

I just did invest something into it. I bought a new windshield. Apparently it's not legal in Michigan to drive a car with a windshield cracked all the way across. It really wasn't much of a bother, as the crack wasn't quite in my direct line of sight. Still, i was never able to clean the inside of the windshield fully, probably a smoker in it's history. For now anyway, it's really clean.

But back to Michigan. No inspections in this state. So if you get pulled over, for anything, they notice your windshield and ding you with an extra fine. I got away with having to replace it, and going to a police station to have them sign off that i'd gotten it done. So, i got the windshield replaced right away. I'm really bad at the administrative stuff, but i did manage to get the signed ticket in the mail before the deadline. Also, the new windshield was cheaper than expected. Only $160 installed, with tax & everything. Still, it'd be nice if they gave you a list of what you need up front, like when you register it. I consider air conditioning to be more of a safety item in the summer than the cracked windshield. But i bet that Michigan doesn't care if you have it, or if it works. And so on. The windshield was number #3 on my priority list of repairs to do.

Tuesday, June 17, 2008

Acceptable Addiction

It's funny what is acceptable and what isn't. If it isn't acceptable to say that you're an alcoholic even on the wagon, it is acceptable to say that you're a caffeine addict on or off the wagon. What's the difference? You never get over either. Addiction actually changes the wiring of your brain. They're both legal (in the US). They both seem to be encouraged. Well, caffeine is encouraged for kids too. Both are an acquired taste. My 11 year old son has only recently breached the pop barrier, though he still prefers water. Coffee, beer and wine are still gross.

So, i tell people that i'm a caffeine addict, but on the wagon. They ask, "Why?" It's not why i got addicted, but why on Earth i'd give it up. Well, it has this feature that it flushes calcium from my body, and that affects my joints first, and gives me arthritis. "Oh." And i know they're thinking that it could happen to them, though it clearly doesn't happen to everyone, and they think maybe they'll get lucky, despite osteoporosis running rampant among the older population. Perhaps they think that they won't get older. I could happen, right? There is an alternative to getting older.

I know what you're thinking. Alcohol affects your mind, your judgment. That's what makes it different. Except that caffeine also affects your judgment. It makes you jittery. It make you buy more of that stuff you can barely tolerate. It makes you go to the bathroom more often. It also messes up your sleep patterns, reducing your mental performance. That's right. You took caffeine to improve your mental performance, but eventually you come out behind.

Monday, June 16, 2008

Parnas oopsla keynote podcast notes

David Lorge Parnas delivered a keynote speech on October 24, 2007 at OOPSLA in Montreal. The speech largely covers documentation, and communications required to build large projects. It touches on issues of building these projects, but mostly covers documentation.

I listened to it twice, and took notes. I haven't seen his slides. Sorry, this isn't prose, it's notes. Expect sentence fragments. And, they're somewhat organized together by topics, not notes in the order you'd hear in the show. Some repetition was removed. It hasn't escaped my notice that, as documentation, these notes of mine suck.

Listen to the show. It's one of the better talks about computing i've heard in the last decade or so.

Object Oriented: not a language thing. It's a description thing. Dykstra's THE does this in assembler. But OO languages have made it harder. Parnas has done this in Fortran. But younger people see this as a language issue.

  • Abstraction - what is the "more abstract than" relationship? Subsetability: sequence of virtual machines.
  • Information hiding, inspired by managers who wanted to break up a task into work packages, without incurring too much communication. (Parnas). Information hiding as a way to do composition.
  • Documenting module interfaces.
  • "Information hiding is an empirical result". - no. It's mathematical. It allows one to know if module A uses B, and knowing a limited amount about B, you can know if A needs to change or not.
  • Hence, Information Hiding Theorem.
  • So, you have the theory, but must also check it out in practice. Because "Theorectically" means "not really". "Theoretically, we can all run a 4 minute mile."
  • Unhappy with this definition: Modules are collections of procedures - invoked by procedure call.
  • Abstract datatypes. Instead of one data structure for each module, more than one.
  • Components - really about sellable bits. Modules aren't components.


Young people may have more energy. Older people have the experience to know what might change.

Documentation

How can you document a project so that if a manager gives it to three people, he'd get the same thing. When it fails, there's no one to blame. It was difficult, not in theory, but in practice.

Sometimes, combining modules is the right answer.

Mathematical relations.

Documentation for other engineering projects has multiple dimensions. There are multiple documents for a bridge, etc.

Coffee stain test - if the document is used, it's good. These days, it would be a document web hit count or something.

Design through documentation. Building a bridge: the documentation gets refined until the builders can use it to build the bridge. In engineering, these documents assist in inspection. Assists in maintenance. Enables systematic design review. Attitude is that the documents are binding. But in software - it's the program that counts - and the documents may be updated. In engineering, these documents are binding. Enables verification and inspections.

Documentation must be accurate - if it isn't right, people will stop using it.

Documentation must be precise. A precise document that is wrong is better than a vague document. A vague document is not even wrong. (One complaint i have for the talk is that it's more than a bit vague. It might be the slides i missed. He clearly wasn't reading from the slides, so it's gone.) Yet, the questions at the end were from people who clearly knew what he was talking about.

Documentation must be consistent. Free from contradiction.

Everything must be only in one place. Otherwise one will be changed, and you lose consistency.

Documentation must be complete. It must answer questions you have.

Documentation must be easy to search. You must be able to find the answers to the questions you ask. Search tools can help you find things in electronic documents.

Notation and Organization

Documentation must use simple, closed form mathematics.

No introductory sections. People will look at the introduction, and ignore the body, then misinterpret it. Extreme example: introductions were audio, and could only be played once. The goal was to help you understand the body, but were not referenceable. Of course, clever users figured out workarounds.

Source code isn't documentation for end users.

Documents show a separation of concerns. At least three views for a solid object. There is a set of documents.

Documentation is not a crisis: it's a chronic disease. Documentation needs to be a disciplined effort.

Documents should be good enough that you should not have to look at the code.

Documents are practical tools.

Documents must be authoritative. They must be organized so that you know where things go, or can be found. They are reference, like a dictionary, rather than a tutorial.

The test is that if you ask someone about a program, if they go to the documentation first, then it's good documentation. If they go to the code first, it isn't.

Documentation needs structure that avoids inconsistency.

Documentation needs to be better than "let's just try it".

Documentation needs to be used before you write the code. While you write the code, and after the code is finished.

All these documentation rules are easier said than done.

Each document should have a clearly defined role. Description, partial specification, full specification.

Three types of documents
  • Description: facts. Some facts are requirements.
  • Specification: only requirements.
  • Full specification: all requirements.

The same notation may be used by all three types. This means that there is no specification language.

If you look at a document, you can't tell if it is a description or a specification unless someone tells you.

It's not models. (!)

It's not formal documentation.

Source code clearly describes the program, but not the program's intent. It's not a specification. So it doesn't describe how the program might change. (On the other hand, specifications can change too. And, some programs do document intent via comments. One could argue that any other comments are pointless.)

The word 'theory' often means 'not really'. The program works, in theory.

All words are bendable (or ambiguous).

How to define what information should be in a document?
  • Must specify the content.
  • Each document is the representation of a mathematical relation.
  • Ordered pairs.
  • Programing proving. Preconditions and postconditions.
  • If you can start in x, it should end in y.
  • Lots of examples of format and notation. Must agree on content.
  • Need to know all the variables you sense and control.

Counter example: Document form vs. content.

Great anecdote. Manager offers prize for documents conforming to specification: Seven parts on A4 with 1 cm margins, pages numbered, etc., but without talking about content. Winner submitted document in seven sections that said the same thing. Description: the module copies data from here to there. Design: Bytes are copied from here to there. Detailed design: Byte one is copied before byte two... and so on. Manager never noticed.

Two are two relations:

The set of things that are possible without the system - nature. Describe the restrictions of cases that the system allows.

Document should be able to be checked for feasibility.

Software: modules, objects, components.
  • Distict but related concepts.
  • Module is a work assignment.
  • Component is a unit for sale.
  • There can be many copies of an object in a system.
  • The same kind of document techniques can be used for all of these.

Describing things operation by operation is natural to programmers. It's not very helpful to others.

A7 aircraft documentation project. Output by output - with history of inputs. You get this under these circumstances.

It's harder to write for managers.

Microsoft EU court case. $3 million a day fines. Anti-trust. MS was told to document what other vendors needed to do to interoperate. MS attempted to document their interfaces and failed. In Parna's opinion, MS tried. MS offered code, but other vendors refused. Intellectual property, but also that the code can change, and so, the spec.

Inability to write documentation is key to some of the big expensive problems today.

Specifications are not wish lists, or lists of features.

Documentation is not a list of facts about the code. In engineering, a specification is the requirements for the product.

Requirements should not be repeated. Else, inconsistencies creep in.

Describe the data structure. Describe how the data structure is interpreted: (interface) abstraction relation. Describe what each program on the interface does to the data structure.

Traces - history of what has been done. Commuting diagram. (More math references). If it commutes, then it can be implemented.

A document should be a description of a set of relations.

Documentation is inconsistent, and has errors.

Describe mathematical concepts in a readable way. Predicate pairs. But how to write it so people can read it?

Bad example:

21 pages of inconsistent and erroneous testing documentation. The testers ignored the errors. Following testing instructions is dangerous. Everyone preferred this bad document. The document was readable, but managers didn't know it was wrong because they never tried to use it.

These two things are needed for practical, sound documentation.
  • Tabular expressions. Better for math with if, and but.
    Discrete math.The tables parse out the dimensions of the problems.
  • Relational model of documentation. Tells you what information must be
    in the document.

Requires significant training. But not a PhD. Fewer mistakes. Requires an engineering background. Precise and checkably complete. Pilots can read it (for A7) likely due to engineering training. Can be used as a slow (non-real time) prototype.

Down on Zed, VDM, Alloy (British doc languages). Alloy is relational, but this is not the problem. Tabular notation is needed. These languages are translations of the code into other codes. May as well use a Turing Machine implementation. These tools are not practical. If it's easier to read the code, then the documentation isn't good enough. These tools are code. Should use engineering documentation as a guide.

Down on documentation extracted from source after the fact. For one thing, it's descriptive, not prescriptive.

Managers often do not have the engineering background needed to read documentation. Writing documentation for managers is harder than for programmers or users.

When you're done, the program should do what the document says it should. If you test the program from the document, they can't get out of sync.

Testing

Test coverage.

Reliability estimation via testing.

Mutation testing.

Test case generation. Interesting points:
  • Extreme values
  • Cross zero
  • Discontinuities
  • Equation solving for boundary values

Precondition/postcondition doesn't scale up as well as relational models.

Errors escape reviews. Must use the code to answer questions. What would you have to change in the code to do something?

Separation of concerns (Dykstra). Look at small bits of code at a time. Important for testing.

(more testing:)
A "display"
  • what it should do
  • what the invoked programs do
  • right or wrong on it's own.


Then, for large programs, testing uses lots of these displays. Scalable - lots of people can do little bits.

"The smallness of the human skull." - Dykstra "You should never look at a long program." Use divide and conquer. Precise documentation to hook things together. It's not stepwise refinement. In stepwise refinement, the program gets longer. Instead, keep it separate.

If it's an object and a component, use the trace function method. if it's a program within a component, use the display concept with documentation.

Tools for documentation:
  • Functional and imperative programming are combined.
  • Functional specs for imperative programs.
  • Don't worry about efficiency of functional programs.
  • Don't worry about illegibility of imperative programs.

Object orientation for hiding the right things.

To Change
  • Vague diagrams that don't answer the right questions.
  • Write the documentation first, to help build the programs.
  • From group reading to systematic inspection of the doc.
  • Test generation from the documentation.
  • Anyone who knows two language is a software engineer - a myth.
  • Need to train people in documentation.

Summary
  • Need to take a serious view of documentation.
  • It needs to be seen as normal, expected and effective.
  • Needs to be taught.
  • Think about why people don't do it. (ie: it's not taught).
  • Licenses for software engineering, including testing documentation skill.


Questions from the audience

In theory it will work everywhere.

Interpreting specifications, not executing them. Theorem provers, etc.

Deliberately introduce errors into program to find errors. Deliberately introduce errors into documentation to find errors - Mutation.

Movies: storyboarding. Rapid prototyping is similar. Knowing what you want by creating an approximation. Is the prototype a document?

The prototype should be bound by the specs, just as the real program.

Tables of documentation as an interface for talking to the customers.

Evolution of documents. The document evolves with the program. Use information hiding in the document as well as the code. Allows easier evolution.

User interfaces and complex database interfaces. - works.

Teach professionals the tabular notation? Need to focus on a method that works - not just about methods. Need to teach better fundamentals. The math - 'for all', etc. Lectures and labs. Lectures give theory. Labs teach why there's theory.

Questions i might have asked if i'd been there

  • So if the documentation is really good, is the code write-only?
  • What does Parnas think of use cases? Aren't they requirements?
  • Many ideas (like use documentation to show who's to blame) are wrong because the idea itself is shallow.

Sunday, June 15, 2008

Rod: part six of six - Coffee

Tie's coffee smelled really good. A short blond woman approached.

"Gail, why a café? You know I don't eat."

"Someone new. I'll introduce you, then take off. She's seriously creepy."

"Another hot date? You know it's doomed", remarked Tie.

"Yes and no. How did you manage to attend both the Nobel and Ig Nobel ceremonies? Time zones?"

"I had a new body built, and copied my bits to it. But afterwards, we couldn't merge experiences. Something's wrong."

"Here she is. Tie, meet Jean. Jean, Tie."

Jean gave a low gasp as she sat down. "You aren't a breather."

"No", Tie said tentatively. Didn't everyone know his story?

Jean went on. "Not like Nosferatu. And unlike those machines, you have soul."

"I'm not clueless."

"Dim ones never have strong souls. Which comes first is hard to prove."

"So my other body, the new one, may not adjust?"

"You might try to split your soul."

Gail got up. "Gotta go. Bye Tie. Bye Ms. Bank".

Jean said, "You were right, Ms. Force. Fascinating. Thanks."

Friday, June 13, 2008

Rod, part five of six - It's a Tie

"You won the court case and Earth Defense Fleet is giving you your back pay. How does it feel?", asked journalist Debbie Jameson-Peterson.

"And 4% interest and treble damages, said Acting Ensign Rod, Genocide, Retired", Rod replied with a smile.

"They said you are a machine, and not entitled to property."

"I was human enough for them when I signed up."

"They said more than half of your parts were replaced. You're a new entity."

"Ninth handle and 3rd blade, but the same axe. Most of your cells have been replaced too. My lawyer told me to use the 'Acting Ensign' bit. Never my first name."

"Your name's Rod?"

"That's my last name. First name's Tie."

"Ha! Sorry. Name Change?"

"Nope. Floe Rivers married Jack Hammer. Mom and Dad."

"At least it wasn't Barb Wire."

"That would be Grandma."

"Sorry I mentioned it. What do you do next?"

"Sweden, then upgrades."

"Sweden?"

"The Nobel Peace Prize. For killing billions."

"You ended the war. You saved countless billions."

"Buy one, get two free. I get an Ig Nobel too. No one ever got both."

Thursday, June 12, 2008

Rod, part four of six - Historian

No ships in sight. Shut down nonessentials. Set wakeup for a day and sleep.

Nothing here. Sleep. Nothing. Sleep...

"Where am I?", asked Acting Ensign Rod.

"You are on Space Station 666. I'm mission specialist Ray. Are you male or female?"

"Does it matter?"

"Many of your parts had to be replaced. Tough to get some of the older ones. And we guessed male."

"That's right. Uhm, what's your specialty?"

"I'm a military historian. I'm investigating the Battle of the Berg. No one knows why all the Berg ships blew up."

"They all blew up?"

"Including some on the Berg home world. Ship yards were near cities. More than a billion Berg vaporized. Led to the end of the war."

"So, I've outdone Hitler, Stalin, and everyone combined."

"Sorry?"

"Well, Hitler and Stalin only killed millions. Uhm. How long was I out?"

"We found you a couple years ago. It's been 76 years."

"Great. Acting Ensign Rod, Genocide. Over 200 years old and totally obsolete."

"But think of the back pay."