Tuesday, March 10, 2009

New TLDs - boon or boondoggle?

When I was reading up about Minds+Machines and what they do, I encountered some articles and blogs complaining that new TLDs are primarily a way to milk money out of trademark owners because they have to defensively register their name in all these new TLDs.  There do seem to be a lot of concerns, and not a clear understanding of its value.

Advertising Age had an article about this that makes it all sounds pretty ugly, and you could find yourself asking "why is ICANN doing this?  It sounds like a mess!"

Antony Van Couvering (yes, we're related), CEO of Minds+Machines, responded to this article in a comment. You can also find his comment in full on the Minds+Machines blog.

His main point is that there are significant benefits to TLDs, that these benefits significantly outweigh the potential costs, and that the marketing/ad industry should look towards how to take advantage of the benefits rather than naysaying and focusing on the costs.

I particularly liked Antony's point that a TLD can be used as a guarantee of quality - it's a brand you control and you can use it as a brand in the real sense of the word:
If BMW had standards for their pre-owned cars (which they do), then they could provide .BMW domain names for dealerships who met their qualifications. BMW = quality; .BMW = dealer you can trust.
It also appears that there has been a pent-up demand for new TLDs that really can't be denied
These new top-level domains are going to happen, because the demand has been simmering for over 10 years for non-Roman-character TLDs for most of the non-English-speaking world, so that people can use the Internet in their own language. Add to this vocal demands for non-brand-related TLDs such as .AFRICA, .EUS for the Basque Country, .NYC for New York City and so on. These are the real demands that are driving this process, and concerns about cost to brand owners, as real as they may be, are not going to stop it. It's true that the new TLDs will cause some headaches for brand owners, although there are workable proposals out there that will allow brand protection across all new TLDs for as little as $125 per brand.
I'm curious what those proposals are, that sounds encouraging.  Antony worked with companies for years as CEO of NameEngine (then acquired by Verisign), helping them establish/protect their brand across domains, so I suspect he knows of what he speaks.

A great conclusion too, that drives the point home 
But to concentrate on the risk and cost when the opportunities are so great strikes me as a great mistake. There is no reason for a company to spend money branding VeriSign (=.com) when they could be branding themselves, even as they claim a permanent part of the Internet at the very top level. Compared to the opportunity, the cost is truly trivial.
 Maybe I should work with Antony to get the .VANCOUVERING TLD :)

Arnon Rotem-Gal-Oz - 10 Papers Every Software Architect Should Read (At Least Twice)

Excellent, excellent resource, thanks Arnon! Another architect friend was just telling me about a paper that shows you can never reach consensus in a distributed system, and then here is the paper in Arnon's list. I love it when that happens.

http://www.rgoarchitects.com/nblog/2009/02/27/10PapersEverySoftwareArchitectShouldReadAtLeastTwice.aspx

Villagers in India Open Their Homes - NYTimes.com

A very nice article on the growing trend of tiny villages in India opening up their homes for tourist stays. Sounds tempting - when the kids grow up... Make sure you look at the slide show.

http://travel.nytimes.com/2009/03/08/travel/08journey.html

Minds + Machines



Hey, look at that, my brother, Antony, along with two other heavy lifters in the domain name industry, Jothan Frakes, Elaine Pruis, just took the domain world by storm.

He pulled the curtains off of his new company, Minds and Machines, at the ICANN meeting in Mexico City last week. They had a booth there and expected some interest, but the news is there was a lot of interest and they were very very busy.

It appears they are giving the bigger companies in the domain industry a run for the money, having moved from zero to 4th in the space in a matter of a week (according to my brother anyway :)).

At Mexico City they announced that the new .eco top-level domain (TLD) is using them, and also got the icing on the cake that Al Gore is supporting and sponsoring the .eco TLD.

Their web site is clean, cool, approachable and understandable even to those not in the domain business. They are also using and enhancing the popular open source domain platform, CoCCA, to make it very easy to create and manage your TLD.

Why "Minds and Machines?" If I understand it right, the idea is that they are combining the strength of their experience in the domain industry (Minds) with the usefulness and productivity of software (Machines) to provide an excellent experience for managing a TLD.

It also allows them to give away m&ms at conferences :)

Many congratulations to my brother and his company, and may this be a source of abundance to him and a service to the world.

Saturday, February 28, 2009

Interview questions and poop

As part of the job hunt, I am reviewing potential interview questions and practicing (as much as one can practice this sort of thing).

There are four major groups of interview questions, as far as I can tell:
  • General knowledge - discussions about what you know, questions like "what does the synchronized keyword mean?"
  • Coding questions - "reverse a linked list"
  • Puzzlers with one or two right answers - "you have two candles that burn for 60 minutes. How do you use them to measure 45 minutes?" - no, you can't cut the candle, or make marks with a ruler...
  • Puzzlers with no right answer - "you have been reduced to the size of a nickel and placed in a blender. The blender will turn on in 60 seconds. What do you do to save your life?"
I haven't personally been asked the last kind of question, but I've read about them. They're supposed to test your creativity and, I don't know, spunk.

However, a few days ago I had an experience with my son that got me thinking, and I realized that as a father and a homeowner I have to face these kinds of questions all the time. Note: none of these situations are made up...

