Archive for May, 2008

Open Office and Plain Text Files

Keywords: Open Office, MSDOS line endings, a .txt file opens in Open Office Calc

I noted the following odd peculiarity recently. When opening a plain text file with the .txt extension using Open Office either on Windows with the MSDOS \r\n “CRLF” line endings or on Unix with Unix \n “LF” line endings, Open Office Writer correctly opens the file without complaint. However, when opening a plain text file with MSDOS “CRLF” line endings on Unix, Open Office tries to import the text file into a spreadsheet and pops a dialog. I don’t know if that is intended behavior or not, but it is useful to know if you’re processing text files in a Unix envoronment. This was observed in Open Office 2.4.

Update June 3, 2008 I reported this to Open Office with some extra details. Again I don’t know if it is a bug, but you should probably be aware of text file line endings, and have tools ready to change them if necessary.


Read Full Post »

Keywords: .Net, Email, Attachments, Where are all the open file handles coming from?

Sending an Email message in .Net is easy using the System.Net.Mail namespace. Just make sure that if you use attachments, you dispose of them when you’re done. The reason is that creating and adding an attachment from a filename silently opens a file on your system and holds it open either until the attachment is disposed or until the entire message is disposed. The timing of opening/closing the attachment file has nothing to do with when you actually send the message. Given that the garbage collector is usually configured for best response time, that could very well be long after your message has gone out of scope; ie- until your process dies or is bounced by a web server.


Read Full Post »

Against Customer Loyalty Cards

Keywords: Grocery Store Cards, Preferred Member Cards, Junk in my Wallet

I’m turning over a new leaf this week.

Lately I’ve been concerned about reducing my weekly “discretionary footprint”; that is, the amount of money I spend every week at coffee shops, convenient stores, and fast food restaurants. So I went to the grocery store last night and picked up a few loaves of bread (some of which I can freeze), lunchmeat, soda pop, and some prepackaged treats. I went through the self-checkout line at my local supermarket, and while I was checking out I noticed that quite a few items rang up at higher prices than advertised on the store shelf. After checking out, I walked over to the attendant and brought it to her attention. She informed me that the difference was due to the fact that I didn’t scan my “Preferred Customer” card. As it turned out, I didn’t have it on me, so I will have to go back today with my card and argue for the difference.

Read Full Post »