Tuesday, December 09, 2008

The Obama stimulus plan smells a bit funny

Hey, don't get me wrong, I think we need a stimulus plan, and I think Obama's on the right track. But when I watched his address last week, it had a funny smell to it. It was odd to me that he was emphasizing broadband, taking all medical records electronic, and getting computers in every classroom.

And then I remembered Eric Schmidt standing there behind Obama as part of his economic team, and if I were Eric Schmidt, I would see these kinds of government investments as pure manna from heaven.

I actually like the idea of making broadband generally available, so that everyone has access to it. That sounds like a good thing. But is that truly a priority? What happened to the greening of our infrastructure? I didn't hear a peep about that.

Then there's this thing about getting computers in every classroom. I hope they're not thinking that in and of itself will make our kids smarter and more competitive. I'm a computer guy, but I personally don't believe that computers necessarily make for smart and self-sufficient kids. I do know they can easily make kids who are hyper-restless and unable to focus, and kids who sit around all day staring into computers and video games.

Human beings live in a body, and working with a computer all the time (I speak from grim experience) takes you "out of the body." The body is key to learning, and computers (and TVs) remove all need for the body to be engaged, so what you get is shallow learning. No, I don't have data to back it up. My blog, my opinion.

I just wish I had seen a more balanced proposal to improve education, instead of focusing on broadband and computers. Why not more investment in science and research? Why not more investment into music and the arts, which allow for a more rounded and creative populus? And again, why the focus on computers, when there are so many other things we can focus on?

And what's this about medical records? Why is that important to our economy, and more importantly, why does it take top billing in his weekly address? But one thing I know: Google has been very interested in medical records.

Silicon Valley has been behind Barack Obama in a big way. In general I think that's a great thing, and in general I believe Obama is a huge, huge improvement to what we have had for the last eight years-plus. But when I see stuff like this, I just sigh. The whole thing smells to me of the same old politics, sorry...

Nati Shalom's Blog: Latency is Everywhere and it Costs You Sales - How to Crush it - My Take

As usual, a very interesting blog from the CTO of GigaSpaces.
With the graph above we see that the IMDG [In-Memory Data Grid, which runs on top of MySQL] scales very close theoretical linear scalability. The above results were achieved with an IMDG running on 2 partitions. Better scalability can be achieved by increasing the number of partitions.

Read more about how to scale-out the data-tier in Scaling-out MySQL.

To enable this level of on-demand scalability we used our new Cloud Framework, which combines the GigaSpaces SLA-driven container as the application deployment virtualization layer, Amazon EC2 as the machine level virtualization layer, and the GigaSpaces application server as the middleware virtualization layer. This way we can provision new machines as soon as the SLA on the web-tier is breached (measuring latency, in this specific case).

http://natishalom.typepad.com/nati_shaloms_blog/2008/12/latency-is-everywhere-and-it-costs-you-sales-how-to-crush-it-my-personal-take-away.html

Doug Engelbart 1968 Demo

See where it all began - the mouse, word processing, hyperlinking, personal computer, you name it.

http://sloan.stanford.edu/MouseSite/1968Demo.html

Monday, December 08, 2008

My father's lucky night

Wow...  What follows is from an email from my Dad...

At around 8 pm this Pearl Harbor Day we loaded up the little BMW and set forth for the city. It was overcast and dark on 301, the narrow country road that takes us to the highway. We had gone no more than a mile when a weird thing happened - the headlights of an oncoming car suddenly
disappeared. I had about one nanosecond to wonder about this when a huge horizontal tree trunk appeared in the headlights, right in front of us. I hit the brakes hard, but not soon enough, and we ran right into it.

The tree had fallen straight across the road, and was suspended about 4 feet off the ground by the guard rails on both sides. Thus it was invisible until we were on top of it, right at windshield height.
Screech ka-thump! and there we sat, covered in a snow of glass fragments, totally freaked out but completely unhurt. The airbags did not deploy so I guess we had almost managed to stop. The engine was running, the headlights were on, and the car seemed diveable, so I backed up about 20 feet thinking to turn around, but the windshield was just one mass of shattered safety glass so I gave up on that. To avoid getting smacked from behind I turned on the flashers, and Enid called
911. The police and fire department were on the way. A minute later another car called pulled up beside us to ask if we were OK.

It was then that I noticed the power lines right in front of my face, which the tree had pulled down beneath it as it fell. I couldn't tell if they were touching the car or not, and I certainly was not going to get out and look. If I had a brain in my head I would have backed up further to get clear, but all I could think was - DON'T MOVE! A woman got out of the other car and peered at the cables. "They're about two inches from the top of the car," she said. "You can get out, if you're careful." We thought about it, and decided that we didn't want to just sit there in the broken glass, so we got out. Carefully.

We were standing talking when an emergency service car arrived, lights flashing. "You folks stay right here," he said. "I have to put some flares out on the other side of the tree." Er, I said. Good luck ducking under that tree; it's lying on top of the power lines. He stopped and reconsidered. "Folks, let's move back a ways. And don't touch that guard rail!" The one the tree was resting on, he meant. When cars approached from the other direction, he waggled his flashlight at them. They stopped and turned around.

Then a huge fire truck arrived, and the firemen got out and stood there looking with their emergency lights flashing on the tree trunk. Enid asked if we could get our stuff out of the car. "Lady," said the head fireman, "You're not going near that car. And if I'd got here before you climbed out, you'd still be sitting there waiting for the power guys to show up. Do you realize you coulda fried like a piece of bacon?" So NOW Enid gets scared. Too late.

The fire ambulance arrives, and we are invited into the warm roomy back cabin to get a quick once over, blood pressure and pulse, and fill out forms. We hang out for a while, chatting with the nurse and the old Chief Volunteer (about Pearl Harbor, among other things). The policeman sits in for a while, to fill out his accident report, and the fire chief sticks his head in to scold us again, before saying that the power guys are busy - it's been a windy evening - but will be here soon so the VFD will be "fading away now". It's amazing that all these people, every one but the policeman, are volunteers. Huge burly guys in their fireman suits, the nurse, and all.