You're in a bookstore with your three year old child who has just recently been potty trained. You are enjoying reading a book while he plays with the train set in the kid's section when all of a sudden he says matter-of-factly "I pooped." You have no change of clothes and no wipes. How do you clean up your son without making a huge mess, embarrassing yourself, or both?

You are on the airplane to Hawaii with your five-year-old daughter, and there is massive turbulence. The flight attendants refuse to provide water, and there are no airsickness bags. Your daughter throws up on herself. Twice. What do you do?

You have a son who likes how things "work". One day you discover most of your daughter's plastic necklaces are missing. The next day brown disgusting water starts bubbling into your bathtub. What do you suspect has happened?

You hear a roaring sound at 2 am and stumble downstairs to find two inches of water in the kitchen. The roaring sound is coming from under the sink. What is happening, and how wet do you think your pajamas actually get?

You have an invasion of rats that have destroyed your futon mattresses in your garage and have eaten their way through your plastic earthquake bin to tear apart your earthquake supplies. They wake you up every night chewing on the drywall just behind the bed. They ignore all traps. How do you get rid of the rats?

So, perhaps I am more prepared for these kinds of questions than I may think...

Wednesday, February 25, 2009

Turning Japanese - Paul Krugman Blog - NYTimes.com

Scary stuff
Pretending that distressed assets are worth more than they actually are today for regulatory purposes persuades no one besides the regulators, and just gives the banks more taxpayer money to spend down, and more time to impose a credit crunch. These kind of half-measures to keep banks open rather than disciplined are precisely what the Japanese Ministry of Finance engaged in from their bubble’s burst in 1992 through to 1998 …

http://krugman.blogs.nytimes.com/2009/02/25/turning-japanese/

Facebook's Cassandra - what's going on?

I read with interest the SIGMOD paper on Facebook's Cassandra.  It looked very interesting, an open source combination of BigTable and Dynamo (PDF) .  It appears to be running in production in Facebook serving the very demanding inbox notification system.

So I wanted to try it out.  I went to the Google Code project, and it just seemed, well, dead.  The instructions for checking out the source are wrong both on the Sources tab as well as in the Wiki.  The mailing list has almost no activity.  It looks like they are trying to get into Apache incubator, but meanwhile people are asking what's going on, what the status is, and there appears to be no response.

A consideration for using any technology is understanding the strength of the community behind it.  You don't want to bet your infrastructure on something where there is no support and you are basically on your own to maintain it.

So, if you know what's going on with Cassandra, please let me know.  Meanwhile, I'm going to put it on the back burner and take a look at some alternative clustered key-value stores, like Project Voldemort, SimpleDB and HBase.

Hitting the scalability wall - Amdahl's Law


Author's note: I was thinking about this blog and how I didn't quite capture some things correctly, particularly around what it means for processing to become serialized.  Then I saw some comments that repeated my own concerns.  So I have done some rewriting in an attempt to explain more clearly what I think the issues are... 

When examining the challenges of throughput and scalability in the brave new world of Web Scale, one solution I've been looking at is Gigaspaces.

I recently read their article about scalability (follow the link to "The Scalability Revolution" - you may need to register to be able to see it), and they made a claim that gave me pause, to say the least.

Basically they said that if you have a multi-tier architecture, you are doomed - sooner or later you are going to hit a scalability wall, either because of cost, complexity or latency.  I think in particular they meant that if your end-to-end request/response path must travel over multiple tiers to complete, you are doomed.

They have examples to back up this claim, but what was compelling for me was their reference to Amdahl's Law.

Amdahl's Law states if any portion of your system requires processing to be serial instead of parallel  then the system is going to hit a scalability wall where it can go no further, no matter how much hardware you throw at it.   From the Wikipedia article:
The speedup of a program using multiple processors in parallel computing is limited by the time needed for the sequential fraction of the program. For example, if a program needs 20 hours using a single processor core, and a particular portion of 1 hour cannot be parallelized, while the remaining promising portion of 19 hours (95%) can be parallelized, then regardless of how many processors we devote to a parallelized execution of this program, the minimal execution time can not be less than that critical 1 hour. Hence the speed up is limited up to 20x.
Note that the actual numbers don't matter too much.  You can avoid hitting the wall by reducing the amount of serialization, but sooner or later, you are going to hit that wall.  And even before you hit it, the cost of getting a fraction more speedup is going to increase exponentially.  I have heard many stories to vouch for this, where getting 10% more throughput requires 100 times the hardware investment and/or complete rewrites of applications.

If your system architecture requires you to potentially wait for a shared resource within the request/response path, then you are shifting from parallel to serial execution, and you are going to hit Amdahl's Wall.   Here are some examples:
  • Reading/writing data in a shared database
  • Sending a request over a network which will block if the network is congested (the network is shared by multiple simultaneous requests)
  • Writing to a disk which may block if it is busy, where the disk is shared between multiple simultaneous requests.
Well, that does seem to throw a wrench in things.  How can a service run independently, with no database access, disk I/O or network I/O, and still be useful?

Well, the key thing is that these things can not happen within the request/response path.  They can still be done in the background, asynchronously. For example, if the user updates their profile, then this update is stored in-memory and then, in the background, this status update is stored in the database.  If you want to send a message to another service, the message is queued up in memory and then delivered to the external service asynchronously.  

