2010-12-30

What Dollhouse Season 3 would have been like

Ah, Dollhouse [uk]. This show got a lot of hype even before it aired, because Joss Whedon has so many fans. Season 1 started with a string of terrible episodes and then got continually better. Season 2 followed a similar pattern, but its initial episodes were not as bad and its final episodes were great. Don’t forget to watch “Epitaph One” (S1E13) and “Epitaph Two: Return” (S2E13) and watch the former before the latter. Now series writer Tim Minear lets us know what season 3 would have been like:
[...] I think what you would have seen in Season Three is [a series] a lot more embracing of its mythology and turned into more of a superhero show. It would have been a little bit more like Buffy in some ways. [Source: Spinoff Online]

Signs of things to come: Kevin Smith won’t talk to press about his latest movie

Keven Smith won’t talk to the press about his latest movie, “Red State”. Instead, he’ll post material online, for everybody. I think this portends the journalism of the future. Everything is becoming more democratic (or anarchic, depending on your point of view).

2010-12-28

An easy way to understand JavaScript’s prototypal inheritance

Update 2011-06-25:Prototypes as classes” is an improved version of this blog post.

This blog post explains JavaScript’s prototypal inheritance in a simple way. As it turns out, if we initially leave out constructors, then it is easy to understand. Thus, we first look at the fictional programming language ProtoScript which is JavaScript minus constructors, explain it, and then move on to constructors. As a result, you should have a solid understanding of prototypal inheritance and won’t be confused, any more, by all the JavaScript tricks out there.

2010-12-27

Nice Firefox 4 feature: non-blocking dialogs

In Firefox 4.0 Beta 8, the dialogs produced by alert() and prompt() don’t block the complete browser, any more, just the current tab. You can check this out by downloading the latest beta and by clicking here.

Eight important books for software developers

Each of the following eight books has greatly influenced how I think about software development. Note that this list is not exhaustive, there are obviously other important books out there, many of whom I have not read (yet).

2010-12-25

Posterous groups – an alternative to Google Groups

Posterous is a website for blogs and has recently introduced Posterous groups which seems to be a great alternative to Google Groups (with which I have had very negative experiences).

München: Wir brauchen dezentrale Entwicklung

Eine neue Studie schlägt vor:
Die Metropolregion müsse sich “polyzentral” entwickeln: Derzeit konzentriere sich - überspitzt formuliert - alles auf den Münchner Marienplatz. Augsburg, Ingolstadt oder Rosenheim seien als Zentren zwar ebenfalls attraktiv, könnten aber noch mehr zulegen, findet Wulfhorst.
Aus diesem Grund verstehe ich auch die zweite Stammstrecke nicht. Warum einen Bereich noch weiter ausbauen, der sowieso schon überlastet ist? Die Alternative, der Südring, scheint mir interessanter. In einer vergleichenden Studie schneidet die zweite Stammstrecke zwar “besser” ab, aber wurde dort neben der Wirtschaftlichkeit auch die Auswirkung auf die Stadtentwicklung betrachtet? Ausserdem ist der Südring vergleichweise billig und hat zudem kleinere Varianten, die noch weniger kosten.


Verwandter Blog-Eintrag:
  1. Die zweite Stammstrecke: schlecht für München

Two interesting iPad shell-keyboard combos

The following two iPad shells also contain Bluetooth keyboards:
ZAGGmate: Shaped like the lid of a shoebox, it functions as a protective case for the iPad’s screen. It also contains a stand for propping up the iPad. An integrated Bluetooth keyboard is optional. [Source: Philipp Rauschmayer]
Clamcase Keyboard Case: The iPad becomes the screen of the device and, thanks to a special hinge design, can be rotated 360 degrees. Thus the case can either protect the iPad like a closed notebook, be used like a notebook, prop up the iPad at a desired angle, or disappear behind the iPad. [Source: Engadget]
Update 2011-02-16: Clamcase iPad keyboard case review

Google Shared Spaces: live collaborative editing inherited from Google Wave

Google has abandoned Google Wave a while ago, but now has reused a piece of that technology in a new project called “Google Shared Spaces” (GSS). GSS provides gadgets for live collaboration. Examples include collaboratively editing a table, figuring out a date for a meeting, and games.

Google Wave tried to be everything at the same time and was confusing as a result. Turning it into specialized services might be the proper way to put this technology to real-world use.

[Source: Engadget]

First steps towards recycling plastic

There are already huge islands of plastic floating around in the Pacific Ocean (at least the size of Texas), the Atlantic Ocean (hundreds of kilometers across), and the Indian Ocean, in addition possibly other places. Thus figuring out how to recycle plastic is more important than ever. Recently, researchers have made advances in this regard.

Related post:

2010-12-24

Swarmation: a multi-player web game

Swamation is a multi-player browser game where all participating players appear as movable squares on a grid and must work together to from shapes. I wonder how well it scales to many players.

This 450 slide Google Doc is an animation

Nicely done: A 450 slide Google Docs presentation shows an animation when played quickly enough (think flip book). This actual presentation is linked to from the YouTube page. How much of a strain will this be on Google’s infrastructure?

Minimalist versions of popular logos

This web page lists several minimalist versions of popular brand logos. I find that most of the new versions look better, that is, more elegant and less tacky. Only the new Pringles and Nutella don’t work for me. This might have something to do with a lack of contrast, as one of the commentators mentioned. The reduced logos looking better begs the question if we are currently oversaturated with flashy effects and whether this might change again in the future. Windows Phone 7 is certainly following a trend of minimalism.

[Source: Daring Fireball]

2010-12-23

What’s new in ECMAScript 5

Updates:
ECMAScript is a language standard that is implemented as JavaScript in most web browsers (it’s called JScript in MS Internet Explorer). Here are two good links to get up to date on the latest version, ECMAScript 5:

Web game: Torus

Torus is a 3D Tetris that looks great and is pure JavaScript (drawn on Canvas).

Crazy JavaScript hack: unzipping a file

Handling binary data is slowly getting better in JavaScript, but in most browsers, people still have to resort to amazingly clever hacks when it comes to things like unzipping a file stored on a server. Here are the steps that are involved (slide 38). I suspect that you will never need to do this, but it is still fun to see what is possible.
  • Read the binary data of the ZIP file from the server via XMLHttpRequest. You need to specify a charset x-user-defined to ensure that each byte stays a single character.
  • Translate the binary data to base 64 and turn it into a PNG data URI. PNG is zipped internally, so if you get the header right, the web browser will unzip the data as soon as the image is drawn somewhere.
  • Draw the image into a Canvas object, with a height of 1 pixel. Read the uncompressed data from the Canvas, pixel by pixel.
Flattr

2010-12-21

Web game “Biolab Disaster” and its engine

Fun game. It is “pure” (no Flash) and thus works on many mobile devices and desktop operating systems. The Game’s author is also selling the engine to developers.

2010-12-19

Should we let banks and companies go bankrupt?

Peter Schiff argues in favor of this idea on the Daily Show. His credentials include that he predicted the current economic problems long before they happened (and was even laughed at by some pundits, check out the clips in the video). Summary:

Google’s Chrome OS: reviews and observations

