P@ Log

Patrick Chanezon about Platforms and Software Development

 

Scrub (Ajax), Wash (SOAP) and REST: use Google Checkout and AdWords APIs with PHP for fun and profit

November 1st, 2006 · 1 Comment

Here are the slides from this session that I presented at the Zend conference yesterday with Jason Chen. I presented the work of my apprentice Thomas Steiner, ie a business mashup of the Google AdWords and Checkout APIs.

The mashup I presented yesterday still needs to be cleaned up a bit before we post it for public consumption.

A few interesting links related to this presentation:

  • APIlity PHP client library for the AdWords API
  • APIlitax Ajax UI to manage your Adwords account

→ 1 Comment

“Write Once, Run Anywhere”: the devil is in the details

October 9th, 2006 · 1 Comment

Logging this weird platform specific inconsistency in java jar tool as an example of why the java mantra “Write Once, Run Anywhere” is difficult to achieve.

Recently I received a code drop from a third party, a java application that they developed on Linux. When I built it I received an IO Exception in jar. Tracing it I realized that the culprit was a jar xf command that failed to unjar one file, LICENSE.

Building assembly …
java.io.FileNotFoundException: LICENSE (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:179)
at java.io.FileOutputStream.(FileOutputStream.java:131)
at sun.tools.jar.Main.extractFile(Main.java:711)
at sun.tools.jar.Main.extract(Main.java:677)
at sun.tools.jar.Main.run(Main.java :189)
at sun.tools.jar.Main.main(Main.java:903)

Looking into it in more details, it was trying to jar xf a file called LICENSE in a directory where there was already a directory called license, small caps.

It seems that jar xf returns without errors on linux, and with an error on Mac OS X. I guess it must be the behavior of the underlying file system.

→ 1 Comment

Ruby SIG Meeting tonight at Google: “How to design a Domain Specific Language (DSL)” by David Pollak

October 5th, 2006 · No Comments

See the talk details on the SIG site:

How to design a Domain Specific Language (DSL)” by David Pollak

“Domain Specific Languages allow a domain expert to describe computational behavior using high level semantics and simple syntax. Designing a DSL requires learning the “words” used in the domain, choosing appropriate expressive tools, and “crawling into the head” of domain experts. David will describe a framework for developing DSLs such that they achieve the goals of being expressive, maintainable, and powerful.”

I look forward to hear him: DSLs are a hot topic on many platforms and Ruby seems to me like an ideal platform to build them.

If you’re in the Bay Area, this happens tonight at the Google campus.

See you all there.

→ No Comments

Trying a Google Checkout Button

October 2nd, 2006 · No Comments

Google Checkout has an API and I start playing with it. Today I registered for a merchant account, in 30 minute (15 of them eaten in creating store.chanezon.com in my dns, then creating a virtual host, then creating a directory for it), then asked for a custom Checkout button to sell dummy emails: you can buy an email from me for a buck. Considering the daily fight to try to answer everything, and all the unanswered emails that still lie in my Inbox maybe I should raise the price and run an auction;-)

When you are done filling the 4 part form to register a merchant account, you are led to a page where they generate a nice custom button: copy/paste, here you go!

Hmmm, not that good!When I paste that button to my new shiny ecommerce site, it works fine, however when pasted in WordPress it fails because the Rich Blog editor messes with the HTML and changes the HTML

→ No Comments

Mono wsdl generation tools on Mac OS X: not fully baked yet

September 19th, 2006 · No Comments

I’m doing an AdWords API lib in C# these days, and since I do most of my dev on Mac , I decided to give Mono a go. The install of Mono on Mac OS X is a snap: download, mount, install, done!

However the wsdl generation tool’s not there yet:

wsdl “https://adwords.google.com/api/adwords/v5/AccountService?wsdl”
Mono Web Services Description Language Utility
Error: Error getting response stream (Trust failure): TrustFailure

Then when I wget the wsdl and try generating locally, even worse:

wsdl AccountService.wsdl
Mono Web Services Description Language Utility
System.NullReferenceException: Object reference not set to an instance of an object
at System.Xml.Serialization.MapCodeGenerator.ExportMapCode (System.Xml.Serialization.XmlTypeMapping map, Boolean isTopLevel) [0x00000]
at System.Xml.Serialization.MapCodeGenerator.ExportTypeMapping (System.Xml.Serialization.XmlTypeMapping xmlTypeMapping, Boolean isTopLevel) [0x00000]
at System.Xml.Serialization.XmlCodeExporter.ExportTypeMapping (System.Xml.Serialization.XmlTypeMapping xmlTypeMapping) [0x00000]
at System.Web.Services.Description.SoapProtocolImporter.ImportHeader (System.CodeDom.CodeMemberMethod method, System.Web.Services.Description.SoapHeaderBinding hb, SoapHeaderDirection direction) [0x00000]
at System.Web.Services.Description.SoapProtocolImporter.ImportHeaders (System.CodeDom.CodeMemberMethod method) [0x00000]
at System.Web.Services.Description.SoapProtocolImporter.GenerateMethod (System.Xml.Serialization.CodeIdentifiers memberIds, System.Web.Services.Description.SoapOperationBinding soapOper, System.Web.Services.Description.SoapBodyBinding bodyBinding, System.Xml.Serialization.XmlMembersMapping inputMembers, System.Xml.Serialization.XmlMembersMapping outputMembers) [0x00000]
at System.Web.Services.Description.SoapProtocolImporter.GenerateMethod () [0x00000]
at System.Web.Services.Description.ProtocolImporter.ImportPortBinding (Boolean multipleBindings) [0x00000]
at System.Web.Services.Description.ProtocolImporter.Import (System.Web.Services.Description.ServiceDescriptionImporter descriptionImporter, System.CodeDom.CodeNamespace codeNamespace, System.CodeDom.CodeCompileUnit codeCompileUnit, System.Collections.ArrayList importInfo) [0x00000]
at System.Web.Services.Description.ServiceDescriptionImporter.Import (System.CodeDom.CodeNamespace codeNamespace, System.CodeDom.CodeCompileUnit codeCompileUnit) [0x00000]
at Mono.WebServices.SourceGenerator.GenerateCode (System.Collections.ArrayList descriptions, System.Collections.ArrayList schemas) [0x00000]
at Mono.WebServices.Driver.Run (System.String[] args) [0x00000]

Bah, tomorrow I’ll just hack this on a windows box. Tood bad, it seems like Frank Mantek had more luck with the Mono xml libraries when implementing the GData C# client library.

→ No Comments

Migrating to WordPress

August 28th, 2006 · No Comments

After using Radio UserLand (C), Movable Type (Perl), Blojsom (Java), Roller (Java) and Typo (Ruby) I move my blog to WordPress. My main reason for moving is that the version of Typo I’m using is very unstable and it crashes Apache every day. I ended up having a cron job to kill -9 ruby processes and restart apache every hour during my vacations. I forked Typo to add some hierarchical menus, as an exercise to learn Rails, but the blogging system itself is quite primitive compared to other servers I’m used, I have no time to invest in development, and it’s been a while I wnated to try out WordPress, so here we go.

Install was flawless: 45 minutes, most of it spent configuring a new virtual server in Apache and adding a host in my DNS config. WordPress itself installs in 10 minutes: wget, untar, create MySQL user, alter 4 lines in config file, hit the install url.

Tomorrow, I’ll try to migrate my data from Typo.

→ No Comments

About

August 28th, 2006 · 7 Comments

Personal

This is Patrick Chanezon’s blog, an online place where I share thoughts, code, and a few haikus.

I’m old, married to Dorothee Chabas, a brilliant neurologist specialized in Multiple Sclerosis. We have 3 great kids: Eliette (), Simon () and Charlotte ().

Professional

I have worked as a software engineer for 10 years at Accenture, Netscape, AOL< Sun Microsystems, then in developer relations at Google, VMware and Microsoft. See more details in P@ Resume and this is my most current blog.

Blog History

Over the past 10 years I have played with various blogging software. My old blogs can be found:

→ 7 Comments