You are currently browsing the archives for the Language category


Tornado warnings and watches – still confusing…

We’re having tornadoes in the area tonight.  Well, I think so, anyway.  I read about ‘warnings’ and ‘watches’ and for the life of me can not quite remember which is which.  I have not been able to remember this distinction *EVER*.  I remember in first grade having trouble keeping them straight, it’s not gotten better with age.  Given that they both start with “W” could we not come up with something better?

“Tornado warning” means basically that a tornado (or something like a tornado) has been visually seen.  But “watch” has more of a visual connotation to it than ‘warning’.  Could we not have used (or switch to using) “warning” to mean – “hey, be careful cause we have the conditions for a tornado”?  Then – get this – we could use the term “sighting” to mean that a tornado (or something like a tornado had, in fact, been sighted.

This idea is probably too radical for the US, but I’d like to see this change happen some anyhow.  We went from the “4 food groups” to a “food pyramid” over a generation, probably did away with the letter people, and have undergone far more strenuous cultural changes than what I’m calling for, yet have somehow managed to survive.  Call your representative now and get this movement moving!


I'm currently working on a book for web freelancers, covering everything you need to know to get started or just get better. Want to stay updated? Sign up for my mailing list to get updates when the book is ready to be released!

Web Developer Freelancing Handbook

Computer language use and religious affiliation update

In the religion and language survey,first written about here, we’ve already got 2800 entries in less than 24 hours.  I’d like to leave this open for at least another week, but am also interested in working with some of you out there to parse the data and come up with some reports.  If you’ve got a few hours, are good with a spreadsheet or can generate reports from a basic tab-separated file, gimme a shout and I’ll get you access to the data.


I'm currently working on a book for web freelancers, covering everything you need to know to get started or just get better. Want to stay updated? Sign up for my mailing list to get updates when the book is ready to be released!

Web Developer Freelancing Handbook

Computer language use and religious affiliation

I’ve put up a small survey which I’m hoping will help me get an idea of whether there’s any connection between computer language choice and religious identification.  Do Catholics gravitate towards Java?  Are Python users more likely to be Baptist?  It’s basically a ‘fun’ thing – I don’t claim it’ll be scientific, but I’m still interested in the results.  Please take a few moments and participate!


I'm currently working on a book for web freelancers, covering everything you need to know to get started or just get better. Want to stay updated? Sign up for my mailing list to get updates when the book is ready to be released!

Web Developer Freelancing Handbook

Grails for PHP developers series

I’m working on a series of articles aimed at explaining the Grails Java framework to people with a non-Java background. The comparisons I plan to make will be mostly to PHP, cause that’s what I’m most familiar with, though there may be some other comparisons from time to time. This is a work in progress, but I’d be very interested in feedback from anyone out there interested in this aea – Grails, Groovy, PHP, why another language/platform/framework, etc.

First installment is here, and the second is here. These aren’t part of the regular ‘blog’ entries, so won’t show up in the blog feed directly, but I’ll occasionally write an update on the series’ status as a blog post to get the word out.

UPDATE: Third installment put up last night.

UPDATE: Fourth installment put up 1/29/2008


I'm currently working on a book for web freelancers, covering everything you need to know to get started or just get better. Want to stay updated? Sign up for my mailing list to get updates when the book is ready to be released!

Web Developer Freelancing Handbook

Eclipse PHP Developer Tools

I’ve been using different editors for PHP work over the years.  From Notepad, UltraEdit and PFE on Windows to Scite, QuantaPlus, Kate and others on Linux, most have never been more than glorified text editors.  Having earlier come from VB environments years before, it was a bit sparse to say the least.  The early Zend Studios were promising, but extremely slow for my tastes.  I’ve tried Komodo and Nusphere as well, but all were klunky, slow, or both.  Zend Studio has gotten better over the years, and we recently made the decision to purchase some Zend Studio licenses at work to get us all on the same page (I think there’s 4 of us that do some degree of PHP development, maybe 5 including people who only occasionally touch it).

I’d looked at Aptana earlier having found out about it last year and mentioned it on my webdevradio podcast.  It seemed promising as a javascript editor – hadn’t seen anything quite like it before.  I’d also heard about a PHP plugin for Eclipse (Aptana is Eclipse-based as well).  I’d tried the PHP plugin last year and it was extremely incomplete, in my view.  Well, on the Aptana boards this morning there were yet more requests for PHP support in Aptana (something that’s been going on since it was released!).  I read a post mentioning the PDT – PHP Developer Tool project for Eclipse.  Zend is contributing (or sponsoring?  I dunno) to that project, so I went to try it again.

It’s come quite a long way, and is usable.  I’m starting a new small demo project today as a testbed, and we’ll see how it goes.  The introspection for code complete is decently fast, the editor as a whole is also moderately quick, and I’m actually impressed.  Having seen so many mediocre attempts in the open source world at this task, I’m really impressed.  Time will tell if it takes over from Zend Studio for day to day usage.  Actually, if I recall correctly, I could swear that I’d read somewhere that Zend will be migrating their work over to the PDT project and abandoning their Zend Studio in the next year or so.  Darned if I can find any reports on that – it might have just been a suggestion from someone on a board someplace.  If they can add some more features to the Eclipse plugins, they’d have serious competition on their hands.  Making this available for netbeans would be even more attractive, at least to me, but it seems that at least for the short term Eclipse has more mindshare for plugin development.

If you’re doing PHP and looking for a cross-platform free tool for development, give the PDT project a try.


I'm currently working on a book for web freelancers, covering everything you need to know to get started or just get better. Want to stay updated? Sign up for my mailing list to get updates when the book is ready to be released!

Web Developer Freelancing Handbook

Why not PHP5?

I saw these two blog posts around the web recently and thought I’d add my two cents.  The core question is “why haven’t you upgraded to php5?”.  I worked at a company that was using PHP5, and also have PHP4 running on my ‘personal’ server which hosts some side projects and a few former clients.  The PHP4 server may likely stay PHP4 simply because it’s running an older version of Plesk, which only supports PHP4.  Upgrading just the PHP on that machine would likely break the stability of the server management, which is otherwise not bad.  There’s precious little software that requires PHP5 that I would want or need to run.  It’s a pretty simple decision.

A company I worked at used PHP5, and it ran without problem.  I did some coding in it, and liked it.  There was nothing particularly compelling about it though, that made me think “I *have* to have this!”.  Indeed, many of the small inconsistencies between early versions of PHP5 made me think twice about its stability.  Early PHP4 had a lot of small bugs/fixes that happened early in its release cycle, but I think more people were starting out with it, rather than upgrading from PHP3, so the incompatibilities to be concerned with were limited to PHP4 for the most part.  Someone upgrading has to worry about the major version incompatibilities *and* be able to keep up with the minor ones as well.

The ‘date’ incident in the PHP5.1 series bugged me quite a bit and really made the question the future stability of the project, which also slowed my reasons for adoption.  I *am* looking at a total server upgrade, which would likely bring the server up to 5.1.2 or 5.2.1 in the next few months, but as there are some existing and functioning sites on the server, it’ll be a chore to test them all.  If I can get things upgraded to plesk8 (or 8.5) it apparently will do some gyrations to allow for PHP4 or PHP5 to be installed on a host, which will simplify things.

That one small issue above – being able to run both simulataneously – is the *primary* reason why PHP5′s adoption has been as slow as it has.  I’m not sure many people chastising people for not upgrading were really on the PHP scene between PHP3 and PHP4.  I was, and the ability to run both on the same server was the primary reason PHP4 was adopted so quickly.  There was no downside to installing PHP4 because server admins could give people time to test their new code without having to stop running their old code.  This article was the first I found just now to demonstrate how. PHP5 does not allow you to run PHP4 in the same Apache space with both versions running as Apache modules, which is how many people like to run it.  Yes, you can use mod_proxy and pass through requests to separate servers running different versions, or run one as a CGI module, but both are less than stellar hacks, and are a step backwards from the PHP3->PHP4 days.  Why this was done, I don’t know.  I imagine it was an attempt to try to force people’s hand to upgrade to PHP5 quickly.  If so, it’s failed miserably.  Perhaps if the XML support hadn’t completely changed, that might have made it easier for people to upgrade.  Additionally, offering a compatibility layer so old XML functions would map to new XML functions with an INI switch or an extra set of alias functions in the new XML function set library would have made upgrading easier for people that had invested heavily in apps that made practical use of XML in PHP4.

I could go on a bit more, but I think you get my point.  PHP5 offers some reasons to upgrade, but the server admin hassle and incompatibilities are enough to make most people think twice.  If I was recommending someone starting off today building apps for internal or hosted use, I’d certainly recommend PHP5.  But many people aren’t starting fresh – they’ve got existing code to deal with, and the decision to upgrade is not as cut and dried as many PHP5 cheerleaders make it out to be.


I'm currently working on a book for web freelancers, covering everything you need to know to get started or just get better. Want to stay updated? Sign up for my mailing list to get updates when the book is ready to be released!

Web Developer Freelancing Handbook

codemash – caffienated php – php java bridge

I’m attending the caffienated php session – this will demonstrate the java/php bridge. This is put on by Kevin Schroeder from Zend.

Kevin started off by giving a rundown of Zend – products, services, etc. No mention of ZendFramework project (yet?).

Why use PHP and Java together? PHP is easier for most tasks, and Java can fill the missing gaps. PHP/Java bridge lets you extend PHP without building a C-based module.

Three options – use sourceforge code, compile module in to PHP.

Native Java interface in PHP4, but it spawned new JVM on each request.

Third option – use Zend platform Java bridge. It’s not just a container for Java bridge – GUI config, job queues, BIRT reporting, SNMP integration, session clustering, event monitoring, and more. These are all in Zend Platform 3 – in beta and downloadable now.

Zend platform offers file download acceleration – passes off certain files to another web serving process (not apache) – frees up your Apache process for more CPU intensive work.

Something I wonder – should ask too – does Zend platform allow for web services integration? Given the custom event triggers and whatnot it offers, offering web service integration hooks would be useful, imo.

< ?

header("Content-type: text/plain");

$system = new Java("java.lang.system");

var_dump($system);

?>

$system->getProperties() would return an Object, but var_dump prints an associative array.

String = string but StringBuffer and Builder remain Java objects

Integer = int

Long = floar

Java arrays are converted to PHP arrays

All other objects retain status as Java obejcts and can be called as such in PHP code

$java->getEntry(“foo”);

Examples of resource pooling using LDAP, resourced persistence using IMAP, async execution using multi-threaded queue.

A ‘java bridge’ for pooling resources is nice and all, but it raises the question in my mind of why the ‘persistent connection’ pattern wasn’t implemented for PHP’s LDAP and IMAP modules.  It seems the pconnect approach is not welcomed these days (I think it’s removed from PHP5′s mysql code, or perhaps that’s mysqli?), but these modules have been around for years.  Why didn’t anyone create IMAP_pconnect or LDAP_pconnect functions years ago?

The examples he’s giving for LDAP and IMAP both show that PHP is a bit faster, but the respective servers are hit very hard, whereas with the pooling approach there’s no utilization on the servers.  This indicates that the hit is biggest during the connection handshake and any authentication.

Kevin indicated that because IMAP is generally specific to each user for authentication (as opposed to db or ldap connections) it wouldn’t make sense to pconnect those – just too wasteful.


I'm currently working on a book for web freelancers, covering everything you need to know to get started or just get better. Want to stay updated? Sign up for my mailing list to get updates when the book is ready to be released!

Web Developer Freelancing Handbook

Java 6 speed

Java 6 was released last week (or was it two weeks ago) to, in my view, surprisingly little fanfare. It may be the circles I travel in now, but it just wasn’t seen as that big of a deal with most people I know, nor with many tech sites I visit. From what I can tell, the big news tends to be the performance increases. There seem to be some other interesting bits – a committee spec from 3 years ago has made its way in to this release which will make it easier for ‘scripting’ languages (dynamic/loosely-typed) such as PHP and Python to more easily integrate with Java (or at least the JVM itself). It’ll be neat to see how that plays out, but I think it’ll be a while (certainly months) before we see anything usable for production systems in the mainstream consciousness (and that would be aggressive!).

Perhaps the most interesting thing to me was/is the performance angle. It’s an easy thing to point to, and is easy for people to digest, and makes a good reason to upgrade. Sun is promoting this angle on their site here, with quotes like:

“When the early builds of Java SE 6 came out, we jumped in to see if we could get any performance improvements, which are crucial to our business. To make a long story short, the difference between Java SE 5 and Java SE 6 was startling. In terms of crunching through air fares, we are talking an increase in speed of 25% to 30%.”

I know I’m being overly cynical here, and all major vendors do this, but doesn’t this mean that earlier Java versions were that much slower? I realize systems continue to get optimized, new techniques are employed, etc., but my goodness – 30%?!? For years – even *recently* – when I’d say Java is slow, hardcore Java people would point out the latest hotspot JIT compiling work, improvements in Java5, etc. Java 6 just seems to confirm what I’ve felt and known for years – Java, on the whole, is slow. If they’ve found ways to wring out another 30% performance (and I bet some apps will see even higher improvements), how much more could have been done? It’s all a balancing act, and some improvements get shoved down in the name of backwards compatibility and stability and all that, certainly I know this. I’m still just a bit flabbergasted, all in all, that there was this much room to be had.

I do think the open sourcing (next year, finally!) will lead to some long term improvements in the ability for people to improve Java performance, optimizing it for their particular needs to an even greater degree than is done now.

On a related note, this link was sent to me. It’s great to see a major vendor have open forums where people can report bugs and have some transparency on the process. But the last poster’s comments do seem to hit home – why should people have to ‘vote’ on something as basic as 64-bit support in 2006?

update

I spoke to a Sun engineer at the local JUG last night, and he indicated that the Java 6 SE provides better speed not from compiling (as in javac) but from better run time optimizations – mostly compiling things to machine code at run time. From what I gathered, this had been done before, but the Java 6 improvements are largely related to a much more granular method for selecting which sections of code to convert to machine code. Because it can be more selective, there’s less to compile, meaning less overhead of ‘compiling during runtime’, meaning faster performance.  I am posting this here to take a bit of the cynical edge off the entire post.  Certainly there will be more improvement in the future – most large scale projects like this will have improvements over time.  I’m hoping that the open sourcing (done by next summer) provides more people the opportunity to contribute more optimizations and speed improvements.


I'm currently working on a book for web freelancers, covering everything you need to know to get started or just get better. Want to stay updated? Sign up for my mailing list to get updates when the book is ready to be released!

Web Developer Freelancing Handbook

PHP Appalachia mid day

I’m here at PHP Appalachia and have learned some interesting things.
SimpleXML has recently added some support for adding children and attribtues directly to a document.  There may be little or no need to turn a document into a DOM object for many people’s purposes.

We talked a bit about RSS, and I brought up the awesome simplepie.org project (which I’ll talk a bit more about on my podcast later.

Chris today brought up the fact that ‘ereg’ functions will be removed from PHP6, forcing everyone to use preg_* functions.  I’m definitely not a fan of that move, as it’ll cause even more upgrade problems.  In some sense, because it’ll make previous code so non-compatible, it’ll force rewrites or wholesale changes to newer packages.  At that point, like the change from VB to VB.NET, users/companies may instead opt for Ruby, Java, .NET or another platform entirely.


I'm currently working on a book for web freelancers, covering everything you need to know to get started or just get better. Want to stay updated? Sign up for my mailing list to get updates when the book is ready to be released!

Web Developer Freelancing Handbook

Java to ruby

Adam Williams, creator of the sails framework, posted an interesting piece on choice of language.  The basic premise is something I think most developers probably already know – choice of language isn’t really that important – but it was good to see it being said yet again.  That it was taken from a Ruby proponent, about a move to Ruby, says a lot about that person’s level-headedness (Bruce Tate, I believe, is the author which Adam was talking about).

Most projects don’t fail for technical reasons. If you can’t solve your
communication problems, if you can’t control scope creep, or if you
can’t tell what the customer actually wants, the choice of programming
language is not going to matter to you.
 

This is the same sort of thing Hal Helms was saying years ago, and likely many people before him (I just probably wasn’t paying attention way back when!).  The problems I’ve had on projects over the years almost always involved client/developer communication issues, not a developer being unable to figure out how to connect to a database or write to a file.  I HAVE had a few issues working with other peoples’ code which truly wrestled with fundamental programming concepts – not understanding recursion, not understanding references, etc.  Those projects have been scary, but thankfully few and far between.


I'm currently working on a book for web freelancers, covering everything you need to know to get started or just get better. Want to stay updated? Sign up for my mailing list to get updates when the book is ready to be released!

Web Developer Freelancing Handbook



0.27720308303833