April 5, 2013

iOS 6 Notification Sounds w/out Notification

For the past few days I'd been experiencing a strange phenomenon on my iPhone 5 running iOS 6. Every so often the notification sound would play, but there would be no notification displayed. The timing was seemingly random and could happen at any time of the day, no matter what I might be running (or not running) on my iPhone at the time.

I figured it might be related to disabling notifications as I recently turned some off for a few apps. Turns out that's what it was. I had disabled notifications in the Notification Center from the Slickdeals app, but that app was still sending out notifications. When I turned notifications back on for the Slickdeals app in the Notification Center, a whole list of them was displayed in the iOS pull-down menu. Notifications that were previously hidden but still occurring. These notifications were being issued even with the Slickdeals supposedly app force-quit.

To fix this, I had to change my notification settings within the Slickdeals app itself.

Posted by josuah at 4:46 PM UTC+00:00 | Comments (0) | TrackBack

June 12, 2012

LG 47LM6200 DHCP-Only

We picked up an LG 47LM6200 television over the weekend for use in the bedroom. Right now it is hooked up to an Apple TV and Christina is enjoying it a lot because she can use AirPlay Mirroring from our iPad to watch Chinese shows off YouTube. We also used it for watching Crunchyroll content.

Unfortunately there is one problem with the TV: it does not support static IP network configuration. I was able to get everything working via Wi-Fi and DHCP (in fact this is necessary as the Wi-Fi MAC address is only visible after connected; only the Ethernet MAC address is listed in the device information screen based on my memory) but despite text on the TV setup screens and user manual that implies support for static IP configurations, I was unable enter one.

