July 3, 2008

Cell Phones and the Doctor’s Office

Filed under: Software Blog, Personal Blog — marcstober @ 2:01 am

Why is it that someone else talking on a cell phone in public is impolite, and when you’re the one talking on a cell phone, it’s an important call? I find it curious that people will pass judgment on someone without knowing the caller’s situation.

Recently I went to an urgent care appointment at a very large group medical practice. I was irritated by signs in the waiting room telling you to turn off your phone when you enter the building. There are many legitimate reasons to be on the phone in the waiting room:

  • Your spouse dropped you off at the front door since your foot was hurt, and you need to tell him where to find you once he parks the car.
  • You need to tell a babysitter that your appointment is running late.
  • To tell your boss a family emergency has come up, you’re at the doctor, and you’ll miss that meeting it took two months to set up.
  • You need support after a bad diagnosis. (Or, you got a good result and need to tell your mom to stop worrying.)

Whatever the reason, it’s more important to you than anything going on in the waiting room. Yes, you should respect other people waiting, but is being considerate to strangers really more important than showing respect to people you know by keeping them informed as you deal with a medical issue?

(Maybe this is “sign inflation”–they don’t care if everyone turns off their cell phones, so long as it keeps the volume down, and they can point to the sign if they have to tell someone to be quiet. Not my idea of compassionate care, though.)

There’s an idea that medicine is such a serious matter it must be more important than whatever you’re talking about; some hospitals have banned cell phone use for fear of radio interference with medical equipment. Today, major hospitals use mobile phones, and even WiFi, for communication among doctors and nurses, and recognize that patients and families need to keep in touch. As with anything, the technology isn’t the problem, it’s a question of how you use it.

May 25, 2008

Problem syncing Samsung SCH-i760 with Mobile Device Center on Windows Vista

Filed under: Software Blog — marcstober @ 8:05 pm

If you’ve been following this blog, you know I like my my new Windows Vista computer and my new Windows Mobile phone.

Alas, they don’t like each other.

The phone came with a USB cable and software for syncing files, etc. between it and a PC. This is one of the reasons I got a smartphone, and also so I could find new uses like installing new programs, syncing calendars, and general tinkering with a mobile device platform.

I had heard that Vista came with a new Windows Mobile Device Center, so I wasn’t so surprised when the link to install the ActiveSync software on the CD supplied with the phone was disabled. I figure Vista already had the software it needed, and it would just be plug-and-play.

Unfortunately not; and it was several hours and a few scary “blue screens” before everything was working.

When I connected the phone to the computer, the computer seemed to recognize a new device was connected at first. But, it didn’t open the Device Center, and when I opened the Device Center from the Start Menu (is it still called the Start Menu in Vista–it doesn’t say “start”?) it said “waiting to connected,” and didn’t find my phone.

After a quick Google I was able to download a new version of the Device Center from Microsoft, but installation didn’t go so well, apparently because I was logged on as a non-Administrator. Eventually, it just got hung at a screen that said “0 seconds” remaining. If I left it long enough, the computer would go to sleep and not wake up: the light on the computer stayed blue, but the monitor stayed asleep (orange), so I had to hold down the computer power button to force it off. Not something I want to do.

After logging in as administrator, I installed the device center, but when plugging in the phone got an error about a “malfunction” in the USB device. This is a pretty serious accusation - my new phone is broken, and it’s not just a software issue? Unlikely.

At this point I installed the ActiveSync software on my Windows XP laptop, where it just “worked.”

Somehow all of this caused an even more critical problem with my computer because it wouldn’t shut down or restart cleanly, hanging on the “Shutting Down” screen and eventually crashing with a blue screen. A blue screen crash, on my new Vista computer. The honeymoon is over. :)

So, I decided to run System Restore. I tried a couple restore points and the operation timed out. Eventually, I had to run the system restore from safe mode. Apparently this is a sort of best practice, but not some I was aware of.

Finally, I found some good information at pdaphonehome.com forums. The end result was that I needed to uncheck “advanced network functionality” (in phone settings), perform a “hard reset” on device (although I’m not sure I really did this, because it didn’t go back to factory settings) and then I connected the phone again. The interesting thing is that this time, when the computer popped up a balloon “installing device driver” (as it has the very first time I installed it) is found a driver named “Samsung MITs USB Sync” instead of some sort of “RNDIS” driver.

