The intersection of technology and leadership

Category: Development (Page 10 of 18)

Maven. What’s it good for?

Just like a certain number of speakers, Maven seems to divide developers into two camps:

  1. Those who like it; and
  2. Those who loathe it

I try to be objective as much as possible about tools, so let’s explore what Maven is and what it’s good for.

What’s Maven all about?
Maven has two major responsibilities (with a handful of minor ones). These two are:

  1. Library dependency management – Anyone who’s worked on a java project will know the large number of libraries you might end up with. Part of this is the JDKs inability to solve some of the simplest programming problems (solved with Apache Commons, various logging frameworks, etc). Maven was one of the first successful attempts at fixing this, focusing on applications on what version of libraries they’d like with its dependencies automatically resolved.
  2. Build lifecycle tool – Maven provides a standard set of fixed build lifecyles with hooks for each step in the lifecycle should you need to extend it.

Why was Maven developed?
To better understand Maven’s design, let’s look at the context developers built it in. Maven sprung forth out of the growing complexities in the Java Apache community. New Apache projects started off almost all the time and there was no “standard” way of building, or creating them. More than that, many Apache projects built on the work of other projects and managing the versioning of libraries started to become an onerous task.

Each Apache project characteristically depended on several other projects although generated its own single distributable (i.e. jar, war, etc).

Maven helped simplify these by assuming a default project structure, a default build lifecycle common to all many Apache projects.

Where is Maven most useful?
If you’re on a project that is similar to a single Apache project (a single distributable with a single set of unit tests) then you’ve hit Maven’s sweet spot.

Where does Maven start to break?
Here are some of the situations I’ve faced where Maven is not the best tool for the job:

  • When one team is producing a number of artefacts, you find yourself needing to work around the Maven structure, often with resorting to “Pom Inheritence”. You have to do ugly things like maven installs before hand.
  • If you need to do anything more complex than the standard build, then you start to obfuscate the build process. Strange things like different processes running under different profiles (whether or not the build is running on a build server or not) can be very confusing for lots of people.
  • Maven adds more complexity to your development environment as you rely on either a public artefact server, or need to set up an internal one. Whilst this seems simple, it is yet another environmental factor that affects how you develop, and its external nature adds variability to projects that often cause false negative build failures.

What other situations would your recommend using Maven or not?

QCon London 2010 Day 3

The pace of the conference and the speakers drinks event on Thursday night meant that I missed the first session on the final day. It’s a shame since I think Joe Armstrong would have been good to listen to. I look forward to reading anyone’s report of that session in the blogosphere.

Track: The Concurrency Challenge – Session: Embracing Concurrency at Scale

I really appreciated this speaker for being very pragmatic and conscious about helping people think more explicitly about tradeoffs. He encouraged people to actively think about what solution is most appropriate considering there is always some trade off.

This session resonated another one of those ideas that we use “models” all the time and that models are inherently limited by simplifying things. As the speaker said, “There are many models in science, all of them wrong but some of them useful.” He used time as an example in that there are many ways of looking at it although we have a tendency to want to structure it linearly. “When you admit time is a difficult problem, you will have problems with multiple actors”.

He talked about the ideas that we like convenient mechanisms (such as distributed transactions) because they’re easy to grok and we’re comfortable with those ideas but because they have implicit state, you’re throwing away the value of distributed systems. He went on to talk about how we’re taught about the goodness of ACID properties (particularly around database-centric applications). The alternative he presents is BASE (Basic, Availability, Soft State, Eventual Consistency). There’s apparently a paper on this found here (ACM login required). He referenced Pat Helland’s alternative definition of the acronym, Associative, Commutative, Idempotent and Distributed.

Once again, he emphasises the importance of making the decision on alternatives an explicit one and there is a real tradeoff. This was yet another time someone talked about the CAP theorem that describes three different system properties but you can only guarantee two of them. It’s great as a reminder and highly recommend you read about it as a refresher.

