Archive

Archive for the ‘Information Science’ Category

Hashrocket man (and I think it’s gonna be a long, long time)

January 19th, 2010 Josh Graham 1 comment

After 4.5 years at ThoughtWorks, I’ve put down the purple elephant and donned my spacesuit to join Hashrocket and open the Chicago office.

Hashrocket is the world’s best Ruby on Rails shop — a world-class team of spectacular developers, lead by my former and now current colleague Obie Fernandez.

Our Chicago office has been set up to help draw in more talent to meet our growing client needs. Some devs would prefer to live in a big city and Chicago has a strong Ruby community.

If you’re a Rubyist in Chicago, you can look forward to Hashrocket soon hosting some of the user groups and other events. We will be open at 661 W Lake St on Feb 1, 2010.

PreparedEval

October 6th, 2009 Josh Graham No comments

Announcing PreparedEval, prepared statements for generating JavaScript (and the like) from Java. It prepares Java strings for JavaScript evaluation, similar to SQL prepared statements. Saves you from quote escape nightmares! Great for Selenium tests and Rhino JavaScript.

As a follow-up to my post on escaped, quoted strings, Taking the idea of using a different encoding scheme further (and not being super happy about the need to pump the string through unescape()) I thought about interpolation and wondered about prepared statements in SQL. Some quick research turned nothing up, but while chatting with Ola Bini he also mentioned prepared statements, so this convinced me to knock something together that might be useful.

More information is at http://wiki.github.com/delitescere/PreparedEval.

There’s no runtime dependencies so it’s nice and tiny if you just want the JAR.

Let me know if you use if to help with CSS / XPath selectors for Selenium or if you have any suggestions on improving the API.

Categories: Coding, Open Source Tags:

Escape the literal prison.

September 20th, 2009 Josh Graham 3 comments

When you have more backslashes than words in the strings you are constructing, perhaps it’s time to look at another way of handling special characters like quotes.

The problem

You’re generating JavaScript code from another language with C-like quoting and escaping syntax (e.g. Java).

As part of that code generation, you’re substituting strings that have both double quotes (“) and single quotes (‘). My team’s actual problem stems from using XPath locators which include quoted text and sending that to Selenium so we can obtain the particular element that contains the text*.

Let’s say we want to pop up an alert within which are some double quotes:

String original = "Hello \"stranger\", how are you?";
String quoted = original.replaceAll("\"", "\\\"");
String script = "alert(\"" + quoted + "\")";
eval(script);

We then expect the browser to have this JavaScript code to process:

alert("Hello \"stranger\", how are you?")

and when then expect the alert to display the string:

Hello “stranger”, how are you?

But why doesn’t it work?
Read more…

Categories: Coding Tags:

Indian Summer

August 7th, 2009 Josh Graham 1 comment

I’m visiting our India operation for a few months, mostly at our Pune office. I’m trying my hand at various coaching activities on a number of fronts, including working with some of our technical leads, aspiring architects, business development team, and recruitment.

I’ve always been a fan of our teams in India and China. In the early days of the ThoughtWorks Sydney office, to help fill the rapidly growing demand pipeline, we were able to bring people in from TW offices around the world, including some from India (Nitesh rocks!). We also had to distribute some delivery work to India (and later, China too) on some large projects. This was an eye-opening time for us in learning how to make Agile software development work across teams in different places and timezones. (People like Ben Hogan, Naresh Jain, Shyam Mohan, and Jane Robarts have been able to share some of that experience at conferences.)

It wasn’t the reduced rates that these projects were able to offer to clients that appealed to them – it was the large capacity of ThoughtWorks talent available that we simply couldn’t fill quickly enough locally. ThoughtWorks and clients alike insisted on top grade delivery team members, no matter where they happened to be located during any given iteration (we rotated people through the locations quite a bit to engender better collaboration, shared understanding, and teamwork).

Being a senior member of the company for four years, I had always felt a little incomplete in not having visited any offshore teams – based on the stories from others who had visited, I was missing out. I’m pleased now I’m here and I can experience for myself the atmosphere, attitude and aptitude of the Pune office and I’ll get to meet everyone from Chennai and Bangalore at the ThoughtWorks India Away Day in a few weeks.

It’s also pleasing that we have evolved the offshore capability to the point it is a compelling set of offerings that really appeal to companies looking for top quality, technical innovation, agile software delivery, and commitment to results within leaner budgets. http://offshore.thoughtworks.com/

I’m very excited to be here right now. Amanda is knocking out her “F# In Action” book from Manning as fast as an autorickshaw darts between pedestrians, I’m working with some awesome new and old faces, and the dal makhani is delicious!

However, I’m not having much luck getting people to call me “RoganJoshG”… ;-)

Categories: Agile / Lean Tags:

ThoughtWorks panel

July 10th, 2009 Josh Graham No comments

