Tuesday, December 30, 2008
Thanks to a plug from TechCrunch, I have discovered Posterous, and I am very happy with it. It allows me to post stuff to any combination of Twitter, Facebook, or my blog, all from my email or from SMS. I can even have one item which posts to all of them, which is very useful for links to interesting stuff.
For example, this blog is being written on Thunderbird. HTML formatting seems to make it through unscathed.
And note that now I have offline blogging, tweeting, and updating Facebook, without some specialized software for each service.
I write to email@example.com, it goes to my blog. I write to firstname.lastname@example.org, it goes to, you guessed it, Twitter and Facebook. I write to email@example.com, it goes to all three.
The one bummer is that the Facebook interface doesn't set my status - instead it adds something to my wall. So if you're just looking at my status updates (e.g. through the status RSS feed which I just discovered, cool!), you won't see my Posterous posts...
All the same, I highly recommend checking it out...
Friday, December 19, 2008
But the comments and tweets I've seen since Petr blogged about SQL completion in PHP are very encouraging that we're on the right path...
Here are some sample tweets - I love the "scribbling on the wall" nature of tweets. It's almost like being in a bathroom stall :)
PHP support in NetBeans keeps getting better - SQL code completion is tight http://is.gd/c00a
trying out NetBeans. Nice fieatures and "Now with PHP support!" If MySQL code completion works as claimed, I'll be overcome with giddiness
I'm not much of a twitterer myself, but I've found that listening in on RSS feeds for Twitter Search has been very useful in sensing the pulse of the community...
I was debugging a unit test, and there was a method I wanted to step into only when my particular test case that was failing was hit. This same method is called repeatedly, so I didn't want to put a breakpoint in it, or I would hit it over and over and over again until I got to the invocation I wanted to debug.
The problem is, once I was in there, I didn't want to step, step, step to get down to the actual method I wanted to step into from there. Capiche?
So what to do? Well, I though, it sure would be nice if I selected to the method I wanted to step into and just say "go there." What the heck, I said, let's put my cursor there, right-click, and see what happens. Magic, that's what!
Note how the method I care about is highlighted in yellow. That happens automatically when you click on it. Then notice the "Run Into Method" action in the drop-down menu.
Hey, why not, I tried it, and bingo, there I was! It's a thing of beauty I tell you!
Thursday, December 18, 2008
But, yes, there is a new New Connection dialog planned with a Test Connection feature. It will also have a "Automatically Reconnect on NB Restart" checkbox that I know I will love to have.
Note that what he's showing is a wireframe/mockup and not the actual dialog. Point taken about the current dialog being too wide, we'll see what we can do about that.
And yes, we are looking at making a help plugin with full MySQL docs and also making MySQL documentation available in code completion for MySQL functions (to start, maybe keywords later), both in the PHP editor and the SQL editor. If we get this to work, it will be very cool
Another problem with the net is that it's still "technology", and "technology", as the computer scientist Bran Ferren memorably defined it, is "stuff that doesn't work yet." We no longer think of chairs as technology, we just think of them as chairs. But there was a time when we hadn't worked out how many legs chairs should have, how tall they should be, and they would often "crash" when we tried to use them. Before long, computers will be as trivial and plentiful as chairs (and a couple of decades or so after that, as sheets of paper or grains of sand) and we will cease to be aware of the things.
...the following query returns all the items which have the values 'Book' and 'Hardcover' in keyword:
select * from my domain where every(keyword) in ('Book', 'Paperback')
Now available in the nightly builds, when editing a date field, just click on the drop-down arrow and you get a nice date picker. This is so much nicer than trying to enter in the date by hand.
All this cool data entry functionality is coming from Ahimanikya Satapathy's team in Bangalore. They are a completely separate team here at Sun - they don't even have the same VP as we do. His team is part of the group that delivers Sun's Java CAPS (Composite Application Platform Suite). This suite provides SOA and data integration services for Sun customers. It's been great working with them, a win-win for both of us.
Next up from them, import/export to/from CSV and XML. Stay tuned...
This isn't quite working yet for MySQL, but should be fixed in the next few days... We'll also be fixing the dialog for creating a new connection so you don't have to specify the schema any more, we'll just use the default given by the database. If you want to switch your default, just right-click on a schema and say "Set As Default" That'll be nice...
Wednesday, December 17, 2008
Just last night she was struggling with "eight" saying something like "ee-ga-hut" and I said "that spells 'ayt'" and she said "WHAT? That makes no sense!"
She also got quite mad at words like "through", "psychic" and "laughter". I hadn't thought of this for a long time, but working with her bring the silliness of English spelling all back. Although in a way it's fun to use the spelling to figure out how it used to be pronounced a thousand years ago: "threwoch" for "through" and "k-nicht" for "knight."
Which brings me to a note she wrote a year ago, before learning to read.
I wit awot sid to luc for a for leef clover.It turns out that there are still people trying to simplify spelling of the English language.
ps i wat sicer doo dols for my nix chreet
Here is Mark Twain's proposal for fixing English spelling.
For example, in Year 1 that useless letter "c" would be dropped
to be replased either by "k" or "s", and likewise "x" would no longer
be part of the alphabet. The only kase in which "c" would be retained
would be the "ch" formation, which will be dealt with later. Year 2
might reform "w" spelling, so that "which" and "one" would take the
same konsonant, wile Year 3 might well abolish "y" replasing it with
"i" and Iear 4 might fiks the "g/j" anomali wonse and for all.
Jenerally, then, the improvement would kontinue iear bai iear
with Iear 5 doing awai with useless double konsonants, and Iears 6-12
or so modifaiing vowlz and the rimeining voist and unvoist konsonants.
Bai Iear 15 or sou, it wud fainali bi posibl tu meik ius ov thi
ridandant letez "c", "y" and "x" -- bai now jast a memori in the maindz
ov ould doderez -- tu riplais "ch", "sh", and "th" rispektivli.
Fainali, xen, aafte sam 20 iers ov orxogrefkl riform, wi wud
hev a lojikl, kohirnt speling in ius xrewawt xe Ingliy-spiking werld.
 "I went outside to look for a four leaf clover. Ariel. P.S. I want snicker doodles for my next treat."