He talks about the world being Eventually Consistent and that “We shouldn’t try to model a world more perfect than it actually is”. He gave a number of examples of using this in practice, and there are ways to make sure that you try to do this. One such example was a Shopping Cart situation where a service should tell the “stock to decrement by 1” instead of “reduce stock from 99 to 98”. I think this is just another example of good OO (tell, don’t ask).

Track: Solution – Session: Scenario Driven Development

Our own Ben Butler Cole ran this session that attracted a huge audience considering it was running in the Solution Track. Ben attempted to help people understand how to use Scenario based testing instead of alternatives such as exhaustive acceptance testing or story based acceptance testing as the regression suite.

I think the audience were largely sceptical but Ben’s views align very similarly to the things I’ve seen on projects, particularly when doing development using stories. One of the misunderstandings about automated testing and stories is that everyone always views stories as additive. For me, you not only have stories that add functionality, you also have stories that change functionality (replace) and stories that also cause functionality to disappear. I tend to think the set of tests also goes hand in hand – if you’re deleting functionality, you should be deleting existing tests as well, or if you’re changing tests, you should be changing existing tests.

I think part of the problem is that stories are kind of fractal in nature and the scenarios that Ben talked about were like at an epic level (maybe even a use case level). What is interesting is how you go about enhancing, maintaining that scenario over time and how the team works around those scenarios – something we unfortunately only got a taster for in the hour.

I heard a lot of people still come away with lots of interesting insights and I would highly recommend everyone go and listen to Ben speak even if it’s just to hear him present. Totally worth it.

Track: The Concurrency Challenge – Session: Modelling Concurrency with Actors in Java – Lessons learned from Erjang

This session was fairly packed out, I guess given the hype of people working with or wanting to work with Erlang. This presenter’s take was interesting because in order to better understand concurrency and Erlang, this guy decided to implement an interpreter on top of the JVM (instead of simply playing around with the language).

The premise behind his talk was that Object Orientation as a paradigm brought with it plenty of productivity and that Actor-based modelling was going to be the thing to give us the next boost. Whilst I admire his premise, I don’t necessarily agree. I don’t think we’re all that good (as an industry) as implementing Object Orientation. I do think things like the JVM have helped raise the abstraction level so that we don’t need to think as much about the lower level memory management (although you have a memory leak in these languages if you’re not careful).

He spent a long time fascinating all the language geeks with his ability to run a simply Erlang program on top of his project, Erjang (Erlang on the JVM) but I really wanted to hear about the lessons learned from programming instead of the technical details of writing an interpreter on the JVM, something he spent a majority of the time on. I don’t think there were very many interesting bits other than designing parts of a system with different ideas. As he said, “Imagine treating parts of system as different actors with different responsibilities?” to which I was thinking, “That’s what good Object Orientation is about. Treating objects playing different roles with the right set of (small) responsibilities”. Nothing new unfortunately.

Track: How do you want to test that? – Session: Performance Testing at the Edge
This session brought a lot of mixed reactions. I agree that the start of it seemed a little bit commercial, talking about their product and the complexities of performance testing. I like discussing the importance of performance testing for applications because it’s one of those things that are often neglected and really not treated very well. This presenter eventually got around to talking about some of these aspects, but like many of the talks still ended up being fairly late in the talk.

I think that this speaker had a lot of great things to say and although much of it was very common sense, didn’t give people an impression about how they could go about doing it well. They had some interesting approaches to monitoring performance such as running it on the same set of dedicated hardware (that wasn’t even a replica of production). This has a trade off of being able to compare results over time which they had some interesting graphs, although it is at a cost of being a proper representative sample of what the software might actually run on.

I found that some of the good things he talked about were similar to the talk that Alistair and I had, although it still sounded like the performance testing team was a predominantly split responsibility that worked orthogonally to the actual development team. It also sounds like there was a big cultural barrier that they have been trying to break down by getting developers to write performance tests and have some more ownership.

The crowd also had a lot of scepticism about convincing a business to invest in the automation of performance testing.

QCon London 2010 Day 2

Keynote: Ralph Johnson on Living and working with aging software
The final keynote of the conference kicked off the second day of QCon and presented to us by Ralph Johnson of the Gang of Four fame and whose students contributed to Fowler’s timeless Refactoring book.

