Monday, August 30, 2004

Cygwin complaint

I have a confession to make. I use Windows. Yeah, I know, so just keep your boos and hisses to yourself for a moment.

I also run Cygwin (and MSYS) to allow me to use gcc and other GNU tools which are infinitely useful in my daily work. Cygwin, in case you aren't aware of it, is a Unix-like shell environment that runs on Windows. Within the Cygwin shell (bash) you can pretend you are running on a Unix machine and ps and ls to your heart's content. For what it does, it is pretty nifty, and for what it provides, it is indispensable.

Which is what brings up the next complaint. There is no reason that the Cygwin shell should be less usable than the CMD.exe. Why, then, does Cygwin not provide full directory tab completion?

Tab completion is the feature wherein you can automatically retrieve a filename or directory name by hitting the tab key. In CMD.exe, if you press the tab key you will be presented with the first file in a directory. Hitting tab repeatedly will bring up the next file in succession. By typing a character, you can limit the tab completion search results to only those files that begin with the specified characters. Likewise, if you execute a directory-related command like 'CD' the tab completion engine will only display directories, filtering out files.

The default Cygwin configuration does not have this ability. It has tab completion, but the tab completion is little more than worthless. The Cygwin tab completion engine can only return one filename. To retrieve that filename it is necessary to specify enough leading characters so that the tab completion engine can distinguish the specified file from others with similar leading characters. That means that the full name of a file must be specified in cases where all the leading characters are the same except for an incremented counter at the end.

  • LOGFILE20040801.TXT
  • LOGFILE20040802.TXT
  • LOGFILE20040803.TXT
  • ...
  • LOGFILE20040831.TXT

In order to use Cygwin tab completion on any of the above filenames, it is necessary to type almost the entire filename. It requires typing at least "LOGFILE200408xx" leaving the tab completion to fill in the ".TXT". This is not useful.

CMD.exe allows me to type "LO" and tab completion brings up the first file that begins with the string "lo". Since it is not case-sensitive, I am able to retrieve all files that begin with "lo".

For whatever reason, the better behavior of the CMD.exe shell is not emulated in Cygwin. Why can't Cygwin not act brain-damaged in this situation?

Thursday, August 26, 2004

Portable Media Center stuff

Here's a review of Microsoft's Portable Media Center (PMC).

Basically, the PMC is a small device with a video screen that can play recorded media like music and video. It is what an iPod would be if it had some ambition. Of course, it is a little larger and a little heavier than the iPod and other MP3 players, but it isn't much larger than a Gameboy Advance.

In a previous life, I worked on a PMC project actually. Obviously I can't say who it was, but according to the PMC website and the OEM's website, that one never hit the market. Not that I'm surprised, the hardware was severely underpowered. Basically, they needed more graphics chip horsepower and I don't think we were able to squeeze any more out of the chip they selected. I loved the demo they had at one trade show, though. They cut a hole in the back of the device case and ran cables to a more powerful platform underneath the counter. The device demo ran very fast and everything worked correctly, you just weren't allowed to pick the device up. ;-)

There is a lot of really cool stuff that the PMC ought to be able to do but doesn't seem to thus far. Since it is essentially a media player, it makes sense that it can act as a UPnP Media Renderer when attached to a home network. It also contains storage (large HDD) so it can also be extended to work as a UPnP Media Server. As a Control Point, it doesn't work too well, though it ought to have enough controls to act as its own control point, but not really enough to manage connections between other media renderers.

This device is designed for commuters, the Japanese commuter in particular. Since the vast majority of people here ride the trains every day, such a device would give them something to do during the commute. The trains and buses are used here in lieu of cars which are almost impossible to use as a primary means of transportation. Public transportation is the norm here, not just a means of transportation for lower-income and non-drivers as it is in many American cities. The disposable income of the typical train commuter is well in the range of such a device as the PMC. Any short ride on a train and you will see people occupying their time with their cell phone, Gameboy, or a comic book. The PMC fills a niche here.

But on the other hand, it doesn't seem to fill a niche in the States. The vast majority of people over there drive to and from work. They have large screen TVs at home. They simply do not have the time for such a small screen device to watch videos. If they want to listen to music, the iPod or its relatives can offer that in a smaller form factor for a lower price.

If they can keep the price to around 300 dollars or 37500 yen, this thing could be big here. It will likely flop in the US.

Addendum: The Creative Zen device looks like a cheap plastic toy compared to the solid metal cased device that I had worked on for a previous customer.