We get a ride home with the ambulance, and phone the towing service to bring the poor car by, once it's been rescued from the power cables, so that we can get our stuff out. The damage seems relatively minor - windshield demolished, a bit of a dink on the "eyebrow" above the windshield, and the side view mirror destroyed - but the Chief Volunteer, who has seen a lot of this, says it's even money that the insurance company will total it rather than pay for repairs. (We know that one -- fix it up for a thousand bucks and sell it for 12 grand. It's a 2001 325i sports wagon, 65K miles, all wheel drive -- a sweet little car and well maintained. Bah.)

OK, it's freezing outside, down around 15 degrees according to the tow truck guy. It was very cold to climb around on the tow truck to get into the car and unload to Enid standing below, but we went back in the house and had a shot of scotch and a big bowl of ice cream and all is well with the world, more or less.

When a Job Disappears, So Does the Health Care - NYTimes

This is just, I don't know the word for it. This has to be fixed.
As jobless numbers reach levels not seen in 25 years, another crisis is unfolding for millions of people who lost their health insurance along with their jobs, joining the ranks of the uninsured.

http://www.nytimes.com/2008/12/07/us/07uninsured.html?bl&ex=1228885200&en=c7f69aeca37e3a40&ei=5087%0A

Friday, December 05, 2008

Providing your own collator for Java DB

Now this is pretty cool - using Java pluggability, in Java DB you can provide your own collation. Knut Anders provides the details in his blog
... sometimes you may want to sort your strings based on some other rules than those in the languages supported by the JRE. The most common example is that users want case-insensitive string matching. Another example came up recently in this thread on derby-user, where a user wanted to modify the German collation rules to make Greek characters sort near their Latin equivalents ('α' near 'a', 'β' near 'b', and so on).

Derby currently (as of 10.4) doesn't allow you to define your own collation rules, it merely relies on the collators returned by java.text.Collator.getInstance(java.util.Locale). Fortunately, the JRE allows you to define new locales with their own collation rules. And it turns out that it's quite easy, just perform these three simple steps:
  • Create a class that extends java.text.spi.CollatorProvider and returns a collator that orders strings the way you want it to
  • Create a text file named META-INF/services/java.text.spi.CollatorProvider which contains one line with the name of your collator provider class
  • Put the compiled class file and the text file in a jar file which you drop into your JRE's lib/ext directory or in one of the directories specified by the java.ext.dirs property
Bada boom, bada bing.

Thursday, December 04, 2008

mint.com - A Visual Guide to the Financial Crisis

Very fun visual representation of the financial crisis - this looks like it's gone viral so you've probably seen it, but if you haven't, it's worth a look.

http://blog.mint.com/blog/finance-core/a-visual-guide-to-the-financial-crisis/

Amazon SimpleDB Grows Up

A nice blog from the AWS team describing what's new with SimpleDB now that it's going into public beta.
SimpleDB makes it easy to scale. You don't have to worry about creating a complex master-slave setup to support a high level of concurrent access. In fact, concurrent access is where the SimpleDB model really shines. Fire up a bunch of threads and start sending requests our way. SimpleDB can handle the load. In fact, during the private beta the developers at Pluribo scaled their application up until it was making 5600 requests per second
Some things to note:
  • 60 day free trial for up to 1GB of data
  • 30 day free trial of the Simple DB Explorer, including upload of MySQL data into SimpleDB
  • Tools for various languages, including Java, Python, Ruby, and ActiveRecord
  • Queries can include sorting on any attribute
  • Coming soon: a SELECT-like API and batch loading
Looking interesting...

http://aws.typepad.com/aws/2008/11/amazon-simpledb-grows-up.html

Those who can't, tweet

As a senior engineer, I feel like part of my job is to stay in touch and to be in touch. I also like to write. So I write this blog, and I also spend about twenty minutes a day reading blogs and twitter posts. And as I scan through the posts, some people are so prolific (particularly on Twitter) that I wonder how they can get anything really productive done. Nicholas Carra wrote an article in the Atlantic an interrupt-driven culture is preventing us from having truly deep and constructive creative processes, and the tweet-heads spend the next two weeks ruminating on this.

Fade to the present. A few days ago I sat down with one of our best and brightest engineers on the NetBeans team to get his help with something. This guy is famous for his ability to pump out good, cool, useful code. He is an invaluable member of the team.

After our technical discussion, we were chatting about this and that, and he mentioned he was having problem with our mail server which appears to be caused by the fact that he has over 20,000 unread messages in his Inbox.

I just stared at him. He said "I know I should be reading all these, but every time I read something, it's something else I have to do, and it stops me from getting my work done."

I said, so how do I reach you? He said IM, and gave me his IM account. But he said most of the time he marks himself as away because otherwise his mother will want to chat.

He also said he has a private email account for personal conversations, but he generally doesn't read those either.

Then he said, I guess if you really need to reach me you can call me. I said "but last time I called your extension, your voice mail said that the best way to reach you is by email!" He laughed and said that actually he hasn't listened to his Sun voice mail in about six years.

And I realized, this is someone who is so passionate about his work that he will accept no distractions. He is on a mission, and he gets stuff done. It may be highly frustrating to try and talk to him, but you can't deny his real value to Sun.

So, thus, my new motto: "Those who can, do. Those who can't, tweet." Now, back to work, and maybe I'll get back to you.

Wednesday, December 03, 2008

World Wide Words: Bated breath

I got confused momentarily about whether I should use "bated breath" (my first instince) or "baited breath", so I Googled and found this. Yes, it's "bated breath", from "abated"
The correct spelling is actually bated breath but it’s so common these days to see it written as baited breath that there’s every chance that it will soon become the usual form, to the disgust of conservative speakers and the confusion of dictionary writers.

...

For those who know the older spelling or who stop to consider the matter, baited breath evokes an incongruous image; Geoffrey Taylor humorously (and consciously) captured it in verse in his poem Cruel Clever Cat:

Sally, having swallowed cheese,
Directs down holes the scented breeze,
Enticing thus with baited breath
Nice mice to an untimely death.
http://www.worldwidewords.org/qa/qa-bai1.htm

Tuesday, December 02, 2008

Export to CSV directly from MySQL - Ariejan.net

People are always asking for this feature from NetBeans. We're working on it, but in the meantime, if you're using MySQL, here is some very simple code to export to CSV. Nice!

http://ariejan.net/2008/11/27/export-csv-directly-from-mysql/

How to model gay marriage in your DB design - Things Of Interest

I love this - an analysis of how to handle gay marriage in your database model. He actually goes through fourteen different iterations of the design. Here's a comment from iteration six...
It's asinine to do it this way. However, there is a good reason why I haven't just skipped schemas schemae schemata One to Six. There are a lot of people in the world who actually think like this. This is their for-real, no-joking conception of "marriage". They do not grasp that men and women are interchangeable, as a result of which homosexual marriages create repulsive integrity problems in their heads. "But if they're both guys, which one is the wife? Does not compute!" How sad.

http://qntm.org/?gay

A rat is cute - in a cage

I like rats. I have petted them and played with them with my daughter. I think they are cute and smart and interesting. I enjoyed Ratatouille. But these days, I understand the motivation of the little old lady in that movie who took a shotgun and began shooting left and right at a rat crawling over her house. I totally understand, and wouldn't mind doing it myself.

It all started when I backed my car into the garage door, bending it in an ugly way and leaving a gap along the ground. Let this be a warning to you all - FIX HOLES IN YOUR HOUSE RIGHT AWAY. After a few months, the rats crept into the garage and enjoyed the food we were storing in there, and made a disgusting pissy/crapy nest of one of our camper foam pads.

That was a year ago. It has been an unending battle every since. We closed up the hole in the door and every other hole we could find in the house. The rats remained. I initially tried soft tactics, such as putting peanut butter down the side of a bucket that they would fall into. They laughed at such innocence. I set traps. They were ignored.

One day I opened the door to our water heater closet and convulsed in disgust when three rats who were warming their bellies on the top of the water heater (and probably having a few beers) went skittering up the pipes into the attic.

We put wire mesh along the gap in the door to the water closet. They promptly dug a new hole through the wall from the crawl space. We removed all food from the garage. They built a nest in the attic above our house; we could hear them scraping and digging in the wall just above our heads in the bed. We could hear them dancing on our ceiling at night.

We called in an exterminator to destroy this infestation. He laid traps everywhere and got five (or was it six) rats. But one of them completely ignored the traps. Every night we still hear her scraping and digging right above our heads. It is infuriating.

One day I went to fetch our sleeping bag from our outside earthquake bin and found that our food supplies had been raided, shredded, urinated and defecated upon. I spent an hour cleaning up the unholy stinking mess (being eaten alive by fleas - did I mention that we had a flea infestation, probably because of the rats?). I saw our dear friend had dug a hole right through 1/4 inch of hard plastic to get in.

We removed the food and I put a trap in there. She ignored it. She went back into the garage and got into some Cliff Bars we had left in there (silly us) and then proceeded to destroy a diaper bag I had put in there which must have had a little food in one of the pockets. Arrrgghhh!

Last night I got Rat Glue traps and laid them in front of the hole. She deftly stepped around them, and this morning I saw her (a beautiful gray specimen) running along the railing above our garage door.

This morning I listened to the terror experts talk about the difficulty of fighting terrorists, how their roots are deep and almost impossible to eradicate, and how everybody is tired of them and wants them to go away. Although my problem is on a much much smaller scale and involves destroyed property and not human lives, I could only nod my head. I completely understand...

Monday, December 01, 2008

Thanks from a user on Thanksgiving

I really appreciated this email I got from a user today, and it reminds me of the power of gratitude, and to remember to thank people for the things I receive from them.
I had a problem with Derby DB connectivity with netbean 5.5.1.

I had changed the location of my application server but the libraries had not changed too.

I saw a solution that you had put on the internet for another query and so I changed my library locations according to your instructions.
My application ( from a book) now works and I am very grateful for your help even though you are unaware of this.

Thank you.

Zend user switching to NetBeans PHP

Roumen points us to a very interesting comment on the Zend forums
My company bought 3 3-year licenses for Zend Studio earlier this and up until a few weeks ago, there was nothing else on the market that even came close to meeting our requirements. Then Netbeans released 6.5 with PHP support. Right out of the gate, their PHP and JavaScript support is on the whole, so much better and faster than Zend's product, with so many fewer bugs, that despite the fact that we spent $1000 this year investing in Zend's product ... I am assisting my team in migrating over to use Netbeans for most of our development. There are a few things that Studio does better, but Netbeans is just a much more mature and easy to use product, even this early in their PHP support

http://blogs.sun.com/roumen/entry/is_netbeans_disrupting_the_php

Hanging with the penguins

Really nice blog from someone hanging out with the penguins in Antarctica
Before breakfast, we spent an hour tightening ropes holding down our tents, a task that would usually take 10 minutes. While we were outside, our weather station recorded a 91mph gust, and average wind speeds were around 70mph [a hurricane is defined as 72mph and above]. Imagine sitting on the roof of a car speeding on the freeway and you get an idea of the forces involved. It was impossible to walk or stand, and, to reach our tents, we crawled over the rocks and ice.

http://noahstrycker.com/blog/

John VC's Fabulous Inventions

My pa has some funny inventions he proposes, for instance
EATABIT - The heck with the food chain, waiting for all those copepods and krill and anchovies to pass the nutrition up the line to get to something we can filet, with everybody taking their middle man bite of the energy before it gets to us. The time has come to start breeding edible plankton.

http://john.vc/

Wednesday, November 26, 2008

Memories and sadness from Mumbai terrorist attack

My wife and I lived at an ashram outside of Mumbai for 14 months from 1999-2000. We would go down to Mumbai once a month to see our doctor - Linda was pregnant with Ariel. To make it an easier trip, we'd spend the night and hang out in Mumbai before heading back up to the ashram.

The names of the places - the Taj, the Oberoi, the Indigo Deli, Colaba - all places we have been to and enjoyed. The pictures bring back memories, at a difficult and sad time.

My prayers go out to all those in Mumbai and around India undergoing this horror - we are with you in spirit

http://indiauncut.com/iublog/article/a-night-out-in-mumbai/

Tuesday, November 25, 2008

You did WHAT

My Pa ruminates on the crazy things that were done in the last generation that were done without a second thought - and wondering what we are doing now that could be like that
Dad! You mean you rode around in uncontrolled travelcars that you had to steer yourselves? Didn’t you crash into things? You could even run into one another and get really hurt, if you weren’t watching and steering every minute! How could you sleep?

http://john.vc/2008/11/22/you-did-what/

Thursday, November 20, 2008

Feedback requested: SQL completion in code editors - is it valuable?

I am hoping I can get some feedback from you all.  I have been excited about the support for completion in the NetBeans PHP editor (and other editors to follow).  The response to my quick little blog about this has been pretty positive.

To refresh, here's an example of what it would look like:

php-completion.jpg

But I have also gotten some feedback from more than one source that this may not actually be as valuable as it may first appear.  The reason is that, and this makes sense, the actual work flow when building SQL for your application is as follows:
  • Open SQL tool and write your query
  • Execute, evaluate results, modify, repeat
  • Copy and paste final SQL into your editor
With this flow in mind, it doesn't seem that important to provide completion and other SQL editing features embedded in your application editor, because you need to test to validate that the SQL is correct.

What are your thoughts?  Can you explain to me why SQL editing features in the code editor is valuable, if generally SQL is composed in a SQL tool/editor?

One thing we've talked about is enabling testing from within the code editor.  But it's not clear what this would look like.  We would need to be able to build up an executable SQL statement from SQL that contains substitution variables and may even be a concatenation of multiple strings.  I suppose it's possible, but it seems complicated and error-prone.

I suppose one simplistic approach is the following flow:
  • In your editor, write a full SQL statement as a string
  • right-click and choose "Test SQL" (or run a hot key) to let you test the SQL string right there in the application editor 
  • refine, retest
  • modify the SQL to use substitution variables
At least with this approach you wouldn't have to cut-and-paste, but I'm not sure it buys you much.

So, what are your thoughts?  Your feedback much appreciated.

Wednesday, November 19, 2008

NetBeans: easily generate INSERT statements from query results

I wanted to call out one database tooling feature in NetBeans 6.5 that I think is pretty cool, and it's a little bit hidden.

If you execute a query and you get results, you can then do a number of interesting things with them.

insert-1.jpg

Things like show what the CREATE TABLE statement would look like, or copy and paste the data you have selected (the paste format is hard-coded right now, but next release we plan to support CSV and XML output).

The one I like the best is that you can generate INSERT statements for the data.

insert-2.jpg

Combine this with generating the CREATE TABLE statement, and it makes it really easy to hand your data set to someone else for testing or collaboration.

NetBeans Database Explorer API

It's probably not well known that NetBeans 6.5 comes with a new API called the Database Explorer API. This API allows you to work with and manage the connections that you see in the NetBeans Database Explorer:

database-explorer.jpg

Some of the use cases include:
  • Get a connection from the explorer and using it to automate some kind of database functionality, such as generating code based on a database schema
  • Add drivers or connections to the explorer either through a layer file or programmatically
  • Dragging and dropping a table, view or column onto a UI component and then getting metadata for that element. This is used, for example, to bind a database element to a field in Matisse or the visual web toolkit.
There is lots more, take a look at the overview in the javadoc. Geertjan is working on a tutorial showing how to use this API, here's his first blog entry about it with some example code I wrote up for him. More to come.

In the next release, we are making it possible for you to add nodes to the Database Explorer tree and to add actions to a specific node. This is very nice when you want to integrate a database-specific addon plugin to NetBeans.

We also plan to add a metadata API that will allow you to easily inspect database metadata for a given connection without having to dive into the complexities of the JDBC DatabaseMetadata API.

Python in NetBeans - Early Access



Lots of news today. Looks like we have a pretty cool early access of Python support available.

From the Python page:
  • Python project support
  • Fully featured editor
  • Interactive interpreter console
  • Debugging for Jython and CPython
Take a look at Tor's blog for some very nice screen shots, and go here to get the software. You can check out a tutorial here.

Sun Gives MySQL A Query Analyzer -- InformationWeek

By moving the sorting out of the database and back into the application, plus putting a limit on how many stories would be returned to any first request, Freund watched query execution time drop from an average 5.27 seconds down to 2.54 seconds. In other words, Clickability chopped 48% of the time it took to execute each query out of his overhead. The new tool "gave us a snapshot. We learned more about query usage in two minutes than we could gain in two years of ad hoc log analysis and guessing,"

http://www.informationweek.com/news/software/database/showArticle.jhtml?articleID=212100690

NetBeans 6.5 now officially released!

Wow, it's so cool when something you've worked and worked on finally sees the light of day and goes GA. There's lots in this release, but one of the area's I'm most excited about is the PHP support. Our editor teams produce awesome stuff, and this is no exception, IMHO.

Of course there is also the cool stuff we've done in the databases area:
  • SQL code completion
  • SQL history
  • Editable, pageable results
  • Export results as SQL INSERT statements
  • Easy installation of Sakila sample database
Go get the bits, have fun.

MySQL Query Analyzer - first impressions

Very interesting review of the new MySQL Query Analyzer that comes with MySQL Enterprise Monitor.
I installed Quan (Query Analyzer) and within about 20 minutes it became clear I had a query that was averaging 14 seconds to run. This query doesn't get run all that often, every 5 minutes or so, but it uses a table that is the most active table on our system.

OK, click on the query and it pops up a full view, showing the query with literals replaced by place holders. If you have Example Queries configured, you can check to see if there is an example showing all of the data, and if you have Example Explain configured, you will also be able to get a full breakdown of what indexes will be used in resolving the query.

With a few minutes of checking the query and fine tuning it I was able to get it down to 0.15 seconds on average. That is almost a 100 fold improvement.

Tuesday, November 18, 2008

Giving up on Feedburner, trying Clicky

Since I changed my Blogger template, Feedburner has been dead, showing me no data. I tried re-registering my blog, no dice. I finally took the time to search the knowledge base, and this is what I saw. Not good.

So, I decided it was time to move on. I checked out Google Analytics, but they're talking to someone who isn't me. It's all about monetization and improving your click throughs blah blah blah.

So I looked around, and now I'm trying out Clicky. So far I'm pretty happy with it. Sad thing about Feedburner... I wish Google would just explicitly kill it instead of letting it quietly die.

SQL completion - in PHP?

Thanks to Andrei (before he moved on to bigger and better things), we now have this in the nightly builds.

php-completion.jpg

Take a look - yes, you're getting column names in the completion list when working with a string literal in PHP. And notice how it works with aliases...

It's a prototype, but it's a good start, and we expect to have something like this working for you in NetBeans.next

SFTP support in NetBeans PHP

Great news! NetBeans PHP team just added SFTP support. Note this is in the development build, which you can get here

http://blogs.sun.com/netbeansphp/entry/sftp_support_added

Friday, November 14, 2008

Screencast: new database features in NetBeans 6.5

Andrei Badea, one of our team members, does an excellent screencast showing off some of the new database features in NetBeans 6.5 (due to release next week). Things like code completion, editable results, multiple result tabs, SQL history and easy creation of the Sakila sample database.

Nice NetBeans PHP screencast

Justin Bolter has a nice screencast on using the NetBeans PHP support to build a Flickr slideshow application. A nice way to get a sense of the PHP features in NetBeans.

Sun lays off 6000 and restructures Software division



I just read the news.

I don't know about you, but I was pretty much expecting this. Even though it may cost me my job, I am glad they bit the bullet and cut 15%. We're just burning too much cash and the size of the company didn't match its current market cap.

How do I feel? Relieved, in a way, because I knew it was coming. Am I affected? I have no idea. Nobody's telling the peeps yet, that will happen in the next few weeks.

Software is getting seriously reorganized. NetBeans is now part of the cloud computing platform. Why? My blog, my opinion: because I think Sun gets it that what Sun can offer in this space is a developer platform. Amazon Web Services is a bunch of cogs and wheels targeted at system admins. Google App Engine is focused on a very small slice of developers who are willing to work with Python and BigTable and don't mind locking themselves in to Google.

But Sun has something more to offer, a different path to take. If you combine the strength of the NetBeans development environment with a cloud platform, now you have something interesting. I look forward to see what this looks like.

The Open Office team is also part of the same group. Now that's intriguing. Open Office has a lot to offer over a pure SAAS play like Google Apps. I can envision (again this is just me thinking, don't think I have any kind of "in" to what's actually going on), I said, I can envision taking parts of Open Office and "cloud-enabling" them, while continuing to give a rich desktop experience. For example, I can envision saving my documents to a cloud-based storage service so I can access them anywhere, or adding collaboration features to OpenOffice ala Google Spreadsheets.

Similar realignments are helping elsewhere in Software. The OpenSolaris group is joining the Systems group so they can focus on innovative integrated solutions like OpenStorage. The MySQL team is going to work with the rest of the application platform folks like Glassfish and Identity to provide a complete solution with add-on and optimized products and services that can bring in revenue.

So there is a lot of opportunity here to innovate and make money (and of course an opportunity to fall flat on our faces :)). The question, as always, is, can we pull it off, will it be enough? Is this the right direction? Well, we'll just have to see. I may be crazy, but I like this company. People here are smart, innovative, dedicated and kind. I'm hopeful. The audacity of hope.

