You tested your app on the Simulator and everything is fine. You’ve moved it to the iPhone, and when you reach a certain TableViewController your app crashes with the following message: [UIAnimator removeAnimationsForTarget:]. How would you approach this issue? Using common sense, try to set a breakpoint in each function from your TableViewController, then step through them to see in/after which function does the crash happens. In my case, the responsible code was found in the function:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
It entered this function, once for each cell, but it crashed after exiting. As a new iOS developer, I was trying to set a couple of different UITableViewCell in one TableViewController. Here is a sample of the code I was using in the first version:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
// Setting a generic cell
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]
autorelease];
}
// ... Other code
// Replace generic cell with custom cell
if(objectType == CMMUItemViewSectionSummary){
NSArray *topLevelObjects = [[NSBundle mainBundle]
loadNibNamed:@"SummaryCell"
owner:nil
options:nil];
for(id currentObject in topLevelObjects){
if([currentObject isKindOfClass:[SummaryCell class]]){
cell = (SummaryCell *) currentObject;
break;
}
}
cell.summaryData = summaryData;
} else if(objectType == CMMUItemViewSectionStatuses){
NSArray *topLevelObjects = [[NSBundle mainBundle]
loadNibNamed:@"ItemStatusCell"
owner:nil
options:nil];
for(id currentObject in topLevelObjects){
if([currentObject isKindOfClass:[ItemStatusCell class]]){
cell = (ItemStatusCell *) currentObject;
break;
}
}
cell.statusesData = statusesData;
} else {
cell.textLabel.text = someDefaultData;
}
// Return the cell
return cell;
}
As you can see in the above code, after I was getting a generic cell, I would try to replace it with a custom cell. I guess that somewhere after tableView:cellForRowAtIndexPath: some other piece of code was trying to cleanup the unused cells. Figuring this, it was pretty easy to get it fixed. Using the same sample code:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
NSString *CellIdentifier = @"Cell"; //Generic identifier
UITableViewCell *cell;
// Other code ...
CellIdentifier = [NSString stringWithFormat:@"Cell%d", objectType]; //cell of my object type
cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if(objectType == CMMUItemViewSectionSummary){
if (cell == nil) {
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"SummaryCell"
owner:nil
options:nil];
for(id currentObject in topLevelObjects){
if([currentObject isKindOfClass:[SummaryCell class]]){
cell = (SummaryCell *) currentObject;
break;
}
}
}
cell.summaryData = summaryData;
} else if(objectType == CMMUItemViewSectionStatuses){
if (cell == nil) {
NSArray *topLevelObjects = [[NSBundle mainBundle]
loadNibNamed:@"ItemStatusCell"
owner:nil
options:nil];
for(id currentObject in topLevelObjects){
if([currentObject isKindOfClass:[ItemStatusCell class]]){
cell = (ItemStatusCell *) currentObject;
break;
}
}
}
cell.statusesData = statusesData;
}
if(cell == nil){
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:CellIdentifier]
autorelease];
}
return cell;
}
Even if is not the optimal way to use custom TableViewCells, it solves the crash problem. Improvements and suggestions, are welcomed.
While working to add MetaWeblog support to my blog (not that I’m writing lots of stuff here and I need a ‘desktop blogging tool’ to increase my productivity) I found some very helpful links how to add this to a Django based blog. Greg Abbas wrote two tutorials on how to integrate XMLRPC into Django and Metaweblog and Django. Everything fine and dandy until I tried to integrate the XMLRPC part into my system. I’ve started with the ‘arithmetic’ example, but I got the following error message:
xmlrpclib.ProtocolError: <ProtocolError for localhost:8000/blog/metaweblog/: 500 INTERNAL SERVER ERROR>
It was strange for me to see that my previous play with XML RPC (used in another part of the system) didn’t work either. It worked on the production server, but not on my development machine. One of the major differences between these servers was that I was using python 2.5 on my dev server and python 2.4 on the live server. After I’ve google it around a bit, I found that there were some differences between the 2.4 and 2.5 implementation of xmlrpclib. If you check the release note for python 2.5 there is a small mention:
- Patches #893642, #1039083: add allow_none, encoding
arguments to constructors of SimpleXMLRPCServer and
CGIXMLRPCRequestHandler.
And incidentally, SimpleXMLRPCServer is used by both XMLRPC implementations.
The fix is pretty easy: add the missing parameters (allow_none – Bool and encoding – String) when you instantiate SimpleXMLRPCServer or any class based on that.
After fixing this, I still had to adapt my models to the Metaweblog API. Thanks to ecto‘s trial version, it wasn’t a very hard job. I prefer to write my posts in Textile so now I have to see how I can make ecto or other blogging tool to let me to that.

