__MyCompanyName__
Wednesday, May 20th, 2009How to change it: Xcode and MyCompanyName
It’s the little things, you know?
How to change it: Xcode and MyCompanyName
It’s the little things, you know?
More SVN stuff I can never completely remember. As seen from running svn update, svn switch, or svn merge. “G” always throws me. See $ svn status help for details.
U filename = item (U)pdated to repository version
G filename = item’s local changes mer(G)ed with repository
C filename = item’s local changes (C)onflicted with repository
D filename = item (D)eleted from working copy
A filename = item (A)dded to working copy
~ filename = item (S)ubstitution; for example local file update obstructed by substitution of a symlink with the same name in the repository (I think of this as a sideways/backwards “S”)
Also note that a real “S” flag means that something has gone horribly wrong with a switch and that the operation was not fully completed. Hopefully you’ll never see this.
And I thought developing against cron was bad.
In J2ME, at least on BlackBerry devices, one cannot test Timer and TimerTask objects by simply changing the device clock. J2ME apps seems to remember the time at which they were launched, rather than pinging what the clock on the device says.
Testing involves shutting down the app, resetting the clock, and starting the app back up. Time consuming if you’re working on an app with some heavy startup / shutdown overhead.
What the.. This is annoying. And all I wanted to do was write a hack to see my AdSense pittance from within WordPress.
BlackBerry Simulator mysteriously dying every time you try to fire it up on Vista? Same here. It’s a good thing I’ve become a compulsive reader of release notes. From the the latest JDE 4.6.0 docs:
If you install the BlackBerry® Java® Development Environment on a computer with Windows Vista™, if Use Account Control is turned on, launching the BlackBerry® Smartphone simulator might produce error messages and the simulator might not start.
Translation: Simulator will definitely. not. start. And of course they mean User Access Control. How-To Geek has an easy way to kill UAC here.
Mika Tuupola has come up with an elegant logging mechanism that has already found its way into the official PEAR::Log package.
It’s a snap to use. Simply instantiate a “Firebug” log as such:
$log = &Log::singleton('firebug', '', 'PHP', array('buffering' => true), PEAR_LOG_DEBUG);
Output will then go to your Firebug console window:
$log->log('Debug lorem ipsum.', PEAR_LOG_DEBUG);
$log->log('Info wisi enim ad minim veniam', PEAR_LOG_INFO);
$log->log('Warning est usus legentis in', PEAR_LOG_WARNING);
$log->log('Error est notare quam', PEAR_LOG_ERR);
To split output to both the default error log as well as the Firebug console, build a “composite” log:
$log = &Log::singleton('composite');
$logFile =& parent::singleton('error_log', PEAR_LOG_TYPE_SYSTEM, 'to error log', array(), PEAR_LOG_DEBUG);
$logFire =& parent::singleton('firebug', '', 'to firebug', array('buffering'=>true), PEAR_LOG_DEBUG);
$log->addChild($logFile);
$log->addChild($logFire);
I was surprised to receive a support request last week for the Mantis State Plugin. Given that the thing wouldn’t allow itself to be uninstalled, I figured it was time to release an update.
Version 0.0.4 includes clearer severity output, issue details on mouseover, and an attempt to better visualize date ranges within the state matrix.
Oh, and it can now be uninstalled.
Mantis StateIt’s an Emacs weekend here at blog.arithm.
I was recently asked if it was possible to do remote PHP debugging with Emacs. We’re talking about Emacs, so the answer is: Of course! How to do it:
debugclient somewhere in your path. (Here Emacs is running on Windows, so I just threw it into the C:\WINDOWS\ directory.) Make sure the executable is named “debugclient” and not “debugclient-0.9.0″ or whatever.Now, assuming you already have xdebug plugged into PHP, modify php.ini or an .htaccess file with the following settings:
xdebug.remote_enable = true xdebug.remote_handler = dbgp xdebug.remote_host = your_client_ipFor security reasons it’s wiser to do this via .htaccess on directories that permit only authenticated access.
To debug, ask Emacs to listen for connections by going into GEBEN Mode with Meta-x geben. You should see “xdebug started.” in the status row at the bottom of the Emacs window.
Run your PHP script with the xdebug switch on, eg.
http://www.example.com/script.php?XDEBUG_SESSION_START
If everything is setup correctly, Emacs will load the source of script.php (be wary of security!) and allow you to step through the code.
Available commands are:
spc step into/step over
i step into
o step over
r step out
b set a breakpoint at a line
u unset a breakpoint at a line
g run
q stop
Some gotchas: I’ve noticed the GEBEN expects the first keystroke to be “space”; often it will freeze otherwise. GEBEN may also run into problems on certain session-related PHP commands.
Happy debugging!
Despite all the nice things I said about TOAD last year, I thought I should mention that I find myself still using DBVisualizer almost exclusively.
Although TOAD has some really powerful features, DBVisualizer is just so easy to use.. that it’s a difficult habit to break.