MongoDB and ZendCon at New York PHP

24 October 2011 » MongoDB, New York PHP, PHP, Zend

This month we have a double feature at New York PHP.

PHP on IBM System i consultant Alan Seiden will give us an update on what transpired at last week’s ZendCon.

10gen MongoDB evangelist Steve Francia will provide an overview on using PHP with MongoDB.

RSVP now for the meeting at IBM in midtown Manhattan on Tuesday October 25th or watch online starting at 6:30pm ET.

BlackBerry app for Metro-North schedules

04 May 2011 » BlackBerry, Java, Travel

Well, it took just under two years and quite a bit of marketshare loss, but I found some time to release my long promised native BlackBerry application for Metro-North commuter train schedules.

You can download NYC North Trains for free, over-the-air. I’ve tested it on OS 5 and 6 devices such as the Curve, Style, Storm 2, Bold, Tour and Torch.

Like the simple Web interface I’ve provided for nearly five years, the native app offers an interface to the MTA schedule data optimized for mobile devices.

However, it also offers some features that make the experience quite a bit more convenient for BlackBerry users.

  • Simple schedule selection using BlackBerry dropdowns and date picker
  • The ability to save your preferred origin and destination (and toggle them depending on which way you’re going)
  • Ability to email the schedule results from the device
  • Ability to save a particular departure to your calendar to block your travel time

Of course, this application comes with the standard disclaimer.

Not affiliated with the MTA or the States of New York and Connecticut. This tool uses live information directly from mta.info, so schedules are always based on the latest available information. This tool retains no copies of schedule information from the MTA.

Enjoy and let me know what other enhancements you’d like to see.

Use the IBM Cloud to build your PHP apps

14 March 2011 » Cloud, DB2, New York PHP, PHP, Zend, developerWorks

IBM developerWorks just published an article I wrote about using the Development and Test Cloud to create PHP applications.

The tutorial covers some scenarios that make the cloud compelling for PHP developers and then takes the reader through the installation of Zend Server with DB2 on the IBM Cloud.

If the content looks familiar, you may have seen an earlier version in a print copy I handed out at New York PHP (PDF) late last year.

Speaking of the cloud and NYPHP, don’t forget to join us next week to look at an alternative way to use the cloud to develop PHP applications using Amazon and RightScale.

Move from MySQL to DB2 via the Cloud

24 November 2010 » Cloud, DB2, Linux, PHP, Zend, developerWorks

IBM developerWorks has just published the first article in a series that Mark Nusekabel, Yan Li Mu and I wrote about our experience migrating a large PHP and MySQL application to DB2.

In the four part series we look at preparation, switching databases, porting code, and finally deploying the application. This first installment covers the steps to plan and resources to consult when starting a migration project.

Along with the MySQL to DB2 migration Redbook, a key technology supplementing each step in the process is the IBM Smart Business Development and Test Cloud.

If you already have access to the Development and Test pilot, the PHP developer’s guide (PDF) can give you some tips for configuring Zend Server along with DB2 using virtual machines in that cloud.

The article series and the developer’s guide may also be useful to those who have a contract for the GA version of Development and Test.

Another option to evaluate DB2 for a migration is to use the Amazon EC2 AMIs pre-configured with IBM software individually.

Or, if you’re interested in managing several instances or more complex configurations, RightScale and IBM have collaborated (PDF) to bridge the Amazon and IBM clouds.

So, if you’re considering a new relational backend for your application, the developerWorks migration series, the PHP developer’s guide for the IBM cloud, and the images within the Amazon and IBM clouds will give you a new set of tools to make evaluating the move and executing the switchover much easier.

Everything old is new again

05 August 2010 » Opinion, Thoughts, Writing

The New York Times has published two articles recently about the perception of a rise in plagiarism in the current school-age, digitally native generation:

In a highly technologized culture where information is cheap and easily copied, students can no longer be trusted or expected to make the effort to be creative, critical and original thinkers.

It’s far too easy nowadays to remix what’s already out there and in so doing, not to properly attribute a source.

Laziness and unoriginality
In the latter Times article, Sarah Wilensky – a college student herself – decries what she sees as both laziness and unoriginality in her peers. Institutions that don’t stridently enforce the rules only accelerate the disturbing trend.

“…Relaxing plagiarism standards “does not foster creativity, it fosters laziness… You’re not coming up with new ideas if you’re grabbing and mixing and matching,” said Ms. Wilensky… in a column in her student newspaper headlined “Generation Plagiarism.”

“It may be increasingly accepted, but there are still plenty of creative people — authors and artists and scholars — who are doing original work… It’s kind of an insult that that ideal is gone, and now we’re left only to make collages of the work of previous generations.”