Tuesday, December 16, 2008
He was asked what he thought about Obama winning the election, and he said (paraphrased as best I can):
When I was in school Kennedy won the election. The nuns at my school told us that this mean anybody could be president, anybody. So I went home and told my Dad this and he said "yes, it's true, anybody can be president." And I said "so that means I can be president!" And my Dad said "You? Pffff! What are you crazy?"
Monday, December 15, 2008
Thursday, December 11, 2008
OK, fine, but these sure sound like band-aids on a huge problem. I didn't hear him actually say "we will guarantee health care to every man, woman and child in the USA without breaking the bank." Because that's what we need, and badly.
When I was on vacation this summer, the place where we were staying had a copy of Tim Harford's the Undercover Economist. I was intrigued by his discussions of health care. First of all, he says health insurance is intrinsically broken because it's like the used car market: the insurers can't get enough information about the insured's true health (although they try), and so they have to charge you (or your employer) assuming you're going to get sick. As a result, the healthy people bow out of the insurance market, and you're left with those who need it, and thus in a vicious circle the costs go up even more.
He also claims (and this makes sense) that single-payer insurance managed by the government is guaranteed to be costly and inefficient, because it is not market-driven. That doesn't mean we should just privatize insurance and let the poor sick shmucks die. But a true free market brings out the most efficient solution. So, through our taxes, the government should subsidize a market-based health program. A program like this that is actually in place and actually works incredible well is the one in Singapore. Singapore (it's a "fine" place :)), well, it's an odd place, but they have some of the best health care in the world with one of the lowest administration costs anywhere. See Bryan Caplan's discussion here.
Will we ever see something like this in the USA, where the individual's make their own choices for how they allocate their health care dollars? I doubt it, especially after hearing Obama's (pardon me) weak proposals. Why? Entrenched interests - in particular, insurance companies. A program like this eliminates the need for insurance. Poof. Gone.
So instead I suspect we'll see an ongoing snowballing mess of the existing situation with government money pouring into particular initiatives that may, or may not, help the problem, because they are in no way driven by a true market. Ugh.
But you know, Facebook ultimately works for its advertisers, not for you and me. That bothers me, both in terms of what's happening with my data, what drives Facebook's features, and Facebook's long-term viability, especially in a knock-down economy like this.
So, I have a wild idea. Let me pay you, Facebook. $10 a month.
And for that $10 a month I want you to kiss goodbye to your advertisers. I don't want my data analyzed, scraped, or monetized. I want you to guarantee complete ownership of my data.
And I don't want to have to go to your site to get status updates. I want to get them on email, on SMS, on IM. It's not a surprise you can't do that today, because that would mean not seeing all the ads and "additional features".
And don't be like cable. I remember when cable first came out, the idea was, we pay you, and we don't have to watch ads. Five years later, cable was full of ads. To me that's a breach of trust.
The thing is, Facebook has become a black hole. So many people are there, it's where everyone meets. It doesn't matter if other services are free. Everyone's hanging out at Facebook. It has reached critical mass, and people are addicted to Facebook. It's like their morning paper.
So, charge a cover charge (at least as an option), and become beholden to your users, not your advertisers. Please.
Wednesday, December 10, 2008
Here's a summary of the timing
- Download: 2 minutes and 30 seconds. I cover this time by describing bringing up a slide and describing the clustering architecture
- Installation and cluster setup: 4 minutes, 30 seconds.
- Verifying and testing cluster by deploying a sample application: 3 minutes
We were initially thinking the project would cost $10,000, but the owner of the company kept asking for additional features, so we thought maybe the cost might rise to $20,000. But in the end, the final cost was close to $50,000. Flash is not a serious programming environment, and as soon as you try to do something ambitious with it, you learn a painful lesson about its limits. For this reason, I am very excited about JavaFX
as you scroll on your computer, your guest will see what you see and their view will scroll as you scroll. Visit a YouTube page, for instance, and the video will start playing on everyone’s desktop - all in sync.
I've been very interested this since I heard Shai Agassi was leaving SAP two years ago. I really like this idea. My only question is - what is being done with old batteries? I can imagine huge toxic waste dumps of old batteries - not a pretty picture.
I know there are other tools out there that do this as well. If it were me, I'd much rather have a tool like NetBeans do it than write a script like this...
I think to keep things simple, maybe I'll just start calling everyone Petr...
Tuesday, December 09, 2008
In this session we’ll be building a PHP+MySQL application that uses the Twitter API and has some AJAX fun with it.
You’ll also get a chance to see what it’s like to build an application in a PHP IDE like NetBeans. Those of you who use ‘vi’ might want to see how the other half lives, and scoff at us under your breath. Or you may actually get turned on to the power of a good IDE and realize hey, I could use some of that.
In this session we will be demonstrating
- Building a PHP+MySQL+web services+AJAX application in NetBeans
- Using the Twitter search API
- Using AJAX-based graphing tools to provide dynamic graphing to your application
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...
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).
Monday, December 08, 2008
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.
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.
Friday, December 05, 2008
... 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).Bada boom, bada bing.
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
Thursday, December 04, 2008
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 secondSome 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
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
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.http://www.worldwidewords.org/qa/qa-bai1.htm
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.
Tuesday, December 02, 2008
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.
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
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.
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.
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.