الأحد، 21 ديسمبر 2008

The future of Ajax

GUI layout in Ajax goes like this: You are fine as long as long as you have absolute values (“this sidebar is 300 pixels wide” etc.), but when it comes to relative sizing (“I want the toolbar to be as small as possible and the content to take up the remaining space”) one is in for a world of pain. After having spent way too much time in that world recently, I wondered when web browsers are finally going to implement better layout features. After all, this problem has been largely solved (really nice layout managers for Java are JGoodies Forms and MiG Layout). Here is what I found:
  • The OpenAjax Alliance has voted on a browser wishlist that includes a lot of interesting details. This wishlist is supposed to guide browser vendors towards features that make sense for the Ajax community. Not suprisingly, layout issues rank high on that list.
  • The Future of CSS and the end of 3.0: This article is almost one and a half years old, but it still rings very true to me.
  • XUL is a Firefox-based widget toolkit that can be programmed in JavaScript. It avoids many of the Ajax CSS problems, because it has specifically been designed for applications (and not for hypertext). Firefox-only, but it should not feel alien to Ajax developers because it does not stray to far from browser technologies. While some test code for using XUL via GWT is out there, I wish there was something more usable.
Update 2008-03-16: The browser wishlist entry “Better UI Layout” links to a css-flexbox proposal that borrows layout ideas from XUL.

الأربعاء، 10 ديسمبر 2008

Switching to Mercurial

So far, I've stuck with CVS, with occasional excursions to SVN. Both CVS and SVN are centralized version control systems. But I like the idea of distributed version control systems (DVCS) and it seems that the SVN developers agree. With a DVCS, everything is a repository. You don't have a working copy that you check out, you have a local repository that is cloned from another one. Changes are always pushed from one repository to another one. This means that you can use any number of intermediate repositories with the following advantages:
  • Offline use: You can check in and have the complete history even when you are not connected.
  • Branches: If you have something that is not yet finished (say, when moving from your work computer to your home computer) or want to try out things, you can always introduce an intermediate repository. If you are not happy with where you ended up, you can discard this repository, otherwise you push its changes.