And will I be there to see Sun come out the other end? Well, we'll just have to see... :)

Thursday, November 13, 2008

Michael Lewis - The End of Wall Street's Boom


From the author of Liar's Poker comes an excellent and disturbing article about the culture of Wall Street and how incredibly greedy and free of conscience the folks were who were making a killing using other people's money.

http://www.portfolio.com/news-markets/national-news/portfolio/2008/11/11/The-End-of-Wall-Streets-Boom

Wednesday, November 12, 2008

Graph of databases used by NetBeans users

You may have seen this already, but this nifty little graph shows what databases our users are using. The biggest one by far is MySQL, followed by JavaDB/Derby and Oracle.



We get this data through collecting "gestures" - where we track the clicks and actions performed by users who "opt in." In this case we detect what database vendors our users connect to through NetBeans.

http://statistics.netbeans.org/analytics/graph/databaseservers.jsp

Net bombarded by heaviest ever attacks this year | Tech News on ZDNet

This is cause for concern. Not only hackers but governments are discovering the impact of a Net attack. Distributed Denial of Service uses computers like yours and mine. So many people connected, so many vulnerabilities, and lots of reason to find them.

http://news.zdnet.com/2424-9595_22-248590.html?tag=nl.e550

Thursday, November 06, 2008

She kissed me just for being an American

