What’s the point of Twitter? My answer

A friend of mine asked on Facebook who had a Twitter account and what the point was. Most had an account but found it pointless. I thought my answer was kind of interesting:
I do (@sosiouxm3). It’s probably most useful for discussing niche topics and live events. For general social interaction… not so much.
The main point of it is that it’s a real-time stream of public comments that’s easy to search and see as it progresses. If we had Twitter on Sept. 11, 2001, a continuously updating search for #WTC or the like would have been very interesting to watch. Now, you can hear directly from the horse’s mouth about protests in progress, or natural disasters, or even Burnie Sanders’s filibuster the other day. All in brief blips, of course – most contain a tiny link to more info or an image/video.
I like to use it to toss off quick thoughts that occur to me or pass on little tidbits (it’s helpful to have my phone nearby). It’s sort of like an extremely large chat room that way. Sometimes I get quick feedback from people I don’t even have any contact with, like company/organization reps. I also just like to occasionally dip into the stream of thoughts by people I find interesting – wind up with a lot of odd bits of information that way. I have to be careful not to get sucked in too often.

It’s not the errors that make me scream about Java/Maven/Spring/Eclipse

What really gets me is that I always seem to come up against ones that are not only inscrutable, but seem to be unique to me. Google brings up nothing, or brings up only irrelevant results from five years ago and a different context. Here’s my latest. In a Spring configuration file, I have:

<jdbc:embedded-database id="dataSource">
    <jdbc:script location="classpath:rewards/testdb/schema.sql"/>
    <jdbc:script location="classpath:rewards/testdb/test-data.sql"/>

This gets me an error in Eclipse (STS actually): “No constructor with 1 argument defined in class ‘org.springframework.jdbc.config.SortedResourcesFactoryBean'”


Google’s not helpful. Looking at the source of SortedResourcesFactoryBean doesn’t display any evident source for the problem. Guess I’ll ask on the Spring forum and see if I can find out anything. For all I know it’s an STS bug with 2.5.1; this exact same code and setup worked before, in an earlier version of STS. But it’s probably something related to the environment, perhaps the JARs I happen to have available via Maven.

Import/Export for LogMyLife #androiddev

Over the past few nights I whipped out an import/export capability for LogMyLife. Right now all it does is basically package up the database and a version file; later I expect I’ll include saving properties, which is why I’m including format version in the archive (I thought that was good foresight, as who knows what else might change). I wrapped it up in an activity you can call from the menu of the Main activity.

The implementation is reasonably straightforward, although I didn’t know a thing about handling files from Java. It’s predictably verbose but not too outrageous. I got a lot of help from this StackOverflow entry and this sun.com article. If you’re thinking of doing this you might check out how I did it for inspiration. I’d certainly encourage everyone to provide this capability so users can back up and transfer their app data!

I faced an odd little problem on importing: of course, it replaces the app’s DB. When I returned to the main activity, I returned a result code indicating this had happened, and had it close the database handle and reinitialize the components that displayed information from the database. But something seemed to be holding on to a database cursor and requerying it, and I couldn’t quite figure out why that was happening. Eventually I decided it would probably be simplest if I just have the activity restart itself from scratch. An answer on StackOverflow helped with how to do that – it’s not totally obvious; basically, just finish() the activity, and then (before exiting the same method) start it again.

Gingerbread is out, woo! And the Nexus S is coming; but I want a phone with a keyboard, dammit. Once my Nexus One gets 2.3 I’ll likely try to sell it in favor of the G2. Even though tethering is extra, which is wrong and bad and to be vehemently discouraged, but I don’t use tethering anyway.