An Architect's View

ColdFusion, Software Design, Frameworks and more...

An Architect's View

Entries Tagged as programming

Learning Scala (with Joel Abrahamsson)

August 19, 2010 · No Comments

For folks interested in a gentle learning curve for Scala, Joel Abrahamsson is a .NET developer who has decided to learn Scala - much as I recommend every CFer learn other languages: to bring back new lessons to use in your favorite language. This blog post is part four in his series but it's the first part that shows real code and compares it to Java/C#. Each post has a link to the first of the series (covering installation) which has links to all the other parts. Each post also has a link to the next part (once it's available).

Having gone through this learning curve myself over the last year, I can highly recommend Joel's series of blog posts for easing you into Scala.

No CommentsTags: programming · scala

Why I Love Programming (Part 94)

August 16, 2010 · 1 Comment

As I often tell people, the reason I love programming is because we (sometimes) get to solve hard problems.

I've blogged about my love affair with Scala as part of my "Learn a new language every year" commitment and I will admit that it's a more challenging language than, say, Java but that's part of its charm: it makes you think! I'm a bit advocate of learning new languages that make you think differently because you can bring that back to your 'favorite' language and it'll make you a better programmer. In the past, I've advocated APL, Prolog, Haskell because they're all very different to what you're used to. So, Scala brings some new challenges because it's a mixture of Object-Oriented and Functional Programming and it has an extremely strong type system. I love the Scala mailing list because it has some really interesting (and challenging) threads that make my brain work harder than usual.

A few days ago, someone complained on the mailing list that one of Scala's library types was "unsafe" because of one of its methods. What followed was a fascinating discussion about types, consistency and Turing completeness (which is kinda fundamental to all our programming efforts - or at least our debugging efforts :)

As the thread unfolded, one of my favorite list members, Tony Morris, explained why the method had to exist (OK, that's a simplification) and backed it up with a detailed analysis. I've read through the thread several times and I've also read a blog post from Tony several times and it's very instructive. Instructive enough that I feel the need to share it.

Here's the entire thread on the mailing list. Pay particular attention to Tony Morris's posts. Here's Tony's blog post about the proof behind his contribution to the thread on the mailing list.

I hope you find some nugget of interest in this and that it may interest you enough to learn more outside your comfort zone - that's why I do Scala!

1 CommentTags: programming · scala

Light Reading?

July 08, 2010 · 1 Comment

A conversation on the Railo mailing list, initially about free CFML hosting, turned into a discussion of the scarcity of CFML books. Several people felt that CFML was so easy that books just weren't as necessary as for other technologies. I agreed, and then I shared my current book list (stacked to the right of my computer). I figured I'd share it on my blog as well, just as a data point for some varied reading for CF developers:

  • Adobe ColdFusion Anthology (the FAQU stuff) - 3 copies (I was a TR on the book)
  • Programming in Scala
  • The D Programming Language (review copy)
  • Modern C++ Design (possibly a review copy - it dates back over a decade I think)
  • Enterprise Integration Patterns
  • Groovy Recipes
  • Groovy in Action
  • ColdFusion 8 Developer Tutorial (I was a TR on the book)
  • Java Persistence with Hibernate
  • Spring in Action
  • Grails in Action (also eBook formats)
  • Adobe Flex 2 (definitely a review copy or raffle prize or some other free source)
  • Essential ActionScript 3.0 (probably a review copy)
  • Patterns of Enterprise Application Architecture
  • Refactoring to Patterns

In addition, I have purchased a number of eBooks:

  • Becoming Agile
  • Clojure in Action
  • Distributed Agile in Action
  • Erlang and OTP in Action
  • JBoss in Action
  • Lift in Action
  • Objective C for the iPhone

And then in my eBooks folder I also have assorted technical papers on Scala, Forth, TDD, concurrent programming and no-SQL databases!

1 CommentTags: coldfusion · programming

Getting Started With Clojure

June 29, 2010 · 9 Comments

Clojure is a very new language so getting started can be a little daunting. This blog post shows just about the simplest way to get up and running and using Clojure code.

[Read more →]

9 CommentsTags: clojure · oss · programming

Learning Clojure

May 03, 2010 · 4 Comments

This past weekend, I attended Amit Rathore's ProClojure boot camp to learn the Clojure programming language.

I highly recommend learning other languages to give you a new perspective on the language you use every day for work.

[Read more →]

4 CommentsTags: clojure · coldfusion · programming

Visualizing ant build.xml files

January 27, 2010 · 3 Comments

I've spent today working on a reasonably complex build.xml file, refactoring it to reduce duplication by using the ant-contrib foreach task so that similar targets can be reduced to loops over a list of properties (I'll blog on that later since it includes some fancy nested loops to run Selenium tests across multiple applications on a server). I wanted a way to look at the structure of the ant file before I did open-heart surgery on it. Google led me to ant2dot and GraphViz (with a very nice version for Mac OS X and the iPhone). It's a very neat way to quickly get a handle on the dependencies in your ant file and it's certainly helped me figure out how to reorganize things. My only complaint would be that it doesn't understand the ant-contrib foreach task which has a target attribute and therefore creates a dependency so such children appear as orphans. I figured I'd blog this in case anyone else finds it useful!