Note the consistency implications of this.  You end up with a system where not everybody has a consistent view of the current state of the system.  But we already know through the CAP theorem that this is something you probably need to accept.

There is also a window of possibility where the user thinks the update succeeded but the actual persistence of this update fails or there is some kind of conflict.  This means your company and your application has to know how to apologize.

But if the benefit of this is linear scalability, these tradeoffs may be well worth it.  Better to apologize to a small subset of customers about a lost order than apologize to all of them for terrible latency or to apologize to your management about the cost and time overruns for your system.

Gigaspaces claims to have accomplished this kind of architecture with a runtime environment they call a space which provides in-memory access to all the resources you need to process a request.  The underlying Gigaspaces runtime ensures that each request is routed to the right cluster node and that the node contains all the resources needed, in memory, for that object to get its job done.   To be honest, I am still mystified how they can accomplish this, and this is something I would like to investigate further.

At any rate, I appreciate the Gigaspaces article helping me understand the implications of Amdahl's Law.  As I evaluate a scalability architecture, if something, somewhere, requires the request/response path to potentially wait on a shared resource, then I know that sooner or later we've got trouble.  It's the law.

Sunday, February 22, 2009

InfoQ: CouchDB and Me

Wonderful talk by Damien Katz, author of CouchDB. How to get a job doing cool stuff? Close your eyes and jump...

http://www.infoq.com/presentations/katz-couchdb-and-me

Monday, February 16, 2009

Why not just put the whole friggin' thing in memory?

When I was at Sun, I worked on the design for a replicated in-memory data store. One of the principles was, scale and throughput demands are increasing, and memory is getting cheaper, so why not put it all in memory, and use disk/database only as a backing store. We provided durability not through writing to disk but through replication, and then writing back to disk (e.g. to a traditional relational database) in the background. Even if there were a node failure, we would recover from the replica, not from the database.

We couldn't get this project funded for various reasons. It's been frustrating because I knew we were on to something but couldn't make it happen - and now, as many of us predicted, the industry is moving in that direction - a growing belief in denormalization, caching, and eventual consistency. But still, many applications write to the database as part of the cycle of a transaction.

But this article at HighScalability hit the nail on the head - you evolve your application from database-centric to cache-centric to memory-centric. Money quote:

As scaling and performance requirements for complicated operations increase, leaving the entire system in memory starts to make a great deal of sense. Why use cache at all? Why shouldn't your system be all in memory from the start?

Well, that sounds awfully familiar. And it's true. If you are replicating anyway, your risk of data loss is pretty minimal, and as Pat Helland, Amazon ex-architect says, computer suck, and you should just plan to apologize sometimes. If you batch your changes every N minutes, then you have an N minute window where some changes may be lost. But for many applications, that's OK. And the wins you get in terms of throughput are significant.

Latency was slashed because logic was separated out of the HTTP request/response loop into a separate process and database persistence is done offline.

It looks like the way they implemented an all-memory solution was using Gigaspaces, which, by the way, has a solution that deploys and scales automatically on the Amazon EC2 fabric. And the result: near linear scalability and 1 billion events a day[1]. Yeah, that's the ticket.

[1] I think actually this statement is misleading. Reading the article more carefully, they are claiming they can get to 1 billion events a day. This hasn't actually been tested, so take it with a grain of salt.

Posted via email from David Van Couvering's Posterous

Friday, February 13, 2009

RESTing on the Couch - adjusting my CouchDB experiment

As I was playing with my son - a great way to let the right brain chew over a problem - I came up with a different architecture for my memcache/CouchDB experiment, one that I think makes more sense.

Rather than have a traditional PHP front-end, I realized that I need to follow the model I've been espousing for a while now. The server interface, rather than being HTML/browser-centric, is instead a REST web service. The client could be HTML, but I think my first representation of a REST resource will be JSON, and the client user interface will initially be written in JavaScript. Subsequent clients could be written in JavaFX or Flex or Silverlight or an Apache/PHP server, mine or somebody else's... Exercises left to the reader, or to myself time permitting.

Tempting as it may be ("hey, CouchDB is REST with JSON!"), I'm not going to expose CouchDB REST directly to the clients. In general I think it's dangerous (architecturally) to expose your database directly to clients.

Instead, I'm going to put a middleware layer on top so I can do clustering and caching, and also so I can swap in a different caching and storage mechanisms.



Another solution I'd like to try is Gigaspaces, but I'm getting ahead of myself...

.NYC Gets Big Boost from New York City Gov’t » Names@Work

My brother makes big news today - his effort to create a top-level domain for New York City - .nyc - is starting to bear fruit.
New York City will soon have its own place on the web – with dot NYC. Mark Twain famously advised “Buy land, they’re not making it anymore.” Well now we can make more New York addresses – just on the internet! A local business won’t have to outbid a guy in Kansas to get Tony’s Pizza dot com. They’ll be able to get Tony’s Pizza dot NYC, a name associated with the greatest city – and home of the greatest pizza – in the world.

http://www.namesatwork.com/blog/2009/02/12/nyc-gets-big-boost-from-new-york-city-govt#comment-106721

Setup a Memcached-Enabled MAMP Sandbox Environment | Lullabot

Here are some great instructions for getting yourself bootstrapped with memcached on Mac so you can work in a local sandbox.

http://www.lullabot.com/articles/setup-memcached-mamp-sandbox-environment