VIENNA, Austria — She was a stranger, and she kissed me. Just for being an American.

It happened on the bus on my way to work Wednesday morning, a few hours after compatriots clamoring for change swept Barack Obama to his historic victory. I was on the phone, and the 20-something Austrian woman seated in front of me overheard me speaking English.

Without a word, she turned, pecked me on the cheek and stepped off at the next stop.

http://www.huffingtonpost.com/2008/11/05/ap-suddenlyly-it-may-be-c_n_141631.html

Lincoln Memorial during acceptance speech

I found 25 or so people who had made their way in the dark to the marble steps of the memorial and stood silently around a lone transistor radio.

http://www.nytimes.com/2008/11/06/opinion/06mendelsohn.html?ref=opinion

Why the jubilation?

I've been thinking about it: why are so many people so happy (including myself) that Obama won the election?

I think there are a number of reasons.

First, it is just plain amazing that a black man will be our next president. It just never seemed possible, and I still feel like I'm pinching myself. In a profound way, it has healed and old old wound in this country. No limitations.



Secondly, I think many of us weren't consciously aware of the emotional damage being done to us watching those in power lie, cheat and steal in a million offensive and painful ways. Almost every day for eight years we have been hurt and outraged by the immoral acts of our administration. It just places a heavy burden on you.

And then, like that, it's gone. Thus, the jubilee. With the lifting of that burden comes elation, and tears. We did it. We are rid of the scoundrels. I don't think any of us expected the power of that feeling when Obama finally won. It was like a tidal wave of relief, for the whole world. We try to be realistic, be cynical, but the relief just overflows.

Then there is Barack Obama himself. You can never really tell, but all signs point to him being an excellent president, a president who serves his country rather than use the position as a way to party and profit. He inspires, he is thoughtful, he listens, and he comforts with his calm and discipline. His family seems truly happy and loving. They seem to be good people.

My final feeling of joy and hope is that, in no small part due to power of the social web, we seem to now be able to elect someone who has not been anointed by the powers that be. Obama defeated the Clinton machine and the Republican machine. That would not have been possible without the money and volunteering from an army of citizens.

Now I'm sure if McCain had won, he would have been a different president than Bush, and there would have been some relief in that. But he was backed by the same scoundrels who backed Bush, and I believe that if he had won, it would have been like a stamp of approval to business as usual. The rest of us, both in the USA and outside of it, would have crawled back into our holes to hunker down and weather it through.

There are difficult days ahead. There are still major issues with the structure of our system. But at least we were able to make our voices heard, and we are now prepared to team together with our government to work to heal these problems, rather than watch with chagrin, outrage and a sense of powerlessness as our administration and their cronies ransack the country.

Wednesday, November 05, 2008

Proposition 8 - If it wins, what next?

It looks like Proposition 8 is winning.  I heard on the radio that the Prop 8 folks are planning on going to the Supreme Court to argue that all existing gay marriages done by the state be annulled.  Sigh...

My take on this: it's an ongoing effort.  One has to hold the vision of where we want to go.  Barack Obama, a black man, is now our next president.  Yes we can.

This last week, I listened a lot to the concerns of the Yes on 8 folks.  What I am hearing is that they have strong religious beliefs that marriage is between a man and a woman.  There is a sense that any other kind of marriage is "unnatural."   There is a feeling of the sanctity of marriage, that it is a union blessed by God and should not be tampered with by the State.

I can see how one might think that way.  I can see how the thought of a gay couple getting married is like "ewww" and feels "wrong."  One could argue, well, why not allow a man or woman to marry a sheep next?

But seeing so many gay couples get married, these arguments just fall away.  I wish those who feel gay marriage is "wrong" or "unnatural" could be at these weddings like a fly on the wall and see the love that is there. 

When I am at these weddings, I see the sanctity in their vows.  The power of those vows and that commitment is there as fully as at the heterosexual weddings I have been at.  I feel God's blessings and support descend upon these couples during their vows like a blanket of light. 

What is sacred and holy is not the shape of the bodies containing two loving souls, but the love itself, and the act of commitment and sacrifice that makes that love manifest.  The outer form of the two souls is just window dressing.

Since I have had that experience, I believe that it is morally right that we should allow any two loving souls to make the commitment of marriage.  Anything that prevents that is discrimination and goes against God's loving nature.  So, the fight goes on.

Near-Flawless Run Is Credited in Victory - NYTimes

Great article. Money quote:
It was a phenomenon captured in a photograph ... shared last week of a homemade sign with the Confederate flag. It read: “Rednecks for Obama. Even we’ve had enough."

http://www.nytimes.com/2008/11/05/us/politics/05recon.html?hp

Tuesday, November 04, 2008

Kisumu - A Kenyan Town With Its Eyes on the Election

Ah, I remember Kisumu well. Right there on the side of Lake Victoria. It was the nearest big town from Rusinga Island, where I spent two separate long stints as a child when my parents were doing research (geology and paleontology) for Louis Leakey.

I still remember the Luo tribe, which is the tribe Barack Obama's father comes from. They had beautiful shining black faces with high cheekbones and dazzling smiles. They were always so friendly and loving and open-hearted. Hard to imagine that town bursting into riots.

What a strange connection with my childhood.

http://thecaucus.blogs.nytimes.com/2008/11/04/an-kenyan-town-with-its-eyes-on-the-election/

Monday, November 03, 2008

NetBeans for PHP : weblog

Petr Pisl describes his experience of turning PHP users on to the PHP support in NetBeans. Great stuff, I could almost see myself there as people start realizing what we have to offer.

http://blogs.sun.com/netbeansphp/entry/international_php_conference_2008

Awakening the Balrog

I think the following video is a perfect underscore to Paul Krugman's somewhat disturbing comments on the future of the Republican Party.

By the way, I grew up in Colorado. I've met people like this and gone to school with them. They helped make junior high school miserable. When I first came to Colorado some of the boys told me my parents were hippies. I had never heard what a hippie was, and when I asked them, they said that hippies walked around naked, lived in caves, and peed outside. Even at that age, I wasn't sure what to make of that. Some comments just stop your mind.

It's also disconcerting that the McCain/Palin ticket seems to be drumming up/stirring up these kinds of passionate, fear-and-anger-based feelings. It reminds me of what the dwarfs did in the Mines of Moria - be careful how deep you dig, as you may unleash a power greater and older than anything you can handle. The Balrog is being awakened...

