Archive | Coding RSS for this section

A Happy Accident

While working on a new Ajax Indicator, my code accidentally generated this. Pretty cool!

iPhone Accelerometer Code

As I mentioned in the comments over here, getting UIKit to give your app Accelerometer data is pretty straightforward. Here’s my sample code that combines the accelerometer howto from the standard iphone hello world app and Erica’s slider howto.

Note: Kroo from IRC warns that this technique will only work if the app is launched from launcher or the springboard.

Also: Drunknbass found that you may have to restart springboard before it will work.

And: Check out Erling’s code if you want a faster sample rate.

iPhone Dev

I’ve been playing around with the iPhone toolchain. The first project I’m working on is something I need (an Exchange client), but I’d like to make something fun afterwards. For inspiration, I’ve been looking at the old Nokia Concept Videos.

Google Gears Podcasts

These two podcasts provide great background on the new Google Gears (AJAX apps, offline) project. The first, with Brad Neuberg (THE expert in the field of offline AJAX), covers the basics and discusses the connection between Dojo’s offline functionality and Gears. The second, with Mike Tsao, covers the short history of Gears development and gives a great technical overview.

Firebug video

Joe Hewitt demos firebug. If you’ve been using firebug a lot, this will mostly be a review, but I saw several things I hadn’t noticed before:

  • calling console.profile in your javascript to turn on the profiler for specific regions of code, rather than the bazooka style profiling that the profile button gives you.
  • There is a “log all calls to” option in the right click menu when you are inside a function definition in the script tab. Params are logged! If you want to log the stack traces, use console.trace.
  • I use the box model display often, but I didn’t notice before that rulers are added to your page when you mouse-over the box. Nice.
  • When you are editing an attribute in the HTML or the CSS edit modes, you can use cursor keys to increase or decrease dimensions.
  • Documentation for the firebug API is coming soon!
  • Ctrl-Click while debugging will “run to the clicked line”.
  • When you are in the DOM tab, the variables you added to the name space are in bold at the top… handy.
  • When you paste multi-line text into the console’s command line, you get a larger text area to enter your code.
  • The copy button in that larger javascript area mushes together the current javascript into a string suitable for bookmarklets.


When will Javascript be directly editable in Firebug?

When will Javascript have syntax highlighting?