<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[AlBlue&rsquo;s Blog]]></title>
  <link href="http://alblue.bandlem.com/atom.xml" rel="self"/>
  <link href="http://alblue.bandlem.com/"/>
  <updated>2013-03-25T23:33:44-04:00</updated>
  <id>http://alblue.bandlem.com/</id>
  <author>
    <name><![CDATA[Alex Blewitt]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[EclipseCon 2013 Day 1]]></title>
    <link href="http://alblue.bandlem.com/2013/03/eclipsecon-day-1.html"/>
    <updated>2013-03-25T23:00:00-04:00</updated>
    <id>http://alblue.bandlem.com/2013/03/eclipsecon-day-1</id>
    <content type="html"><![CDATA[<p>Today was the starting day for EclipseCon, and for many years
Monday has been tutorial day. These tutorials are included in the price
of the conference ticket, and two three-hour tutorials fit neatly into
the first half of the day, followed by an exhibitor&#8217;s receiption and the
evening community event.</p>

<p>The tutorials I attended this year were
<a href="http://www.eclipse.org/Xtext/">Xtext</a> and
<a href="http://www.eclipse.org/xtend/">Xtend</a> specific. Having said
that, I was jealous of others in Benjamin Cab&eaccute;&#8217;s talk which was
on Raspberry Pi and Arduino programming; however, whilst that&#8217;s just a
passing interest to me personally the Xtend and Xtext basics were ones
that I had been meaning to investigate in more detail for some time but
never put the time aside to spend any significant amount of time learning them.</p>

<h2>Xtext</h2>

<p>First up was the Xtext tutorial. For those that don&#8217;t know, Xtext is a
parser generator/DSL/editor which can spit out not only a model of the
code but also associated text renderers. There&#8217;s a lot of machinery under
the hood to making such things work seamlessly, and many more API hooks
for performing things like validation and generation than I would have
thought possible.</p>

<p>I also now understand some of the syntactic elements in the Xtext grammars,
which aren&#8217;t immediately obvious, such as <code>foo+=bar*</code> means that &#8216;foo&#8217; will
be a list of zero or more &#8216;bar&#8217; elements, and <code>option?=something?</code> means
a boolean value &#8216;option&#8217; which is true iff &#8216;something&#8217; is present. I&#8217;ve
never seen those explained before, and having it come to light suddenly
makes sense of a lot of things in the past.</p>

<p>What I didnt also appreciate was Xtext&#8217;s ability to generate content based
on both a validator and a generator step. The default project has placeholders
for both of these, though they default to no-ops.</p>

<p>There was also a lot of detail in how Xtext raises its suggestions and valid
entries for scopes; unfortunately, the exercises took the group slightly
longer than planned and so there was a cursory glance over these implementation
details. There&#8217;s some documentation at
<a href="http://www.eclipse.org/Xtext/documentation.html#scoping">the xtext site</a>
which makes about as much sense as before the talk &#8230;</p>

<p>Still, at least I got to talk to a few of the Xtext guys, and managed to
put my view across that whilst whitespace-sensitive grammars are technically
possible (and needed for languages such as Python, Makefiles and YAML) there
are no open-source examples of using such a whitepsace-senstiive grammar.
There&#8217;s a difference between &#8216;technically feasible&#8217; and &#8216;practical&#8217; which
is just a little too big a chasm to cross at this point.</p>

<p>Still: mission accomplished; I know a lot more about Xtext than when I started,
even if I now know that there&#8217;s more that I don&#8217;t know.</p>

<h2>Xtend</h2>

<p>The next tutorial was on Xtend, this time on active cnnotations (a new feature
in 2.4) and a functional programming quiz. Xtend is based upon the Xtext
parsing suite, and translates into Java and then hands off compilation to the
Java compiler &#8211; meaning none of the headaches usually seen with Scala and
none of the blisteringly fast Perl-like performance of Groovy. It also helps
that the language is statically typed, yet uses inference (like Scala) so that
you don&#8217;t have to write repeated boilerplate code.</p>

<p>Active annotations are really very cool indeed; they provide a way of
annotating a class with an interface (like existing Java annotations) but
allows you to hook in a translation rule to say how the generated Java class
should be amended. In this way, it&#8217;s possible to define a <code>@Serializable</code>
annotation that will automatically generate a <code>serialVersionUID</code> field, or
a <code>@ToString</code> generator based on the field contexts.</p>

<p>The exercises then jumped a few levels and dived right into a functional
programming exercise. Xtend, it seems, depends on Guava (version 10, if
anyone is interested) which I wonder what would happen if a program used
a more recent version of Guava as well as Xtend functionality.</p>

<p>The probelm with the gear shift is that many features of Xtend becamse assumed,
such as the integration of the guilement quotes and template <code>FOR</code> statements.
There were also some aspects left unexplained, like extension methods and
how functions like <code>10.minutes</code> were actually evolved (there&#8217;s a <code>minutes()</code>
method elsewhere in the example which takes an int, so <code>10.minutes</code> is an
implicit extension method on <code>int</code> values).</p>

<p>One thing I did learn was that functions which take a lambda as their last
argument don&#8217;t have to specify it in the argument list, but can simply place
the lambda after the expression in question. So a call to <code>foo(1,[3])</code> can
also be written as <code>foo(1) [3]</code>, on the basis that lambdas often span multiple
lines and thus you don&#8217;t have to worry about bracket nesting. It looks tempting
to think of it as a partial function, but Xtend doens&#8217;t have those; it&#8217;s
just syntactic sugar to make it prettier.</p>

<p>I&#8217;m still pretty excited with Xtend in general; it&#8217;s no Scala killer yet
(though Scala is doing a good enough job of killing itself) &#8211; but I think
the killer feature of Xtend is going to get IntelliJ support. JetBrains have
no interest in doing this, so I wonder if a port of Xtend to IntelliJ will
have to happen, and essentially port the Eclipse editor into a runtime
instance of IntelliJ. Without it, I think Xtend will remain a power tool
for Eclipse users and Eclipse plug-in developers, but probably not in
the wider JVM replacement language category just yet.</p>

<h2>Eclipse community event</h2>

<p>One of the nice things about Eclipse is that despite being a large community,
events like these really bring everyone together. In this case, the awards
ceremony awarded several projects and committers for their work, including
a lifetime achievement award for Chris Aniszczyk, who has worked tirelessly
promoting Eclipse and projects for all of the time that I&#8217;ve been involved
with the Eclipse community. I think it&#8217;s an achievement well deserved.</p>

<p>There was also a &#8216;family fortunes&#8217; (aka &#8216;family feud&#8217; in American) in which
I took part, and which our team lost. Oh well, it&#8217;s the taking part that
counts &#8230;</p>

<h2>BoFs</h2>

<p>Another great part of EclipseCon is the after-hours events. In this case, the
Birds of a Feather sessions get like-minded people in a room to talk about
or investigate a particular piece of software/technology. In my case, I
went to the Raspberry Pi hackathon, in which I got my hands on an Arduino
and a Raspberry Pi and actually did some programming/wiring between the two.
Unfortunately I got a duff Pi, which meant that it took ages to do anything,
but the Arduino was especially easy to program and hook up with a few
hardware buttons and LEDs with a mini breadboard.</p>

<p>I also think I finally understand why a combination of Raspberry Pi and
Arduino makes sense, as opposed to an either-or. The Raspberry Pi is a
standalone computer, and can drive an HDMI screen, make network connections
and do general purpose programming, as well as a few pins for digital I/O.
However, the I/O pins on the Pi are directly connected to the CPU, so if you
do something wrong and fry the Pi then you&#8217;re out of luck. On the other hand,
an Arduino is quite hardy, and is able to deal with more rough treatment.
The program is less flexible, in that it needs to be connected to an EEROM
type programmer in order to be programmed. The Arduino makes this trivial,
as you can connect it to a USB port and then flash it with a new program
(they&#8217;re called &#8216;sketches&#8217; for some bizzare reason) but on the plus side
the event loop is capable of polling for changes to any of the pins and
read them in as values, from which you can do simple processing and
manipulation. To do anything serious, you can punt the resulting values by
either serial port (cleverly, you can plug the Arduino Uno into the Pi&#8217;s
USB port and both power it and have a <code>/dev/tty</code> for bidirectional communication
between the two). The Pi can then read these from the standard terminal,
and do more extensive programming and/or network transmission of the data
to a central location.</p>

<p>It&#8217;s also possible to hook up a Pi and an Arduino using more low-level
technical methods, such as an I2C bus. I didn&#8217;t explore these but if a Pi
needs to drive several Arduino boards then the I2C bus offers that possibility.</p>

<p>The Arduino kits also come packaged with several &#8216;shields&#8217;, which are really
just daughter boards that can plug into the expansion slot. The shields
are stackable, so it&#8217;s possible to plug one into the top of another, and then
another on top. Each one has its own personality; some are used for controlling
electronic motors, others can provide networking capabilities, and others still
have just pins to which specially crafted backpacks or tinkerset items can be
used to provide real plug-and-play electronics.</p>

<p>So, when I get back to the UK it&#8217;s time to get ordering some new miniature
hardware.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[EclipseCon 2013 Day 0]]></title>
    <link href="http://alblue.bandlem.com/2013/03/eclipsecon-day-0.html"/>
    <updated>2013-03-24T20:00:00-04:00</updated>
    <id>http://alblue.bandlem.com/2013/03/eclipsecon-day-0</id>
    <content type="html"><![CDATA[<p>Good news, everybody. I&#8217;m at EclipseCon in Sunny (if not slightly chilly)
Boston, and having survived the flight with only a minor headache I&#8217;ve
registered, met up with a few old friends (and some new ones) and am about
to head down for a brainstorming session on <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300500">bug 300500</a>.</p>

<p>The other piece of good news &#8211; and the reason why my blogging has dropped
off a cliff over the last year or so &#8211; is that I have finally finished
writing a book on Eclipse plug-in development. This covers the basics
(creating views and so forth) as well as up-to-date content like the
differences introduced in E4 as well as how to build and deploy update
sites with Tycho and run tests with SWTBot. It doesn&#8217;t aim to be all things
to all people &#8211; in fact, I&#8217;d imagine that many reading this post will already
know all there is to know about the content of the book &#8211; but it&#8217;s aimed
at those who are starting out their plug-in journey and want to be able to
build Eclipse based plug-ins for now and future use. It&#8217;s written in a
step-oriented tutorial style (somewhat different to my usual colloquial posts)
so I&#8217;m curious to see if this helps or hinders adoption.</p>

<p>The book should be out by the end of next month, and I&#8217;d like to thank those
who have contributed reviews so far (and those who have said they will) &#8211; I&#8217;ll
make sure that the Acknowledgements chapter is up-to-date with any feedback
received.</p>

<p>Anyway, having finished the bulk of the book and going into a proof-reading
and typo-spotting phase, I hope to have enough time to be able to get back
to blogging in a more meaningful way than conference write-ups. And speaking
of conference write-ups, expect to see my thoughts not only here but also on
<a href="http://www.infoq.com/">InfoQ</a> &#8211; and hopefully a few video-recorded
interviews with some of the fellow EclipseCon attendees.</p>

<p>In any case, if you spot me at EclipseCon and want to say hi, please do so.
My Twitter (or App.Net) avatar looks much like I do, except he&#8217;s got less
grey hair and no body.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[QCon London 2013 Day 3]]></title>
    <link href="http://alblue.bandlem.com/2013/03/qcon-day-3.html"/>
    <updated>2013-03-06T23:30:00-05:00</updated>
    <id>http://alblue.bandlem.com/2013/03/qcon-day-3</id>
    <content type="html"><![CDATA[<p>Finally, the last day of an excellent conference. Today&#8217;s keynote was the
master of the wiki, Ward Cunningham (<a href="http://twitter.com/wardcunningham">@WardCunningham</a>) on <a href="http://qconlondon.com/dl/qcon-london-2013/slides/WardCunningham_KeynoteAForwardLookAtFederatedWiki.pdf">Federated Wiki</a>.</p>

<p>The point of a federated wiki is to expose data through markup languages
(think CSV meets markdown) and for a page to render data from whichever
source it has come from. Not only that, but data sources can be combined
from other sources or pages, so that blended views of data can be combined
together.</p>

<p>There&#8217;s an example federated wiki at <a href="http://ward.fed.wiki.org/view/welcome-visitors/view/smallest-federated-wiki">ward.fed.wiki.org</a> along with
some Vimeo videos demonstrating what it is like
(<a href="http://vimeo.com/27671065">http://vimeo.com/27671065</a>,
<a href="http://vimeo.com/27671347">http://vimeo.com/27671347</a>  and
<a href="http://vimeo.com/27673743">http://vimeo.com/27673743</a>).</p>

<p>The use of <a href="http://d3js.org">d3js</a> to provide the chart rendering
and graphics in a browser was a pretty neat trick. It uses HTML5 Canvas if
available, and if not falls back to SVG and even VML to render the graphics,
so it works on almost every browser that has a graphical interface.</p>

<h2>Physical Pi with Steve Freeman and Romilly Cocking</h2>

<p>The most interesting talk for me was about a Raspberry Pi. Steve and Romilly
had created a Pi-driven robot; they announced early that morning that they
had run out of batteries, and at the start of their presentation they said
that they had still run out of batteries and so couldn&#8217;t demo it. (Somewhat
makes you wonder why they even told anyone about it, but hey.) The
<a href="http://qconlondon.com/dl/qcon-london-2013/slides/RomillyCocking_and_SteveFreeman_PhysicalPi.pdf">slides</a>
are available but the video probably has more energy, for when it comes out.</p>

<p>As someone who was interested in electronics at an early age but fell into
software soon after, the Raspberry Pi seemed like a great way of getting
back into it again. Although I have yet to buy one, it will be a purchase
this year sometime, in part thanks to this presentation inspiring with
various ideas.</p>

<p>They didn&#8217;t only have a Pi but also a connection with Arduino boards using the
I2C communications protocol, with the Pi being the brains to the Arduino&#8217;s
limited but functional slave system. With all the software being coded in
Python, it makes interacting with other devices much easier than it was
in the past. (That&#8217;s twice this week that people have been talking up
Arduino and Pi devices; surely a good indicator if nothing else as to what
I should be doing this year.)</p>

<p>I do wonder whether the Pi is really for a new generation of enthusiasts, or
an older generation pining to be the younger generation again. In that way,
it&#8217;s a bit like SodaStream &#8211; and probably more successfully, Lego &#8211; in that
they were once a household item, dropped below the radar, and then resurfaced
when those that used to love them turned into those that could purchase them
for their kids. Heck, there&#8217;s even a
<a href="http://www.eventbrite.com/org/2308520311">Raspberry Jam</a> running
just down the road from me in Milton Keynes every now and again.</p>

<p>Ah, nostalgia. I remember it well.</p>

<h2>Inside Lanyard&#8217;s Architecture with Andrew Godwin</h2>

<p>The next talk I went to was one on Lanyard&#8217;s architecture by Andrew Godwin
(<a href="http://twitter.com/andrewgodwin">@andrewgodwin</a>). The
<a href="http://qconlondon.com/dl/qcon-london-2013/slides/AndrewGodwin_InsideLanyrdsArchitecture.pdf">slides</a>
for this are also available.</p>

<p>They have a highly available architecture which allows them to evolve the
site, and have the ability to put the site into read-only mode with cached
content should the back ends suffer from any issues (or upgrades). They deploy
content continuously (several times a day) and roll out new features with
feature switches that allow some parts of the stack to be switched on or off
depending on the user or group that they are associated with. This doesn&#8217;t do
A/B testing in the strict sense, but does mean that the beta users get to
see the new features before the wider audience against production data, so
that they can get a feel for what works and what doesn&#8217;t work before it goes
live.</p>

<h2>Visualising Information with HTML5 by Dio Synodinos</h2>

<p>One of my fellow InfoQ editors, Dio Synodinos
(<a href="http://twitter.com/synodinos">@synodinos</a>)
gave a talk on visualising data with HTML5
(<a href="http://qconlondon.com/dl/qcon-london-2013/slides/DioSynodinos_VisualizingInformationWithHTML5.pdf">slides</a>).</p>

<p>He covered using techniques like CSS3 transitions and 3D transformations,
as well as Canvas and WebGL drawing. There were also some cool demos, such
as <a href="http://graphicpeel.com/cssiosicons">http://graphicpeel.com/cssiosicons</a>
which shows a screenshot that looks very much like the iOS home screen, but
with icons that are entirely CSS based. There were also some Canvas demos,
such as <a href="http://browserquest.mozilla.org">BrowserQuest</a>, a
graphical adventure rendered in a Canvas.</p>

<p>There were also some other JavaScript libraries mentioned, such as
<a href="http://raphaeljs.com">Rapha&euml;l</a>,
<a href="http://processingjs.org>Processing.js</a>,
<a href="http://d3js.org">D3.js</a> (again), and
<a href="http://fabricjs.com">Fabric.js</a> (providing Canvas with fallback to SVG).</p>

<p>If you&#8217;ve not looked into some of the above, have a look at the examples
and what&#8217;s possible &#8211; the world of visualisations has moved on a lot in
the past few years.</p>

<h2>Knockout JS with Steven Sanderson</h2>

<p>Steven Sanderson (<a href="http://twitter.com/stevensanderson">@stevensanderson</a>)
from Microsoft showed a demo of using
<a href="http://knockoutjs.com">Knockout JS</a>
to wire up UI models with underlyin events, so that an object model could be
used in the browser to render content whilst at the same time reacting to
changes in the model. I&#8217;ve seen this approach before in other libraries like
Objective-J and <a href="http://sproutcore.com">SproutCore</a> (which seems
to have passed on, much like iCloud has). The difference with Knockout.JS
seemed to be that it was a much more natural fit for JavaScript, without
having to go into many details as to the underlying framework.</p>

<p>The second part of the demo was how to wire up Microsoft Azure services
so that they could drive the JavaScript app, by exposing a NoSQL type DB
with REST CRUD operations directly from the JavaScript app itself. The fact
that all this existed within a ready-to-go Azure console was a pretty slick
part of the demo (and subliminal advertising) &#8211; but Steven also had a demo
in the Apple app store using PhoneGap as a web view for the same JavaScript
app that he had developed (or at least, a previously created version of
the same).</p>

<p>Both Knockout.JS and Azure are definitely worth a look, if you&#8217;ve never
heard either of them before. The
<a href="http://qconlondon.com/dl/qcon-london-2013/slides/StevenSanderson_RichHTMLJSApplicationsWithKnockoutJsAndNoServer.pdf">slides</a>
are available, though given that most of the talk was an interactive demo
they don&#8217;t buy you much.</p>

<h2>Summary</h2>

<p>That was it for QCon this year. There&#8217;s a lot of the slides available
at the conference schedule for
<a href="http://qconlondon.com/london-2013/schedule/wednesday.jsp">Wednesday</a>,
<a href="http://qconlondon.com/london-2013/schedule/thursday.jsp">Thursday</a>,
and
<a href="http://qconlondon.com/london-2013/schedule/friday.jsp">Friday</a>,
so head over there if you want to find out about what other sessions were going
on. A few were recommended to me afterwrds, such as Simon Peter Jones&#8217; talk
on <a href="http://qconlondon.com/dl/qcon-london-2013/slides/SimonPeytonJones_HowToRescueOurKidsFixingTheICTCrisisAtSchool.pdf">fixing the ICT crisis at school</a>
but the slides (and if you&#8217;re logged in to InfoQ and attended QCon, videos too)
are available from the schedule pages.</p>

<p>New this year was the immediate availability of the videos on the same day
as the conference. Prior years have drip-fed them out from the conference
via InfoQ over the next six months, but this time raw video footage was
available as early as the same evening. This was great for the conference
goers who missed out an opportunity to see something (and would otherwise
have forgotten had it not been immediately available). Once they&#8217;re edited
with the slides in situ, they&#8217;ll be made available on InfoQ as well. The
immediate access videos were only available to paying conference guests, though
there was some interest in making a separate video pack available to purchase &#8211;
if you have any thoughts on that, contact Floyd or I can pass messages on to
him.</p>

<p>The open spaces were also a new idea for this year. I&#8217;m not sure that they
worked on the whole; the user groups of prior years seemed to have higher
footfall. It also seemed odd to me to finish the conference on an open space;
it meant that many just left early on Friday and so the conference gradually
slowed to a halt instead of a closing keynote.</p>

<p>What is clear is that it&#8217;s QCon&#8217;s biggest year ever. We expanded to more
floors than before and had a higher footfall than any previous year I recall.
And one of the things that makes QCon great is the diversity of talks with
a wide range of industries (and government!) represented. Which other
conference can you go from a robotic Pi to a massively distributed architecture
talk and meet some of Computer Science&#8217;s greats into the bargain?</p>

<p>See you next year.</p>
]]></content>
  </entry>
  
</feed>