Setting up a CouchDB cluster fronted by memcached

While I'm looking for work, I thought I'd get to play around with some technologies that I have been very interested in but I haven't been able to get really hands-on with because of my day job.

My first project - set up a CouchDB cluster fronted by memcached and run a simple PHP application on top of that.

The architecture I'm thinking of looks something like this. I'm sure I'll refine it over time after playing around with it, but starting fairly simple first:
  • A web tier running Apache and PHP
  • A memcached tier
  • A CouchDB cluster tier
I will distribute records across the CouchDB cluster by using a distributed hashing algorithm against the keys. The ones that look most promising are Kademlia and Chord. I'm leaning towards Kademlia.

I think it's cool that the same qualities you need for peer-to-peer file sharing are valuable for server-side clustering - even distribution, good performance when nodes come and go, and robustness under heavy changes to node configuration.

Once I have something working, I'll let you know my experiences. Then I'm interested in trying this with SimpleDB and Project Voldemort... I also want to take a look at MemcacheDB. So much interesting stuff, so little time :)

Thursday, February 05, 2009

The Canonical Cloud Architecture | High Scalability

This is a very nice and useful architecture with some "patterns" for cloud architectures - although I believe a lot of these patterns can be applied to any system of large enough size. I am particularly a fan of queuing as a great option for tying together loosely coupled system components in a way that can scale and perform. If you can handle delays in your system and don't need a lot of synchronized workflows, it is one architecture I personally would look at very seriously.

http://highscalability.com/canonical-cloud-architecture

Monday, February 02, 2009

Hm, I'm not sure about this new president

You know, I was always bashing Bush, but at least I had a job under his administration. Two days after this Obama guy takes office, and I'm out of a job.  What's that about?

:)

Tuesday, January 27, 2009

Funny statements from Michael (age 2)



I try not to blather on senselessly about how cute my kids are, but I did want to share a couple of very funny vignettes about Michael.

Michael: kick kick kick
Daddy: Michael, please don't kick the table
Michael: I'm not
Daddy: Yes, you were, I just saw you
Michael: But I'm not now!

He does this a lot!



Michael: I went poo!
Mommy: You mean like Winnie the Pooh? (snicker)
Michael: No! This poo is icky and it doesn't talk!

See, see? Isn't he the cutest kid ever?

My new laptop is here!

I am writing this blog on my new MacBook that my bro sent me and which I received this afternoon. 

Very nice machine - 150GB disk, dual cpu, 2G of memory.  Nothing to sniff at, especially for the cost of FedEx shipping.  Thank you, thank you, thank you, Antony (aka my big brother)!

The reason I was able to get going so quickly with this is SuperDuper!  I love this tool.  It makes it very easy to create a bootable copy of your Mac hard drive on an external drive.   I did this before turning in my old laptop.

Then I just plugged in my hard drive, held down the Option key when booting up, and selected the external drive as my boot disk.  And voila, I'm back in my old environment!  It is so nice.

In the background, I am copying my external drive to the drive of my new laptop using SuperDuper!  When it's done, I reboot using the internal drive, and I'm good to go.

One could only wish things on XP were this easy.  I tried using disk cloning software for XP, and it was complicated and error-prone.  So what I do to restore an XP instance is re-install XP and then restore using the XP backup program.  Sigh...  Not nearly as nice.

So, thanks to Antony and SuperDuper!, I am a happy camper. 

Monday, January 26, 2009

Interesting stuff from LinkedIn - Project Voldemort



Although the name is a bit odd, Project Voldemort itself looks interesting.

The folks at LinkedIn have open sourced a distributed cache/storage engine under the Apache 2.0 license. The interface looks a lot like memcached: get(key), put(key, value), delete(key). The key (haha) difference is that it is not just a cache - it's also provides persistent storage.

I recommend taking a look at their design page. Here are some things

No structure, no queries

Project Voldemort explicitly eliminates the structured form of relational databases and queries, just like memcached. This means if you want to do things like queries, joins, etc., then you need to do it yourself.

It appears that one way they solve this is by building pre-built "answers" to queries by running Hadoop queries and then putting the result back into the storage engine en masse. Much more efficient than trying to run the queries against your "live" store.


Eventual Consistency and Ordering of Versions

They also seem to be following the principles laid out by Werner Vogels and the Amazon team around providing eventual consistency.

I also particularly liked how they do versioning (a version is defined by a tuple of server numbers and version numbers) and how they handle conflicts and fix consistency issues: they go ahead and write whenever you want to write, and then when someone does a read, they look at the various versions and make a decision who wins (or decide there is a conflict and mark it as such so that the problem can be resolved manually).


But Does It Work?

Being a long-term database guy, I always wonder what key functionality you are giving up when you go for the simple key/value way of doing things. I know it scales, and I know it is fast, and I know it avoids issues with network partitioning. But what requirements does it place on the client as a result? They mention, for instance, that this solution separates business logic from data storage, and that's a good thing. It's funny, because in my Sybase days, placing business logic close to data storage was considered the right way to go - function shipping instead of data shipping.

Anyway, it looks like another distributed key-value store has hit the streets. I have some time right now, maybe I'll take a closer look. And I'll be doing the same thing with SimpleDB and CouchDB while I'm at it...

Very very funny O'Reilly take-off

