Rob's blog
Google I/O Registration Opens, Anyone want to send me?
Google I/O looks like it's right up my alley. I was surprised to see Steve Souders is presenting there. He's the author of YSlow and Yahoo! was printing his 14 tips for speeding up website front-end performance on cards for Blogher last year (under the unusual title of "How to be a Better Binary Babe"). I have used YSlow to improve my own sites' performance though I definitely don't get an A on all of them yet. I'd love to hear what else he has to say on the subject. I also see there's one on Caja, another attempt to make Javascript "Safe". While my first reaction to this and Douglas Crockford's Adsafe is to roll my eyes, I know I'm going to hear a lot more about both soon so it's best to dive in and find out what's what. Really, I think the whole AJAX and Javascript topic is the most interesting part to me right now. Jeff and I started tossing around the idea of making a trip out to I/O a few days ago. It doesn't look like a real possibility but I saw that registration is open this morning so if any generous reader wants to contribute to sending me then drop me a line and we can talk ;).
A difference of opinion
On talking about some improvements in memory handling on Firefox 3:
It isn’t reasonable to expect all those authors to write code to manually break the cycles themselves.
This reminded me immediately of an MSDN article that took a decidedly different stance on pretty much the same problem in Internet Explorer:
The good news is that memory leak patterns can be easily spotted if you know what to look for.
The fact that the MSDN article is from 2005 really drives home just how stunned I was when I first read it. The page goes on to describe how web developers should analyze their Javascript and write their code to work around bugs in garbage collection. I understand the idea that sometimes users have to work around bugs in a program but that's definitely not the message I got looking at the MSDN article. It read a lot more to me like "we sent out IE 6 SP2 about a year ago and we have no intentions on fixing this any time soon." Then look at the audiences that these two very different standpoints are aimed at. The Mozilla post is about extension developers, a relatively small and advanced group compared to the number of web developers - the ones most likely to understand the issue if anyone does. The MSDN post talks to "every web developer" and says to "Use defensive coding practices and assume that you'll need to clean up all your own memory." While this may be practical advice for advanced coders, in this context it says to me that there's no intention from Microsoft to really fix this problem. Kudos to Mozilla for working to improve efficiency and close leaks instead of blaming web developers.
Displaying PHP Errors in Development

Here's a quick tip for PHP error reporting and display in development.

When a project is in the early stages of development you want to see all the error information you can. You probably want E_STRICT on especially when you're starting from scratch, to help avoid relying on deprecated behaviour. The E_STRICT flag is only available as of PHP 5 and is not included in E_ALL until PHP 5.2 (there's a little disagreement on between the definition of E_ALL in this table and the earlier note about error_reporting on the same page).

In an early development project you also don't want to have to keep tailing log files to see the error messages. That's a pretty sure way to miss errors. So you want to set the display_errors flag on. You also want to control this on a per-project basis, since some projects will have legacy bugs that you're not fixing right now and those can be left spouting errors to logs until someday in the future when you decide to fix them.

