Posted: July 1st, 2010 | Author: Greg Gigon | Filed under: development, stuff | Tags: .net, java, languages | 2 Comments »
… at IKEA.
Recently I changed the job. After three years (longest I ever worked for a single company) I left ThoughtWorks. Majority of my consultant career oscillated in .NET space. It was almost three years since last I was doing Java. New job … is Java (packed full of Java technologies).
I had to do some IKEA shopping one late afternoon after work (something for the house). As my journey turned out to be a waste of time (items out of stock) I was sitting in front of the IKEA building consuming a horrible £1.40 Hot Dog Menu 2. Watching the sun set I had a little epiphany! I started new job, I got dropped into source code and I was able to work without relearning Java, libraries and tools.
Then I realised that through three years of work at TW, C# and .NET changed it’s shape a lot. In a mean time Java did nothing,well … almost nothing. C# introduced new language syntax, features, influenced by dynamic and functional languages. Java had got annotations and generics (somehow weird generics).
Is that a bed thing? It gives stable platform, and more consistent syntax in legacy code. On the other hand it lacks cool features, and I do have to admit, I like new features. It’s like every time when Apple releases new iPhone instead of all cool new things on it all you get is better performance and stability
There is also the explosion of languages that run on JVM. I like Groovy and JRuby, I need to check out Clojure and Scala.
There was a lot of fear when Oracle purchased Sun. Next new release of Java will have closures. If it is caused by Oracle’s influence I hope for more to come.
It is about time for Java to make some tuff decisions and stop being 100% backwards compatible.
What you think? Comment me your thoughts.
Cheers, Greg
Posted: June 9th, 2010 | Author: Greg Gigon | Filed under: development, stuff | Tags: agile, improvement, lean, process | No Comments »
Today I would like to write a few words about the recurring theme I observed at work. I call it a “Stiff AGILE backbone”.
With some of the practices and processes, learned over time, we tend to stop thinking and ask questions if they are appropriate in the situation and if they work. Our agile backbone is kind of a stiff and we are keeping the same position all the time.
It is important to REMEMBER that we need to keep an open eye into what we are doing, what are others doing, identify things that we could do better and execute the improvement.
It doesn’t make sense to keep the same posture only because it worked few times before and it will work again. Every project is different and every project should evolve into “perfection”.
“No change is bad” Toyota President Katsuaki Watanabe
Cheers, Greg
Posted: May 26th, 2010 | Author: Greg Gigon | Filed under: development, stuff | Tags: dev, management, performance, pomodoro, time | No Comments »
Two terms in the title that needs clarification. Pomodoro is a technique for managing a task completion, or simply time. Yak shaving is a situation that everyone finds himself every now and than when we are trying to solve a problem in a wrong way. Usually it happens when we create a chain of tasks that will lead to a solution and we keep on repeating it until we get somewhere. Eventually we could end up with a very crazy solution after a long period of time.
Yak shaving
An example of Yak shaving I found myself in not too long ago.
I found myself doing a Ruby on Rails development on a Mac box. As I used older version of MacOS I had an older version of Ruby compiler. To use latest version of Rails I had to get newer version of Ruby. To get that I needed to install that via Mac Ports or something similar. While trying to install Mac Ports I found myself missing some of the development files that stopped Mac Ports from installation. It turned out that those files where in XCode. I had to find XCode that is going to work on my machine. Turned out that older version is available on Apple Dev website, all I need is to sign-in. I had an account, but forgot the password. Then I tried to retrieve a password and that didn’t work. After some battles I finally got a XCode on my box. It was still Mac Ports impossible to install Mac Ports thought. That took me along time. Eventually I ended up installing VM image of Ubuntu and developing on Linux VM.
I think that being developer, the Yak Shaving problem is very irritating and could lead into a lot of wasted hours. When working in a pair, the Yak issue will not appear that often. There is always a second pair of eyes to validate the sanity of the task in progress. It doesn’t eliminate the Yak entirely as I found out with some peers
When working alone that is entirely different story. Because there is no one to run you ideas by, sometime I make a decisions that lead me into “the shaving“. I found myself wasting hours before realizing that it doesn’t make sense and taking step back.
Pomodoro, mmm, delicious
Not to long ago on a project I was working on, we used Pomodoro to keep us focus for a period of time. This simple technique combines 25 minutes of un-distractable time of work and a 5 minutes break. After 4 successful Pomodoros (25 minutes + 5 minutes break) we had a little longer break. While working in a pairs, Pomodoro was keeping us focus and safe from emails, phone calls and coffee breaks. The 5 minutes break gave us a lot of time to discuss the issues around the task/problem.
When working alone the 5 minutes break could be the excellent opportunity to talk with someone else about the problem or just take a step back and reflect on a solution. This eventually could lead into new ideas and most importantly into STOP shaving a Yak.
There is more to Pomodoro technique than just a sanity check from a yak shaving. There is a free PDF book that can be downloaded for free http://www.pomodorotechnique.com/resources/cirillo/ThePomodoroTechnique_v1-3.pdf and some other resources on the Pomodoro Technique web site.
Cheers, Gregster
Posted: April 25th, 2010 | Author: Greg Gigon | Filed under: oliwia, photo, stuff | Tags: family, holidays, photos | No Comments »
Some pictures from the Easter break in Poland
Cheers, Greg and the Family.
Posted: March 23rd, 2010 | Author: Greg Gigon | Filed under: development, stuff | Tags: .net, c#, code, development, integration, patterns, practices, simulators | No Comments »
This is probably two topics that I would like to combine into one, as they are related in the context I will be writing about.
In one of the previous articles I wrote about the story wall that we evolved on our project. Christian in his article, described the way we worked not in pairs but in threesomes. Two developers and a QA. This was the way that involved iterative, small-steps, story delivery with constant showcasing to QA. QA was able to instantly check the correctness of a functionality, business logic, even a site layout and provide feedback to devs about it.
As any application (at least majority of them) our application has multiple points of integration to other systems. Database, web services, file system etc. One of the integration points was delivered some time ago and never tested, we were ready for a problems and bugs.
It would be very unwise to stop development because the part of the system needs fixing or some rework carried. We decided that we will shield our selfs with the layer of wrappers around third party systems , that we called Anti Corruption Layer.
The Layer gives as a constant API controlled by ourselves but it doesn’t mean that we can continue our way of working and constantly showcase all the acceptance criteria to our QAs and BAs.
We decided to bring on simulators on a board and hooking them into our anti corruption layer. This is how we achieved it:
Control
It would be very painful to switch simulator on or off using configuration in one of the file. Knowledge about the environment was not sufficient enough as we don’t want simulators to be on or off all the time. What we decided was to create a class called SimulatorDecider that will use two variables to determine if the Simulator should be on or off: current environment and a browser cookie.
The environment variable allowed us to switch simulators off regardless of the cookie, in any environment other than DEV or TEST.
Cookie in web browser is very simple to set and to remove. We created a little page called Cookie Monster that has a simple on/off buttons for setting and removing the Simulator cookie.
The approach gives a possibility to control and switch on/off different parts of the system by using different cookies for each parts.
Simulator
We have a bunch of wrappers around the integration points. The one that we are interested in, the one that we would like to simulate, we decorate with Configurable object and inject SimulatorDecider into it. This is how it works:
interface IFoo
{
ReturnType DoStuff(ParameterType type);
}
public class Foo : IFoo
{
public ReturnType DoStuff(ParameterType type)
{
// Doing some real stuff that is very important
}
}
public class SimulatedFoo : IFoo
{
public ReturnType DoStuff(ParameterType type)
{
// Doing some other stuff that is only SIMULATED
}
}
public class ConfigurableFoo : IFoo
{
private SimulatorDecider _simulatorDecider;
public SimulatedFoo(SimulatorDecider simulatorDecider, IFoo realFoo, IFoo simulatedFoo)
{
_simulatorDecider = simulatorDecider;
}
public ReturnType DoStuff(ParameterType type)
{
if (_simulatorDecider.ShouldSimulate())
{
return _simulatedFoo.DoStuff(type);
}
return _realFoo.DoStuff(type);
}
}
Because we are using dependency injection container (Yadic) we don’t need to worry about dependencies.
It is also possible to not code SimulatedFoo as separate type and just inline simulated behavior within the configurable type. We made this decision on a base of how complex the simulated behavior should be.
Hope you find this useful when you stuck on integration pice that you don’t know how to carry on 
Comments are welcome as always
Greg
Posted: March 18th, 2010 | Author: Greg Gigon | Filed under: development, stuff | Tags: .net, c#, java, null, objects, patterns | 8 Comments »
This week I’ve been refactoring and improving some code in a .Net world. In last few weeks I also had some close encounters with Java as well. When looking at the code in both environments I realized that there is a lot of checking for null values on in a code. Where it is not a bad practice to check for null it actually presents another problem.
For someone like me when I was new to a code I couldn’t guess, what is the goal of that check. When you dealing with null the very important thing is to know where they came from and why it happened that null values occurred. When dealing with integration points it is even more important.
As you can guess code:
if (serverResponse == null)
{
DoSomeStuff();
}
is not very descriptive. What actually happend when I got null, does it mean that there was a communication problem, error occurred or perhaps a null means that the operation was successful.
I think the best approach will be to avoid nulls if it is possible at all. Ways we could try to avoid it:
• use Maybe pattern
• create Empty object values
• use Null Object pattern
Maybe pattern
I’m not sure if that is it’s appropriate name but I’ve used it on few projects and it seems like people are referring to it this way.
Have a Maybe interface and return it instead of the object itself.
interface Maybe<T>
{
bool Hasvalue;
T Value;
}
Also have two implementation of the interface:
public class Something<T>
{
private readonly T _value;
public Something(T value)
{
_value = value;
}
bool HasValue { get { return true; } }
T Value { get { return value; } }
}
public class Nothing<T>
{
bool HasValue { get { return false; } }
T Value { get { throw new InvalidOperationException(); } }
}
When returning value from an object return Maybe. Collaborator that consumes value can check if it is Something or Nothing or just ask if it has value.
Empty Object value
Just like string.Empty you can implement Empty or something similar as predefined value on your type. For example:
class Hen
{
Egg LayEgg()
{
// doing stuff
return Egg.Empty;
}
}
class Egg
{
public static Egg Empty = new Egg(“nothing in it”);
}
You can always check before the execution if the egg is empty.
Null object pattern
Object with no default behavior. For example:
interface TV
{
void ShowMovie();
}
class LCD : TV
{
void ShowMovie()
{
// showing movie
}
}
class Plasma : TV
{
void ShowMovie()
{
// showing movie
}
}
class NullTV : TV
{
void ShowMovie()
{
// do nothing
}
}
If something is not working well and we don’t have any of the TVs available we could return NullTV and nothing will happen.
Using the patter we can validate by type if the returned TV is a valid object and act accordingly.
I’m interested what other approaches people are heaving. Also what are the approaches in dynamic languages like Python or Ruby.
Please add your comment
Greg
Posted: March 17th, 2010 | Author: Greg Gigon | Filed under: development, stuff | Tags: conference, qcon, software development | No Comments »
I got the opportunity to attend some of the sessions on Thursday QCon London 2010 conference.
Quite a large number of interesting tracks. It was really hard to choose which one to go to. I decide to throw in a mix of everything.
Kicked of with Christopher Reed, a colleague of mine, and his talk on different Cloud solutions out there, and also what are they good for. Chris was emphasizing the trend in the industry. A lot of companies deciding to go into cloud as if could could be a solution to all their IT problems. Chris was pointing out that it is important to make a proper decision what solution to go with as they are solving different problems and require different treat and behavior from the organization. It is impossible to get the most of the cloud and actually not get into more trouble if you don’t accommodate the fact that you are in different environment now. I liked how Chris was dividing cloud solutions into areas based on Processing Speed needed and Data Sensitivity where Processing Speed means how fast you wont your computation to be done and how complex they. Data Sensitivity meant the amount and data importance, for example crucial amount of financial transactions versus widely available weather information served by a web site.
Second talk I was at was from another colleague of mine that actually I never had the opportunity to hear speaking live, Rebecca Parson. Rebecca was talking about the ways that people not skilled in the domain can come out with some really great solutions. She encouraged diversity and cooperation in a teams that could lead to better solutions to any kind of problems.
After Rebecca’s session and a lunch break I went into a presentation by my former colleague, Dan North. I find Dan one of the best entertaining technical speakers there. His fascination about the ways the human brain learns makes his talks always very informative and fun.
Dan was talking about the way human brain tends to see patterns, generalize and then complexify solution as a result. Very often there is no common functionality and there is no emerging patter.
I liked one of the quotes he used in his presentation:
Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems.”
–Jamie Zawinski, 1997
Fishbowl discussion was last session. The topic was about the Future of Software development. It appears that there is emerging trend in the industry to follow the simplicity and go back to a roots of software development. Simple design and good algorithms over frameworks and bloated architecture. This trend appears to follow hardware development and new presence of mobile devices on a market.
Overall very interesting day. Pity I couldn’t make to all the sessions as they were all interesting
Hope my colleagues who were at different presentations could share their views and notes if possible.
Greg
Posted: March 10th, 2010 | Author: Greg Gigon | Filed under: development, stuff | Tags: development, environment, linux, mac, windows | 1 Comment »
Not to long ago I posted an article on my favorite environment for software development. There was also a survey in that post asking about your favorite environment. The results are below.