3 CommentsTags: oss · programming

XP is nothing new

December 31, 2009 · 7 Comments

When the subject of Agile Methods and Extreme Programming come up in conversation, I find a lot of people tend to dismiss it as some sort of "new fad". I'm on the XP mailing list (on Yahoo! Groups) and someone just posted today that the first message was posted ten years ago (December 31st, 1999). Kent Beck's book "Extreme Programming Explained" was published in October 1999 after he had been refining the XP techniques for three years (on the Chrysler Comprehensive Compensation payroll system). Many of the techniques in XP predate that substantially: test first development - commonly referred to as TDD (Test-Driven Development) - can be traced to NASA's "Project Mercury" in the early 1960's; refactoring, incremental designs, and other techniques that are considered part of XP were documented in a book published in 1984 ("Thinking Forth" by Leo Brodie). No, XP is nothing new, it's just become increasingly popular as more people try it and find benefit in its practices. Over the last three or four years I've been adopting a variety of Agile Methods on projects to see whether they help with some of the typical problems we all run into these days: tight deadlines, vague and changing requirements, poor estimates, lack of visibility into progress. I've been pretty pleased with the results. Agile Methods aren't a panacea: being agile doesn't make you a better developer (or project manager) overnight but it does help give you a better handle on the status of a project, it lets you maintain measurable forward movement, the focus on testing increases your confidence in "completion" as well as providing a safety net while you're making improvements in the code structure. So perhaps before dismissing XP and Agile as "some new fad", you might make it one of your resolutions for 2010 to try these decade(s) old approaches? BTW, some of those other "new fads" that you think are challenging the CF establishment... you know, new fangled stuff like Ruby and Python? Just remember those languages pre-date CFML! Happy New Year! :)

7 CommentsTags: programming

What Makes Better Code?

November 09, 2009 · 6 Comments

As you might guess from some of my tweets and blog posts lately, I've been reading more about Agile, Lean and XP software processes, looking at how I can improve my own working practices and those of the teams I work with. Once again the XP mailing list has provided a good read with a link to large-scale research at Microsoft into the effectiveness of certain software practices. As the researcher points out, the vast scale and diversity of Microsoft's software development ecosystem allows for some in-depth analysis that compares different approaches on similar teams. The article is worth reading all the way through and shouldn't really contain any surprises but there are a couple of things I wanted to pull out and highlight.

[Read more →]

6 CommentsTags: programming · tdd

Do You XP?

November 08, 2009 · 2 Comments

I asked a couple of questions on the extreme programming mailing list recently to see how people dealt with distributed teams (and also to gauge feelings on electronic collaboration versus face-to-face, pens-and-cards collaboration). William Pietri posted a link to a page about his team's project room that I think makes interesting reading, particularly for folks who are skeptical about XP. William Pietri's XP Team Room He goes into enough detail of the XP process for folks to get a real feel of how his project runs without getting bogged down in theory. I'll be interested to hear what non-XP people think of such a work environment?

2 CommentsTags: programming

To OO or not to OO? What is the question?

May 30, 2009 · 29 Comments

Marc Funaro kicked off quite a heated debate on his blog lately by raging against people pushing object-oriented programing/design and how his attempt to follow their advice nearly led to the collapse of his business. Marc was expressing a common frustration that many of us have heard from people who try to learn OO, especially from people with a long history of procedural programming and/or no computer science background. I've left comments on a few of the blog posts but several people have asked me to go into a bit more depth about my thoughts on this issue (since I'm one of the people sometimes accused of "pushing" OO and insisting it's the "right" way to do things).

[Read more →]

29 CommentsTags: architecture · coldfusion · programming