by Bogdan Varlamov (a.k.a. Phantom Stranger)
I've often found myself working on a class in some legacy application using objects hidden away in third-party libraries and thinking, "Wow... it would be really great if I could call this current existing method but have it process asynchronously (without blocking) and then notify me when it is complete."
The only way to do this would be to inherit the legacy object and add a new "Async" version of the method, right? And what about those pesky sealed classes? Not to mention the problems with having to refactor your whole application (and perhaps any dependent components used by other applications).
It can be quite a mess! But, luckily there is a simpler way...
Would you like to know more?
by Bogdan Varlamov (a.k.a. Phantom Stranger)
We've all been there before--trying to track down some insipid bug which is impossible to reproduce on a developer's machine. What is the response? To add more logging of course!
That's all well and good, but eventually your log files are going to start getting huge. Don't get me wrong, I LOVE applications with good logging. (In my opinion it's much better to "overlog" than "underlog" [or not log at all!]). But, sometimes it makes sense to cut back on the amount of logging to save disk space, or to make the log files easier to digest...
How can this be done? Certainly not by removing logging from code!
Would you like to know more?
One of my clients asked me to write a very simple RESTful web service to retrieve user data (name, email, address, etc.) based on login credentials. Having recently finished working on a PHP-driven RESTful interface for another client (based on the Zend Framework), I thought this would be a simple and straightforward task. As comedian Bill Engvall says: "Here's your sign!". I should have known better. Would you like to know more?
The main purpose of RealCodersCoding is to post about problems we, the authors, have overcome in our daily coding adventures. Sometimes, the problems we are faced with are complex and require some interesting coding yoga to to work out. Other times the solutions are drop-dead simple, but we refuse to recognize them. Here's a little post about how I wasted an entire freakin' day to one of the latter.
Would you like to know more?