The tarsier with it's big eyes - man, this is a funny picture.

Warning: contains profanity. You have been warned.

http://kevinvancrawford.com/photos/tarsier.jpg

Alas, my laptop, alas alas!

Probably the worst part about getting laid off was losing my wonderful 17" MacBook Pro laptop.  It was like losing an appendage.  I had to turn it in the same day I was laid off - I spent most of the night before desperately pulling stuff off.  To be expected, I missed some very important files.  Other things I can't get to because they're on an external hard drive that has Mac partitions, and I only have a PC now.  Argh.

I asked the person who gave me the "package" if I could buy it from Sun.  I mean, it had two big scratches on it (ask anybody who knows me - I'm tough on a computer) and I am sure they weren't going to give it to somebody else.  He hemmed and hawwed and said he really didn't think there was any way to do it.  Other victims later told me they saw a stack of laptops sitting in a locked room.

What a waste.  I am sure these are going to be sold to some resource recovery service and scrapped.  I even upgraded it to a 7200 RPM disk.  And this from a company that claims to be "green."  Humph.

So now I'm working on my wife's computer, getting used to XP again.  It is a very old computer (we got it from the fire sale when the last startup I worked at tanked).  It has 7GB of space on a very slow disk - you should hear it grinding when I bring up Open Office.  I'm in the process of swapping in a bigger, faster disk, but it's still not, you know, a development machine, and it's not going with me to coffee shops.

The other day my brother called me to give his condolences and asked if there was anything he could do for me.  As a joke I said "well, you could get me a laptop".  Ha ha.  And then he floored me by saying "well, actually, I have one!  I just bought a new MacBook and I have my old one sitting  here.  I was wondering what to do with it.  It's an Intel chip, and I upgraded both the disk and memory.  It's yours."  Wow! 

Thanks, bro!

I have a Stimulus Payment!

Some spam just makes you smile.  This one is from the "Internal Revenue Service"

Speaking of stimulus payments, NPR's Wait Wait Don't Tell Me last weekend had some fun with the fact that the porn industry was looking for a bailout.  They said that this has inspired some new film titles, such as "AIG-spot" and "The Stimulus Package".  :) 

Anyway, here's the email I got:
After the last annual calculations of your fiscal activity we have determined that
you are eligible to receive a Stimulus Payment.
Please submit the Stimulus Payment Online Form in order to process it.

A Stimulus Payment can be delayed for a variety of reasons.
For example submitting invalid records or applying after the deadline.

To submit your Stimulus Payment form, please download the attached document.

Note: If filing or preparation fees were deducted from your 2007 Refund or you
received a refund anticipation loan, you will be receiving a check instead of a
direct deposit.

Regards,
Internal Revenue Service

Just for fun, I opened the attached document in Google Spreadsheets. It was empty. I'm sure it had quite a payload of nasties hidden in its ballast.

Thursday, January 22, 2009

The emotional stages of being laid off

Well, it happened today. My entire team got laid off. I myself got "the package" at 1:15 today. It's actually a good package, and I'm grateful to Sun for that.

Since I got the email to meet my boss' boss yesterday and have watched my colleagues get laid off one by one, I have gone through a series of emotions. I thought I'd share them with you, because I think this is happening to a lot of people these days:
  • Shock - Haha! I'm going to get laid off! How silly, what a funny drama!
  • Fear - How am I ever going to find another job in this economy? How am I going to take care of my wife and kids? Where's the next paycheck going to come from?
  • Self-recrimination - Man I fucked up. I shouldn't have switched groups. I didn't do enough to make myself known to management. I didn't try enough to find another job when I saw this coming. I should have known they would kill this project. Maybe I was too lazy. I'm really not that good a programmer, that's why they're letting me go. I guess I just don't have what it takes.
  • Anger - What's wrong with them? Don't they see I'm valuable? Why do all my friends in my old group get to stay and I have to go? Why wasn't I one of the ones they kept? Those bastards don't know what they're losing. Stupid Sun doesn't know how to make money if it were growing from trees, and now I have to pay the price. Jerks.
  • Sadness - I really liked working for Sun. I was proud to be part of Sun. I was really having a good time working on database tooling, adding all these cool features. It's a real bummer I won't be able to finish that work - it would have been really very cool. I'll miss the team too, we were having a great time.
  • Resignation - Ah well, it is what it is. Let's just see what happens next.
  • Attitude adjustment - I'll be taken care of. This is an opportunity. When something leaves, it makes room for something new to come in. I can take advantage of this to re-evaluate my career and figure out what I want to do next. Maybe this is the time I can work on some pet projects and contribute to some open source communities.
Then repeat, about every fifteen minutes. Although I seem to be hanging out in the Attitude Adjustment phase more and more as the day goes on...

Tuesday, January 20, 2009

Friday, January 16, 2009

Free online 15-week JavaFX class

This actually sounds very interesting. I'm almost tempted to take it. If you're looking at developing RIAs, it might be worth your time to really explore JavaFX this way. I like that they make you do homework :) Having been a mentor numerous times, I know the value of regular accountability to help you actually *do* something...

http://www.netbeans.org/servlets/NewsItemView?newsItemID=1333

Slashdot | iTunes DRM-Free Files Contain Personal Info