California Proposition 8 - My Viewpoint

I don't normally do this, but this particular initiative really hits home for me. My mother just came to the Bay Area this summer and married her partner of over 20 years. I have had many good friends get married this summer, with tears in their eyes, where for so long they were denied this right. You can tell this means so much to them.

Now, for reasons I don't fully understand, there is strong support to eliminate this right by explicitly disallowing anyone to marry except a man and a woman.

I can understand having strong feelings about who can marry, and even belonging to a church, temple, mosque or other organization that does not condone or support gay marriage.

But why does this mean removing the right for a gay couple to marry within the state of California? To me this is imposing one's own beliefs upon everyone. There are orthodox rabbis who will only marry two Jews. Does this mean we should have an amendment that says that only two people of the same faith can marry?

My heart breaks at the thought that my Mom's marriage, and the marriage of my friends, will be invalidated by the state constitution, and that future couples will be denied the right to marry and enjoy the same rights and responsibilities the rest of us have.

So, if you're in California, please vote NO on Prop 8.

Whether you live in California or not, you can help in other ways, through donations or volunteering, at http://www.noonprop8.com/.

Friday, October 31, 2008

Tentative plans for db tooling in NB.next

Hi, all. This is tentative. You know draft. But here is the list of things we're thinking of doing around database tooling for the next release of NetBeans.

Don't expect anything more than what is listed in the "P2" section. The P3 section is an unordered list of other ideas, and if we have time, we'll pick some of them off. If there are specific things that you really want, please let me know. And of course, any other feedback you have is always much appreciated.

The two main themes are: add more SQL integration with the PHP editor, and improve our overall UI experience.

We also would like to produce a plugin for a visual E/R tool (what I am calling a Visual Database Explorer to distinguish it from a full E/R tool like MySQL Workbench). We want people to test drive it for a while with this release, and then we can refine it and potentially integrate it into NB proper in the next release.

I will admit I am hesitant with the Visual DB Explorer. I know many of you have asked for this, but my concern is that once you have something out there, then you'll want more. "Why can't I create a new table right there?" "You don't fully support feature X of the Y database". "Why can't I generate SQL from the E/R diagram?".

If we're not careful, we can spend all our time refining the E/R tool when, as I've said before, that's really not taking advantage of our core strengths as a DB tool inside NetBeans.

There are numerous E/R tools out there, including MySQL Workbench, and I don't think it makes sense to spend all our time replicating that. Look at what we are doing in the PHP editor - that's something that takes advantage of the fact that the db tooling is inside an IDE. That can add real value that a standalone DB tool can't.

That said, I know how nice it is to quickly pull up a visual representation of a database schema to help understand it. So we'll do that. But please don't expect us to build Erwin for NetBeans. And to be honest, I don't think that's what most of you want anyway.

Standalone, offline, replicated web applications using Couch DB

Thanks to Tim O'Reillys tweet for this.

Imagine building an app that that can run standalone just as easily on your laptop or on a cloud-based cluster.

Such a thing may be possible using AJAX and a CouchDB backing store running on the same machine as your browser or serving up the app and data from a server. No PHP or Ruby middle tier getting in the way.

CouchDB provides replication for free, so all of your data can be replicated to your server or to any other peer. It's the framework for true offline, peer-to-peer data sharing applications.

Oh, and did I mention it's logarithmically scalable? Very cool.

http://jchris.mfdz.com/code/2008/10/standalone_applications_with_co

Paul Krugman - Individual Virtue Can Be a Public Vice

... one of the high points of the semester, if you’re a teacher of introductory macroeconomics, comes when you explain how individual virtue can be public vice, how attempts by consumers to do the right thing by saving more can leave everyone worse off. The point is that if consumers cut their spending, and nothing else takes the place of that spending, the economy will slide into a recession, reducing everyone’s income.

In fact, consumers’ income may actually fall more than their spending, so that their attempt to save more backfires — a possibility known as the paradox of thrift.

At this point, however, the instructor hastens to explain that virtue isn’t really vice: in practice, if consumers were to cut back, the Fed would respond by slashing interest rates ... So virtue is virtue after all, unless for some reason the Fed can’t offset the fall in consumer spending.

I’ll bet you can guess what’s coming next.

I guess it's time for me to go out and buy an iPhone 3G and a flatscreen HDTV...

http://www.nytimes.com/2008/10/31/opinion/31krugman.html?em

Wednesday, October 29, 2008

Java DB Table Functions

A very nice white paper on a new Java DB feature - table functions. This feature allows you to take any external data source (csv file, a telemetry stream, XML, JSON, in-memory objects) that can be represented as tabular results and make it look like a table in Java DB.

Then you can do anything read-only with it that you would do with regular tables: filter with WHERE clause, subqueries, aggregation, join with other tables, etc. Pretty darn nice.

http://developers.sun.com/javadb/reference/whitepapers/sampleTableFunctions/doc/TableFunctionsWhitePaper.html

Whassup 2008 - very funny



For your reference, here's the original Bud commercial, makes the whole thing even funnier.

Josh Bloch interview

Nice interview. Something of note:
If you need high-performance lazy initializing of an instance field, use the double-check idiom with a volatile field. This idiom wasn't guaranteed to work until release 5.0, when the platform got a new memory model. The idiom is very fast but also complicated and delicate, so don't be tempted to modify it in any way. Just copy and paste -- normally not a good idea, but appropriate here...

http://java.sun.com/developer/technicalArticles/Interviews/bloch_effective_08_qa.html

Loans? Did We Say We’d Do Loans? - NY Times

Outrageous. You know, one assumes that the people in power have some kind of brain in their head. Giving huge amounts of taxpayer money with no conditions, and hoping the banks use it for loans? Give me a break. I suppose they were thinking "oh, we'll let the market decide what the best use of this capital is." Dumb and dumber. It's like handing out money to homeless on the street and thinking "Oh I'm sure they'll use the money on what is best for them," without considering that perhaps they're addicts and you're just feeding the addiction.

http://www.nytimes.com/2008/10/29/opinion/29wed1.html?ref=opinion

Wednesday, October 22, 2008

E/R Diagramming : OK, OK, I get it!

Gads, someone else asking for E/R diagram support. We have 36 votes for this in Issuezilla. What is it with you guys?

First of all, MySQL Workbench really owns this space. Yes, I know, right now it only runs on Windows, but the next release will fix that. And, yes, I know it only works for MySQL, but the promise is that they will fix that too, albeit not right away. 

Secondly, NetBeans DB tooling has a huge opportunity because we're part of the IDE.  An E/R diagram tool doesn't really leverage that advantage.  There are things we can do that will make your day-to-day experience of slogging code for database applications really nice.  But we can't be doing that if we're spending all our time writing an E/R tool.

That said, we're looking very seriously at a simple read-only E/R plugin. First and foremost what people want is a way to understand the structure of their database and to communicate this to others. Being able to build a database design through visual tools is useful, but has a secondary order of demand.

Anyway, keep your eyes peeled to this space, all you E/R lovers.

Drizzle: Ahead of the Storm

Very interesting analysis of Drizzle by Stephen O'Grady

http://redmonk.com/sogrady/2008/10/22/drizzle_changes/

Maureen Dowd - Moved by a Crescent

He told Tom Brokaw that he was troubled by what other Republicans, not McCain, had said: “ ‘Well, you know that Mr. Obama is a Muslim.’ Well, the correct answer is, he is not a Muslim. He’s a Christian. He’s always been a Christian. But the really right answer is, what if he is? Is there something wrong with being a Muslim in this country? The answer’s no. That’s not America. Is something wrong with some 7-year-old Muslim-American kid believing that he or she could be president?”


The same thing has been bothering me for a while. How did the word "Muslim" become a dirty word? I am glad people in power are standing up against this.

http://www.nytimes.com/2008/10/22/opinion/22dowd.html?em

MySQL University: How to use PHP and MySQL in NetBeans

Hey, all. Petr Pisl, the technical lead for PHP support in NetBeans, and I will be giving a MySQL University webinar tomorrow entitled "Working With PHP and MySQL in NetBeans." We'll be demonstrating the PHP and database tooling features available in NetBeans.

The webinar is live, and you can ask questions via a chat-based interface. It's at 9:00 am San Francisco time, you can see what that is in your local time here.

The webinar is limited to 20 people, so it will be first come, first serve. Apologies about the small "classroom" size -- MySQL University just started using DimDim (this is actually the first session using it) and are still in testing mode.

Monday, October 20, 2008

Offline Ajax with Apache Derby

Hey, somebody's doing stuff I was doing a while back. Nice article.

http://www.ibm.com/developerworks/opensource/library/os-ad-offline-ajax/index.html?ca=drs-

