Wayne Pan

tech | js | ui | ajax | life | mobile
Filed under: ,

I just realized why Apple is willing to sell the iPhone for $199. No it’s not the kickback from AT&T. It’s the apps! They’re undoubtedly losing money on the device and banking on the fact that people will purchase so many apps over the life of the device. Sound familiar? Yup, it’s the same business model as the video game console market.

Maybe I’m the last one to realize this…

Comments (0) Posted by Wayne on Monday, June 9th, 2008

Filed under:

mac.png
Where is the Mac? No, not the iMac or the Mac Pro or even the Mac Mini. I’m talking a Mac, a machine that gives me better than iMac specs without a built in monitor. I don’t need the nuclear powered Mac Pro (or it’s price) but at the same time don’t want the paltry Mac Mini. Give me something in between damn it!

IMO, Apple has missed yet another opportunity at this year’s MacWorld by not introducing such a machine.

Comments (0) Posted by Wayne on Wednesday, January 16th, 2008

Filed under:

zzz.jpgYesterday was a nightmare of a computing day for me. Along with my Ubuntu box not wanting to restart (which was my fault, I upgraded the kernel without upgrading the video drivers, sigh) my Macbook’s keyboard would not work intermittently. At first I thought it was faulty hardware until I looked online and found a whole slew of people with the same problem.Apparently the keyboard likes to go to sleep under Leopard. Appleinsider.com is reporting that the keyboard disappears from Apple’s System Profiler utility. Third party software has been ruled out as people with 2 week old fresh Leopard installs are reporting the same issue. There’s no official fix out yet, only temporary solutions workarounds. You can…

  • Use an external usb keyboard
  • Press and hold a key until the keyboard wakes up again
  • Open and close the lid
  • Reboot (eg. The Windows Solution) and hope it doesn’t come back.

Hopefully Apple fixes this soon, feels like the freezing issue all over again. Which actually hasn’t happened since I’ve upgraded to Leopard! Update!

 About MacBook, MacBook Pro Software Update 1.1  

This update addresses a responsiveness issue on MacBook and MacBook Pro notebook computers. Some MacBook and MacBook Pro systems may occasionally experience a temporary suspension of keyboard input which can last a minute or longer. The Mac OS X 10.5.1 update is required before installing the MacBook, MacBook Pro Software Update 1.1. Download 

Comments (0) Posted by Wayne on Wednesday, November 28th, 2007

Filed under:

I installed Leopard and like some people on the net, MySQL was no longer running. MySQL would not start from the preferences pane and running mysqld from the command line got me:

wayne-pans-computer-2:bin Wayne$ mysqld
071026 17:29:55 [Warning] Can't create test file /usr/local/mysql-5.0.45-osx10.4-i686/data/wayne-pans-computer-2.lower-test
071026 17:29:55 [Warning] Can't create test file /usr/local/mysql-5.0.45-osx10.4-i686/data/wayne-pans-computer-2.lower-test
mysqld: Can't change dir to '/usr/local/mysql-5.0.45-osx10.4-i686/data/' (Errcode: 13)
071026 17:29:55 [ERROR] Aborting
...

Turns out for some reason the data directory has the wrong permissions.

wayne-pans-computer-2:mysql-5.0.45-osx10.4-i686 Wayne$ pwd
/usr/local/mysql-5.0.45-osx10.4-i686
wayne-pans-computer-2:mysql-5.0.45-osx10.4-i686 Wayne$ ls -la
total 96
drwxr-xr-x  19 root    wheel    646 Jul  4 10:54 .
drwxr-xr-x  14 root    wheel    476 Oct 26 17:29 ..
-rw-r--r--   1 root    wheel  19071 Jul  4 06:06 COPYING
-rw-r--r--   1 root    wheel   5139 Jul  4 06:06 EXCEPTIONS-CLIENT
-rw-r--r--   1 root    wheel   8528 Jul  4 10:15 INSTALL-BINARY
-rw-r--r--   1 root    wheel   1410 Jul  4 06:05 README
drwxr-xr-x  73 root    wheel   2482 Oct 26 17:29 bin
-rwxr-xr-x   1 root    wheel    801 Jul  4 10:53 configure
drwxr-x---   4 _mysql  wheel    136 Oct 26 17:29 data
drwxr-xr-x   4 root    wheel    136 Jul  4 10:53 docs
drwxr-xr-x  67 root    wheel   2278 Jul  4 10:54 include
drwxr-xr-x  21 root    wheel    714 Jul  4 10:54 lib
drwxr-xr-x   4 root    wheel    136 Jul  4 10:53 man
drwxr-xr-x  15 root    wheel    510 Jul  4 10:54 mysql-test
drwxr-xr-x   3 root    wheel    102 Jul  4 10:54 scripts
drwxr-xr-x   9 root    wheel    306 Jul  4 10:54 share
drwxr-xr-x  31 root    wheel   1054 Jul  4 10:54 sql-bench
drwxr-xr-x  15 root    wheel    510 Jul  4 10:54 support-files
drwxr-xr-x  20 root    wheel    680 Jul  4 10:54 tests

