7/28/2008

Eclipse 3.4 to NetBeans 6.5 M1

It is time to get back into NetBeans. It used to be my primary IDE before Eclipse hit the scene and now with its excellent Ruby and now PHP support it seem appropriate to start re-learning how it works.

It is certainly faster now and the UI is cleaner than it used to be. Steps in the right direction.

This is where things went horribly wrong.

Import an eclipse java project into a netbeans java project. Netbeans decided that I didn't want my "build" directory anymore so replaced it with it's own. How assignign is that.

So, first hint, do not, import an eclipse project into a netbeans project if you have a build directory.

6/23/2008

Leaving Photrade Behind

I have decided to resign from Photrade. We both decided that this relationship wasn't a good fit for either one of us.

The Photrade team has grown immensely in the four months I was with them. With the latest improvements in the beta product bringing on new customers by the day, it is clear that Photrade will continue to be a great product and with its enthusiastic and talented team it will surely be a great success.

My next steps are to take a few days off to go sailing with my wife which is something we have missed while getting the Photrade site up and running. Then back into the software consulting world, which has been really good to me in the past but, this time, as an independent.

So, if anyone needs some software built, drop me a line, I will see if I can fit you in.

6/13/2008

Don't use gmail in production

because, one day, you will have too many customers, and generate more emails than the great Google deems appropriate for your company.

550 5.4.5 Daily sending quota exceeded.


I would have to say that the smtp gmail service isn't reliable anyway with it's two second response times,
421 4.7.0 Temporary System Problem.  Try again later (WS).
and
550 5.7.0 Mail Sending denied.
all up in my face.

Switching to a local postfix server tonight. 5 emails/second, no errors. Much nicer.

IE Better for Testing HTML

Sorry about the inflammatory title. Let me explain.

  <input type="checkbox" CHECKED">

See the error? Just an extra quote but it fails in IE 7 and works in Firefox and Safari.

Firefoxs' FireBug plugin represents the checkbox as perfectly formatted dispite the syntax problem. Safaris' developer plugin shows the checked attribute as checked"="" which looks weird but it still works.

So, do I want to test with a browser that can make crap look good? I think not. I want a strict validator of my rendered code so that I can be sure that it will work consistently in all places.

The other thing that we break in IE all the time is the missing var in the javascript variable declaration. Firefoxs' and Safaris' javascript interpreter just auto-allocate on first assignment but IE complains of an undefined variable. I think IE wins here as well enforcing the script standard more closely.

So, while I don't have any decent javascript debugger or DOM inspector, for validating your HTML/JavaScript, it a better solution. Then back to FireBug for the rest of your day.

6/12/2008

Domain Modeling Measure - Alpha Theory

If you find yourself passing this or self to things instead of other things you are moving in the right direction.

    public function doSomething()
{
return $someDoer->does($this);
}

Using ShareThis on Photrade

A sample post of a Photrade image to my blog using the Share This API.

A Cincinnati local company offering a really nice way for our users to distribute their images. See it at a Photrade site near you soon.


Sell photos on photrade | By esumerfd

Posted using ShareThis

6/10/2008

Photrade Release Party

The Photrade site is improving by the day. With new features being added, tested and released in a daily release cycle, it is really exciting to see it grow.

We were written up on Mashable last night which ended up causing our CPU's to blink, pause, and go back to sleep. It increased our load around 500% but we have loads of capacity to spare. You have to love fast machines, I get goose bumps just thinking about it.

Checkout the launch party.

5/16/2008

PHP Reflections In Time

Reflection in PHP is a little clunky and I say that with the greatest of compassion.

First of all we have the standard function interface to all that is good, call_user_func, call_user_method, func_get_args, get_defined_functions and so on.