Ralph was asking about the number of people who work on systems they created (versus systems that other created) and then argued about the meaning of maintenance programmer arguing for software evolutionists instead. Whilst I agree that no one likes to be labelled a maintenance programmer, changing the name doesn’t really matter.

I like the different perspectives that Ralph brought. He talked about Software Capital as about truly understanding how the software works. Code is one example of this, but actually there are many other things that go into understanding how the software works. He argues that the right sort of documentation (and other artefacts) that helps understand how the software works is another part of Software Capital. As a result, you also need the people around the software to help keep the story alive.

My observations of various organisations also backs up some of the things that he says such as, the larger a system gets, the more likely you need some form of documentation and social structure around the software.

I think a lot of people didn’t like Ralph’s keynote because he talked about refactoring as if it was a new idea and, unfortunately this audience is one that has been exposed to these ideas for a long time.

Track: Beyond Tools and Technologies
I spent the rest of my time on the track that I was speaking at later that day. The first talk of the day was Martin Fowler whose talk, “What are we programming for?” brought the tiny room to a stand still. The room was so full (although it was a small room) that they had to turn people away.

WhatAreWeProgrammingFor

Martin used the talk to highlight the importance of going beyond acting like hired guns and actually thinking about how to use the skills for something good. He asked people to consider the essence of the firms that they work for and whether or not they are benefiting humanity.

Rebecca Parsons, ThoughtWorks’ CTO then talked about the importance of team diversity in her talk, “How to avoid ‘We never even thought of that’!” She talked about the role that diversity played in creating innovations in science and how too much of the “sameness” creates problems with creating too many assumptions. I like the idea of a balancing tradeoffs of not enough diversity leading to problems in teams and too much diversity to the point that the team don’t share the same vocabulary.

After the lunch break, I ran my session, “Building the next generation of Technical Leaders“. I was very happy with the turnout and had some great feedback from the participants. It’s an issues I think is sorely neglected in our industry and has a huge impact on the team effectiveness.

The next session was run by our Director of Social Engagement (Jeff Wishnie) and Merrick Schaefer of Unicef discussing the importance that technology has on developing countries and the significant impact it can have on the lives. They talked about the Rapid FTR project that is being developed to help capture information about children who’ve been separated from their parents with hope of quickly reconnecting them, and at worst, giving them legal status by registering them with an agency such as Unicef.

The final session of the day rounded out with Mick Blowfield with a presentation titled, “IT in a Low Carbon Future“.

Whilst there were many other potentially interesting sessions, I was really happy to hear about the issues that go beyond just Tools and Technology.

QCon London 2010 Day 1

I’ve never been to a QCon before and being run by the same organisers of JAOO and the folks behind the ever popular InfoQ, I was looking forward to being both an attendant and presenter. Lasting three conference days and two tutorial days, this conference focuses mainly on being talked at – quite a different experience to the Agile 20xx and the XP 20xx conferences I normally run workshops/talks at. Being focused on the cutting edge and practical technologies side, I can really understand this because it’s hard to target people with the right level of experience.

Talking to most of the attendees, it also attracts a noticeably different side with the majority of people already in architect or senior developer roles with a relatively smaller proportion of people in other ancillary roles such as PMs, testers or BAs.

Feedback that works
I like the feedback note for the conference, asking people tweet, email or talk to people at the conference. I think some of the feedback mechanisms even worked as we saw a lack of caffeine/water during the breaks on the first day change for the other remaining days.

The Keynote
The first day’s keynote started with the evangelical Uncle Bob Martin. He’s a great speaker and channels a lot of opinion towards the crowd wandering back and forth on stage. I saw a version of this at the Agile 2009 conference. I’m glad he adjusted it somewhat more appropriately for this conference. He talked about some good principles that should be followed after a few bumpy technical glitches. He is all about the drama (which I guess is part and parcel of a keynote) such as showing us a video that scrolled through a single java class for something like two to three minutes backed up by a song from the movie from 2001 (thanks Ola!) that almost sounded like the flight of the bumblebee. The point of this showmanship was to demonstrate how we can sense bad code visually without even looking at the specifics. He went through a number of his mantras such as “The Boy Scout” rule, leaving things better than how you found them, or that functions should be no more than four or five lines long.