So, I suspect there is some problem with this RNDIS driver with Vista; however I don’t think I need whatever advanced functionality this driver has for what I’m trying to do.

Syncing a PDA with a computer is a really typical use case for non-technical users, who don’t have time to deal with these issues; and it’s a use case that’s been around for years. It’s too bad they haven’t got all the bugs ironed out.

April 28, 2008

Why I like Windows Vista

Filed under: Software Blog — marcstober @ 9:55 am

Windows Vista has gotten a lot of bad press. Maybe some people were expecting Microsoft to pull a Linux-and-Mac-killing rabbit out of its hat, which Vista is not, but it’s an improvement to Windows in its own right. A few weeks ago I got my first Vista-equipped PC and here are some of things I’m liking about it:

User Account Control–yes, I like it. UAC means simply that you are prompted before you can make a change that will affect other users. I don’t see that as a nuisance; that’s a security feature I want, so I can decide who and what gets to install new programs. This is the first computer where I’ve actually set myself up as a standard user, because I can always input an administrator password (without logging off) when needed. Maybe some software vendors and their users were caught off guard with programs that always needed to be run as an administrator, but running as administrator for is a bug, not a feature (certain administrative utilities excepted).

I like how in Vista the real path to user files is (for example) C:\Users\Public\Photos vs. “C:\Documents and Settings\All Users\Shared Documents\Shared Photos.” It’s a much more elegant way to say the same thing, reminding me of short DOS and Unix file naming conventions without being cryptic. It’s like they don’t need to show off long file name support any more–names are just as long or short as needed. I also like how the links to these folders are simply displayed in the Start Menu.

I like that the computer goes to sleep and wakes up much faster and more reliably than XP. This is the first computer where I don’t dread a long boot-up to quickly check an e-mail or search–I typically just let it fall asleep, and when I come back it only takes a few seconds to resume where I left off. The Windows Vista Team Blog says “everyone knows that turning a TV off doesn’t really turn it off,” and they wanted to Vista to work the same way. There are reasons some users might want it to work differently, but getting the real TV and cable box to turn on and off together reliably is more of a nuisance in my life right now.

Also, it’s a minor thing, but I think Microsoft has done a better, if not award-winning, job on the visual experience. I like the analog clock, and the way the screen fades in and out quickly when logging on and off. There’s also clearly been some engineering work to support this without compromising response time.

So, should you get Windows Vista on your computer? There are reports of people actively downgrading computers from Vista to Windows XP, which I think is pretty silly. In my judgement, Vista isn’t a reason to go out and buy a new computer (or upgrade one you’re not planning to replace). Vista is an improvement over Windows XP, and it’s helping me enjoy computer, so I’m happy with it.

March 24, 2008

Review of my new Samsung SCH-i760

Filed under: Software Blog, Consumer — marcstober @ 6:16 pm

There are a few stereotypical use cases for mobile phones and similar wireless devices. The younger generation needs to text their friends. The older generation needs a phone only for emergencies. And, of course, the professional needs their “crackberry” to check office e-mail. I think a lot of people have a need for mobile communications without falling into one of these categories. I’ve always had a pretty basic cell phone and I finally decide to buy myself a Samsung SCH-i760 Windows Mobile smartphone from Verizon Wireless. I see my needs being somewhere in between the texting teenager and the e-mailing executive. I do need to keep in touch with work, at least by phone for emergencies, but simple e-mail isn’t a killer app for me. (By “killer app” I mean “application,” some restaurant recently used the term to refer to their appetizers.) Somewhat like the teenager, having a more advance mobile data device is largely a personal investment, although with somewhat different uses. The killer app for me is probably going to be online search, maps, and note-taking and web browsing.

The device does a little bit of everything. It has all the functions of a traditional PDA, with a stylus and capability to sync with a computer via a cable. There’s also a slide-out QWERTY keyboard, without which typing messages, for me, would be a non-starter. The unique feature of this model is a separate telephone keypad with physical buttons; with the keyboard closed, you can use these to dial the phone; and with the keyboard open, you can use these when you need to enter numbers as well.