Tuesday, August 24, 2004

Some light reading

I've got a small library of computer books that I like to pretend are the cream of the crop when it comes to computer books. I've split them up between work and home so that I have something to read in my downtime at work and something to impress visitors when at home.

Since I'm here at work, here's what I've got in my mini-library. Bruce Eckel's Thinking in Java. Steve McConnell's Code Complete. Bjarne Stroustrup's The C++ Programming Language.

Additionally, I've got some non-computer-related books laying around. Kodansha's Compact Kanji Guide. Kodansha Japanese-English Dictionary. Japanese for Professionals.

I also keep at least one book in my bag so that I have something to read during the train ride. For the past week or so it was The DaVinci Code. From today it is something a little more technical, The Practice of Programming.

If there's anything that I've really gained here in Japan, it is time to read all these books that I've been collecting over the past 10 years.

Wednesday, August 18, 2004

My Java Presentation is Useful!

A few months ago I thought that learning Java would be useful. I work with cell phone software, so having a little background knowledge of Java would be advantageous, I thought.

One thing that really helps me learn a subject is to create a presentation on the topic. I typically use PowerPoint, though I admit my knowledge of that borders on next to nothing. I can use the application to make titles and bullet points as well as slide notes, and that's all I really need. So I made a presentation for Java.

The presentation assumed that the audience didn't know anything about programming. It started with the concepts of Object Oriented analysis and design and slowly added pertinent Java building blocks where they would most appropriately fit. Building out from there, I explained core fundamentals like functions, variable declarations, conditionals, and looping, all with the necessary Java syntax added after a clear description of the concept.

