Archive for the 'Tech' Category

Typing and typography

The iPhone is famous for its on-screen keyboard, a world away from the limited keyboard of a classic mobile phone like the Nokia N95.

I’m still getting used to the iPhone’s virtual QWERTY and my accuracy is improving, especially learning which part of my thumbs touch the keyboard.

iPhone also has decent typography. It displays a wide range of characters and many can be entered using the virtual keyboard.

While the N95 can display ‘curly’ quotes, they are ugly (see below). There is also no way to enter them using the phone. I care about such things.

What to do?

I’m loving my iPhone so far. It partners very well with my Mac (naturally).

But I’m amazed that it has no native to-do list as part of the Calendar app. iCal on the Mac does and I assumed that the iPhone would follow suit.

I’m trialling Appigo To Do Lite (free) and find it good so far.

I joined the iPhone club

Last Saturday I finally got an iPhone. I had been thinking about it for a while but decided to wait until the 3rd generation was released before making the jump.

I had lived with a Nokia N95 for a couple of years and was disappointed with it as a mobile application platform. I found it slow to do many things and the keyboard too limited to be practical.

I wanted to blog about it from the phone itself but couldn’t get blogging software to work. So I’ll try that for/from the iPhone, starting now.

How to reset a NetGear print server

Yesterday I picked up a second-hand NetGear PS110 parallel print server from an eBay seller. When I got it home I couldn’t find it on our network because its previous owners had configured it with an IP address I didn’t know.

This print server (along with the PS101 and PS113) doesn’t have a physical reset button to return it to factory settings. There are plenty of forum posts on the Net complaining of this and asking for a fix.

Its documentation advises installing the Windows setup program to program the device. This program uses NetBEUI to find and control the print server and can change its TCP/IP settings. I didn’t want to try that because none of our Windows (Vista) machines uses NetBEUI. (The device was released in 1999. Also, I use a Mac.)

I found this solution:

  1. Find the print server’s IP address. Potentially the tricky part. I connected it directly to my MacBook Pro and used Wireshark to watch traffic on that interface. The print server advertised itself as an address that luckily is within our home subnet. Otherwise I would have needed to temporarily reconfigure the Mac’s Ethernet interface so I could reach it.
  2. Connect to the print server using FTP. These print servers have a simple FTP server that provides a ‘back door’ for configuration. This is described in the reference manual, which is supplied as PDF on the CD and available in a number of places on the Net (including NetGear’s support site). You must connect with a command-line FTP client, not a GUI one. Each device has a default name printed on a sticker underneath it (‘PS’ followed by six hex digits): enter that name with a blank password to gain entry.
  3. Reset to factory configuration. The FTP server has some files you can get, and some pseudo files that are ‘got’ to perform actions on the device. They include these:
    • CONFIG is a text file that contains current configuration. Its syntax is described in the manual. You can edit it, then put it back on the server as a new configuration (I didn’t do that).
    • PSINF is a read-only text file with a summary of the configuration.
    • The pseudo-file RESET is described as resetting the device but it appears to only reboot it.
    • The pseudo-file DEFAULTC is the one to reset to default configuration. Use the FTP command get DEFAULTC. The default configuration includes clearing device name and password, and setting it to use DHCP.
  4. Restart the print server. Turn it off and then on again is the best way. It will get a new address from your DHCP server. Assuming you have control of that server you can get the print server’s new address. The manual recommends setting the IP address in the print server but I prefer to reserve an address for the PS110 in the DHCP server.
  5. Use the web interface to configure the print server. Browse to http://new_IP_address/ and log in with the default name (as for FTP) and no password. I set the following on the System Configuration page:
    • a new name (not the default one).
    • a new password
    • disabled Appletalk, IPX/SPX and NetBEUI

    I checked the DHCP client was enabled and left everything else the same. You can turn off the DHCP client there and set a static IP address.

After that you have a working server that you can use from Windows, Mac, Linux etc.

Goodbye to Sensis search

I was not at all surprised to read that Sensis is finally giving up on trying to be useful. I guess the web search is OK but White Pages and Yellow Pages searching is hopeless and the Whereis maps are crap.

Perhaps the Google tentacles are reaching too far. But when its products are so much better than the local competition, the locals don’t stand much of a chance.

REST is the assembly language of the web