The phone supports Wifi, for faster/cheaper data when that’s available. There are a few options for e-mail. First, I was able to get to my company’s Outlook Web Access interface, it’s clunky yet might be the best solution for the times I need this. I was also able to sync with my office using the built-in mobile Outlook application, but I disabled this as it isn’t really what I wanted, and it seemed to keep initiating a data session, which, even though I’m on an unlimited data plan, definitely wasn’t what I wanted. Verizon also includes their own wireless sync system that I haven’t tried.

This is where not fitting into one of the stereotypically use cases presents a challenge. Want office e-mail pushed to your device, Blackberry-style? Fine. Want to be able to get access to all your information, personal or business, as you need it, combined in one place? Not so easy. I need to be able to keep my family and work calendars somewhat separate, but may need to access both of them. Similarly for e-mail, tasks, and contacts. So, I’ll probably keep doing a lot of the via mobile web browsing until I come up with a better solution; I’ll probably look at OggSync as I seem to be it’s target use case. I’d also love to find a program that gives me a “prettier” view of Outlook Web Access on a small without requiring my company to do anything differently on its server, or storing message on my phone.

Finally, why not an iPhone? I could have done that, I suppose. For various reasons I chose to stick with Verizon, and Windows Mobile is something I still wanted to try out. Maybe next time.

February 26, 2008

The End of the Database As We Know It?

Filed under: Software Blog — marcstober @ 10:44 pm

I found this paper interesting as it presents an academic view of something I’ve been noticing from a grassroots perspective: the database as we know it is losing relevance, and new technologies will emerge that will make business applications faster to run and faster to develop.

Because of the graduate program I attended, one of the few computer science topics I know a lot about is relational database management systems (RDBMS), which underly most business applications today. In every job I’ve had, I’ve used an RDBMS, usually Microsoft SQL Server. Most developers don’t know fundamental RDBMS concepts; for example that you can’t just delete the log file when you run out of disk space, or what ACID properties are. As the paper points out, RDBMS’s are based on relational algebra and algorithms for managing disk files that haven’t changed since the 1970’s. Their use case is really a systems analyst entering SQL queries at a command prompt, which no one does any more. The fact that so few SQL (say “see-quell,” no one I know says “RDBMS”) users know these things is evidence of their irrelevance. No one decides SQL is the best type of database management system for their application; they choose it because it’s standard, you can find people and tools to support it, and does the job well enough.

I like one example the paper gives for a way to improve databases, which is to support a “constrained tree application” (CTA): an application that operates on a chunk of records from various tables that all relate back to one record from one table. For example, a customer and his various orders, order items, invoices, contacts, locations, etc. Every database I’ve worked on for the past 10 years, and for that matter almost every database everywhere, follows this pattern, but the RDBMS doesn’t provide any good features to support this. I’ve seen developers try to optimize this through various implementations, and spend a lot of time debating the right way to do it. We shouldn’t have to reinvent the wheel; the platform should take care of it. (This would also help minimize the differences between multitenant and single-tenant architecture, but that’s another debate.) I could come up with dozens of patterns that every application needs to reinvent when they store their data in a SQL database.

Actually, the RDBMS doesn’t have to disappear to be irrelevant, it can just be used wrongly, and this has already happened. An RDBMS is supposed to have a schema designed according rigorous rules of normalization, including constraints on and between tables to maintain data integrity. If you don’t do this—relying instead on a layer of code outside the database to enforce business rules—you have a set of indexed, multi-user tables, not a true relational database. Since SQL can’t enforce every business requirement anyway, it may make sense to build applications this way, and not try for a normalized data
model at all (although, as a classically-trained SQL developer, I’m not convinced this is the solution).

Right now I’m doing a lot of work in Intersystems’ Caché. While they call it a “post-relational” database, it has a lot of warts since it’s based on an even older, pre-relational, hierarchical database system developed in the 1960’s (not that much older than the first RDBMS, though) that’s been extended and evolved. Still, other object-oriented databases have come and gone over the years (sometimes under the buzzword “persistence”), and Caché stands as proof that the RDBMS is not the only feasible choice for business applications. There are newer alternatives emerging, at least to solve specific problems; for example, Microsoft’s Linq, or Ruby on Rails, which I’m hearing about everywhere now. If these technologies can do a better job solving problems, it could be a big change, indeed.