So I simply chmodded data (with -R) to 777 and mysqld works again (along with the MySQL pref pane). Not the most secure way, but I said quick and dirty didn’t I? Before doing that I also tried chowning to root and starting mysqld with sudo but it complained about starting mysqld as root. Hopefully this helps someone out there.

On a side note, I hate the new dock. Try to figure out which one my apps are running by quickly glancing at the picture below. It takes some time for you to focus in on those light blue dots. Give me back the black arrow! (Also in the screenshot below, Eclipse is running but a second Eclipse icon is generated as the real Eclipse process. Not sure if I can blame Apple for this one.)

picture-1.png

My biggest reason for upgrading is actually to see if Leopard will fix my annoying freezing issues!

Comments (1) Posted by Wayne on Friday, October 26th, 2007

Filed under: ,

title_macosxleopard_20071009.pngI was reading on Mac OS X Leopard and it’s new features and ran across this gem:

Ruby on Rails

Work in a developer’s dreamland. Leopard is the perfect platform for Ruby on Rails development, with Rails, Mongrel, and Capistrano built in.

Thank god! Getting RoR on OS X was a bit of pain if I recall (things you do once and forget about). The more Apple does of this the better… How about making a decent apt-get?

Comments (0) Posted by Wayne on Tuesday, October 16th, 2007

Filed under:

I switched the a MacBook Pro a recently and overall the machine is 10x better than any Windows laptop I’ve ever owned. (Sleep/hibernating a Windows machine is like playing russian roulette except all the chambers are full.)

However, the single most annoying bug in OS X is that every week when I’m working and I hit command-tab, the GUI freezes. The mouse still works, iTunes still plays, Apache is still running, sshing into the box and killing processes off one by one does not recover OS X.

Normally, it costs me about 20 mins of productivity except today I had an unsaved scratch pad open in TextMate. Now it’s lost, forever. I did some research and it seems like the problem dates back at least a year and it’s hard to believe that Apple doesn’t know about. From what I can gather nobody knows for sure what the cause of it is, except that it’s triggered by command-tab switching applications.

Theories like replace the switcher with LiteSwitch X, not using an external display, and don’t use 3rd party apps all seem to have some holes in them according to the threads I’m following.

I’m going to run the trial version of LiteSwitchX and see if it keeps happening although I think it’s a ludicrous idea.

Update:
Engadget reporting that Apple at least acknowledges the issue for iMacs. Hopefully the fix will apply to MacBook Pros. Everything seems to be pointing to the ATI video drivers. (crosses fingers)

Comments (4) Posted by Wayne on Tuesday, September 25th, 2007

Filed under: ,

9-5-07-official_ipod_touch.jpg
The phoneless iPhone iPod Touch is now official. $299 for a wifi iPod with full browser. What does this mean? Cheaper to develop, bigger audience can only translate to more iPhone specific sites!

All those iPhone sites ( facebook, digg.com, etc ) have now increased in value. Along with it, iPhone specific ad units… with wifi becoming more and more abundant this will only be a good thing for mobile.

Josh Cantone from read/write echoes the same sentiment.

Comments (0) Posted by Wayne on Wednesday, September 5th, 2007

Filed under: , ,

The iPhone has been great for mobile, it’s given a full browser to the mobile world. Except for one thing, it’s Safari, which can be good and bad. It’s good for example if you’re developing an app for iPhone, you have one browser to test and develop against. It’s bad because it’s Safari, not known to be the best of browsers.

At AdMob, I’m responsible for developing the javascript ad code for our iPhone specific code. Recently we’ve been experiencing odd behavior on sites where the ad code would simply not run. We finally narrowed it down to the fact that sites were setting content type as application/xhtml+xml. When Safari is in this mode it doesn’t like you doing such things as document.createElement(’div’) or eL.innerHTML = ‘<div>text<div>’ or even eL.innerHTML = ‘text’; all of which are normal dhtml techniques.

Instead it expects you to use document.createElementNS and document.createTextNode which are the proper way to add XHTML elements. So I ended up having to rewrite our entire iPhone javascript code and a simple nifty utility function. :-)

  var createElement = function(type, props, styles) {
    var d = document.createElementNS('http://www.w3.org/1999/xhtml', 'html:' + type);

    for(var i in props)
      d[i] = props[i];

    for(var i in styles)
      d.style[i] = styles[i];

    return d;
  };

  // usage
  eL.appendChild(createElement('div', { id : 'divId' },
        { float : 'left', width : 100px' }));

Comments (0) Posted by Wayne on Saturday, September 1st, 2007