McCain, Obama, yucking it up

Some very funny stuff at the traditional Al Smith October dinner.
Many of you -- many of you know that I got my name, Barack, from my father. What you may not know is Barack is actually Swahili for "That One."

http://primebuzz.kcstar.com/?q=node/15091

Switching my iPhone to T-Mobile Pay-As-You-Go

I went down to the T-Mobile store and bought a GSM chip for my wife. At the same time, I got one for myself, intending to get a new quad-band phone off of Craigslist and turning off my AT&T service on my iPhone.

But this weekend, I went on a road trip with my kids. I wanted to find ice cream, click click I found it using the Google Maps app on my iPhone. I got lost - click click and I could find out where I was. I wanted to find a bank. Easy peasy. Now, how to get back home? Click click, slick slick.

So the thought of giving this all up when I turned off my service on my iPhone was sad, but at $60 a month I decided I would just have to let it go. But then last night a light bulb went off in my head - why not switch my iPhone over to T-Mobile? I heard it was possible, and even legal, although it makes the Gods at Apple and AT&T angry.

So, Googling around, lots of info, lots of it seeming not very trustworthy, and then I found this tutorial for using Pwnage with the 2.1 version of the iPhone OS. I was encouraged that engadget seems to endorse this tool. I tried it, and, very nice, very nice indeed! I was expecting a lot of command-line garbage with poor documentation, and this was an unexpected surprise of usability.

If you're ever tempted to shop around, I recommend Pwnage. Of course, there are risks. There is FUD around your iPhone getting bricked. I'm still unclear what happens when Apple delivers a new version of the iPhone OS or iTunes that could mess things up. But so far it's worked like a charm. When I finished the steps in the tutorial above, I had a jailbroken and unlocked iPhone. I plugged in my T-Mobile SIM chip (here's how you do that), and I was good to go.

Now this is cool. I am paying $7.00 a month instead of $60 month, and I have everything I had before, except visual voice mail (ah well). And still one device instead of two. I am a happy camper.

Jailbroken, BTW, means you can install apps from Cythia, rather than just the iPhone app store. This seems to include apps which for some reason or another are not approved for the app store. I haven't tried that much, but that seems like a nice side benefit.

UPDATE: Doh! T-Mobile doesn't have a data service. So I do lose my data features like Google Maps when I'm not connected to WiFi. Sigh, oh well. But still, I like it that I can use my iPhone for phone calls and not have to carry around two devices and keep contacts synched between them. Anybody know of a GSM plan that's pay-as-you-go and has data services? I thought not...

Friday, October 17, 2008

Warren Buffett - Buy American. I Am.

I guess Warren read my blog. Shortly after I wrote that entry, I bought a bunch of Intel and Amazon shares. I'm planning to buy more...
A simple rule dictates my buying: Be fearful when others are greedy, and be greedy when others are fearful. And most certainly, fear is now widespread, gripping even seasoned investors. To be sure, investors are right to be wary of highly leveraged entities or businesses in weak competitive positions. But fears regarding the long-term prosperity of the nation’s many sound companies make no sense. These businesses will indeed suffer earnings hiccups, as they always have. But most major companies will be setting new profit records 5, 10 and 20 years from now.

http://www.nytimes.com/2008/10/17/opinion/17buffett.html?ref=opinion

Thursday, October 16, 2008

Turning my iPhone into an iDunnoWhat

Well, I'm always looking for ways to cut down on monthly expenses, I have enough of them already. And here is my cell phone bill, $60/month, ouch! I am using my cell phone as a phone much less than I expected -- once a day maybe. I just checked - last month I used 70 minutes.

I just got my wife a pay-as-you-go plan from T-Mobile. No contract, can use any unlocked phone, and it's .10c a minute if you get a $100 card.

So let's say I talk on my phone on average 70 minutes a month, that's $7.00 a month. Hm, that sounds pretty good.

The only problem - the cancellation fee of $150 unless I wait until Feb of 2010. And I'll need to buy an unlocked phone, but you can get a nice Motorola V195 from T-Mobile for $30. At a savings of more than $50/month, that extra $180 will pay for itself in less than four months. So it's worth it to switch now, even with a cancellation fee.

But wait, can you actually do that - cancel your AT&T service and still have a working iPhone with WiFi, browser, email, contacts, apps (even location-sensitive apps), and music? Survey says, yes!

Wednesday, October 15, 2008

Wick Allison, A Conservative for Obama

A very powerful endorsement for Obama by a leading conservative, the ex-publisher of the National Review.
The more I listen to and read about "the most liberal member of the U.S. Senate", the more I like him. Barack Obama strikes a chord with me like no political figure since Ronald Reagan. To explain why, I need to explain why I am a conservative and what it means to me.

http://www.dmagazine.com/ME2/dirmod.asp?nm=Core+Pages&type=gen&mod=Core+Pages&tier=3&gid=B33A5C6E2CF04C9596A3EF81822D9F8E

Monday, October 13, 2008

SmugBlog: Don MacAskill » Success with OpenSolaris + ZFS + MySQL in production!

Don MacAskill gives an overview of putting OpenSolaris, ZFS and MySQL into production. Very interesting read.
FS is the most amazing filesystem I’ve ever come across. Integrated volume management. Copy-on-write. Transactional. End-to-end data integrity. On-the-fly corruption detection and repair. Robust checksums. No RAID-5 write hole. Snapshots. Clones (writable snapshots). Dynamic striping. Open source software.

http://blogs.smugmug.com/don/2008/10/10/success-with-opensolaris-zfs-mysql-in-production/

Thursday, October 09, 2008

Modista - yeah, like that!

A friend of mine just forwarded me this link to Modista.

This is a project by some Ph. D. students at UC Berkeley. They are using AI algorithms to find items (in this example shoes) that are "like" the one you picked. Notice how they've gathered shoes for sale across the web and displayed them in a single view.

Pretty nice! I suspect these guys are going to get slurped up by somebody! :)

We'll always have Facebook

Just ready a very funny cartoon by Harry Bliss. A young couple are sitting on a couch, and the woman is crying. The man (wearing a hoodie and a backpack) says "We'll always have Facebook".

I don't know, I think I like "we'll always have Paris" better... :)

Stocks plunge again - is it time to be greedy?

Things are looking pretty grim, and belt-tightening will be required by all. It's going to be particularly rough for the poor and those who have dug a big credit hole.

But that said, I do have a 401k and a rollover IRA. I don't plan on retiring any time soon. So maybe there's a silver lining here.

I recently read a quote from Warren Buffett
Occasional outbreaks of those two super-contagious diseases, fear and greed, will forever occur in the investment community. The timing of these epidemics is equally unpredictable, both as to duration and degree. Therefore we never try to anticipate the arrival or departure of either. We simply attempt to be fearful when others are greedy and to be greedy only when others are fearful.

Maybe it's time to look for some bargains?

http://www.nytimes.com/2008/10/10/business/10markets.html?hp

DimDim - Web conferencing that isn't clunky

I just tried out DimDim after Stefan Hinz from MySQL University mentioned it to me. It looks pretty nice! Note that it is free for up to 20 users, and doesn't require anything but a browser that has Flash 9 installed.

I haven't put it through serious paces, but a cursory look, from signing up to starting a meeting and enabling desktop sharing (available on Mac and Windows) were pleasing - it passes the "first fifteen minutes" test...

Easter egg: some fun profiles of the management team.

Tuesday, October 07, 2008

AIG - Allout Insane Greed

A week after the insurance giant, the American International Group, received an $85 billion federal bailout, executives at its life insurance subsidiary, AIG General, held a weeklong retreat at the exclusive St. Regis Resort in Monarch Beach, Calif. Expenses for the week, lawmakers were told, totaled $442,000, including $200,000 for hotel rooms, $150,000 for food and $23,000 in spa charges.

In addition, the former A.I.G. executive who led the London-based division whose implosion is largely blamed for the insurance giant’s downfall, Joseph J. Cassano, continues to receive $1 million a month from the company, on top of the $280 million he received in the last eight years.

And even after A.I.G. reported $5 billion in losses in the final quarter of 2007, its chief executive at the time, Martin Sullivan, argued before a compensation committee that executives should receive performance bonuses. He received $5 million.


Wow. It makes one's head spin...

http://www.nytimes.com/2008/10/08/business/economy/08insure.html?hp

MySQL Workbench Tutorial - Create a brilliant MySQL forum database from scratch

This tutorial shows how to use MySQL Workbench to create a MySQL Forum database. Gives you a good taste of the E/R capabilities of MySQL Workbench

http://yensdesign.com/2008/10/making-mysql-forum-database-from-scratch/

I, Cringely Gets It About Databases

Robert Cringely attends a conference at MIT and gets a big surprise about the future of databases.
We’re entering the age of cloud computing, remember? And clouds, it turns out, don’t like databases, at least not as they have traditionally been used.

