Team coach and full stack developer.
Team coach and full stack developer.
After several years of running our blog on Pebble we’ve made the move to WordPress, and it’s pretty exciting! But how did we get here? It turns out that migrating a blog from an unsupported platform is not very difficult, all you need is a bit of programming know-how and in a couple of hours you’ll be migrated!
Pebble stores all of its data in XML files on the server, WordPress data can be imported from WordPress eXtended RSS format. XML to XML pretty straightforward, you just need to pick a language! I figured I would try out Groovy since it seemed to offer some nice api’s for processing and producing XML.
read more »
You may remember Mats Henricson’s blog entry about what we know at Crisp. Well now we’ve put that same tag cloud (with some minor changes) on a mug!
I’m sure you’ll be seeing these mugs in the hands of a Crisper near you in the coming weeks, but here’s a sneak peek:
I’ll just start out by saying that I’m no Jira expert, in fact I don’t even have Jira admin privileges at my current project. I do however use Jira at least once a day. I manage versions, and create components. I also create stories and epics, and try to maintain sprint and product backlogs in Jira. My project also uses Greenhopper.
My problem today? Greenhopper stopped ranking my stories! Or rather started randomly ranking my stories! In the Greenhopper planning board view, every time I edited a story or epic and saved my changes, my backlog would get re-ordered. It didn’t take long before my whole backlog was scrambled, the more I tried to fix the ordering the worse it got.
If this happens to you, do not try to fix the ordering! Stop making changes, and… “Optimize(repair)” your ranking field!? Yeah, that’s right, you need to fix the ranking field every once in a while. You’ll find this “great” feature under Tools -> Configuration, under General find the Ranking Field section. Here you’ll find the Optimize(repair)link, just click and wait… and wait… and wait… and then your ranking problems will be solved.
Unfortunately, you’ll still have to come into the office tomorrow and somehow get your product backlog back in the right order, because it’s still scrambled.
No solution is perfect, but sometimes it feels like Greenhopper is a just way too far from perfect.
nb the version of Jira we’re using is v4.0.2#472 and Greenhopper v4.3
I recently ran up against a large XML file and legacy code that manipulated it.. the code had mysteriously stopped working, there were no unit tests and the XML file was large and had no line breaks. What do you do in this situation?
Loading the 30MB file in any kind of editor made the editor slow. Trying to format the file left the editors unresponsive. There’s no point in doing a grep find on a one line XML file, and while writing a cleanup script to add line breaks makes life better, why reinvent the wheel? Googling yielded several windows programs at first, but digging further, and using social networking finally produced two fantastic products for unix/linux based OS!
The first and easiest tool to use turns out to be xmllint! It’s most likely available with your unix/linux distribution just type it at the command prompt. Running xmllint –format my_file.xml > my_file_formated.xml will add line breaks where they make sense in your XML file. Now you can easily perform a grep find, you’re halfway there!
This perl program was the icing on the cake! You can download it here: http://search.cpan.org/dist/XML-Twig/ and then all you need to do is install it using the provided Makefile and you’re up and running. How did this help? Well among the hundreds of options provided with XML-Twig there’s a tool called xml_split. Just type xml_split my_file.xml and it will split your large unreadable file into manageable smaller ones. You can find more information about the usage here: http://search.cpan.org/dist/XML-Twig/tools/xml_split/xml_split
With just these two tools it’s easy to write unit tests against smaller sections of the XML file. It’s also easy to find the problematic sections in the XML file and easier to make changes and to test the fix!
What tools do you use?
Once upon a time all we had was java.util.Date and it was not good… then Sun introduced java.util.Calendar, and it got worse! How often do you sit at your keyboard and wonder how you can avoid writing date manipulation code just because you hate to look at the resulting mess? Maybe your project uses service or utility classes to hide the ugliness, but you know it’s still there. Well, stop hiding, there’s something better: Joda-Time!
If you’ve read Michael Feathers’ book, Working Effectively with Legacy Code, you’ll know that he presents his techniques for refactoring clearly and simply. My favorite is his metaphor of finding the “seams” in the code to break it apart then “sew” it back together again. If you’ve attempted to implement some of these techniques in your own project you’ll also know that it’s not easy. It is slow arduous work, and when there are no unit tests it can be scary.
Crisp hosted Michael Feathers’ course:”TDD and Refactoring Techniques” this week in Stockholm. I hoped that some secret knowledge of how to refactor easily would be revealed, something that was just too elusive to express in a book. Instead my experience that refactoring is difficult was reaffirmed.