Combining old elements
But it’s very interesting to contrast this urgent, modern lament against some thoughts from a 1965 book on advertising, “A Technique for Producing Ideas” by James Webb Young, in a chapter titled “Combining Old Elements”:

With regard to the general principles which underlie the production of ideas, it seems to me that there are two which are important.

The first of these has already been touched upon in the quotation from Pareto: namely, that an idea is nothing more or less than a new combination of old elements.

This is, perhaps, the most important fact in connection with the production of ideas…

The second important principle involved is that the capacity to bring old elements into new combinations depends largely on the ability to see relationships.

Here, I suspect, is where minds differ to the greatest degree when it comes to the production of ideas. To some minds each fact is a separate bit of knowledge. to others it is a link in a chain of knowledge. It has relationships and similarities. It is not so much a fact as it is an illustration of a general law applying to a whole series of facts…

The point is, of course, that when relationships… are seen they lead to the extraction of a general principle. This general principle, when grasped, suggests the key to a new application, a new combinations, and the result is an idea.

Consequently the habit of mind which leads to a search for relationships between facts becomes of the highest importance in the production of ideas.

Prior art is everywhere
Young argues that there’s nothing fundamentally wrong with leveraging work done by others, in fact it’s the only sensible way to make progress in a society (and run a successful ad campaign). He doesn’t ever consider attribution of these newly forged ideas in his essay.

Moving from abstract ideas to a concrete example, consider a beautiful and unique building near you. It’s largely created from well accepted architectural patterns, common construction tools, and zoning standards. You don’t see attributions on these edifices. They’re not in the blueprints or on the cranes either.

Maybe educating students and aspiring authors to properly credit their sources is the wrong approach altogether. In many ways, it’s a distraction from original thought and pure innovation.

A proposal for a read-mostly society
I believe it should no longer be the burden of the student or writer or speaker to quote his source… it should be assumed, by default, he is building on the work of others and attempting to convey a new idea built on those foundations.

Instead, it should now be up to the reader to accept that the work is derivative and take on the responsibility to vet the work.

Current plagiarism software should instead help suggest attributions… it does, in fact, rely on the same technology to check content against an existing pool of sources. With networked e-book readers and smartphones paired to efficient search algorithms, this should become ever easier.

How can you tell if a piece of work contains original research, legitimate sources or draws reasonable conclusions? Use the reader technology, find the sources and judge for yourself.

Beyond lifting the burden on authors to free them to focus on their original idea, this shift would empower readers to engage their critical thinking facilities through constant and simple source checking. This approach could also neutralize writers with an agenda who may decide to remix ideas selectively to skew a point.

In a technological society formed mostly of passive content consumers and relatively few active content producers this can only be a good thing.

Footnote
Oh, and as far as the unoriginal title to this blog post. Who should I attribute it to, Duke University or the Barenaked Ladies?

I’ll let you and Google decide.

PHP 5.3 at New York PHP this Tuesday

25 July 2010 » New York PHP, PHP

This month Hans Zaunere and Nate Abele will give us a look at the new features in PHP 5.3 and how they’re used in production today.

Specifically, these NYPHP regulars will cover three new major language features: namespaces, late static binding, and closures.

RSVP now for the meeting at IBM in midtown Manhattan on Tuesday July 27th.

Facebook and HipHop at New York PHP

27 April 2010 » New York PHP, PHP, Web development

Tonight we’re hosting Scott MacVicar from Facebook as he presents their highly optimized version of PHP called HipHop.

HipHop translates and compiles regular PHP source into a C++ binary that reduces CPU and memory usage and thus helps Facebook serve twice the content with a two-thirds the resources of a stock Apache and PHP system.

Look for the slides in our New York PHP user group archives shortly.

Follow development of the open source HipHop project at github and keep up with Scott via his blog.

Learning to write Java apps for the BlackBerry

22 April 2010 » BlackBerry, Java, Potpourri

Early in 2009 I decided to start writing Java applications for BlackBerry devices.

I’ll tell you why I chose this particular smartphone platform and how three books that I later received as review copies from Apress can help you get started too.

I’ll also share some thoughts on a gap I see in the BlackBerry developer’s bookshelf.

BlackBerry leads US smartphone market share
With the Apple iPhone garnering all the the mobile application exposure, it’s easy to see why RIM’s BlackBerry devices get less developer attention these days.

However, BlackBerry devices still hold a larger share of the smartphone market than either the iPhone or Android devices.

According to comScore, RIM comprises about 40% of devices sold, with Apple at 25% and Google at around 10%. The iPod and iPad aren’t included in this category, of course.

