Mag+
This posting about Mag+, a possible future digital magazine, is a very well considered design. The short video is well worth watching.
Google Street View for meetings?
I had this device idea for meetings and was wondering if you have seen anything like this. The core of the idea is Google Street View technology but applied to meetings. One (portable) device is setup in the middle of a meeting space (room or table). The device has enough cameras and directional microphones to gather 360 degrees of visual and audio input. The output of the device is, for example, a 360 degree QuickTime movie with 360 degree audio (if there is such a thing). As you reviewed the movie and moved its directional focus around the room you would more clearly hear the voices of those in foreground of the camera. This would be a great device for all kinds of public and private meetings.
Feel free to steal the idea if you can make it happen! Just keep me informed. Thanks.
Feel free to steal the idea if you can make it happen! Just keep me informed. Thanks.
Mangle-wheel and pinion

A Congressman was seated next to a little girl on the airplane...
Today's email contained this:
A Congressman was seated next to a little girl on the airplane. He turned to her and said, 'Let's talk. I've heard that flights go quicker if you strike up a conversation with a fellow passenger.'
The little girl, who had just opened her book, closed it slowly and said to the total stranger, 'What would you like to talk about?'
'Oh, I don't know,' said the congressman. 'How about global warming or universal health care?' and he smiles smugly.
'OK,' she said. 'Those could be interesting topics. But let me ask you a question first. A horse, a cow, and a deer all eat the same stuff - grass. Yet a deer excretes little pellets, while a cow turns out a flat patty, and a horse produces clumps of dried grass. Why do you suppose that is?'
The California legislator, visibly surprised by the little girl's intelligence, thinks about it for a minute and says, 'Hmmm, I have no idea.'
To which the little girl replies, 'Do you really feel qualified to discuss global warming or universal health care when you don't know shit?'
A Congressman was seated next to a little girl on the airplane. He turned to her and said, 'Let's talk. I've heard that flights go quicker if you strike up a conversation with a fellow passenger.'
The little girl, who had just opened her book, closed it slowly and said to the total stranger, 'What would you like to talk about?'
'Oh, I don't know,' said the congressman. 'How about global warming or universal health care?' and he smiles smugly.
'OK,' she said. 'Those could be interesting topics. But let me ask you a question first. A horse, a cow, and a deer all eat the same stuff - grass. Yet a deer excretes little pellets, while a cow turns out a flat patty, and a horse produces clumps of dried grass. Why do you suppose that is?'
The California legislator, visibly surprised by the little girl's intelligence, thinks about it for a minute and says, 'Hmmm, I have no idea.'
To which the little girl replies, 'Do you really feel qualified to discuss global warming or universal health care when you don't know shit?'
Witch and showing minimized windows
A friend tweeted some time ago about being able to open any Macintosh's application's minimized main window using a consistent command key. Since I started using Witch I have been able to do this. Since Cmd-Tab is grabbed by Apple, I assigned Cmd-1 to invoke Witch. I have configured Witch to place its cursor in the list of application windows on the current application's first window -- which has always been, in my experience, the main window. The result of this is that I type Cmd-Tab and then Cmd-1 I effectually am able to bring the application to the foreground and have it's main window presented foremost even if it is minimized.
Note that I could just use Witch with Cmd-Tab but I find that my mind-fingers connection for "move to another application" to be too tightly bound to Cmd-Tab. Anyone know of a patch that will allow me to bind Witch to Cmd-Tab for OS X 10.6?
Note that I could just use Witch with Cmd-Tab but I find that my mind-fingers connection for "move to another application" to be too tightly bound to Cmd-Tab. Anyone know of a patch that will allow me to bind Witch to Cmd-Tab for OS X 10.6?
Advocates need to simplify their awareness emails
I get too many emails from advocacy organizations attempting to keep me aware of them and their work. They need to find a way to to do this without sending me pretty but functionally unhelpful email or expecting me to watch a video to get more detail. Repower America is especially bad. An itemized list of short statements of accomplishments and/or actions with links is all I need.
Read Better Scientific and Technical Writing by Morris Bolsky for some sound advice.
Read Better Scientific and Technical Writing by Morris Bolsky for some sound advice.
A few days with Spring.
I have been learning Spring 2.5 for the last few days. My usual method of learning a new tool is to
Spring is funky. I had wanted to use EJB3 for this project but Spring won out. The reasons have little to do with technical merit. From a larger software engineering perspective EJB3 is just too unknown among the in-flight-magazine readers. Ok, that was a dig and childish. Sorry.
For Spring to work on this project I need for it to handle REST, JMS, and RMI simply and elegantly. To this end I have been working on JMS and RMI stuff mostly.
Spring's "JMS template" stuff is very old-school Java. A better approach is to use generics for clean coding and have the configuration done in XML. After some effort I can now code a JMS listener as simply as
And, if your message is more complex the listener's complexity does not change. The generic MessageListener is where the hard stuff is and, to be honest, it is not very hard
MessageConverter also needs to be defined for all the machinery to work. The XML configuration is messy but mostly due to Spring's need for factories everywhere. In the end, the JMS listener is declared simply as
For RMI Spring has good POJO support out of the box. What I could not find, however, was support for exporting a POJO as an RMI service that could be called by a non-Spring client. For example, the following client can be run using the standard JDK
But if you try to use this against an RMI service exported via Spring's org.springframework.remoting.rmi.RmiServiceExporter it does not work. You get a java.lang.ClassCastException regards org.springframework.remoting.rmi.RmiInvocationWrapper_Stub. Yuck.
However, with a little effort I was able to create an exporter that could export a POJO as a remote service as long as the POJO had methods that correspond to a valid remote interface. For example,
To remote HelloService I wrote RemoteProxyExporter which is a mixture of Spring, RMI, Proxying, and Reflection.
Now RemoteProxyExporter (and friends) was tricky to write but it took less than a day's effort. As did MessageListener (and its friends). Spring might have a means of achieving the same ends as my code but so far I have not found it. There are two reasons for this. The first is that Spring is highly abstract and data-driven and so this richness just requires lots more exposure than I have yet had. The second is that Spring is old, really old.
During Spring's life Java has had many changes of course as to how common problems are solved. For example, how to augment and/or configure a Java object. First we used reflection. When this didn't solve all our needs reflection was augmented with "information" classes (such as BeanInfo). When this was seen as too static for a dynamic world the information classes where replaced/augmented with external declarations encoded in XML. When XML was seem as cumbersome Java 5 added annotations. Spring uses all of this but not consistently. And so often times just understanding how to connect A with B is a nightmare. And googling does not help because the definitive answer for some questions was given in 2009 while others where given in 2004 when Spring 1.0 was released.
The upshot of all this effort is that I will be able to do what I need to do and do it in a way that works for all staff skill levels. And do it simply and elegantly.
I can't wait to dig into pooling!
- buy a book
- skim the book in chapter order
- study specific chapters as I need to know their contents
- disregard the chapter's examples because they suck either because they are too simple or inelegant
- unsuccessfully google for better examples
- successfully google for clues
- piece together a simple and elegant example
Spring is funky. I had wanted to use EJB3 for this project but Spring won out. The reasons have little to do with technical merit. From a larger software engineering perspective EJB3 is just too unknown among the in-flight-magazine readers. Ok, that was a dig and childish. Sorry.
For Spring to work on this project I need for it to handle REST, JMS, and RMI simply and elegantly. To this end I have been working on JMS and RMI stuff mostly.
Spring's "JMS template" stuff is very old-school Java. A better approach is to use generics for clean coding and have the configuration done in XML. After some effort I can now code a JMS listener as simply as
public class HelloMessageListener extends MessageListener<String> { @Override public void receive( String message ) { // handle string message } }
And, if your message is more complex the listener's complexity does not change. The generic MessageListener
public abstract class MessageListener<T> implements javax.jms.MessageListener { private MessageConverter<T> messageConverter; @Required public void setMessageConverter( MessageConverter<T> messageConverter ) { this.messageConverter = messageConverter; } @Override public void onMessage( Message jmsMessage ) { T message = messageConverter.fromJMS(jmsMessage); receive( message ); } abstract public void receive( T message ); }
MessageConverter
<bean class="org.springframework.jms.listener.SimpleMessageListenerContainer"> ... <property name="messageListener" ref="helloMessageListener" /> </bean> ... <bean name="helloMessageConverter" class="example.HelloMessageConverter" /> <bean name="helloMessageListener" class="example.HelloMessageListener"> <property name="messageConverter" ref="helloMessageConverter" /> </bean>
For RMI Spring has good POJO support out of the box. What I could not find, however, was support for exporting a POJO as an RMI service that could be called by a non-Spring client. For example, the following client can be run using the standard JDK
import java.rmi.Naming; public class HelloServiceCaller { static public void main( String[] args ) throws Exception { String helloServiceUrl = "rmi://localhost:1199/HelloService"; HelloRemoteService helloService = (HelloRemoteService) Naming.lookup(helloServiceUrl); for ( String input : args ) { String output = helloService.sayHello( input ); System.out.println( input + " -> " + output ); } } }
But if you try to use this against an RMI service exported via Spring's org.springframework.remoting.rmi.RmiServiceExporter it does not work. You get a java.lang.ClassCastException regards org.springframework.remoting.rmi.RmiInvocationWrapper_Stub. Yuck.
However, with a little effort I was able to create an exporter that could export a POJO as a remote service as long as the POJO had methods that correspond to a valid remote interface. For example,
public interface HelloRemoteService extends Remote { public String sayHello( String name ) throws RemoteException; } ... public class HelloService { public String sayHello( String name ) { return "Hello " + name; } }
To remote HelloService I wrote RemoteProxyExporter which is a mixture of Spring, RMI, Proxying, and Reflection.
Now RemoteProxyExporter (and friends) was tricky to write but it took less than a day's effort. As did MessageListener
During Spring's life Java has had many changes of course as to how common problems are solved. For example, how to augment and/or configure a Java object. First we used reflection. When this didn't solve all our needs reflection was augmented with "information" classes (such as BeanInfo). When this was seen as too static for a dynamic world the information classes where replaced/augmented with external declarations encoded in XML. When XML was seem as cumbersome Java 5 added annotations. Spring uses all of this but not consistently. And so often times just understanding how to connect A with B is a nightmare. And googling does not help because the definitive answer for some questions was given in 2009 while others where given in 2004 when Spring 1.0 was released.
The upshot of all this effort is that I will be able to do what I need to do and do it in a way that works for all staff skill levels. And do it simply and elegantly.
I can't wait to dig into pooling!
What happened to my shelf of animals?
O'Reilly has a promotion allowing you buy the online copy of any (?) print book that you own for $4.95. When I looked at my bookcase what I saw amazed me. All but two of the books I cared to have online where not O'Reilly books. Most of the books that have value to me now are from Addison Wesley, Manning, and Apress. I don't know why this is but evidence says O'Reilly books are less important than in the past -- when almost all my books had animals on the cover.
Using bit.ly help transfer browsing to iPhone
So far the easiest way to switch from browsing on my Mac to browsing the on the iPhone is to shorten the URL using bit.ly and then manually enter the shortened URL into iPhone Safari. Not very smooth but it does save you typing, for example "http://bit.ly/Idma6" is easier to type than "http://conceptdev.blogspot.com/2009/10/monotouch-for-monospace.html". (It would be great if bit.ly's URL were case-insensitive because mixed case typing on the iPhone is cumbersome.)
Flickr Dartmouth Photo-pool
I love that Flickr users tag their photos of my home town Dartmouth, Devon, UK.
Underwear Gnome thinking in the RI legislator
This morning's Providence Journal contained the story "Rhode Island can’t see if its tax breaks are doing their job." Here is another story about the activities of RI's own legislative "Underwear Gnomes." If you don't know the underwear gnomes story here is a quick introduction: Underwear gnomes are enacting their three step plan to get rich; Step one is to steal all the underwear; Step three is to rake in the money; Step two is still under development. Our underwear gnomes are attempting to strengthen RI's economy with incomplete thinking. Why would they give away $87 million without any means of substantiating its effectiveness? And do so for several years. A similar kind of foolishness is occurring with the movie production tax credits. I am sure each of us has our prized example of underwear gnome thinking. These laws are not helping RI. Please, STOP trying to help us!
Gin, Television, and Social Surplus
Clay Shirky on how much free time we have and what could be done with it if you do the math. US households watch 200,000,000,000 hours of TV per year.
"So how big is that surplus? So if you take Wikipedia as a kind of unit, all of Wikipedia, the whole project--every page, every edit, every talk page, every line of code, in every language that Wikipedia exists in--that represents something like the cumulation of 100 million hours of human thought. I worked this out with Martin Wattenberg at IBM; it's a back-of-the-envelope calculation, but it's the right order of magnitude, about 100 million hours of thought.
"And television watching? Two hundred billion hours, in the U.S. alone, every year. Put another way, now that we have a unit, that's 2,000 Wikipedia projects a year spent watching television. Or put still another way, in the U.S., we spend 100 million hours every weekend, just watching the ads. This is a pretty big surplus. People asking, "Where do they find the time?" when they're looking at things like Wikipedia don't understand how tiny that entire project is, as a carve-out of this asset that's finally being dragged into what Tim calls an architecture of participation."
Read the whole article at Gin, Television, and Social Surplus
"So how big is that surplus? So if you take Wikipedia as a kind of unit, all of Wikipedia, the whole project--every page, every edit, every talk page, every line of code, in every language that Wikipedia exists in--that represents something like the cumulation of 100 million hours of human thought. I worked this out with Martin Wattenberg at IBM; it's a back-of-the-envelope calculation, but it's the right order of magnitude, about 100 million hours of thought.
"And television watching? Two hundred billion hours, in the U.S. alone, every year. Put another way, now that we have a unit, that's 2,000 Wikipedia projects a year spent watching television. Or put still another way, in the U.S., we spend 100 million hours every weekend, just watching the ads. This is a pretty big surplus. People asking, "Where do they find the time?" when they're looking at things like Wikipedia don't understand how tiny that entire project is, as a carve-out of this asset that's finally being dragged into what Tim calls an architecture of participation."
Read the whole article at Gin, Television, and Social Surplus
Who Is The Earth?
"Who Is The Earth? Moral philosopher Mary Midgley delivers a talk concerning differing and changing attitudes to our planet and our environmental responsibilities"
I really enjoyed this lecture on the how (mainstream) western philosophy has little to say about our moral relationship with the Earth and other groups. Well worth listening too. I found this at "iTunes U" on my iPhone. I am sure it is also available for downloading to an iPod, etc.
http://podcast.open.ac.uk/oulearn/arts-and-humanities/philosophy/podcast-a211-philosophy-human-situation
I really enjoyed this lecture on the how (mainstream) western philosophy has little to say about our moral relationship with the Earth and other groups. Well worth listening too. I found this at "iTunes U" on my iPhone. I am sure it is also available for downloading to an iPod, etc.
http://podcast.open.ac.uk/oulearn/arts-and-humanities/philosophy/podcast-a211-philosophy-human-situation
VNC and misbehaving keyboard mapping
If you have a misbehaving keyboard mapping when you connect to a tightvnc VNC server running under Ubuntu from a Macintosh OS X using any of the VNC clients add the following to your VNC server's xstartup script
# See https://bugs.launchpad.net/ubuntu/+source/vino/+bug/112955Thanks Geoffrey for the help.
export XKL_XMODMAP_DISABLE=1
The New McCarthyism Starts Today
Update: The Providence Phoenix's Adam Reilly has an interesting article about Beck's intelectual foundations. See Latter day taint: How Glenn Beck is driven by Mormonism — and why his fellow faithful (including Mitt Romney) should be worried.
Amazon's SimpleDB is free for the vast majority of datasets
You can keep up to 1 gigabyte of data in SimpleDB without paying any storage fees. You can transfer 1 GB of data and use up to 25 Machine Hours to process your queries each month. This should be sufficient to allow you to issue about 2 million PutAttribute or Select calls per month.More at Don't Forget: You Can Use Amazon SimpleDB For Free!
Bi-fold PDA

Subscribe to:
Posts (Atom)