A recent public panel discussion was held in the ThoughtWorks Chicago office in which Martin Fowler, Rebecca Parsons, Neal Ford, Ian Cartwright, Erik Doernenburg, Ola Bini, and myself discussed the four topics Cloud, Language Workbenches, Developer Certification, and Polyglot Programming.

The recordings have been released at http://securerespond.com/thoughtworks/tab/

There’s also links to a couple of podcasts recorded the next day by Neal Ford (one of which is also with me).

Categories: Information Science Tags:

Assertions: actual or expected first?

June 5th, 2009 Josh Graham 2 comments

Should it be assertEquals(expected, actual) or assertEquals(actual, expected)?

This discussion came about because at the Chicago Code Camp, Jim Suchy from 8th light was demonstrating TDD in JavaScript by building a simple unit testing library. One of the methods he created was the typical assertEquals. In the code on github he had a signature of assertEquals(expected, actual) while during the demo he swapped the order, and I pointed out that the original was what I would have anticipated. He commented that there was an interesting discussion about it at his office a few days before. I’m interested to hear more about it, and I tweeted that I was inclined to get a debate going about it just to see what the different rationales were. This post is a collation of thoughts and opinions to date.
Read more…

Categories: Coding, Testing Tags:

JAOO Australia 2009

March 31st, 2009 Josh Graham 1 comment

Today’s blog is sponsored by the word “awesome”.

I’ve just come back from a trip to the awesome QCon London 2009 and the (thankfully) awesome speakerconf 09 (more of both in blogs soon, promise!)

Coming at the beginning of May, though, is the most awesome JAOO Australia 2009 in both Sydney and Brisbane. Last year’s inaugural event was awesome and this year’s looks to be its match.

The awesome Dave Thomas asked me to speak there on “something Enterprisey”, so I’m putting together notes and experiences on applying Agile practices to enterprise architectures. It’s easy to see that current economic drivers make it imperative for a firm’s technology leaders to do more to embrace rapid business change within IT. The talk will draw on ThoughtWorks projects across the globe, including those I participated in both in the US and Australia. It’s Neo Architectural. It’s for Modern Architects.

Also, my very talented and awesome wife, Amanda Laucher, will be presenting on DSLs and language-oriented programming, providing some insight on when to make one and some samples in C#, F# and MGrammar. Don’t worry if you only know Java or Ruby, you’ll get plenty out of the talk if you want to learn more about DSLs.

Amanda will also be teaming up with Joel Pobar to provide an Introduction to Functional Programming tutorial, with a focus on the awesome F# language. If you want to know about partial applications, dynamic pattern matching, idiomatic units of measure, and asynchronous workflows on top of the usual functional programming concepts, then this talk is for you. If someone at work is saying “we need to exploit concurrency” then this talk is for you. Again, if you’re coming from Java land that’s fine, there’s enough to get you looking at Scala or the awesome Clojure languages too.

Categories: Conference Tags:

CodeMash

November 26th, 2008 Josh Graham 2 comments

I’ve been given the privilege of speaking at CodeMash 2009 in Sandusky, Ohio this coming January.

The presentation and discussion will cover the learning from implementations of Guerilla SOA and will include code and demonstration based on the WCF. It may change some minds about the default approach to the WCF programming model and open some eyes on how to build a truly message-oriented service oriented ecosystem.

Looking forward to a conference that comes highly recommended.

The submitted abstract

Title: Guerilla SOA for WCF
Track: Arch & Design
Level: Intermediate

Description:
This talk goes over the fundamentals of Guerilla SOA (a concept conceived in ThoughtWorks and championed by Dr Jim Webber) and how they are applied to WCF in both a SOAP and REST context.

Using principles from agile software development into an emergent architecture, particularly for services, the talk looks at an alternative approach to the usual usage of the WCF programming model which provides a true message-oriented approach (rather than the RPC hole almost every WS-* stack drives us into).

Drawing on real large-scale projects, we’ll touch on consumer-driven contracts, sensible XSD, alternate validation techniques, LINQ to XML, XPath, and a convention-based and MVC approach to web service implementation.

Categories: Architecture, Coding, Conference Tags:

Azure + Red = Purple: .NET Services for Ruby from ThoughtWorks

October 31st, 2008 Josh Graham No comments

If you want to develop Ruby applications that use the services in the Microsoft® .NET Services cloud, then this SDK is for you:

http://www.dotnetservicesruby.com/

Categories: Architecture, Open Source Tags:

AMQP, why for art thou?

October 29th, 2008 Josh Graham No comments

OK so I’ve been moving from Sydney to Chicago with lots of time at a client in Calgary. No posts, but some coming.

In the meantime, based on a note from my colleague Ian Cartwright on an article about Microsoft embracing AMQP, I wrote a little poem, for I am in a very poetic mood at present. I’ll tell you why next week!

There is a message queue open standard /
almost all implementations are free /
it’s the killer app of the internet /
and what’s its name? Lo! It’s SMTP!

:-)

Categories: Architecture, Poetry Tags: