Latest Posts Under: programming

Today I have begun an ‘Incubator week’. This means I have allocated a whole week to work on my game. One week without any distractions, at a separate location. Focussed to work on the game. And even more awesome, I have some help from Arjen van der Ende for a few days. In this week we’re going to work on: Merging the Harvester logic Minimap Power Resource AI A lot of the things to get the Minimal Playable Game finished!   I am very grateful that my family supports me to chase my dream and… Read Article →

I asked what was ‘wrong’ in the following code. I had put ‘wrong’ in quotes, because it is an ambigious term. Here is the code: [sourcecode language=”java”] if (null == sessionProxy.getShoppingCart()) { throw new IllegalStateException("ShoppingCart may not be null"); } [/sourcecode] One thing that we find here, is the use of a session proxy object. This is convenient, because it can do things for us at a centralized place. So what is wrong? In my opinion there are several things wrong with this code: – violation of the Single Responsibility Principle – dealing with null… Read Article →

(I have recently encountered this with Spring 3.1) Want to validate your forms using Spring? Are you using the form tag and bind it with an object? Got the validator working? But still you just can’t seem to get these error messages showing up? Here is a gotcha that might help you out! Consider this controller: [sourcecode language=”java”] @Controller public class FormController { @RequestMapping("/form") public ModelAndView handleGet(@Valid TellAFriendForm backingForm, BindingResult bindingResult) { ModelAndView modelAndView = new ModelAndView("backingForm"); modelAndView.addObject("backingForm", backingForm); modelAndView.addObject("result", bindingResult); return modelAndView; } } [/sourcecode] With this jsp: [sourcecode language=”java”] <form:form method="POST" commandName="myForm" action="?">… Read Article →

When you’re used to Java, you build your software using the comforting build-tools. Popular examples are Ant and Maven. Personally I love Maven. When you’re writing an application in C++ it seems like a big step backwards build-tools wise. If you’re an Ant God you might feel a bit more comfortable with using Make. However, writing makefiles (the ‘equivalent’ of the Ant’s build.xml) are a more tough. Since I am used to Maven, there are some tasks I want to perform, like: – clean – compile – compile tests – package To start with. I… Read Article →

I really love stackoverflow. It brings developers, good ones, together. And because of the community active there, many questions I had where answered. However, I dare to say half of my questions where answered by not posting any question… The reason why? Its simple. In order to get the answer you seek, you need to specify the problem precisely. Just posting “it does not work” with some vague description is not enough. It really helps to tell how you stepped through the problem, post snippets of code and so forth. If you are able to… Read Article →

Scroll To Top