Distill: An opportunity to get out of your comfort zone

Speaking

As part of my work at Engine Yard I have been involved in helping shape and organize a new conference, Distill, which will be held on Treasure Island in San Francisco, CA on August 8-9th 2013.

The conference will bring together a bunch of folks from different technological backgrounds to share information, and cross-pollinate ideas. Just like Ruby on Rails kickstarted the PHP frameworks explosion, we (the PHP community) have an opportunity to give back not only to the Ruby/Rails community but to Javascript, Python, Java, and database communities, and who knows what else will make a showing.

Hopefully, we can all “get off the island” and allow us to create something awesome.

The Call For Proposals is currently open, and closes on April 9th, and I highly encourage everyone to submit.

Fixing ZDE 5.5 in Snow Leopard

Standard

If you are still using Zend Studio 5.5, and recently upgrade to Snow Leopard, you will have spotted pretty quickly there is a pretty severe display bug when selecting text.

The reason for this, is that Snow Leopard only ships with Java 1.6 and 1.3 (wtf?)

[sh]
$ ls -al
total 47
drwxr-xr-x 12 root wheel 408 Aug 30 22:08 .
drwxr-xr-x 11 root wheel 374 Aug 29 10:27 ..
lrwxr-xr-x 1 root wheel 5 Aug 29 10:26 1.3 → 1.3.1
drwxr-xr-x 3 root wheel 102 Jul 20 19:35 1.3.1
lrwxr-xr-x 1 root wheel 10 Aug 29 10:26 1.5 → CurrentJDK
lrwxr-xr-x 1 root wheel 10 Aug 29 10:26 1.5.0 → CurrentJDK
lrwxr-xr-x 1 root wheel 5 Aug 29 10:26 1.6 → 1.6.0
drwxr-xr-x 7 root wheel 238 Aug 29 10:26 1.6.0
drwxr-xr-x 8 root wheel 272 Aug 29 10:27 A
lrwxr-xr-x 1 root wheel 1 Aug 29 10:27 Current → A
lrwxr-xr-x 1 root wheel 3 Aug 29 10:26 CurrentJDK → 1.6
[/sh]

As you can see, except for the 1.3 JDK, everything else symlinks to 1.6.0. Now, ZDE will not run with 1.3, and is broken in 1.6, so how do you fix this?

The answer, can be found here: http://wiki.oneswarm.org/index.php/OS_X_10.6_Snow_Leopard

I am replicating it here, as it looks like it’ll be a temporary problem for them and is likely to disappear.

Update (9/13/2009): See this post for details on getting the Java 1.5 binaries from Apple themselves.

It essentially comes down to this: Grab the Java 1.5 JDK from Leopard (original) and then tell OSX to use the 32bit version by default.

This is all done through the Terminal.

So, first, grab the 1.5.0 leopard tarball and unpack (if the link below stops working, contact me for a mirror):

[plain]
cd /tmp/
wget http://www.cs.washington.edu/homes/isdal/snow_leopard_workaround/java.1.5.0-leopard.tar.gz
tar -xvzf java.1.5.0-leopard.tar.gz
[/plain]

Next, move the folder to the standard JVM location on OSX (this will require your user password):

[sh]
sudo mv 1.5.0 /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard
[/sh]

Then remove the current 1.5.0 symlink and point a new one to our new 1.5.0-leopard directory.

[sh]
cd /System/Library/Frameworks/JavaVM.framework/Versions/
sudo rm 1.5.0
sudo ln -s 1.5.0-leopard 1.5.0
[/sh]

Next (and this isn’t in the original document), set permissions:

[sh]
sudo chown -R root:wheel ./1.5.0-leopard
[/sh]

Finally, open up the Java Preferences app in /Applications/Utilities, and in the Java Applications section, drag the “J2S2 5.0 32bit” version to the top.

After doing all this, restart ZDE and the selection bug is gone!

– Davey

ZDE 5.5 On OSX

Standard

Even though I am in the process of trying to replace it, Zend Studio 5.5 is still my day-to-day IDE for development. However, on OSX Leopard, it has seemed for a while, like the app was decaying — growing progressively crashier the more I used it. Literally, to the point where I could use it.

I think, however, I have solved the issue.

Simply edit /Applications/Zend/ZendStudio-5.5.1/bin/runStudio_mac.sh and make the following change:

[sh]
java -Xms16m -Xmx256m -cp ZendIDE.jar:MRJToolkitStubs.zip:sftp.jar:axis.jar:commons-discovery-0.2.jar:commons-logging-1.0.4.jar:javaxzombie.jar:jaxrpc.jar:saaj.jar:wsdl4j-1.5.1.jar:jhall.jar:../docs/help.zip com.zend.ide.desktop.Main
[/sh]