I ended up spending about one and a half hours on the phone with LG support. The representative was very helpful, and called me back after doing some investigation. But the end result is that the TV only supports DHCP. (I think she got some confusing answers from LG technicians because her explanation on the callback wasn't entirely correct.)

So, we won't be using the SmartTV features of this display. Too bad, since it's Netflix UI should be better than what's on the Apple TV. But, it's okay because we have network access via the Apple TV.

Posted by josuah at 12:13 AM UTC+00:00 | Comments (0) | TrackBack

May 22, 2012

Transmit SFTP Failure

I ran into a strange problem today where my attempts to SFTP to my server were failing but I could SSH in just fine. My login credentials were correct, and my server logs weren't indicating a failure. They seemed to indicate a problem with the client.

May 21 10:56:55 binibik systemd-logind[979]: New session 21304 of user wesley.
May 21 10:56:55 binibik sshd[7714]: subsystem request for sftp by user wesley
May 21 10:56:55 binibik sshd[7714]: Received disconnect from 69.53.237.65:11: disconnected by user
May 21 10:56:55 binibik systemd-logind[979]: Removed session 21304.

I am using the wonderful Transmit FTP client and version 3 of the client displayed an error dialog stating 'permission denied' while version 4 of the client displayed an error dialog stating the username or password was incorrect.

So both the server logs and client error message was incorrect and therefore misleading. I turned on Transmit verbose logging which showed authentication succeeded. I think the log messages might have indicated something was wrong but there wasn't a clear message indicating so.

Turns out the problem was my sshd_config configuration. The sftp subsystem configuration line was pointing at an old file location that no longer existed. I fixed that so it pointed at the correct location and everything works now.

Subsystem	sftp	/usr/lib/ssh/sftp-server

Posted by josuah at 4:23 AM UTC+00:00 | Comments (0) | TrackBack

August 28, 2011

Fixing NFS Trash + Keychain on OS X Lion Upgrade

I just upgraded my primary desktop at home to OS X Lion. During this process, a couple of things got messed up. First, after logging back in Keychain Access could not find my login.keychain, and any attempt to add keychains into Keychain Access failed. Second, I have my home directories NFS mounted. The method of mounting NFS directories changed so this did not carry forward between Snow Leopard to Lion. Plus afterwards, the Trash was not working for one of my NFS mounted users but it was for the other. I managed to resolve these problems and thought it would be a good idea to document them.

The first thing to fix was the NFS mounts. Obviously I cannot log in at all if my home directory is missing. I have always had a separate local administrator account, to perform system administration duties. This way, I can manage my computer without having any external dependencies like the network or my NFS server.

In OS X Lion, the way to add NFS mounts is via Disk Utility. There is an NFS Mounts... menu item and I simply added my NFS mount back. No problems and this uses automount whereas before I was using static mounts.

To fix the keychain problem, I simply restarted after my initial login. The file permissions were all correct, so I'm not sure what the original problem was. But it worked.

Now for the Trash. It took me a long time to figure out what was wrong, because my ~/.Trash directory existed and had all the correct permissions. Turns out, in /.Trashes on my Mac there was a directory named with my UID. Deleting this directory using sudo and then restarting restored normal trash behavior for my account. Previously it was always asking to delete files immediately. It may have worked as well without restarting but just logging out and back in.

There are two things to take note of. First, I ran Repair Permissions on Disk Utility and it found a lot of things to change. I'm guessing the directory structure and permissions have changed a lot in OS X Lion. Second, the auto-restore of application state, even for quit applications, can cause problems if your NFS mount is missing or flaky. For example, I had a few Terminal windows open and my shells were in NFS mounted directories. While debugging some stuff with NFS and trash, my mounts changed or were unavailable. Opening Terminal in this state would get stuck. (I probably needed my original NFS mounts to be soft rather than hard.)

Posted by josuah at 6:15 PM UTC+00:00 | Comments (0) | TrackBack

December 2, 2010

A Different Form of Life

It turns out a new bacterium was found in California's Mono Lake that does not use phosphorus as one of its building blocks. Instead, it replaces phosphorus with arsenic. Not only is this interesting in and of itself, but it also suggests a separate evolutionary path. Life that uses arsenic instead of phosphorus is likely to have a different "start" and lead to more complex life that thrives in completely different environments.

Posted by josuah at 6:15 PM UTC+00:00 | Comments (0) | TrackBack

March 28, 2010

FUTURESTATES

FUTURESTATES is a miniseries of science-fiction webispodes that look at future social possibilities. The ideas aren't particularly ground-breaking, but the execution is excellent. I highly suggest spending some time to watch through them.

Some of the topics explored include the environment, over-population, virtual reality, economics, and social divide.

Posted by josuah at 8:06 PM UTC+00:00 | Comments (0) | TrackBack

February 9, 2010

Dinosaurs in Color

Anchiornis huxleyiI always wondered what color dinosaurs actually were. And I wondered if we would ever be able to find out without going back in time. But it turns out that by comparing the melanosomes that they were able to recover from fossils, some paleontologists were able to deduce the expected pigmentation of the Anchiornis huxleyi.

Check out the full article for a 3-D rendering and more detail about the science.

Posted by josuah at 6:47 AM UTC+00:00 | Comments (0) | TrackBack

December 29, 2007

Why Hot Songs Are Crap

Rolling Stone has an excellent article about why compressed songs sound bad. The practice of compressing music is also referred to as mixing "hot", because all of the sounds are boosted until they all measure close to the max decibel level which is usually displayed as red and white on a spectral analysis graph. This can also result in a form of clipping when a frequency is boosted such that its amplitude hits the ceiling for too long. Imagine a sine wave that has a peak of -0dB. To the left and right of the peak, the amplitude drops. But if the entire signal is boosted, the areas to the left and right of the peak will also be at -0dB.

This is one of the most annoying aspects of music produced today because really high end gear will expose these problems. But on the other hand, it does mean that for lots of music, you won't hear much difference if you listen on high end gear or mass market gear. In other words, if that's the sort of music that you listen to, you don't need to spend time or money on good speakers or electronics. Things may actually sound better to you if you don't, because a high-frequency roll off will make it less fatiguing to listen.

Well mastered audio on good gear will sound loads better though. I've remarked before about an album from Tosca, classical music, and other well mastered CDs that let you hear the instruments and performers. Wide dynamic range adds a lot of depth and captures the meanings behind a passage that is supposed to be done with fortissimo instead of pianissimo.

Posted by josuah at 12:44 AM UTC+00:00 | Comments (0) | TrackBack

December 12, 2007

2013: No North Pole

Recent modifications to arctic melting models by Professor Wieslaw Maslowski and his colleagues have shown a dire result: ice-free summers of the North arctic circle. They argue that previous models which predicted this to occur decades out fail to take into account some recent observations on the annual shrinkage of the arctic ice sheet and that effect on future years. The BBC article includes statements from other scientists who support Maslowski's team's new model.

This is pretty bad. A large amount of water will be getting dumped into the oceans on an annual basis, resulting in overall rises in sea level worldwide. The animals that rely upon ice to walk on will drown. There is no land mass at the North Pole, which means when the ice melts, the only thing left will be the ocean. It looks like the disappearance will be quite sudden. No more polar bears.

Posted by josuah at 7:35 PM UTC+00:00 | Comments (0) | TrackBack

November 18, 2007

Gattaca: Today

Gem DNA by Paul ThiessenI just came across a Wired article about 23andMe, who will decode your genetic sequence for a mere $1000. After submitting a sample of your saliva, your genotype data will be available for you to view on their web site. This isn't exactly the same as the early scene in Gattaca where upon being born, Jerome is given specific probabilities for certain diseases and health problems, but it's close. Based on the latest research into genetic influence on physical, mental, and health characteristics, you can see if there is some likelihood you might want to pay attention to certain things. You can also see how genetically similar you might be to other people in general.

deCODEme is another service that does the same thing, for about the same price. I'm not particularly sure if there is any difference in these services. Technically, they should be able to deduce and tell you the same thing, at which point it just comes down to price, but more than that privacy and the user experience. Privacy is going to be the most important, because as seen in Gattaca, it will all be about the protections in place and attitudes we adopt that determine what happens with this new capability.

Posted by josuah at 4:04 AM UTC+00:00 | Comments (0) | TrackBack

October 29, 2007

Java Server Faces are Weak

I'm very familiar with Struts and I like it a lot as a MVC framework for developing web applications. However, it's a little heavyweight, because it supports a lot and makes it possible to do many different things. Perhaps it would be easier to use something lighter for smaller web applications, like JSF in conjunction with the JSTL. As it turns out, JSF is pretty weak and doesn't even work with JSTL because there is no way for the tags to reference the information owned by the other.

JSF can be used to build HTML forms that are backed by beans. So you can use tags to create a form that will populate a bean, and likewise use a bean to populate a form. Beans can also be used to display data on the page, in general. You define the beans and their default values in a single configuration file that shared by all your pages. The navigational path between pages is also defined in a single configuration file, allowing for branching and looped paths. You can propagate beans between pages to carry information forward, and by putting logic into a bean's getters, some pure Java code as well. There is also support for some basic validators as well as custom validators, and display of errors that fail validation. Proponents of JSF argue its strengths as a MVC framework (see JSF for Nonbelievers).

However, there are some problems with JSF that I simply could not overcome. Perhaps the biggest of which is the inability to mix JSF tags with JSTL tags. JSF has a limited set of tags, not all of which provide the functionality I desire for more complex HTML generation. JSTL adds some of the tags I want (although it is not as full featured as the ones provided by Struts) but there was no way for me to reference the JSF beans directly from JSTL, to perform manipulations and iterate over values. I can shove JSF values into JSTL tag attributes, but I could not actually get a handle to the real bean object itself.

Another problem is how forms are programatically constructed using JSF tags. The form elements are given generated IDs which you have no visibility into. They tend to look like id0_id1, and are only generated at runtime. As a result, there is no way for me to reference those elements using client-side JavaScript.

Also, if you look at how the JSF MVC architecture is described by Richard Hightower, you'll notice there is not actually a clear separation between the model and controller. If there was, you would not need to reference the controller or its business logic from the model. Some might argue that's not so different from a controller that is referencing the model and its data, but the JSF approach is backwards because it prevents code reuse. In other MVC approaches, I can use the same model in many different controllers, where the data is the same but the business logic is different. In the same way I can use the same model in many different views, to change how I want to present the information.

All of the problems I've described do not exist in Struts. I am not familiar with the Spring Framework though, which is supposed to be a very good alternative to Struts. The documentation on Spring that I have looked at seemed to require thinking about things from a different perspective, but if you do so then you have a very powerful tool. There's also Stripes, which I have only taken a very brief look at. From the Quick Start Guide, it seems like Stripes specifically merges the model and controller into one class on purpose, to make things easier on the developer. But that creates the same reuse problem I described above with JSF.

Posted by josuah at 6:09 PM UTC+00:00 | Comments (0) | TrackBack

October 11, 2007

SqurirelMail versus IMP

I've been using IMP, part of the Horde Project, for a long time now as my primary webmail interface. I recently upgraded my server to the latest version release, and in doing so decided to go off RPMs for my webmail, instead of manual install as I had been doing before. But I noticed SquirrelMail in the list and recalled that SquirrelMail is the webmail system that ships with Mac OS X Server so maybe it's worth giving it a try, even though the screen shots didn't look all that appealing.

I gave it a try, but in the end I've decided to stick with IMP. SquirrelMail is functional, but it does not have all the interface conveniences that I've gotten used to using IMP. It's core install is very bare-bones, and additional features and interface customization must be done through plug-ins. There are a lot of plug-ins and it's an open architecture, so SquirrelMail is much more customizable than IMP, especially if you want to do something particular. But I don't have interest in doing that when all I want is a webmail system that is efficient to use and makes it easy to visually identify things and navigate my mail.

A few examples of shortcomings in SquirrelMail, with the plug-in set I found: the inability to mark messages as unread from the message viewing page itself; failure to identify the Cyrus mailbox hierarchy; and not being able to choose to go back to the message list window instead of the next message when finished viewing a message. I also found the built-in CSS themes lacking the contrast that makes IMP and Horde easy to read out of the box.

Posted by josuah at 5:08 AM UTC+00:00 | Comments (0) | TrackBack

October 5, 2007

Integrating Delicious Library

Ars has a preview of Delicious Library 2, which includes an HTML export feature that looks really good. (Except for squashing all images to squares.) Their screen shots show stuff that looks a lot better than what I've currently got for my music library. Of course, I'd want to integrate the look and feel into my web site anyway, but I'm sure there'll be enough to work with however this feature generates the HTML.

Delicious Library HTML ExportBut what got me thinking is the star ratings. You can rate any item in your library, which is good and cool. But the contents of your library are likely to be duplicated elsewhere, as far as ratings are concerned. Three quick and easy examples I can think of are for music, movies, and anything you've rated on Amazon.com, where Delicious Library pulls some of its data from. I wouldn't want to rate my movies on both Netflix and in Delicious Library. Or music in both iTunes and Delicious Library. Or on both Amazon and Delicious Library. Instead, it'd be super cool if Delicious Library could pull my ratings for items I've put into my collection from these different places. And cache them locally, of course, because it would really suck for those ratings to go away if I wasn't able to pull them anymore at a later time.

Posted by josuah at 5:54 PM UTC+00:00 | Comments (0) | TrackBack

September 28, 2007

IBM Italian Union Labor Strike (in SL)

This hasn't been covered by the MSM as far as I can tell, but apparently IBM is reducing the pay for some of its employees in Italy as labor union negotiations have failed. Many of the affected IBMers held a protest in SL declaring a general strike.

The strike is interesting not only because it took place in SL, which has its own meaning in terms of publicity for the cause and the ability for participants to get together, but because IBM has a huge stake in SL as a corporation. IBM has tried to embrace SL, I think believing that it has an opportunity for first-mover advantages by investing time, money, and other resources in the development of that virtual world and its economy and technology. But the strike is a reminder of how the lines between RL and VR are disappearing.

Posted by josuah at 6:26 PM UTC+00:00 | Comments (0) | TrackBack

September 1, 2007

Installing Ruby with MySQL Support on Mac OS X

Karen came to me today asking how she could get Ruby to connect to MySQL, because she was having a lot of trouble following some instructions she had found online for compiling and installing the MySQL library herself, for her research work at Stanford. I thought it would be easier to help her install the Ruby MySQL library on her Mac instead, and then connect to the Stanford database remotely. She is not working on a web application, and does not want all of the additional stuff associated with Rails, so I needed something that would be very simple for her to install herself, with instructions from me over IM.

I found the easiest combination was the following:

First Karen installed the three items included in the MySQL Mac OS X package: the server, preference pane, and startup support. She doesn't need to run the server, but installing it creates the /usr/local/mysql directory with all of the client-side drivers. The preference pane and startup support are just there to make things easier for her to work with.

Next, she installed the One-Click Installer. Mac OS X comes with Ruby already, but only the base interpreter. I couldn't find gem anywhere, and the One-Click Installer includes a bunch of stuff including RubyGems. So now Karen has a more up-to-date version of Ruby installed in /usr/local.

At this point, Ruby 1.8.6 is installed with RubyGems 0.9.4. Typing which ruby in Terminal showed that the /usr/local/bin/ruby executable was already being picked up instead of the one that came with Mac OS X. Now we needed to install the MySQL libraries so she could write scripts to interact with her database. This is done using RubyGems at /usr/local/bin/gem.

karen$ sudo /usr/local/bin/gem install mysql -- --with-mysql-dir=/usr/local/mysql

The first time, this returned an error about not being able to find the mysql gem. However, running the same command a second time it worked just fine and asked which version of the mysql gem to install.

Select which gem to install for your platform
1. mysql 2.7.3 (mswin32)
2. mysql 2.7.1 (mswin32)
3. mysql 2.7 (ruby)
4. mysql 2.6 (ruby)
5. Skip this gem
6. Cancel installation

Karen picked #4, and after a short while it reported success. However, all is not well yet because there is a bug in the mysql.bundle file that was created by the installation. It references the MySQL dynamic library as /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib when the correct path is /usr/local/mysql/lib/libmysqlclient.15.dylib. Note the extra mysql in the incorrect path.

To fix this, you need to run the install_name_tool which can be used to change the name of dynamic libraries in a Mach-O binary. As it turns out, there will actually be two mysql.bundle files created as a result of the gem installation. I believe /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/mysql.bundle may be a temporary one, and /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.bundle (inside the lib directory) may be the one used during execution. However, just to be safe, since the current working directory appears to be used when Ruby is looking for libraries, I had Karen change the reference in both files.

sudo install_name_tool -change /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib /usr/local/mysql/lib/libmysqlclient.15.dylib /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/mysql.bundle
sudo install_name_tool -change /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib /usr/local/mysql/lib/libmysqlclient.15.dylib /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.bundle

Now everything is done and you can use the mysql library from within your Ruby scripts. However, you need to require RubyGems first, otherwise it won't find the mysql.bundle file.

#!/usr/local/bin/ruby

require "rubygems"
require "mysql"

Unfortunately, after doing all of this, Karen was unable to connect to her database because it does not accept remote connections. :(

Posted by josuah at 12:45 AM UTC+00:00 | Comments (0) | TrackBack

August 30, 2007

Using XFire (Apache CXF) All The Way

I thought I'd write a little bit about how to use XFire, which is now Apache CXF, "all the way". Because I think it's good to have this information in another place so people can find it easily by searching, even though a the existing framework documentation is very good. Some people may be just implementing web services by writing XML senders and receivers over HTTP. Which technically meets the definition of a web service, but does so in a way that requires everyone to do a lot of extra work.

If you really use a web services framework, like XFire or the stuff you get when you buy Rational Application Developer, to its full capabilities, then you don't even have to know that HTTP or XML is happening. In fact, you don't need a separate server or HTTP communication at all, since the underlying transmission protocol is hidden from you and might actually just be communication within the same JVM. Publication of the WSDL ensures everyone else can use your service even if they're not using the same framework you are. Of course, WSDLs don't contain meaning, so you still need documentation of your APIs. :)

Anway, for the real meat, you should check out the online documentation. But here's the skinny for making an XFire project in MyEclipse.

Server Setup

  1. Select your existing web project in the navigator and choose MyEclipse->Add Web Service Capabilities.... Alternatively, create your new project from scratch as a Web Service Project.

    Doing this adds the XFireServlet to the web.xml. This servlet is used to execute all of your defined web services. This should also add some XFire libraries to your project, and IIRC prompts you to choose which libraries you want to include. You need the core XFire libraries, of course, but you also need to pick a bean-binding library. I used JAXB because I found it did what I wanted. A configuration file services.xml will be created; I would suggest creating this file at src/META-INF/xfire/services.xml because that's where it will end up anyway (i.e. webapps/war/WEB-INF/classes/META-INF/xfire/services.xml).


  2. Create an interface. This interface will be the API that you implement on the server, and the API that clients call on the client. Here's a sample interface that I'm going to turn into a web service.

    public interface PersonService {
      public PersonMetaData getMetaData(int personId);
      public PersonMetaData[] getMetaData(int[] personId);
    }
    

  3. Create an implementation of the interface to go with the interface. The naming convention I've seen is to stick Impl on the end of the interface name.

    public class PersonServiceImpl implements PersonService {
      public PersonMetaData getMetaData(int personId) {
        return new PersonMetaData(personId);
      }
    
    

    public PersonMetaData[] getMetaData(int[] personId) {
    PersonMetaData[] metaData = new PersonMetaData[personId.length];
    for (int i = 0; i < personId.length; i++)
    metaData[i] = new PersonMetaData(personId[i]);
    return metaData;
    }
    }



  4. Now you need to define the web service and map the interface PersonService onto the implementation PersonServiceImpl. This is done by editing the services.xml that was created earlier. This is what my services.xml would look like for this PersonService web service.

    <beans xmlns="http://xfire.codehaus.org/config/1.0">
      <service>
        <name>PersonService</name>
        <serviceClass>com.netflix.PersonService</serviceClass>
        <implementationClass>com.netflix.PersonServiceImpl</implementationClass>
        <style>wrapped</style>
        <use>literal</use>
        <scope>application</scope>
      </service>
    </beans>
    

  5. At this point, you're good to go. Deploy your web project using MyEclipse and start up Tomcat. If everything's good, you should see a bunch of XFire-related initialization messages printed out on the console. Assuming no exceptions are thrown during startup, your web service is up and running and your server-side is done.

    To get to the WSDL which you can use for automatically generating the client-side code, access your web application via the URL http://hostname:port/war/services/. Your deployed web services will be listed, along with a WSDL link. Clicking that link will give you the WSDL that you can give to someone else or use yourself.


Client Setup

  1. Using MyEclipse, you can generate the client-side code from the WSDL. I recommend creating a new Java project that will act as your client project, as the automatic code generation will create and overwrite existing files if it thinks it needs to. Plus, it lets you see exactly how someone else would put together a client if all you gave them was the WSDL.

    To generate the code, use File->New->Other... and select MyEclipse->Web Services->Web Service Client. You'll have to either provide the URL (http:// only because MyEclipse's XFire plug-in does not support SSL) to the WSDL or the file on disk. All the client-side classes will be created in the client project in the same packages as on the server, and then you can use them.


  2. Assuming the client code generated is from the WSDL of the server interface described above, here's how you would use it.

    public static void main(String args[]) {
      PersonServiceClient client = PersonServiceClient();
      PersonServicePortType service = client.getPersonServiceHttpPort("http://remote:port/war/services/PersonService");
      PersonMetaData mmd = service.getMetaData(12345678);
      ArrayOfInt personIds = ObjectFactory.createArrayOfInt();
      personIds.getInt() = new int[] {12345678, 23456789, 34567890};
      ArrayOfPersonMetaData aommd = service.getMetaData(personIds);
    }
    

    Note that the parameters and return types might be JAXB objects like ArrayOfPersonMetaData or ArrayOfInt. So the API is not exactly the same as you might expect. However it might be the case that if you build the client code in the same project and source folder as the server code, your client code uses the original class definitions. I'm not entirely sure since I haven't tried that, but I believe it may work. Either that or it'll overwrite your existing class definitions. :p

    Also, I'm not entirely sure about how you'd go about assigning the personIds.getInt(). I'm just guessing from memory, but it should look something like that.


Posted by josuah at 10:03 PM UTC+00:00 | Comments (0) | TrackBack

August 28, 2007

SOAP or REST

Even though REST has been around for a while, I'd never looked into it before today. Essentially, REST is an alternative approach towards web services, with the other widely adopted idea SOAP. However, while SOAP is a standard and provides a WSDL that defines an interface by which clients can make use of the web service in an implementation-independent fashion, REST is tightly coupled to the HTTP 1.1 specification and provides no clearly defined interface. For that reason, while I think REST is useful in some cases, in general I would prefer SOAP if possible because it is more flexible, implementation-agnostic, and "strongly typed" so to speak, whereas REST is restricted to a few specific actions, tied to HTTP, and "loosely typed".