On December 2007, I bought my first laptop, a brand new MacBook Pro. A friend brought it to me from US. Since then, I replaced my home computer and my work computer almost entirely (I still have my work mail on the Linux workstation, and I don’t plan to move it on my laptop soon, and I didn’t transfer all the feeds I’m reading from aKregator to NetNewsWire).
After more then 2 months of daily usage, I wrote some notes on what I like/dislike on OS X vs Linux. Perhaps other Linux users that want a prettier user interface will make the switch to another Unix based OS.
Although, a couple of A-list programmers/bloggers/writers already made the switch back to Linux (Ubuntu, mainly), I will give this OS a try (at least the period needed to earn twice the money I spent on this laptop doing freelance jobs).
This photo shows the US layout, which I like compared to the European/Romanian layout. Read more of my notes in OSX vs Linux, two months report

Inspired by the pictures posted on decluttered I’ve reorganized the cables from my desk.
First, I’ve looked for an appropiate pegboard, which I found very cheap at a furniture wood deposit. Then, with help from Sergiu, I’ve made a grid of holes, rows and columns, 4cm apart.
The last part was to attach everything that was ductaped to the back of the desk to pegboard and find a way to mount the pegboard to the desk. For this I used two kinds of zip laces, longer ones for medium – big devices, and shorter ones for cables.
I will add two more devices, an external hard drive (Western Digital MyBook) and a wireless router (AirPort Extreme Base Station) next month.
Here you can see the before and after uncluttered desk pictures.
Caveats to Internet Explorer PNG transparency bug
.png_image {
background: url('/img/some_image.png') no-repeat;
z-index:10;
}
* html .png_image {
background: url('');
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=image, src='/img/some_image.png');
}
If you’re using the above hack to handle Internet Explorer 6 PNG fix, and you’re still seeing some light blue parts, check the following things:
- The name of the class is the same in all the places you’re using it (in the div or img tag where you need the image, the ”* html .png_image” class line and the ”.png_image” class line)
- The above CSS must be included in the HTML body/head using <style> tags. Do NOT include from an external file.
- The path of the image is correct in both CSS definitions.
- If you are trying to apply this hack to an <img> element, try to use a transparent pixel for <img> and set the png image from css. The image from img source is rendered above the image from css source.
P.S. When you’re writing code in textile, escape each paragraph using ”==”.

I present you my dear colleague Sergiu Oprean eating his lunch sandwich during our team building rafting trip on Nera.
In spired by this Photoshop tutorial I’ve used Gimp to obtain the selective coloring effect. I was curious how to do this, but didn’t bother to look it up on Google. Until today didn’t know that this effect is called “selective coloring”, come to think.
I have to thank someone special for asking how to do Sepia Effect and leading me to this page.
Here is how you can setup mplayer to use Central European encoding for subtitles (instead of default UTF-8):
Go to mplayer directory and edit the config file, located in mplayer subdirectory of mplayer (that will be \mplayer\mplayer\config), After the “font” line add: “subfont-encoding=iso-8859–2”. While you are still there, you can add ‘fs=yes’ to always have full screen when dropping a movie over mplayer’s icon.
Here is my mplayer config file:
vo=directx
double=yes
font=c:/windows/fonts/arial.ttf
subfont-encoding=iso-8859-2
autosync=100
framedrop=yes
quiet=yes
fs=yes
P.S. In theory, you can achieve this by replacing arial.ttf with arial-ce.ttf, just that I couldn’t managed to find arial-ce.ttf free on Internet. And it looks like arial.ttf already has the CE fonts (aka iso-8859–2) packed into it.