Archive for the ‘Uncategorized’ Category
November 13th, 2009 | 4 Comments »
MVC, Model View Controller is a well known design patten from the field of UI frameworks. It advocates the separation of a Model, an application specific data and business logic, Controller, which takes user input, consults the model and determines the correct view to present a user based on its result and a View, the [...]
Published in Uncategorized |
October 2nd, 2009 | 5 Comments »
What could be more fun than writing a new shiny super-functional, super-tested piece of code? Deleting it! When deleting code you know that You have not introduced new bugs. Perhaps you deleted some potential bugs from the old code but chances are you did not introduce new ones. You don’t have to maintain it. It’s [...]
Published in Uncategorized |
September 20th, 2009 | 1 Comment »
Maven is a build tool for Java. It’s more than that actually, but let’s just call it a build tool. In outbrain we decided we want to replace good old ant with maven. Changing the company wide used build tool is not a decision taken lightly and may have consequences on product release cycle, but [...]
Published in Uncategorized |
August 28th, 2009 | 1 Comment »
Seam Carving is a technique for smart image resizing developed by Shai Avidan and Ariel Shamir. It’s cool. It’s really cool actually! It let’s you resize an image without having to lose important information, so for example, if there’s a face in the photo and a background, the background will shrink while the face will [...]
Published in Uncategorized |
August 1st, 2009 | 3 Comments »
Cores are cheaper nowadays. Almost all new computers are shipped with 2 or more cores. Datacenter computers usually ship with more – 4, 8, 32… Again the hardware industry has left the software industry behind; if only Moore’s law would work the same way for software… But there is hope! Functional programming languages used to [...]
Published in Uncategorized |
June 24th, 2009 | 5 Comments »
The Singleton design pattern is well known and used among programmers. It is so easy to use that unfortunately it often gets misused. In Java a singleton usually looks like this: public class Singleton { private static final Singleton INSTANCE = new Singleton(); // Private constructor prevents instantiation from other classes private Singleton() {} public [...]
Published in Uncategorized |
June 19th, 2009 | No Comments »
All programmers at all languages are familiar with the concept of default values. Many languages allow default parameter values when calling a functions, some provide a function overloading mechanism which is an expansion of this idea. For example in python you can have named parameters with default values: def multiply(v, mult=2.0) return v * mult [...]
Published in Uncategorized |
June 17th, 2009 | No Comments »
I’m relatively new to git and I’m already in love with it, but there was one thing that bugged me and I couldn’t get a good answer anywhere else, so I wrote my own thing, posting it so maybe you can find it helpful. The problem: Use a visual diff tool for git; and view [...]
Published in Uncategorized |
June 8th, 2009 | No Comments »
I was asked by a fellow worker whether flash can be? Short answer: no. Long answer below. But why would you even want to encrypt flash? I asked. He told me about a product he’s working on, some kind of hook for online games which identifies cheaters and bots as they play in real-time by [...]
Published in Uncategorized |
June 3rd, 2009 | 5 Comments »
Hey CSS guys, how about a CSS island tag?! This is what I’m talking about: <html> <style> h1 { font-size: bigger; } </style> <body> lots of html code…. <cssisland resets=”h1;h2;div.img;#id”> <style> h1 { font-size: smaller; } </style> here all page css code is preserved except for h1, h2, div.img and #id h1 has a smaller [...]
Published in Uncategorized |