Wednesday, March 28, 2012
Little handy Maven build helper plugin
problem was everytime it built my IDE would moan about missing the generated classes, so I went searching and found this useful Build Helper plugin to help your IDE integration out.
Tuesday, March 6, 2012
iOS App : iBoincStats
I decided to do an app instead of a game for a change, just to see what the interface builder, XML and "work" type development would be like. It turned out being a lot faster and simpler than I expected. I have also always been a big fan of BOINC, and checking my "stats" for many years now, all the way back before there was a BOINC platform, and it was only the SETI@Home project.
(An added bonus: unlike games this one it would actually be available on the South African App store as well as the international ones)
During my development career I have never really spent a lot of time designing and developing UIs, I always ended up on the backend side of development projects. So take the next statement in that light:
I think Apple has actually done a pretty good job (after some initial learning frustration) with their interface builder and storyboard shipped with XCode. I sat down and after a good couple of hours of struggling, something eventually clicked and it all finally came together. I restarted my project, copied over the backend code and in literally 15 minutes the storyboard and 3 UIs were done. Awesome.
I had a couple "funnies" while still using XCode 4.2, but just upgraded to 4.3 and those particular issues seem to have been corrected.
iBoincStats
Enter your cross project id and access your latest stats.
Some of the popular BOINC projects include:
Seti@home
climateprediction.net
Einstein@home
POEM@home
rosetta@home
More information regarding the BOINC project can be found at:
BOINC home
Wikipedia - Berkely Open Infrastructure for Network Computing