Some recent REST-related traffic in the blogosphere (both pro- and anti-) has discussed the ‘challenge’ of there being only a handful of REST verbs. The discussions revolve around how to map those verbs and the resources they act upon to a wide range of application functions. So we have Stefan (Tilkov?) writing: “I force my application semantics to adhere to the common HTTP semantics …”

Ugh! This smells like assembly-language programming. Application code isn’t written with CPU instructions and registers in mind; compilers and runtimes were long ago designed to take care of that.

We are at a primitive point in the development of applications to run on this networked computer. We need automatic compilation of high-level languages into ‘REST Assembly Language’ so we can write distributed applications much nearer to their problem domains.

Talk about RISC! This distributed computer has a tiny instruction set but limitless locations into which limitless pieces of information are organised.

Writing good compilers will be very challenging, but if the REST vision is to be fulfilled, very worthwhile.

REST with JSP

I was interested to read Bill de hÓra’s question about whether servlets and JSP can be used to create a RESTful application without resorting to RPC-style URIs like:

http://www.innoq.com/blog/entry.jsp?id=java_web_frameworks

Absolutely yes! A beauty for me of the web side of Java EE is that the URI can take any format you like. So, to use a URI like:

http://www.innoq.com/blog/st/2007/08/15/java_web_frameworks.html

we could work as follows.

  1. The externally facing URI is probably mapped by a reverse proxy or content switch (or the like) to the blogging application on a Java EE application server. The internal URI might be something like:

    http://s012.innoq.com/javablog/blog/st/2007/08/15/java_web_frameworks.html

  2. The application server might interpret the URI like this:

    /javablog: Root web context of the Java blogging application.

    /blog: Part of the URI that maps to a servlet for serving all blog pages. In web.xml it may be mapped with:

    <servlet>
       <servlet-name>BloggingServlet</servlet-name>
       <servlet-class>com.innoq.blogging.web.BloggingServlet</servlet-class>
       ...
    </servlet>
    <servlet-mapping>
       <servlet-name>BloggingServlet</servlet-name>
       <url-pattern>/blog*</url-pattern>
       ...
    </servlet-mapping>
    

    Further work continues in the servlet’s doGet method.

    /st/2007/08/15/java_web_frameworks.html: This string is available to the servlet using request.getPathInfo().

  3. The servlet tokenises the string and works with the information. For example st is used to brand the blog as belonging to Stefan Tilkov, 2007, 08 and 15 are date identifiers and java_web_frameworks is the post slug, with .html to indicate that the content type of the response is text/html.
  4. The servlet uses that information to retrieve the post from the persistence store and assembles request-scope objects that will be used by the JSP.
  5. The servlet forwards to the JSP, which templates the HTML response. For example:

    request.getRequestDispatcher("/WEB-INF/jsp/blog_post.jsp").
    forward(request, response);

    The JSP is never called via a URI that maps to its directory structure. It can (as in this example) reside under the WEB-INF directory, which cannot be mapped to a URI path.

Caching? That can be done by the servlet or by the application server or somewhere in front of that. Or publishing a post may result in the creation of an HTML file on disk in a directory structure that maps directly to the URI.

OpenID delegation

Thanks to Simon Willison’s clear description of how to delegate an OpenID, I can use michaelstrasser.com as my OpenID URL.

In my previous investigations of OpenID I hadn’t discovered delegation. Brilliant!

Why no OpenID?

The latest web idea that might catch on is revyu (and it’s alpha alpha alpha alpha alpha alpha alpha alpha alpha alpha alpha alpha alpha, so don’t expect too much).

It looks like a good idea, but to use it I need to create yet another bloody net login! Aren’t we past that yet? Why no OpenID?

I almost Googlewhacked with a search for revyu openid: two pages generated by del.icio.us and one No such article from Gmane.

Scrolling into Google Maps

I just discovered that Google Maps supports zooming with scroll-wheel mice. This is fantastic and makes the browser-based Maps much easier to use.

It works in IE6 and Firefox on Windows, and in Firefox, Safari and Opera on Mac. Well done, Google!

One thing though: the scroll wheel direction in Google Maps is opposite to that in Google Earth. In Maps a forward (up) scroll zooms in and a backward (down) scroll zooms out (this feels natural to me). But in Earth (as it is in Heaven?) a forward scroll zooms out and a backward scroll zooms in.

Are there competing software development camps in Google, like in Microsoft?

Next Page »