This fact came out in my EmTech panel and all the experts onstage with me nodded sagely as my mind reeled. No database?

No database.

http://www.pbs.org/cringely/pulpit/2008/pulpit_20081003_005496.html

Monday, October 06, 2008

Breaking the App Store lockin with Cappucino



So, I'm speaking out of my hat here, and I just don't have time to investigate, but here are some thoughts.  You can't run Flash or Java on the iPhone.  I'm sure there are "technical reasons" for this but I think there are raw competetive reasons too - Apple doesn't want people building nice juicy dynamic apps that don't go through the App Store Control Board.

However, iPhone Safari runs JavaScript.  I mean, it has to, as almost every web page under the sun has some JavaScript in it.

OK, so...  there is this new library called Cappucino that I've mentioned before.  From their web page:
Cappuccino is an open source application framework for developing applications that look and feel like the desktop software users are familiar with.

Cappuccino is built on top of standard web technologies like JavaScript, and it implements most of the familiar APIs from GNUstep and Apple's Cocoa frameworks. When you program in Cappuccino, you don't need to concern yourself with the complexities of traditional web technologies like HTML, CSS, or even the DOM. The unpleasantries of building complex cross browser applications are abstracted away for you.
OK, so, do you follow?  If Cappucino does what it says it does, then you can build rich, dynamic applications using only standard web technologies.  No plugin required.  It will run on the iPhone in Safari.  And, get this, the ironic thing is the framework is build to look just list Cocoa and Objective-C (they call it Objective-J).

So, I can build a nice app for the iPhone without having to go through the app store. 

Problems: you can't take advantage of the accelerometer or interact with the phone or GPS or audio.  But, still, it goes a long way towards breaking the chain.

So, what do you think?  Am I way off base here?  Or am I on to something?

Thursday, October 02, 2008

Wednesday, October 01, 2008

Your input requested: NetBeans.next and DB schema management

I'm doing research into database tooling for NetBeans for the next release. One area that comes up a lot when I talk to users is schema management - making it easy to make, communicate and deploy changes to your schema as part of ongoing maintenance of your application.

The first step in this analysis is use cases. Here are some of the use cases I have come up with. Note they are not talking about a particular tool or a particular solution, but the situation the user is in and what they want to accomplish.

My question to you is: which of these are like really important to you? Which ones would you love to see solved? And which ones am I completely missing?

By the way, I know there are a lot of possible refactorings, but I just list some obvious ones to give you the idea of what I'm thinking and get your feedback. Listing all possible refactorings would be a tome, not a blog.

What I'm more interested in is what are the changes you most commonly do and which would love do be able to do as you code.

Changing/Refactoring During Application Development
  • Add a Table - A developer is modifying their application code and discovers they want to add a table. They want to do this with minimal interruption to their coding flow. For example, they could be writing a query that refers to a non-existent table and quickly add that table to the database.
  • Rename a Column - A developer is modifying his application code and wants to rename a column with minimal interruptions to his application flow. This includes quickly finding and updating all other references to their column within his code.
  • Add a Column - A developer is modifying her application code and realizes she needs a new column. She wants to add the new column to the database with minimal interruption to her coding flow.
  • Change Column Type - A developer is modifying their application code and wants to change the type of a column with minimal interruption to her application flow. This includes quickly finding and updating all other references to her column that are impacted by the change.
Deploying An Application
  • Initial Deployment - A developer has an application they want to deploy into testing or production. Their application includes a schema definition that needs to be applied to another database. He wants to create the schema as part of deploying the application.
  • Upgrade - A developer has made changes to their application that involves changes to the schema. She wants to deploy the new version of the application, and wants to apply the schema changes without losing data.
  • Review Changes - A developer has made changes to their database schema in his development database and wants to review and perhaps modify the set of changes.
  • Publish Changes - A developer has made changes to her database schema and wants to make those changes available to others, either for review or so they can be applied to another database that is controlled and managed by someone other than the developer.
  • Commit Changes to SCM - A developer wants to commit an application change to an SCM for version control and collaboration. Their application change includes schema changes, and the developer wants those changes to be included with the commit, so that other developers can apply those changes as part of upgrading the application in their workspace.
So, there you have it, the first steps towards understanding what we might want to do around this. Thanks, in advance, for your feedback.

Tuesday, September 30, 2008

The curse of the swallowed exception

Ever since I've been working in (and maintaining) Java code, I have found myself regularly trying to track down an issue where either there is no error message or the error message is mysterious and unhelpful like "read error at byte 0."

I think one of the most common and most expensive (in terms of maintenance) programming errors I see is the handling of exceptions.

I am sure everybody who is passionate about programming has their own principles, but this is my blog, so here are mine. You can give me yours in the comments.

David's Principles of Exception Handling and Reporting
  • Silence is deadly - This is the overriding principle. The stack trace is a beautiful thing to someone trying to fix an issue. An error message without a stack trace, or worse yet, silence, is the cloaked harbinger of hours, days, even weeks of hair-pulling debugging. Please, please, do not just quietly catch an exception and do nothing or just print out the message and not the stack trace.
  • When in doubt, throw it - If you call a method that throws an checked exception, generally you should rethrow the exception. The only time you shouldn't is if your method is responsible for communicating with the user.
  • Have one exception class per module - Here a module is a conceptual grouping of classes that together provide a service. I generally follow the principle that a module should have one and only one exception class, and all exceptions thrown by that module should be of that class. It's not helpful to creatively invent new exceptions for each condition. But, as usual, there are exceptions, particularly when you want to communicate a very particular situation. Bot those exceptions are rare, IMHO.
  • Don't break the chain - Because of the two principles above, you need to wrap exceptions you re-throw in the exception class for your module. Please don't just throw a new exception without wrapping the old one - vital information is lost that way, and you are likely cursing somebody (maybe even yourself) to hours or even days of head-scratching. Java has had exception chaining for years - learn it and use it.
  • The buck stops here - If you have nobody to re-throw to (generally because your method was invoked by a user action), sorry, but it is your responsibility to report the error the user. Who the user is and how you report it depends on your application. If you're a server application, you need a way to send the error message to the client. If you're a user application, you need to report the error through the UI. In either case, you need translate geek-speak into user-speak. Thus the next principle...
  • Be a butler - When you report an error to a user, don't be a gruff soup nazi. Be helpful. Describe the error, provide a likely cause, and offer possible actions the user can take. So instead of "I/O error: unable to read next 10 bytes from stream" say something like "We encountered an error while trying to talk to the server. It is possible the network connection was lost or the server was stopped. Please check to see if the network is working and the server is running and try again."
  • Log it - When you report a nice helpful error message to the user, log the full stack trace to the error log and not just the message. Log anything else you think is useful, the more information the better. This essential for the poor sod who has to try to track down the cause of the error. If you don't have an error log, get one.
  • Now what - You've just reported an error, what are you going to do next? The answer, of course, is "it depends." It's a discussion left for another day, but my general principle is, if data or long-term state is involved, it's time to fail quickly to avoid data corruption. If data is not involved - it's about a user session and user interaction, you generally report the error and move on - the user is responsible for any corrective action.

Monday, September 29, 2008

Geva Perry: Thinking Out Cloud: Ellison's Anti-Cloud Computing Rant

As I and others have already pointed out several times, Oracle is the company of status quo. Things are very good for Oracle the way they are exactly now -- any change is unwelcome. They make money by having high-paid aggressive sales people shove big stacks of software down customers throat, forcing them to buy this software with up-front, fully paid-up prepetual licenses. They then continue to make profit from these customers by selling them annual maintenance fees, most of which customers don't need or use ... So take Larry at his word when he says Oracle is not going to change anything but marketing.

http://gevaperry.typepad.com/main/2008/09/larry-ellisons-anti-cloud-computing-rant.html

Wednesday, September 24, 2008

Tom's Essay - Suzanne Vega

A great wandering, fun, delicious blog by Suzanne Vega about Tom's Song and Tom's Album and how she became declared "The Mother of the MP3"

http://measureformeasure.blogs.nytimes.com/2008/09/23/toms-essay/index.html?ref=opinion

Starting MySQL in NetBeans as root/administrator

As you may or may not know, NetBeans 6.1 and 6.5 provide the ability to let you start and stop your MySQL server directly from NetBeans. To be honest I wasn't sure how valuable this feature would be when I implemented it, but in my own work I've found it to be very nice. It's a small thing but it helps me maintain my "flow" when working with the database.

One challenge is that often MySQL can only be run with administrative/root privileges.

On Linux and Solaris you can use 'gksu' to start a program as root, and a dialog will appear asking you for the root password. So if you right-click on the MySQL node and choose Properties and then select the Admin tab, you can make gksu the command name and the actual command to start and stop MySQL is part of the command arguments. Here is a screen shot to give you the idea:

