Moving on to next project
Johan | 16 January, 2009 | 0 comments
This week has just rushed away. Been a lot of work but in the same time not, strange. It is quite nice to be back at the office after all the holiday celebration. This week we pre started the next project, officially it is not kicking off until next week. We will now move from investigation to implementation and I am really looking forward to this. I like these small pre starts of projects that we often have. It gives you time to reflect on previous documents and concerns that you might have.
Also got confirmed that I will attend Jfokus 2009 later this month. Since I am registered for the tutorials day I will also go to the tutorials about Domain Driven Design and RIA with JavaFX. I really need to find a way to get a proper environment up and running for JavaFX in Linux since I have to bring my own computer. But I am still a bit curious about JavaFX so I will do my best.
Johan
Some Reflections on 2008
Johan | 9 January, 2009 | 0 comments
This time again, when to reflect on the past year. I will do this short and just say that it has been a great year at bwin. I have been involved in some really instructive and interesting projects. I had the privilege to attend OOPSLA which was amazing. I have done a lot of Java development which has been great fun. Chris Heilmann visited bwin and held some very inspiring presentations. Our group had a private UML course. I got a new computer and realized that vim does not fit very well as my only editor, so I go back to Eclipse. The whole group went skiing in Sälen. This was really fun even if I did not managed to stay on that snow board very long.
I am looking forward to 2009 and hope that it will be just as good as 2009 has been for me.
/ Johan
Merry Christmas
Johan | 19 December, 2008 | 0 comments
I have been testing out Guice and Warp Persist this week. And I must say that I am very impressed by both these libraries. I especially like the dynamic finders that comes with warp persist that eliminates a lot of boilerplate code. All you need to to do is to set up your interfaces with correct annotations. Then add them to your persistence service. You are then ready to inject these interfaces wherever you want with no extra need to create an implementation. To get up and running with this check out some of the warp persist examples.
We also had a great Christmas party Monday evening hosted by bwin. As usual, we did not know where the buses would take us but they stopped at Södra Teatern which was a perfect place for the party. It was a great evening and the company band totally rocked. So thanks Kamil and the others that organized this evening.
I also must mention that two of my colleagues Joakim Bodin and Conny Dahlgren have just released a tool for tracking database changes as open source named Brazil. Brazil is used internally by the database team at my department today and they are very pleased with it. There will probably be a longer presentation of Brazil here later on but for now Merry Christmas and enjoy.
Johan
Three presentations in a day
Johan | 12 December, 2008 | 0 comments
Last week Christian Heilmann visited us. He held three great and inspiring presentations. He started off with a talk about where the web is heading and how different services could be connected in a way that maybe was not intended from the beginning, and why we should open up our data. He also gave some examples of prototyping using greasemonkey. I had never really thought of Greasemonkey as a tool you could use for prototyping myself so that was really nice. I was also impressed that he could hold the entire presentation with out a single prepared slide. He actually used the web as his slides.
In the afternoon he held two presenations the first was about website performance. He covered topics such as CSS sprites, javascript lazy-loading and a lot more. He also showed us some useful services that is out there like spritegen and Smush it.
The last was about maintaining javascripts in a large team. He coved syndromes of how you could see if your code was maintainable or not. My favourite of them was "The Tale of the Missing Spanish Gentleman". He covered what to do before you hand over your script to someone else.
All the three presentations was great and I really loved his humour and how he presented his talks. He also inspired me to start using twitter which is a kinda strange service but also a nice way to communicate and to get updates on what is going on.
Johan
Week 49
Johan | 5 December, 2008 | 0 comments
Chris Heilmann, Web Architect/Standards Evangelist at Yahoo is visiting Geek Meet this week. But our department is going out for some food beer and billiard so I will not attend to this Geek Meet. But Chris Heilmann has been invited to bwin this Friday and will hold two talks one about "Website Performance" and one about "Maintaining JavaScript in a large team". I am really looking forward to listen to him and hopefully this will make me interested in javascripts again.
Last week was a bit stressful, it was the last week for the project I was working on. We are now only waiting for the final reports from QA. We also just need to do some extra documentation to some apis. But is feels really good that we actually managed to finish this project in time and that we can now move on and start concentrating on new projects.
Johan
Mockito and isNull
Johan | 21 November, 2008 | 1 comments
This week I had to write a test for a method and verify that one of the parameters where passed with null. Since I am using Mockito I thought that I could use the isNull matcher just like anyString() or most of the other matchers.
verify(myMock).myMethod(isNull());
But since my method looks something like below it could not compile because the isNull matcher was not of the type SomeObject.
public void myMethod(SomeObject someObject);
Instead I wrote my own Matcher and with help of generics I could also make it reusable.
verify(myMock).myMethod(argThat(new IsNullObjectMatcher()));
The matcher itself looks like this.
public class IsNullObjectMatcher extends ArgumentMatcher {
@Override
public boolean matches(Object argument) {
return (null == argument);
}
}
When I just had created this very intelligent and cool matcher I realized that I could just cast the original isNull matcher to a SomeObject that of course worked direct. So note to myself, forget everything above and instead just use.
verify(myMock).myMethod((SomeObject) isNull());
/Johan
Almost done
Johan | 14 November, 2008 | 0 comments
Almost done with the project I am working on. It has been a really interesting project even though we first had to stop working on it for some time. Since I have not done much Java development before it has been extra interesting to really get to know the frameworks that we have used.
This week we have been preparing for load testing. It seems like we are going to use JMeter that has been quite easy to set up for tesing of web services. But I had some problem analysing the output of the jtl files to get in a proper format for an Excell like program. I have tried some of the scripts posted at the JMeter wiki. But I ended up tweaking them a bit and wrapped them in my own bash scripts. If anyone have any tips or experience regarding this I would be happy to know.
/ Johan
OOPSLA Summary
Johan | 7 November, 2008 | 0 comments
First a short flight to Amsterdam and then a pretty long flight to Detroit. Me and Johan had an even longer wait or at least it felt like it for the next flight. Unfortunately it got delayed because someone was sick and we had to return to let that person off. So we arrived quite late in Nashville after 23 hours traveling.
Next day was a bit of a surprise when we bumped into three other people from bwin Games. We had no idea that they were going to OOPSLA too. We had a quick breakfast together and then headed over to the conference center picked up our materials and then it was time for the first tutorial.
The name of this tutorial was "Software "Best" Practices: "Agile" Deconstructed". Steven Fraser that held this one was a really good speaker and there was a lot of discussion in the room. But the majority of the attendees came from larger organizations and were more looking for a way to introduce agile methods in their organizations. So I felt kinda misplaced there. After lunch which was really good I went to another tutorial named "Building Service-Oriented Architectures with Web Services". This one was a bit too basic and was more an introduction to what SOAP is.
We got to know the other bwinners a bit better later when we had dinner together. Since we are working in different departments we had never really spoken to each other. Went to bed quite early still a bit jet-lagged.
Went up early the next day, Monday. First tutorial was "Advanced Software Architecture" where they went over some guidelines and practices all from real world examples. This was really good. In the afternoon I went to "Building Domain-Specific Languages for the Web". This was held by Eelco Visser. It was a really inspiring talk where he demonstrated a lot of really cool stuff that could be done with the WebDSL framework. You can read more about it on http://webdsl.org/. I also learned that you can pronounce dsl like diesel, kinda good to know.
In the evening we went to the welcome party, mingled and had some food and drinks. We met a Spanish guy who works for F-Secure in Finland and later we also met a C++ programmer from France. We met up with the other bwinners and headed downtown to some music bar where they of course played country music. They even have loudspeakers on the streets in Nashville that is playing country music when waiting to cross the street.
Tuesday, the next day, I went to the opening keynote that was held by an egyptologist. Kinda odd but it was nice and he made a lot of references to object orientation such as modularity and encapsulation in his talk. In the afternoon we went to the tutorial "SOA Architecture and Design Strategies" that was held by Boris Lublinsky, co author to the book Applied SOA that Johan later purchased from the book shop. Really god tutorial.
In the evening I took a bus together with the other bwinners to a shopping mall. We later had dinner at the restaurant Cheesecake Factory. Took a taxi back, the taxi driver was not really found of all the country music in Nashville so he made fun of it along the way back.
Next day, Wednesday, I went to a really good keynote speak about "What drives design" by Rebecca Wirfs-Brock. After that I met up with Johan and we went to the panel "DSL the good the bad the ugly". In the afternoon we went to "Building Memory-Efficient Java Applications" by Gary Sevitsky. He started this tutorial with a quiz where the first question was, "How many bytes in an 8-character String?" I was quite surprised by the answer 64. This was so far one of the best tutorials and he also had the best looking slides.
In the evening we went to the Special Event that was the main OOPSLA party, we met up with the guy from France, I was really tired and we went home quite early.
Thursday, the last day, started with "Fault Tolerant Software with Patterns", another great tutorial. One of the things he mentioned in the beginning was that we need to know what type of bugs we are dealing with and never never use the word bug. Instead he introduced us to think in Fault, Error and Failures. After lunch me and Johan went to "Intro to Google Guice & Testing with GuiceBerry" which was held by Bob Lee and Luiz-Otavio Zorzella. They said that they where bad speakers but they where not. Guice was really impressive and after working with all the xml juggling in spring it was really nice to see this approach to dependency injection. Later I did some tests with Guice and I will probably try to introduce it to our group here later on.
In the evening we had dinner together with two guys from Oracle who are working with JRockit, the other bwin folks and one from Boeing. It was a really nice end to OOPSLA.
Friday. Arrived early to the airport, lucky that because it was really bad weather and our flight to Dallas was delayed so we could be replaced on another flight. Once in Dallas we had about eight hours waiting. Then another eight hours on the plane back to Stockholm.
/ Johan
Some good some bad
Johan | 31 October, 2008 | 0 comments
Congratulations to Ubuntu Intrepid Ibex that was released yesterday. I have not yet upgraded but will probably do it next week but some of my colleagues has already upgraded and it both looks and works great. Seems to be some problems with envy but I guess that envy is not really needed anymore.
Last week the source code for Android was released. I had a quick look at the code for some of its applications today and the code looks really neat, quite surprised that things does not seems to be as complex as I had imagine.
And to some more sad news, apparently the PHP team has decided to use the common used escape char '\' as a namespace separator instead of the more conventional and previously suggested '::'. I found some interesting reading on this topic at Ninh.nl.
Johan
OOPSLA
Johan | 24 October, 2008 | 0 comments
OOPSLA has really been over my expectations. Today is the last day and this week has just rushed away. I kind of thought that there where going to be more people here, but there has only been 750 attendees. But this has instead made the sessions that I have been to more interesting since with fewer participant it is easier to get a discussion going. I will probably try to summaries OOPSLA in some future posts.
Johan
whodunnit
Johan | 17 October, 2008 | 0 comments
svn blame will as known output the content of a specified file with the author and revision in line with the source. I use this quite often to get a rough idea of who has done what if I have any question regarding the file.
Anyway for a little while ago me and my colleague Hans Nilsson hacked up a script that will calculate in percent how much each author has contributed to a specific file. It is using svn blame internally. It is quite fun to get this statistic in a fast way and sometimes it is even clearer who has done what too.
It is named whodunnit after the pinpall game and it is available here, nothing fancy just a hack just thought it could be fun to share it with anyone interested.
/ Johan
New Group
Johan | 10 October, 2008 | 0 comments
Until this week our department has been divided between projects and maintenance. The different project groups have been working with bigger changes or developing new applications. And the maintenance group has been solving incident and bugs but also minor changes. And then there has been a rotation between projects and maintenance.
But from this week we have split up the department in smaller groups divided on different knowledge areas. Each group will internally handle what we before called projects and maintenance. I think that we must gain on a split like this. Especially when you are going to work on the same applications both when it comes to implementing new features and when it comes to solving the bugs in it. Not that we have bugs but if we had. So I am really looking forward to start working in my new group and to really get to learn and be good on the applications that my group is going to work on.
I you are in Stockholm and interested in java do not miss the next java forum meeting, which is going to be held at our office next Thursday.
/ Johan
A new Continuous Integration Server
Johan | 3 October, 2008 | 0 comments
The highlight of this week was definitely the new continuous integration server. We have previously used both
CruiseControl and Hudson. But after an internal comparison between them and the commercial alternative Bamboo it was decided to choose Bamboo. So now we have Bamboo installed and configured.
I must say that my first impressions is really good, and I just love that I get notified by my im client as soon as someone in the team or my self breaks the build and the possibility to comment the build direct from my im client. There is a video at Bamboo's web page that is demonstrating this integration.
Clover is also installed, so I guess it is time to purchase the rest of Atlassian's products soon?
Johan
OOPSLA 2008
Johan | 26 September, 2008 | 0 comments
I got confirmed a little while ago that I can visit the OOPSLA conference this year. So I will be in Nashville between the 19 and 23 of October. I am really happy that I will be able to visit this conference and I am especially looking forward to the tutorials that I have already registered for. Even if it was quite hard to pick from the huge list of interesting topics.
This is the tutorials that I have registered for:
* Software "Best" Practices: "Agile" Deconstructed
* Building Service-Oriented Architectures with Web Services
* Advanced Software Architecture
* Building Domain-Specific Languages for the Web
* SOA Architecture and Design Strategies
* Building Memory-Efficient Java Applications
* Fault Tolerant Software with Patterns
* Intro to Google Guice & Testing with GuiceBerry
Johan
Unit Tests
Johan | 19 September, 2008 | 0 comments
A while ago I started to work on a new project. We have just finished our refactoring sprint and started to implement new use cases. When we now started to work on the project again we had a code coverage for our unit test of around 80%. I think that is pretty good and it has really helped us a lot now when we wanted to change some parts of the system. But it has also been a great help to understand some parts of the code and the interaction between some components.
This application is written in Java and we are using JUnit as a unit test framework. And as a mock framework we are using Mockito. Most Java developers are probably familiar with JUnit, but I am not that sure that so many have discovered Mockito yet, if not it is definitely worth a try and I can really recommend it.
I think that one of the reasons why we have been able to keep a good coverage is because it is pretty fun and intuitive to write tests with Mockito. It is quite different from other frameworks because it does not require you to set up expectations for your interaction first, you just have to verify what you are really interested in after the interaction similar to regular JUnit tests.
Some quick examples when testing interaction with a list object with PHPUnit, EasyMock and Mockito, Mockito vs EasyMock is taken from the Mockito documentation.
EasyMock (Java)
List mock = createNiceMock(List.class);
mock.clear();
mock.clear();
mock.clear();
expect(mock.add(anyObject())).andReturn(true).atLeastOnce();
someCodeThatInteractsWithMock();
replay(mock);
PHPUnit (php)
$mock = $this->getMock('List', array('clear', 'add'));
$mock->expects($this->times(3))
->method('clear'));
$mock->expects($this->atLeastOnce())
->method('add')
->toReturn(true)));
$classUnderTest->someCodeThatInteractsWithMock();
Mockito
List mock = mock(List.class);
someCodeThatInteractsWithMock();
verify(mock, times(3)).clear();
verify(mock, atLeastOnce()).add(anyObject());
Johan
UML Course
Johan | 12 September, 2008 | 0 comments
Thursday last week our whole group of around 30 people attended a UML course that was held by Init. It was a really good one, a lot of repetition but that was really needed. The afternoon part had a more practical focus and we were divided into small groups, each group was assigned a set of problems. After each problem was solved the whole group discussed the different solutions and diagrams together. This was a really good part of the course where we could all practice what we had learned during the morning. After the course we all got a copy of UML Distilled by my favorite author Martin Fowler, so now we do not have any excuses not to write UML diagrams.
Around our desks we have a lot of whiteboards, and I do hope that they are going to be used much more frequently now when we all have gotten a good UML repetition. I think that it is just in front of a whiteboard when we together are sketching and discussing solutions that we come up with some of the best ideas or at least discover things that are hard to find otherwise. But I also feel that everyone is getting much more involved in the project and the design decisions that are taken by discussing and sketching on a whiteboard.
When not writing UML on the whiteboards we are using MagicDraw as a UML program but I can not get it to work on my computer. Instead I am using Dia and I think it is good enough for my needs, and can recommend it to others.
Johan
A Fresh Start
Johan | 5 September, 2008 | 0 comments
This Monday I started working on a new project at work, well it is not really a new project it was actually started a couple of months ago but it was "withheld" in favor of other more prioritized projects. But now we are finally back working on it. But since it was quite some time ago we worked on it we have decided to have a couple of weeks to get to know the code and be able to do some refactoring, now when we might see it from another angle.
Since I am going to work on this new project I thought that I better give my computer a new start as well so I reinstalled my os. And while at it I also decided to mount my home directory to a separate hdd. Once this was done the reinstall was so much easier and faster, I can really recommend moving your home directory if you have not already done it.
Once reinstalled I remembered all the problems I had with my previous installations when setting up my dual monitors and all the hacking I had to do to my xorg.conf. But a colleague introduced me to envy. Once envy was installed envy helped me to uninstall and install the latest graphical drivers. With the latest driver package the ATI Catalyst program came that allowed me to enable BigDesktop, best of all I did not have to edit
xorg.conf a single time.
Johan
Hello World
Johan | 29 August, 2008 | 0 comments
My name is Johan Nilsson. I work in the department called B2C Games Development and have done that for about two years. My work is mainly focused on development and maintenance around the platforms and services that PokerRoom.com, EuroPoker.com and CasinoRoom.com are using.
This blog will focus on my daily work some about php and probably one and another post about me learning more linux.
For a couple of months ago I came across this oneline. I do not know what it says about me but probably something. So here you have my top ten commands.
johann@nowwhat:~$ history|awk '{a[$2]++ }
END{for(i in a){print a[i] " " i}}'|sort -rn|head
119 cd
100 ll
93 svn
36 vi
24 zdump
19 php
14 cat
10 mplayer
7 cp
6 sshjohann@nowwhat:~$ alias ll
alias ll='ls -l
Disclaimer
All data and information provided on this weblog is for informational purpose only. www.bwingames.se or any other company within the bwin group makes no representations as to accuracy, completeness, currentness, suitability, or validity of any information on this weblog and will not be liable for any errors, omissions, or delays in this information or any losses, injuries, or damages arising from its displays or use. All information is provided on as-is basis.
Blogs
Andreas works as a developer at bwin Games. Read about what's going on in the development department.
» View blog
Ann works as a QA tester at bwin Games. In her blog you can read about her work, testing in general, test methods etc.
» View blog
A blog about Fredrik's life at bwin Games.
» View blog
A blog about the role as management trainee at bwin very week. Robert will give an insight of his weekly tasks as well as current projects.
» View blog
Building a career in poker – read Jonas' blog about the role as Management Trainee at bwin Games.
» View blog
Blog Archives
Reik, a Berliner based in Stockholm, blogs about the everyday technical chit-chat in his role as Technical Lead for bwin Games
» View blog
Mattias is Lead Developer at bwin Games and on part-time paternity leave. Read about his work and life in our newest blog.
» View blog
What's it like to work at bwin Games? Our trainee Kamil tells you all about it.
» View blog
Johan works with the latest technology together with the best programmers in the industry.
» View blog







