The Problem One day it was just there. A mischievous NullPointerException causing, eh, mischief. It was fairly easy to provoke with my application but for some reason my code was not part of the stacktrace. 12-07 14:42:52.722 E/AndroidRuntime(18421): FATAL EXCEPTION: main 12-07 14:42:52.722 E/AndroidRuntime(18421): java.lang.NullPointerException 12-07 14:42:52.722 E/AndroidRuntime(18421): at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1064) 12-07 14:42:52.722 E/AndroidRuntime(18421): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1081) [...]
Android: The Mysterious NullPointerException
December 15th, 2011 by Darius Katz — Android, Tips & Tricks
Tags: Android, mobile, programming
Getting started with Android NDK
October 13th, 2011 by Per-Erik Bergman — Android, Embedded, Java, Tips & Tricks
You want to try out the Android NDK? I have gotten a lot of questions about how to setup and work with the NDK and I decided to write down how I do it. My goal with this entry is to gather all the information you need to get started with the Android NDK. I [...]
Tags: Java, ndk, programming, tutorial
Invoke any Method on any Thread
August 8th, 2011 by Fredrik Olsson — Architecture, Cocoa, Dynamic languages, Tips & Tricks
I previously wrote a blog post titled Performing any Selector on the Main Thread detailing a convenience category on NSInvoication for easily creating invocation objects that could be invoked on any thread. This category has served me well, and even got traction in the iOS developer community, so I never bothered to stop and think [...]
Tags: concurrency, design patterns, iphone, mac, objective-c, open source, programming, tips, tutorial
Secure JMS, Spring and WebLogic – a One Click Workaround
June 26th, 2011 by Olof Åkesson and Vlado Palczynski — Java, Tips & Tricks
In our current assignment we are building a messaging based integration solution using Spring Integration and deploying it on WebLogic. In general, this has been quite a good experience as Spring Integration is a pleasant framework to work with from a developer’s perspective and the customer is happy that it will be rolled out on [...]
Tags: programming, spring jms, weblogic
Dapper-dot-net aka Micro-ORM
May 23rd, 2011 by Björn Carlsson — .Net
a simple object mapper for .NET After listening to Hanselminutes show #262 I became curious and have looked a bit at Dapper to check what it really is. First of all, it’s implemented as a single file you can drop in your project. It’s created for and at stackoverflow. I heard somewhere that it should [...]
Tags: .Net, Database, performance, programming
Sync-Async Pair Pattern – Easy concurrency on iOS
April 28th, 2011 by Fredrik Olsson — Architecture, Cocoa, Testing, Tips & Tricks
Apple provides many tools for implementing concurrency in your application. NSOperationQueue, GCD, or simply using performSelectorInBackground:withObject: that is available on each and every object, are just some examples. The tools are there, yet implementing good concurrency is hard. The solution I have found is not yet another tool, or framework, but a simple pattern. I [...]
Tags: automated testing, concurrency, design patterns, iphone, objective-c, programming
jstack to the rescue
March 29th, 2011 by Jimmy Falkbjer — Java
On my current assignment we have amongst other things a Web Service. We use Apache CXF 2.3.2 as Web Services framework. The number of requests has increased heavily the last couple of months and currently we have about 20 requests a second, around the clock. We decided to move the Web Service to its own [...]
Tags: Apache CXF, jstack, programming
Automated Testing is Like Optimizing
January 7th, 2011 by Fredrik Olsson — Testing, Uncategorized
I have my roots in the Atari demo scene, so I know the joys of optimizing the inner-loop of a software texture mapper down to the last assembly instruction. The bragging rights of knowing that not a single clock cycle is wasted. I am also grown up enough to know that this is not a [...]
Tags: automated testing, performance, programming, tdd
OpenGL ES Tutorial for Android – Part VI – Textures
December 30th, 2010 by Per-Erik Bergman — Android, Embedded, Java
Last tutorial we worked a bit more on meshes and we have also talked about adding colors to our mesh. The most common way of adding colors to your mesh is to add a texture. There is a couple of different steps involved with adding a texture to the mesh I will try to go [...]
Tags: opengl es, programming, tutorial
Exceptions and Errors on iOS
October 13th, 2010 by Fredrik Olsson — Architecture, Cocoa, Embedded, Testing, Tips & Tricks
Cocoa, and by inheritance Cocoa Touch on iOS makes a clear distinction between what is an exception, and what is an error in your application. This should be obvious since NSException and NSError both inherit from the NSObject root class with no relations at all. Programmer vs. User Exceptions are intended for signaling programming errors [...]
Tags: design patterns, iphone, objective-c, programming, tutorial
Future Cocoa Operation
August 19th, 2010 by Fredrik Olsson — Architecture, Cocoa, Tips & Tricks
In Java you have for quite some time had the Future interface for encapsulating an asynchronous calculation. Cocoa has had the abstract NSOperation class to encapsulate asynchronous operations. NSOperation do not have any facilities for returning a result when done as the Future do, you are left to implement this on your own. Which I [...]
Tags: concurrency, design patterns, iphone, Java, mobile, network, objective-c, programming
Introduction to snmp4j
May 21st, 2010 by Johan Rask — Java, Tips & Tricks
Update 2010-09-22: Asynchronous fetch which is tested with Awaitility. SNMP is a widely accepted technology and is used in to monitor a wide variety of devices, but as it turns out very few people (at least among java programmers) seems to know anything about how to build snmp based solutions. This post will not discuss [...]
Tags: frameworks, Java, programming, snmp, snmp4j
Extending the JDT
April 20th, 2010 by Michael Kober — Android
A couple of weeks ago I had a look at the Motodevstudio for Android developers and I think it has some quite nice features like code snippets or wizards for Android activities, services and more. Actually it’s is quite easy to extend the eclipse JDT and provide such useful plugins. This blog post is about [...]
Tags: Android, eclipse, programming, scala, tutorial
Performing any Selector on the Main Thread
March 30th, 2010 by Fredrik Olsson — Cocoa, Embedded, Tips & Tricks
Many UI frameworks, including AppKit for Mac OS X and UIKit for iPhone OS, require that all methods to UI components are sent on the main UI thread. Cocoa and Cocoa Touch make this quite easy by providing for example -[NSObject performSelectorOnMainThread:withObject:waitUntilDone:] in Foundation. Making updating the text for a text field a snap: [someTextField [...]
Tags: cocoa touch, concurrency, iphone, mac, mobile, objective-c, open source, programming, tips, tutorial
Performance nightmare
March 5th, 2010 by Björn Carlsson — .Net, Tips & Tricks
22 to 0.3 seconds! I found a simple solution to a very common problem. While profiling I found that remove in this little method took a lot of the time. public void MovePropertyFirst(IProperty property) { properties.Remove(property); properties.Insert(0, property); } The reason was, that it’s time consuming to compare the properties by equality, for complex types. [...]
Tags: .Net, .NET Framework, performance, programming, windows