linux-properties.jpg

Now, gksu doesn't exist on Mac. The command to bring up a dialog for the administrator password is somewhat complex. So I've written a little script called "macsu" that looks like this:
#!/bin/sh/usr/bin/osascript -e "do shell script \"$@\" with administrator privileges"
Then in your Properties window you can do the following:

mac-properties.jpg

Et, voila, you get a prompt when you run the start command:



Note that my 'macsu' command doesn't handle "--" options well, so if you want to do "--console" you might have to wrap your mysql start command in your own script file, and then invoke that file from macsu.

To be honest I have no idea what you can do on Windows. Does anyone have any tips?

Why is the default answer always a web app?

On one of our NetBeans mailing lists, a new programmer asked a question, how should they build their application that needs to run on ten client machines talking to a MySQL database.

The quick answer was "build a web app."

I just don't understand this. The web app architecture is - c'mon, admit it - ugly for applications that need to have dynamic behavior (e.g. almost every app out there). It was never built for that. HTTP/HTML is a static, document-oriented protocol and markup. HTML came from SGML, which is all about documents and publishing, not dynamic database-driven OLTP applications.

But the browser is ubiquitous. It's the absolute best way to distribute a service out to millions of people. Its the visual channel into the Internet. So we've worked with it. Thousands of developers have grown up building apps using HTML/CSS/JavaScript, session state, multiple tiers and so on.

But it wasn't always that way. When I was fresh out of school, the browser didn't exist, and we built simple client/server applications. The client talked directly to the database using a database-oriented protocol.

There were issues, of course, the primary one being how to manage versioning and upgrades across thousands of machines, each with their own operating system and versions, some of them sporadically connected (e.g. on laptops). One of the key advantages of the web is that you install it in one place, and everybody automatically gets the upgrade. And it runs on everybody's machine. It's so cool.

But today there is Java (write once, run anywhere) and Java Web Start (auto-upgrade to all your client machines). They are mature and battle tested. If your application is only going to run on the local network, there is absolutely no need to create a multi-tiered HTML/CSS/JavaScript monster. You can use traditional client/server, with rich clients written in Java and deployed by Java Web Start talking directly to your database using JPA/Hibernate/JDBC. You can use the visual design tools in NetBeans or Eclipse to visually build your application. No hacking <table><tr><td> garbage.

Having a middle tier also allows you to disintermediate between the clients and the database, which can give you a chance to improve performance and scale through things like caching, pooling, clustering, replication and so on. But none of that is needed when you have a small number of users, so why create complexity when it's not required?

Now, if you're building an application to be accessible over the Internet, or if you need to scale, it's a different story. You need a middle tier, and one that speaks HTTP if you're going over the Internet.

But even then you can use Java and Java Web Start, and your client application can talk to the middle/web tier using a service API. There is no reason why the server should be responsible for composing the UI for your application. It can be a server, not a UIer.

If you have Java antibodies, you can use Flex or Silverlight. Or take a look at Cappucino.

There are reasons why these RIA architectures are popular - they are meant for dynamic applications and dynamic behavior, unlike HTML, which really was never intended to be anything more than a way to display static documents. With these RIA environments, finally we're getting back to building apps with tools and an underlying architecture that match the dynamic application paradigm.

Now, folks like Google want you to keep building browser-based HTML applications, using JavaScript for dynamic behavior to muck with the DOM (note their new browser with superior JavaScript performance). Why? So they can scan your text-oriented application and inject targeted ads. Not possible with RIAs where the application is compiled into byte codes.

But just because it works for Google doesn't mean it works for you or your users, or that it's the best architecture. It's just the architecture we've had to work with for the past fifteen years.

Now, there are times when a web app makes sense, absolutely. The answer, as always, is "it depends." But when someone asks you how to build a database-oriented app please don't just default to "web app". There are other, potentially superior, options out there...

Tuesday, September 23, 2008

Drag and drop service consumption in NetBeans PHP

Very nice screenshot showing how easy it is to generate PHP code to consume various web services, such as Amazon S3, Facebook, Delicious, Google Maps, etc. Includes a link to a tutorial on how to use this feature for Yahoo News Service.

http://blogs.sun.com/netbeansphp/entry/software_as_a_service_in

Hey, Mr. Senator, can I have some of that?

I hear tell that the gummint is handing out cash to anyone in trouble.

Well, hey, Mr. Senator. My bank won't give me no loan, and it's costin' me more and more for food and clothing. Baby needs a new pair of shoes. Can you give me some of that there 700 BILLION dollars? Where do I sign up?

Looking to talk to a few good PHP developers

Well, our team is hitting code freeze today, and so it's time to look ahead and think about database tooling for NetBeans.next.

Last year I interviewed 10 different Java developers about how they use databases, and it was very enlightening. But I didn't talk to very many PHP developers.

I'd like to change that, and YOU can help. If you develop with PHP and would like to help the NetBeans db team improve your productivity when it comes to working with databases, then let me know, and let's talk. You can reach me at david dot vancouvering at sun dot com.

Monday, September 22, 2008

Shock politics

When I read the headline today that Bush is putting heavy pressure on Congress to accept the bailout plan, where we throw at a minimum 700 billion dollars (or more) at Wall Street with no strings attached, saying it's a crisis and we must act quickly, and when there are serious concerns with it, I smelled hidden agenda.  You can just feel it in your bones.

Last week my wife told me that she had read an article where it explained that a big agenda of the current administration before it leaves is to empty out the government coffers as much as possible.  I walked away scratched my head wondering why on earth anyone would want to do that.

Then today I read this article by Naomi Klein and a light went on in my head.  If we're drained of cash, then it becomes much easier to push through "cash-saving" agendas such as privatizing social security, lower corporate taxes and cut spending on the poor.  It severely hobbles any new administration to do anything progressive.

Eight years ago I would never have believed such a cockamamy "conspiracy theory."  But these days, after watching what has happened with the Iraq war, with the EPA, and with the politicization of the Justice Department, well, I'm not so sure.  I have the ugly feeling this may actually be a strategy.

If it's true, and they succeed, heaven help us.  If such backroom strategists are really thinking this way, I don't think they really have any idea what the true consequences of such a strategy might be.  Talk about short-sighted loot-and-burn out-and-out greed.  It makes one shudder.

No, not *that* Palin

Get Fuzzy is a great comic, but I think I haven't laughed at any of them more than these two. Priceless.

Consensus does not mean we all agree

I have had a number of colleagues come to me over the years since I've worked in open source expressing frustration and almost hopelessness as they found themselves trying to obtain consensus for their open source contribution.

What I tell them is that just because the community is consensus-based does not mean everyone has to agree with you. 

Here's one definition of consensus I found on the web: General agreement, characterized by the absence of sustained opposition to substantial issues by any important part of the concerned interests.  My dictionary on my Mac makes it even simpler: general agreement.
 
The key word here is general agreement.  I also like the phrase "absence of sustained opposition in substantial issues."

Many people get frustrated working in open source because it feels like any attempt to make a substantial change gets bogged down in numbing committee-like discussions.

Now, I won't deny it, there is overhead in working with open source.  You do need to get feedback, and make a best effort to address comments or concerns.

But that doesn't mean you iterate and iterate and iterate in some Sisyphean nightmare trying to get everyone to accept your change, or that you hunker down and make a change you disagree with. 

If you're a committer, you take the feedback, incorporate what makes sense to you, and if there is absence of sustained opposition, you check it in.  If you are not a committer, then all you need to do is find one committer who supports your change and they can check it in for you.

In the Apache model, sustained opposition is in the form of a veto.  A veto is taken very seriously - if you veto, you had better have a very good reason, and you had better offer an alternative. 

In the OpenSolaris ARC model, reviewers provide comments in the form of TCAs (Technical Change Advised) and TCRs (Technical Change Required).  It's only the TCRs you have to worry about.  Your change won't be accepted withough addressing the TCRs, and generally there are few if any TCRs.

I like the TCR/TCA model because it (a) explicity identifies which issues are causing you to veto a change and (b) requires you to be very clear about what needs to change, rather than just saying "-1".

I learned the principle of "consensus does not mean we all agree" the hard way.  When I was new on the Apache Derby project (my first open source project) I spent three months trying to get agreement on a change that would allow sharing of code between the network-based JDBC driver and the embedded JDBC driver.  It was insane.  I would try to please one person or group, and then another set of people would complain, back and forth.  Finally I got a private email from one of the veterans on the project who said "you're never going to make everyone happy, David.  Nobody's threatening to veto.  Just check it in."

Oh.

So now I offer the same advice to people when they complain to me that they feel if they have to bend over backwards for person X or person Y or they say something like "OK, fine, I'll do it your way, but I don't like it."  Relax.  Consensus does not mean we all agree.  Just check it in.