So you can imagine a call_user_func to start with and then when classes came in they added call_user_method that takes the instance as well (surmising the history, I don't have any facts).

   class Fred
{
public function someMethod()
{
echo "Hello World\n";
}
}

$fred = new Fred();
$fred->someMethod();

// OR

call_user_method("someMethod", $fred);


However, this method is deprecated, in preference to old call_user_function with different parameters.

   call_user_func(array($fred, "someMethod"));


Then there are the new class oriented evolution with ReflectionClass, ReflectionMethod, ReflectionProperty and so on.

   $method = new ReflectionMethod("Fred", "someMethod");
$method->invoke($fred);


It doesn't seem to bad but there are new problems. This fails because "someMethod" is private, even though the call is from the same class. There doesn't appear to be a way around this. You can not call private methods with the new Reflection classes.

   class Fred
{
private function someMethod()
{
echo "Hello World\n";
}

public function testInvoke()
{
$method = new ReflectionMethod(__CLASS__, "someMethod");
$method->invoke($this);
}
}

$fred = new Fred();
$fred->testInvoke();


This produces this error message:

Fatal error: Uncaught exception 'ReflectionException' with message 'Trying to invoke private method Fred::someMethod() from scope ReflectionMethod'


However, you can switch back to the old way of doing it like this:

    class Fred
{
private function someMethod()
{
echo "Hello World\n";
}

public function testInvoke()
{
call_user_func(array($this, "someMethod"));
}
}

$fred = new Fred();
$fred->testInvoke();


The same situation exists with the two forms of property access:

$prop = new ReflectionProperty("Fred", "property");
$prop->getValue($fred);

and

    $fred->$propertyName


This mix of old an new techniques is how PHP is today and there is not much we can do but to wrap the variations in our own classes so that we can stay as portable as possible across future versions.

PHP, First Impressions

It has been 3 months now since I started learning PHP, I have spent lots of time fixing an existing site and reading over the good and bad of the available open source PHP projects.

I would describe PHP as a function based language with object oriented dreams. PHP lives in the between world where functions rule and programmers try to work out how to make use of its new OO features.

These OO features are new and many are missing key functionality so this has to be looked at as the evolution of a language that isn't quite there yet. It has the functions to get anything done, it doesn't have the class libraries to get much done.

I am not saying you shouldn't use PHP. This is a versatile language that can be made to describe some advanced language constructs.

It is widely regarded as a slow language that scales well. Not an oxymoron when you consider performance a mixture of response time and throughput.

One thing to get used to with PHP is typing. Everything you want to do will take more characters than java, c# and especially ruby. Every method is a minimum of 19, every property reference roles in at 8 and I can assure you, we programmers do that a lot.

I spend my days developing an class model to support my web project. Some classes support the business functions I need and others just wrap the plethora of php function calls that perform the low level work I need.

Architecturally PHP offers some interesting problems. It relies a great deal of the tuning of the environment that it runs in but from a code design perspective you have to look at the transaction path as a primary and inevitable cost. In java you might start with a simple transaction path through your product layers with the realization that you can cache strategic parts as you advance your performance footprint.

In PHP there is no "cross transaction" static. So every PHP file is parsed and executed for every request. Now PHP does this pretty fast but the more you add into the transaction stream the slower things will go.

Performance is approached at the environment and code optimization level. You tune apache and add in PHP JITs to make the code run faster but you can't do much to dynamically improve transaction path across requests.

The local user group, OINKPUG, is an excellent resource full of great PHP programmers always ready to help.

All in all, I am enjoying PHP and look forward to continuing to twist to my will.

3/10/2008

Photrade.com

and life moves on.

Twenty five years playing with computers, ten years of consulting, two point one years in startups. It's time for another change.

March began my time with Photrade.com, a small startup in Cincinnati with a lot of promise. They are a great team of people and it is my pleasure to join them.

We will be building a solution in PHP, which is new for me, but has already proved itself in many other solutions. So, expect my blogging topics to change to PHP shortly, though I will probably still keep complaining about my Mac for a while.

If you would like to help mold the company you can start by completing this ten minute survey.



Site Help Advancement

I am browsing the site of a hosting service checking on prices and a little window pops up with a simple question, "Do you want help with this site?".

This is not an ad but a means to draw their customers into IM conversations. I have to say it worked very well. A quick chat and I had all the info I needed. Saved lots of reading spec sheets etc.

At the end it asked me if I wanted to send the chat session to an email address. A useful and unobtrusive way to collect email addresses. Nice.

2/11/2008

DRY as in Dry Bugs

We talk of DRY code as in Don't Repeat Yourself. Instead, we should talk in terms of DRY bugs.

For every piece of code you copy you are also copying a number of bugs. Depending on your propensity for adding bugs to you code you may be copying lots of bugs or just the occasional one. In either case, bugs are really expensive, so stop it.

You may want to say, "It's faster to copy working code than to refactor it into a common module". We have heard it all before and you are deluded. Besides, DRY bugs are easier to pin and mount

Do not duplicate your bugs.


2/06/2008

Life's Filaments

The filaments
of many lives
pass through me.

Filament collisions
held lovingly
in my palm.

For filaments sake,
backup your life.


2/04/2008

Fear

Fear is an emotion,
not necessarily a disability.


2/01/2008

A Fathers Pride

As I pondered a question and worried about an outcome my son gently said, "the greatest rewards go to those who risk, you have nothing to loose and a family to support you, so what are you whining about".

It is my greatest honor to watch my kids grow up into fabulous adults.

1/28/2008

VmWare Fusion PinPoint Compatibility

I last blocked about a comparison between VmWare Fusion and Parallels but concluded that the click problem prevented me from using VmWare. Well I have found a solution to that problem.

Specifically, I am using a product called PinPoint to improve the visibility of my cursor and this appears to be causing focus problems in the executing virtual machine.

To show you I have prepared my first mac based screencast using a tool called ScreenFlick. This tool does most of the things that I wanted, with screen size and visibility control, audio recording and mouse and keystroke highlighing. It did hang on me a few times which seemed to be related to large recording sizes.





So, with the click problem removed I am going to start working with VmWare Fusion again to see if it beats Parallels.

1/21/2008

Mac Windows Virtualization - Parallels vs VmWare

Just another of the many review out there but this explain why I can not use the Vmware Fusion product.

Both have the same $79 price so which should you buy. I bought Parallels with the machine because of the hype and a couple of recommendations from friends but with all the problems I have been having I though it worth a 30 trial of VmWare Fusion.

This is my experience.

Parallels

Installation was a problem because the CD contained a version that didn't work on Leopard. A download from the site fixed the problem.

Repeated crashes for various reasons documented in previous posts.

Ideally, I could work in the windows environment in full screen mode with the same keystrokes that I am used to in Windows. There is no way to do this in Parallels.

When in full screen mode, Parallels hides its menu bar and allows you to get it back by pressing the "ctrl-option" keys. This kind of "mode" switching makes it less likely to accidentally bring up the mac menu.

I wanted to play Virtual Skipper 5, a nice, graphic intensive game that allows me to continue sailing during he winter. The trial version of this game uses DirectX so initially it failed because my Windows Vista installation was not up to date. Once DirectX was upgraded it appeared to run correctly though in a small window that I couldn't full screen but having never played this game on a native windows machine I can't say if this is abnormal or not.

Vmware Fusion

Installation was perfect but I downloaded the trial copy from the web so we can't compare this with the difficult Parallels installation.

VmWare has not crashed on me but I haven't used it so much so this may be an unfair comparison.

VmWare has an option that allows me to ignore mac keystrokes. While very promising this didn't seem to work very well. Infact, when in full screen Vista, I tried ctrl-left to switch spaces and was moved to a mac space. However, the mac keystrokes were still disabled so I was not able to do anything. Fortunately, the mouse allowed me to select the other space and turn off this feature.

When in full screen mode, VmWare Fusion hides its menu bar and allows you to get it back by moving the mouse to the top of the screen. This is a little annoying when you are working in windows and accidentally get the mac menu. I prefer the Parallels solution.

The Virtual Skipper 5 test was not as successful despite the fact that VmWare Fusion boasts about support for DirectX. I still had to install the DirectX upgrade to Vista as expected but when the game started it complained that it would not run inside a virtual machine. Now presumably this is the games fault for doing this check and only doing it successfully in VmWare but I have to conclude that, for this game, Parallels was the better virtual machine.

There is a serious two click problem in VmWare Fusion. This is not a double click. It is hard to pin down the types of objects that require this. So, for example, browser links only require one click however icons on the desktop and menu options seem to require two. It appears as though the first click focuses on the object then the second actually selects it. This makes it impossible to use. I couldn't find any reference to the problem anywhere.

Conclusion

Compared to the two click problem with VmWare all the other issues are moot. This problem makes VmWare Fusion impossible to use.

So, despite the nasty crashes, Parallels remains the vm of choice for the mac.

New Machine - Adium Keystroke Options

We have already established that the Adium end key is a problem.

Well, yesterday I find that the Adium developers have implemented a solution but as an option that allows me to select the key to use to "Switch tabs" which, unfortunately defaults to the commonly used command-right arrow keystroke. I switched it to the shift-command-right arrow making Adium behavor like a well behaved mac application.

New Machine - User Account Menu Item

As you login to your Mac the menu bar contains a nice little silhouette of a human bust to represent my user information. Shortly, after that, this is replaced by my name. Do you think that telling a user their name might be a tad overly informative?

My primary complaint isn't that I am insulted by the idea that I need to be reminded but that it uses valuable space in an icon cluttered zone of the screen.

Is there a way to switch this menu option back to the simple silhouetted bust?

1/18/2008

Scrum Certified - Ready to rock

A group of us just complete the two day Scrum Certification class so I can add CSM after my name now. It actually doesn't feel any different from before the class and customers would refuse to use Agile to manage their projects.

It was a good class, taught by Peter Borsella, it covered all the usual parts of Scrum in good detail. There was enough time to talk about the Agile projects we have worked over the years and get feedback.

Refresher or not it is worth while remembering why we keep fighting this Agile battle. Renews your passion for doing it right.




Red splotches to protect the innocent and my liability. Feel free to contact me with authorization to show your picture and I will un-red-spotch you.