السبت، 31 يوليو 2010
The slides from the JVM language summit are online
The slides from the JVM language summit (summary) are now online. There is some good stuff, for example: “Engineering Fine-Grained Parallelism in Java” by Doug Lea.
الخميس، 29 يوليو 2010
Microsoft Street Slide: Like Google Street View, only better
Microsoft research does great work (Photosynth, Courier, Surface, ...), it’s a shame that it so rarely contributes to actual products. “Microsoft Street Slide” (MSS) fixes a problem that Google Street View has: While you can move around in your virtual surroundings, it is difficult to get a sense of context (“what is around me?”, “where am I?”). MSS helps by allowing one to zoom out and get a look at a whole street.
الثلاثاء، 27 يوليو 2010
The new Blogger editor is great
In case you haven’t noticed: Blogger has a new editor (you have to explicitly enable it). And it’s great: No more window-global dialogs (e.g. to enter the URL of a link). True previews of a post. Bullet lists that can be indented. Breaks between the introduction and the main article. A resizable editor field. Shortcuts for applying font styles. Etc. In short, it fixes most of my complaints. A few wishes remain:
- Touch support: WYSIWYG composing is not supported on iPhone/iPad and dragging the corner of the editor to resize does not work.
- Navigation (between posting, settings, etc.) could be more streamlined: Some operations should be easier to reach, others should be harder to reach (e.g., how often do you change the design of your blog?), there is some clash between the tabs and the bar at the top, etc. Mozilla has performed a user interface study to solve this kind of problem for Firefox.
- Paste without formatting should be the default.
- Leftovers from my past wishes: Smart quotes, tables, inserting symbols, wider layouts (mentioned in the comments), paragraph styles (headings, pre, ...).
Apple, please give us a wired trackpad!
This is one instance where I hate Apple’s minimalism: They have just introduced “Magic Trackpad” as an alternative to the “Magic Mouse”. And both input devices are cordless. The less wires, the better, you say? In general, I agree, but in this case, having a wire means that one doesn’t have to rely on batteries. And as long as batteries age and are bad for the environment, that is a big plus. Furthermore, Apple has already largely fixed the problem of input device wires, by making their keyboard a USB hub. Then, mouse or trackpad connect directly to the keyboard and only need a relatively short wire which almost never gets in the way. To summarize: not needing a battery = magic. I understand that some people prefer Bluetooth devices, but having a wire should still be an option.
Do you agree? Then let Apple know.
As an aside: Trackpads for input are great and will probably replace mice long-term. With gestures, one takes the idea of the scrolling wheel (an action, directly accessible) and extends it to many kinds of operations: zooming, going to the next page, etc. Trackpads might also be the way to add multi-touch to desktop devices.
Related post:
السبت، 24 يوليو 2010
iPad video: original and spoof
The iPad video is truly annoying (in contrast, the commercial is good). College humor has done a spoof on it.
Smart furniture
I’ve previously written about “Furniture for easier relocation” and just found one more web site that is related to this topic: “Smart Furniture”. If there are any others, let me know.
Teaching RDF
I recently held a 90min lecture on RDF. In it, I’ve followed the obvious path of explaining the usefulness of RDF by showing how it can be interpreted in several ways (set of triples, resources, graph). For a hands-on session, I needed a way to interactively create and query RDF, so I’ve added functionality to Hyena: In the “Query” zone, one can edit a graph in Turtle Syntax and query the repository with SPARQL. It turned out that there was a nice synergy between this zone and the rest of Hyena, because the encoded wiki pages plus attached tags provided nice “real-world” example data. As an exercise, I asked my audience to express in SPARQL the query “all wiki pages that are tagged with ‘Todo’”.
Update: More RDF shells
Update: More RDF shells
- sparql-query: A shell for accessing SPARQL endpoints. [Source: Mischa Tuffield]
- OntoWiki has an interactive query shell with SPARQL syntax highlightning, saved queries and other features. [Source: Sebastian Tramp]
- The SparqlTrainer is an e-learning tool to practice SPARQL interactively. [Source: Sebastian Tramp]
الخميس، 22 يوليو 2010
Inconsistent information in your database
The blog post “Rethinking Form Validation” describes an interesting idea (apparently inspired by one of Alan Cooper’s books): While developers are fond of only storing information that is fully validated, it may help end users if they can store inconsistent data. Related examples include forms that force you to only enter digits for phone numbers (no spaces, dashes, parentheses, etc.) or some obvious characters being forbidden from passwords. Validation should be unobtrusive, because there are always going to be unforeseen cases where rigid control works against the user. Eclipse’s handling of Java syntax errors is exemplary: You are warned about them, but you are not prevented from continuing your work.
الأحد، 18 يوليو 2010
Great TV: Friday night lights
I don’t understand American football and usually don’t like sports-themed movies. But Friday night lights (FNL) is different, because it offers a compelling portrayal of the people involved in football and how it affects them and their relationships. Furthermore, many other topics are also covered, in a manner typical of good American TV: while the “classics” are there (doping, alcohol, first sex), FNL stays fresh, avoids preachiness, takes its time to tell its story and does so with well-developed characters. Recommended and currently relatively cheap on Amazon UK.
الأربعاء، 14 يوليو 2010
A USB stick that can be plugged in both ways
Cool idea: This USB stick is completely symmetrical; it can be plugged in either way. The plug has always been one of USB’s weak points, so it is nice to see progress on this front. Right now, we are in a kind of bus standard limbo, as Intel is still trying to prevent adoption of USB 3 until Light Peak is ready. I like Light Peak, but hate having to wait for it.
الأحد، 11 يوليو 2010
Use a single version number for Ant and Java (bonus: GWT)
Problem: If your application has a version number, it should be accessible during run time from Java (e.g., to display it in an “About this application” dialog) and during build time from Ant (e.g. to include it in file names). The solution is as follows.
Access the version from Java
Create the following properties file src/de/hypergraphs/hyena/core/client/bundle/BuildConstants.properties and put it into the class path.
Access BuildConstants.properties as a Java resource. I usually construct the resource path relative to a Java class (a sibling of the file). That way the path to the properties file will always stay up-to-date, as long as I move the Java class with it.
Ant
Ant can read external property files as variable with the following statement.
Additionally, you can insert the value of $buildVersion into a file while copying it, by using a filterset.
GWT
For client-side GWT, you can use constants. Then the version number is compiled directly into the JavaScript code. To do so, you add the following interface as a sibling of BuildConstants.properties.
Access the version from Java
Create the following properties file src/de/hypergraphs/hyena/core/client/bundle/BuildConstants.properties and put it into the class path.
buildVersion=0.2.0
Access BuildConstants.properties as a Java resource. I usually construct the resource path relative to a Java class (a sibling of the file). That way the path to the properties file will always stay up-to-date, as long as I move the Java class with it.
Ant
Ant can read external property files as variable with the following statement.
<property file="src/de/hypergraphs/hyena/core/client/bundle/BuildConstants.properties">
Additionally, you can insert the value of $buildVersion into a file while copying it, by using a filterset.
<copy file="${data.dir}/index.html" todir="${version.dir}">
<filterset>
<!-- Replace @VERSION@ with the version -->
<filter token="VERSION" value="${buildVersion}">
</filterset>
</copy>
GWT
For client-side GWT, you can use constants. Then the version number is compiled directly into the JavaScript code. To do so, you add the following interface as a sibling of BuildConstants.properties.
package de.hypergraphs.hyena.core.client.bundle;
import com.google.gwt.i18n.client.Constants;
public interface BuildConstants extends Constants {
String buildVersion();
}
الجمعة، 9 يوليو 2010
Running Tomcat on port 80 in a user account
If you already have a servlet container and also need a web server, there is usually no need to turn to a dedicated web server such as Apache. Instead, your servlet container can easily perform double duty, by putting your HTML files into the “ROOT” web application. If you run Tomcat on Linux, you have two choices: First, run it on a user account. Then you can only use “non-privileged” ports which start at 1024 (this is why Tomcat’s default is to use port 8080). Second, run it on a root account, but that poses security risks. There are many solutions out there for running Tomcat on port 8080 on a user account. The simplest solution that I have found is to use authbind. To do so, you need to perform the following steps:
Flattr
- Install authbind
- Make port 80 available to authbind (you need to be root):
touch /etc/authbind/byport/80
chmod 500 /etc/authbind/byport/80
chown glassfish /etc/authbind/byport/80 - Make IPv4 the default (authbind does not currently support IPv6). To do so, create the file TOMCAT/bin/setenv.sh with the following content:
CATALINA_OPTS="-Djava.net.preferIPv4Stack=true" - Change startup.sh
exec authbind --deep "$PRGDIR"/"$EXECUTABLE" start "$@"
# OLD: exec "$PRGDIR"/"$EXECUTABLE" start "$@"
Flattr
الاثنين، 5 يوليو 2010
RDF (almost) is the next generation of relational databases
I love RDF and SPARQL, especially their elegance and simplicity. They surely deserve a lot more attention and not just as a formalism for ontologies and semantics, but also as a next step for relational databases. Especially with the “No SQL” movement becoming popular, RDF could be an alternative that builds on the achievements of the relational database community instead of shunning them. Note that the No SQL implementation Couch DB offers JavaScript-centricity and is a little bit simpler than RDF, so one might prefer it for some scenarios. On the other hand, RDF is not much more complicated and offers other features (composable data, standardized symbols, a general-purpose query language, etc.) that Couch DB cannot match. Alas, some of the basics are still complicated in RDF, such listing properties in a table. My paper “Using RDF for social information management” has more on this topic.
السبت، 3 يوليو 2010
Cloud-sync your iOS calendars (bonus: PC/Mac)
Scenario: You have an iPhone or an iPad and would like to collaboratively edit calendars. You probably want both web and offline access. Thus, neither syncing with iTunes on your PC/Mac nor using a web application such as Google Calendar is an option.
This leaves you with the following alternatives:
This leaves you with the following alternatives:
- Mobile Me: Allows you to sync your iOS device over the internet and provides a web application to manage the calendars. Pro: I’ve heard good things about the web application. Con: Costs.
- Microsoft Exchange: You need an exchange server. I don’t know more about this solution, so I cannot comment on pros and cons.
- Google Calendar: There are several ways of syncing your Google Calendar account with iOS. Pro: free, nice web app. Con: You depend on Google which is often slow to fix bugs and completely shuts itself off from customer requests.
- Google Sync: Allows you to sync your Google Calendars as an MS Exchange account.
[Old, does not work any more, all calendars are always synced] If you want to sync more than one calendar, you need to configure this via Google Sync at http://m.google.com/sync/ Warning: works only from an iPhone. On other devices, you need to fake the iPhone as the browser user agent. - Google Calendar CalDAV: Uses the CalDAV protocol for synchronization. By default, only the default calendar is synced, if you want to synchronize multiple calendars, you need to configure this via www.google.com/calendar/iphoneselect (source: Google).
- Calengoo: Is an app for the iPhone/iPad that directly accesses Google Calendar and also works offline. Has a nice user interface, many people seem to prefer it to the built-in calendar. Con: Costs.
- (1) and (2) are compared in a thread on Google’s support forums. Summary: Google Sync is currently better (uses less battery, does push).
- Calendars that you sync between your PC/Mac and iPhone/iPad can be unsubscribed either before or after adding the calendars from Google Calendar. In the latter case, don’t remove anything existing when adding the new data (there is an option to do so when adding an account). In either case, iTunes offers you to remove the calendars from your iOS device when you unsubscribe.
- iCal/Sunbird: CalDAV.
- Outlook: Google Calendar Sync.
- Mac-only: BusySync (bought it in pre-CalDAV times, works really well). Pro: You only pay once.
- Mac-only: Spanning Sync. Con: Yearly subscription.
Why isn’t “paste without formatting” the default?
I can’t even remember when the last time was that I wanted to keep the formatting when pasting something. Thus, “paste without formatting” should be the default, keeping the formatting should be an option. Microsoft Office 2010 does it this way, why doesn’t everyone else, too?
الجمعة، 2 يوليو 2010
Making sense of the iPad
When I went to a workshop in California, I made the experiment of leaving my notebook at home and only taking my new iPad with me. This gave me more insight into the nature of this slightly perplexing device. The first part of this post will describe this insight. The second part will go into detail about things that I liked and disliked about the iPad.
Part 1: What is the iPad?
The iPad is very closely related to a notebook. One has to use it for a while to notice the differences:
Naturally, the iPad also has limitations. Even if typing is easier than on a cell phone, it is nowhere nearly as efficient as touch typing on a true keyboard. This includes the iPad’s relatively slow way of placing the cursor. Navigating multiple web sites and applications is also not very efficient (see below). And while there are some intriguing new applications for the iPad, many old standbys from the PC world won’t run, probably ever: Firefox, Gimp, Java, Eclipse, Emacs, ...
Part 2: Likes and dislikes.
The main weakness of the iPad is that Apple gave it comparatively little RAM. With 256MB, it only has half as much RAM as the iPhone 4. This becomes an issue when working with Safari, where the second concurrently open page is usually not kept in RAM and thus must be reloaded every time it is brought from the background to the foreground. Let’s hope that this can be remedied by a different caching strategy (=in software). Only the most recent Macs are able to charge an iPad while it is running. Sync over WiFi will be coming eventually and largely solve this problem, because the iPad won’t have to be connected to a USB port, any more.
The user interface is generally intuitive, but some functions are difficult to discover. Labels under icons would help, as would indicators whether an icon is a button or a menu. Non-touch GUIs use tooltips for this purpose. Maybe touch GUIs should introduce a standard help mode. The iPad should also steal Androids universal back button, that works like in a web browser, but also between applications. For example, if you open a link in mail, you can’t go back directly, you need to find mail again on the home screen. A definite improvement will be the iOS combination of true and pseudo multitasking, where one can jump directly between applications, without home screen detours. Safari would benefit from true tabs, the current way of switching pages makes sense on the iPhone, but less so on a large screen. Safari could save space by letting one scroll the address field away. There already is the shortcut of tapping the status bar to scroll back to the top that would complement such a feature well. Another frequent operation is to switch between 3G-only and WiFi-only. WiFi-only is the airport mode plus WiFi, switching to 3G means turning the airport mode off. This correctly disables WiFi. Alas, the switch back is not as efficient and involves two steps. Lastly, the centralized settings management is showing its limits. Settings should be accessible directly from each application.
When typing, placing the cursor is intuitive, but time-consuming. I miss cursor keys (and forward delete). This might end up being Apple history repeating itself. The 1984 Mac pioneered the mouse, but did not have cursor keys, mainly because they were not strictly needed. Apple eventually added them. Typing special characters such as dashes on the iPad also tends to slow one down. One possible fix for this would be to bind multiple symbols to the same key. For example, the TouchPal keyboard on Android accesses alternate bindings by putting the finger down on a given key and then swiping to the left, top, etc. I can handle one additional keyboard layout (numbers, parentheses in addition to characters), but 2 levels are definitely too much. Depending on what I type, I find myself frequently switching automatic correction on and off, so a quick way to perform this switch would be nice.
Summary.
The iPad is the perfect travel companion, if you can live with its limitations. You can use it for brainstorming, say, to sketch slides with Keynote, but you will often want to apply the final touch on a PC or Mac. I’ve created this blog post the same way: Started and largely finished it on the iPad, polished it on a Mac. When it comes to media consumption, the iPad is hard to beat. For example, I’ve found an interesting book in a Palo Alto bookshop and bought it an hour later from my hotel room, as an ebook via Amazon’s Kindle for iPad. Reading ebooks or in fact any PDF is fun. Paper is still slightly more pleasant to read, but navigation is easier on the iPad. The vibrant app community of the iPad is one of its greatest assets, as they constantly come up with new amazing uses. Apple really needs to communicate more clearly why it sometimes rejects applications, as the current situation is very unpleasant for developers. Gruber has written an insightful post on this.
Related posts:
Flattr
Part 1: What is the iPad?
The iPad is very closely related to a notebook. One has to use it for a while to notice the differences:
- Battery capacity: This sounds minor, but is a paradigm shift. The battery lasts over 10 hours even when watching movies. Thus, you stop worrying about power outlets and just recharge over night.
- Weight: While it is not as light as it looks, it still weighs only 730g (3G, WiFi-only is a bit lighter); less than a third of my notebook. Additionally, you rarely need to bring a power supply, further reducing the weight. As a consequence, bringing it along is relatively painless. The 3G version allows you to go online almost anywhere. This gives you more freedom to choose where you want to use the internet, while making relatively small compromises (compared to a notebook).
- Robustness, shape, and touch interaction: The iPad partially owes it’s robustness to Apple’s solid manufacturing, partly to the non-existing keyboard. Together with its shape, it enables you to use a computer in new locations: You can read on the couch, in bed, or look up things in the kitchen, while worrying relatively little about dirt and other hazards. In public places, the iPad’s shape makes you look less awkward than with a notebook and unpacking or stowing away is quick. Shape and touch also enable new uses. You can use it as an (albeit crude) keyboard, join with others to play a board game, roll dice by shaking it, etc. The iPad works well for reading ebooks and PDFs, the paper formats letter and A4 can be displayed well on its screen. Additionally, there are great applications such as Instapaper that help with making content available offline.
- Simplicity: The limited capabilities of the iPad make it easy to use for beginners. Where else do non-technical people install numerous apps and seem to genuinely be in control of the device? This is the positive effect of Apple’s (otherwise negative) tight control of the platform: order, cleanliness and safety.
Naturally, the iPad also has limitations. Even if typing is easier than on a cell phone, it is nowhere nearly as efficient as touch typing on a true keyboard. This includes the iPad’s relatively slow way of placing the cursor. Navigating multiple web sites and applications is also not very efficient (see below). And while there are some intriguing new applications for the iPad, many old standbys from the PC world won’t run, probably ever: Firefox, Gimp, Java, Eclipse, Emacs, ...
Part 2: Likes and dislikes.
The main weakness of the iPad is that Apple gave it comparatively little RAM. With 256MB, it only has half as much RAM as the iPhone 4. This becomes an issue when working with Safari, where the second concurrently open page is usually not kept in RAM and thus must be reloaded every time it is brought from the background to the foreground. Let’s hope that this can be remedied by a different caching strategy (=in software). Only the most recent Macs are able to charge an iPad while it is running. Sync over WiFi will be coming eventually and largely solve this problem, because the iPad won’t have to be connected to a USB port, any more.
The user interface is generally intuitive, but some functions are difficult to discover. Labels under icons would help, as would indicators whether an icon is a button or a menu. Non-touch GUIs use tooltips for this purpose. Maybe touch GUIs should introduce a standard help mode. The iPad should also steal Androids universal back button, that works like in a web browser, but also between applications. For example, if you open a link in mail, you can’t go back directly, you need to find mail again on the home screen. A definite improvement will be the iOS combination of true and pseudo multitasking, where one can jump directly between applications, without home screen detours. Safari would benefit from true tabs, the current way of switching pages makes sense on the iPhone, but less so on a large screen. Safari could save space by letting one scroll the address field away. There already is the shortcut of tapping the status bar to scroll back to the top that would complement such a feature well. Another frequent operation is to switch between 3G-only and WiFi-only. WiFi-only is the airport mode plus WiFi, switching to 3G means turning the airport mode off. This correctly disables WiFi. Alas, the switch back is not as efficient and involves two steps. Lastly, the centralized settings management is showing its limits. Settings should be accessible directly from each application.
When typing, placing the cursor is intuitive, but time-consuming. I miss cursor keys (and forward delete). This might end up being Apple history repeating itself. The 1984 Mac pioneered the mouse, but did not have cursor keys, mainly because they were not strictly needed. Apple eventually added them. Typing special characters such as dashes on the iPad also tends to slow one down. One possible fix for this would be to bind multiple symbols to the same key. For example, the TouchPal keyboard on Android accesses alternate bindings by putting the finger down on a given key and then swiping to the left, top, etc. I can handle one additional keyboard layout (numbers, parentheses in addition to characters), but 2 levels are definitely too much. Depending on what I type, I find myself frequently switching automatic correction on and off, so a quick way to perform this switch would be nice.
Summary.
The iPad is the perfect travel companion, if you can live with its limitations. You can use it for brainstorming, say, to sketch slides with Keynote, but you will often want to apply the final touch on a PC or Mac. I’ve created this blog post the same way: Started and largely finished it on the iPad, polished it on a Mac. When it comes to media consumption, the iPad is hard to beat. For example, I’ve found an interesting book in a Palo Alto bookshop and bought it an hour later from my hotel room, as an ebook via Amazon’s Kindle for iPad. Reading ebooks or in fact any PDF is fun. Paper is still slightly more pleasant to read, but navigation is easier on the iPad. The vibrant app community of the iPad is one of its greatest assets, as they constantly come up with new amazing uses. Apple really needs to communicate more clearly why it sometimes rejects applications, as the current situation is very unpleasant for developers. Gruber has written an insightful post on this.
Related posts:
- iPad wishes
- iPad tips and tricks
- Recommended iPad apps: the basics
- Amazon Kindle DX ebook reader: review and iPad comparison
Flattr
Free text book on RDF (foundation of Semantic Web)
My dissertation is online. While many chapters are specific to the topic of the dissertation, some chapters of it should be very readable introductions to RDF and related ideas such as Linked Data. While RDF is the foundation of the Semantic Web, there are two communities using it:
- RDF as a knowledge representation: This community is concerned with semantics, ontologies, etc.
- RDF as data: This community uses RDF as next-generation relational database
- Part I: Background. Explains RDF, Linked data on the web, folksonomies, ontologies, schema and ontology languages.
- Part VI: Related work. Mentions work that is related to Hyena: information management, hypertext, etc.
الاشتراك في:
الرسائل (Atom)