Time Quality
Not all time is created equal. I've started getting up a lot earlier lately and I've found that for me the hours from 6 am to about 10:30 can be really productive. I have a pretty easy time getting focused and if I can get myself in front of a project then I really take off and get things done. Compare that to the early afternoon from, say, 1 until 3 pm and the afternoon version of me seems to be asleep by comparison. I'm unfocused and mentally wander around looking for shiny objects. In the evening I can get plenty done in the battlegrounds on World of Warcraft but when I try to claim that time to work on my taxes I end up frustrated. I've noticed it before but never to the degree that I do now. There are different times of day that I perform better at different tasks. My empirical evidence can be tied back to better sleeping habits and being well-rested and alert in the morning but I think there's something more to it. I think there are a number of factors that make different times of day better for different tasks. Different times of day have different qualities. Some factors are internal and some are in my surroundings. I don't deal well with interruptions for most anything involving a computer. If I'm writing code or configuring software then it just takes a short conversation to put me off track. The worst part is that I often instigate those conversations. Early morning hours are generally devoid of distractions though. There are fewer background thoughts in the morning as well. Since I've been asleep I haven't got any problems on my mind except for the first one I pose. If I've had a tough bit of design question the day before then first thing in the morning I can ask it fresh and it has my whole brain to roam around in until the other distractions show up after lunch. So I like mornings now, with no distractions inside or outside and a freshly charged brain to work on. In the summertime I hope to start going for early morning bike rides again - that's a great way to get the blood flowing. By the time the evening hours come I've had a steady flow of mental work and I'm ready for a good change of subject. That's what makes it a good time for some gaming or some housework. The fact that the house is a mess by the end of the day makes it easy to find something to do that takes very little thought and gives my tired head a rest and make my body work. Tidying the kitchen or working on a construction project (ones that involve hammering are best) makes for a welcome change. Still, I often try to sit down and get a couple hours in on some nagging software-related problem but usually the results are less than stellar. The smallest mental bump in the evening is magnified into a roadblock that turns my full attention to Youtube, Fark or Slashdot. I'm still working on this theory but I have to say that I found a lot more high-quality time when I moved my waking hours from late morning to early. I had to stop drinking coffee regularly to do it because otherwise I just didn't want to go to bed by 9. Not that I couldn't, I just really didn't want to. With me, I've learned that the things I want are more powerful than the things I tell myself I need to do, so the coffee had to move from regular daily habit to weekend treat. That let me make going to bed at a healthy time something that I wanted to do and made mornings more enjoyable. Feel free to add to my theory in the comments...
Windsor Blogs
Usually I have to get on a plane to get to really talk to anyone else that blogs. We won't make it out to Vancouver for Northern Voice this year, but we did go last February. Then there was BlogHer in Chicago last year and San Jose the year before. Come to think of it I've been doing this blogging thing for a few years now. I've never really considered myself a typical blogger though. I mean, sure I write about my own life sometimes and I do a bit of navel gazing, but I write more about Azeroth than I do about the city I call home. No, here in Windsor I've always felt like a bit of an anomaly. Sure there are businesses here that have a "web presence" or publish a menu on the web for their restaurant but by and large you get blank stares at the word 'blog'. I think that the sheer number of blank stares I've had to withstand has led to the dismissive tone that I take on when I say "well I blog sometimes..." then drift off incoherently. It was such a long time of Windsor websites looking like abandoned shacks that I think I may have stopped looking for local content. In the meantime, Candace has been working steadily on BlogWindsor and following the local blogging scene. Apparently something's really been happening out there. We've got local blogs. There's the Windsor Municipal Shadow, International Metropolis and Out of the Driver's Seat to name a few. If Candace weren't on the ball then I would have missed out on the first WE Speak Bloggers Meet tonight. A bunch of us met up the Mill for drinks and edibles. Among the crowd I got to meet Pina who writes for the most helpful Windsor Eats and on the other side of me was Mark Boscariol of ...Scale Down, Windsor. We all had a great conversation ranging from the usual topics about why we blog and opinions on mainstream media but we also got in to how blogging impacts Windsor. I like to hear other people explain why it is that they blog and what they get out of it. But, more than just explanations, I really enjoy hearing the tone of voice that conveys the new and unusual passion that blogging builds. I like to see a face light up relating the deeply personal satisfaction that blogging can bring. And I love to hear that happening right here in Windsor. I really wish we could have stayed longer - there was a lot left to hear and say - but with kids at home we couldn't be out too late. Here's hoping that someone has the ambition to get us all together again soon.
WoW PvP Rewards for Mages

I've never been really in to PvP before. I played a little Warsong Gulch with my hunter a while back but now that I hit 70 a couple weeks ago with my main, I've developed a thing for Arathi Basin.

I've really just binged a couple of nights, once on Warsong Gulch and once on Arathi Basin. Once I noticed that some of the gear only costs 20 Marks of Honour from Warsong Gulch I thought maybe that wasn't a big purchase. I'm a casual player so I don't follow all the details of this. Still I'd like to get some better gear when it's within the bits of game that I'm going to play anyway. What I didn't realize until I went to turn my marks in for loot was that the much higher cost is the required Honour points. I've decided that I'll just PvP when I feel like it and if I get enough honour and marks from the various battlegrounds then I'll buy the pretty purples when I can. It can't be as simple as that of course. So I had to sit down and dig through WoWHead today and find what you buy how.

Starting a Debug Session for Android with ADT

I want to build an application targeting the Android platform. I'm a little rusty with Java but I really like developing with Eclipse (I've been using it for some other stuff like PHP development). The ADT plugin got me started with the sample applications pretty quickly but now that it's time to deviate and build something of my own I have to set a nice low goal that I can knock out with a high chance of success. Then I can iterate and go a little deeper on the next pass. To start with I think I'll play with drawing primitive graphics. There's an API example called DrawPoints with some code that just spouts out random points on the screen. I took a fair chunk of that and stuffed it in to the "Hello, Android" application I built earlier.

All in all the activity's pretty straightforward and Eclipse makes it even easier. I'd post the code for drawing but it's almost identical to DrawPoints at this stage. The next step is to get some new code in there. I decided to go for my old standby, the Hilbert curve. I modified the code to suit the drawing environment but didn't get results right away. I learned a few things about debugging with the Android emulator and ADT in the process.

When Android doesn’t Launch your application

As I've been getting started with Android I decided to take some notes. What follows is something I wrote down as I was working on getting a first sample to build and download from Eclipse using ADT. I followed the instructions from Google and tried the troubleshooting directions. My platform is OpenSuse 10.3 Linux. This note might be helpful if you're trying to develop for Android.

Some Android Emulator Screenshots

I know I'm not the only one casting about for good application ideas to build on Android. Now that I have the samples building and running and I've got a little time on my hands, my plan for today is to move on to building some of my own original code. Since it's based on Java SE and not micro edition it should also be possible to port some interesting applications over. To start with I'm thinking of something simple and non-interactive like a screensaver or other eye-candy. After that I've got a couple other things up my sleeve but I need to try out the platform to see what's really doable.

Catching Errors when your Lua Script doesn’t start
Getting an error code back when a Lua script dies is actually pretty straightforward. Use lua_pcall() or one of its relatives to call the script and the return value will tell if there's been a run time error.
Syndicate content