I threw in a blatant plug for Eclipse which is a first class Java development environment. I even had a whole slew of philosophical ponderings discussing the concept of the object (namely Plato's theory of Forms as it relates to the concept of a class versus an object).

At the end of the presentation, the audience ought to be able to write a simple Java program that can do simple string processing and text output. Obviously, this was just an introductory lesson not designed to explore the depth and breadth of the Java class library. In its goal, it succeeds.

But when I brought the presentation to work, no one was interested. This isn't a Java shop, granted, but to turn away something like this without even a second glance seems a little too tunnel-visioned. I took my presentation home and sulked about that. I gloated a little too because I managed to teach myself basic Java in a couple days whereas I absolutely shunned the language my entire college career.

A friend of mine who works elsewhere mentioned that he might need to teach a Java training class, so I offered my presentation. He took it and adapted it a little (mostly by removing the Eclipse stuff) and is now using it in his training classes. He told me the other day that the presentation does a good job of introducing the basics and that his students (technical professionals, mostly) are able to grasp enough of the language in order to grow from there.

I feel like a proud papa, but I'm a little dismayed that it took someone at a company other than mine to realize the benefits of what I was doing. We've still got no Java work here, so I guess in that sense my efforts were wasted, but I can't help feeling that doing all this development in C is going to be wasted effort as more and more cell phones integrate J2ME JVMs.

Tuesday, August 17, 2004

Windows XP SP2 arrives for the masses today

The long-awaited Windows XP SP2 is due to hit the main Windows Update page today. Of course, if you just bought a computer or were part of the beta program, then you've probably already got the RTM version of the SP.

There are lots of security updates included in the service pack, including network port restrictions and an on-by-default firewall. Microsoft seems serious about security this time.

However, there doesn't seem to be a Japanese version available yet. So far only English, German, and Korean are ready for release. 272Mb is a big download only to find out that the SP doesn't work on Japanese systems.

Easy 802.11 Configuration

More on the UPnP theme.

In a world where all things are networked, it stands to reason that we'd want to make as many of those things as possible wireless. After all, what's the point of requiring an ethernet router just to run our home entertainment center when a couple of S-video jacks will work just as well with less wiring. Getting things to talk to each other is already doable, getting them to talk securely without requiring cables is really the next step. We've got 802.11g now which claims to shuttle data at a respectable 56Mbps (still too slow for AV delivery, but the DLNA is working on that), the key is to get the home wifi network up and running and available to every UPnP device in the home.

According to this article, Microsoft has devised a way to quickly and easily establish a secure wireless network through the use of USB Flash Drive and some XML files which contain the encryption codes to login to the wifi network. For large electronic appliances like laptops, printers, even TVs, DVD players, and Speakers this seems ideal. Just plug and play, literally.

But what about small devices that we'd be interested in enabling wireless LAN communication for, like cameras and PDAs? The main problem here is that adding this functionality would result in the requirement to add a large USB host controller that would be used very rarely. It also requires extra software on-board the smaller device that provides the USB Host device driver as well as a program which can read the UFD and decode and initialize the wifi connection. This is not quite the optimal solution for networking these devices.

Leaving the devices open to connect to any open wifi network is also very risky. Any bozo with an 802.11 router could connect to your digicam without your knowledge and download all the naughty pics of your wife or girlfriend (that's why we bought the digicam in the first place, isn't it? :-). So we obviously need some means of securing the portable device against open networks, but the interface of these small devices is not conducive to inputting such information.

Until now the primary means of downloading data off of a camera has been to hook it up to a Host PC using a USB or IEEE1394 wire. This has the benefit of being fairly secure as the connection is a peer-to-peer network (so to speak) with no other entities between the two devices. It has the detriment that it requires pulling out the USB cable from the desk drawer and sticking the connectors into the appropriate ports. Not too difficult, but it still needs wires to do all this.

Before everyone jumps up and yells "Bluetooth!" I would just like to say that I need to read more about the technology before making any comments on that. Does Bluetooth address the problem of foreign devices intruding on the PAN? Does Bluetooth provide a mechanism of simple network configuration that doesn't require significant user interaction to register a device into a PAN? These are the key questions about BT. But on the flipside, are we going to require that all UPnP devices also require BT? Event the Host PC?

So with a wave of my hand I dismiss Bluetooth. IXI claims to have a solution to these problems, but again, how much is truth, how much is marketing material?

We're still stuck with the problem that the portable device isn't configured to talk to the wireless network. What about if we do some sort of auto-configuration the first time we connect the device to a network-registered Host PC? Brilliant idea, except that it still means that we need to hook up the device with a USB or Firewire cable at least once. So what, you ask, it's only once per network. For me, that is once too many. Using a cable at all requires getting under the desk or a reach to the backside of the PC for too many users. The ideal solution is to not have to use wires at all.

The real solution here will be to use something that is proximity-limited like Bluetooth but can internetwork with an 802.11 wireless LAN seamlessly and still require network authentication. How to do this, I don't know. What if the routers and hubs had a proximity-limited antenna (to 1 meter or even less) that could allow users to automatically authenticate a device by bringing it within that range? The device would prompt the user for a button click to accept the network codes. Since the user expects to receive the codes and knowingly accepts the codes, there is no chance that the camera would auto-configure itself onto an unknown network. Also, the proximity of 1 meter restricts the device owner from registering on someone else's network either by accident or on purpose. Once configured, the device would then be free to use the network using those codes until the next time the codes change.

I'm sure I'm missing some key security element here, but my expertise doesn't lie in that area. I'm interested in how this will play out in the future because I don't see wires in the future. ;-)

UPnP

Lately I've been trying to wrap my head around the UPnP protocol. Though slow in coming, it finally seems to be making some baby steps towards the mainstream. Several companies have or are planning on producing UPnP-enabled devices for the UPnP AV (audio/visual) specification. Several others are already producing UPnP-enabled routers under the UPnP Internet Gateway Device category.

In more recent news, the Digital Living Network Alliance was re-formed and seems to be picking up steam on its own with members from just about all the major consumer electronics makers here in Japan. They are working to bring high speed network communications to the AV category and eventually UPnP networking on top of that.

It's very exciting stuff, and very unmined as far as development opportunities go. Microsoft has a Windows-only SDK. Intel released their UPnP development kit to the OSS community under the BSD license. I believe Siemens has an SDK also. A handful of other little companies are providing custom UPnP development. In Japan there is Satoshi Konno who is working on his own implementation of the UPnP spec and has released some tools for it.

With all the UPnP activity just starting up, it seems that this is the time to jump in and get a working SDK together for sale to OEMs and make a boatload of money in the process. Me, I've been trying to get something together in fits and starts, but so far it only "works" on Windows. There is a lot of opportunity here.

Learning ARM Programming

Write a bootloader, they tell me, that can download an OS image over the debug UART (bonus points for ethernet). Well, first thing's first. I need to learn ARM assembler so that I can understand what all these .s and .inc files contain.

I found this website which seems to provide some good information regarding the ARM instruction set. I'll be up late studying, I think.

Welcome to Lentiltech

I figured out today that I can have more than one blog in my Blogger dashboard, so I created this blog as a catchall for any technology topics that I might write about.

First order of the day is moving my existing tech blogs into this one.

Hope you enjoy it!