Keyboard of the Chrome OS demo notebook. [Source: review #5]
This post lists several reviews, summarizes the essentials, and makes several observations about Chrome OS.

2010-12-18

Google, Pixar and complacency

Summary of “Google’s Facebook-Killer Slowed By Political Infighting”:
  • Google is scared of Facebook and Twitter, because they are very successful and own important data for improving the quality of web searches.
  • It has already bought a number of social companies, but does not seem to be able to integrate them well into the company; there is a lot of political infighting between various groups.
This confirms what I have observed for a while: While Google buys many companies, they don’t often become a meaningful part of it. It also suffers from self-centeredness and a general lack of focus. An article in the Harvard Business Review [via Daring Fireball] makes a similar observation. But the article is mainly a description of how Ed Catmull leads Pixar, in a style that is arguably different from Google’s:
Pixar has [...] a culture where the fear of complacency is a strong motivator, where new problems are identified, discussed, and addressed openly and honestly, all of which requires humility.
As an aside, the article also links to “Keep Your Crises Small”, an interesting talk by Catmull. Openness and the willingness to make mistakes (and learn from them) are rare in the business world. It is a good sign that Pixar encourages both.

Apple, Microsoft and Oracle form joint venture to buy patents

What is that about? More lawsuits against Google (hating Google seems to be the only thing these companies have in common)? Or do they want to protect themselves from lawsuits?

2010-12-17

A cheap bundle of cross-platform games

It is called the “Humble Indie Bundle” and contains several small games that run on Linux, Mac, Windows and don’t have DRM. You pay what you feel they are worth and can donate part of it to charity or the Electronic Frontier Foundation (EFF). Given how the EFF defends citizens against big business in copyright cases, the latter is also a good cause. Interesting fact: The web site lists how much money users pay on average and the people who give the most are not Mac users:
  • Linux: $13.61
  • Mac: $8.41
  • Windows: $6.31
[Source: Ludwig Adam]

2010-12-15

Why the new JavaFX makes sense

Thankfully, Oracle recently changed course and turned JavaFX from a dedicated language and a library to just a Java library (with some really cool stuff). I welcomed the change and thought it was for the better, but my opinion could not be called informed, because I had never worked with JavaFX Script. Thus, I’m glad that I’ve recently come across a post from someone who has worked extensively with it and still likes the change. He confirms my suspicions:
  • JavaFX Script was not as usable a language as Java: It was neither complete nor fast enough, and didn’t have the proper tools. JavaFX Script could have worked as a domain-specific language for Java, but the two were not well integrated.
  • Other JVM-based languages benefit. With the new approach, the JavaFX functionality is available to everything that runs on the JVM versus to just to JavaFX Script.

2010-12-14

The cloud and how it changes mobile computing

The cloud lets all of your computing devices work together like a single system.
This post explains what cloud computing is and how it changes mobile computing. It gives several examples of cloud-enabled applications that already exist and outlines future developments.

2010-12-13

Safe passwords and the hacking of Gawker Media

Gawker Media has been hacked:
If you’re worried about whether your Gawker user password  has been compromised or not, the company’s Lifehacker blog has published an FAQ on the issue. Essentially, if you logged in to comment on Gawker, Gizmodo, Jalopnik, Jezebel, Kotaku, Lifehacker, Deadspin, io9, or Fleshbot you need to change the password for both your Gawker account and anywhere else you use that password.
The problem is that some people use the same password for all of their accounts. The hackers have used this to hijack Twitter accounts. Lesson: Use a different password for every account you have. Some kind of pattern derived from the site name is probably the way to go if you don’t want your brain to explode.

[Source: Daring Fireball]

Has Mac OS X Snow Leopard made DVD burning unreliable?

It certainly has for me on my older iMac (Intel Core Duo). Some people seem to have similar problems (just google for “dvd burning mac error” within the last year), but I don’t know how widespread the problem is. For me, the main issue is that DVD+R DL disks that I used to be able to burn don’t work, any more. If you have similar problems, you should let Apple know.

2010-12-12

Interesting cross-platform programming language: Racket

Racket is a programming language that builds on Scheme (Lisp!). It comes with a powerful runtime environment which includes a JIT and a cross-platform GUI library. Links:
BTW: Some might remember Racket under its old name PLT Scheme.

The web as an application platform: latest developments

The “browser as a platform” is coming along nicely. The following are a few recent developments.

Dexter christmas song

Michael C. Hall singing the Dexter version [1] of “Santa Claus is coming to town”.

[1] In some countries, the link only works if you first go to eonline.com and switch to “USA” at the bottom of the page.

2010-12-11

Displaying math in HTML

Displaying nice-looking mathematics in HTML has always been a source of frustration. But that is slowly changing. The following are two ways for displaying math nicely in browsers:
  • MathML: is a markup language for math that can be embedded in HTML. Firefox already supports it, WebKit will soon (and thus Safari and Chrome). You can check out MathML in a demo document.
  • MathJax: a JavaScript-based solution that works in all major browsers. It can be integrated into many blogging engines and wikis. The image below is an example of a formula displayed in Google Chrome. In Chrome, it is not a bitmap image, it scales smoothly!
Now all someone has to do is to tell Amazon how to integrate one of these technologies into their Kindle software.

2010-12-09

Trying out Ubuntu Linux via VirtualBox

Whether you use Windows or have a Mac, you can use the free VirtualBox application to try out the latest version of Ubuntu. It runs Ubuntu in a simulated computer inside your normal operating system, so you do not really install an operating system, but only a program (installing Ubuntu on a PC or Mac would be much more of a hassle).

Movie: Ink (2009)

Ink [itunes.com] is a fantasy movie that deals with what happens to you once you are dead and with angel-like and demon-like creatures. Those creatures invisibly follow people around and influence them in subtle ways.

Why does the MacBook Air have older processors?

Answer: Apple identified graphics performance to be the largest speed bottleneck, but could not use NVIDIA’s graphics processors with Intel’s latest processors. Thus, they decided to stick with the Core 2 Duo. A MacRumors post has more details, including the rumor that Apple might go all-Intel in some of its next-generation notebooks.

2010-12-08

An analog world time clock

The idea is similar to an analog clock that adapts to daylight savings time: An analog clock being round, you can add or subtract hours from the hour hand by turning it the right amount. The only drawback: This won’t work for the minute hand and it looks like this clock does not have one, only a hand for seconds.

Conan O’Brien’s AmEx commercial

There are two videos on YouTube:
A second Conan commercial is set in India (and also comes with a look behind the scenes).

    What Google Maps can teach you about user interface design

    An article examines “Google Maps and Label Readability”. From this article, we can derive the following rules for the design of graphical user interfaces in general (the following numbers and “visual tricks” refer to section in the article). Google Maps manages to be more readable than the competition without showing less information (as measured by a count of labels). It does so via the following means.

    2010-12-06

    A simple way of sending emails in Java: mailto links

    Whenever I send automated emails, I prefer to have one last look at them, before sending them off. The following method allows one to do this, as all of the generated emails are opened in your default email program, complete with recipients, subject, and content. Thankfully, this is easy to do, by just sending a properly encoded URL to the operating system. Doing this depends on java.awt.Desktop and thus Java 6.

    Transporting goods via a pipeline


    Intriguing idea: Move food through a pipeline system instead of a fleet of trucks. According to Foodtubes, the company making the proposition, this will save 17 billion liters of fuel per year.

    2010-12-04

    Expression of the day: attaboy

    attaboy” is an abbreviation of “that’s the boy” and means something similar to “good dog”. It is often used condescendingly by evil characters in movies to compliment someone that has just done their bidding.

    Amazon Kindle DX ebook reader: review and iPad comparison

    I recently got my Kindle DX. This post reviews my experience with the device and finishes by comparing it with the iPad and the non-DX Kindle.

    If you are a cute little firefox, you have no privacy

    Get your live stream of animal cuteness at firefoxlive.org.

    2010-12-01

    Turn your wall into a dry erase board

    I love the idea: paint your wall with IdeaPaint to turn it into a giant dry erase board. It would be a bit difficult for me to shake the feeling that I’m doing something wrong, but it must be fun to just take a (special) pen and write on the wall. [Source: Uncrate]

    Flattr

    2010-11-30

    Expression of the day: dibs

    To call dibs on something means to claim it for oneself. An example of using it directly is “Dibs on the rocking chair!”.

    PCWorld reliability survey

    Quote from the article:
    Here's the mile-high view of what we found.
    • Put simply, products made by Apple, Asus, Brother, and Canon are typically reliable and well supported.
    • Products made by Dell and Hewlett-Packard often aren't, especially if you're a home user.
    • Laptops are slightly more reliable than before, and have fewer serious problems than desktops.
    • Business PC customers are generally more satisfied than their consumer counterparts.

    2010-11-27

    Two sci-fi shows you should give a chance

    Here are two underappreciated sci-fi shows that I enjoy watching:
    • Fringe [uk]: The first season is a bit uneven, but towards the end of that season, an overall story emerges. Since then, it has become really great.
    • Stargate Universe [uk]: Unusually for the Stargate franchise, this one has a relatively slow pace. I find it refreshingly different.
    In both cases, the cast and the production values are excellent.

      Expression of the day: I don’t mind if I do

      “I don’t mind if I do” is a polite and humorous way of accepting an offer (similar to “twist my arm”). It is often abbreviated as “don’t mind if I do”. The “I don’t mind” is the ironic version of “I’d love to”.

      2010-11-26

      Expression of the day: esprit d’escalier

      Yes, it’s French and yes, you can also use it in English. Literally translated, “esprit d’escalier” means “staircase wit”. It describes a situation, where you only come up with a witty response to an insult (or a witty contribution to a discussion) when it’s already too late. That is, you have left the scene and are on the staircase. The German “Treppenwitz” is also derived from this French expression. “Witz” has its original meaning “witty thought”, not its later meaning “joke”.

      Movie: Doc Hollywood (1991)

      Doc Hollywood” [itunes.com, itunes.de] is another old movie that has aged well. Long after having seen it, I’ve watched the female lead, Julie Warner in another role and was surprised how tiny she was. But as her co-star is Michael J. Fox, you never notice it here. “Doc Hollywood” does the common “heart-warming village with quirky characters” routine, but in a way that does not get on one’s nerves. The movie contains several cleverly-conceived medical incidents that are indicative of one of the writers being a doctor. Funny quote:
      Someone points to a person in a cafe (who is off-camera): “Isn't that a star?” Woody Harrelson’s character answers: “No, it's Ted Danson”. Harrelson and Danson co-starred in Cheers.

      2010-11-25

      Sony’s Networked Application Platform is based on GNUstep

      A long time ago, Apple bought NeXT and its operating system NeXTSTEP would later evolve into Mac OS X. GNUstep is an open source implementation of the NeXTSTEP APIs that was created even longer ago. Applications based on GNUstep run on many Unixes and (with some hassles) on Windows. I’ve followed it since its beginning, because I wanted to have the quality of NeXT’s APIs on an open operating system. Alas, GNUstep took a long time to mature. During this time, Mac OS X made it much cheaper to try out NeXT’s technology and my focus shifted towards web applications, so I never tried it out.
      And now comes this kind of crazy news: Sony’s Networked Application Platform (SNAP) will be based on GNUstep. They want to modernize it for features such as touch displays and 3D graphics. The technology is certainly intriguing, but also feels a bit anachronistic. Maybe web technology and JavaScript would have been a better decision. This is the way Palm went to create a smartphone operating system as quickly as possible. Assuming that they will package GNUstep with an operating system, I’m also not sure how they can position SNAP against its many competitors (Android, Chrome OS, Meego, etc.).
      [Source: Daring Fireball]

      2010-11-24

      Enyo: a web application toolkit from Palm

      Browsers are becoming an increasingly capable platform for application development. One example is that WebGL-based 3D graphics are supported by many of the latest browser versions. Palm has taken this idea to its extreme: On Palm devices, all applications are web applications. Recently, Palm has given a demo of Enyo, the next generation of its development framework. A blog post gives a few details on it. One cool feature (at 15:53 in the video linked to from the post) is that Enyo user interfaces scale seamlessly from small screens (cell phones) to large screens (tablets, desktops). In Ares, Enyo has a web-based IDE. Enyo also runs in normal web browsers which allows one to develop in a browser and then push the application to a device. In the video, the presenter mentions that they only push for performance tests. Enyo is a very early demo and only gives a preliminary glimpse of the final product. From the video it sounds as if it is currently WebKit-only. It would be cool if that could change in the future.

      Update 2011-01-24: The ultimate CSS layout spec for webapps

      2010-11-21

      We don’t see things as they are

      Quote from the Talmud:
      We don’t see things as they are, we see things as we are.

      2010-11-19

      Sudoku: a sproutcore web application

      This Sudoku is a web application that has been implemented using Sproutcore. It looks really good. It works well on the iPad. Alas, on the iPhone, the application disables scrolling and zooming, so there is no way to play it.

      2010-11-17

      The Beatles on iTunes

      I find the Beatles being on iTunes not that big of a deal. What is a big deal, however is that they are not available on Amazon and Google (which competed with Apple for the distribution rights). I wonder why that made financial sense.

      Update: Apple has Beatles exclusive until 2011.

      Web browsing with tabs

      Update 2012-02-10: Taming tabs and bookmarks

      All major web browsers have had tabs for a while. It is great, because it allows you to open links from the current page in the background and read them later. But, after a while, tabs tend to pile up, much like a to-do list. On Firefox, you can try out two ideas for the next generation of tabbed browsing:

      Java quiz: what does NoClassDefFoundError mean?

      It took me a while to figure this out: NoClassDefFoundError is not the same as ClassNotFoundException.
      • ClassNotFoundException: The given class could not be found.
      • NoClassDefFoundError: The given class could be found, but something went wrong when initializing it (an interface it implemented could not be found, something went wrong in a static initializer etc.).
      This article has more information.

      2010-11-16

      How Israel handles its airport security

      Brilliant piece about how Israel, where terrorist attacks are much more of a threat, handles security: Efficiently and without fear-mongering. [Source: Daring Fireball]

      2010-11-13

      Filling the holes of the Java standard library

      The Java standard library has so many holes that for most, even basic, tasks, you need additional helper classes and methods. There are two options you should be aware of:
      • Apache Commons: the classic, has a very broad scope.
      • Google Guava: new, more of a focus on core tasks, nice tight API. Check out the presentation they link to from their homepage.

      2010-11-10

      Michael J. Fox: latest news

      I’ve always been a fan of Michael J. Fox’s. For example, he played a large role in making “Back to the future” great. In 1991, he was diagnosed with Parkinson’s disease. Every now and then he still works as an actor, for example, in a guest role on “The Good Wife” [1]. I was surprised how much his performance moved me. It was not pity, more like seeing an old friend struggle, while displaying a lot of dignity. We all struggle from time to time, so it is always instructional to see someone handle adversity well. An interview with Time Magazine gives more insight into Michael’s thinking.

      [1] In some countries, the link only works if you first go to eonline.com and switch to “USA” at the bottom of the page.

      2010-11-07

      Why procrastination happens

      Great find from Phil: “What we can learn from procrastination”. This article analyzes what procrastination really is. The coolest example must be people’s Netflix queues in a study: short-term rentals were always “fun” movies while longer-term rentals were more serious movies that one “should” watch. The article gives one intriguing explanation for procrastination: We are not a single personality, but more like an crowd of competing personalities. A swarm of small fishes posing as a single large fish, if you will. If procrastination happens, the wrong personality won. I find that this has something to do with the amount of pressure I put on myself in order to achieve something I should do (as in “I have to, but I don’t want to”). Then not doing it is an indirect way of standing up for myself, of protesting against being forced. The irony is that in these situations, things I don’t currently have to do seem very appealing, but once I’m free to pursue them, the appeal is often gone.

      A recommended anti-procrastination book is “The Now Habit” [uk, de], one of the “Eight important books for software developers”.

      2010-11-05

      Fan-financed sci-fi: “Who am I”

      Two authors wrote a pilot episode for a science fiction TV show called “Who am I” and are using Kickstarter to finance a pilot. I find this exciting, because it unleashes a new kind of distributed creativity where the old way of creating TV content is much more centralized. The previously mentioned “Pioneer One” is also doing well and continues to fan-finance its episodes.

      2010-11-04

      Mac keyboard and trackpad: save battery power

      With my iMac, I am now using a keyboard and a Magic Trackpad. Unfortunately, the latter is only available as a Bluetooth device and (for right-handers) only makes sense with a shorter keyboard which is also Bluetooth-only. Thus, one has to use batteries. A few tips for saving resources in this kind of scenario:
      • In normal use, both keyboard and trackpad go into light sleep if not used for a certain period of time. Alas, the keyboard does this much more efficiently, because it can wait for a key press to wake up. The trackpad still has to react to touch which is more power-consuming.
      • If you put the computer to sleep, keyboard and trackpad go into deeper sleep. E.g., the trackpad only wakes up if you click it.
      • You can also switch both devices off which is recommended if you don’t use your computer for an extended period of time.
      The only problematic case is thus a long-running task such as finishing a download or converting a video where the devices never go into a deeper sleep. During this kind of task, I switch the trackpad off. Additionally, you can switch off the display with one of the two following methods. This is better than a screen saver, because the display won’t be running.
      • Put the cursor in a hot corner. Use “System Preferences → Desktop + Screen Saver → Hot Corners” (or search for “corner”) to configure a corner so that the display is put to sleep if the cursor stays in it. Disadvantage: this is impossible to do if you have switched off the trackpad.
      • Type Ctrl-Shift-Eject
      Related post:

      2010-10-31

      Nov 1st: Conan O’Brien's “Show Zero”

      Conan O’Brien will broadcast his warm-up show on the internet:
      • PDT (Los Angeles): Nov 1st, 20:00
      • CET (Berlin, Paris): Nov 2nd, 4:00
      Links:

      Mac OS X Lion: the 1990s version of Launchpad, the Linux version of the App Store

      AtEase was a simplified version of the Finder developed by Apple in the early 90s. Its purpose was equivalent to Launchpad of Mac OS X Lion: Make it easy for beginners to start applications without causing any damage.
      But Mac OS X offers beginners help with one more potential source of trouble: it makes it simpler to install and update applications via its app store. The Linux analog of the app store is called package management: It tightly manages installation and also handles updates and removals. I’ve always considered it one of Linux’s killer features. Package management has been around for a long time and it is time that this kind of innovation spreads to other desktop operating systems. While experts could not care less about Launchpad for their own use, it will make their lives easier, because beginners will understand their systems better and cause less damage. On the other hand, the app store will be directly useful to them. I love that Apple keeps track of what you own and lets you install it in one go on new computers.

      2010-10-30

      Apple, Intel, and Light Peak: news and predictions

      Recap: USB2 is becoming too slow. Most hard drives are approximately twice as fast as its maximum speed in practice, while flash sticks can be 5 times faster and more:
      • HSPA (3G): 14 Mbit/s (down), 5.8 Mbit/s (up)
      • LTE (4G): 100 Mbit/s (down), 50 Mbit/s (up)
      • Wi-Fi 802.11n: 130 MBit/s
      • Gigabit Ethernet: 300MBit/s (under real-world conditions)
      • USB2: 480 Mbit/s (real world: ca. 200 Mbit/s)
      • Fast hard drive: 80 MB/s (640 Mbit/s). RAIDs are obviously faster.
      • Firewire 800: 786.432 Mbit/s
      • Fast flash memory: read 200 MB/s (1.6 Gbit/s), write 100 MB/s (800 Mbit/s)
      • Firewire 3200: 3.2 Gbit/s
      • USB3: 4.8 Gbit/s
      • Light Peak: 10 Gbit/s
      Thus, people are looking for a successor to USB2. USB3 has already been on the market for a while, but Intel and Apple are pushing a completely new optical standard called Light Peak. I suspect that this is the reason why it takes both companies so long to support USB3 (if they ever do it). The vision for a fast connector is enticing: You can support power, video, audio, and data via a single plug. It might also give us a power socket that is internationally available. If many locations have such sockets in the future, we don’t need to carry a power supply unit with us, any more. It’s obvious that the socket-hating Apple shares this vision. The main advantage of USB3 is that it is completely compatible with USB2: USB3 devices work with USB2 computers and USB3 computers work with USB2 devices. But USB3 has a few disadvantages:
      • thick, relatively short cables
      • no master-to-master communication, e.g. to network two computers
      • unwieldy and fragile connectors (e.g. plugging in USB blindly is risky)
      In contrast, Light Peak has thin cables that are up to 100m long and is fully symmetrical. There are several options for its plugs [1], some of them better than USB [2].

      I predict that Apple will do the following with Light Peak:
      1. Macs and MacBooks: Light Peak will replace as many connectors as possible. Apple’s displays already function as docking stations. If a Light Peak connector can be used to power the MacBook (as opposed to the MacBook powering a connected device) then only a single cable is needed for the display to provide video, sound, additional ports, and power. Currently, 3 cables are used (power, DisplayPort, USB). Light Peak can also transport foreign protocols over its wire which means that USB could be at a docking station, but not at the portable device (which is admittedly too radical as long as USB sticks are popular).
      2. iPad, iPhone, iPod: Light Peak will (eventually) replace the current dock connector. This would be a huge gamble, but enable many new applications, including connecting an iOS device to a full-blown docking station.
      Updates

      2010-10-28

      Soon all your applications will always be open

      Virtualization is a key technique in informatics: If you access a large and slow medium such as a hard drive or the internet, you are given the impression that you can access everything directly and many complicated intermediate steps are hidden from you. These steps often include the use of caches where data that you are likely to need again is stored on a local medium that is quicker, but also smaller. Caches are based on the observation, that one often only accesses a small amount of data at a time and that data frequently. Thus, if you haven’t used data for a while, you are less likely to need it again, and newer data can replace older data. For hard drives, RAM is used for caching, while web browsers cache internet data on the hard drive.
      When using computers, there is one large virtualization hole: applications. You have to manage manually what to keep and RAM and what not. This is why Apple’s plans for Mac OS X Lion are interesting: applications are supposed to automatically save and restore their current state (open windows, etc.), like iOS applications. As a consequence, the dock won’t indicate any more what applications are currently open and applications will be opened and closed automatically. In a way that only finishes what is already partially happening: If many applications are open, there is not enough RAM and some older applications are pushed to the hard drive. That is, virtual memory gives you the impression that you have as much RAM as the hard drive (another example of virtualization). Older RAM content is written to disk if there is not enough room, any more.
      It remains to be seen how fast restoring the app and its state is. At least on the iPhone it seems to work well. Then one issue remains: For some things, you need true multi-tasking which means that part of your application keeps running. This should not be hidden from the user and some kind of interface to manage these activities becomes necessary. Examples of such activities are playing music and copying files. It will also be interesting to see how/if Apple allows background apps to hook into the function keys for next song, pause, etc. App switching (as in command/control-tab) will probably show a few least recently used apps. This is an improvement from showing all open apps, which is sometimes not enough, sometimes too much. Finally, there is also the potential that this new management saves power, because less things run simultaneously.

      Using HTTP to stream video

      Showing complete videos on the web more or less works if you use HTML5 and the H264 format. For browsers that cannot handle this combination, you should offer a fall back to Flash. Theora is also worth looking at, because many (non-Apple) browsers support it. The streaming story is more complicated. The current solution is to use the Real Time Streaming Protocol (RTSP). But it has two disadvantages:
      • Special server and infrastructure are needed
      • Difficulty with firewalls
      Apple has proposed a standard to solve these issues:
      • Split a video into a set of small clips (of, say, 10 seconds), link them via an index file. The index file can be appended to if the stream grows, as is the case for live streams.
      • The stream can be adapted to the needs of the client. For example, a cell phone might migrate from Wi-Fi to a cell phone network. Then the stream should have a lower resolution. This is enabled by storing the clips in different versions.
      • Encryption is supported and content providers can prohibit local caching at the client.
      Pros and cons:
      • Pro: Any HTTP server can be used for streaming, no special server software needed. Just preprocess your video with Apple’s tool to produce the required files. If you want a live stream, things obviously become more complicated.
      • Pro: HTTP is proven technology that works with any firewall.
      • Con: Client-side support is currently limited to QuickTime on Mac OS X Leopard and iOS. No Windows or Linux! The last two of Apple’s keynotes were transmitted via HTTP streaming and the quality was superb. This explains the requirements for watching them.
      [Source: Ars Technica]

      2010-10-27

      Notes on the MacBook Air late 2010

      I picked up my 13" MacBook Air last Saturday and I’m really happy with it. Notes:
      • SSD is fast, often offsetting the slower processor (compared to my desktop mac). The Air boots in 15 seconds!
      • The higher screen resolution of 1440 x 900 is perfect: I wouldn’t want less and don’t need more. The previous resolution of 1280 x 800 of Apple’s 13" notebooks was not enough.
      • Instant on: wake-up is no virtually immediate, previous MacBooks were already sufficiently fast for me, the new Air is even faster. Apparently, Apple now postpones writing the complete system state to the drive (enabling one to resume one’s work even if the battery is completely empty). Previously, this meant that Macs took quite some time until they were finally asleep. This was not a usability problem, but puts a traditional disk in danger, if you move the notebook too soon. Now, this process happens after one hour of sleep which means that it is avoided if the notebook frequently sleeps and wakes up.
      • Trackpad: I now prefer trackpads to mice. Gestures are just great. Use two fingers for scrolling, no more navigating to the scroll bar. Swipe with three fingers to go backward and forward (e.g. in a web browser). Etc. As the trackpad is just one big multi-touch button, right-clicking can be configured; you either click with two fingers or in one of the bottom corners.
      • Speakers: are surprisingly powerful, similar to the iPad’s impressive speakers.
      • Keyboard: The power button is now part of the keyboard. The Air still has an eject key, to be used when you attach the external DVD drive. The function keys are very useful (volume, brightness, next song, pause, etc.). Curious that the notoriously button-phobe Apple does this.
      • Headset: iPod and iPhone headsets work well with the Air, which is nice for Skype and Face Time. Even the remote control for pause and next/previous song works. Alas, you cannot play music if the Air is closed. There are apps that keep the computer from falling asleep, which is something that I’ll be checking out.
      • USB2 has become a serious bottleneck for the Air. I previously compared the different interface technologies (USB, Firewire, Wi-Fi, etc.) and nothing much has changed. Why doesn’t Apple put in USB3? Maybe they are just biding their time until Light Peak is ready. Transferring your previous data to the new computer is just painful. Most people will probably use USB2 sticks or hard drives. In contrast to Firewire, you cannot directly connect two computers via USB (without an adapter) which does not help here, either.
      • Another sad omission is (an option of) HSPA (=3G). My iPad has 3G and I love that you can go online almost wherever you want.
      • Apparently, Apple went with the slightly older processor (Core 2 Duo), because they wanted to use Nvidia graphics chips (which don’t work with newer Intel chips – it’s all part of an Nvidia-Intel feud). Update 2010-12-15: Details on the decision.
      • 13" versus 11": The 13 is not much larger and heavier than the 11. I thought the 11" would feel smaller, but it is mainly a less deeper version of the 13". Also, the battery of the 11" has less capacity (an average 5 hours as opposed to 7 hours).
      • From what I’ve been told, the 11" sells better than the 13" and the Air does not cannibalize iPad sales. I guess, tech people see the similarities, but for non-tech people, notebooks and iPads are completely different devices.
      Summary: The Air has become a serious contender as a primary computer, with its increased speed and screen resolution, even more so if one uses an LCD Cinema Display as a docking station. Apple is now aiming for the masses. To save money, it does not sacrifice build quality, but sometimes stays a bit behind on features (e.g., no faster interface than USB, no 3G, no more keyboard backlighting). Apple uses the experience gained from its mobile devices to make its notebooks compact and it uses its clout as a massive buyer of components to keep prices comparatively low. The most recent example of this is that Samsung cannot make its Galaxy Tab cheaper than the iPad.
      Related reading:

      Use Bash as a stop watch

      If you need to time something and don’t want to use any fancy GUI apps, you can use the following command in the Bash shell (Mac OS X or Linux terminal):
      date ; read -n 1 -s ; date
      Explanation: Print out time and date, wait for a single key to be pressed (-s prevents that key from being shown), and print out time and date again.

      Update 2010-12-12: Great suggestion from the comments. The following is an even simpler solution (hit return at the end of the line to start the stop watch, hit return again to stop it).
      time read

      Small-scale production via the internet

      The Economist has an article on how the internet revolutionizes production, taking as an example the tripod mount and stand for the iPhone called “Glif”:
      • Two men from New York had an idea for an iPhone stand.
      • The internet funding platform Kickstarter was used to finance the development.
      • They sent their 3D models via email to a Dutch company which sent them back “printed”, three-dimensional prototypes.
      • A short-run injection-moulding production firm will make the final product:
        Injection moulds commonly produce millions of like results; Protomold specializes in smaller runs, and can make dozens to thousands of castings at a reasonable per-unit price.

      2010-10-25

      Can the present affect the past?

      It looks like it:
      In a test that we wouldn't have believed had it not been documented, 100 Cornell students were shown 48 common nouns and given three seconds to observe and visualize each word. Then they were asked to type out as many words as they could remember. After that, a computer re-displayed half of those [original 48] words, which the students then retyped.
      You don't have to be psychic to know where we're going with this: It turns out that the students more likely recalled the words that they were later asked to retype.
      In his original paper, Dr. Bem wrote, “The results show that practicing a set of words after the recall test does, in fact, reach back in time to facilitate the recall of those words.”
      This is similar to some of the things Dean Radin talks about in “Science and the taboo of psi”. He mentions an experiment where people react to unpleasant pictures before they are shown.

      Java on Mac OS X Lion: the redux

      Update 2011-02-26: OpenJDK: Mac OS X Port Project

      Update 2010-11-12:Oracle and Apple Announce OpenJDK Project for Mac OS X”. This is how it should have been done all along, before announcing the deprecation. Then either Apple didn’t think this through or it used it as a negotiation tactic.

      Apple is currently warning developers that Java might not be bundled with Mac OS X Lion. Jobs later clarified:
      Sun (now Oracle) supplies Java for all other platforms. They have their own release schedules, which are almost always different than ours, so the Java we ship is always a version behind. This may not be the best way to do it.
      Observations:
      • Apple obviously and understandably does not want to handle Java, any more. In the past, it has been slow to support the newest version, so this change could be for the better.
      • Having Java on the Mac is important, because many developers need it. Those developers mainly work on server-side applications, so their work is not directly relevant for Apple. But they are still an influential group whose support Apple won’t want to lose. Java is also crucial for education. I don’t know of any software-related degree where Java or the JVM is not needed at some point.
      • Oracle is very profit-driven and server-oriented, so I’m not sure if they see a business case for Java on Mac OS X.
      • There is an open source Java for the Mac, but it runs under X-Windows, thus Swing is not well integrated (but: Eclipse and SWT run on it, too). There is a petition for Apple to hand over its custom code to the open source community. I think, we’d only need a part of it. While the Swing Aqua look and feel was nice, Nimbus (which appeared in Java SE 6u10) is good enough for me. Mimicking Apple’s GUI will always be a moving target, anyway. Maybe Apple thought about the difficulties of implementing the new look of Mac OS X Lion in Swing and considered it too expensive.
      • The main problem is that neither Apple nor Oracle have really communicated what all of this means. They should have consulted before Apple dropped this kind of a bomb. Now people are free to speculate and some blame Apple, others blame Oracle.
      Links:

      2010-10-23

      Mel Gibson’s fall from grace

      This shows how unpopular Gibson currently is in Hollywood: He was to star in a cameo in “The Hangover 2”, but cast and crew complained and he was replaced with Liam Neeson.

      2010-10-21

      A few thoughts on the October 2010 Apple event

      Software

      Mac OS X Lion and more:
      • FaceTime is available on the Mac: About time. One has to wonder why FaceTime is a separate app and hasn’t been integrated into iChat. Maybe iChat will go away, long-term and/or iChat features will be added to FaceTime (mainly instant messaging).
      • Mac App Store and Launchpad: Great for beginners who tend to have a hard time to install (as in: apps appear everywhere on their hard drive) and to start/find applications. Also useful for computers that don’t have a DVD drive (such as the MacBook Air). Automatic update of applications is very welcome and a long-rumored Mac OS X feature that never quite made it to the real world. I would like to know how they deinstall applications: Do they remove all the files (preferences, caches, support files) that an app leaves behind?
        Additional reading: Daring Fireball has a nice article on some of the problems with the current ways of app distribution.
      • Full screen apps: This is Apple (partially) taking a page out of the Windows playbook. It makes sense, but I would prefer them to also copy how Windows 7 allows you to quickly split the screen between two applications. I would guess that full-screen operation is enough 80% of the time and vastly simpler than managing lots of small windows. User interfaces have been moving away from multi-windows and towards tabs and views for a while now.
      • Don’t touch the screen: Interesting that Apple explicitly mentions why they are not doing direct touch on Mac OS, but rather use a trackpad with multi-touch gestures.
        Related reading: “What does a multi-touch desktop GUI look like?” seconds Apple’s opinion.
      • Mission control: unifies Spaces, Expose, Dashbord, and Launchpad. This kind of unification is badly needed. Currently, applications and spaces are somewhat at odds with each other and don’t feel completely cohesive. It seems like Dashboard, Launchpad, and full-screen apps become spaces.
      Update 2011-02-24: Apple’s MacBook introductions: what’s actually new? [summarizes what is known about Lion, so far]

      Software

      • MacBook Air: Brilliant, how it really is an iPad with a keyboard. Because Apple directly uses Flash RAM chips and does not put them into a hard drive enclosure, there is much more space for batteries. One more way that iOS devices and Macs cross-pollinate.
      • Honest battery tests: Finally. This is how you should interact with your customers (god knows Apple not always does it); they are going to see through your shenanigans, anyway.
      • A USB stick to restore your software: MacBook Airs (or is that MacBooks Air?) come with an 8GB stick that allows you to reinstall the operating system and iLife.
      • Instant on – huh? Engadget dropped a hint about what might be new about “instant on” (current MacBooks already wake up from sleep fairly quickly). Apparently, MacBook Airs go into a light sleep when closing them and then into a deeper sleep after an hour (where the contents of the RAM are saved to the hard drive). This feature is less risky with a solid state drive, because turning a hard drive with movable parts on willy-nilly might damage it.

      Links

      2010-10-18

      Designing APIs with the Java 5 language features

      The following is an almost verbatim copy of my post in a thread. I’m replicating it here in order to not lose this content.

      While implementing a mid-sized framework, I've discovered that the following Java 5 language features can help improve the usability of APIs.
      • Generics can help avoid casts in more ways than one, especially if instances of Class are used (see my blog post on this subject).
      • Generics and constructors: Generic constructors always need a type argument, while static methods (such as factory methods) can infer type arguments from their actual (method) parameters, leading to shorter code. This is an example:
        public class Foo<X> {
            public static <X> Foo<X> create(Class<X> elementClass) {
                return new Foo<X>(elementClass);
            }
            public Foo(Class<X> elementClass) { }
            public X getElement() { return null; }
            public static void main(String[] args) {
                // Wrong type at right-hand side:
                Foo<String> foo1 = new Foo(String.class);
                // Proper way of doing it:
                Foo<String> foo2 = new Foo<String>(String.class);
                // Correctly infers the type:
                Foo<String> foo3 = Foo.create(String.class);
            }
        }
        
      • Interface Iterable enables the simplified for-each loops. This suggests that whenever you return an interface Iterator, you should also consider returning an interface Iterable. It is unfortunate that Java does not allow for-each to be applied to iterators. One can also use the following adapter:
        public class IterableWrapper<Elem> implements Iterable<Elem> {
            private Iterator<Elem> _iter;
            public IterableWrapper(Iterator<Elem> iter) {
                _iter = iter;
            }
            public Iterator<Elem> iterator() {
                return _iter;
            }
        }
        
      • Varargs are good whenever the API asks for 0 or more "things". In the past, there were often two variants of a method, one with the optional argument (be it a list or an array), the other one without it. With varargs, you can unify both ways of invocation under one signature. Additionally, many data structures can be cleanly created with varargs, for example:
        public static final <T> Set<T> makeSet(T... elements) {
            return new HashSet<T>(Arrays.asList(elements));
        }
        
      • Enums: Make it easy to discover the possible options for an argument. Compare this to the class SWT inside the Eclipse framework of the same name. Practically every GUI widget depends on the constants defined in this class, which makes looking up what constants apply in one particular case more difficult than it should be. Other advantages of Enums: Each enum constant is a full-blown object and one can perform all kinds of book keeping along with defining them; enums can be examined with a switch statement; the classes EnumSet and EnumMap provide memory-saving means for storing enums.
      • Interface Appendable: Unifies all objects “to which char sequences and values can be appended”. The list of implementing classes is long and includes StringWriter and StringBuffer. Consequence: Whenever you have an argument to which you want to "append" strings in a stream-like fashion, consider using this interface.

      2010-10-17

      Ensuring the long-term survival of our civilization

      The most profound goal of science has always been to guarantee our survival and to protect us from the unpredictability of nature. Back in the middle ages, if a farmer had one bad harvest, it often meant his death. The goal of feeding and protecting us has more or less been achieved. The problem is that we now need to change our focus, because the current focus is becoming outdated and even threatens our survival. We need to switch from a focus on consumption, production and work to a focus on moderation, recycling and meaningful lives. A different kind of innovation becomes important that is often only partially technological. The following are a few of the most pressing topics. A frequent theme is robustness in crisis.

      2010-10-15

      Recommended iPad apps: the basics

      The following are a few apps that I recommend for the iPad.

      2010-10-13

      Weird names: Jaime Sin

      Wikipedia records that Jaime Sin was aware of the irony: If you are a Cardinal in the Roman Catholic Church and your last name is Sin then that makes you Cardinal Sin.

      BiJava: Backwards-incompatible Java

      Stephen Colebourne has a great idea: How about creating a version of Java that is not backwards-compatible? That would mean that it could lose some of its weird and/or hard-to-learn features, while still being recognizably Java and without suffering from the feature overload of some of its competitors. Colebourne also lists three features that BiJava (backwards-incompatible Java) should have: no primitives, nullable types, equals operator. Observations:
      • Avoid feature overload: Larry Wall’s oft-cited saying “there is more than one way of doing things” to me is the very definition of bad language design. Scala and Clojure might suffer from this problem (disclaimer: I still don’t know these languages well enough for an informed opinion).
      • Typing method parameters is great: It allows one to do static checking and documents what’s going on. Languages with algebraic types (ML, Haskell) tend to have even more custom types; they even wrap the type where in Java, one would probably use naked strings. A great practice.
      • I would also argue that (a simple version of) closures should completely replace inner classes. They are immensely confusing to newcomers and not needed if you have closures. Smalltalk and (the partially Smalltalk-inspired) Ruby show that closures and object-orientation are not antithetical.
      • Groovy++ looks interesting, sometimes it seems to stray too far from Java (why in hell are semicolons optional?). [As an aside: Groovy++, please get a proper home page, for those of us who are banned from Google Groups.]
      • ABCL (Armed Bear Common Lisp) is also worth checking out. I love their tongue-in-cheek slogan “The right of the people to keep and arm bears shall not be infringed!”. Like Clojure, ABCL is Lisp, but closely emulates Common Lisp which means it is a simpler language.
      My own wish lists for Java:
      Update 2010-10-13: Bracha’s blog post “Original Sin” sketches what a Java without primitive types could look like.

        Eric Stoltz as Marty McFly in “Back to the Future”

        In one Fringe episode that takes place in the alternate universe, Eric Stoltz is Marty McFly in “Back to the Future”. This made me curious and I checked out Wikipedia: In our universe, they actually shot five weeks with him in that role before replacing him with Michael J. Fox. It feels like the right decision and I don’t think it is Michael J Fox’s acting, but rather his personality that make him such a great fit. Now you can actually see a little bit of footage [source: Gruber] from those first five weeks.

        2010-10-11

        The first Windows Phone 7 commercial

        The first commercial for Windows Phone 7 is weird. It makes the correct observation that we use our cell phones too much. This part is really well done and I’m sure that many people agree, especially parents of teenagers. The commercial then goes on to propose Windows Phones as saving us from our phones, because they are “designed to get you in and out and back to life.” But don’t we use our phones in the manner shown when we want to escape life as it currently is (boring situations, separated from loved ones, etc.)? Wouldn’t it be better to show us how to live more efficiently with a Windows Phone, instead of ridiculing current phones (or rather, their users)? Not a very inspiring message (i.e., a negative one).
        [Source: Daring Fireball]


        Update 2010-10-13:
        • Idea: Wouldn’t the commercial work better if it dropped the slogan of saving us from our phones and instead revealed that the phones that the people are glued to are Windows Phones?
        • Business Insider additionally shows a second ad and almost paraphrases what I have written above.
        • Related reading: a comment on Microsoft’s previous ads that similarly miss their target.

        2010-10-10

        Lessons to learn from the Frost/Nixon interviews

        I just finished watching the movie “Frost/Nixon” [uk]. Given the subject matter, it is surprisingly thrilling and emotional. While it clearly indicts Nixon, it also paints a multi-faceted picture of him, it takes him seriously as a human being. It also contains two interesting lessons.
        [Minor spoilers ahead]

        Don’t like wireless input devices? Let Apple know!

        This is a follow-up to my previous post “Apple, please give us a wired trackpad!” where I explain why wires are currently better than batteries, how Apple has largely solved the wire problem, and how trackpads will probably replace mice long-term.

        Two new ideas:
        • Give Apple feedback if you agree with me. Every now and then they seem to react to it, so here is hoping. Also let them know that it’s stupid that you can only buy a trackpad in addition to a mouse (and not instead of it) with a new Mac.
        • MacInTouch has a great review of the Wacom Bamboo which is a wired mini-tablet that can be used by touch and by stylus and partially competes with the Magic Trackpad.

        2010-10-09

        Does Java make you less productive than dynamic languages?

        I still hear from many people that dynamic languages make them more productive, but my experience is exactly the opposite: I used to prefer Python to Java. But then along came Eclipse with its refactoring and code browsing and afterwards, I could not go back to simpler editors. Many of the advanced Eclipse features are possible precisely because Java is not dynamic. But in many ways, Python feels more polished than Java. The irony is that this has nothing to do with Python being dynamic. All of the following things could be easily added to Java.

        Standard library. The good news is that Java has libraries for almost anything you can imagine. The bad news is that dynamic languages tend to come with much more useful stuff built in:
        • URL-decoding
        • JSON encoding/decoding
        • UU-encoding
        • Joining strings
        • Command line argument parsing
        • CSV file parsing
        • Complete HTTP client implementation (multipart POST, cookies, ...)
        • Iterators: for loops over iterators, combinations (filter, append, etc.), conversion to collections
        Literals:
        • Collection literals: Java 8 will have collection literals, so we will have to wait a while. In the meantime, Arrays.asList() is good enough for lists and a chainable put() (return type = Map) would be good enough for maps.
        • Triple-quoted strings: If a string is triple-quoted in Python, it can contain multiple lines of text and single quotes.
        • Raw strings: In Python, prefixing a string quote with an 'r' means it is raw and slashes are interpreted as is, and not used for escaping. This is very useful for text that contains backslashes (regular expressions, LaTeX).
        Slicing and dicing complex data structures:
        • List comprehension: great in Python, easily added to Java, once it has closures.
        • Accessing the n-th last element (arrays, strings, lists, ...): In Python, the index -n can be used for this purpose. In Java, you have to resort to mylist.get(mylist.size()-n).
        Miscellaneous:
        • str() and ref(): Python has two kinds of toString() methods. str() returns a human readable representation, while ref() returns something that can be parsed (i.e. this method serializes to Python source code).
        • Keyword arguments, optional arguments: useful, but might be too cumbersome to add to Java.
        Exploring code: Having an interactive command line in Python helps. Eclipse has sheets, but I’ve always found them a bit awkward to use. I am thinking more along the lines of BeanShell, but it does not seem to be updated, any more. I would also love Eclipse to become even better at code browsing (ideas, more ideas).

        Most of the other Java warts, I can live with. That Java will have closures sometimes in the future is great, because currently it is difficult to encapsulate a way of iteration, where the operation that is applied to each element can be configured.

        Related posts:
        Flattr

        Movie: Grand Canyon (1991)

        Grand Canyon” [uk] is a great movie from 1991 with Danny Glover (after the 2nd “Lethal Weapon” movie) and Kevin Kline. I originally saw it when it came out and re-watched it today. It is a bit more somber in the middle than I remembered, but ends fairly upbeat. Lawrence Kasdan wrote and directed it. As an aside, he is responsible for the 2nd and 3rd original Star Wars movies having good scripts. For the new ones, George Lucas decided that he could write the scripts himself. And we all know how that turned out.

        Bill Murray gives a rare interview

        In August 2010, GQ published an interview with Bill Murray. It is one in only five he has done during the last 10 years. Reading it, one learns a lot of curious facts. For example, to do business with him, you have to call an 800 number and then he gets back to you – or doesn’t.

        2010-10-03

        Sub-100ml products

        If a container holds at most 100ml of liquid, you can take it with you in your hand luggage on an airplane. I don’t know if they were there before this regulation, but I’ve recently noticed whole shelves in shops (e.g. Rossmann in Germany) dedicated to sub-100ml products: toothpastes, deodorants, shampoos, etc. Cute and useful.

        Update 2010-10-05: Looks like the 100ml limit will be lifted by 2013, thanks to new detectors that will be deployed by then. I wonder what this will do to the burgeoning sales of bottled beverages at airports.  [Source: Focus via Marianne Busch]

        Flattr

        Killer new GoodReader feature: PDF annotation

        GoodReader is an iOS application for transfering and reading files, especially PDFs. The lastest version supports PDF annotation which is great when you have to give feedback on someone else’s work.

        2010-10-02

        Finally! JavaFX script is dead

        I never fully understood JavaFX script. It seemed like a nice enough language, but it neither completely replaced Java nor integrated well with it. Furthermore, some of the features of its library were sorely missing from Java, but not accessible from it. This is why it is refreshing to see the new JavaFX Roadmap. Its main tenet is that JavaFX script is being discontinued and that JavaFX becomes a framework for Java with many exciting features:
        • Binding API: Well, OK, yet another one. Here is hoping that it will not be too cumbersome and find broad acceptance. The API will include observable collections (which are handy for GUI lists and tables).
        • Media framework: for audio and video. About time.
        • HTML5 support: parsing and display. Also desperately needed in Swing (SWT already has reasonable HTML display support).
        • New table control: Apart from better looks, combining it with observable collections should get one the comfort offered by Glazed Lists.
        • New rich text control.
        Finally Java gets back the human resources that had been moved to JavaFX script by Sun. The new JavaFX features will make it much more appealing for developing desktop applications.

        Update 2010-12-15: Why the new JavaFX makes sense

        2010-10-01

        Good News! You saved $0.00 on your purchase

        Message from Amazon after I bought an e-book. I couldn’t be happier.

        2010-09-26

        The sound of one hand touch-typing

        I’ve often wondered, if it would be possible to keep one hand on the mouse and just use a single hand for typing. This would especially speed up pointing-intensive tasks such as editing graphics. Matias actually sells a keyboard called the “Half Keyboard” that allows one to do so. As the name implies, it is half a keyboard with the mapping of the left hand that allows you to switch to the right hand mapping via Shift. You still type with your left hand, but can use the muscle memory of your right hand. This post has details on how well this works:
        Unlike many purported "solutions" to typing problems, Half-QWERTY has actually been tested – at the University of Toronto Input Research Group (with which Matias is affiliated). After about ten hours of practice, most test subjects were typing with one hand at over 50% of their two-handed typing speeds; one subject hit 88% of her two-handed rate. Errors, however, were about twice as frequent as in two-handed typing.
         The post also mentions a few caveats, notably the problem that if you do not already touch type, usage might be a bit difficult to pick up. For touch-typists it would obviously make a great keyboard for mobile devices. For more on the idea of “one hand clapping”, you can look up Koan at Wikipedia.

        Multi-touch versus keyboard

        For recent travels I bought an Apple bluetooth keyboard (following the lead of my brother). It is a joy to have a real keyboard for typing longer texts (such as this one). Arrow keys are great for moving the cursor and for selecting text.

        Apple has done an awesome job of supporting Bluetooth keyboards on the iPad. This surprises, because I don’t think there are many people who use one. Examples: All keys work, even strange ones like curly quotes. The same holds for the function keys (next track, pause music, screen brightness etc.). Selecting text with shift and arrow keys and the shortcuts for cut, copy, paste work, too. Furthermore, when the iPad is paired with a keyboard, the soft keyboard does not pop up, any more, saving screen space. The only current drawback is that I would love to have an English spell check while using the German keyboard layout (also know as “kezboard lazout” in the exotic circles that have this need).

        Yet, the user experience is also a bit strange. It is liberating to have the iPad screen propped up in front of oneself and to be able to move around with the keyboard. But once I do that, I switch to “remote control mode”. Then a trackpad attached to the keyboard makes more sense than having to reach for the screen and touch. This might point to a new kind of hybrid notebook: The screen not being clamshell makes the iPad quicker to operate in most situations. For typing, an external keyboard is perfectly usable (I wish it didn’t need batteries, but at least they last long). But it probably needs to be foldable and have a trackpad. Then future user interfaces would be designed to be operated both by keyboard and by touch. Android’s use of cursor keys is exemplary in this regard.

        Update:

        2010-09-25

        18 common phrases to avoid in conversation

        Fun. Includes the classic faux-pas “are you pregnant?” which is better asked indirectly as “you look great” (you can also borrow the addendum from an earlier tip, “what’s your secret?”).

        Guides for watching TV series

        There are many great TV series out there, but some of them take a while to become watchable (“Star Trek: The Next Generation” comes to mind) or have some awful episodes in them. Thankfully, there are people out there who are willing to protect the general public. For example, “How to get into 20 classic science fiction shows” helps with

        2010-09-24

        George Clooney on the Iraq war when it started

        You can’t beat your enemy anymore through wars; instead you create an entire generation of people revenge-seeking. These days it only matters who’s in charge. Right now that’s us – for a while, at least. Our opponents are going to resort to car bombs and suicide attacks because they have no other way to win. [. . .] I believe [Secretary of Defense Donald Rumsfeld] thinks this is a war that can be won, but there is no such thing anymore. We can’t beat anyone anymore. [George Clooney in 2003]
        Quoted from the IMDB page on Clooney’s bio. Be sure to also check out his retelling of the fight he had with David O. Russell (just search for this name on the page).

        Usability: phone numbers and special characters

        Why do so many web sites insist that, when entering a phone number, you not type any non-digits such as spaces, hyphens, parentheses or slashes? The structure that these characters bring to phone numbers help humans considerably and computers can easily filter them out. So what is the harm of allowing them? I would even store phone numbers in a database as they were entered.

        2010-09-19

        Touch user interfaces benefit the blind

        The blind profit from accessibility features that are possible because of multi-touch. This seems counter-intuitive, because multi-touch conjures up the image of user interfaces that are sometimes almost too visually rich. Apparently, Apple’s implementation is very capable. You can, for example, point your finger at the screen and the computer speaks out what is there. It’s obvious that the same feature would not make sense with a mouse. Gestures are also great for blind people. Daring Fireball points to two moving stories of a blind guy who is very happy with what multi-touch allows him to do.

        2010-09-17

        Seven don’ts for websites

        Source: xkcd
        The following is a list of seven things that frequently bug me about websites.