Hello, this is Jan Lehnardt and you're visiting my blog. Thanks for stopping by.
plok — It reads like a blog, but it sounds harder!
[Update 07/01/2011: Submitted Keyboard Cleaner to the Mac App Store, pending review.
[Update 07/06/2008: Updated FaQ about non-black Screen.
[Update 11/02/2007: Keyboard Cleaner works on MacOS X 10.5 Leopard.]
[Update 12/30/2006: Added Macworld Info and a Donation Button.]
[Update 12/20/2006: Added a small FaQ based on feedback.]
I created Keyboard Cleaner. It comes in handy when you want to clean your keyboard, but you are afraid you might trigger a command or change or delete some of your current work beyond repair and undo. Of course you could save and close everything. Sometimes however, it is just not what you want.
Enter Keyboard Cleaner. It shields your desktop and intercepts every keystroke you might accidentally make — except for Command-Q.
Needless to say that this was an educational project for me. While trying to create something like Visor for iTerm about a year ago I needed to figure out how to make a fading window without delving into Quarz Graphics too deeply.
Q: What the…? Just unplug your keyboard and be done with it, jerk.
A: Yeah, I tried that with my trusty 12” PowerBook, but launching Keyboard Cleaner is easier than getting off F2 and F11 and unscrewing those screwy screws.
Q: So sad that you can’t turn off your Mac once in a while.
A: Sometimes you are just in the middle of something and don’t have the patience to close all them applications. Still, this nasty [something] needs to get off your keyboard now.
Q: My cat walks over my keyboard when I leave the room. Can I use Keyboard Cleaner to secure my work from being juggled randomly without actually cleaning the keyboard?
A: Sure thing, Keyboard Cleaner was built with cat-friendlyness in mind. But remember what you could miss.
Q: Can you make it that Keyboard Cleaner doesn’t black out the screen so I can still see what is going on but the Keyboard is disabled?
Hey, no. At least not so easy. I can remove the black shield, but then you’d see a frozen image of your desktop at the moment you launched Keyboard Cleaner. Not too useful. I’ll try to come up with other ways, until then, sorry :-)
We had speakers and attendees travelling as far as from New York to attend. About 80 people were attending in the standing-room-only newthinking Store. Thanks all for showing up!
For the benefit of the growing NoSQL community, we’re publishing videos of all talks along with their slides under the Creative Commons Attribution 3.0 License.
The feedback and responses for NoSQL Berlin were overwhelming. We’re planning a bigger follow-up event in spring 2010.
This post has been sitting nearly as-is in drafts mode since May 2008. Today is a good day to publish it. It is about how I think software is changing to the better across the board.
The other day I got into an argument with Damien about how the perception of products changes.
My basic thesis is that with a user-centred product, say, the iPhone, the Enterprise will eventually have to adapt it, because the people that make up the Enterprise will all use the product, despite its lack of enterprise-friendliness (which is no longer as true for the iPhone as it’s been last year).
A user-centred product is something that is designed starting from the user, not the business goals of the company that makes the product or the underlying database technology.
The Enterprise in this case is some organisation that creates a framework for people to work on specific goals. These goals could be very different, take something like IBM as an example. The corporate frameworks need to be reasonably flexible to support all sorts of different goals.
At the same time, the Enterprise tries to maximise cost-effectiveness. Tying everyone to the same hard- and software, because it is cheaper to buy en masse, easier to maintain en masse and easier to teach en masse.
The fundamental problem of the Enterprise is, the users of a specific product have no, or only very little say in what they are going to be using on a daily basis. Committees, with no idea about how a certain bad designed product can affect the individual’s productivity and thus the productivity of the Enterprise, decide what to buy for everybody. And this decision is based on entirely incomplete experiences.
Do you know how to use all the time saving features of your Cisco VoIP deskphone?
Now Damien thinks I am a bit naïve here. The Enterprise will always decide on factors they can measure such as support and maintenance cost and I am sure they will try hard to keep it that way, but I strongly believe that this changes. And it will continue to change to a situation where the deciders realise they operate on insufficient data and let those who are directly affected have an opinion and a voice.
Why do I believe that? Because, only in the recent years, the focus of product development has changed towards creating stress-free tools, easy-to-understand machines, electronic gadgets for everyone. People start to expect things that actually just work and not get in their way. The iPhone is only one example. The Flip video camera is another. The entire business of 37signals is based on caring for the user and not catering the Enterprise.
I think that eventually, this kind of thinking arrives at the deciding committees and they will realise that the Enterprise is best helped with employees that don’t have to deal with utter crap when they are trying to do their job.
I say eventually, it will take some time, maybe decades. And there will always be the
badbig corporations that do not care for the individual and there will always be bad decisions about what to buy and there will always be crap that salespeople shovel to enterprise customers.
But the acceptance for all this will decline and the expectancy for proper, easy to use products will grow.
From #couchdb on Freenode:
balint: so my presentation at the Hungarian Web Conf. is tomorrow and I am sure people would like to see something about performance
balint: (I know, I know: http://jan.prima.de/plok/archives/176-Caveats-of-Evaluating-Databases.html)
balint: it would be great to explain what CouchDB excels in (I guess retrieving by key from views is one area, scalability is another)
jan____: balint: CouchDB makes everything appear easy on the outside. Development in couchdb is easy, because of the schema free nature and the HTTP interface.
jan____: processing lots of data is easy with views. not breaking your server is easy with show and list functions
jan____: backups & failover are easy with replication
jan____: scaling is easy with HTTP, replication & views again
jan____: operation is easy because CouchDB consists of few, well defined parts. if it fails, you know why and where and what to do
jan____: and it is easy to keep your data safe, the storage engine is extremely robust.
There is a bit of a controversy if “NoSQL” is the best marketing term for the new generation of non-relational databases. Without summing up all the (valid) points and positions, I’d like to quote myself:
I think “NoSQL” is here to stay. It is short, concise and controversial enough to get people to notice. The mere fact that people object means we’re onto something. I don’t think a scientifically correct title (if that can be found at all) buys us anything.
Long live NoSQL!
Slides (PDF, 1.6MB)
Good morning, thanks Carla for the introduction. I hope you’re all awake and reasonably caffeinated. First and foremost, thanks for inviting me here, I’m excited you’re interested what I might be talking about.
My name is Jan Lehnardt, I’m a hacker. I make software for fun and profit. I also like to be my own boss, that’s why I put “Entrepreneur” on the slide. I come from The Web. From the traditional computer science perspective The Web is often looked down upon, not taken seriously. After all, it’s just a bunch of HTML pages and people looking at them. This is not hard science is it?
The Web is big. The money put onto solving problems is significant and the problems that come with scale are significant. If you today, in 2009, still look down on The Web as a toy, you might want to reconsider. I’ll come back to The Web in a bit.
Finally, I’m a huge fan of Open Source. Earlier this year I was stuck…well, not “stuck”…I was working on a commercial closed source project for about four weeks. Over the weeks I got grumpier and grumpier, but I couldn’t put my finger on why that happened. When the project was done I got back to work on an Open Source project again. I committed some patches, got feedback, committed some patches from others, got feedback again and while going through all the interaction with smart, fun people, I got happy again. Turns out, working in an Open Source environment makes me happy. This was a personal revelation – although not a surprising one.
There’s a few things I am not: working in the telco industry. Show of hands, who is or has been working in telco (bunch of hands). I’m not a researcher, who here is a researcher? (bunch more). Finally, I’m not an Erlang expert, who here is (come on folks, this is a show of hands-heavy presentation, bunch of hands). Big question: what the hell am I doing here when I’m not one of these and together all of you are?
Who here as seen this logo? (shows CouchDB couch logo without title, 2/3 hands), Who has heard of this name (reveals title, “Apache CouchDB”, all, no surprise, the proceeding list my affiliation as CouchDB). Great! I work on CouchDB. This presentation is about how CouchDB came to be, what some of the important points in its development were and where we are now. I’ll round up with a look at the future, well no, that sounds too fancy, I’ll show a few things I’d like to see in the future.
From the CouchDB website on couchdb.org: “CouchDB is a distributed, fault-tolerant, highly concurrent database…” and there’s a bunch more. The typical reaction of an Erlang person is “Why did they reinvent mnesia?”. To answer that, I have to go back in time a little and explore how CouchDB came to be (cue piano fairy-tale music).
This is Damien Katz, CouchDB’s inventor. He’s the chief architect, lead developer and project lead of CouchDB. There’s a team working on it now, but he’s still in a central position. He sat out to work “something cool”. In his situation he couldn’t see how a regular employment (he was with IBM previously) would allow him to do that. The conclusion is simple: quit, move to a place that’s cheaper to live in than the Boston area and live off your savings while figuring out what “cool stuff” means to you. So that’s what he did. The full story is captured in a video.
Initially he wanted to write a distributed file system for Windows. The reasons are simple. Everybody is using Windows and a distributed file system is a a hot piece of tech. When he started reading the documentation on how to write file systems for Windows he could easily estimate that it would take him about a year to read all the docs. It is super-complicated, there’s a lot of cruft and entirely unworkable for a single person. There’s a reason why nobody is writing file systems for Windows.
Damien reconsidered and settled on a distributed database called “Couch”. “Cluster Of Unreliable Commodity Hardware”. It doesn’t really say what CouchDB does, but it sounds good! The idea that was partly revolutionary at the time (2004) was the Google model of moving to massive amounts of cheap machines instead of buying bigger and bigger machines. Key to the strategy is parallelizing computations in order to cope with the massive amount of data they shove around. Back in the day, this was a new thing, today, everybody is doing it.
Damien published a set of design goals for CouchDB and chief among them was reliability. It is a [fucking] database, it should take care of your data in a reliable way. He set out to start writing a robust storage engine, a query engine and -language called “Fabric”. It was all written in C++ and single threaded. You might guess where this is getting at.
He then set out to “add concurrency”. Being a versed C++ developer having worked on the core of an industry strength database system for years he knew: with the reliability goals he set out for CouchDB, there’s no way he could write a concurrent C++ engine around his single threaded parts. Bare in mind that this is still a one-man show, he might be able to do this in a five year time frame, but that wasn’t really an option. He proved to be able solve impossible programming tasks in the past, but experience now told him: no way.
He went on The Web, researching concurrency more generally and on the programming blog Lambda the Ultimate he found Erlang. Who here is reading LTU? Go, do it!
Damien started evaluating Erlang for CouchDB, reading code, and documentation as much as he could to learn about the concurrency model. Coming from C++ and knowing about Java he was intrigued by process isolation, per-process stack and garbage collection. After a week he concluded:
Erlang so far seems to be a great fit for Couch. It seems like it will support all of my design goals and save me lots of development time compared to Java or C++.
So Erlang it was and in the course of about six weeks, he rewrote most of the CouchDB core in Erlang. That was in 2004.
He started releasing early versions of CouchDB and people started noticing it. That’s how I found it in 2006. I looked at it and liked it, helped with the Unix and Mac OS X ports and then stuck around, IMing with Damien regularly. In 2007 I started giving presentations and one of the topics I happen to know lots about was CouchDB, so I started at a local PHP user group. They liked my talk and blogged about it (The Web at work) and I got invited to Zurich to talk again. Then I applied for conferences and quickly, the word got around that CouchDB is worth a look. I’m not claiming all of CouchDB’s publicity, but in hindsight, I had an impact :)
In 2008 CouchDB becomes Apache CouchDB, IBM hires Damien to work on CouchDB in the process and CouchDB suddenly got a lot more validity. If you download a database from some guy’s blog, will it be there next week? An Apache project has a certain level of maturity and project stability that saves users a lot of headaches.
CouchDB is also simple: all of the core database is about 15,000 lines of code. This is very little code! Of course Erlang, like any functional language, creates compact code. Nonetheless, this means for easier development, predictability and fewer bugs.
We’re in the process of releasing CouchDB 0.10.0, our first beta release. Earlier releases were traditionally called “alpha” because we didn’t have all the features in that we want for 1.0, but the features we had were already pretty stable. Versions are as early 0.7 have been used in production since late 2007 successfully.
Today we have nine people committing new code and patches into CouchDB, four of them working on CouchDB-related things full time. Even though I’m not actually coding right now while giving this presentation, I consider this CouchDB work. Two of the committers work at least part-time on CouchDB things. We have over 100 production installations, small and big. And the CouchDB community is just amazing, the developers, users, helpers, everybody is really friendly, very energetic and enthusiastic. The community is a a great deal responsible for CouchDB being so much fun to work on.
There are three books being written (well, actually there are two, the one is on hold as long as I speak here). If you get any book, get the O’Reilly one. It is open source and you can read it now or buy a printed copy. The others are worth looking at, too. There’s professional training, consulting & support available. We had our own conference tracks at the two Erlang Factories this year. And we know about a handful of funded start ups who use CouchDB in their core infrastructure.
A lot of big industry players are looking at, testing or are already using CouchDB. The BBC has a massively scalable, fault tolerant, multi-data centre key-value store built on CouchDB for example. The big thing coming up in October is the inclusion of CouchDB into the Ubuntu Linux distribution. Why is this a big thing? CouchDB is not just simply a package that people can install, or is even installed by default, but Ubuntu will ship with a system service for synchronizing personal data. Personal data could be your address book or bookmark collection. Why would you want to sync this data? You might have two or more computers, a laptop and desktop machine and it’s nice to be able to keep both in sync. In addition, Canonical, the makers of Ubuntu, offer a hosted service where individuals and companies keep an online backup of their personal data.
ZDNet estimates about 13 Million Ubuntu users world wide. At least. With the next release, these will be 13 Million CouchDB users. We’re preparing to get a whole lot more bug reports then. While these users don’t necessarily see that Erlang is at work, they very likely see some of the error messages and stack traces, so be prepared, too!
This short video shows a Firefox plugin that Canonical developed that stores Firefox bookmarks in CouchDB. This demo is also using Firefox to show the contents of the bookmarks database through CouchDB’s administration interface Futon. See how the bookmark “CouchDB” also shows up in the CouchDB document in the content area. When the CouchDB value gets changed, Firefox immediately reflects the changes.
What looks like a simple demo is a big deal. Canonical is pushing for a universal data synchronization infrastructure built on CouchDB replication, but not tied to CouchDB necessarily and open for other platforms and operating systems.
All of the above is pretty amazing (if you ask me). We couldn’t have done any of that without Erlang. Damien, building the foundations, the rest of the team, quickly being able to help with the implementation, the robustness, the concurrency and reliability, all these and many more factors helped to make CouchDB what it is today.
To everyone who is working or has worked on Erlang, everybody who is or has been participating in the Erlang community:
Some time to breathe.
Next I want to frame CouchDB, where does it fit in with the rest of the world. Did anyone hear about the “NoSQL movement” or about “postrelational databases”? Not so many, okay. When I started out explaining CouchDB to other people and my pitch began “CouchDB is a non-relational database that…” I got odd looks “non-relational”? What do you mean, a “database” is a “relational database” so CouchDB is not a database! I had to explain that a database in general is concerned with storing and retrieving data and then RDBMS are just one way to do that.
Now we have rich ecosystem of specialized non-relational databases, a good bunch of them in Erlang (Riak, Dynomite, supposedly SimpleDB, Scalaris). They are all different solutions to some aspects of the wide spectrum of data storage and the lesson you should take away from NoSQL is that you should evaluate and find the right solution for your problem instead of blindly choosing one system.
To seasoned Erlang programmers this may be old news, you’ve been using mnesia for ages and it is not a relational database. In The Web and other industries, this is a big deal.
What makes CouchDB special among these: Replication. Beside Lotus Notes which is a large influence for CouchDB, no other system has an as robust replication system as CouchDB. Using replication for synching personal data is one use-case as you’ve seen with the Ubuntu case. But it is equally well suited to built distributed, highly available clusters of CouchDB nodes like the BBC is using it.
Taking this to its logical conclusion, we’d like to see CouchDB or something that supports CouchDB replication on any device that contains data that needs to be shared in some way. Replication gives your applications data locality that leads to much richer user experience than the poll for changes model of The Web. Replication can be optimized for throughput, not latency, since individual requests are on local data it doesn’t matter if replication before that took five minutes over your mobile connection while you were shopping. Now that you are standing in the queue, all your data is locally available on your mobile when you want it.
I said earlier, all this wouldn’t be possible without Erlang. We’re committed to the platform and we’re happy the community is as welcoming as it is.
I’d like to take this opportunity to start a discussion. As good as Erlang is technologically, a few things are worrying and while I understand most of the reasons for the status quo and the issues with changing the same, I’d like to push into a direction of change.
ENTER MY HUGE DISCLAIMER! We’re benefiting greatly from all the things you are working on and I don’t mean to piss anyone off. By no means!
Got it? Okay, here it goes:
Of course, the source code is available, but Open Source is no longer about that alone. In a (not so recent) survey among enterprises using Open Source technologies about the reasons why they were doing so revealed that the number one reason for adoption is the lack of a vendor lock-in. Other reasons like open code, transparent development, more stable code, more secure code and less total cost of ownership matter, but by a large margin the vendor lock-in was most significant result. Enterprises have been fucked over by Microsoft, IBM, Sun and all the others for too long.
Erlang is exclusively developed by Ericsson and Erlang’s development is largely driven by the demands of Ericsson’s commercial customers. Kenneth Lundin (waves to Kenneth in the first row) & team have been very responsive to community requests for a closed-development company, but for a true Open Source project it is not enough. Roadmap and development are not transparent. Development is not transparent. If I work on a fix for a current release I don’t know if that problem has been fixed in the development version already, I don’t even know if the surrounding code still looks the same.
Most importantly though: the future of Erlang is in the hands of Ericsson. While they have a track record of getting it right for their customers and Open Source users with little friction, I only see friction increasing in the future. My company couch.io has been approached by venture capitalists with the interest of giving us funding money. When they discovered that our technological foundation is in the hand of a single company and that this company is not even focussing its efforts in the same areas we do, we have a hard time explaining why we still want to use Erlang despite the superior technology. This is a problem for major adoption of Erlang.
I hope I didn’t offend anyone. At the same time I hope to get the ball rolling towards a true, modern Open Source Erlang. The Erlang and the CouchDB community are more disjoint than it is true for other Erlang based projects and there is a gap that I’d like to see closed in the future.
The 13 Million users we hope to see soon are just the beginning of a big world of people who haven’t benefited from CouchDB or Erlang yet. I see bright future for all of us and them if we play our cards right…
…let’s go and get ‘em!
Snow Leopard’s Terminal.app comes with a new feature: focus follows mouse. Many people have asked for it, I guess, but I don’t like it. Or maybe it’s the half-baked implementation that annoys me. Or I am too lazy to change habits: I frequently switch between Terminal and Safari using
cmd-tab and when I want a new Safari tab
cmd-t and my curser is hovering over a Terminal window I get a new tab in Terminal. For me that’s a fail.
Googling didn’t bring up anything, so I asked the mighty Lazytwitter:
How can I turn off Snow Leopards retarded focus follows Terminal window unfeature? #lazytwitter
@janl Close Terminal.app and do ‘defaults write com.apple.Terminal FocusFollowsMouse -string NO’ — that should do the trick…
Feedback on twitter suggests that this is only enabled on Upgrade installs and not clean installs of Snow Leopard, but I don’t really know.