When should I use StringBuilder or StringBuffer?
In a production web application, my fellow programmers used StringBuffer everywhere. Now I am taking care of application development and corrections. After reading StringBuilder and StringBuffer I have decided to replace all the StringBuffer code with StringBuilder because we don’t need thread safety in our data beans.
At what point is asynchronous reading of disk I/O more efficient than synchronous?
Assuming there is some bit of code that reads files for multiple consumers, and the files are of any arbitrary size: At what size does it become more efficient to read the file asynchronously? Or to put it another way, how small must a file be for it to be faster just to read it synchronously?
Futures/Monads vs Events
In an application framework
when performance impact can be ignored (10-20 events per second at max),
what is more maintainable and flexible to use as a preferred medium for communication between modules – Events or Futures/Promises/Monads?
Asynchronously returning a hierarchal data using .NET TPL… what should my return object “look” like?
I want to use the .NET TPL to asynchronously do a DIR /S
and search each subdirectory on a hard drive, and want to search for a word in each file… what should my API look like?
BackgroundWorker vs. Async/Await
I am new to C# development and wish to create a more responsive UI. In my preliminary research, I have seen two methods for achieving this:
How to optimize calls to multiple APIs at once and return as one set?
I have a web app that searches across 2 APIs right now. I have my own Restful web service that I call, and it does all the work on the backend to asynchronously call the 2 APIs and concatenate them into one result set for my web app to use.
Calling blocking functions and execute code when result is ready, but without callbacks
I am designing an application that has some scripting capabilities: the host application may call the scripts to perform some operations when some events occur. To keep it easy and newbie-friendly, there is a single thread for everything: this means that if the script calls something blocking, the entire application hangs. So, I either use callbacks or polling to wait for a result of a blocking call to be ready. What is ugly in this approach, is that a function that happens to call a blocking function, has to be split in parts. For polling, I’d have
Atmosphere + Long Polling : No message distribution?
I’m experiencing a strange behavior with Atmosphere + Long Polling.
Single write, multiple read of stateful objects
Scenario:
What determines which Javascript functions are blocking vs non-blocking?
I have been doing web-based Javascript (vanilla JS, jQuery, Backbone, etc.) for a few years now, and recently I’ve been doing some work with Node.js. It took me a while to get the hang of “non-blocking” programming, but I’ve now gotten used to using callbacks for IO operations and whatnot.