Wednesday, February 15, 2012
iOS App Store Validation Error
iPhone/iPod Touch: Icon.png: icon dimensions (0 x 0) don't meet the size requirements.
Select Project then go to Build Settings, select All, under Packaging set Compress PNG Files to NO.
I have no idea why this all of a sudden started on my 3rd update, just glad it was simple enough to solve
Sunday, January 29, 2012
Spring 3, Spring Web Services 2 & LDAP Security.
Due to general time constraints I am not including too much "fluff" in this post, just the nitty gritty of creating and securing a Spring 3 , Spring WS 2 web service using multiple XSDs and LDAP security.
The Code:
The Service Endpoint: ExampleServiceEndpoint
This is the class that will be exposed as web service using the configuration later in the post. The Code: CustomValidationCallbackHandler
This was my bit of custom code I wrote to extend the AbstactCallbackHandler allowing us to use LDAP. As per the comments in the CallbackHandler below, it's probably a good idea to have a cache manager, something like Hazelcast or Ehcache to cache authenticated users, depending on security / performance considerations.
The Digest Validator below can just be used directly from the Sun library, I was just wanted to see how it worked.
The service config:
The configuration for the Endpoint, CallbackHandler and the LDAP Authentication manager.
The Application Context - Server Side:
The Security Context - Server Side:
The Web XML:
Nothing really special here, just the Spring WS MessageDispatcherServlet.
The client config:
To test or use the service you'll need the following:
The Application Context - Client Side Test:
The Security Context - Client Side:
As usual with Java there can be a couple little nuances when it comes to jars and versions so below is part of the pom I used.
The Dependencies:
Saturday, January 28, 2012
Wordballs Release
My latest physics based word game. Please check it out if you have an iOS device, and let your friends know.
It's Free (with ads) and 16mb to download.
Please take a couple seconds to rate it as well, it will be much appreciated
This game actually took me some time to do. Crazy deadlines and some nasty hours at work meant for some slow going and some very late nights at times.
I would just like to thank the teams from:
Chipmunk Physics
Cocos 2D
Without their awesome libraries / code this Wordballs would have been impossible.
Free Universal Version - In App Purchase available to remove ads
http://www.wordballs.com/
Saturday, December 17, 2011
ccColor3B constants.... A whole bunch of them.
Tuesday, December 6, 2011
Cached Property File Enum
A cached property file enum:
How it looks being used:
Code:
Test:
The .properties file:
FEATUREA=true
FEATUREB=false
FEATUREC=true
How it works:
The Pragmatic Programmer - Review / Summary Notes.
I have to add, had I read this when it was published it would have undoubtedly saved me some pain, but even with that it's always good to reaffirm some of your good habits, and keep your bad ones in check. It covers 46 sections with 70 different tips that are generally useful to any programmer. Jeff Atwood - coding horror made a list of all 70 tips.
As with most things some tips are "more equal" than others, the ones that really stick out and probably can't be emphasized enough are:
Care About Your Craft
Why spend your life developing software unless you care about doing it well?
Think! About Your Work
Turn off the autopilot and take control. Constantly critique and appraise your work.
Don't Live with Broken Windows
Fix bad designs, wrong decisions, and poor code when you see them.
Invest Regularly in Your Knowledge Portfolio
Make learning a habit.
DRY - Don't Repeat Yourself
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
Make It Easy to Reuse
If it's easy to reuse, people will. Create an environment that supports reuse.
Prototype to Learn
Prototyping is a learning experience. Its value lies not in the code you produce, but in the lessons you learn.
Don't Panic When Debugging
Take a deep breath and THINK! about what could be causing the bug.
"select" Isn't Broken.
It is rare to find a bug in the OS or the compiler, or even a third-party product or library. The bug is most likely in the application.
Design with Contracts
Use contracts to document and verify that code does no more and no less than it claims to do.
Crash Early
A dead program normally does a lot less damage than a crippled one.
Minimize Coupling Between Modules
Avoid coupling by writing "shy" code and applying the Law of Demeter.
Don't Program by Coincidence
Rely only on reliable things. Beware of accidental complexity, and don't confuse a happy coincidence with a purposeful plan.
Refactor Early, Refactor Often
Just as you might weed and rearrange a garden, rewrite, rework, and re-architect code when it needs it. Fix the root of the problem.
Design to Test
Start thinking about testing before you write a line of code.
Some Things Are Better Done than Described
Don't fall into the specification spiral at some point you need to start coding.
Don't Be a Slave to Formal Methods.
Don't blindly adopt any technique without putting it into the context of your development practices and capabilities.
Don't Use Manual Procedures
A shell script or batch file will execute the same instructions, in the same order, time after time.
Test Early. Test Often. Test Automatically
Tests that run with every build are much more effective than test plans that sit on a shelf.
Coding Ain't Done 'Til All the Tests Run
'Nuff said.
Test State Coverage, Not Code Coverage
Identify and test significant program states. Just testing lines of code isn't enough.
Find Bugs Once
Once a human tester finds a bug, it should be the last time a human tester finds that bug. Automatic tests should check for it from then on.
Friday, November 25, 2011
Determining iOS Hardware / Device
So to not diminish the user experience I decided to remove those reflections, on the interactive CCSprite, on the older devices.
I went searching and found : UIDeviceHardware - Determine iOS device being used
I ended up just using: (platformString wasn't useful to me) I then just created a convenience method for myself to check for the version that have the Dual-core Apple A5 processor.
Sunday, October 16, 2011
Cocos2d CCSprite Reflection
What I want to share today is my little hack to reflect a CCSprite used in to cocos2d. I say hack because it does feel a little dirty, i didn't go and learn about the details of Open GL and the like, simply patched things together to get a working solution.
Below is the code for my ImageReflector, the basic idea and how it got it work was simple:
The best looking reflection example I found was Apples' example. So the methods createBitmapContext, createGradientImage and reflectedImage are directly from the above example. I wanted to use it in cocos2d so I used CCRenderTexture to create a UIImage, passed that to Apples' example code and then simply converted back to a CCSprite with the help of the CCTexture2D class.
Usage: Class:
Friday, September 2, 2011
iPhone Gmail Username / Password Error
Cannot Get Mail - The user name or password for imap.gmail.com is incorrect.
After a bit of searching, I found the solution to be simple, logon and input the Captcha phrase.
Link Below:
https://www.google.com/accounts/UnlockCaptcha
Building KubeSkippy: Learnings from a thought experiment
So, I got Claude Code Max and I thought of what would be the most ambitious thing I could try "vibe"? As my team looks after Kuber...
-
I make no claim to be a "computer scientist" or a software "engineer", those titles alone can spark some debate, I regar...
-
So I recently needed to re-certify my AWS Certified Solutions Architect - Professional certification. I tried to keep track of everything I ...