To go into further detail, it's important to understand the difference between how REST and SOAP/WSDL are implemented and used. REST identifies a single resource with a URI. I'll use the example of http://www/service/person?id=123 to identify the person of ID 123. The web service might then support the operations GET, PUT, POST, and DELETE which correspond to the four actions you can perform on a person. GET requests would return some XML like


<person>
<id>123</id>
<name>Wesley Miaw</name>
<sex>male</sex>
<age>27</age>
</person>

The PUT and POST methods would include in the request body identical XML that would be used to update or create a person object respectively. While a DELETE method would delete a person object.

With REST there is nothing to define exactly what is okay and what is not okay for the request body XML. I could put something completely different for the value of sex and there's nothing on the client side that says that value is illegal. There's also nothing that would prevent me from putting some random junk into the request body. The only way I can know if I sent the wrong kind of content from the client is to get an error response back from the server. That's why I consider REST to be similar to an interpreted, loosely typed, scripting language.

In contrast, the WSDL for a SOAP web service would specify exactly what types of values can be specified, and it would be a client side error to try and put a string type into a parameter that the WSDL defines as an integer. Any client side implementation that conforms to the WSDL would be able to enforce this restriction without requiring support for arbitrary errors in the server response. So now, the server only needs to return errors that have meaning at the application layer, rather than at the language layer. For example, will be errors for trying to update a non-existent person or if the client is not authorized to perform the transaction, but no errors for trying to shove an integer into a string.

There is something akin to WSDL which some people are using for REST, called WADL. WADL does enforce types, which is good, and it also defines the interface and supported HTTP methods. There are also WADL code generators.

With WADL, REST gets back type safety, but it still doesn't get back all of the flexibility of SOAP since you're still restricted to HTTP methods (unless you make the URI specify the method, which is not how REST is defined or how WADL describes the service) and you are still working with the idea of resources or objects instead of actions or commands. Plus, you are still closely tied to the actual communication protocol, HTTP. The REST versus RPC section on Wikipedia describes the restrictions of REST pretty well.

In comparison, with SOAP I might define a PersonService that has methods like void setAge(int) or Car getCar() to change a person's age or find out what kind of car he drives. A REST implementation would require a new URI specifically for a person's age and to access a person's car, for this level of granularity. The URI to a Car URI might be found in the returned Person object.

Of course, REST does have some significant advantages over SOAP.


  1. It's much easier to understand what is travelling over the wire, because a resource is a URI and the different HTTP methods are the actions.

  2. It sends less data over the wire than a SOAP message, because SOAP includes an envelope that wraps the actual data.

  3. Tighter coupling between web server infrastructure and the web service. You basically can get for free any of the things you take advantage of with regular web servers, like caching and access logs and simple web browser clients.

As a side, Apache CXF does support RESTful services, but does not support code generation from a WADL. The older XFire implementation does not support REST in any form.

Posted by josuah at 1:14 AM UTC+00:00 | Comments (0) | TrackBack

August 12, 2007

XHTML as HTML and True Image Overlays

I ran into two issues while trying to make sure my new web site is compatible in Safari, Firefox, and Opera. (Internet Explorer 6 makes up about 30% of my traffic, and Internet Explorer 7 about 20%, but I am not going to use non-trival hacks to deal with a non-compliant browser.) The first issue was a situation in Opera where the Gallery popup images would not display. The second was the different overlay behavior of the Gallery popups in Safari, Firefox, and Opera. You can view the behavior I tried to make identical in all three browsers by clicking on any image in my photo album; the page should be covered with the full-size image and some controls at the bottom, and clicking on the info icon in the lower-right should show image details in a popup frame that is visible above the full-size image.

The first problem was Opera would not display the full-size image popup at all. It complained about the return value of a document.getElementById() coming back as undefined. However the same call worked just fine in Safari and Firefox. I posted a question getElementById returns null for empty anchor on the Opera community forums, and got a relatively quick reply explaining how even though the doctype and markup is valid XHTML 1.0 Strict, the MIME-type in the HTTP response headers is text/html. And having self-closing tags like <span /> results in bad things happening when the DOM structure is modified with JavaScript.

This is explained in further detail in Understanding HTML, XML and XHTML and in my forum reply, but the short of it is that changing the Content-type to application/xhtml+xml made using self-closing tags work, but broke everything else. Safari was no longer loading images correctly because the URLs didn't get sent out correctly. Firefox complained about something bad in the DOM structure. JavaScript was not being processed or executed even when using the <![CDATA[ ... //]]> modification.

For all those reasons, plus having HTML 4.01 embedded in my older blog posts, I changed the Content-type back to text/html and am instead making sure to use a full closing tag on any XHTML elements that require closing tags in HTML 4.01, such as <a> and <div>. I'd actually noticed that Safari wasn't doing the right thing all the time when self-closing elements like div, but didn't know the reason why until now.

The second issue was a little easier to resolve, once I saw how Opera was rendering things. In Safari, everything was looking how I expected it to, and how things look now in all three browsers. Firefox was doing something a little different where the header and footer divs were still appearing above the full-size image div, but my previous investigation led me to believe that was due to a case of float elements always having a z-index below those of positioned elements. But once I saw the rendering in Opera, I knew it was something else. Opera was showing the full-size image div enclosed entirely within its parent div with overflow hidden. So the fix was simple: move the image div out of its parent div and make it a child of the body. I also had to make the image details div a child of the body, otherwise it would be constrained as well and could not appear above the full-size image div.

I ended using a little bit of JavaScript to move the two divs into the body, because of how my Smarty templates and PHP header and footer include files are being used. Here's some code that does what I described:


function relocate(id) {
app_body = document.getElementById(id);
while (app_body && app_body.tagName != 'BODY') app_body = app_body.parentNode;
var imageview = document.getElementById(id);
var parent = imageview.parentNode;
parent.removeChild(imageview);
app_body.appendChild(imageview);
}

Posted by josuah at 8:27 AM UTC+00:00 | Comments (0) | TrackBack

August 6, 2007

New Web Site

Today I released the new personal web site I've been working on, which you are looking at now. This version only uses CSS for presentation, completely decoupling the display from the XHTML markup. I also have different CSS for screen and print media, which lets me do some cool things. I am using PHP for everything, including the blog archives, so I can include some programmatic behavior in the content and display. Paul asked me why PHP instead of Ruby, but PHP is much more established and almost all decent web applications are in PHP, which means easy integration. My goal for this version of the site was to make it much more visually interesting and exciting to read, and more dynamic in nature.

I originally tried to use JavaScript to make all content load into divs on the existing page, partially because I liked the idea of implementing dynamic behavior like that, but discarded the idea after struggling to make it work right for way too long. The biggest problem was dealing with dynamically loaded JavaScript. I found the most reliable way of ensuring JavaScript would evaluate correctly and in the global scope was to include the JavaScript block in some part of the actual DOM document, rather than evaluating it.

The AJAX framework I decided to go with is script.aculo.us and Prototype. The latter is actually more interesting than script.aculo.us for building interesitng behavior and custom effects. script.aculo.us just provides some stock ones that are nice and useful. I looked at Dojo for a short while, but while it has much better documentation than Prototype, I think Dojo is a little too low-level and I can be more productive with Prototype.

As a side, Prototype evaluates JavaScript returned from an Ajax.Request using calls to eval() in a local scope. Which makes it not do the right thing a lot of the time. I had to modify Prototype's evaluation code so it just inserts returned JavaScript into the page. Prototype also has a bug where it inclues all form elements on submission, instead of only identifying the elements that would be sent if the form was submitted by the browser. As a result, I had to remove the Preview button from the blog comment form.

You might ask why use Prototype to submit and display the results of the blog comment form, but unfortunately MovableType has two pages which it cannot generate PHP for: the search results and comment preview. So for those two situations, I had to use the Ajax class to display the returned XHTML inside the existing page, to maintain the look-and-feel.

Switching to PHP for the blog archives means a lot of old URLs are no longer valid, since the blog archives used to be generated with .html extensions. Rather than return 404 to everyone that's linked to these pages, including my own pages, I put a RewriteRule into the archives directory that will map requests for .html onto .php.

I also decided to discard the MyPhotos photo gallery implementation I had been using. I'd written it a long time ago, before there were really any good photo gallery web applications available, but now it is out-dated and lacks much of the functionality you'd really want. So I've switched over to Gallery, which is probably the most popular of all photo gallery web applications. It's also written in PHP, and has a very active user and developer community, and support for lots of features. It's open source, so I can figure out exactly how it works (unfortunately the API documentation is pretty lean) and customize it. It also uses the Smarty template engine, so I ended up learning how that works. The only thing missing from the current version of Gallery is being able to override module templates from the theme. That's scheduled for release in the next version though.

Unfortunately, trying to do things in pure CSS has one major problem: Internet Explorer. Despite being the most used web browser, it's also the worst web browser. It never supports the web standards the rest of the browsers do, and the web standards it does support it does so in incomplete or incorrect ways. Its parsers are broken, and its rendering is wrong. Internet Explorer really is still the worst thing to happen to the web.

My first implementation does not work with any version of Internet Explorer. I fixed it a little so it would work with IE 7 by removing all uses of CSS @import, but IE 7 still won't work with the dynamic behavior I am using in my custom Gallery theme (based off the Hybrid theme). And if you try and view my site in IE 6, it looks completely broken. I suppose this is a little better than my previous site, which wouldn't even necessarily display in IE at all, because it was valid XHTML which wouldn't parse correctly.

One last thing I wanted to make sure of was that I wasn't going to lose all the work I'd put into the previous site. So before switching everything over, I installed Subversion and checked everything into a new repository. Now that I've switched over, a lot of the old documents are deleted or changed, but I still have them in the repository and can get them back whenever I might want in the future.

Posted by josuah at 2:45 AM UTC+00:00 | Comments (0) | TrackBack

August 3, 2007

6Mbps DSL Line Testing

Raw Bandwidth just announced availability of 3-6Mbps down, 512-768Kbps up residential DSL service. With increased use by Luna, my desire for a more visually rich personal web site, and expectations regarding video download in the near future, I decided it was worth the additional monthly cost. However, my existing Alcatel 1000 was not getting good enough sync, and the Westell modem Mike sent me was also having sync issues. So with Mike on the phone checking sync, I tried a bunch of stuff to try and get a better signal.

The first thing we tried was hooking the Westell directly into the line at the outside box. That connection had good sync readings. But plugging directly into the line upstairs did not. At that point I went around trying different telephone jacks and it turns out the upstairs jack (which is a pair of jacks) is somehow wired to the kitchen jack but I'm not sure how. The kitchen jack has a huge mess of wires behind it, none of which is clearly connecting to the upstairs jacks. The left-hand jack in the new extension of the house is on a different pair and had really good sync.

But since the downstairs jack would be inconvenient, being no where near our computers, on Mike's advice I disconnected the wire between the two jacks upstairs. So now that pair runs through the kitchen to one jack upstairs, instead of two jacks upstairs. This change made the signal good, and when I attached a 3-way adapter with a pair of filters for the computer modem and telephone, the signal got even better (for some strange reason). So that's the configuration we are using now.

Posted by josuah at 5:09 AM UTC+00:00 | Comments (0) | TrackBack

July 31, 2007

More RAM

Things have been running a little slow on our primary workstation, a Power Mac G5 system I bought in Fall of 2003. So it's about four years old, but it's not slow because it's old (although it is slow compared to the current offerings) but because both it and the Linux file server don't have enough RAM, particularly now that both Luna and I are always logged in. So I ordered 2GB of RAM for the Mac, bringing it up to 4GB total, and another 1GB of RAM for the Linux server, bringing it up to 3GB total.

With the additional RAM installed, things are a lot nicer. The Mac doesn't have to page out anymore, and maximum usage hits a little over 3GB, but there's still a lot of RAM left over for me to work with if I need to do something intensive like heavy graphic design work in Photoshop. The Linux server now has enough RAM to allocate at least 200MB of kernel buffer space, while still running all of the services I need, so the Mac never needs to wait for disk over the NFS mounts.

I suspect things will be good for a few more years, before I have to upgrade either the Linux server or the Mac workstation, again. It really was the case of Luna running applications on the Mac at the same time that pushed the Mac over the edge, while the Linux server has needed more RAM for its kernel buffers for a while, but it was never really bad until Luna started using it too.

Posted by josuah at 3:05 AM UTC+00:00 | Comments (0) | TrackBack

June 21, 2007