Other reasons I chose to develop for the BlackBerry platform
Besides the sizable marketshare, there are three major reasons that I’ve been learning to build BlackBerry apps over the past year or so.

  • My wife and I have owned several personal BlackBerry devices over the years and continue to use them daily.
  • Java development is a major part of my day job and it’s nice to reuse those skills on a new platform.
  • I work for a company that uses the BlackBerry Enterprise Server to manage its mobile workforce and therefore I already have a sizable audience of users to target for new projects beyond standard Web applications.

Where to start?
When I started learning about the BlackBerry platform there weren’t that many recent books on the market, which surprised me.

Instead, I needed to learn what I could through trial and error and the help of the large, but somewhat disjointed, collection of official documentation from RIM on the BlackBerry Developer Zone.

While there is a lot of material there, it’s hard to understand what’s most relevant and up-to-date, and what sort of roadmap the beginner should follow to learn the platform given those resources.

Getting started gets much easier
Fortunately, the BlackBerry book landscape has improved in the past few months, but the number of new releases still pales in comparison with the glut of iPhone development titles on the market.

I’ve had a chance to work through a few of these new books, two of which Apress provided me for free as review copies, and another that I have access to via Books24×7 thanks to my place of employment.

I suppose it’s only slightly ironic that as I read the latter book online, I wished I had an iPad to curl up with rather than a run-of-the-mill laptop or smartphone. :)

Apress book overview
By all indications, Apress has emerged as the leading publisher of BlackBerry books in late 2009 going into 2010. In particular, the first title below is one that would have saved me a lot of time when I got started early in 2009.

In any case, I can recommend any of these books, but obviously they all have their own target audience and don’t necessarily need to be read in sequence.

Also, keep in mind that these books focus on the development of native Java applications rather than tailoring Web sites to the BlackBerry browser.

  • Beginning BlackBerry Development by Anthony Rizk.
    This book provides an excellent introduction to the key topics that most interest a Java developer new to the platform.

    It covers the basics of setting up an IDE, putting together a user interface, using local storage, making network connections, using GPS, and distributing your application. All the steps are approached in an easy to follow tutorial format.

    The fact that Anthony Rizk was a founder of Rove Mobile – which produces the admin tools I depend on on my BlackBerry – lends this book extra credibility.

  • Advanced BlackBerry Development by Chris King.
    This book covers some of the same ground as the title above but takes a deep dive into audio and video development, text and email messaging, encryption and access control, and integration with the BlackBerry operating system and its built in applications such as the Address Book, Calendar, and Browser.

    It also provides valuable lessons on packaging your application for many different BlackBerry models and carriers and automating the build, versioning and deployment processes.

  • Learn BlackBerry Games Development by Carol Hamer and Andrew Davison.
    While this book’s subject matter has less in common with the type of business applications I write, it was an interesting read.

    Some of the compelling chapters include information on using Antenna for builds, using OpenGL ES and JSR 239 for 3D graphics, and how to license, release and commercialize your application.

    There’s even a thoroughly geeky chapter on using a BlackBerry connected to a PC via BlueTooth to drive a toy car attached to the computer by USB.

What’s also nice about these books – and what sets them apart from the official RIM documentation – is that they are pretty straightforward about the limitations of the platform and can be quite frank with their assessments of certain capabilities.

What I’d like to see in upcoming books
I set a goal for myself to deepen my BlackBerry skills this year. One of the best ways that I’ve found to thoroughly understand a platform – even one that you’ve been using for years – is to attempt certification or at least know the study materials inside-and-out.

RIM has recently introduced a certification program in order to achieve the BlackBerry Certified Application Developer credential via Java or Web development tracks.

Given how new the exams are, there aren’t yet any guides on the market to help the candidate pass both exams needed for certification.

Addison Wesley’s BlackBerry Development Fundamentals by John M. Wargo claims to be a good guide for the prerequisite exam (BCP-810), but does not cover the second exam on either Java (BCP-811) or Web development (BCX-812, understandably, which is still in beta).

Given that RIM’s study guides are so sparse, I see a great opportunity for any publisher to hit the market with a certification guide on these two exams in 2010.

Final thoughts
If you’re looking to get into Java development for BlackBerry smartphones, I recommend you at least have a look at Beginning BlackBerry Development.

Of course, supplement your learning by staying on top of news from the BlackBerry Developer’s Blog and of course the BlackBerry Developer Zone.

If you find the platform interesting, have a look at either Advanced BlackBerry Development or Learn BlackBerry Games Development.

Finally, I recommend you keep an eye out for news from the WES conference next week. I hope RIM gives developers even more compelling reasons to look at the BlackBerry platform.

Next page »