Archive for November, 2008
A driver for your Darwin-based keyboard woes
I built this driver in 2007, to support Leopard Darwin on my wife’s laptop (hmmm where’s the “wink wink nudge nudge” smiley when you need it?)
I am offering a full driver for download, but it’s only so that you could use my keyboard fix if you do not currently have an ApplePS2Controller.kext that support plug-ins.
The point of this driver really is to provide keyboard support for laptops that see their built-in keyboard as PS2 — ie the vast majority. Therefore the piece that is really interesting to you is ApplePS2Keyboard.kext (in ApplePS2Controller.kext/Contents/PlugIns/)
There are other drivers that do just that, out there, but unfortunately many of them fail to properly detect the keyboard.
So, here goes. If you have a laptop running Leopard Darwin but your built-in keyboard is not working, give this driver a try.
ps: Come to think of it, you may find this kext useful if you are using a desktop with a recalcitrant PS2 keyboard as well.
pps: Miracle! After a year of having misplaced the source code, I found it on a USB stick. It’s now available at Github.
If you enjoyed this post, make sure you subscribe to my RSS feed!
Twitterified 1.2 is out: multi-accounts, mouse gestures, visual ignore…
Based on the very helpful feedback I received from the Twitterified client users, here is version 1.2’s log:
- Multiple accounts support:
– Multiple accounts using the same server
– Accounts using multiple servers (Twitter, Identi.ca…)
– Underlying architecture to eventually support any third-party server as long as they are compatible
- Better error reporting
- Better error recovery
- Mouse Gestures support
- Tweets can now be marked “read”
- Obviously new tweets are now easily identifiable
- The application window height is now a setting
- It is now possible to “ignore” someone using the collapsable boxes
Due to the client’s support for multiple accounts, if you are upgrading, you will have to re-enter your credentials. It’s a one-time thing.
Note, too, that starting with v1.1, the client offers to update automatically when a new version is out.
Sorry, Jeremiah, ignoring you for the purpose of this demo…
-

Use Mouse Gesture to mark all Tweets “read”
If you are not using Twitterified yet, go get it!
If you enjoyed this post, make sure you subscribe to my RSS feed!
Four Top Wordpress Code Highlighters Reviewed
I recently ran a whole lot of Wordpress code highlighting plug-ins through the grinder and ended up selecting four that, in my opinion, are the worthiest of the lot.
Writing a code highlighter plug-in proves to be a fairly difficult exercise. Your plug-in needs to be smart about its content, or the result will invariably be a disappointment. For instance, if the plug-in is activated using the <pre> tag, then it needs to maintain a stack/counter of <pre> and </pre> tags so that finding a <pre> tag in the code being highlighted doesn’t abruptly terminate the code parsing, disfiguring your blog in the process. I noticed the issue with SyntaxHighlighter, but the other plug-ins may also suffer from it.
SyntaxHighlighter
Tag: [sourcecode language='css']code here[/sourcecode]
My main issue with this plug-in is that it works in visual mode; hence, your source code formatting (tabs etc.) is lost. Other than that, it works well and support a wide range of languages and it offers several very nice features such as ‘copy to clipboard’ or ‘print’. My hope, right now, is that I did not use it correctly.
Rating: 




Highlight source Pro
Tag: <pre lang="enc__php" class="17">code here</pre>
I do not like the use of the class arguments, as it means “start numbering with line 17″ which totally breaks XHTML compliance.
Note the smart use of the enc__ prefix, which, when presents, means that the code being highlighted is encoded using HTML Entities. Add the prefix, you can use the higlighter in visual mode; omit it and work in HTML mode.
Rating: 




FV Code Highlighter
Tag: {code type=php}code here{/code}
Cute display, which will feel immediately familiar to Dreamweaver aficionados. Support PHP, HTML, CSS and XML.
Rating: 




