Using Apache Ivy on NetBeans

Sep 24 2013

I'm doing a bit of Java work right now, and I decided to play a bit with Ivy in order to manage my library dependencies.  Yes, I know Maven does that, but I'm just looking to do something a bit more lightweight and focused.  I'm perfectly happy with the Ant build structure/process that NetBeans uses by default and there's nothing that Maven offers to me that I need currently.  But I do want an automated dependency download process and I decided to spend a bit of time playing with Ivy in the NetBeans environment.

Pitfalls and problems when using innerHTML

Dec 14 2011

Lately I've been fixing some issues in an application that updates the HTML content in response to user actions via AJAX calls to get the new HTML content and then inserting it into the HTML via innerHTML.  It's nothing that anyone would consider rocket-science, but we've been getting all kinds of wierd problems when testing it in IE9.  Problems that we don't see at all in Firefox, Safari, Chrome or even IE8.

Debugging within the CakePHP Console

Sep 22 2011

Recently I've been doing some development of classes that run under the Job Queue CakePHP plugin, a great plug in btw, and I had a need to debug some of the logic.  As a reminder I use NetBeans 6.9.x on XPsp3 to develop code that is housed on a CentOS 5.6 VirtualBox instance that I access via a Samba share. 

Fixing file perms for TortoiseSVN over Samba

Feb 28 2011

My day-to-day dev environment is an Oracle VirtualBox setup to run CentOS 5.  I have Samba installed on the Centos so that I can mount the Samba share as a drive on Windows where I use NetBeans as my IDE.  I use TortoiseSVN as my source code control system, and for reasons I have not figured out yet, there are times when Tortoise really hornswaggles the permissions on my projects .svn files.  I end up with commits that are not able to increment the revision numbers because the files end up owned by root when they should be owned by apache.group.  So since I don't really care to spend much time figuring out why, here is my quick fix when this happens

Debugging SQL commands in CakePHP

Feb 25 2011

I just don't get it - why is debugging with a real debugger such a black science in PHP?  You'd never see someone dump code to the screen in a C++ dev environment, yet based on what I've just seen while searching Google for some creative CakePHP techniques you'd never know that some PHP "developers" (no html tag that I'm aware of for 'air quotes'...) have an inkling that debuggers exist.

Video: Setup Xdebug in under 3 minutes

Jan 26 2011

Lots of folks get confused on where and how to begin with Xdebug. This video, first in a series, shows you how to setup PHP and Xdebug on a Windows XP box, what to files to configure, and what to look for to tell you if Xdebug is working.

Basic steps:

Getting Firebug Lite working on iPhone Simulator (or, how to add a bookmark to Safari on the iPhone Simulator)

Jan 19 2011

I'm working on some javascript front-end code for one our clients and it's not working correctly on the "mobile" iPhone/iPad/iOS version of Safari.  Which is odd because it works fine on the "normal" versions of Safari (Mac and Windows).  Since I don't actually have an iPhone/iPad/iOS device, I'm limited to debugging the javascript on the iPhone Simulator but it shouldn't be a big deal (famous last words) since Safari has good javascript debugging tools (Develop -> Start Debugging Javascript).

So I fire up the iPhone Simulator and set the device hardware to be an iPad (more screen size is always better) and I turn on the javascript debugger (Settings -> Safari -> Developer -> Debug Console) and......all I get is a console log that shows output.  No debugger, no console, no resource loader, or anything else that is useful.  Yuk! 

How to create a verifiable URL

Jan 18 2011

As a user, there have been times where I have played with the URL querystring of a page to see what happens when I change the values of various parameters in it.  It can, at times, bring about unexpected and interesting results.  For example, if you are viewing a page with the URL of http://example.com/viewcustomer?id=1 wouldn't you be a bit curious what happens if you change that to read http://example.com/viewcustomer?id=10 ?  I know I would (and have...).  Depending on the coding behind the page, sometimes you get error pages or maybe you get to see data and/or results that you're probably not supposed to be seeing.

As a developer, sometimes you need to make absolutely sure the URL querystring that is being parsed by a page hasn't been changed at all.  This is especially true for scenarios like sending out links via email for password resets or automatic logins.  There is a very simple way to do that and over the years I've been surprised how many times I've had to teach other developers - Junior to Senior - this method.