More on Diesel

I found another resource about the problems with diesel powered transportation from the Clear Air Task Force Diesel project. They have maps and estimates of health risks due to diesel exposure in various parts of the country. They also document how installation of diesel particulate filters and ultra-low sulfur gas can reduce emissions significantly. However, all current diesel cars don't meet the necessary EPA standards. This will change as manufacterers start releasing new diesel cars that do. Matching one of these new cars with biodiesel should be very environmentally friendly.

The only exception, as I mentioned earlier, is that biodiesel produces more NOx than fossil diesel fuel. It may be more than outweighed by the reduction in other emissions, but NOx still has serious environmental and health impact.

I did find a presentation from the Department of Energy titled DPF Performance with Biodiesel Blends though. This presentation states two things of interest: NOx emissions are not significantly greater and there is a decent decrease in particulate matter exhaust with a 20% biodiesel blend. So even if you're using a diesel car right now, it really does make sense to start using a biodiesel blend for all the health and environmental benefits.

I suppose we'll have to wait until sometime in 2008 before we should buy a newer diesel car to run on biodiesel we make from vegetable oil. That timeframe isn't too bad though, since Luna still needs to learn to drive and would need a couple of years of driving experience with an old car before we get a better car.

Posted by josuah at 5:41 PM UTC+00:00 | Comments (0) | TrackBack

June 19, 2007

Prius or Hummer and the Biodiesel Question

A coworker mentioned something yesterday that I found extremely hard to believe. Apparently, it all started with a sort of grassroots publication effort, one example of which is Prius Outdoes Hummer in Environmental Damage. From there, the claim spread like wildfire. But I just couldn't believe that claim. It goes against everything my brain says would make sense. So I did some digging, and there's a lot of stuff out there contradicting that claim.

Apparently, everything started with a Dust to Dust comparison of the total energy costs of various cars over their entire life-cycle. (Note that their 450+ page paper isn't really a study or research paper. It's more of the sort of presentation you might find in a sales pitch or marketing meeting. So take it as such.) Their conclusion, which is based on a lot of seemingly thorough number crunching but no actual scientific measurements, states that hybrid cars are actually relatively expensive in terms of energy cost per mile compared to some conventional combustion engine cars.

A quick Google search for the other side of the coin will find a fairly balanced exploration into those claims in Prius Versus HUMMER: Exploding the Myth. One of the biggest counter arguments is the CNW claim of a Hummer lasting 35 years and Prius only 10 years. The Pacific Institute takes another look at the CNW report in their Hummer versus Prius:
"Dust to Dust" Report Misleads the Media and Public with Bad Science
. Although they don't provide evidence to the contrary, the Pacific Institute does illustrate a lot of reasons why you cannot trust the Dust to Dust report in their reanalysis.

I also mentioned to my coworker my desire to run our next car on biodiesel, and to make our own gas. This would give me better mileage, save money, and have a better impact on the environment. Those are my operating assumptions, of course, based on what I've read. But he responded by stating even biodiesel's soot (i.e. carbon emissions) would be extremely high, and result in a bigger environmental impact than unleaded gasoline.

So I did some more digging and found A Comprehensive Analysis of Biodiesel Impacts on Exhaust Emissions published by the EPA back in 2002. The study only included heavy-duty engines, which I'm guessing are those of 18-wheelers and their ilk, but the basic conclusion is overall emissions are radically reduced in proportion to the percentage of biodiesel in the fuel, except for NOx which increased slightly in proportion. Overall CO2 emissions remain about the same, but CO emissions do decrease.

I do need to find some hard numbers for comparision against regular unleaded fuel emissions, but this information at least is very promising. Especially when you consider the advances in engine and exhaust technology that would still apply to diesel engines (sort of) that were more recently manufactured.

Posted by josuah at 6:18 PM UTC+00:00 | Comments (0) | TrackBack

June 11, 2007

Mac OS X: Leopard

The new features of Leopard were presented today at the WWDC up in San Francisco. The new features and changes are very exciting. A lot of applications have been revamped and improved, and there's even greater network and application integration that I'll find very useful. But the biggest improvements are those related to file management. I think those features will fundamentally change how some things are done on a day-to-day basis.

Some of the new stuff is just eye candy, like the dock reflections and additional transparency. But some of the eye candy is actually useful, like how the new document stacks are animated (probably using Core Animation). Document stacks are sort of like popup collections of files available in the dock. This is a little like keeping a folder shortcut in your dock's document section, but not as restrictive since there's no filesystem boundary required; the files can be from anywhere.

I really like Quick Look too. A lot of times I open things like TextEdit or Preview just to take a look at something quick, only to close the application again or leave it open. But with Quick Look, that's no longer necessary. Document rendering filters that are plugins for the Finder will allow you to read entire documents without having to open any additional applications. Of course, I expect there to be a computational and memory hit associated with the running Finder. But from a usability standpoint, Quick Look looks great.

I am also really looking forward to using Time Machine. Basically, this is a continuous incremental backup system, but with hooks for the Finder to actually get to the backed up documents quickly and make use of them. You need a second hard disk to serve as your backup repository, and probably the bigger the better. I suspect it'd be best to get an enclosure so you can continually replace the hard disk with something bigger. A feature like this also makes a Leopard server even more attractive. I've already been contemplating moving to a Mac OS X server to take advantage of its groupware support. BTW, this idea isn't new; I first read about it with the Elephant filesystem. Also, in comparison to Windows Vista's System Restore, Time Machine is much more comprehensive, easy to use on a regular basis instead of as a special case, and works on individual files and is integrated with search.

I think Spaces is an excellent addition, although one I won't use that much. I may use it more frequently at work, where I have more limited screen estate and will often keep different application sets and window sets open for multitasking.

There are also a bunch of important UNIX-layer improvements: official POSIX compliance; a new version of Terminal that claims to be more Unicode friendly which might be helpful for Luna since she deals with so many Japanese and Chinese files; Kerberos NFS authentication that has long been lacking. The new Directory Utility looks like there might finally be a GUI for managing network mounts.

A very promising developer addition is Xray, a profiler that lies on top of the DTrace framework that was ported from Solaris. This looks really cool.

Posted by josuah at 8:23 PM UTC+00:00 | Comments (0) | TrackBack

May 13, 2007

An Inconvenient Truth

I finally got around to watching An Inconvenient Truth, a documentary about global warming focusing on the personal crusade of former Vice-President Al Gore to educate people about this "climate crisis". A real quick presentation about the issue was given at the 2006 TED conference, which you might want to check out. I greatly respect Gore as one of the very few really educated and contemporarily-savvy politicians of our time. And the global warming problem is one that I have believed in for a long time now.

I think one of the primary reasons I really liked this documentary is because it feels less like an opinionated exposé or personal agenda and much more like the sort of presentation or lecture you might find in academia. Of course, due to the nature of the presentation, the actual research and science involved is glossed over, but it's important to note that the scientific results and their projected impact on our world are presented. Which is where things change from opinion and subjective points of view or conjecture into real scientific data, interpreted in a scientific manner, and presented for public consumption.

One thing of note about the DVD is there's a 30 minute extension in the extras that half rehashes the existing talking points of the presentation in the documentary, and half brings in new information about the topic that is related to those talking points that have come out of research since the movie was produced. It's probably of interest to some people, but if you've already accepted the situation then it's probably not worth the time. Might be better to find newer information on the web.

Posted by josuah at 8:36 AM UTC+00:00 | Comments (0) | TrackBack

May 3, 2007

Raidmax X-1 ATX Mid-Tower Case

side windowThe summer is back and the days are getting hotter. This past weekend the outside temperature hit 29°C. Which translates into really hot in the computer room. The PowerMac G5 started locking up again, due to heat, and eventually something went wrong with the hard disk. I tried erasing it but afterwards the controller would just lock up while trying to communicate. Happened when I switched the disk over to my Linux box as well. So we're going through some cooling upgrades. The first is a Raidmax X-1 case.

I ended up picking this case after reading about it in an AnandTech comparison. It wasn't the coolest of the bunch, temperature-wise, but it won me over with some of the features and the acceptable price point. I am not interested in a nicer looking case that costs another $50. I just need it to do its job from a technical perspective.

temperature read-outI think my blog would be more interesting with more pictures, so I'm including some pictures off the Raidmax product page of the features that I really like. The first is a front panel temperature read-out, attached to an internal thermometer. This will give me a real easy indication of how things are inside, and if things are too hot. The front panel also has nice animations for fan and hard disk activity. But I believe the fan image only keeps track of whatever one fan you choose to attach to its lead, which means you might not notice if one of the many fans you've got inside has crapped out.

screwless locksAnother great feature is screwless locks for the drive bays and card slots. It's about time I picked up a case with this sort of feature. Unfortunately, the screwless capabilities do not extend to the actual enclosure. You still need to use screws to keep the case shut and attach things like the power supply. Screws should just go away completely. Thumbscrews would have been an easy addition for the top and side panels, but Raidmax decided not to go that way.

It turns out that Luna's always wanted a computer case like this one, which is fancier than older models (although more commonplace today) and includes a window on the side. But her mom never let her get one before because she was afraid the side window being made of plastic would break too easily. So far, the fans are keeping the case fairly cool and the spacing and arrangement of the hard disks allows for good air flow over them. I do need to order another 120mm fan for the front panel right before the hard disks though, as the case does not come with one.

Posted by josuah at 8:40 AM UTC+00:00 | Comments (0) | TrackBack

October 31, 2006

https:// TrackBack Pings

So I checked the source for Movable Type and the MT::Util module's is_valid_url function seems to be okay with URLs that begin with https://. So I should be able to accept pings from sites that are running under SSL. If anyone pings me and it turns out this isn't the case, please let me know. I'm rarely pinged anyway.

Posted by josuah at 6:08 AM UTC+00:00 | Comments (0) | TrackBack

June 4, 2006

Mayor Bloomberg's JHU Address

New York City Mayor Michael R. Bloomberg gave a moving and insightful graduation address to the students of John Hopkins University. I'm pleased to hear of his opinions on certain topics, which happen to match my own opinions on those same topics, and to know he is making a stand for it, at a time when politicians tend to be more concerned with their position and belief in fallacies than with taking the time to understand and make intelligent decisions.

Posted by josuah at 8:56 PM UTC+00:00 | Comments (0) | TrackBack

May 16, 2006

Free SkypeOut

Skype (an eBay company) announced today free SkypeOut to landlines and mobile phones in the US and Canada until the end of 2006. What does this really mean? It means no single U.S. or Canadian person with an Internet connection, dial-up included, has to pay for long-distance phone calls. For the rest of the year. No matter what. Seems eBay's investment is paying off big-time for consumers, and the telcos are going to be hating this because one of their massive cash cows just disappeared.

Posted by josuah at 3:04 AM UTC+00:00 | Comments (0) | TrackBack

April 27, 2006

Canadian Music Creators Coalition

A number of Canadian musicians have formed the Canadian Music Creators Coalition. This group was created to stand against recent political and legal "abuses" that have been harming the reputation and consumers of the Canadian music industry. The three goals of this coalition are to make it clear that suing consumers is bad, DRM is a risky and more often than not negative proposition, and to promote local Canadian music. They also want to make it clear that the labels are not looking out for the best interests of musicians or consumers. The top three coalition members listed on the home page are: Barenaked Ladies, Avril Lavigne, and Sarah McLachlan.

Posted by josuah at 9:36 PM UTC+00:00 | Comments (0) | TrackBack

April 17, 2006

DMCA's Unintended Consequences

The EFF has published version 4 of their DMCA Unintended Consequences document, which lists ways in which the existence (and not necessary the litigation of) the DMCA has negatively impacted technological advancement and existing rights in the United States. The geographical distinction is important, as the rest of the world is not bound by the DMCA and may continue to operate without its burden, but in doing so can no longer engage in trade of technology or information with the United States, its citizens, or people who do interact with the United States.

Posted by josuah at 5:53 PM UTC+00:00 | Comments (0) | TrackBack

April 12, 2006

iPods for Senators

A while back, IPac started a donation campaign to send iPod's to every U.S. Senator after the Committee on Commerce, Science, and Transportation chairman revealed during a hearing that after getting an iPod he suddenly understood how the "Broadcast Flag" and "Audio Flag" would be detrimental to both consumers and technological advancement. The MPAA and RIAA representatives at that hearing were blind-sided by his questions. Donate today.