WP_CODEBOX
Tag: <pre lang="php" line="1" file="example.php" colla="-">code here</pre>
In my opinion, this is the winner. It works well, looks good and support more languages than any of the others — I counted about 70 different formats!
You can display the code box collapsed or expanded, offer a link to download the code, etc.
Rating: 



If you enjoyed this post, make sure you subscribe to my RSS feed!
Flex: How I worked around MOUSE_OUT’s inefficiencies
In Twitterified Client v1, one of the features I really wanted available right off the bat, was that when a user moves their mouse pointer over a twitterer’s avatar, an overlay image is displayed. This image is a menu of sort, allowing the user to send a direct message, a reply or access a more advanced menu. Of course, when the mouse pointer exists the avatar’s region, the overlay image needs to quietly go. Being the Flex newbie that I am, I thought that a straightforward implementation would work:
_imageOverlayPanel.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); |
In onMouseOut(), I would detach _imageOverLayPanel, remove the listener, and move foward. Unfortunately, when moving my mouse around at a reasonably fast speed, I found out that the overlay panel did not go away, and after a while I had several avatars “polluted” by that overlay panel. I started “tracing” the MOUSE_OUT event and found out that, at least in AIR applications, there is no guarantee that such an event will be triggered. Ouch.
I experimented with, instead, using a timer that would kick in every 500ms and check whether the mouse pointer was still in the avatar’s region. It worked very well but felt a bit clunky and there was a risk of race condition with mouse events.
In the end, I settled for an approach using MOUSE_MOVE, which feels “cleaner” and works almost as well as the timer method:
stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMovePossiblyOut); |
private function onMouseMovePossiblyOut(event:MouseEvent):void { if(!_imageOverlayPanel.parent) return; var pt:Point = new Point(event.stageX, event.stageY); pt = _imageOverlayPanel.globalToLocal(pt); if(pt.x < 0 || pt.y < 0 || pt.x > _imageOverlayPanel.width || pt.y > _imageOverlayPanel.height) { _imageOverlayPanel.parent.addEventListener(MouseEvent.MOUSE_OVER, onImageMouseOver); // innerWrapper resumes listening to mouse_over events _imageOverlayPanel.parent.removeChild(_imageOverlayPanel); // overlay panel is detached from innerWrapper } } |
Note that the trick, here, is that I add my mouse listener to the stage rather than the image overlay itself. This allows me to receive mouse events that happen outside the overlay’s region; they are the ones I am interested in.
If you enjoyed this post, make sure you subscribe to my RSS feed!
Twitterified taking off: is private beta a mistake?
Somehow, seemingly out of nowhere, Twitterers have started to notice Twitterified. I guess a few positive reviews help.
But would Twitterified have received these positive reviews, had it not moved to open beta? I think not. The service was in closed beta for a couple months, which allowed me to kill a few gremlins I found in the system, but even so it did not attract enough adventurous users for its own good. So, I followed the “old” web 2.0 advice: release the product (early), even if you feel that it is not ready. Of course, I need to keep an eye on all feedback and fix problems as soon as they are reported. I do not think that an open beta can work any other way. Fortunately, due to the tool’s nature, feedback can be found in a very obvious place
I consider myself lucky because I already have some experience with scaling applications — thanks to clicdev.com and past experience as a web host — and as a very clueless user interface “victim” I do spend a lot of time thinking about all the ways that an application could confuse me. But even so, that’s no reason to dwell in closed beta country. When I look around, it seems that no matter how talented and how successful web entrepreneurs have been, products launched as closed beta have always had a hard time making it as a mainstream product.
Not that I am thinking of Twitterified’s minuscule critical success as anything mainstream, or that I would dare compare its audience to Pownce! But, interestingly, when I look at Pownce and who its backers are, it doesn’t seem to have achieved the success it seemed poised to. Of course, I am not singling out Pownce. It just happens to be one of the projects I found really interesting.
In conclusion, I do not think that I will every launch anything in closed beta again. It’s just not worth it!
If you enjoyed this post, make sure you subscribe to my RSS feed!
