Clearly, Linux is a winner. Here are some comments you guys added to a survey.
Can’t believe people are still using text editors to code… Visual studio rocks!
Well, not sure about this comment
Well, Ubuntu. For the package system, for the standard package archives and for the PPAs. And for everything else about it being good enough.
Windows 7, mainly because ive been using windows for, well ever. I find it really intuitive and i just know the tools really well. Windows 7 is really nice too.
Obviously I long for the day that will never come when I can develop my .net applications in intellij, deploy to a cut down windows vm for compilation and testing against iis… Anyway dreaming aside I pick mac osx for reasons you said and also because I have one and nothing beats dev on a native machine…
Mac is quite reasonable. Windows just feels clunky.
I need to be able to navigate to files and find things quickly, let alone use apps. Windows explorer/cmd is crap. Linux and Mac OS both work quickly and the command-line is effective. Mac OS X, however, just requires less of my time to maintain it than Linux. All three work similar from within an app like Eclipse.
Could be interpreted as a fan oy phrase, but for dev there is no better option than Linux…
I prefer Max because when I develop I am not just programming. Sometimes I need to check some screencast and last time that I used Linux (last year) I was not able to check all of them. Also I need a good mail and contact manager, I tried Thunderbird and Evolution. But none of them where satisfying my need.
Also i use my computer to develop and for personal use (creating video, music viewing videos). Linux is poor on that side.
I still have to fall back to Windows when working with clients who insist on using Outlook for calendaring and those horrible built-in surveys. Some aspects of my MacBook are pleasant, but I detest the keyboard layout – no home/end/pgup/pgdown and, worst of all, no visible # key
We all got a favorite environment, but what is the actual one that you use every day at work? I’m using Visual Studio as there is no real aternative to .NET development. Fortunatelly ReSharper makes it usable
Thanks for your answers guys, Greg
Posted: March 4th, 2010 | Author: Greg Gigon | Filed under: development, stuff | Tags: development, linux, mac, windows | 3 Comments »
After a few months of using Mac as a playground and development machine I took a little step back to remind myself of all different environments/systems/platforms I was using in my short development carrier. I know what you think, that I will say Mac is the best. But it actually it isn’t. At least not for me. Why?
Linux
I used Linux in my early days of development. I was coding on practically knitted together pice of hardware with free operating system. I was using Mandrake and Suse, switching between them constantly . After few years I switched to Ubuntu. Using Linux as development platform was harsh and raw when I started. After few ups and downs I got to grips with it and it server well as platform for PHP, Java and Ruby development. With Ubuntu it was extremely easy to install new software and be up to date. I never managed to crash it (no blue screens of death).
There was one quite big issue with it though, lack of .Net development environment. I have to mention as well problems with file formats in the every day office life.
Windows
The only environment that I could develop on targeting Windows environment as runtime. With .Net and C# Windows became bearable and useful. I didn’t have problems with office documents compatibility anymore. It was possible to set it up with Unix like command line tools and possible to script and automate a lot of build/setup tasks. There was one very big flow in the setup. After few days of usage, somehow Windows manage always to crap itself with plenty of junk and gets very slow. The most common solution for that problem was … reinstall.
Mac
Very shiny and friendly. I love the 4 fingers swam and expose. It has Unix/Linux command line out of the box so I don’t have to install anything for that. Comes with a bunch of tools for development. Unfortunately most of them are for Mac development.
Once you would like to get a latest version of Java, Ruby or Python, it is impossible to simply change or upgrade the version as parts of the system (some OSX applications) depends on specific version. So … I was in a hassle to build it up for what I wanted it to be. Now when it’s ready, it rocks. It would be very cool if some of the task that needs to be done in order to make it work I had to google and spent some time on it.
So … for me the best platform is …. LINUX, TADAAA. Simple and to the point on installing different environments. Huge community with plenty of tips, easy to find. With OpenOffice.org and Google Docs pain of documents incompatibility disappears.
I guess for me the winner is the one that gets me up and running in no time and is very easy and Agile when I want/need the change.
What’s your favorite Platform? What do you like and what dislike. Please take a moment to answer this short survey or just post a comment
I will post the results and survey findings in next few weeks.
Survey closed
Greg
Posted: March 3rd, 2010 | Author: Greg Gigon | Filed under: oliwia, photo | Tags: joanna, oliwia, photos | No Comments »
Hey guys. These were made few days ago on a trip to Londo, Milton Keynes and some of them were made at home.
Greg and the family