In my previous article, I introduced the concept of promise, a technique that allows us to write async code in a more sync-ish manner. In this article and the following ones I will try to dive into the definition and expectancies of a promise. So what is a promise? A promise represents the eventual result of an asynchronous operation. This […]
Author: cristik
Promises and ObjectiveC: no more callback hell
If you worked with asynchronous tasks in iOS apps, chances are that you have run into problems when implementing chains of async operations, like when it comes to talking to a server API. Let’s take an example. Supposing you have to implement a library app and you need to add support for inserting a new book. And supposing […]
How to debug PInvoke-ed C++ DLL from .NET code
If you’ve tried debugging a C++ DLL and could not make Visual Studio to load the debug symbols for that DLL (you kept getting the “The breakpoint will not currently be hit” message), here is something useful I find out on this stackoverflow post: make sure to uncheck the “Enable Just My Code” Visual Studio setting. You […]
Freelancer messes up with the old vWorker users
So Freelancer finally acquired vWorker. They must be very happy… well, I’m not. Firstly my old password from vWorker no longer worked, then when I tried to recover it it didn’t worked (don’t use the login popup that appears in the left side to reset the password – only the popup from the right side […]
Why is git better than other versioning tools
A short answer can be found at http://whygitisbetterthanx.com/. That site lists the main reasons users of other versioning systems switch to git. To be continued…
Google codesearch is no longer available
Don’t know for exactly what reason (Google gave some details ), but Google decided that codesearch is not an useful search tool. They’ve discontinued this functionality but didn’t told what feature will replace it.
Setters in Cocoa
Which of the three setters is better: [objc gutter=”false”] – (void)setName:(NSString*)value{ if(value != name){ [name release]; name = [value retain]; } } – (void)setName:(NSString*)value{ id old = name; name = [value retain]; [old release]; } – (void)setName:(NSString*)value{ [name autorelease]; name = [value retain]; } [/objc] Personally I’d use the third variant, but I’m open to […]
PHP+MySQL transaction problems
When you notice that BEGIN, COMMIT, ROLLBACK don’t seem to work (the queries are committed immediately) just take a look at the storage engine of your tables. It should be set to InnoDB. I’ve wasted 4 hours until i figured out what the problem was in my php pages, hope this will help you 🙂
PHP: mysqli and 64bit numbers – a real pain in the ass
Due to some unfortunate bugs on my project I recently discovered a terrific problem with mysqli and 64bit numbers: no matter you have a 64bit OS and php is compiled for x64, mysqli will truncate the to 32bit any 64bit number when calling the mysqli_stmt::bind_param() method. Due to this and the fact that I was using […]
PHP: don’t use time() or microtime() to measure execution time
As Thomas Habets posted on it’s blog (http://blog.habets.pp.se/2010/09/gettimeofday-should-never-be-used-to-measure-time): gettimeofday() and time() should only be used to get the current time if the current wall-clock time is actually what you want. They should never be used to measure time or schedule an event X time into the future. And because the time() and microtime() function relies on gettimeofday(), those […]
Recent Comments