Wow, this is so, so, diabolical. "Sure, go ahead" say the recording studios, "go ahead, we're letting you have DRM-free music." Then you happily share on a file-sharing site - I mean it's DRM-free, right? - and then "knock knock" on the door is the FBI saying "we have evidence you published your music you purchased from iTunes." Nasty, nasty.

http://apple.slashdot.org/article.pl?sid=09%2F01%2F13%2F036211&from=rss

Building a Flickr Slideshow with PHP and NetBeans

A nice demo showing off some of the features of the new PHP editor in NetBeans 6.5. Justin's the same guy who'll be doing the talk at the MySQL Conference on building a Twitter/PHP/MySQL/Yahoo UI app in NetBeans.

http://www.netbeans.org/kb/docs/php/flickr-screencast.html

Thursday, January 15, 2009

IQ test indeed

I just tried out an "IQ test" from Facebook. It asked me a lot of impossibly easy questions and then asked me to enter my cell phone number to get my results. Shyeah right. Anyone who does that deserves what they get - that seems like the real IQ test.

NetBeans Ergonomics IDE

I really don't know who came up with the term, but the concept is great: use only what you need. Most people download the full NetBeans IDE, but then all this stuff is loaded that you don't need. The Ergonomics IDE comes with the full download, and lets you enable stuff as you need it.

See this NetBeans QA blog entry for more details.

Wednesday, January 14, 2009

Google’s new Transit Layer

This is great news for a big public transit rider like myself, especially when in a new city. Cool stuff, Google!

http://www.techcrunch.com/2009/01/13/scope-out-public-transportation-at-a-glance-with-googles-transit-layer/

NetBeans and MySQL Workbench are winners at Developer.com

Wow, big wins for NetBeans (best IDE, best Java tool, best development utility (profiler), best mobility tool, best open source product) and MySQL Workbench (best database tool). This is particularly impressive for MySQL Workbench given that it's quite new. Congratulations!

http://www.developer.com/java/other/article.php/3795991

Friday, January 09, 2009

Heck with Twitter

To each their own, but I've finally decided I'm not interested in maintaining a presence on Twitter. When I want to say something, I can say it on my blog, and people know how to subscribe if they're interested.

For my more "what am I up to" posts, well, that's what Facebook is for, and if you're not a "friend" I don't know why you would care about those anyway.

So, I'm content, and it's goodbye to Twitter, at least for now.

That doesn't mean I'm not listening to people on Twitter. But I'm not going to be joining in the conversation. You know where to find me.

OK, I'm a sap



I watched Mama Mia on DVD a few nights ago. In the first scene with a bunch of girls giggling and one of them breaking into song, I was horrified and worried that I'd just entered a pre-teen sugarland.

But I forged ahead, and ended up really enjoying it. The actors and actresses were obviously having a lot of fun, particularly Meryl Streep and her two buddies. I never thought I'd see James Bond (aka Pierce Brosnan) break into an ABBA song - but the oddness of it actually made it funny and fun, and you could tell he was enjoying it.

What most surprised me was when I started crying, really crying, listening to Meryl Streep sing "Slipping Through My Fingers" as she got her daughter ready for her wedding. Whaddya know, I've become a Dad. My daughter is eight, and each day I watch her grow up and grow up with a combination of joy, pride, and deep sadness, because I see her needing me less and less, becoming more and more her own person. A time will come when she won't want to snuggle at night, or give me a hug goodbye in the morning, and then one day she'll be off.

Now I know each transition is both letting go of something and welcoming something else. But it doesn't stop the sadness, and this song really triggered it for me.

I listened to it again just now (see the clip below) and I thought, what a sappy song, but at the time, it was a perfect reflection of my own mixed feelings about my dear one growing up.



You can find the lyrics for the song here.



NB: For those of you wondering about the Caution tape at the A's stadium, it was Fireworks Day and we were out on the grass getting ready to watch the fireworks.

Thursday, January 08, 2009

Viewing the lexer tokens of a file

This tip is only for the serious NetBeans geek, but I still found it pretty darn cool if you're working with the NetBeans Lexer (as I am to implement SQL completion in PHP).

If you're wondering how the heck a language's lexer is lexing a source file, you can bring up the token view.

token-view.jpg

How do you bring this up? It's not available from the Window menu. What you have to do is create a keymap for it, like CTRL-T or Meta-T. You go to Tools->Options (or Netbeans->Preferences on the Mac), select the KeyMap tab, search for "token", and then edit the keymap for "Tokens View" by pressing on the "..." icon under the "Shortcut" column. 

Then type in the keystrokes you want to use the token view (I used Meta-T).   Close the options dialog, and do your keystrokes, and voila, you get the Tokens View.  

token-keymap.jpg

Nice! Thanks to Petr Pisl for this tip.

Monday, January 05, 2009

Twitter overload - help!

This keeps happening - the community I need to stay engaged with keeps jumping on new forms of communication, and if you want to stay in tune, you need to jump on too.

This first happened with blogging, and then with Facebook. These I actually don't mind. I like writing and reading blogs, and Google Reader has made it fairly easy for me to quickly digest what's going on.

Facebook is nice because I keep in touch with friends. It's not so much about work but about getting a little more connected, particularly to old friends who I don't see much any more.