There are quite a few DVCS around; you might have heard of Mercurial (used by Sun's OpenJDK), Git (used by the Linux kernel), or Bazaar. I've decided to use Mercurial, because it is more popular than Bazaar and less complicated than Git.
Quickstart:
  • Install: a binary (easy_install works really well)
  • Test on command line: hg debuginstall
  • If the test fails on Mac OS X: In Terminal, uncheck the option “Preferences -> Settings -> Advanced -> Set LANG environment variable on startup”.
  • Eclipse: Merclipse plugin (simpler than Mercurial Eclipse).
  • After installing it, check its section among the Eclipse preferences and make sure that it finds the “hg” command.
  • If not, there are two ways to fix things under Mac OS X: Start Eclipse from the command line (where it uses the same environment variables as during the debuginstall test). Or set the GUI environment variables in ~/.MacOSX/environment.plist
  • Netbeans: support is built in
Things to know:
  • Authentication under Merclipse: work-around via user:password@http://hosting.org/repo/
  • Cannot group several projects in one “module”, need a repository for each.
  • Mercurial files are only in the top-level directory: .hg/ and .hgignore
  • More information: at the Mercurial web site.
First steps (uploading)
    cd mydir
hg init # turns the directory into a repository
hg stat # check what files are visible to Mercurial, edit .hgignore accordingly
hg add # add all files that are visible to Mercurial
hg commit # commit the changes to the local repository
hg push http://hosting.org/repo/ # push change (URL only needed for the 1st time)
First steps (downloading)
    hg clone http://hosting.org/repo/
# perform changes
hg commit
hg push
Mercurial hosting: There are many great options if you want to host your Mercurial repository on a public server. Free examples:
  • freeHg.org: Only hosting, nothing else (issue tracker, wiki, ...)
  • Bitbucket: Nice clean interface, adequate free plan.
  • ShareSource: For open source projects, a bit more complicated than Bitbucket.

الثلاثاء، 2 ديسمبر 2008

Synching Google Calendar with iCal and Thunderbird

Via the CalDAV protocol, Google now supports bi-directional(!) synchronization between Google Calendar and iCal or Thunderbird. Details [source: fscklog]:

This is great, previously one needed the purchaseware BusySync to do so (note though, that BusySync also allows you to sync iCals in a WLAN).



Related post: Cloud-sync your iOS calendars (bonus: PC/Mac)

الأحد، 30 نوفمبر 2008

Buying unprotected music in Germany

It's more difficult than you think (amazon.com). ;-)

I hate DRM. And I also think that as long as legal downloads are simple and cheap enough, people will not bother with piracy. In the United States, one already has quite a few options for downloading unprotected (what a strange word in this context) music. But for the internationally available iTunes, it's more complicated: From what I've read, record labels were scared of Apple getting too much power, so they withheld unprotected versions of their content (which is on Amazon.com). Thus, only a few songs are available in a DRM-free format (hopefully this will change soon). Fortunately, there are online music stores that can be used from European countries and that have more unprotected music:
  • eMusic. Pros: all songs DRM-free, cheaper than iTunes. Cons: subscription-only (14.99 EUR per month for 30 songs, 16.99 for 50 songs, 20.99 for 75 songs, 29.99 for 100 songs).
  • PayPlay. Pros: all songs DRM-free, cheaper than iTunes, no subscription. Cons: Billing happens in chunks of $5.
  • iTunes. Pros: precise billing, no subscription, cheaper than CDs. Cons: many songs are DRM-only.
Now, if only video content was as readily available in Germany.

New video editing ideas

A video about “Interactive Video Object Manipulation” demonstrates research done by Adobe. One can for example, draw a rectangle on a moving object, type text into it and the text stays attached as the object moves:Or, with several people in a video, one can create a picture where shots from different times appear side by side, thus increasing the probability that all of them look good. [Source and picture: Engadget]

If you want to see more technology in a similar vein, look at these videos:

  • Image Resizing by Seam Carving: Resizes images without them looking distorted. By marking areas, one can remove these areas when compressing the image.


  • Microsoft Photosynth: Places images in a 3-dimensional space allowing one to do all kinds of cool zooming etc.


الجمعة، 28 نوفمبر 2008

Firefox tags and parent folders

For version 3.0, Firefox got a new SQLite-based bookmarks mangement. While I'm sad that they completely dropped RDF (even prior to that, it was used in strange ways), the new system is cool, especially how tags are handled—each tag is a folder (in a backup to a JSON file, the folder contents are even stored redundantly). This makes bookmark management really simple:
  • Show all bookmarks with a given tag: look at the contents of the tag folder. Wish: a “child counter” in the folder title so that one does not have to open the folder to see how many bookmarks are in it.
  • Remove a tag: remove the tag folder.
  • Merge two tags: move all bookmarks from one tag folder to another; Firefox makes sure that there are no duplicates.
With tags, the inadequate handling of parent folders in Firefox becomes a problem: If a bookmark shows up in a tag folder or in search results, one cannot get to its parent (even though every bookmark has exactly one parent). Thus, its surroundings, where it is stored, are inaccessible. Fortunately, there are two extensions that help:
I think it's time that Firefox made this standard functionality.

الخميس، 27 نوفمبر 2008

Google has banned me

From all Google groups, that is (that’s a lot of content!). The weird thing is that I can do less when I'm logged in than when I'm logged out, because then, they don't know that they have banned me. This seems to be a common problem. To add insult to injury, many resources for fixing it are only available in Google groups itself (if you are logged in and not banned).





“Sorry... The owner of this group has banned you from this group.” This initially mislead me to believe it was a one-group thing.





“Forbidden. Your client does not have permission to get URL / from this server.” Slight problem: Most of the resources for figuring out what went wrong are on exactly this server.


The root of the problem



The problem is a tricky one: Google offers most of its services for free and is faced with a lot of spam. Hence, to save costs, they have to automate and don’t employ many people in support. That is, you get what you paid for. On the other hand, many people use those services for critical data which they can’t afford to lose. Thus, Google has a lot of responsibility which it doesn’t always live up to (and probably can’t, cost-wise).
It comes down to the rule:

Be sure that you are in control of content that is important to you.

For example, by constantly backing up or by storing your content offline and only pushing it to Google [1].

Trying to fix the problem



There is no direct solution, so I've tried indirect ones:

  • Disable autoresponder: this leads to Google checking if the account has been blocked due to too many posts made via email. Some people have successfully (ab)used this to get unbanned.

  • Feedback about Google Accounts: One step higher up the Google chain, this is one of the few generic options for getting in contact with Google. I left a note.

  • I sent a fax to Google Inc.: Yes, there was real paper involved.

  • I gave feedback on the GG help site (which obviously was negative).


So far, none of this has worked.

Updates





Related reading




  1. Google Blogger: staying in control of your content and other tips

Hiding the Finder's desktop

Scenario: You are making a screencast but don't want the Finder's icons to show up in the background. A slightly awkward solution is to use the Finder's preferences to hide icons for external media etc. and to move all files in the Desktop folder somewhere else. Luckily, TinkerTool provides us with a simpler solution (or rather, with easy access to something that Apple has already built into the Finder):Once the option “Disable Desktop features” has been checked and the Finder has been relaunched, the Desktop is completely free of any Finder artifacts. And it is just as easy to switch the Finder back on.

الأحد، 23 نوفمبر 2008

Collaboratively editing a text document

A few years ago, SubEthaEdit was an eye-opener: Several people, sitting at different computers, could edit the same document. Let's clarify what this means:
  • Different computers: The computers could be anywhere. For the internet, you had to let your collaborators know your IP address (by sending a URL that was easy to copy and paste). For a LAN, you could use Bonjour which lists computers by name. Note that LAN can also mean ad-hoc WLAN: Under Mac OS X, any computer can become a wireless router. Thus SubEthaEdit works even without internet access.
  • Same document: All changes appear live and what a user types appears is highlit with a color specific to that user. Thus, the experience is similar to normal text editing, just a bit more agitated, as there is more than one person making changes now.
This is highly useful for the following scenarios:
  • Remote brainstorming: Two people in different locations can brainstorm on a topic by editing the same document and talking/chatting over Skype.
  • Local brainstorming: If several people have to edit the same document, collaborative editing still makes sense, even if they are in the same room. Thank to ad-hoc WLAN, this can even happen in a Cafe.
  • Taking notes: If several speakers frequently alternate (such as in discussions), several people can collaborate to take notes. Then each person can concentrate on a single speaker and properly finish his/her train of thought without being immediately interrupted by a new speaker.
Now, for all its coolness, SubEthaEdit has two disadvantages: It is Mac-only and it costs. Mind you, it is not expensive, but it does make it harder to bring one-time users into the fray. Thus, I was looking for cross-platform (Windows, Linux, Mac) alternatives.
  • EtherPad: A really cool solution. Works well, no install. Only drawback: You need internet access for it to work.
  • Google Docs: I haven't used it yet, but heard good things about it.
  • Gobby: Not sure, Mac installation is a bit complicated and has prevented me from trying it out, so far.
  • Emacs: Nothing looks promising (and cross-platform) enough for me to try out.

الاثنين، 17 نوفمبر 2008

Graphviz: easy graph visualization

This tool has been around for a while, but I still like how useful it is, so I thought I'd write a blog entry about it: Graphviz translates simple textual representation of graphs into diagrams. Visually, this covers everything where shapes are connected by lines (be it with or without arrows), which is quite a lot.

Example: The definition

digraph G {
TODO -> "Buy food" ;
TODO -> "Send out invites" ;
}
is displayed by Graphviz as:

Notes:

  • The definition (and input of Graphviz) is just a text file which can be easily created by a program.

  • The GUI version of Graphviz watches files so the diagram will be updated automatically every time the text file changes.

  • Graphviz can export its visualizations in many formats (jpg, PDF, SVG, ...).

  • More examples: Graphviz Gallery, UML Diagrams Using Graphviz Dot.

  • Download (be sure to use one of the “Executable Packages from AT&T”).

Now, my only wish would be a pure JavaScript of Graphviz. All the Graphviz solutions that I’m aware of depend on a server-side native dot binary to do the graph layout.

السبت، 15 نوفمبر 2008

Spock is back!

The new Star Trek movie is going to be released in Germany on 7 May. In preparation for that date, more and more pictures (the picture below is part of that gallery) are showing up [via trekmovie.com].
By the way: It is Kirk that is being strangled by Spock.
Update: A new trailer is online.

الأحد، 9 نوفمبر 2008

Asian ladybugs

During the last three years it seemed to me that ladybugs had changed their behavior: In fall, they appeared in large quantities at my window. Some of them got inside (I guess my window is not as sealed as I've always thought), so I had to save them. My rescue operation caused them a bit of a panic which in turn made them secrete tiny bits of a yellowish fluid. When I read up on that, I found out that I wasn't looking at the traditional 7-dot ladybug, but at a new immigrant: The Asian Ladybug. It was imported for fighting vermin. But with its aggressive eating and breeding habits, it is now feared to crowd out native species. Once again: Well done, humanity (see Australia for other “successful” imports of animals and plants). The most interesting thing is that they started appearing in Germany in 2002, so my observations were correct: In fall, they congregate and look for places to hibernate, which causes problems for home owners. But it is not all bad: Apparently, farmers mainly think that their benefits (eating vermin) outweigh their disadvantages (contaminating crops of tender fruits and grapes). From now on, whenever you encounter a ladybird, you can distinguish Asian from European:



Asian: Comes in all kinds of colors, with a varying amount of dots, has a black W on its collar. [Source: Wikipedia]


European: Always 7 dots, always the same color, no W on the collar. [Source: Wikipedia]

Recommended site: Smithsonian Magazine

I've recently come across a good web site, especially about archeology: The Smithsonian Magazine. Check it out, all the content (including the archive) is free.

الجمعة، 31 أكتوبر 2008

FTP for sharing files on Mac OS Leopard

I've decided to upgrade from sneakernet (=USB stick) to something more comfortable when sharing files with my brother, namely FTP. This is relatively easy to configure: Enable FTP sharing, create a new sharing-only user and designate a shared folder. But afterwards I kept getting an error:
530 User guest may not use FTP.
After much googling, a French website provided the answer: sharing-only users (=without their own home directory) have the shell /usr/bin/false. Users with this shell can only log on an FTP server if it is listed in /etc/shells (which it isn't).



الثلاثاء، 21 أكتوبر 2008

Apple and NetBooks

It's a shame that Apple does not produce NetBooks. But thankfully, there are a few interesting offers out there, even if Microsoft seems to have squashed some of the initial Linux variety. Today's conference call on Apple's Q408 finances shed some light on what might happen if Apple were to ever produce a NetBook:
Steve says that the iPhone could be considered an entrant into the netbook market, since it can browse the web (uh, sure), but that Apple's looking at the "nascent" netbook market and it's "got some interesting ideas there if it does evolve." [Engadget]
Thus: Apple won't shrink their Notebooks, but instead grow their iPhones (confirming a hunch of my Brother's). Throw in a folding keyboard and you do have an interesting mobile solution.

الأحد، 19 أكتوبر 2008

Colin Powell endorses Obama

Colin Powell gives a great, even-handed analysis of both candidates for the U.S. presidency. Watch the video.
One of the highlights: He says that a good answer to the question "is Barack Obama muslim?" is "no, he is christian", but an even better answer is "why does it matter?".

الثلاثاء، 14 أكتوبر 2008

Of mice and trackpads

Slowly but surely Apple's multi-touch trackpads make mice look really bad:


  • Gestures take a bit to learn, but are very efficient. They are also a perfect preparation for a true multi-touch user interface for Macintoshes.

  • The new button-less trackpad design is great for gestures.

  • The Mighty Mouse track ball (German: Dreckball) gets dirty and stuck really easily. So much so that this is a known problem in Apple tech support circles and that there are a number of solutions floating around where some work better than others.


Thus, the next logical step for Apple is to have a “solid state” Mighty Mouse: It would have no movable parts, especially no track ball, which would be replaced by a trackpad on the front of the mouse. But that begs the question: Why have a mouse then, why not just have a trackpad?

Update: After having played with the new trackpad, it came to me: Apple hasn't eliminated the button, it has eliminated the trackpad (while adding sensors to the button). The cool thing is that this gives you gestures for clicking: For example, for right-clicking you put two fingers down while clicking. The old button could not detect gestures, so this wasn't an option before.

Apple's announcements

Today's announcements from Apple were pretty much what has been expected. Observations:

  • MacBook and MacBook Pro (not MBA) support the Apple Stereo Headset with microphone. Even play, plause, forward, backward work.


  • You can configure an area on the new trackpad that triggers a right-click.

  • The new 24" Cinema Display is cool: When used with a notebook, it serves as external speakers, external display, external webcam, and USB hub. Thus, it is almost a docking station.

  • Apple still does not support either BluRay or HSPA. The latter is a bit suprising, because Apple has always been avant-guard when it comes to wireless technologies.

  • FireWire: Talk about mixed messages. On one hand, FireWire 800 on the MacBook Pro is a sensible evolution, even though I'll never understand why FW800 has different plugs than FW400 (as opposed to the successful USB evolution strategy to USB2, where they kept the same plug). On the other hand, USB2 is reaching its limits when it comes to memory sticks, external hard drives or external video hardware (see throughputs below). By not including FW800 with non-Pro MacBooks, it seems that Apple will use USB 3.0 in future MacBooks and not push FireWire as the next-generation data plug.


  • German prices: Unbelievably badly converted from the US prices. Example: the MacBook costs $1299 (about €946) in the US and €1199 in Germany.

  • NetBooks: In the Q&A Apple indicated that it is still observing that market. I always liked the 12" PowerBook and think that a 12" MacBook Air would sell really well. I think that 12" is the smallest you can get without compromising on the keyboard.

Throughputs:

  • Fast hard drive: 80 MB/s (640 Mbit/s). RAIDs are obviously faster.

  • Fast flash memory: read 200 MB/s (1.6 Gbit/s), write 100 MB/s (800 Mbit/s)


  • USB2: 480 Mbit/s

  • USB3: 4.8 Gbit/s


  • FW800: 786.432 Mbit/s

  • FW3200: 3.2 Gbit/s

  • Gigabit Ethernet: 300MBit/s (under real-world conditions)

  • Wi-Fi 802.11n: 130 MBit/s


Pros and cons:

  • USB3 (products: 2009 or 2010). Con: thick cables, even longer and more cumbersome plugs.

  • FW800 (products: now). Pro: robust plugs. Con: adapter needed for FW400 devices.


  • FW3200 (products: end of 2008). Plugs are the same as FW800.

Open questions:

  • Does the Apple Headphone also work if the MacBook is closed? That would be a better alternative to other notebooks having external buttons for play, pause, etc. Update: It does not work.


  • How does one drag beyond the area of the new clickpad? With traditional trackpads, you hold the button, lift the finger and continue dragging somewhere else. But with a clickpad, you cannot lift your finger and hold the button at the same time. Update: This requires a new gesture that pretends that there is still a button; you click with your thumb and move the cursor with your index finger.


  • Cinema display: Can one attach the MacBook Air DVD drive to the Cinema display? Update: Yes, one can.

  • Cinema display: Sound is enabled by plugging in USB, but is it transmitted via USB or via DisplayPort? The same question applies to the webcam, but as the built-in iSights use USB, DisplayPort is much less likely.

Update: Apple is removing (=censoring) threads that complain about the lack of FireWire in MacBooks.

الأحد، 12 أكتوبر 2008

The speed of dark

Funny quote from the Amazon interview with Brian Greene about his new book “Icarus at the Edge of Time”:
I recently told my two and a half year old son a bedtime story that involved space travelers moving near the speed of light. Within days he was telling his own animated stories of dinosaurs and monsters outrunning a new and wonderful concept—“the speed of dark.”
It just goes to show: dark is way more bad-ass than light.

The current financial crisis: healthy?

The Washington Independent has published the article “The Great Unwind”. The article's author argues that the current crisis is necessary to reestablish a balance in the financial systems. As a consequence, most fixes that are currently being debated won't help at all---similar to making an illness worse by treating the symptoms. The crux of the matter is that as a society, letting the crisis run its course might be the best thing to do, but for individuals, we must find a way to prevent poverty.

الجمعة، 10 أكتوبر 2008

Is Smalltalk coming back?

Think programming language (not parties). It's amazing how long Smalltalk has been around now (1980: first public version) and it still feels modern, especially its syntax. Sadly, it never got the popularity it deserved.
By now, there is even a free version called Squeak, but its UI is beyond unorthodox: I am very patient when it comes to GUIs---I've always thought Java Swing was OK (a few years ago this said a lot about my patience). But if I, a programmer, already find the GUI cumbersome, how can I expect the broad public to work with it? The GUI was so off-putting that I didn't even bother checking if Squeak had improved on Smalltalk's poor modularity mechanisms.
But apparently, I wasn't alone in finding Squeak “improvement-worthy”:
  • Pharo: A next-generation Squeak.
  • Newspeak: A completely new language that has been inspired by Smalltalk, but contains many new ideas.
Decades ago we've already had very slick combinations of object-oriented development environments and programming languages: Common Lisp (on Symbolics), Smalltalk, Self, Oberon. Thus, it is a bit sad that the mainstream has not advanced that far, in some aspects even taken a step back. Let's hope that Newspeak and others bring some excitement back to programming language design.

الخميس، 9 أكتوبر 2008

Hand dryers

Geman magazine “Der Spiegel” has an interesting article on hand dryers. It quotes a study from 1998 that measured how long it takes to dry one's hands with disposable paper towels (12 seconds), reusable cotton towels (10 seconds) and warm air dryers (43 seconds). Air dryers take so long that men stop using them after 20 seconds, while women stop after 25 seconds.
The newest development in this area is called the Dyson Airblade hand dryer (YouTube video). It uses room-temperature air (=less germs) that is filtered (=even less germs). The air is projected horizontally so forcefully that it does not dry the water, but rather scrapes it off. Sounds useful to me.

السبت، 14 يونيو 2008

A universal DC power adapter

Refresher: alternating current (AC) is what comes out of a wall socket, while direct current (DC) is what devices such as iPods need for charging etc. To translate between the two, you need a power adapter.

Currently, power adapters have the following problems:


  • Wasting materials: Every time, a plug changes, old adapters still in sales/production circulation will have to be discarded. Furthermore, sharing adapters could, say, halve their number. Theoretically, standardization would also make production more efficient.

  • Wasting energy: Many old, less energy-efficient, adapters are still in use, because one cannot upgrade them (due to their proprietary plugs). Also, devices have no way of signalling the adapter when they are done charging.

  • Lack of convenience: Non-standard plugs means you cannot share the same power adapter between devices and that once a proprietary plug falls out of fashion, you might not get a new power adapter for it, any more.




A company calleed GreenPlug has come up with a nice solution:


  • A standardized plug: It builds on the USB plug (which is slowly becoming a kind of DC standard), so its adapter can charge USB devices.

  • A protocol for communicating power needs: If a device is aware of the GreenPlug adapter, it can use the Greentalk protocol to completely shut the current off once it is done charging.


They make their money by selling adapters, so not all of the problems outlined above are completely solved by the GreenPlug, but it is still a great idea. Non-standard plugs have been irking me for a long time, so it is great that someone finally does something about it. In the future, one can even imagine having GreenPlugs as wall sockets, at home and at public places which may completely obviate the need for DC power adapters.

More information on GreenPlug (and my original source):

الثلاثاء، 27 مايو 2008

Fixing jet lag

Copied from one of the comments of "Fasting may fix jet lag":
The procedure suggested by the researchers is:
  1. Start with the day you will arrive in your final time zone.
  2. Count back 16 hours from your normal breakfast time on that day, and stop eating from that point.
  3. At your normal breakfast time on the final day, eat a substantial, nutritious, meal
Note that this means you may have to eat your breakfast on a plane or in an airport, and it may not be your normal breakfast time in the local timezone when you eat breakfast. You are supposed to eat substantial real food, not coffee and a pastry, so you may have to expend some effort and foresight to ensure that such food is available when you are supposed to eat it.

الأحد، 25 مايو 2008

Decomposing plastic

In the book "The world without us" (web site links to a great "Daily Show" interview), Alan Weisman mentions that plastic has an incredible staying power; it takes over 1000 years to decompose. This might change in the future. For example, it also took bacteria a while to learn how to decompose wood.

Also, there is an island of plastic trash floating on the seas that is at least the size of Texas. So the following should be good news: "Teenager's Science Fair Project May Deliver Us From Plastic".



Related post:

Warren Buffet likes the German economy

"Germany: Warren Buffett Likes It, And So Do We"

Who would have thought? Warren Buffet likes the German economy and is worried about the US economy (link target is in German). This is currently not consistent with the German self-image, but obviously things have changed during recent years.

The post-oil future

The Washington Post has published the great article “Wake Up, America. We're Driving Toward Disaster.” In it, the author makes the case that getting rid of oil means changing everything that currently depends on it and it turns out that that is a lot: How we travel, how we produce food, how we build our cities, etc.

Interestingly, even if, at one point, we find an energy source that allows us to freely live the “oil life style”, I think all the changes that are currently forced on us are for the better: We have to grow more food locally, pay farmers better, develop public transport, build more compact cities (thus wasting less land), etc.

الأحد، 11 مايو 2008

Distributed version control systems

Where central version control systems (VCS) keep a single repository in a publicly accessible computer, distributed VCS consist of an arbitrary amount of repositories (each one containing all the data) that can be put anywhere. Changes are propagated between these repositories. This leads to a number of advantages. The following article describes these and other details about distributed VCS:


Distributed Version Control Systems: A Not-So-Quick Guide Through”, Sebastien Auvray

السبت، 19 أبريل 2008

Couch graphical user interfaces

Let's review: What kinds of graphical user interfaces (GUIs) do we currently have? On the one hand, there are Desktop GUIs whose development has been a bit stagnant for a while (I have written about some new ideas, older, but not yet widely used, include lifestreams, zoomable user interfaces, and 3D GUIs). On the other hand, there are smartphone interfaces that have recently enjoyed a resurgence via multi-touch.
But then, there is a third kind of GUI: couch interfaces. With their media center software, both Microsoft and Apple have been quite innovative in this space. The more I use couch interfaces, the more I want a couch interface for almost every desktop application: For example, if I am on the couch, I don't want to leave it to quickly check my email. Any kind of widget such as weather, dictionary or stocks also makes couch-sense.
Note that couch interfaces are a lot like smartphone interfaces: The screen space is greatly reduced and input facilities are limited. Smartphones partially solved the input problem via multi-touch, couch interfaces could do something similar by building small trackpads into remote controls. Wireless keyboards or wireless air mice might also help. But then the Desktop GUI cursor has to be adjusted to couch constraints (by making it larger?).

الاثنين، 14 أبريل 2008

Online Eclipse E4? Lack of imagination! [Update]

Related posts: "Improving code browsing in Eclipse", "Eclipse 4 wishes: simplification first, then innovation".



In this post, I'll take a look at where desktop and web applications are heading. Eclipse E4 could be a major player, but its vision is too limited. First, I'll summarize the current state of application affairs.



Recent developments in web applications:

  • Offline modes and databases (Google Gears).

  • Run them as separate applications via Mozilla Prism.

  • Write them like a desktop GUI application, be it via Dojo or via GWT.

  • Have bidirectional communications with a server (Comet).

  • The server is getting leaner, becomes mostly a service provider, while the clients do much more work.

GUI applications

  • receive updates via the internet.

  • provide help texts in HTML.

This makes it seem inevitable that both kinds of applications will meet in the middle. So what will this middle ground look like?

  • Ubiquity: Applications are available anywhere (where you have online access) and there is no installation necessary. Update are completely unobtrusive.

  • Synchronization: A corollary to ubiquity, you want your data to be ubiquitous, too; not just your application. Applications will synchronize with a server, in a fashion that mimics distributed version control systems.

  • Integration: Applications are first-class citizens in a desktop environment.

  • Mash-ups: You build mash-ups by orchestrating web services and exchanging user interface components.

  • Stability: Applications run safely separately and don't affect some kind of browser, be it by slowing it down or by crashing it.

  • Rich content: appears everywhere, it includes images, sound and movies.

What I would love to see is more thinking about how we can move desktop applications closer to this middle ground. For example: Why is Java web start so close to the above outlined ideal and yet not nearly used as much as Ajax applications? How can we make desktop applications simpler to maintain? How can we build synchronization into every application? How can desktop applications do mash-up-style data and GUI integration?



In my opinion, tools like GWT get it right, while the Eclipse E4, at least from what I've read about it so far, does not. The former is an excellent intermediate solution that will be easy to evolve into what is to come. The latter feels more like a frantic push to be web-enabled, somehow. RAP, which has been quoted as an E4 inspiration, is a bit like an anti-GWT and relies a lot on the server to keep state. Pursuing this path gives you the worst of both worlds: You have sluggish web applications and do not evolve the state of desktop applications, either.



Any comments? Am I right in bashing E4's web ideas or did I just misunderstand?



Disclosure: This post has been partially triggered by "Who Needs an Online IDE?".



Update: The newest generation of applets can be dragged to the desktop to become a Java web start application. This is really cool: You can quickly test-drive an application as an applet, but also turn it into a proper application for long-term use.

الاثنين، 7 أبريل 2008

LaTeX on Mac OS X

Update 2012-04-04: Brought several smaller things up to date, added a conclusion.


LaTeX on Mac OS X is a very pleasant experience, because both LaTeX and the operating system have excellent support for PDF. That means that you’ll be able to use a “PDF-only” workflow (with the occasional bitmap graphics thrown in). In this post, I describe my favorite setup for LaTeXing on the Mac.


Getting started




  • Installation: The best way is to use the MacTeX distribution (TeX Live on Mac OS).

  • SyncTeX: Enables jumping between corresponding locations in PDF and LaTeX source. Aquamacs and Skim support it out of the box. SyncTeX has been created as a replacement for the older PDFSync.



Aquamacs



Aquamacs is a Mac OS X version of Emacs that comes with all the great Emacs LaTeX editing packages such as AucTeX and RefTeX.

  • Overview with screen shots: “Editing LaTeX with Aquamacs”.

  • Options → Option Key: Change if you need the option key for special characters (e.g.: backslash on German keyboards or French accents).

  • Command → Jump to PDF (or command-shift-click or C-c C-c "J)ump To PDF"): Uses SyncTeX to go to that part of the PDF that corresponds to the cursor position in the LaTeX source.

  • M-x longlines-mode: Avoids inserting hard line breaks (e.g. via auto-fill). This used to be a big problem when you wanted to edit LaTeX source in both Emacs and other GUI editors. Tip: You can remove intra-paragraph line breaks via unfill-region (but this does not work if each line of the paragraph is indented with spaces).



Skim



Apart from being able to annote PDFs (which the Leopard Preview app does really well now, too), Skim is also the perfect LaTeX PDF viewer, because it updates its contents in the background whenever the PDF file changes and it supports SyncTeX.

  • Enable SyncTeX with Aquamacs: “Preferences → Sync → PDF-TeX Sync support”.

  • More information on PDF syncing: “TeX and PDF Synchronization – skim-app”.

  • Jump to LaTex: command-shift-click.



Tips and tools



Tricks and tricks:

  • Mac OS Spaces: I don't usually need them, because an application often suffices as a substitute for a space when it comes to grouping windows. But if you combine two different applications, such as Aquamacs and Skim, spaces are very handy.

  • Check out my other LaTeX posts.



Other LaTeX programs (see also external extensive list):


  • Integrated GUI LaTeX editors: If you are not into Emacs, you'll probably want to take a look at TeXShop and iMacTeX.

  • GraphViz: Check out the Mac OS X GUI application. It exports PDF which is easy to integrate in LaTeX.

  • dot2tex: a LaTeX-friendly converter from Graphviz to PGF/TikZ commands, with support for LaTeX (math!) labels and arrows.

  • BibTeX: BibDesk (Mac OS X only) or JabRef (Java).

  • jPicEdt (Java): Graphical eepic editor.



Conclusion



Emacs is very hard to beat, because RefTeX does so many things: It shows you the table of contents in the editor, with live links; it lets you change the “depth” of several sections via the TOC (e.g. to turn several subsections into sections); it lets you search your BibTeX database from the editor and insert the citation you have found; etc. I find it hard to work without these features, but many people happily use Eclipse, TextMate, Sublime or other text editors for their LaTeX needs. At the very least, you should make sure that SyncTeX works with your editor.

الأربعاء، 2 أبريل 2008

How to guide an audience from novice to expert

The article "The Hero's Journey: Are You Experienced?" uses the Dreyfus model of skill acquisition to explain how people learn: Initially, when they are novices, they cannot handle a lot of contradictions. They want to be told what to do and everything must be simple and consistent. Combine this with the observation that abstractions must be built by amassing concrete examples, and one can derive a few rules for teaching (some of them borrowed from "Hero's Journey"):

  • Don't start with an overview (of the subject, its history, etc.).


  • Don't start with the abstractions (the result), start with the concrete examples.

  • Keep things initially simple, add ambivalence later (to complete the knowledge).


الأحد، 30 مارس 2008

Leopard: Things you don't need to fix any more

There are two things that are very simple under Leopard that used to be a lot more complicated:
  • ssh-add (allows one to automatically authenticate ssh connections): There is no need to use ssh-agent any more. If your key is called ~/my/key/file then ssh-add ~/my/key/file does the trick and globally enables automatic authentication (even for GUI applications!). If your key file resides at .ssh/id_pub then you can even omit the argument.
  • Starting X11: There is no need to change the DISPLAY environment variable or to start X11 manually, any more. Instead, X11 starts automatically as soon as one invokes an application that uses X11.
This makes Leopard an even cooler Unix system.

السبت، 29 مارس 2008

Fixing Leopard

There are a few small things wrong with Leopard. But they can be easily fixed:
  • During installation, you should customize (via buttons in the installer) twice:
    • Erase and install: If possible, don't upgrade, your install will be a lot cleaner.
    • Installed packages: You probably don't need all language localizations and all printer drivers and will then save a lot of hard drive space.
  • Dock: I like the dock to the right and at the top. The latter can only be done via utilities such as TinkerTool.
  • iTunes store links: Are handy, but only get you to the store. The following shell command fixes that. Now the links navigate your music library and if you hold option you can still get to the store.
    defaults write com.apple.iTunes invertStoreLinks -bool YES
  • Shortcuts: can be changed via "Keyboard & Mouse -> Keyboard Shortcuts". Two examples of shortcuts that are broken with German keyboards:
    • Move focus to next window in active application: Also known as cycling through windows. Hard to type on a German keyboard.
    • Show help menu: Clashes with Eclipse's "toggle comment".
  • Safari: Show the status bar (which shows the URL when hovering over links) via "View -> Show Status Bar".
  • Finder: Show the path bar via "View -> Show Path Bar". It is very handy, especially with Spotlight, because it shows the path of the current selection, not of the current window.
  • Sleep display: You can do so on command (the computer runs, the display doesn't) via "Expose & Spaces -> Expose -> Active Screen Corners -> Sleep Display". This makes a lot more sense than a screen saver.
  • Sending an SMS: Wow, this one is a biggie. Tiger could send and display recieved SMSes via a Bluetooth-paired cell phone. In Leopard this feature is gone. Sending SMSes via iChat (only works in the US), AOL internet messenger or Skype (costs money) is possible, but you have to be online to do that (on the plus side, you don't need a cell phone then). Fortunately there is the widget emitSMS that at least brings sending SMSes back.
  • Switch off the translucent menu bar: System Preferences -> Desktop & Screen Saver, uncheck "Translucent Menu Bar".
If you want a list of little details that work well in Leopard I recommend the artice "10.5: Liste der lieblichen Feinheiten" (in German).

الجمعة، 28 مارس 2008

PDF editing in Leopard: Almost like Acrobat

"Almost" means that the "Preview" application that comes standard with Mac OS X Leopard does most things that I would normally need Acrobat for. You can
  • rearrange and delete pages.
  • add notes and markup (customize the toolbar to get the corresponding icons).
  • edit notes and markup in existing PDFs (at the bottom of the sidebar, you can display the annotations and then select or delete them).

الأحد، 23 مارس 2008

WiMax: Not that good in practice?

WiMax has been pushed hard for a while now by Intel and, as a consequence, is increasingly showing up in laptops. The idea is great: If WiFi is there, you use a really fast connection, in all other cases, you still have the fairly fast WiMax. Even the name sugggests that WiMax is a complement to WiFi. Of course, it has a competitor---the cell phone networks: HSPA is not as fast as WiFi, but it is much more widely deployed.
I haven't used either of these technologies, yet, so I don't know they compare. As an update on this competition, I've just read that one company that is currently deploying WiMax calls it a "miserable failure".

الاثنين، 17 مارس 2008

Improving code browsing in Eclipse [Update]

Related posts: "Online Eclipse E4? Lack of imagination!", "Eclipse 4 wishes: simplification first, then innovation".

Again, I want to prevent ideas of mine from getting lost, so I'm publishing my comments to an Eclipse bug report as a blog entry.

Faceted browsing for Java code

I'd love to have a universal code browsing solution that uses "facets" (tags with values). An example of well-done facet navigation is iTunes where you have facets for songs such as composer and title. If you look closely, there is quite a bit of information attached to a method that could be considered tags/facets: Visibility, static vs. non-static, annotations etc. JavaDoc's @category just adds one more dimension here. With a facet browser, one could formulate queries such as the following in a very natural way: "Give me all public methods with annotation @Remote that belong to category 'persistence'". This browser should optionally access all methods (of all classes) in order to serve as a universal query mechanism.

Improving the outline: nested methods, method groups

We have written a research prototype that improves just the outline view in two ways:
  • Nested methods: If a method n is private and only used by a method m, then file n under m in the hierarchy (thus, n is not visible at the top level, any more). The reasoning here is: "extract method" is a great refactoring for cleaning up code, but it unnecessarily clutters the top level of the code outline.
  • Method groups (this can be replaced by @category!): If a sequence of methods is preceded by a commentary //--------- foo then these methods will be filed under a node "foo" in the hierarchy (= one additional level of nesting)
For method groups, one can also view categories as tags and, instead of introducing another level of nesting, list the categories as toggle-able buttons that filter the outline:

+-----------------------+
| o | x | @ | # | * | + | <-- icons
+-----------------------+
| (read) (write) (sort) | <-- buttons
| (init) |
| |
| - prepareForSorting() | <-- outline tree
| - writeContents() |
| ... |
+-----------------------+

Thus: Selecting a button filters the outline, unselecting it undoes the filtering. Another possibility is to have filter buttons for "private", "public", "static" etc, too.

This might also be complementary to the nesting approach.

Update: At EclipseCon 2008, there is now talk about "E4", the next generation of Eclipse. There is a lot of talk about expanding the platform (ReSTful web services etc.). Voices to simplify are there, as well; let's hope that they will not be ignored:

الأحد، 16 مارس 2008

Eclipse 4 wishes: simplification first, then innovation

Related posts: "Online Eclipse E4? Lack of imagination!", "Improving code browsing in Eclipse".

Having just read the blog post "The Road to Eclipse 4", I've remembered comments that I've made to an Eclipse bug report. I'm repeating them here, slightly edited, so that I don't lose them.

What's wrong with Eclipse today

It is still too hard to write programs for the RCP. These problems cannot be solved by only expanding Eclipse's functionality, there has to be consolidation, too. I'd like to see some of the impressive collective brain power behind Eclipse be used to come up with new ideas for handling large code bases (such as Eclipse itself).

If Eclipse does not find a way of simplifying and innovating, I'm afraid it might be outmaneuvered by Netbeans in the long run. Netbeans has been quite courageous in refactoring its code base and version 6.0 has provided many new features, in a streamlined, highly integrated fashion.

Concrete suggestions for improving Eclipse

Below I've outlined how I think Eclipse can be improved.
Improving the internals
  • Better coding: Some of the coding patterns are ugly; Eclipse deserves better. Examples: Downcasts, factory not documented at product, constants hard to find (SWT is inconvenient and error-inviting, enums would be much better and not necessarily much more inefficient), long method invocation chains to get to a service provider (dependency injection might help here; if you want to see DI done well, look at Guice), too much nomenclature.

  • Navigating plugins and the RCP framework: Eclipse does reasonably well when it comes to code, so dealing with the extension XML should be as easy as dealing with code and both should be even more integrated. Can we come up with new ways of making it easy to discover functionality and to find one's way around in the mix of artifacts that is currently supported by Eclipse? Better cross-artifact refactoring would not hurt either.

  • Snippets: They are brilliant for looking up stuff, but shouldn't some of that code be encapsulated (e.g., turned into a method)?

  • Netbeans has project "Schliemann". Does Eclipse have something similar?
New external features
  • Finding code: Because one cannot extend classes a posteriori in Java, functionality is often put into separate classes, as static methods (e.g. Collections). How can one find this functionality if one does not know about it?

  • Structuring code: One has to be able to mark up scattered concerns and to structure large classes. I've posted some ideas in response to an Eclipse bug report, that include making better use of the @category Javadoc tag.

  • A simplified formal model for searching source code: One could store all source code associations as RDF and use SPARQL to query it or one could implement one's own Prolog-like query language, much like JQuery has done it.

  • Multi-dimensional browsing: Currently displayed hierarchies such as the call hierarchy and the inheritance hierarchy cannot be mixed. Relo is an example of freely mixing these hierarchies. This feature is much easier to implement, if one has a formal model of the source code (see previous entry).

  • Source code fragment editing: With polymorphism, one often needs to look at the declaration of a method together with all of its implementations. Eclipse should return search results as a sequence of source code fragements (I think member granularity is fine enough) and display all these fragments next to each other in a single editor.
Minor improvements
  • Option: only refresh inheritance hierarchy on-demand, manually.

  • F4 while on a method should immediately show members in the hierarchy.

السبت، 8 مارس 2008

Arguments against the “war on drugs”

While I don't have any perfect answer, the global “war on drugs” smacks of the American prohibition of alcohol, something that ended up causing a lot of crime. If all drugs were legal, there would be no extraordinary profit in selling them and thus the crime that surrounds drugs would go away. Except, obviously, the crimes committed for making money to afford drugs (which is not an issue with rich people and would be less of an issue with poor people if drugs become legal and thus cheaper). What I'm not sure about is if free drugs would increase drug usage and, if that is true, there could be something done about that. The article “The Wire's War on the Drug War” has some more things to say about this topic, mainly that it leads to arresting the wrong people and that all of them are part of the lower class.


[source: doggdot.us]

Gun Kata – amazing-looking fake martial arts

The movie “Equilibrium” has a great cast and is atmospherically and visually well done (the plot and the characters are a tiny bit simplistic, though). Especially its fake fighting style called “Gun Kata” looks amazing. Thus, when I found out that there was an article called “5 movie fighting styles too awesome to actually exist”, I immediately knew that it was going to be in it. Below, you can see the Gun Kata video posted on YouTube:



الخميس، 6 مارس 2008

The Mole People

I recently searched the web about the “Mole People”, homeless people who live in the underground of New York City. This topic became popular through the book “The Mole People: Life in the Tunnels Beneath New York City” by Jennifer Toth. While searching, I came across three interesting pieces of information:

السبت، 1 مارس 2008

2 Great Articles on Barack Obama

Two ... audacious ... articles on Obama:
  • The Audacity of Hopelessness by Frank Rich
    contrasts Clinton's and Obama's thinking (hint: one of them is positive, the other one is negative) and points out that judging by how well Obama organized his election campaign, he would do just fine as a president. In contrast, Clinton, who has criticized Obama for his lack of experience, has had major organizational gaffes in her campaign.
  • The Audacity of Data by
    shows that Obama's philosophy is very pragmatic and un-ideological, he is not really out to change the status quo, but rather to improve it. While I think that in some areas, one should at least explore more unorthodox ideas, this philosophy might be exactly what the US needs right now. At any rate, Obama is thinking outside the box and I really like it. And you have to love the idea that the IRS does your taxes for you (hmm, I wonder what group of people will heavily oppose this).

Is the war on terrorism bogus?

The Guardian has published an article (by a former British environment minister, no less) that sheds light on some of the motivations behind the United States' invasion of Iraq. Oil seems to have played a huge role (as has been alleged before). It is interesting that when it comes to oil supplies, the US government chose a military solution where there would have been an engineering solution: Funding a research program for non-oil energy sources would have produced none of the negative effects of a war (which at the time of the decision were very obvious risks), while still strengthening the US position globally (in a purely positive way).
[source: doggdot.us]

الخميس، 7 فبراير 2008

How will mobile communication evolve?

My guess is that most people will soon find out that constantly being interrupted by one's cell phone makes it hard to relax or concentrate. On the other hand, it is convenient if someone is easily reachable. So, is there a way to reconcile the opposing goals of not being interrupted and being connected? Well, asynchronous communication such as email and SMS goes a long way (if one doesn't check for updates too often). But what if you need synchronous communication? Then you can use a message to set up a time interval during which to get in touch directly. This limits the time when you have to be easily reachable. Complementary to this approach is the idea to let people know your current status: Do you want to be contacted, are you busy etc. This idea of a publicly broadcasted status originated in instant messaging and has been further developed by the Twitter service to also work with SMS, web sites etc. Expect this kind of service to be more popular in the future (e.g. one can imagine it being better integrated with cell phones), as we grow more sensitive about being always available.

الثلاثاء، 15 يناير 2008

MacBook Air (early 2008): pros and cons

Update: Notes on the MacBook Air late 2010



It is quite an exciting machine. The good:



  • Light and compact

  • Full-size screen and keyboard

  • Battery lasts 5 hours

  • Built-in microphone, headphone jack and camera (nice for Skype...).


Acceptable compromises:



  • Built-in battery: Makes the MacBook Air much more compact. I don't have an external battery for my current MacBook, so I would not feel the need to swap batteries.

  • No optical disc drive: Leaving it out shaves off a lot of weight. Using another machine's drive via WLAN is a good alternative to plugging in a USB2 drive. I wonder how they handle installations where one needs to boot. Apple says this can be done on the website, but how can you choose a WLAN drive before booting?

  • Only one USB port. This is the least acceptable compromise, but a USB hub should work where this is an issue. Note that I consider this a different issue from there only being USB ("give us more USB ports" versus "give us Ethernet/Firewire etc.").


Problematic: USB limits the MacBook Air compared to other Apple Notebooks (even very old ones...).



  • Speed: Data transfer into and out of the machine is limited by USB2's maximum speed. Many kinds of adapters are going to be hampered by this. Already the Ethernet adapter is 10/100BASE-T, not Gigabit Ethernet. A good solution would be to have a Firewire800 port in addition to USB2. The former is almost twice as fast as the latter and could be used for adapters (such as the Ethernet adapter), freeing up the USB2 port for normal use. To put the speed into perspective (source: Wikipedia):


    • Bluetooth 2.1 + EDR: 3 Mbit/s

    • 802.11n (wireless LAN): 248 Mbit/s

    • Firewire400: 393.216 Mbit/s

    • USB2: 480 Mbit/s

    • Firewire800: 786.432 Mbit/s


  • Target disk mode: Target disk mode (using a notebook as an external drive) only works with Firewire, not with USB.

  • Networking: To do any kind of wired networking with USB, you will always need an adapter. Mac OS X and Windows XP (currently not Vista) directly support IP networking via Firewire, so there is no need for adapters.


Update: Another interesting alternative is Firewire S800T. It is a Gigabit Ethernet port that can also be used as a Firewire 800 port (with an adapter). Thus, using it for Ethernet is easy, while using it for Firewire is possible. So, choosing between S800T and 800 depends on whether one prefers Ethernet or Firewire.