becomes:

[sh]
/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/java -Xms16m -Xmx256m -cp ZendIDE.jar:MRJToolkitStubs.zip:sftp.jar:axis.jar:commons-discovery-0.2.jar:commons-logging-1.0.4.jar:javaxzombie.jar:jaxrpc.jar:saaj.jar:wsdl4j-1.5.1.jar:jhall.jar:../docs/help.zip com.zend.ide.desktop.Main
[/sh]

This just explicitly makes it use JVM 1.5, which is, after all, what it was built for.

Once I did this, it became snappy again, and seems to be far less crash-prone, hurrah!

– Davey

Making the case for PHP

Project

One of the biggest decisions you can make for any project is the environment it which the project will be written.

Most developers mistake the word environment for the word “technology” or “software”. For example, you develop in a “JSP environment”, or a “LAMP environment”. This is a crucial mistake that is made time and time again, and unfortunately, it hurts companies because the decision makers either make the same mistake, or they listen to those making the mistake.

I’ve said numerous times, that you can use any language to do anything. Yes, there are practical limits, using C to write a dynamic website isn’t a great idea, nor is using PHP for password cracking. Each language has it’s own strengths and weaknesses; good developers however, know what these are and work with their strengths and work around their weaknesses. This post isn’t going to focus much on languages; I figure everybody reading has already chosen PHP and knows why.

What I will say is this: Ruby, Python, PHP, Perl, Java and .NET all bring the same capabilities to the table (some things are easier in some, and some more difficult in others). You can create any solution you want in each of these languages, in an efficient, well thought out, well developed way. Yahoo! could be written in Python. How do we know this? because Google uses it. Microsoft uses .NET for it’s web presence, and while you might not like to use it, it still stands up to more stress than most of the websites on the internet.

With this in mind, I then would say that the language capabilities themselves, are the least important factor in choosing your environment.

This then brings me neatly to what else that environment encompasses. These, to me, fall into three categories. People, knowledge and penetration.

Access to People

To put it bluntly, if you can’t find the people to write your code, you’re screwed. While you may know what you’re doing, and you have enough people now: your team will need to grow. If you can’t find people around you to hire, then what?

There are estimates that for every 100 PHP developers, there are 42 Perl developers, there are 12 Python developers and 4 Ruby developers. (see: here)

Some will say that this is because there is a lot of bad PHP developers. I will agree to a point, but that point is that there are just so damn many, that there are still more great developers to pick from than with other languages.

Access to Knowledge

While this one is more subjective, I believe that the sheer number of PHP developers generate far more useful knowledge from which to learn, cherry pick ideas and utilize them. Add to that the extensive number of books, and our excellent php|architect magazine; as well as the training and teachings provided by MTA, Zend and ibuildings, we have more going for us than most every other language with, I think, the exception of Java in terms of professionally backed learning.

Market Penetration

Simply put, the availability of PHP as a platform is there from the cheapest virtualhost, to the most expensive dedicated systems. It has gained wide acceptance from smaller companies, because it is cheap and reliable, and from enterprise companies such as IBM, Oracle and even Microsoft because they see that the ability is there for PHP to operate in that space and a huge number of developers willing to make that happen.

Conclusion

No other language can claim this trifecta, sure, there are a lot of .NET and Java developers, but a lot that goes on happens behind closed doors in big enterprises, and the knowledge is not shared. And while this isn’t true of Python, or Ruby, they lack in numbers and knowledge comparatively. This is why I choose PHP.

– Davey

Detailed IDE Reviews: How do you want to do this?

Standard

So, dear readers, I’m doing the IDE reviews for all of you guys and there’s two ways I can proceed:

I can take each of the requirements and do a single post per requirement with a writeup about it in detail for each of the 4 IDEs — then I was thinking for each new IDE I try, I can hit those same points. Or I can write up specifically on a single editor at a time, covering all of the requirements and I will also then review anything else about the editor etc.

I’d like to do a single post on the cross-platform technologies in play (Java Vs XUL) and on the Eclipse and Netbeans platforms (outside of any PHP plugins), but these fall outside of the scope of the original intention of reviewing the IDEs.

There are several incarnations of Eclipse I would like to review: Zend Studio for Eclipse, Aptana and PHPEclipse, I think perhaps I need a comparison table for Eclipse solutions on their own 😉

Thoughts?

– Davey