I am sure that I am not the first to notice but Eclipse has gone through some changes that are causing a significant slow down in my productivity.
This has been the premiere IDE for many years, offering best of breed user interface design concepts to optimize the life of the Java developer.
I now find it increasingly hard to use for one simple fact. The changes have made it really hard to run unit tests.
One of the magical features was that ctrl-F11 would run the last test I ran so I could continue coding, in any source file, and press this vital key combination to see if I had broken anything yet.
Now, this keystroke, and the action that it is associated with, have been changed in two ways.
Firstly, if you have to be in the test file to reliably run the last test. It is inconsistent in this regard. Most of the time it just asks "How would you like to run ''? On the server or blah blah blah".
Secondly, if it does remember the test I want to run, it now also remembers that last time I ran it in the debugger. So each subsequent run promptly stops on a breakpoint.
This is a flow problem and it is possible that non-test driven developers use the debugger a great deal. I understand, even sympathize, but couldn't Eclipse support both flows? Especially the original, and in my opinion, the far superior. Just run my tests, that's all I ask.
Now if I could just get NetBeans to stop deleting my "build" directory when it creates a project I could say goodbye to this annoying change.
10/20/2008
Eclipse, bad UI change
10/19/2008
GIT, yes, another source control solution
and you thought Subversion was the latest thing. Ha. How old and slow you are.
You see how cool I can sound when I have just learned something new?
I have GIT installed and working under OSX Leopard and it seems pretty cool so far, given that I haven't done anything worth while with it yet.
First, don't do what I did, which was to goto github, download gitx and expect it to work. Ha, that route is for losers.
Instead, goto the git site itself and get the zip.gz file and go from there. Wait, no, don't do that either, only losers waste time compile from source.
See, how many pit falls I am saving you. This is a great blog.
So, ignore the links you have seen so far and aim for the Download link. This will not down the file, do not worry about that.
Amongst the download formats there is an OS X entry to the Google code site. Be patient, you are on the right track.
There, at the top of the list, is the git-1.6.0.2-intel-leoard.dmg file. Yes, this is the real download that will work. The download for non-losers like you.
This will give you command line GIT which is probably all you need, if you are a loser. I was a loser for a short time when I finally realized what I was doing. Man oh man these things take time to work out.
I love NetBeans. I also love Eclipse but its Ruby support blows by comparison so I love NetBeans more. And NetBeans has a GIT plugin. This is for non-losers. It's called nbgit.
Now remember, losers will try to install nbgit in their NetBeans IDE, and we all know that would be a dumb move. Unless you really love searching through reams of dependency errors, and what the hell is the NetBeans Presentation crappy thing that I don't have anyway.
Go get NetBeans 6.1 and install that first. Then, as a non-loser, you will be selecting Tools-Plugins-Downloads and selecting the nbgit nbm file that you download earlier.
git clone git:/reality
update to life version niner dot niner
git diff
See all the good changes that you have made
git commit
And here, courtesy of the kind blogger Tim Dysinger, are some cool git settings that you might want to use.
Get started with this tutorial, short and to the point.
8/12/2008
8/08/2008
Picture Admiration
This is a video by someone I admire. I didn't have to watch much of it to recognize that this is a special person. A state thrust upon her by life, though she made the choice of what to do next.
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.
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
2/06/2008
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.