Apple today released upgraded iMacs with discrete graphics in all models. Also released was the Magic Trackpad which is basically the trackpad from the current MacBooks in desktop form. New iMacs are at http://store.apple.com/us/browse/home/shop_mac/family/imac?mco=MTAyNTQzNjA and the Magic Trackpad is at http://store.apple.com/us/product/MC380?mco=MTM3NDcxNzI.
Author: Dustin Rue
The HP Slate saga just doesn’t stop
So the HP Slate that Balmer so proudly showed off at CES this year has gone from “it’s running Windows 7” to “it’s canceled” to now, HP Slate no longer a consumer product, will arrive for enterprise this fall. What a freaking joke.
How do you measure programmer productivity?
via – http://www.computerhistory.org/highlights/macpaint/
“When the Lisa team was pushing to finalize their software in 1982, project managers started requiring programmers to submit weekly forms reporting on the number of lines of code they had written. Bill Atkinson thought that was silly. For the week in which he had rewritten QuickDraw’s region calculation routines to be six times faster and 2000 lines shorter, he put “-2000″ on the form. After a few more weeks the managers stopped asking him to fill out the form, and he gladly complied.”
Using mod_rewrite to proxy requests to an application server
Not so long ago I wrote about my experiences on getting Railo running on under OS X as a test. Along with just getting Railo running as well as a custom CMS I needed to be able to proxy requests through an Apache server to the Railo application server. One method is to use the simple mod_proxy module available as part of Apache. In my setup I wanted a bit more control than what mod_proxy could provide me. Enter mod_rewrite.
Mod_rewrite is used to manipulate URLs as they enter and pass through Apache. One way mod_rewrite is useful is that it allows you to rewrite incoming URLs so that what the user sees in their browser’s location bar is translated into what the application expects. You can also use it to manipulate the URL in the event that the location of an object has changed. In my setup I wanted to use mod_rewrite to rewrite certain URLs and then proxy them through the Railo application server.
Lets say my Railo application lives at http://localhost:8080/ and I want any URL that comes into Apache (on port 80) that starts with a keyword like ‘show’ to be rewritten and passed to Railo. Railo could just as easily be hosted on some other machine but for this example lets just say it is located on the same system as Apache.
In my example, I have a new vhost configured in Apache and it looks like this:
<VirtualHost *:80> ServerName railo.dustinrue.com DocumentRoot "/Users/dustin/Sites/railo.dustinrue.com" <Directory "/Users/dustin/Sites/railo.dustinrue.com"> RewriteEngine On RewriteRule ^show/(.+)$ http://localhost:8080/index.cfm?url=/show/$1} [P] </Directory> </VirtualHost>
Notice that I’ve told mod_rewite that I want to use an external command for rewriting the incoming URL. An external program basically accepts one argument, which is the URL portion that matches the rewrite rule, and then prints out the reformatted URL which Apache then uses from that time on and in this case, passes to Railo.
In this example, mod_rewrite will take a URL that might look like:
http://railo.dustinrue.com/show/article/id/123456/
And turn it into:
http://localhost:8080/index.cfm?url=/show/article/id/123456/
At the end of the mod_rewrite rule you see a flag telling mod_rewrite to proxy the request through the rewritten URL rather than giving than than telling the browser to visit the new URL (the default behavior). In turn, the request comes into Apache which sees the ‘show’ keyword. This keyword causes the request to be passed to the application server which responds with the appropriate output and this output is then sent to the browser.
In my example, the rewrite is very simple. You can do far more advanced stuff than this and it’s even possible to do some rewriting right within Railo and the server it is running under such as Jetty or Tomcat.
Mac tip of the week: More keyboard shortcuts
I have two keyboard shortcuts that I just found. Keyboard shortcuts are of course always shown in the menus of applications but I thought I’d mention these two.
Here’s the first one. If you have a folder as a stack item on your dock, command clicking it will immediately open the folder instead of doing the usual stack animations.
The second one is, if you select a file anywhere on the desktop or in a finder window and press command+shift+T you’ll add that item to the dock as a direct link to that file or as a stack if it is a folder. Command+T itself will the selected file as a sidebar item in Finder.
Railo Express using Jetty and Virtual Hosts
For some reason I decided to give Railo a try tonight. Railo is dubbed as “the fastest CFML OSS engine” available. The little bit that I’ve messed with it so far, I really can’t confirm that. What I can say however is that setting it up is fairly easy, particularly if you choose to download the express package.
One thing that hung me up though, and seems to hang up some others, is the configuration of virtual hosts when using Jetty. The OS X package is only available with Jetty and the documentation does a fine job of explaining how to setup virtual hosts. The only problem is they fail to mention that you actually need to uncomment some of the included config file to make virtual hosts work properly. Some people might see that right away, I glossed over it.
Documentation for setting up virtual hosts is provided by the Railo team at http://www.getrailo.org/index.cfm/documentation/installation/railo-express/. Note that in the virtual host definition section the documentation shows the option virtual host information already commented out, in the files distributed in Railo Express, they are not uncommented.
You can learn more about doing virtual hosts using Jetty at http://docs.codehaus.org/display/JETTY/Virtual+hosts.
Specifying the Finder icon with Avahi
One of the things that makes the Mac great is how easily it can find network resources. Apple calls this technology Bonjour but in reality it’s a combination of a number of different protocols talked about at http://www.zeroconf.org/. Avahi is in basic terms an open source implementation of Bonjour and with it you can advertise services that a Linux server provides on your local network. I use Avahi to advertise the netatalk/afp service running on my home Linux system. By doing so, my Linux system shows up immediately in the Finder Window of all of my Macs in the house.
The only “problem” I had was that my Linux system would show up with an icon that looked like an Apple display. I wanted to appear in my Finder window as a little bit closer to reality. By default OS X is aware of all of Apple’s products and can display the appropriate icon for any product it finds. In my setup I’m happy with my Linux system appearing as an older style of PowerMac. With a bit of effort you can cause OS X to show any custom made icon you want.
This blog post explains the process and this comment describes the various device types you can specify.
Mac tip of the week: rearrange menu bar items
You can rearrange most menu bar items by holding down the command key and then clicking and dragging the menu bar item to where you want it.
Microsoft is killing the Kin
Microsoft is already calling it quits with the Kin as reported by a number of places. I get this strange impression that Microsoft isn’t quite sure what its strategy is with anything these days.
It’s even being reported that the killing of the Kin could be the beginning of a number of shake ups at Microsoft. One can only hope they come out looking a lot more focused than they are right now. I can’t help but feel that Microsoft is doing as well as it is right now out of sheer momentum. Windows 7 is selling well, but it’s hard not to be when there is such a large user base to begin with. Then again, it really is a great OS. Windows Phone 7 sounds very promising but I don’t think anyone could say for sure where Microsoft is going from here.
Thoughts on Windows Phone 7
As Windows Phone 7 gets closer to release we keep hearing more and more about what Microsoft’s Phone operating system will and will not do. For the first time that I can remember, Microsoft appears to be incredibly focused on released a product that simply works and if that means not releasing features that everyone else has in 1.0 then so be it. And I applaud them for doing so.
Not everyone feels the same way however, pointing out some of the features Windows Phone 7 will initially lack such as copy and paste as well as multitasking. Although both are important features, neither are required for Microsoft to release a successful product.
It’s hard to argue that when the iPhone was introduced back in 2007 it destroyed everything else on the smart phone market, despite not having copy and paste or multitasking. It also didn’t have any way for developing native applications and developers were expected to build web applications to be run on the iPhone’s web browser. Speaking of the web browser, the iPhone still doesn’t have the ability to run flash which so many people claim is simply required for a proper web experience.
Apple’s iPhone of course has been a run away success, despite missing all of these “required” features. What the iPhone lacked in features it made up for with an as yet unseen level of polish, responsiveness and thoughtfulness in the smart phone market. With just two physical buttons it was incredibly easy to use and understand compared to other smart phones available at the time.
Unlike Google’s Android, which was already in development when the iPhone was released, Microsoft’s mobile phone OS was in no condition to compete with either and for Microsoft to compete properly in the smart phone market they really had to start from scratch. Windows Phone 7 is that from scratch effort and it makes sense that they’re going to have to cut some features in order to release a solid mobile OS in a timely fashion. Microsoft is always accused of simply buying or copy features from someone else and this time it is no different. Microsoft is clearly running the same plays from Apple’s play book and I don’t see anything wrong with that. When Microsoft releases Windows Phone 7 they’ll have a product that is neatly situated right between what iPhone OS, now known as iOS, offered initially and what it can do today. It should also be able to more quickly adapt and even out do its competitors in future releases. My only remaining concern for Microsoft is whether or not hardware makers can create new devices that can match or even rival that of Apple. That I think, will be the key to it’s success.