November 23, 2007

Computing three-and-three-quarters

Filed under: Software Blog, Parenting — marcstober @ 1:03 pm

My daughter Hannah is three-and-three-quarters years old–don’t call her three! There’s something new at this age of three-going-on four where she’s finally competent with the basic skills of kid life: “Do you want to play?”, “I have to go to the bathroom really bad!“, “More macaroni, please!”, and so on.

As part of that she has started to use the computer. She can log herself in, use the trackpad, and do everything except type in the NickJr.com URL (I supposed I should set up a shortcut she can click) to find the Flash games she likes. I’ve even seen her intuit, without reading, where the “Print” or “Next” button is going to be in the bottom right corner of a window. (Isn’t there something inherently validating in seeing your work printed?) She gets frustrated and wants help, which I don’t mind in theory because playing together is better than just letting her watch TV (though not so useful when you need to get housework done) and because, eventually, I’m sure I’ll be concerned about what she’s doing on the Internet on her own.

When Hannah was born we knew she was being born into a different world than we were as far as computers go (we joked about her needing her own e-mail address as a baby), but, I don’t think Hannah’s experience is going to be so different than our own. I first used a computer in kindergarten when I was 5, and was instantly hooked. Maybe there is a certain (young) age at which kids are ready to use computers, and we didn’t miss that much. Of course, what she can do with a computer is going to be different (that kindergarten computer, a Commodore PET, was the single one on a cart that rotated among all the elementary schools in my town).

August 29, 2007

Web 2.0 Moment

Filed under: Software Blog, Personal Blog — marcstober @ 11:11 am

I have to comment on this: I’ve been sitting in the house working on a document on my laptop for the past couple hours, when I went to check my e-mail, and learned that a package I’ve been expecting was delivered by FedEx an hour ago. If not for the e-mail  I still wouldn’t have opened the front door yet, but there is was, right outside.

Announcing Marc’s Indispensable Computer Tools List

Filed under: Software Blog, Blogging — marcstober @ 8:53 am

I’ve started a list of useful computer tools I call Marc’s Indispensable Computer Tools List. It’s not much yet, but you can check it out; I hope to add more later.

I’ve set this up as a “page” in WordPress (as opposed to as a blog post, like this one) because, conceptually, it doesn’t belong at a certain point in time; but I’m hardly a WordPress master so we’ll see how that works out.

July 7, 2007

Serializing arbitrary Python objects to JSON using __dict__

Filed under: Software Blog — marcstober @ 9:58 am

Python is my favorite programming language and although I don’t (officially) use it at work, I keep it around for writing quick utilities for my own use. Lately I’ve been using it for some simple code generation.

Anyhow, as my little code generation utility got fancier I had the need to be able to serialize some objects into a text file, edit the text file, and deserialize it back into objects. Basically a poor-man’s configuration editor.

I’ve done this before with the Microsoft .NET Framework by using the System.Xml.Serialization.XmlSerializer class. There are a lot of quirks and subtleties to XML Serialization, but for this sort of simple task, it works well.

I don’t mind XML, but I thought I’d try serialization using JSON. In part just to try out the latest fad, but even more so because I’ve always wanted to try bulding something with YAML, and now that JSON is YAML, that seemed like the way to go. I was initially turned on to YAML because of its bulleted lists, which looked a lot like a to-do list I’d type out for myself, and it seemed like magic that this same format could be machine-readable data without any further translation (the same feeling you get from Python in general). Maybe it was magic, because I’d never really gotten YAML figured out (not that I spent so much time on it) and while JSON doesn’t have the bulleted lists it’s easier to understand overall. Essentially, JSON reduces all structured data to ordered lists or key-value pairs; it’s one of those things that seems so simple but that zillions of other data formats tried and failed to do.