Posted by josuah at 2:38 AM UTC+00:00 | Comments (0) | TrackBack

April 10, 2006

Testing Darwin

Came across this article called Testing Darwin off Brad Fitzpatrick's LJ. It's an incredibly interesting read, as it discusses the experiments several researchers have done over a number of years now involving an artificial life program called Avida. In this simulation, software programs can mutate and are rewarded or punished (from a survival point of view) when they succeed at processing numbers (i.e. resources). The results of these experiments are extraordinary.

Posted by josuah at 6:17 PM UTC+00:00 | Comments (0) | TrackBack

March 1, 2006

Bio-Diesel Cars

Looks like bio-diesel is getting some coverage in the mainstream press, finally. Although it seems to be because kids built a soybean-fueld car, rather than because adults did it. However, the current leader in removing its dependence upon fossil fuels is Brazil. Whenever I might need to buy a new car, I'll be seriously considering bio-diesel.

Posted by josuah at 6:01 AM UTC+00:00 | Comments (0) | TrackBack

January 12, 2006

Email to Susie Suh

I wrote an email to Susie Suh's representatives regarding the large FBI anti-piracy emblem that appears directly on the face of the physical compact disc I received as a replacement from Sony BMG. The email content follows:

Hi,

I just received my replacement non-XCP damaged Susie Suh CD through the Sony BMG replacement service (it took quite a long time, I'm sorry to say) and I thought Susie might be interested in knowing that on the CD itself, the top has a large FBI Anti-Piracy emblem. It's so large, in fact, that looking at the CD makes one think this CD is an FBI Anti-Piracy CD, and not a Susie Suh CD.

If it were my CD, I'd be a bit annoyed at this fact, since that certainly isn't the first thing I'd like someone to think of or see when looking at my CD, or to have the thought "FBI Anti-Piracy" so closely associated when someone thinks of me or my music. Unfortunately, that's the first thing that hit me in the face when I got the replacement CD. It's not the greatest thought association to have in my head.

Sincerely,
--
Wesley Miaw
wesley@wesman.net

Posted by josuah at 4:03 AM UTC+00:00 | Comments (0) | TrackBack

January 10, 2006

Susie Suh Replacement CD

I received my replacement CD of Susie Suh yesterday, after several weeks of waiting since I sent the original back sometime in Novemeber. At least I got it back, although I was sort of starting to wonder since it was taking so long. The length of time is no doubt a source of annoyance for some people, but I did have a copy of the CD for my car and the tracks imported to my computer anyway.

The XCP reference is gone from both the CD and jewel case, replaced by a fairly large FBI anti-piracy warning label. On the CD itself, the label is larger than any indication of Susie Suh herself, so you might be inclined to believe the CD is an FBI anti-piracy CD. I wonder if Susie Suh is aware of this and if she has any opinions on that matter. Perhaps I should stop by her web site and ask.

Posted by josuah at 6:22 PM UTC+00:00 | Comments (0) | TrackBack

December 20, 2005

Intelligent Design Ruling

U.S. District Court Judge John E. Jones III has ruled against the Dover school board on both counts of the very important intelligent design court case. This is an important ruling because it establishes two facts. First, that the school board's motives were clearly to push religious ideology into the classroom, and second that intelligent design is unscientific and a religious concept. The latter is most important in that it sets legal precedent that would prevent other attempts at introducing ID into public schools. Yay for intelligent judges!

Posted by josuah at 6:07 PM UTC+00:00 | Comments (0) | TrackBack

December 10, 2005

Fantastic Voyage / Voyage to the Bottom of the Sea

Fantastic Voyage was a great film when it came out for its special effects and imaginative set construction of the inside of a human body. The story is interesting because it takes the audience through a tour of the human body, and explains a little bit of how things work and are connected without being overbearing. It's too bad Raquel Welch wasn't given more lines though; the few lines she did have were well done. Instead she was put on as eye candy.

On the other side of the disc was Voyage to the Bottom of the Sea. This movie, on the other hand, was not very good at all. It had a bunch of clichés and it seems like the writers decided to throw every predictable conflict into the movie. The only good part of the film was the tension that remained constant as you tried to determine if Admiral Nelson was insane or the only hope for survival. Joan Fontaine and Barbara Eden were given equal opportunity as well.

One thing I found interesting was that in both movies, there was a time at which religion is juxtaposed with scientific thinking. In both cases, the discussion is extremely short-lived and left without any opinion one way or the other. Seeing the intelligent design versus evolution debate pop up for a few seconds in Fantastic Voyage is rather amusing given the current climate on that subject.

Posted by josuah at 8:23 AM UTC+00:00 | Comments (0) | TrackBack

November 27, 2005

OpenSuSE 10.0

Ever since upgrading my server's hardware to an Athlon 64 architecture, I've been unable to boot directly off the hard disk. So with the long weekend I decided to try an upgrade to OpenSuSE, the free release of SuSe after being purchased by Novell. Thankfully, it seems that the original SuSE people are still the ones in charge, because the OpenSuSE documentation and packaging is just as great as it's always been.

Unfortunately, I ran into quite a few snags trying to upgrade my 32-bit SuSE Linux 9.1 Professional installation to the 64-bit OpenSuSE 10.0 release. And, the DVD I created from the CD images was lacking quite a few packages. I ended having to back up my root partition and do a completely fresh install that included formatting the boot and root partitions. That's probably a good thing anyway, as it means my system is pretty much cleaned up of junk. I spent about twelve hours migrating my old system configurations to the new installations. Probably about twice as long as if the upgrade process had worked successfully.

In case you're wondering what sorts of problems I ran into during the upgrade process, here are some of the things I ran into. Many packages were listed as no longer maintained as part of OpenSuSE, and as a result, a few dozen of my packages were slated for deletion by YaST2. Although I didn't know it at the time, this is likely to have been the result of missing packages on my DVD. A dependency check complained a whole bunch about requiring an x86_64 version of the glibc files. I couldn't get this to go away. I tried to do a clean install without formatting my partitions as well, but the installer failed when trying to write the /etc/fstab file, even if that file was already removed. And after completing package installation, the boot setup always failed while trying to make the initrd image. Basically, it just didn't work.

Unfortunately, I'm still getting a GRUB error if I try to boot off my hard disk. But at least the error message is more informative and says there's a geometry incompatibility or something, instead of just saying error. I've switched to LILO to see if that might work better, but haven't tested it yet.

I've been up for almost twenty-four hours now, so I'm going to go to sleep soon.

Posted by josuah at 12:22 AM UTC+00:00 | Comments (0) | TrackBack

November 18, 2005

Disappearing Colored Bubbles

There's this excellent article in Popular Science about the efforts of Tim Kehoe to create colored bubbles. As in the bubbles you blow out of soapy liquid, but these bubbles are a single bright color. It's like seeing something magical, or special effects from a movie. But in a few years time, I'm sure little kids will always think that colored bubbles are something normal. This is definitely very cool. Check out the video.

Posted by josuah at 5:44 AM UTC+00:00 | Comments (0) | TrackBack

November 17, 2005

The 1984 Apple Commercial

Owen Linzmayer has released a portion of his book, The Mac Bathroom Reader, for public consumption on Curt's Media web site. The excerpt is titled The 1984 Apple Commercial: The Making of a Legend. For those who are unfamiliar with this commercial, it is the most successful and most popular television advertisement of all time, and won dozens of awards.

Posted by josuah at 7:25 AM UTC+00:00 | Comments (0) | TrackBack

November 10, 2005

Infected by XCP

I discovered today that I may in fact have purchased a copy-protected Sony CD. A while back I purchased Susie Suh's debut album. Turns out this is on the list of copy-protected CDs. At least I don't use Windows, so my computer hasn't been compromised.

Posted by josuah at 6:57 PM UTC+00:00 | Comments (0) | TrackBack

November 1, 2005

Sony CD installs Windows Rootkit

Came across this blog entry by one of the SysInternals crew: Sony, Rootkits and Digital Rights Management Gone Too Far. Mark Russinovich recently purchased a CD published by Sony that comes with a data session and installs some DRM software on Windows machines. Turns out this DRM software is hides itself from the user by employing rootkit-style tactics. And this software is extremely bad for you to have on your computer, both for what it does, what it uses, and for being poorly implemented.

Posted by josuah at 2:19 AM UTC+00:00 | Comments (0) | TrackBack

October 29, 2005

iCal Support for PHP iCalendar

It has been an extremely long time since I did any work for PHP iCalendar. During that time, the web site had been cracked through a PHP exploit and was down for quite a while. Apple's iCal application also underwent a calendar repository redesign, causing an incompatibility between PHP iCalendar and the native repository. Anyway, long story short is I've got changes pending to support the new iCal repository structure, as well as a couple of bugs. I'll check them into CVS once they've been peer-reviewed.

Posted by josuah at 8:23 PM UTC+00:00 | Comments (0) | TrackBack

October 27, 2005

Does Visual Studio Rot the Mind?

I discovered a very interesting publication by Charles Petzold entitled Does Visual Studio Rot the Mind? Petzold is a Microsoft-oriented software developer, and this publication was a talk he delivered to the NYC .NET Developers Group on October 20. I think it is pretty insightful reading that all software developers should read. The only error is that I believe many of the features discussed by Petzold were first introduced by IDEs other than Visual Studio.

Posted by josuah at 4:27 PM UTC+00:00 | Comments (0) | TrackBack

October 13, 2005

Video iPod

Apple introduced their much-anticipated and heavily-demanded video iPod today, along with a few other tidbits that are also just as juicy. The amazing thing that Apple's been able to pull off is to produce this new iPod, and deliver the content. For $1.99 you can download the latest ABC television episodes, Pixar shorts, and also music videos. The other great new products are Front Row and the iPod Remote.

I'm not too excited about the new iPod Remote, as it points at a new iPod dock. Which is very convenient if you happen to be using your iPod to move music around and for playback, but I don't. Front Row, however, is the launch of the Apple media center. Too bad it is currently only available for the new iMac. There is speculation that it may not be available for older machines; the IR requirement would need to be addressed.

Before I use a Mac for my DVD playback though, Apple needs to greatly improve its DVD Player image quality.

Posted by josuah at 4:23 AM UTC+00:00 | Comments (0) | TrackBack

September 29, 2005

JFS + Unicode/Extended-ASCII

So, my Linux box recently suffered some physical failure. An unfortunate side-effect of my current operating environment is that my JFS filesystem was no longer letting me access any files that contained unicode or extended-ASCII characters. The files were there, but could not be stat'ed. Luckily, I got an excellent reply from Dave Kleikamp at IBM on what went wrong and how to fix it. I include his reply here for posterity.

Wes:

I've been using JFS for my home directories, and recently had a hardware failure. Everything is back up now, but JFS seems to have trashed any file that contained Unicode or extended ASCII characters (e.g. ö or 刀) in the filename. I can see these files exist via an ls, but any attempt to stat or delete them fails.

Unfortunately, not only am I left with a bunch of lost data, but I cannot clean-up the dead files that are lying around anymore. fsck.jfs doesn't help.

Dave:

Are you running on a different kernel, or did the mount options in /etc/fstab change?

The quick answer is to mount with the option iocharset=utf8. This should make any file accessible.

The long answer is that the default character mapping behavior has changed between the 2.4 and 2.6 kernels, and that the default 2.4 behavior was dependent upon the setting of CONFIG_NLS_DEFAULT when the kernel is built.

For historic reasons, jfs stores the pathnames in 16-bit unicode. Since there is no reliable way for the kernel to know what character set the pathname truly are in, jfs now (in 2.6) stores every character as a 16-bit value with the high-order byte zeroed. (This is equivalent to iso8859-1.) This works well when the files have been consistently created this way. If a pathname exists that has a non-zero high-order byte, the default character conversion doesn't deal with it right. (You should see some syslog messages suggesting mounting with iocharset=utf8.)

So if files had been created on a 2.4 kernel, where CONFIG_NLS_DEFAULT was something other than iso8859-1, or if files were created when the partition was mounted with the iocharset flag, you may encounter the problems you describe. The problem can also be seen between 2.4 kernels when the iocharset differs.

Posted by josuah at 7:08 AM UTC+00:00 | Comments (0) | TrackBack

September 26, 2005

Slippery Slope of Monitoring

There's news going around of LimeWire making changes to their system to prevent the distribution of copyright materials in light of recent U.S. court rulings. The recent court ruling stated "We hold that one who distributes a device with the object of promoting its use to infringe copyright, as shown by clear expression or other affirmative steps taken to foster infringement, is liable for the resulting acts of infringement by third parties." Unfortunately, if LimeWire attempts to comply, it will set a very undesirable precedent.

Essentially, what LimeWire's system will start to do is monitor communications between third-parties to look for activity which is considered illegal. This monitoring will be constant, and if its algorithms and database suspect a party is engaging in illegal activity, the system will prevent the activity from taking place. You may be thinking, "where's the harm in that?" It's a little like video cameras in stores to make sure people don't shoplift, right?

The problem is, this is more akin to having software monitor all of your phone/email communications or financial transactions or library usage to see if you are doing anything the government doesn't think you should be doing. The difference is, all of those intelligence systems have been government programs, subject to public and congressional oversight. (Although you can argue whether or not the government seems to care about that.) This would be the first time a private company will start policing the third-party use of its system for criminal activity. And private companies are under no similar obligation to behave. This is why the FBI performs wire-taps, and not Verizon.

Posted by josuah at 1:37 AM UTC+00:00 | Comments (0) | TrackBack

September 2, 2005

Regeneration Achieved

Apparently, scientists at a US biomedical facility have finally achieved regeneration in mammals. Some genetically modified lab mice have had damaged organs and amputated parts grown back, from conditions that would have normally led to death. The scientists are optimistic that this capability can someday in the near future be transferred to humans once the proper genes are identified. Another interesting aspect is that injecting regnerative cells from one host into a non-modified host allows the second host to gain regeneration capabilities for several months. This has huge potential for medical and research purposes. It also smacks of Umbrella, Inc.

Posted by josuah at 12:38 AM UTC+00:00 | Comments (0) | TrackBack

July 31, 2005

Stem Cell Research Support

I was heartened to learn that Senate Majority Leader Bill Frist has publicly announced his support for stem cell research in the United States. With his support, there is a chance that stem cell research provisions will pass through, overriding President Bush's promised veto. While I do not necessarily agree with all of Senator Frist's beliefs on the matter, I do agree that stem cell research will provide amazing scientific advances in medicine and biology. It has the potential to revolutionize our knowledge and application in as much as genetics has already done and continues to do so.

Posted by josuah at 8:58 PM UTC+00:00 | Comments (0) | TrackBack

June 28, 2005

Successful Suspended Animation

It was reported today that scientists have successfully created zombie dogs. Or more precisely, successfully drained all of the blood from a dog and replaced it with a freezing saline solution. The dogs ceased all biological activity and remained at 7°C for three hours, before the saline solution was drained and replaced with blood. Their biological functions were restored by providing a 100% oxygen environment and an electric shock to their heart. Tests indicate absolutely no negative side-effects. We're almost there.

Posted by josuah at 2:13 AM UTC+00:00 | Comments (0) | TrackBack

June 1, 2005

Tiger is Faster

I have an old iBook Special Edition that I bought back at the end of 2000, and I'm currently using it as my music console in the home theater. I was running Mac OS 10.3 on it but 10.3 was slower than 10.2. So I downgraded to 10.2. Unfortunately, support for AirPort Express streaming music was added in 10.3. So I decided to try loading Mac OS 10.4 on it and it is actually faster than 10.3 and 10.2. Apple continues to make me happy.

Posted by josuah at 1:00 AM UTC+00:00 | Comments (0) | TrackBack

April 30, 2005

Visiting UNC

I finished working with the IBM Director people this morning, so after doing some work I left the IBM RTP site and drove over to Chapel Hill to visit some of my former professors: Ketan, Kevin, Jan, and Sanjoy. I also got a chance to visit with Josh, who was my carpool buddy during Extreme Blue. We did some catching up and talked about what's going on. Later on, I went over to the UNC Student Store and picked up a copy of Mac OS X Tiger.

John Siracusa over at Ars Technica has been providing in-depth technical reviews on Mac OS X for years now. He put together a really great review of Mac OS 10.4 along with his usual rants about what could be better. The review does make it quite clear that picking up Tiger is worth it, and that he believes Apple is making some progress in redefining (or implementing, depending on how you look at it) the modern OS for the general public. Apple is starting to bring back some of the things that made the original Mac OS so much more powerful and useful than the alternatives.

Posted by josuah at 1:11 AM UTC+00:00 | Comments (0) | TrackBack

March 29, 2005

English to Code

Computer scientists are MIT have put together a prototype tool to convert system requirements written in natural English into skeleton code. I hope they keep this going, because this will have to end the stupidness of considering code as a special sort of description, whereas the same description in a natural language is something different. Both in the eyes of the law and in the eyes of people who don't understand what a programming language really is.

Programming languages are not something special or different. They're the same as any other language, although more strictly defined and with a limited ability for expression. But the same thing applies to so-called natural languages. From what my Mom has told me, you cannot express gender of a person when speaking. And tense also cannot be conveyed. I've also been told Inuktitut has the ability to express hundreds of subtleties for snow, which English cannot. Japanese also has different speaking modes depending on the amount of respect you are supposed to convey to the listener. And also different words for saying thank you or for apologizing, depending on the situation.

Extending differences like that to programming languages is not a very big leap.

Posted by josuah at 5:47 PM UTC+00:00 | Comments (0) | TrackBack

Hair Follicle Stem Cells

Researchers in the United States, where stem cell research is strictly regulated by the federal goverment due to religious pressure, have discovered that stem cells from hair follicles can grow various tissues. The hope would be that these adult stem cells could provide many of the benefits that are known to be possible from embryonic stem cells. However, further research needs to be done to determine what differences there are between the adult and embryonic stem cells.

The linked article happens to be from a UK publication: The Guardian. Specific mention is made to the more liberal attitude the UK has taken towards stem cell research, in hopes of growing an economic sector based on stem cell research. No doubt, this attitude could also mean the UK will become a leading nation of medicine.

Posted by josuah at 5:34 PM UTC+00:00 | Comments (0) | TrackBack

March 24, 2005

T-Rex Soft Tissue Found

An amazing discovery was made the other day when scientists excavating a Tyrannosaurus rex fossil cracked the thigh bone and found unfossilized soft tissue inside. Finding tissue from a creature 70 million years old will lead to all sorts of new information and theories both about dinosaurs and the fossilization process. And it also brings us just that much closer to Jurassic Park.

Posted by josuah at 11:11 PM UTC+00:00 | Comments (0) | TrackBack

March 17, 2005

Mini Black Hole?

BBC News is reporting that a fireball with characteristics of a black hole has been created at an ion collider in New York. Researchers there state that at the levels involved, there is no risk of danger. However, this unexpected result is very similar to what was going to happen in Forever Peace. Interesting coincidence.

Posted by josuah at 5:31 PM UTC+00:00 | Comments (0) | TrackBack

February 11, 2005

The Cell Processor

Once again, Hannibal at Ars Technica has put together a processor article. This time, the subject is the Cell processor [Part I, Part II]. It appears Hannibal is attending an session hosted by IBM.

This article is a little short on details, no doubt due to the general audience nature of IBM's session, but it would appear that IBM is taking going in a new direction to meet the technological needs of straight-forward application execution. Rather than introducing a lot of complexity to optimize instruction execution and multitasking, individual Cell processors (called SPEs) are relatively dumb but fast and parallel. All the SPEs work together to do things. I view it as distributed computing on a micro level.

But I may have interpreted things wrong. Read the article to get a better understanding.

Posted by josuah at 5:35 AM UTC+00:00 | Comments (0) | TrackBack

February 10, 2005

Cyborgs are Born

Saw over at Ars Technica that researchers have given birth to the first cyborg babies. Carlo Montemagno, a researcher at UCLA, et al. grew muscles on silicon to perform mechanical actions given electronic stimuli. Expect religious backlash on this in the near future. [Screenshots: 1 2]

Posted by josuah at 8:23 AM UTC+00:00 | Comments (0) | TrackBack

February 8, 2005

Shadowmarch Vol. 1

I finished reading Shadowmarch Vol. 1 by Tad Williams last night. I first picked up his earlier Memory, Sorrow, and Thorn trilogy which is probably my favorite Fantasy book. I call it a book because it is really only one story, despite being three or four volumes. The same can be said for his Otherland collection, but I don't think Otherland was as good. So far, Shadowmarch is very good.

Shadowmarch actually has an interesting history, because Tad tried to make it successful as an online-serial-only before bringing it to print in 2004. It was very successful as far as online serials go, but not successful enough to warrant continued existence in an online form only. I could not get into it, unfortunately, because of two problems. First, the serial format meant I was limited in what I could read. I prefer to read several chapters at a time. Second, reading it on the computer screen is not as enjoyable. Pages are easier to navigate and I like to read either in bed or while listening to music. This would be possible with a high-resolution electronic book format, but not with a web page and full computer.

I actually would prefer reading novels in a form factor similar to that found on the Star Trek television shows, but technology and the publishing industry hasn't gotten there yet.

Posted by josuah at 6:11 AM UTC+00:00 | Comments (0) | TrackBack

February 5, 2005

Hannibal - Inside Hammer

Ars Technica is one of my favorite technology paper sites. It also serves as a news site (much more filtered and coherent than /.) but what I really like about it are the technology papers. Hannibal is one of the writers for Ars Technica and he just put up a paper about the AMD Hammer CPU. In traditional Hannibal fashion, it is an easy read and contains a lot of useful information.

Posted by josuah at 7:43 AM UTC+00:00 | Comments (0) | TrackBack

February 3, 2005

Microsoft iPods

Just saw this article on Wired about how tens of thousands of Microsoft employees in Redmond, WA are buying Apple iPods. Despite the fact Microsoft publicly denounces the iPod and is trying to make big money off of their WMA format and competitor portable players. Turns out Microsoft employees are telling the company big time that their product just sucks.

Some of my favorite quotes from the article are:

  • "I don't know what I was thinking. I'm sure that Microsoft employees are not buying iPods, or Macs or PlayStations." - In response to senior management expressing displeasure at the thought of Microsoft employees purchasing iPods from a local Apple store.
  • "I don't really care if it pisses them off," he said. "I'll argue why they're doing it wrong. If you want me to stop using it, give me a product that works and is as easy to use." - Manager who flaunts his iPod on Microsoft campus.
  • The Microsoft manager said he's heard from several executives who dutifully bought Microsoft-powered players, tried them, failed to get them working, and returned them in favor of an iPod.

Posted by josuah at 6:35 AM UTC+00:00 | Comments (0) | TrackBack

January 29, 2005

Resetting MT PluginData

Turns out an unfortunate side-effect had manifested itself when I tried to install MT-Notifier before making the change to support binary data storage in PostgreSQL. The MT-Notifier plugin data record got corrupted. So even after making the change, MT-Notifier would not work as it was pulling out bad data. This can be easily remedied by deleting the record for Notifier in the mt_plugindata table.

Posted by josuah at 10:23 PM UTC+00:00 | Comments (0) | TrackBack

Movable Type + PostgreSQL

I've been searching for a reason Movable Type didn't seem to want to play nice with PostgreSQL. (I prefer PostgreSQL to MySQL for databases where things are going to be changing somewhat often. Some will argue PostgreSQL is a real database while MySQL is a flat file.) Found an entry that describes exactly what is happening.

Here's a breakdown of what was changed:

sub data {
    my $data = shift;

    # Convert the data to hexadecimal.
    $data->column('data', unpack("H*", freeze(shift))) if @_;

    # Try to get the data.
    my $r;
    eval { $r = thaw($data->column('data')); };

    # Decode the hexadecimal if thaw failed.
    $r = thaw(pack("H*", $data->column('data'))) if ($@);
    $r;
}

Posted by josuah at 9:19 PM UTC+00:00 | Comments (0) | TrackBack

January 23, 2005

Comments in RSS Feed

I was searching for a way to view comments of LiveJournal entries in the RSS reader I just downloaded, and ran across this Movable Type RSS comment template entry. So I've decided to add that to my RSS feeds so anyone so inclined to subscribe to my blog can view any comments posted.

Posted by josuah at 4:19 AM UTC+00:00 | Comments (0) | TrackBack

January 17, 2005

Updated T616 Firmware

I updated the firmware in my Sony Ericsson T616 today. I purchased a Terminator Dongle off eBay and picked it up from the seller this evening. I had some trouble at first but the troubleshooting tips off that web site helped me fix it. I had to use DIV 4.0 (version 5.0 did not work). Everything went smoothly and my firmware is up-to-date. Unfortunately, I don't think it made a huge difference in the bluetooth quality.

Posted by josuah at 7:44 AM UTC+00:00 | Comments (0) | TrackBack

January 11, 2005

New Apple Products

A bunch of cool new products were announced by Apple at MacWorld Expo over here in San Francisco. Best new products? The iPod Shuffle (which doesn't interest me much for what I use my current iPod for) and the Mac Mini. The Mac Mini is the perfect headless client. It would be a great media center computer because it is tiny, powerful enough, and super quiet. It's basically a box with a media slot and power cable and if you need it, a video cable (everything else can be wireless). All Apple needs now is the media center software to manage DVD collections. Microsoft's recent demonstration of their Media Center PC showed just how crash- and bug-prone Microsoft software still is.

Posted by josuah at 11:43 PM UTC+00:00 | Comments (0) | TrackBack

January 10, 2005

T616 Firmware Upgrade

I found out why I was having poor quality with the Bluetooth Bluetrek G2 headset. Turns out my Sony Ericsson T616 has a very old firmware version. Upgrading to a newer version fixes the bluetooth headset issues.

There are three ways of going about this. The official way is to bring your phone in to, or ship your phone to, a Sony Ericsson service center. I need to find out if there is one near by. I don't want to have to ship my phone anywhere.

Another choice is to upgrade the firmware yourself using a cable and Windows software. The cable is called a "terminator dongle" and can be found on eBay as well as some other web sites. If there is no nearby service center, this is likely to route I will take. Some people sell this process as a service once they have the dongle and software themself. I'd rather get the dongle and software instead of sending it to someone who does, since then I can upgrade the firmware or perform other things to my phone in the future as needed.

The third choice is to have the phone remotely updated. I'm not exactly sure how this works, but it appears that someone else can update the firmware on your phone if you make a call to them. They then playback some instructions which are supposed to update the firmware. Apparently this is how Sony Ericsson supports their P900 out of the box.

Posted by josuah at 5:48 PM UTC+00:00 | Comments (0) | TrackBack

January 7, 2005

Bluetrek g2

I got a Bluetrek g2 bluetooth hands-free headset yesterday, and paired it up with my Sony Ericsson T616. It works pretty well but everything revolves around a single button, so reading the manual is very important. Unfortunately, the audio is not crystal-clear (at least in the trials I've done so far). But it is better than a wired headset or no headset at all. I've added voice commands to some of my frequently called numbers and that works fine as long as I speak louder than normal.

Posted by josuah at 5:16 PM UTC+00:00 | Comments (0) | TrackBack

December 21, 2004

Cell Phones Damage DNA

Today's CNET Dispatch pointed to an article titled "Cell phones scramble DNA". A four-year study of radio waves in the mobile phone spectrum at comparable intensity showed genetic mutations in cells that was passed on to reproduced cells. The researchers make a note of pointing out this was evidenced in a laboratory environment and does not necessarily indicate real-world cell phone usage would result in the same effects.

Posted by josuah at 6:57 AM UTC+00:00 | Comments (0) | TrackBack

December 10, 2004

Japan's Gadgets

Japan is one of the few places in the world I want to visit. Partly because so many of the things I like come from Japan, or are heavily influenced by Japanese culture. One of the reasons I don't want to go to Japan, however, is because there are so many things over there I would like to buy, even though I can't read Japanese. Unfortunately, since I do pay attention to the technology and culture of Japan, I realize the sort of things that are lacking in the U.S. The SFGate has an article about this titled The Gadget Gap.

I think a large part of the problem is the mass-market approach dominant in U.S. business. It is extremely hard to find niche products anywhere other than via direct channels. In Japan, there are stores that sell a single product, open one day of the week with a different product each time, and sell out in hours from a line that formed the day before. There are so many types of products I would be interested in, but I'm looking for something that is perfect for me. That's hard when the majority of products are feature-saturated to meet the needs and desires of the lowest-common denominator.

Posted by josuah at 5:38 AM UTC+00:00 | Comments (2) | TrackBack

December 4, 2004

DRAM Price Fixing

ComputerWeekly reports that Infineon executives have pleaded guilty to DRAM price fixing. The company is fined US$160 million and four executives face the possibility of jail time and fines. Some of you may recall when this investigation began in 2002. Basically, Infineon owns the intellectual property associated with DRAM technology. Since just about every computer used DRAM technology since the late 1990's, Infineon got a slice of that pie. But by fixing prices, they artificially drove prices up for consumers and business. The US $160 million fine doesn't seem so large when you read about the ProMOS settlement, however.

Posted by josuah at 7:05 PM UTC+00:00 | Comments (0) | TrackBack

NASA Centennial Challenge Awards

Due to the success of the Ansari X Prize (where private organizations built successful space-faring vehicles), NASA is considering a similar approach. As described at SpaceDaily, instead of the old bidding and contracts system, where the winning bid would receive funds before a project's success, the new system would only reward actual accomplishments. NASA is hoping to fuel more simultaneous development with a lower cost risk. The only problem is NASA is not authorized to do this.

Posted by josuah at 7:03 PM UTC+00:00 | Comments (0) | TrackBack

Exif Untrasher

Alla came back from her Thanksgiving vacation in Philadelphia, and found out that the same memory stick the got corrupted last time after her Europe trip was corrupted again. All the files had been lost. Last time, I was able to recover them by running fsck_msdos and recovering the lost files. But this time, the FAT was clean. So recovery needed to be done off the raw data.

I found a web page that describes the Exif file format. This is the format her Sony CyberShot camera saved the images in. So, I have the capability of reading the raw data (I made an image of the partition using hdiutil) using HexEditor or through a small program and saving the found images back to disk.

But even better! Someone had already written a really simple application to do that, with additional support for special devices. Exif Untrasher did exactly what I would have had to do. There are lots of commercial programs that do exactly this, and can cost a decent amount. But the solution is so simple, I'm surprised no one has made their source code available. I may do that at some later point.

Posted by josuah at 6:47 PM UTC+00:00 | Comments (0) | TrackBack

November 29, 2004

Stem Cell Research GOOD

Stem cell research was one of those topics that came up in the Bush administration and one that President Bush promptly shut down in large part due to the religious opposition. Stem cells can be harvested from umbilical cords and aborted fetuses, and are cells in a special stage of development that can turn into any other type of cell. This ability has enormous possibilities. And the benefits have just been demonstrated.

In Korea, a woman paralyzed at age 17 received spinal cord treament using stem cells and today, at age 37, she was able to walk using a frame (article). This is the first successful result of stem cell research, which is currently being held back in the U.S. due to the Bush administration's decision to disallow further stem cell collection. California just voted to overturn this as a state-wide measure.

Posted by josuah at 8:15 PM UTC+00:00 | Comments (0) | TrackBack

November 24, 2004

Now Playing 1.1

A long time ago I wrote the Now Playing widget for Konfabulator so that the song currently playing in iTunes would display on my web page. Well, I just updated it so that it uses the iTunes object provided by the newer Konfabulator framework, rather than querying iTunes using AppleScript. A little cleaner. I had hoped it would allow iTunes to be quit without relaunching, but no such luck. Side note: I also associated the Now Playing widget with my home theater iTunes source, so the song displayed on my web site may be playing back through my home theater setup and not my computer.

Posted by josuah at 7:20 AM UTC+00:00 | Comments (0) | TrackBack

November 15, 2004

International Web Site

Some of you may have noticed garbage characters displaying in the Now Playing section of my home page (upper-right). This is something that had been bothering me for a while but I wasn't sure how to best go about it. Another thing that was bothering me was the timestamps in all these blog entries. It may have seemed weird for my posts to be at 5am or even more disturbing, in the future.

Well, the reasons for this are because I was dumping the native character bytes into my Now Playing file on disk, and my blog timezone is set to UTC (as is my server timezone). Easily fixed after some investigation. Rather than encode the foreign language characters into unicode, I changed Apache's default character set to UTF-8. Then I did some digging in the Movable Type template tags documentation and found the <$MTBlogTimezone$> variable. Everything looks good now.

Posted by josuah at 7:54 AM UTC+00:00 | Comments (2) | TrackBack

November 13, 2004

Too Fast? Too Slow?

I decided to compare the picture quality and performance of MPlayer against VideoLAN. The results are a little interesting. For starters, MPlayer advanced the film slower than my computer clock. But VLC advanced it faster. Playback side-by-side made this very obvious as the skew grew larger and larger and VLC played back the film faster. Color saturation was higher in VLC, and detail and smoothness was better in MPlayer both with and without post-processing on. Unfortunately, slight tearing is visible in both applications.

With both applications running, MPlayer was getting about 70% of the CPU, and VLC about 20%. Once VLC was stopped, MPlayer took the remaining CPU. VLC would peak at about 30% of the CPU. This is a significant difference in processing time. My PowerMac G5 is a dual 2.0GHz with 2GB of RAM.

Posted by josuah at 12:43 PM UTC+00:00 | Comments (0) | TrackBack

Mac OS X LotR HTPC

The Lord of the Rings: Return of the King extended edition DVD will be coming out next month. That is the perfect excuse for a LotR marathon. However, the problem with such a marathon is that all three films are on six DVDs. I don't want the marathon to be interrupted by having to get up and change discs. Thus, I need some way to play back all the discs, in order, without pushing any buttons, and without disruptive credits. The solution? Mac OS X on a PowerMac G5, my Sony Ericsson T616, Romeo, and MPlayer OS X. The result is the perfect custom Mac OS X Home Theater PC (HTPC).

The first problem is how to get all the DVDs onto my Mac in a format that I can play back. If I just copy the VOB files straight off the disc, no player will be able to do anything with it. Plus, the audio and video won't be in sync. But, thanks to Jon Johansen (a.k.a. DVD Jon) I can read DVD movies from devices and software that the MPAA doesn't want me to, like Linux or the open-source program MPlayer. [Note to the industry: libdvdcss has resulted in me renting movies from Blockbuster, the exercising of my fair use rights, and my purchase of DVDs. So sue me.] Using MPlayer on my Mac and Linux computers, I dumped the non-credit chapters of the movies to disk.

In case people are wondering what commands I used to pull out what I wanted, here's the command I used for the first disc of The Fellowship of the Ring:
./mplayer dvd://1 -aid 2 -chapter 1-27 -dumpstream -dumpfile /Documents/LotR-FotR-1/lotr_fotr_1.1.1-27.vob
This dumps title 1, audio track 2 (DTS ES) into the file lotr_fotr_1.1.1-27.vob.

So now I have the capability of getting all three films on my hard disk in a format I can playback using MPlayer. If I put them all into a playlist, they'll play one after the other and it will appear to be a relatively seamless change. But what if I need to control the playback? I don't want to have to get up to use the mouse or keyboard. That's where my bluetooth phone comes in.

Bluetooth on my phone lets me sync its contact list and calendar with my Mac wirelessly. But more than that, bluetooth is a general communications protocol. That means I can send arbitrary signals and files between my computer and the phone. I've used bluetooth before to copy photos to and from my phone, but today I would copy some instructions to it.

There are two primary choices for Mac OS X bluetooth phone communication. Salling Clicker is a polished piece of shareware that's won a few awards. This is usually the software recommended when people are looking to turn their bluetooth phone into a remote control. The other choice is Romeo, which is an on-again off-again open source project. The only real developer is the author, but that may just be because it works so well in its current state.

Anyway, Romeo is a regular Mac OS X application that connects to my T616 using bluetooth. By sending commands back and forth between the phone and Romeo, I can control several different applications, including MPlayer OS X, turning my phone into a regular remote control for my Mac. And I'm done.

Posted by josuah at 10:08 AM UTC+00:00 | Comments (0) | TrackBack

November 4, 2004

250GB Hard Disk

Last night I replaced one of my server hard disks with a 250GB Maxtor drive I bought from Fry's. I also discovered that although Fry's claims to have really cheap prices, all the times I have bought something from Fry's it turns out to be significantly more expensive than online (see PriceWatch). I could have saved maybe $30~$40 dollars buying online.

Anyway, I decided to finally get rid of the old Western Digital Fireball 20GB disk which has been serving as my /boot and root drives since building this computer maybe 4 or 5 years ago. So, I copied my home directories onto the new 250GB disk. Then moved my /boot and root onto the 80GB disk that was previously serving as my backup drive. Now, the 120GB disk that was previously /home is now serving as the backup drive. I used dd to move files between partitions, but I still had to run SuSE's repair program off the boot-install DVD to get it up and running.

I've also decided to try JFS, an open-source journaled filesystem developed at IBM. I've made my home partition JFS. I also want to convert my root drive from the current ext2 to ext3, which is basically ext2 plus a journal.

Posted by josuah at 2:16 AM UTC+00:00 | Comments (0) | TrackBack

October 27, 2004

iPod Photo

Apple just announced their new iPod Photo. It's available in two capacities, one of which is the 60GB microdrive announced to the press by Hitachi a while ago. The existing iPod, however, is still maxed out at 40GB. The 60GB + a new higher-resolution color LCD (about 33% more pixels in the same 2") is very appealing. It also gives 15 hours of operation, rather than the 8 hours of a regular iPod. That's even more impressive considering how taxing color and thumbnail scrolling is. I've already maxed out my 20GB iPod capacity.

Some people may remember that Apple was upset at Hitachi for announcing the 60GB microdrive and confirming that Apple had already agreed to purchase a bunch of them. Of course, no one else is buying microdrives in bulk, so it is not like that is much of a surprise.

Plus, the photo capabilities is really a great feature that doesn't detract from the iPod's functionality or make it bloated. There are just two things I think could be better.

First, syncing photos through iTunes is yucky. It works good, but it is a yucky idea. iTunes is for music, not photos. But this is sort of necessary because iPhoto is not free and people don't want to download another application just for the purpose of synchronizing. Apple can't release a different organization application because that is what iPhoto is for.

Second, people have been able to use photo card readers to upload digital pictures directly onto the iPod using third-party readers (e.g. the Belkin Media Reader). It would be great if this worked with the new iPod Photo. Maybe those third-party readers will be redesigned to do so, but I think existing readers won't be able to do this because the photo feature is going to have a special filesystem layout and possibly databases as well. The readers will need new software do take advantage of it.

Posted by josuah at 1:00 AM UTC+00:00 | Comments (2) | TrackBack

October 11, 2004

Fixing Canon PowerShot A70 E18 Error

I was taking photos of my Blue Circle MR1200, and ran into the E18 error. Apparently, one of the problems with the Canon PowerShot A70 is that sometimes, the lens will get stuck while trying to extend. The camera will beep a few times and the LCD will display a little E18 in the lower-left corner. People who posted about this before indicate having to send it in for repair and that Canon has horrible support and turnaround time. So, I decided to just help pull out the lens when I turned it on; giving it a little extra nudge to get unstuck. Turns out this worked. The camera is once again fully operational.

Posted by josuah at 5:02 AM UTC+00:00 | Comments (0) | TrackBack

October 9, 2004

IE Dislikes Transparent PNG

Ellen was looking at my blog at work today, using Internet Explorer for Windows, and the transparency in my PNG files didn't come through correctly. Instead of displaying the web page background, it displayed the color identified as transparent in the image. I remember reading of a similar problem at Real Life that Greg was able to fix, but I couldn't find a solution in Adobe Photoshop. I must be missing something. In the meantime, I've moved the navigation buttons back to GIF.

Posted by josuah at 10:24 AM UTC+00:00 | Comments (1) | TrackBack

October 4, 2004

SpaceShipOne

The X-Prize was a competition to see who could launch a craft into space twice within a week. SpaceShipOne has been the first winner of the competition (it will continue to run annually).

The reason this is so important is because for the first time a small group of individuals has launched a person into space. Being able to send the same craft up twice within a week means this isn't a fluke. Sending a person into space is one of those benchmarks nations use to declare themselves. Like the nuclear testing. This accomplishment opens the door to commercial and individual excursions and possibly exploration of space.

Don't forget to check out the video of the flight at the X-Prize web site.

Posted by josuah at 7:54 PM UTC+00:00 | Comments (0) | TrackBack

November 4, 2003

Another Security Exception

C# was installed on one of the public workstations in Sitterson yesterday, at which point I first tried to compile my Video Descriptor application. Ran into some trouble with finding references to libraries, but fixed that.

Today, I got the application to compile and create a .exe. However, I seem to be unable to run/debug VideoDescriptor.exe from within Visual Studio .NET; it complains that I am not an administrator or in the debug group. What kind of stupid development requirement is that? I don't have to be root or be in some special group to write programs on any other platform.

So, I tried executing VideoDescriptor.exe from the command line. In this case, I ran into a new security exception different from the supposed unsafe code one I was running into with DotGNU. This one is:

Unhandled Exception: System.Security.SecurityException: Request for the permission of type System.Security.Permissions.FileIOPermission, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.

Is this because the files are over an AFS share? Visual Studio .NET seemed to imply that earlier. Unfortunately I can't write anything onto the local drive...

Posted by josuah at 10:22 PM UTC+00:00 | Comments (2) | TrackBack

October 22, 2003

Security Verfication Failure

For some reason, I cannot get the file attributes or length using DotGNU and Portable .NET. So, I am just bypassing that problem for now, which means no progress bar in the AdaptableVideo class.

However, now that I'm working around that, I've run into a different problem with C#'s security model. I suppose it's good for there to be a security model, but I have no idea why it's working the way it is working. Other than external data cannot be trusted from anywhere, given all the stupid kinds of security holes that Microsoft products suffer from. I'm getting this exception when it tries to return a static matrix:

Uncaught exception: System.Security.VerificationException: Could not verify the code
    at MPEG2Event.IntraQuantiserMatrix.getDefault()
    at MPEG2Event.Macroblock.getNext(BitStream, SequenceHeader, SequenceExtension, PictureHeader, PictureCodingExtension, QuantMatrixExtension, DCPredictor, DCPredictor, DCPredictor, Int32, IntPredictor, Int32&) in ./src/Macroblock.cs:170

I'll have to read up more on the unsafe code "feature" of C#.

Posted by josuah at 7:45 PM UTC+00:00 | Comments (0) | TrackBack

September 24, 2003

Remote Ketan

Ketan and I spoke this afternoon about several things. Since the PVR simulation paper we wrote was accepted to SPIE, we need to make improvements and possibly run some additional simulations to get more data. We also talked about the Integrative Paper I am writing as part of the M.S. requirement of the UNC CS Department. Ketan is also interested in setting up a SourceForge server in the DiRT lab so people working on stuff will have a central repository that can be selectively shared.

Of course we also talked about my progress with the Adaptable Video research. The plan is to come up with goals next week when we talk again, in the hope of possibly putting together a paper. I'm not entirely sure how feasible this is, but we'll see.

I read up some on how C# makes use of delegates. It's implementation of delegates is somewhat convoluted simply because the naming scheme and definition syntax doesn't exactly make things match up. Kind of the same way properties are defined like functions but treated as fields, and when being used they look like functions even though they are fields. The C# implementation of delegates is not as elegant as the Objective-C implementation. It does technically follow the delegate design pattern, but coding it does not follow a developer's natural thought processes.

Ketan also heard about the SIGCOMM paper on Low-Rate TCP-Targeted Denial of Service Attacks. The paper describes how to exploit what could be called a design flaw, or also a design win, of TCP so as to cause DoS without using a whole lot of bandwidth. Ketan thinks there might be some possible research applications of this technique, but so far nothing that is actually new or that provides extra knowledge.

Posted by josuah at 2:39 AM UTC+00:00 | Comments (0) | TrackBack

September 15, 2003

C# in a Nutshell

I started working some more on porting the Adaptable Video code from Java to C#, but it was just too difficult trying to find the information I needed on MSDN. So I went to Barnes & Noble and got a copy of C# in a Nutshell. The copy I got is the 1st Edition, for version 1 of the .NET framework. The 2nd edition came out last month and covers version 1.1 of the framework, but it doesn't make much difference for what I'm doing.

Posted by josuah at 1:13 AM UTC+00:00 | Comments (0) | TrackBack

September 7, 2003

Learning C#

I've started the Adaptable Video port from Java to C#. I found the C# Language Specification which is where I'm learning the language. Microsoft needs to work on their navigation system for the specification; the reader is required to click too many times to progress through the specification without direct links to the previous, next, and enclosing sections.

I am having trouble finding specific things that I'm looking for in the specification because there is no index. You also can't search only the specification because the MSDN search tool applies to the entire library. So although I've read about the readonly and internal keywords, I have no idea how they differ from const and private.

Posted by josuah at 10:30 PM UTC+00:00 | Comments (0) | TrackBack

September 1, 2003

Mono Troubles

I tried installing Mono the other day, and it doesn't install as nicely as DotGNU. The installation procedure isn't as clean. Maybe if I can figure out the correct dependencies it requires, I'll try it again. In the meantime, I'll just try figuring out why Hello World is failing under DotGNU.

Posted by josuah at 4:57 AM UTC+00:00 | Comments (0) | TrackBack

August 29, 2003

Mono Protest; DotGNU

Mono's web site is currently down, in protest over software patents. In the U.S. you can currently patent a software solution (e.g. Amazon.com's one-click shopping [5,960,411]). There are several movements in the EU towards this same situation. Today, several web sites have closed their doors in protest over this issue. I'm not exactly sure how long those sites will be down.

I personally hate where patents have gone in the U.S. over the past several years. It used to be you needed to supply a blueprint and working prototype of a physical object and you would be granted a patent on that specific implementation. In other words, you could patent a thumbscrew with a ridged, round head of 1/2" diameter and threads at a 30 degree angle. But you could not patent the thumbscrew itself. Today, you can patent something like a "Computer facilitated product selling system" [6,594,641]. If you read the abstract you'll notice that this is a business practice patent. In other words, if you want to do business in this kind of way, you're going to have to pay royalties to one Adam G. Southam through Reshare Corporation.

I have a particular issue with the one-click patent because I wrote FlexCart with a one-click shopping feature in it after my work developing shopping cart systems naturally led me towards this feature. I developed this capability independently and without knowledge of Amazon.com's patent filing. My software implemented one-click shopping before the patent was granted, but after it was filed.

For more information about the software patent situation in Europe, visit the Foundation for a Free Information Infrastructure.

Anyway, since the Mono site is down, I went looking for another .NET alternative. The GNU Project has an implementation and development environment named DotGNU. So I installed this, but I'm encountering a runtime error when I try to execute the Hello World program.

Posted by josuah at 9:33 PM UTC+00:00 | Comments (0) | TrackBack

August 27, 2003

Moving to C#

This semester, my final semester since I'm graduating early, I am going to continue work on the MPEG-2 super-adaptable video descriptor project I started but only got half-done in my Multimedia Networking class last semester.

Ketan has been working on some stuff at Microsoft over the summer and will be working there still this summer. While over there he had reason to use the MPEG-2 parser I used on my project, but he ported it to Visual C#. So I'm going to move over to his new C# library since it's cleaned up and more functional.

The only issue might be how do I actually make use of C#, since I don't really do Windows development. Looks like I'll use Mono, an open-source implementation of .NET that includes a C# compiler and Common Language Infrastructure runtime.

C# and .NET is Microsoft's response to Java and enterprise-grade development. Some people have picked it up, but Java and its enterprise Java beans has pretty much become the dominating solution. I'll be learning a bit more about that when I take the Enterprise Computing class offered this Fall. It's co-taught by IBM Fellow Diane Pozefsky.

Posted by josuah at 4:44 AM UTC+00:00 | Comments (0) | TrackBack

August 28, 2002

QuickTime Documentation

Apple, although often accused of bad developer support, is still loads better than Microsoft. At least in my opinion. I downloaded a few QuickTime developer documents from the Apple Developer Connection to read up on Video Digitizers. All of the Inside Macintosh books are available for free download in PDF format. And a lot of it (if not all of it) is available for online browsing in HTML. I happen to have a copy of them on CD-ROM from several years ago, but I don't use it.

Their free suite of development tools is also excellent. Project Builder is the best IDE I've ever used, both from a functional and user-interface standpoint. Interface Builder is also really cool. Symantec C++ (which I guess doesn't exist anymore), Metrowerks CodeWarrior, and Forte for Java (now Sun ONE Studio). None of those are as good.

So I've read up on using Video Digitizers in Inside Macintosh: QuickTime Components. The API seems straight-forward enough, but as I learned when adding audio support to vat, I'm going to run into problems I didn't know about. Or maybe that phase is over since I've already tried to get vic to capture video a bunch of times using Sequence Grabbers.

Posted by josuah at 11:53 PM UTC+00:00 | Comments (0) | TrackBack

July 2013
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Search