Ongoing musings, tips, and observations from a Van Couvering, not someone who is going to Vancouver.
Wednesday, June 17, 2009
New York Times on social media as the only way to get the word out
I've been reading the Twitter #iranelection stream, and a lot of it is chaotic, doubtful, over-enthusiastic, or silly. But there are also gems in there, with links to articles and lots of pictures showing the emotion of the demonstrators and the violent repression that is going on.
It definitely gives a different more real and emotionally engaging view of what is unfolding from traditional media, with an article here or there, mostly talking about what they've heard is going on through Twitter, and only showing "sanctioned" pictures of pro-government rallies.
But to me what is most important is not what I can learn about what is going on, but what Iranians can communicate with each other even as the government tries to shut down communications. I read in a NYT article that demonstrations are being organized through Twitter. That was great news to hear. And I pray for them, because the risk of serious injury or death is very real, and they are still moving forward. Incredibly bravery and determination.
Thursday, June 11, 2009
Thinking about getting a gTLD - talk to Antony
For a brand owner, having your brand name as the destination for your customers on the web is ideal. How much money do major corporations spend on branding, and how effective is Internet visibility? To me, it’s a no-brainer to brand yourself instead of a domain extension like .COM which has nothing to do with your brand. For a city, it’s a tremendous aid to tourism and local business, with great possibilities for civic initiatives. Another key advantage, if you keep your TLD clean (in other words, take steps to discourage warehousing, non-working sites, and template sites), is that search engines will pay attention. For instance, .NYC will be about New York City in a meaningful way, and if Google wants to deliver relevant searches (which it does), then it will favor the .NYC TLD when someone types in “nyc” or “new york city” or “manhattan” or any other New York-related term.
Do we *really* want SQL in HTML5?
There's been a lot of interest around the Web Storage spec (formerly part of whatwg HTML5), which exposes a SQL database to web applications to use for data storage, both for online and offline use. It presents a simple API designed for executing SQL statements and reading result rows. But there's an interesting problem with this; unlike the rest of the HtML5, this section defines a core piece of functionality in terms of an undefined chunk referenced as "SQL".
The initial implementations of Web Storage are both based on SQLite, and expose the dialect of SQL understood by SQLite to web content. I'm actually a big fan of SQLite, and was one of the advocates for pulling it into the Gecko platform. However, SQLite implements a variant of SQL, with a number of deviations from other SQL engines, especially in terms of the types of data that can be placed in columns.
Web content that is created to use database storage with SQLite as the backing is unlikely to work with any other backend database. Similarly, if another database was chosen as a browser's backing implementation, web content that works with it is unlikely to work with anything else. This is a serious interop problem, the root of which is that there really isn't a useful core SQL standard. SQL92 is generally taken as a base, but is often extended or altered by implementations. Even beyond the parser issues (which could be resolved by defining a strict syntax to be used by Web Storage), the underlying implementation details will affect results.
So, the only option is for the Web Storage portion of the spec to state "do what SQLite does". This isn't specified in sufficient detail anywhere to be able to reimplement it from the documents, so it would be even worse — "do what this exact version of SQLite does", because there are no guarantees that SQLite won't make any incompatible changes. For example, a future SQLite 4 may introduce some changes or some new syntax which wouldn't be supported by earlier versions. Thus, it requires every single browser developer to accept SQLite as part of their
platform.
There then follows a lot of discussion about how to handle this, from creating an ORM layer to fully specifying the standard subset of SQL that will be supported in HTML5 (as if there were a valid standard). One person argues that we can simply refer to the ISO SQL standard and then describe extensions to that standard.
OK, well, I have worked with relational databases for over 20 years, and I have seen how completely stuck customers are with a given database vendor. I don't care how "standard" the standard is, it's merely an illusion. There is a reason Oracle can charge such huge sums of money and smile as customers fume. There is a reason Sybase is still in business. It is almost impossible to move a large database application from one vendor to another.
We all know how difficult it is to write code today that is compatible across all browsers. Imagine if each browser had its own SQL database that "implemented the standard." That's where we're heading, and it sure seems hellish to me. I guess if we forced every browser to use SQLite, we'd be OK, but that seems to placing an awful lot of reliance on a single technology. And as Vladimir points out, that doesn't solve issues of incompatibility across versions of SQLite.
It seems to me the requirements are to have rich storage, particularly for Javascript objects, and a way to query over this storage. I know saying is easier than doing, but shouldn't we be defining an API that defines JSON storage and a JSON query language? The Persevere folks have already defined a JSON query language, and they seem to have put a lot of thought into it. Perhaps that could be used as a start.
I can't say I have a solution, but I'm just raising a flag that creating a standard as important as HTML5 with a placeholder for "SQL" is an invitation for major incompatibilities which we'll be digging ourselves out of for years to come.
Wednesday, June 10, 2009
Michael sings the train blues
Listen to him singing about the piston at the end. What to say, infinite cuteness.
Middle age: learning acceptance and contentment
We often have ideas about how our life should be going, but that's not the way it's going, and we fight and fight and fight. But at some point we are taken down, usually by some bodily failure (which is where middle age comes in) and we are forced to let go and accept. I suspect that this is the seed of wisdom.
This is also the message I see regularly in Indian scriptures. Krishna says "it is better to live your own dharma poorly than someone else's well". The great statements of Vedanta say "All this is God" and "Nothing but God exists." To me, one aspect of this teaching is that if I am seeing my life as "not good enough" or not where I want to be, then this implies I am not seeing God in my life.
Sometimes this is very hard to accept.
Over the last three weeks I went through a debilitating flu and had to go through a root canal (partially caused by grinding my teeth). I took these as signs of a life out of balance and did some self-inquiry.
First of all, I was exhausted, and secondly I was stressed. This much was obvious. Next question was why.
I have just started a new job after being laid off by Sun. I didn't really expect to make this change, and I don't think I had fully accepted the change. At Sun I was working with some serious rock stars of the industry, and doing some "cool stuff" in open source. In my new job, it's a great team and fun work, but I have been unhappy because (to me) it just wasn't that "cool."
I have also been watching all this interesting stuff going on in the web tier - distributed data stores like CouchDB, rich client development using Javascript/HTML5, Flex and JavaFX, potentials for peer-to-peer collaboration, etc. But none of this has anything to do with my day job.
So I started trying to do this stuff on the side. Keep in mind I'm a father of 2 young kids, and I also just took away two hours from my day for commute time. So I was squeeezing this into late nights and early mornings. Thus the exhaustion. And the grinding teeth: I was pushing and pushing myself, I didn't want to let it go and just do my day job - that would be admitting surrender.
But after these illnesses and further thought and I saw that (a) this wasn't a maintainable lifestyle and (b) I was being proud and egotistical. My day job was "below me" and I was meant for "greater things." Hints of Raskolnikov. I wasn't accepting my life as it is.
So with a sigh I saw it was time to let go. No more late nights trying to hack Javascript and CouchDB. Although part of me feels like I'm letting go the chance to ride this wave, I also have to admit I've been much happier and less stressed since this decision.
It's such a fascinating process. This wasn't the first time I've gone through it, and I doubt it's the last.
Great article on CSS development
The principles he mentions reminds me a lot of software design in general:
- find the patterns and reuse wherever possible
- work from generic to specific
- work to keep clarity as you maintain it
Friday, June 05, 2009
What a concept: a steady state economy
Then I heard about this concept in terms of the economy in general. I read how a steady state was considered the same as stagnation - like some horrible third circle of hell. But you just do the math in your head, and you wonder where all this growth is going to take you. Sure enough, it's not sustainable, and bubbles burst. And I just sigh when I hear all these economists (who got us into this mess) trying to get us back to a trajectory of growth. Can't we try something else for a change?
So, I thought I'd share with you this very insightful and entertaining article by Herman Daly, posted on the Oil Drum. Herman Daly has fun skewering the growth economists (who I'm sure are ostracizing him as we speak) and then goes on to describe a vision of a healthy steady state economy. You know, the old general store instead of Wal-Mart.
Here's one juicy skewer quote:
Some economists in fact think of nature as the set of extractive subsectors of the economy (forests, fisheries, mines, wells, pastures, and even agriculture….). The economy, not the ecosystem or biosphere, is seen as the whole; nature is a collection of parts. If the economy is the whole then it is not a part of any larger thing or system that might restrain its expansion. If some extractive natural subsector gets scarce we will just substitute other sectors for it and growth of the whole economy will continue, not into any restraining biospheric envelope, but into sidereal space presumably full of resource-bearing asteroids and friendly highly-evolved aliens eager to teach us how to grow forever into their territory. Sources and sinks are considered infinite.Then Mr. Daly goes on to offer 10 proposals to help reach a healthy steady state economy. I'm not sure I grok or even agree with all of them, but it's a starting point for a healthy dialog about this. I recommend having a read...
Tuesday, June 02, 2009
JSR308 (pluggable type checking) is looking promising
Basically, you can add annotations that check for things such as NonNull or Nullable, and then incorporate a checker that supports these annotations into the compiler.
For example, you can say
import checkers.nullness.quals.*; public class GetStarted { void sample() { @NonNull Object ref = new Object(); } }and then say
javac -processor checkers.nullness.NullnessChecker GetStarted.javaand the checker will ensure that the @NonNull object indeed is not being set to null anywhere.
Take a look at the page for JSR308, this looks like a good new addition.
Learn CouchDB through online experimentation - highly recommended
Friday, May 29, 2009
Excellent article describing how to work with CouchDB and jQuery in Firebug
Thanks to @nitin for this link, and thanks to Ben for taking the time to write it up! These simple tip blogs are one of the most valuable aspects of the social web for me.
Thursday, May 28, 2009
Twitter for communication in a disaster
Wednesday, May 27, 2009
Google needs HTML5 and JavaScript
But why are they giving developers phones? Well, being at Sun, I know the strategy: you capture developers, and many good things flow from this.
The other effort to capture developers is all the stuff around HTML5 and making JavaScript faster and better. Take a look at Tim O'Reilly's great post that summarizes the many cool HTML5 features that are already available in most browsers, things like a native JavaScript canvas and easy embedding of videos.
Why is all of this so important to Google? Because if JavaScript and HTML doesn't get much better quickly, then developers will move to the RIA model (ala Flex or Silverlight or Java) to get the beauty and dynamics they need for web-based applications.
And this would be a Big Problem for Google, it seems to me. Why? Because you can't crawl RIAs. You can't add AdSense RIAs. And ads are the cash cow for Google.
It looks like they're doing a great job though - the developers at the Google IO conference are very exicited. My suspicion: the web browser is going to win over RIAs like Flex and Silverlight, because it (a) developers are already used to JavaScript and the browser and (b) it works today on mobile web platforms like the Android and the iPhone and Palm's WebOS.
And by the way, if you're building a rich UI in JavaScript (or in any rich internet app environment), then the role of the server becomes very different - it stops being responsible for handling UI events and generating UI, and instead becomes a simple provider of web services. Just like the good ol' days. I think there are a lot of interesting consequences from that architectural change...
Wednesday, May 20, 2009
SchemaBank - web-based visual data modeling and change management
You can export a SQL dump from MySQL or PostgreSQL, import this into SchemaBank, and start going. Or you can start with a fresh schema. You can do visual data modeling, versioning, branching, diffing - in other words, both modeling and change control for your schema.
The UI looks sweet, although I'd be curious how it handles super-large schemas, always the bane of ER tools. It does have "Bird's View" which is a good sign they're thinking in the large.
Using CouchDB map/reduce to generate a bloom filter
Once this is done, definitely something to keep in the toolbox. Thanks, Devlin!
Thursday, May 14, 2009
Gone over to the Twitter side
The problem is now when I have little comments to make or links to post, I post them on Twitter instead of here. I wish I had an easy way to post the same link to my blog, but I haven't figure that out yet.
I've added the "Follow me on Twitter" button to my blog page, or you can just go here and click on the "Follow" button.
If you're not on Twitter and are wondering what all the fuss is about, the best thing to do is to try it, it's very hard to grok otherwise. And I really do recommend TweetDeck, it helps makes it more manageable and easy to use, and thus you use it more and stay engaged.
I'm sure there are other apps that are similarly good, but without one of these the whole thing just doesn't work.
David
Java is like classical, Javascript is like jazz
I've been a Java programmer for years. I have always enjoyed its clarity and structure. The static typing lets you say what you mean and mean what you say.
Reading Javascript code isn't like that. Nobody tells you what somethings going to be used for, and it can change over time. Objects can be of any type and can have any number of elements. Functions are created and destroyed like wafts of smoke.
I finally realized the Javascript is like impressionistic and avant-garde art, like jazz. It flows, it molds, it changes, like a dream. Java is like renaissance art, like classical music. Its beauty is in its form and structure, but it constrains your ability to express and invent - you have to follow the forms given to you.
Of course this isn't a perfect match, but it helped me remove my Classical hat and put on my Jazz hat when dealing with Javascript. And it also helped me understand why Java is so popular in the enterprise, while Javascript (and other dynamic languages) are so popular for the creative types building consumer-facing applications.
Sometimes a little metaphor like that can go a long way. Now all I need to do is start wearing black and pierce my lip...
Thursday, May 07, 2009
Larry Ellison wants to keep hardware, SPARC, and storage
Tuesday, May 05, 2009
Very nice code review tool
All review comments are published via email so it can be tied into an open source community where all discussions/reviews are supposed to happen over the email list.
So much better than email reviews, where you have to somehow manage all the comments in a single email, which can be quite daunting.
Saturday, May 02, 2009
Inhumane pig conditions are incubator for swine flu
What I've noticed is that often, when we instinctively know something is not right, often we find out it's true when the unforeseen consequences arise. The latest example of this theme comes from an excellent article in Wired magazine (thanks @larrybrilliant), where they describe in detail how the swine flu now spreading through the world had its origins in insanely packed pig farms:
The horrible packing of pigs for slaughter, standing in their own excrement, combined with an "ever-escalating array of ... vaccines." Sounds horrible, it seems wrong, and as we see, there are consequences.At an environmental level, the conditions which shaped H3N2 and H1N2 evolution, and increased the variants’ chances of taking a human-contagious form, are well understood. High-density animal production facilities came to dominate the U.S. pork industry during the late 20th century, and have been adopted around the world. Inside them, pigs are packed so tightly that they cannot turn, and literally stand in their own waste.
Diseases travel rapidly through such immunologically stressed populations, and travel with the animals as they are shuttled throughout the United States between birth and slaughter. That provides ample opportunity for strains to mingle and recombine. An ever-escalating array of industry-developed vaccines confer short-term protection, but at the expense of provoking flu to evolve in unpredictable ways.
The world lives in such a beautiful balance, each thing complementing the other in this intricate array of interdependencies. Then we take our logical, rational mind and deconstruct some piece of it and think we can get away with changing it for some increase in efficiency or productivity, without any "unforeseen" consequences.
I really am not interested in placing judgmental or moral overtones on this. This is not about God punishing sinners or some such rot. To me it's more about God's beautiful intricate creation, and how the depth and richness and complexity of it can never be fathomed by the human mind, and if anything I find myself shaking my head at our hubris in thinking we can push things to their limits like this and not expect consequences.
This is why whenever I hear some industry talking head saying how something is "perfectly safe" and "all studies have shown there are no harmful side effects" for some strange mutilation of the natural order (such as fake sugar and fake fat, or massive vaccinations of children, or the heavy use of pesticides and chemical fertilizers) I just go "yeah, right, uh-huh" and wait for the next shoe to drop, which it invariably does ten, twenty, or fifty years later.
Friday, May 01, 2009
Ruminations on what at Sun will stay and what will go
We went across the street to Peet's and remembered the good ol' days, and then started talking about the software products we thought were dead meat.
This is all conjecture and hearsay, and I recognize that every project killed means people unemployed, which is no fun as I can personally attest. But that said, one does wonder what's going to get the axe. Here are some possibilities
Glassfish
This is a hard one to swallow, but Oracle already has an app server (Weblogic). So there's a distinct possibility that Glassfish will have to go. Of course it's open source so it could still survive, but I can imagine Oracle pulling the app server folks off of Glassfish and onto Weblogic.
NetBeans
I love NetBeans. I had fun working on it. But let's get real. Oracle is already an Eclipse shop, as well as having their own IDE (JDeveloper). I just can't see why they'd want to keep NetBeans around
JavaFX
It's my opinion that Oracle has no need for this, and will be happy to pull resources off of it and back onto standard Java. However, mobile is taking off, and Java has a place there, so who knows. I am on the fence on this one.
JavaDB
I could see how Oracle would see this as quite valuable and how it could fill a good niche. But they could just as easily take the Most Excellent Java DB engineering team and redeploy them elsewhere, and leave Apache Derby to IBM.
MySQL
Well, everyone's conjecturing about this one. The nice thing for Oracle is now they have the future of MySQL in their hands and can direct it in a way that makes sense for their business. The only wild card I see is the forks that are out there, but I must admit I don't fully understand all the business and political aspects of this to know how viable these forks are if MySQL "proper" is put into mothballs.
There are lots of other ones to talk about - SPARC, cloud computing, and lots of little projects you probably haven't even heard of. But I don't have enough visibility into these to know what the right choice is or could be. So it would really be sticking a finger into the wind.
However, I know we'll be finding out soon enough. I don't envy those folks who get the ax because of the reorganizations Oracle will be doing. May each and every one of you who "get the package" quickly and easefully move on to your new phase in life, whether it's another job or time off or starting your own company. Good luck and God bless!