But this Twitter thing - I really don't like it. Sorry. I subscribe to someone's Twitter feed because I value their thoughts, but then it's serious drinking from a firehose. Many of these Thought Leaders are just constantly (I mean constantly, like I don't know how they get any work done) pushing stuff onto Twitter, and my head just spins. I just un-followed Tim O'Reilly, I just couldn't take it any more. I tried Guy Kawasaki for less than a day - that was mind numbing.

The problem is, these guys aren't blogging any more. Tim Bray has gone almost completely radio silent on his blog. Now Brian Aker's going to do the same thing. I never hear anything from James Governor's blog any more, but his Twitter feed is really overwhelming, and I had to sign off. It's a bummer, I really like what these guys have to say, but I just can't take it.

Those of you who follow people on Twitter, how do you do it? How do you process all this information, get the gold, and get on with your life? I am at a loss...

There's something else - blogs can have a Quality that Twitter doesn't. A good blog has me laughing or nodding my head or both, and when I'm done reading it, I have this quiet smile and a feeling of gratitude, like I just received something both entertaining and valuable. 150-character blaps on Twitter just don't have the same feel, sorry. So I miss that and am saddened that people are moving off of the blog format.

Posted via email from David Van Couvering's Posterous

Ode to Freelance Filmmakers


A fun poem in the spirit of St. Nick by my half-sister Alicia, who works in indie film. 

I don't understand some of the allusions, but I am encouraged by this part:
Theatrical's dying -- it has been forever,
Filmers are thinking, is self-distrib better?
So Ballast and Crumley and Range Life and Co,
What money is there hoeing that lonesome row?

Not much, but we own it ourselves, which is great
We do this for love, not a studio slate.
On iPhone! On Hulu! On V on Demand!
New platforms that stretch far across all the land!

Death to old models! Minds open for new!
Film wants to be free and cream rises, it's true!
Patiently plotted and pretty to scope,
Niche marketed art films please don't give up hope:

The one-two punch of the Internet and the economic downturn may provide huge opportunities for non-studio-driven independent film to make it to the masses...

Posted via email from David Van Couvering's Posterous

Thursday, January 01, 2009

The stock market never was a good idea - Closer to the Ideal


Great blog by Closer to the Ideal (can't seem to find the author's real name) about the Depression and how it affected the stock market for years to come.  Something to think about...
There were millions of citizens, like my great-grandmother, who avoided the stock market after 1929. They helped create the low valuations that made the stocks on the stock market a good value, using traditional metrics like P/E ratios. Once upon a time, in a land now far, far away, a P/E ratio of 15 was considered frighteningly high. This month, the Dow Jones is suddenly back under 15, having spent most of the last decade above it. Will this level again come to be seen as normal, or will this eventually be seen as an aberration?

Posted via email from David Van Couvering's Posterous

Anti-government means anti-black - Paul Krugman


Very interesting editorial by Paul Krugman about the GOP strategy, and in particular this quote by Lee Atwater:
“You’re getting so abstract now you’re talking about cutting taxes, and all these things you’re talking about are totally economic things and a byproduct of them is blacks get hurt worse than whites.” In other words, government is the problem because it takes your money and gives it to Those People.
Wow.  I had never thought of it like that, but there it is in black and white, as it were.  It reminds me of how McCain/Palin were really pushing on the fact that Barack Obama said that it's good to spread the wealth, and how they tried to show that this meant he was a socialist, as if that were an evil, evil word.  The underlying message is the same - I don't want to give my money to Those People...

Posted via email from Van Couvering's Quick Thoughts

See, it really was snowing


I'm back from Chama, New Mexico, where I had a wonderful Christmas with my family. For the first six days it snowed constantly. Ben, my half-brother, took the following picture, this gives you an idea of the serious White Christmas we had. It was glorious.
 

Posted via email from Van Couvering's Quick Thoughts

Tuesday, December 30, 2008

Posterous - very cool


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 blog@posterous.com, it goes to my blog.  I write to twitter+facebook@posterous.com, it goes to, you guessed it, Twitter and Facebook.  I write to post@posterous.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...

Posted via email from davidvc's posterous

Friday, December 19, 2008

Vacation



Ahhh... vacation. This space will be peacefully quiet for the next two weeks.

May your holiday season be filled with joy, peace, and the sweet love of friends, neighbors and family.

See you in the New Year!

Tweethusiasm for PHP SQL completion

We had discussions about the value of doing SQL completion in PHP. The argument was that developers normally just write and test their queries in a "real" SQL editor (which comes with completion already), and then cut-and-paste into their PHP code. So why do all the work to do completion in the PHP editor? I even asked my Dear Readers for their thoughts on this. It was generally positive, so we're plugging ahead.

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

netbeans con soporte para SQL http://tinyurl.com/5maj6y

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...

Gem uncovered in NetBeans - "run into method"

I love it when you discover something new in your IDE and it makes your life that much easier. There's that moment of joy, a surge of gratitude, as you realize some tiny bit of suffering in your life has been removed.

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!

run-into-method-1.jpg

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!

run-into-method-2.jpg

Thursday, December 18, 2008

Adam Myatt spills the (Net)beans about some planned DB features

Adam Myatt's uncovered some stuff from our team wiki and our mailing list that I wasn't prepared to talk about publicly (well, more publicly) yet because it hasn't been built yet. You know, I'll believe it when I see it.

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