Whilst I don’t think I learned anything new, Uncle Bob Martin was entertaining and had good things to say, despite how preacher-like he comes across.

Track: Architecture’s You’ve Always Wondered About – Session: BWin – P5 a future proof poker platform
The rest of the day was split into six different tracks. I went to the first of these and was truly disappointed. The two presenters came from BWin, apparently one of the largest poker and gaming sites in Europe. They spent half an hour talking about their problems of performance (many of the -iliites) and where the history of their application came from. They even had to include a three minute video from their marketing folks. They finally flashed up a screenshot of their architecture diagram which I think everyone had come to hear about it. Unfortunately they moved onto the next screen very quickly and said that they couldn’t actually talk about their architecture. How disappointing! Indeed this might have been an “Architecture You’ve Always Wondered About”, and after this session was one to still, indeed, wonder about it.

They proceeded to pick a single example about two processes that concurrently wrote and read from the same database table and their architectural change simply transitioning it to a disk persistent queue and the reporting service reading from that queue and writing to its own database. Neither very profound, or a very interesting tidbit that failed to give the audience any more insight into any interesting part of how they architected their system.

I found it interesting they spent a long time (something like 250 man years) rewriting this version of their architecture so I asked the question about how they went about moving from their old to their new platform at which they pretty much described a big bang approach – neither iterative or incremental. Pretty disappointing.

My lesson learned from this: Regardless of how pretty your slides are, make sure your abstract matches what you’re going to actually talk about.

Track: Dev and Ops: A Single Team – Session: Devs and Ops Cooperation when the Worst Happens
My next session was much more fulfilling with Michale Nygard (author of Release It) describing some of the stories that were the basis for the book but wouldn’t have been publishable. Michael is really down to earth and happy to chat about many of the details behind the book. It’s really obvious that he is also a very pragmatic person, understanding that models are just that and recommending people look into the details because there is often something much more complex underneath.

Many of the things that Michael talked about also resonated very strongly with ideas that I’ve seen on applications. Many of them included focusing on ensuring documentation artefacts should be tested by those who will consume them. As he put it, “UML is virtually useless to the deployment and operations team”. Other gems included, “From a high enough view, everything starts to look the same”

His stories also reinforced the importance of having a ubiquitous language will all members of the company in the shared domain. One of his most successful rescue missions dealing with a production problem only worked because the architect (on the dev side) and Michael (on the ops side) understood enough to really communicate the real problems. Michael also kept (understandably) hammering home the point of lack of information on both sides really hurts the problem solving process.

A lot of Michael’s stories also described their successes working around the existing (organisational) systems in order to deal with the problems at hand. To me, this was just another great example of organisations that structure themselves for efficiency over effectiveness.

I like the way that Michael finished off his talk as well, focusing on the fact that you’re not just trying to build software, that you need to care about the organisation (and I would also argue, the systems and procedures in that organisation) that support the software. Design them for effectiveness, not efficiency.

Architectures you’ve always wondered about: Facebook
The next session I attended was by Aditya Agarwal (one of the engineering directors of Facebook). He shared some great insights and lessons learned into what things Facebook did that got them to where they were. Admittedly they had some strange choices like writing something that converted PHP into compiled C++ and using MySQL is a very “reliable bitstore”.

They have a lot of great things to say, like being very proud of the low number of engineers ratio to actual users. Like Alistair, I’m puzzled why they’re secretive of the exact number of their employees.

Aditya has some good things to say and although he means well, I don’t support everything that he says. it’s obvious a lot of what he says is based on a start up culture. Things like, “don’t worry about it until it becomes a problem” encourages the recklessness we see in many software companies. Same thing about the choice of programming language such as “every programming language will have problems at our scale”.

On the plus side, I was pleased to hear them encouraging the innovative engineering culture that I don’t see in many organisations.