The next question is which JSON parser to use. You can do just about anything with Python but there’s a bit of a dichotomy between the stuff in the standard library that follows the one-right-way principle, and newer things where there are still a few ways competing and you have to get a feel for what’s been accepted by the community. I first tried json-py, then after reading this, simplejson which promised to be more “extensible” (though to be fair, json-py is at least worth more than you pay for it).

It turned out I couldn’t do what I wanted to do in either (or any) JSON implementation, I got errors that my object is “not JSON Serializable.” It seemed that it wasn’t going to be quite so easy to serialize my arbitrary object to JSON. This led to a long bout of searching the web and comp.lang.python for answer.

(Fortunately by this point it was 5:00 on Friday. I couldn’t really justify figuring out a new object-serialization scheme as part of my day’s work, so it became a weekend-morning programming project of my own, which also means I feel more free to spend time blogging about it.)

I found a couple interesting things along the way. First, what I am really trying to do is pickle, the standard Python way of “preserving” objects (i.e., in vinegar?) - but it doesn’t use a human readable format (or just barely, they are strings). Second, there is an XML pickle, although I didn’t try it.

I was thinking I would have to write some subsclass of simplejson’s objects to do what I wanted, which really wasn’t what I wanted to do; the whole point was *not* to write my own serialization/deserialization logic. Then I realized that the reason it seemed so easy with .NET is because XmlSerializer didn’t just take an arbitrary object, it also needed to be explictly told that object’s type. The type information wasn’t contained or implied by the XML file, it was specified by the code calling the serialization and deserialization. In fact, when I’d first encountered this I had thought that the need to specify a type made XmlSerializer seem a little less “magic” than the general idea of dehydrating and rehydrating objects to/from text. Anyhow, once I realized that my objects needed to be translated to and from built-in data types in my own code, and I was okay with that, I found a really Pythonic way to do it, using __dict__:


import simplejson
class Person:
    def __init__(self, name=None):
        if name:
            self.name = name
people = [ Person('Marc'), Person('Rachel') ]

# Fails with error that Field class "is not JSON serializable"
#s = simplejson.dumps(fields)

# This is what we want.
s = simplejson.dumps([p.__dict__ for p in people])
print s

# Deserialize
clones = simplejson.loads(s)
print clones

# Now give our clones some life
for clone in clones:
    p = Person()
    p.__dict__ = clone
    print p
    print p.name

Of course, this doesn’t work for arbitrary object graphs, but it satisfys the “80/20 rule” of what I need most of the time.

Note that there are probably some security risks (at least) in rehydrating objects using __dict__ like this so make sure you only use this technique with trusted data, or come up with some other defensive mechanism.

Comments welcome.

May 5, 2007

Finally!

Filed under: Soapbox, Information Politics — marcstober @ 9:48 am

Finally, the Supreme Court has recognized that intellectual property rights exist to promote progress (Microsoft vs. At&T and KSR vs. Teleflex), and not simply to protect some intrinsic right of ownership.

I’ve think this is a pretty straightfoward reading of the Constitution (Article 1, Section 8, Clause 8) and it’s bothered me that people don’t get it: not my congressman who I once wrote to about IP issues; not the Federal Circuit Court of Appeals which has most jurisdiction over these matters; and not the lawyers in my family who will talk your ear off about politics and justice but can’t be engaged on this issue. Concern about this has seemed to be the exclusive province of a geeky subculture that reads Slashdot and Wired magazine, where Lawrence Lessig’s columns mostly “preach to the converted.” But it’s not a geeky issue; the free exchange of ideas (and access to technology to promote that exchange) is fundamental to our democracy.

Perhaps we should have been using an analogy: should a restaurant go out of business because someone patented putting ketchup on a hamburger? Should I lose my house because I didn’t license the patent on putting the diswasher next to the sink? Some things are obvious; but adopting obvious ideas was becoming something that could risk one’s company or career. Chefs, interior designers, and software developers have similar jobs: we aren’t hired to invent something new and patentable as often as we’re hired to make to order that same general sort of thing everyone else is doing. What’s fair is for people and businesses doing actual creative work to be protected without their legal budget exceeding their R&D cost, but until now the the legal system didn’t see it this way.

 

Next Page »

Copyright © 2006-2008 Marc Stober

Powered by WordPress