Re.Mark

My Life As A Blog

Archive for the ‘Events’ Category

TechDays 2010

leave a comment »

Yesterday I was at TechDays 2010, where I presented a session on what’s new in VB 10 and C# 4.0.   Before diving into the new features, I talked about the trends in language design and evolution – for those who are interested, I’d take a look at this session where Anders Hejlsberg goes into far more detail.  Next I picked out a few personal highlights of what’s new in .NET 4.0 – including Code Contracts, Tuples and In-Process Side-By-Side Execution and talked briefly about co-evolution.  The new VB features I talked about were Auto-implemented Properties, Implicit Line Continuation, Collection Initializers and Statement Lambdas.  The new C# features I discussed were Optional and Named Parameters and Dynamically Typed Objects – of course no discussion of Dynamically Typed Objects would be complete without mentioning the Dynamic Language Runtime and I also talked about ExpandoObject and DynamicObject and how both C# and VB can use this new dynamic capability.  The last two features are new to both C# and VB: Improved COM Interoperability and Co- and Contra-Variance.

And for those of you who couldn’t make the event (and, thinking about it, for those who could, too), I’d suggest taking a look at the Underbelly backstage videos of day one and day two.

Advertisements

Written by remark

April 14, 2010 at 5:39 pm

Polyglot Programming at the AIC

leave a comment »

