March 24, 2008

Review of my new Samsung SCH-i760

Filed under: Consumer,Software Blog — 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: Parenting,Software Blog — 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: Personal Blog,Software 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: Blogging,Software Blog — 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: Information Politics,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.

 

March 6, 2007

A gazillion recruiters calling my cell phone, two offers, one new job, and zero neckties: Breaking the rules to find a new job

Filed under: Software Blog — marcstober @ 6:07 am

“Hi Marc, this is Mike from the sleazy consulting group in Boston. I saw your resume online and would like you speak to you about a .NET position for a client that I think would be a perfect fit for your background. I am in today and my direct number is 617-123-4567. (If it turns out this position isn’t the right fit for you, I wonder if you know anyone who would be looking for such a position?)”

I probably got around two hundred messages like this. Always the emphasis on some insignificant words that make the message sounds businesslike, without actually talking about the job. Always the line about the job being a great fit, which I learned from experience usually means that they don’t have a client, yet, but they’re cold-calling managers and want candidates ready to go when they schedule an interview. Often making me depressed that I haven’t been invited to the parties of unemployed software developers.

This is my second “mid-career” job search—what at one time I would have called a “real grown-up job.” All the idiomatic advice that was drilled into my subconscious work ethic in college and earlier no longer applies:

What “they” say:

Instead:

You need go out and pound the pavement and be willing to do whatever, because you need a job.

You’re not going to pay the mortgage doing just whatever. You need to be selective. Especially if your time is already committed to a current job.

Your resume should not be more than one page.

Your resume should read like a mail-order catalog full of projects a potential employer can get done by hiring you.

The point of a job interview is to correctly answer the questions you’re asked. Try to o think of one or two intelligent-sounding questions you can ask at the end.

A job interview is basically a sales call, and you can do better if you control the conversation. (Read Ask the Headhunter.) Before you accept a job, however, you’ll want to ask some questions to make sure you’ll actually get the resources to succeed in the new position.

Entry-level employees should be seen and not heard.

They want someone who will speak up with a solution they’re looking for (and you can start this in the interview).

80% of success is simply showing up on time.

No one really cares when you get to or leave your desk, and even if they do, both you and your manager have more important issues to discuss.

Being professional means you know how to answer the phone, fill out forms, and put paper in the copier.

Being professional means you know when and how to ask someone to do these things, even if you think you could do it better yourself.

Wear a suit and tie.

I made a point not to wear a tie; I didn’t think I’d enjoy working for anyone who would see this as a problem for a software developer. (I did wear a jacket and dress pants. And I might wear a tie in the future if being considered for an IT manager position in a company where other executives wear ties. But I’m not there yet.)

I worked hard to break the rules, and, for the first time in my career, got two job offers the same week. (Surprisingly, it was a far more stressful week than any one in which I’ve been unemployed!) My strategy was to focus on contacts directly from employers and after about two months looking for a job, ironically, I accepted a job with the first company to contact me directly, in the first week of the job search.

I decided to accept an offer from Partners Healthcare and this broke the job-search rules a little, too. I didn’t choose strictly on salary, and I turned down a software company (generally considered a better choice for a developer) to work in IT. There were a few reasons, not the least of which is that at this point in my life it helps to choose the job closer to home. Even though the other job would have paid a little more it wasn’t going to materially make a difference in whether I could pay the bills, so that wasn’t the main factor. A big reason I took the job is that I’ve never worked in a large IT department; I’ve always worked in small companies reporting directly to a CIO or VP. I’ve never been able to move up or across the organization while saying in IT and I’ve never had to coordinate projects with other internal teams, and I want to see how that’s done. I value my software industry experience but there’s a lot of my training (particular my graduate degree in information systems, not computer science) I haven’t been able to use at smaller shops. I’m also not exactly going to work for a corporate IT department: good science, technology and research are a reason for Partners’ existence and a way that it’s judged. Someone compared working for Google to being in grad school and in that sense Partners reminds me a little of being in college. (Keep in mind I went to Washington University, where the medical school was a big part of the institution.) I liked being in college; the work was challenging, the institution as a whole was supportive, and I learned a lot. So we’ll see how it goes!

January 18, 2007

Design, and the lack thereof

Filed under: Software Blog — marcstober @ 10:09 am

A post on Coding Horror, “There Are No Design Leaders in the PC World,” got me thinking.

The most aesthetically pleasing piece of computer technology I know is Craigslist. Form follows function. The basics of computer display are melded into something much more elegant than glossy graphics.

If only Microsoft had such restraint. I just discovered that the replacement for the NT “kill” command is “taskkill” in XP. It is so much less satisfying to “taskkill” a process than to “kill” it. :) And the double “k” – ugh.

On the other hand, most building aren’t works of great architecture; and most cars, product packages, advertisements, consumer products, etc. are designed to sell, not to go into a museum. So it’s a broader social phenomenon.

One thing I’d wonder if if this plays out an different in Europe than North America.

Anyhow, back to the regular business of being a misunderstood artiste/developer…:)

January 11, 2007

I Grok the Mock

Filed under: Software Blog — marcstober @ 10:02 am

Interesting article about unit testing:

http://martinfowler.com/articles/mocksArentStubs.html

This clarified two things for me:

1. What exactly are these “mock objects” I keep hearing so much about.

2. Why I like writing unit tests in certain ways, other than just intuition. (It turns out I’m a state/classical unit tester; and I now have a mental framework for deciding when to stick with that vs. when to try behavior/mockist testing instead.)

Via Ned Batchelder’s blog.

« Previous PageNext Page »