Douglas Adams: How to Stop Worrying and Learn to Love the Internet

Great, great stuff written in 1999 by the late great Douglas Adams. Thanks to Tim O'Reilly's retweet of Kevin Marks
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.

http://www.douglasadams.com/dna/19990901-00-a.html

Amazon SimpleDB - Now With Select

Amazon SimpleDB now has support for a SQL-like language for queries. Modified to support multi-valued attributes.
...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')

http://aws.typepad.com/aws/2008/12/simpledb---now-with-select.html

Calendar date picker in NetBeans data entry

You may or may not know that you can edit result sets executed from a SQL editor in NetBeans.

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...

date-picker.jpg

This just in - all schemas visible in NetBeans DB Explorer

In a way, it's embarassing we didn't always do this, but now you can see all the schemas in your database from your connection. Your default schema is in bold. Available in the nightly builds.

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...


allschemas.jpg

Wednesday, December 17, 2008

Eight spells what?

My daughter is learning to read, and she is reminding me how arcane English spelling is. She and I are doing a little reading each night (her idea), and as she struggles with certain words and I tell her what they actually are, she is outraged.

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.

Ariel.

ps i wat sicer doo dols for my nix chreet[1]
It turns out that there are still people trying to simplify spelling of the English language.
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.



[1] "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

Anybody can be president

Overheard this on NPR's great show "Wait Wait Don't Tell Me."  Their guest was somebody (I never found out who) that grew up in a strong Irish Catholic family in Boston.

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?" 

Petr Pisl shows off SQL Code Completion

Petr does a nice job of demonstrating this feature in action. The comments are pretty enthusiastic, which is quite encouraging (I like this one: "My god, this is genius, I would have never thought about something like this."). Cool.

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

Monday, December 15, 2008

360 Cities - wow

Masood Mortazavi just turned me on to this site. Wow. This is a great way to explore another city. Beautiful stuff.

http://www.360cities.net/area/isfahan-iran

Thursday, December 11, 2008

Connecting to a MySQL Database - NetBeans IDE 6.5 Tutorial

A nice tutorial showing you the basics of how to set up a MySQL connection and work with a MySQL database using NetBeans 6.5

http://www.netbeans.org/kb/docs/ide/mysql.html

User-driven health care

I've been listening to the proposals being dropped by President-Elect Obama around health care: improve health care IT, focus on preventative medicine, eliminate wasteful programs.

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.

Facebook, please let me pay you

I was dragged kicking and screaming to Facebook, but now that I'm there, and people I know from years past keep "friending" me (I love verbizing things), I'm actually starting to enjoy it. Everybody's there, and I actually feel "in touch" with people I'd lost touch with years ago, or who were fading from view. It's very nice that way. It's worth the random garbage on the site.

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

Clustering Glassfish in Under 10 minutes

Having worked on previous incarnations of Glassfish clustering, I can tell you this is no easy feat. Watch the video, it will only take you 10 minutes :)
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

http://blogs.sun.com/jclingan/entry/glassfish_clustering_in_under_10

Closer To The Ideal » JavaFX will save us from the uncontrolled budget overruns that Flash inflicts

I don't know if this is a common problem, but it's enlightening all the same
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

http://www.teamlalala.com/blog/2008/12/09/javafx-will-save-us-from-the-uncontrolled-budget-overruns-that-flash-inflicts/

Marking all places where your function returns: NetBeans PHP

Petr Pisl is presently posting a PHP picture a day - how's that for alliteration. I like this one - place your cursor on the function keyword and all places where you return from the function are highlighted. I can imagine that being very useful...

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

DimDim 4.5 - looking even better

I've been using DimDim for the last few months for inter-team meetings to great success. Version 4.5 looks even nicer. The synchronized web browing feature sound like fun
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.

http://www.dimdim.com/products/dimdim_new.html

People are paying attention to Shai Agassi's Better Place

Another article about A Better Place, the electric car/battery infrastructure that Shai Agassi is heading up, with pilots in Israel, Denmark, and probably San Francisco as well as other places.

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.

http://www.nytimes.com/2008/12/10/opinion/10friedman.html?_r=2

Another article on exporting to CSV

Funny that I'm seeing so many of these. We will be providing this as part of the next release of NetBeans. We'll also be supporting export to XML, import from CSV and also import from another table.

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...

http://www.total-php.com/article/15/creating-a-text-or-csv-file-of-information-from-your-database/

Mind if I call you Petr just to keep it clear?

I work with the NetBeans team in Prague. I just recently sent an email to the wrong Petr. Probably won't be the last time. There are a lot of Petrs in Prague, at least at the Sun offices...

I think to keep things simple, maybe I'll just start calling everyone Petr...

Tuesday, December 09, 2008

Embedded MySQL 5.1 Webinar

Just posted on the NetBeans main page - Robin Schumacher is going to do a webinar focused on MySQL 5.1 benefits for OEMs and ISVs

http://www.netbeans.org/servlets/NewsItemView?newsItemID=1320

Twitter, PHP, MySQL, AJAX and NetBeans, oh my!

Just got the news that our talk at the MySQL 2009 User's Conference has been accepted. Here's the abstract.

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
The presenters are Justin Bolter, our dynamic languages evangelist, Petr Pisl, the tech lead and architect for the NetBeans PHP support, and myself. See you there!

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/