The Life Unwiredhttp://unwiredben.livejournal.com/
The Life Unwired - LiveJournal.comThu, 25 Feb 2010 14:53:45 GMTLiveJournal / LiveJournal.comunwiredben1527550personalhttp://l-userpic.livejournal.com/62425544/1527550The Life Unwiredhttp://unwiredben.livejournal.com/
100100http://unwiredben.livejournal.com/296420.htmlThu, 25 Feb 2010 14:53:45 GMTHeading Back to Palmhttp://unwiredben.livejournal.com/296420.html
<div style="float:right;margin-left:10px;margin-bottom:10px"> <a href="http://www.flickr.com/photos/unwiredben/4386744865/" title="photo sharing"><img src="http://farm3.static.flickr.com/2692/4386744865_a461ff274b_m.jpg" alt="" style="border: solid 2px #000000;" /></a> <br /> <span style="font-size: 0.9em; margin-top: 0px;"> </span></div>If you've not seen my Twitter feed, you may not know that on Monday, I'm returning to a position with Palm. I'm heading back to be part of their Developer Relations group, reporting into the dynamic team of Ben and Dion of <a href="http://ajaxian.com/">ajaxian</a> fame that Palm brought in last summer to shake things up with webOS.<br /><br />It was a hard decision to leave Mozilla; they've been very good to me over the last year, and I feel pretty happy about the 1.0 release of Firefox for Maemo (aka Fennec) that came out in January. I'll miss the fun chats on IRC and the visits to their offices in Toronto and Mountain View.<br /><br />However, in the last year I found that my real passion lies in communication and teaching. I'd had a blast with my classes at NYC Resistor, and I've loved working with developers in past positions at Metrowerks, PalmSource, and Palm. Being the expert in an online forum suits me very well. With that background, I'm looking forward to evangelizing the webOS platform, and I hope that I'll be able to assist some people in writing great native apps and plugins on the Palm Pre and Pixi phones.<br /><br />Wish me luck! I'll be posting details on my new Palm webOS developer blog as soon as it is ready to go.<br clear="all" />http://unwiredben.livejournal.com/296420.htmlworkpalmmozillapublic6http://unwiredben.livejournal.com/296018.htmlThu, 11 Feb 2010 00:36:40 GMTQuick note on native Android debugginghttp://unwiredben.livejournal.com/296018.html
This is for reference by future programmers using Google to find out something on this topic.<br /><br />When using gdbserver with the Android 2.0.1 emulator to debug native command line applications, you can get into a situation where it won't stop the child application, instead letting it run to its death before setting up the debug connection to gdb.&nbsp; I&nbsp;wasn't able to figure out why this was happening, but rebooting the emulator allowed for the correct operation again.&nbsp; When you start getting communication errors from gdb, a reboot is a good call as other things may be hosed.http://unwiredben.livejournal.com/296018.htmlworkmozillaandroidpublic0http://unwiredben.livejournal.com/294782.htmlFri, 16 Oct 2009 20:10:54 GMTLaser-Cut Mozilla Fennec Logohttp://unwiredben.livejournal.com/294782.html
<div style="float:right;margin-left:10px;margin-bottom:10px"> <a href="http://www.flickr.com/photos/unwiredben/4008950781/" title="photo sharing"><img src="http://farm4.static.flickr.com/3508/4008950781_b131bb485c_m.jpg" alt="" style="border: solid 2px #000000;" /></a> <br /> <span style="font-size: 0.9em; margin-top: 0px;"> </span></div>I've been wanting to make something with the Fennec logo for a while, so after getting some experience with the NYC Resistor laser cutter for another project, I decided to try my hand at making a laser-cut Fennec. This one took about four minutes of Epilog laser time, most of it spent in the etching of the details. I imported the logo from a PDF file into Corel Draw, edited the internal vectors so there were no vectors that would cause cutting, then made a new outline around everything that I marked as a cut line. The material is opaque blue acrylic, but for a final run of these, I'll use a very nice transparent blue that we've got in our stockroom.<br clear="all" />http://unwiredben.livejournal.com/294782.htmlprojectsphotosnyc resistormozillapublic2http://unwiredben.livejournal.com/293797.htmlFri, 31 Jul 2009 20:02:27 GMTPanning in Mozilla Fennec and IFRAMEshttp://unwiredben.livejournal.com/293797.html
On the desktop, scrolling a page involves changing the page's scroll position.&nbsp; This uses OS-widgets like scrollbars -- the OS&nbsp;will copy part of the page to the new position on screen and ask the browser to draw the part that's exposed.<br /><br />On Fennec, we instead have an off-screen browser instance.&nbsp; We ask it to render parts of the page into a large canvas element that we reposition as the user drags.&nbsp; This canvas is larger than the visible area, so usually a pan won't show areas beyond the canvas.&nbsp; When the pan is over, we reposition things and redraw so the next pan can proceed as normal.<br /><br />This has been the source of a lot of bugs.&nbsp; It's been fairly easy through kinetic scrolling and zooming to get the browser into a situation where it didn't fix up the canvas properly or start drawing again, letting the checkerboard or gray background show through.&nbsp; In severe cases, you can get the whole screen to be checkerboard, which effectively hangs the browser as you can't pan back to any of the controls.<br /><br />Recently, one of our summer interns, Roy, has been working with Stuart on a new system to deal with these problems called the Tile Cache.&nbsp; Rather than have one giant canvas, we now have a lot of smaller canvases that we draw into as needed.&nbsp; Tiles can be moved around by the cache so there's always a cloud of them around the ones visible on screen.&nbsp; It seems to make panning a lot faster, but it's required a lot of changes to input handling code and user interface code, so it's not yet landed in our main Fennec development trunk.<br /><br />While this has been happening, I've been working on a patch to support panning of IFRAME and FRAMESET content.&nbsp; Unfortunately, IFRAME&nbsp;panning is going to be a bit slower than page panning, as we effectively just change the scroll position of the embedded frame, which then causes a lot of the page to be invalidated and redrawn.&nbsp; There are some more complicated techniques that could be explorer for avoiding the whole-area invalidation, but they probably won't be done for the 1.0 release.<br /><br />To get IFRAME panning to work, when you start a drag, we have to dig into the page content and see if your finger has touched a frame element on the screen.&nbsp; If so, we scroll that element based on the finger movement. &nbsp;If you get to the edge, we then move its parent; this is needed to prevent you getting into a situation where you can't pan over to the controls because you zoomed into a IFRAME's area.&nbsp; One popular site where the whole page is an IFRAME&nbsp;is Google Mail, so without the overflow movement, it would be easy to get stuck.<br /><br />With luck and a lot of code reviews, all of this should land in time for the third beta of Fennec for the Maemo platform.&nbsp; I&nbsp;think it wll be a much better Fennec experience, and with IFRAME&nbsp;scrolling, we'll do something the other mobile browsers like Safari on the iPhone don't support.http://unwiredben.livejournal.com/293797.htmlmozillapublic5http://unwiredben.livejournal.com/289415.htmlTue, 24 Feb 2009 20:17:17 GMTMore with Mozilla and htinkeringhttp://unwiredben.livejournal.com/289415.html
Work continues with Mozilla.&nbsp; We're about to go into a week of testing on the first beta release of Fennec for the Nokia N810.&nbsp; I've got one major patch that should be in this release.&nbsp; I've been working in the JavaScript code that acts as the front-end of the browser.&nbsp; We had a problem that we could drag around the content of the page, but lists that were in the chrome around the page, like the URL&nbsp;suggestion list or the bookmark list, couldn't be moved.&nbsp; My patch moved the drag handling to a higher level so it can be used to handle both cases.&nbsp; Most of the implementation strategy came from Stuart and Mark, but I did the actual grunt work of writing the code and getting it to run correctly.<br /><br />I&nbsp;really like the Mozilla review process.&nbsp; Basically, I&nbsp;do work on my own machine and post it as a proposed patch to the bug.&nbsp; Other people on the team get a change to review the change, and if they like it, they give it a thumbs up.&nbsp; If they have issues, they post them back to the bug, I&nbsp;fix them, and produce a new patch.&nbsp; Once the reviews are all accepted, the change gets landed in the source repository, and it goes into the next official build.<br /><br />Outside of Mozilla, I've started doing some work with a new hacker group here in New York called <a href="http://www.htink.net/">HTINK</a>.&nbsp; The h is silent, so it's pronounced like &quot;tink&quot;, and makes me a htinker.&nbsp; We've got <a href="http://htink.eventbrite.com/">a big workshop we're doing here in NYC&nbsp;on March 14th</a> where we'll be building lots of Arduino-compatible microcontroller boards and hooking them up to RGB&nbsp;LEDs and robot servo motors.&nbsp; There's more stuff being discussed later in the year too.&nbsp; I'm also working on material for an Arduino web server workshop where I'll show how to hook up one of the boards to your Ethernet and run a simple server on it so you can read sensors or change outputs.&nbsp; That class will happen at NYC&nbsp;Resistor, probably in early April.<br />http://unwiredben.livejournal.com/289415.htmlnew yorkworkprojectsmozillatechnologyarduinopublic1http://unwiredben.livejournal.com/289259.htmlFri, 30 Jan 2009 18:40:34 GMTFirst Week at Mozillahttp://unwiredben.livejournal.com/289259.html
I'm wrapping up my first week as a paid employee of Mozilla; I'm still out in Mountain View right now, but I'll be heading back to New York tonight.<br /><br />So far, it's been a great experience, although it's a major change from how I was working at Palm. It reminds me of when I first went to Metrowerks 10 years ago; I'm the new guy dealing with a lot of technology that I'd not seen before. While I've been using Firefox and the other Mozilla products for years, I never really had to dig into how it all worked. I'd a passing understanding of XUL and how the browser's front end used JavaScript to interface with a big pile of C++ code, but now I'm actually responsible for knowing how that connection works in intimate detail. There's been a lot to absorb.<br /><br />However, most of the week has been more mundane stuff, like handling all the HR stuff, setting up a new laptop and figuring out how to build things for myself. Alas, Mozilla isn't 100% Joel test compliant; building the product isn't too hard to figure out, but it's not just "run this script". My current stumbling block is getting the Fennec build for the Nokia N810 working. It relies on a weird compilation environment called Scratchbox that tries to hide the fact that I'm building ARM code on a x86 machine from the build process. In theory, this works great. In practice, it means I occasionally get really weird error messages that require very analytical decoding.<br /><br />I am excited by the UI possibilities of Fennec. It's core is the same as Firefox, but it's the UI where things are different. Buttons are bigger and designed for hitting with fingers, not mice. The UI tries to go away, giving you the maximum space for content. We're just now figuring out how to determine the best width to use for a given web page so we can zoom the appropriate amount to display content. We're also tacking problems like using a five-way navigator on a mobile device to move around a page effectively. These are things I've seen other browser do well, but they're problems that the Mozilla team hasn't had to handle before with their desktop focus.<br /><br />The big difference with Mozilla is that we want to do all of this in an open fashion where it's easy for users to install add-ons that enhance their browsing experience or add capabilities to the browser. This justifies the work on getting the Gecko core into a widely distributed mobile web browser over just giving into Webkit. The Firefox add-on community does amazing things, and I can't wait to see that creativity on mobile devices. I'm already thinking of a few add-ons I'd like to write from the silly (turn all of the pictures on a page into low-res versions to simulate running on 8-bit computers) to the useful (e-book reading).<br /><br />OK, back to work. I want to see code I built running on a N810 before I leave tonight.http://unwiredben.livejournal.com/289259.htmlworkmozillapublic3