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. [...]
Performance nightmare
March 5th, 2010 by Björn Carlsson — .Net, Tips & Tricks
Tags: .Net, .NET Framework, performance, programming, windows
OpenGL ES Tutorial for Android – Part V – More on Meshes
February 15th, 2010 by Per-Erik Bergman — Android, Embedded
I have a feeling that some of you have tried my tutorials and then thought “This is a 3D tutorial, but why is everything in 2D?”. So in this tutorial we will make some real 3D meshes. This is also necessary for the following tutorials. When I started I had problems with finding out how [...]
Tags: opengl es, programming, tutorial
Building OSGi Bundles with Scala and Gradle
February 9th, 2010 by Michael Kober — Java
There already some good blog posts about how to build OSGi bundles in Scala, among others “An OSGi Bundle… built in Scala” of Neil Bartlett and “OSGi, Maven and Scala” of Gavin Bong using pax-construct. Here is another alternative using Gradle. Gradle is an open-source build system providing the expressiveness of a Groovy based DSL [...]
Tags: build systems, programming, scala
Boosting Android performance using JNI
January 25th, 2010 by Mattias Rosberg — Android, Embedded, Java
JNI or Java Native Interface is the interface between the Java code running in a JVM and the native code running outside the JVM. It works both ways, that is you can use JNI to call native code from your Java programs and to call Java code from your native code. The native code normally [...]
Tags: programming, tutorial
Getting around static typing in Scala
January 23rd, 2010 by Jan Kronquist — Java
I really like static typing, but sometimes it can get in your way. For instance if you have a collection of objects and you want to perform an operation on the objects of a certain subclass you can run into problems.
Tags: collections, programming, scala
One artifact with multiple configurations in Maven
January 21st, 2010 by Henrik Larne — Java, Tips & Tricks
Problem When working on www.beertoplist.com I ran into a Maven problem, that is fairly common: Having a project that should be configured differently for different environments. That is for instance you want one configuration for development, one for test and one for production. I wanted a solution that allowed me to make changes to all [...]
Tags: maven, open source, programming, tools
Test Driven Development in XCode
January 15th, 2010 by Christian Hedin — Testing
Test Driven Development, or TDD for short, is a simple software development practice where unit tests, small focused test cases, drive the development forward. This is most easily explained by the Three Rules of TDD that dictate the following: You are not allowed to write any production code unless it is to make a failing [...]
Tags: frameworks, iphone, mac, objective-c, programming, tdd, tools, tutorial
OpenGL ES Tutorial for Android – Part IV – Adding colors
January 14th, 2010 by Per-Erik Bergman — Android, Embedded
Last tutorial was about transformations. This tutorial will be a short one. I’m going to talk about adding color to your mesh. I will continue with the source code from tutorial II. Adding color 3D models with no colors are pretty boring so let’s add some color to it. In general colors need no explanation. [...]
Tags: opengl es, programming, tutorial
OpenGL ES Tutorial for Android – Part III – Transformations
January 1st, 2010 by Per-Erik Bergman — Android, Embedded
Last tutorial was about building your polygons. This tutorial is all about transformations, how to move the polygons around. I will continue this tutorial from where the previous ended so you can use that source code or make a copy of it. I am not going to bore you with a lot of mathematics but [...]
Tags: opengl es, programming, tutorial
Java ME: The Lost Application
December 11th, 2009 by Darius Katz — Embedded
As a professional Java ME developer I’ve never really come to terms with the MIDlet class and its underlying aesthetics. As a sort of remedy I often use a simple utility-class I wrote some years ago to conceal the principles of the MIDlet class. It concerns the way you write your Java ME-application so I [...]
Tags: innovation, j2me, java me, programming
Blu-ray and Java
December 11th, 2009 by Johan Karlsson — Java
Blu-ray is a replacement for DVD video, with high definition video and audio. In addition, Blu-ray also includes a solution for more interactive content; Java! The built-in Java platform gives more opportunities than ever ever before. Let us take a look at Blu-ray and Java. The article contains a description of the execution model and [...]
Tags: blu-ray, programming
Referential Integrity using Spring LDAP
December 7th, 2009 by Vlado Palczynski — Java
The directory servers of today are packed with a lot of nice features, one of them being Referential Integrity which performs integrity updates on attributes like member, uniqueMember, owner etc. Simpler put, when an entry updates its distinguished name, all references using the old distinguished name get updated to the new one. However, there can [...]
Tags: open source, programming, referential integrity, spring, spring ldap
OpenGL ES Tutorial for Android – Part II – Building a polygon
December 4th, 2009 by Per-Erik Bergman — Android, Embedded
Previous tutorial was all about setting up the GLSurfaceView. Be sure to read it beacuse it’s a really importent one to be able to continue. Building a polygon In this tutorial we will render our first polygon. 3D models are built up with smaller elements (vertices, edges, faces, and polygons) which can be manipulated individually. [...]
Tags: opengl es, programming, tutorial
OpenGL ES Tutorial for Android – Part I – Setting up the view
December 3rd, 2009 by Per-Erik Bergman — Android, Embedded
I’m going to write a couple of tutorials on using OpenGL ES on Android phones. The theory of OpenGL ES is the same on different devices so it should be quite easy to convert them to another platform. I can’t always remember where I found particular info so I might not always be able to [...]
Tags: opengl es, programming, tutorial
The Golden Ratio
October 24th, 2009 by Ulrik Sandberg — Tips & Tricks
Also known as the “Divine Quotient”, the Golden Ratio was given an almost magical meaning during the renaissance, but it’s actually much older than that. Leonardo DaVinci used it. Euclid used it. It was supposedly discovered by Pythagoras. So, what is it? It’s very simple. Take a length and divide it into two parts: a [...]
Tags: goldenratio, mathematics, programming, scala, scripting