Thanks to everyone who attended my session on Polyglot Programming at AIC earlier today.  The ability to combine languages to achieve simpler solutions is worth consideration, although the potential downsides of adopting multiple languages need to be borne in mind.  In truth, many of us are already doing a form of polyglot programming – combining a programming language server side (such as C#) with Javascript on the client and SQL for data access.  However, this form of polyglot programming arises passively and is done because we have to and not because we have deliberately and actively selected a set of languages.  In order to be successful with polyglot programming, there are two crucial components: a platform and architecture.  The platform should provide language interoperability and the architecture should provide guidance on which languages to use and where in the architecture they are appropriate (taking into account that this guidance will evolve over time as you gather information and feedback about what really works for you and your team.)  In discussing the platform, I briefly touched on some of the features in .NET 4 and talked about the trends in language design.  I’ll be expanding on these platform themes and diving into a little more detail about .NET 4.0 at TechDays in April.

Here are the links and references I used in my session:

Nick Watts’ post on polyglot programming (I used his definition)

The definition of polyglot in the Compact Oxford English Dictionary

Neal Ford’s post on polyglot programming

Bertrand Meyer’s article on polyglot programming in Dr.Dobb’s

Information about the Babel Project at the Lawrence Livermore National Laboratory

Ted Neward’s MSDN article The Polyglot Programmer: Mixing and Matching Languages

History of Programming Languages

Hans Christian Fjeldberg’s thesis on Polyglot Programming

Dean Wampler’s presentation on Polyglot and Poly-Paradigm Programming

I also referred to Ola Bini’s idea of fractal programming.

I suggested that there are two practical areas where experimentation with polyglot programming could be beneficial with existing applications and systems:  extension and testing.  By extension, I mean the ability to customise and add functionality – which is a great fit for a dynamic language like IronRuby or IronPython.  Testing is also an area where dynamic languages have much to offer and I’d suggest taking a look at Ben Hall’s presentation that he gave at QCon earlier this year.

Written by remark

March 31, 2010 at 5:15 pm

Posted in .NET, Architecture, Design, Events

Tagged with

Iron Python at QCon

leave a comment »

I spent yesterday on the Microsoft stand at QCon 2010.  I took a few Iron Python samples with me to show to those who are interested.  I wanted to be able to show three things:  .NET runs Python, Python extends .NET and Python runs .NET.

.NET runs Python

To show that .NET can run Python I used the Text Processing sample I’ve blogged about before.  I’ve subsequently added optparse to it so that it can be driven from the command line.  The point of this sample is that it uses standard Python libraries, the whole application is written in Python (there’s a little XAML to describe the UI) and runs on the DLR courtesy of IronPython.

Python extends .NET

For a simple demonstration of extending a .NET application with Python, I took the sample application described here.  This application allows the user to write Python (at runtime) that interacts with the application.

Python runs .NET

The last sample was an adaptation of the code here that reads a Twitter feed.  Rather than use Twitter (with all the shortened urls and abbreviations) I decided to use an RSS feed from the BBC to create an Iron Python newsreader.  The code is remarkably simple:

import clr
clr.AddReference('System.Speech')
clr.AddReference('System.Xml')

from System.Speech.Synthesis import SpeechSynthesizer
from System.Xml import XmlDocument, XmlTextReader

xmlDoc = XmlDocument()
xmlDoc.Load("http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml")
spk = SpeechSynthesizer()

itemsNode = xmlDoc.DocumentElement.SelectNodes("channel/item")
for item in itemsNode:
  print item.SelectSingleNode("title").InnerText
  news = "<?xml version='1.0'?><speak version='1.0' xml:lang='en-GB'><break />" + item.SelectSingleNode("description").InnerText + "</speak>"
  spk.SpeakSsml(news)
 

This is Python using standard .NET libraries to show how a Python programmer has the .NET framework available to them through Iron Python.

Gestalt

The final thing I talked about is Gestalt, which allows you to run Python (and Ruby) in the browser.  It does this by using the DLR, which is part of Silverlight – this is all encapsulated in javascript.

Written by remark

March 12, 2010 at 7:21 pm

Posted in .NET, Events, Microsoft, Python

AIC 2009 Slides available

leave a comment »

As Matt announced, the slides from the Architect Insight Conference 2009 are all now online.  The keynote videos are there too.  As Marc notes, there’s something there for most architectural interests – including my session on Dynamic Languages and Architecture (with what could become my trademark use of translucent black.)

Written by remark

June 16, 2009 at 5:18 pm

Posted in .NET, Architecture, Events, Python, Ruby

Tagged with

AIC 2009 – Dynamic Languages and Architecture

leave a comment »

Thanks to all of you who attended my session at AIC earlier today.  The slides will be made available on line over the next week or so. 

I think the interesting capability made possible by the DLR is using static languages and dynamic languages together.  And there’s another benefit of learning a new language: when we only use one language we tend to think in that language – having other languages in our toolkit means that we have other approaches available to us.

So, where can you start to take advantage of dynamic languages?  The areas I discussed today were:

  • extending your application by adding scripting support to your application
  • configuring your application with a dynamic language
  • creating a DSL using a dynamic language
  • writing one or more layers of your architecture in a dynamic language
  • testing your application(s) with a dynamic language

Of all of these, extending and testing are probably the best places to start.

I also talked a bit about the DLR (and a couple of the Iron Languages – Iron Python and Iron Ruby) and the way that C# will be taking advantage of the DLR. It’s fascinating to see the evolution of programming languages and how the trends of dynamic, functional and concurrent programming are influencing this evolution.

Here are the links that I gave out in my session:

http://www.codeplex.com/IronPython

http://ironruby.net/

http://www.codeplex.com/dlr

http://devhawk.net/

http://blog.jimmy.schementi.com/

Dynamic Languages on .NET (www.microsoftpdc.com)

http://ironpython-urls.blogspot.com/

http://www.ironpythoninaction.com/

I also mentioned the Anders Hejlsberg session on the future of C# – you can watch that here – and a Channel 9 video of Anders Hejlsberg and Gilad Bracha discussing language design, which you can find here.

As part of the preparation for the session, I exchanged some emails with a few folks including Michael Foord.  For those of you who’d like to see Michael’s take on this subject, he’s posted about it here.

Written by remark

May 8, 2009 at 5:29 pm

Ruby Tuesday #28 : Architect Insight Conference

leave a comment »

This Friday the fourth annual Architect Insight Conference will roll into town – this year the town is London.  I’ll be speaking about dynamic languages from an architectural perspective and how and when you can incorporate them into your architecture. 

Written by remark

May 5, 2009 at 4:28 pm

Posted in Architecture, Events, Python, Ruby

Tagged with

Oredev 2008

leave a comment »

With a new week underway, I thought I should post my thoughts about Oredev 2008 last week.  There was a real mix – of technology, people and sessions – that helped to create a great atmosphere.  It was a large conference, but it never felt impersonal.  The hospitality of our hosts (special thanks to the guys at Dotway) cannot be overstated.  All added up to an enjoyable and useful week.  Like Holmesy I find that Glenn’s post and Tim’s post match my reaction pretty well.  I’d also suggest you take a look at this video for our view of Oredev.

Written by remark

November 25, 2008 at 7:00 pm

Posted in Events