Track: Non relational DBs and Web Oriented Data – Session: Social networks and the richness of data: getting it done with
After going through my notes the most interesting tidbit was about using a partitioning mechanism to deal with data updates based on the number of connections. There was plenty of buzzwords (both internal and external) that I think I had a hard time fitting it all together. Some things I’m going to look at include:

  • Bit versus bloom filters – Not familiar with this term or how to use it.
  • Tools – RESTeasy (I now see it’s a JBoss project). Redis and Voldemort – something they used heavily all over the place.

That’s about all I got out of this session though I’m not sure if it was about the lack of familiarity with the tools, or the excessive use of acronyms and unfamiliar terms or just plain tiredness.

Track: Functional Programming – Session: Demystifying Monads
Josh Graham did a great job stepping into fill in for his ill wife talking through some of the different ideas behind monads. I haven’t done functional programming since university and I’ll be the first to admit Monad’s are still a mystery to me but I came away with some key learnings.

Firstly, to understand monads properly, you really just have to see several examples in action. There’s a high barrier to entry because it means:

  1. Learning a new language
  2. Learning a new development environment
  3. Playing with plenty of examples

When I find some time, I’ll do those. In the meantime, I understand a bit more about the properties of a monad, and that they can be a powerful abstraction for functional languages.

Final keynote – Dan Ingalls: Forty Years of Fun with Computers
For being so late in the day, this was a very entertaining keynote. Just like any modern day small talk person, this entire demonstration took place in the Squeak development environment. Dan demonstrated some interesting and interactive elements.

I had a few key takeaways including:

  • We’re really bad at learning the lessons from the past. Partially because we don’t have enough storytellers and that our generation doesn’t listen very well.
  • I’m going to read this article at some point.

It had to happen

The split in the Scrum community with Ken Schwaber going independent of the Scrum Alliance sees Scrum.org announce the Professional Scrum Developer program.

An interesting development indeed. There’s also now a competing certification for the Professional Scrum Master instead of the Certified Scrum Master. I’m sure this is going to be confusing for everyone. (I wonder if that means Certified Scrum Masters are then implied as Unprofessional as a result?)

Shu Ha Ri as the flow of Energy

Andy wrote a great blog post trying to relate Shu Ha Ri to the Dreyfus Model of Skills Acquisition. When I posted my thoughts, he suggested I blog about my story, so here it is.

In it’s simplest form, Shu -> Ha -> Ri roughly translates to Follow -> Detach -> Transcend. When I think back to the days when I studied Aikido (where I believe these concepts originate), I considered Shu Ha Ri as the flow of energy, or where you focus the majority of your efforts.

Flow

Photo of energy taken from HocusFocusClick’s Flickr stream under the creative commons licence

A Shu person, for example, focuses their energy on simply executing a very basic move. They repeat the kata, over and over, with the weight of their conscious mostly on thinking, “I move my arm up to block”.

The Ha person, no longer follows the rote kata, “detaching” from the original conscious thought, now focused on its application. They spend their time thinking, “An arm is coming my way, I better block”.

The Ri person is certainly spectacular to witness with energy flowing from move to move, something the dojo sensei demonstrated during a yearly open house. During this event, lasting a good twenty minutes, five black belt students attacked the sensei from all sides. They attacked with their hands and a small assortment of weapons. The sensei defended by turning, locking and throwing each student back in return. What I still remember vividly was comparing the black belts, completely drenched to the skin in sweat, to the sensei, who barely showed any signs of sweat.

I see this same flow of energy and focus of effort when watching people learn development skills. At one end of the spectrum, the Shu developer spends an enormous effort thinking about how to execute a particular practice. At the other end of the spectrum, the right practices occur and great quality code (and tests) appear.

Using XCode like a real IntelliJ user

One of the biggest differentiators between the users who prefer IntelliJ over Eclipse is often their dedication to learning keyboard shortcuts. The user-conscious designers of IntelliJ make as much as they can consistent, something much more difficult for Eclipse, who is dependent on a community for plugin development without any process for reviewing how well they all fit together.

On my very first ThoughtWorks project, I remember my pair commenting about how I should learn all the keyboard shortcuts for IntelliJ. Learning keyboard shortcuts is less about churning out great amounts of code, and much more about avoiding interrupting your flow. Simple actions, such as reaching for mouse have potential to break your flow. Jetbrains make it easy to learn the keyboard shortcuts, even providing a printable cheat sheet so you can put them around your workspace as you learn them.

Having said all of this, here are some of the keyboard shortcuts I find myself using all the time for iPhone development:

  • Switch to Header/Source File– ALT + CMD + UpArrow
  • Open quickly – Shift + CMD + D. This is as close to Jump to Class/Method/Symbol that I could find so far. I haven’t worked out how to search using regular expressions yet.
  • Go back/forward – ALT + CMD + LeftArrow/RightArrow. Moves back between files that you opened. Useful for cycling through a call stack
  • Go(Run) – CMD + Enter. I’m currently using this to quickly see results as a spike my way through learning about Objective C and the APIs
  • Open Console – SHIFT + CMD + R. Useful when debugging using log statements and looking at what’s going on.

I’ve also found application-wide standard keyboard shortcuts really helpful as well

  • Cycle through different applications (XCode, Interface Builder) – CMD + TAB
  • Cycle through different windows in the same application – CMD + ` or CMD + ~. These are all really useful because Apple applications have a tendency to open many many windows, not really ideal for keyboard use.
  • Open help – SHIFT + CMD + ?. This is really useful when no keyboard shortcut is mapped, or you want to access a menu and can’t remember what it was. Once you have the Help dialogue open, start typing the name of the menu item. I’ve used this quite a lot to access the Refactor menu item which pops open another window.

Of course there are many more keyboard shortcuts. These are simply the ones that I’ve found I’m getting the most productivity. I wouldn’t say all of development can driven through the keyboard alone, but it’s a pretty good start for now. What are your favourite ones?

Starting iPhone development

Late last week, Andy Yates got me onto the whole Hello World application for the iPhone. Since then, I’ve been dabbling around a bit more trying to get my head around it. After having studied how people learn things using models such as Shu Ha Ri, the Dreyfus Model of Skills Acquisition, and Kolb’s learning cycle, it’s fascinating to try to understand how best to pick it up.

Here are some observations that I’ve made so far:

  • There are many different dimensions to learning how to write an iPhone application. First, there is the fact that it’s written in Objective C, so you’re learning about the syntax and intricacies of a new language. Secondly, you are learning new development tools including XCode and Interface Builder. Thirdly you are learning about the libraries, documentation, and understanding how things fit together.
  • I intentionally recognise myself as being at Shu level (in Shu Ha Ri) or a Novice (on the Dreyfus Model). This means that I want to have some quick wins, get stuff working and worry about how it all fits together in the next stage. I’ve found that repeating the same exercise (almost like a kata) has helped me understand how things relate to each other just that little bit more.
  • Writing a journal helps. I intend on blogging about some things that I’m discovering. It might help one person out but it will sure help me articulate clearly my understanding (or lack of understanding) about the topics that I’m finding. When I don’t blog, I’ve got a little text file with snippets on what things I’ve discovered and what things still puzzle me. It’s helping me organise the random things that I’ve got.
  • Interestingly, I’m less interested in following some of the practices I would if writing a production application. This means I’m not worrying too much about refactoring or testing until I get the basics down. I don’t want to confuse the concerns of exploration and learning with verifying the system works (which I can barely get going right now). When I am more confident in my knowledge, I’ll definitely spend more time thinking about these things.

Fixing Notepad++ 5.5 Langs.xml

LangsXml Failed to LoadI upgraded to the latest version of Notepad++ (5.5) and noticed that I sometimes get some problems with a dialogue box that pops up, looking like the picture the right stating (Load Langs.xml failed!)

Having a quick look at the installation directory, it looks like a langs.xml file exists yet it has a 0KB size. I’m not sure what causes it yet (perhaps it’s if you kill the process mid-way using Task Manager) but all I did was take a copy of langs.model.xml and rename the copy as langs.xml. Fixes it all up!

« Older posts Newer posts »

© 2024 patkua@work

Theme by Anders NorenUp ↑