mikeash.com: just this guy, you know?

Posted at 2008-12-13 05:00 | RSS feed (Full text feed) | Blog Index
Next article: Friday Q&A 2008-12-19
Previous article: RAOperationQueue, an open-source replacement for NSOperationQueue
Tags: fridayqna
Friday Q&A
by Mike Ash  

In an effort to liven up the blog a bit, I thought I would start soliciting topics from the readership. Given the large number of comments on certain past posts and the couple hundred unique hits to my RSS feed URL every day, I'm hoping that this might just work out.

My plan is to solicit topics every Friday and answer the following Friday. If volume is large then I will pick and choose. This opportunity may not present itself but I can hope. I can't promise to be on time or to not skip a week now and then, but I realize that for this to work I have to be at least somewhat punctual, so I will try my best.

As such, this is my first solicitation for topics. Please keep things on topic, which is programming and software development. I don't want to get started on current events or politics or anything of that sort! I prefer Mac-related stuff but will take anything within my sphere of imagined competence. It can be a specific question about one thing, a larger-scale question about architecture, design, or what have you, or even just a general subject area to discuss. Some examples might be how to use gdb to inspect the arguments passed to functions you don't own, why blocks in Objective-C are such a good thing, or how the ongoing multicore revolution will change the way things are done. I want this to be pretty freeform so go wild.

So let's give this a good shot and generate some interesting discussion! If you have a suggestion, leave it in the comments here or e-mail it directly to me at mike@mikeash.com. I will use your name unless you specifically direct me not to, so if you want to be anonymous or use a pseudonym, please say so.

Did you enjoy this article? I'm selling whole books full of them! Volumes II and III are now out! They're available as ePub, PDF, print, and on iBooks and Kindle. Click here for more information.


I have seen that you know a lot about threading and writing code that does a great job of utilizing all cores of a computer RAOperationQueue being a recent example. How did you get into this? Was it something that interested you, so you learned it? Or was there just a need, where you work?
Given your work on both GPULife and RAOperationQueue, I'd be interested in hearing your thoughts on when to use the different forms of parallel processing available to developers; what you see as appropriate, acceptable, and incorrect.
how about something on OpenCL?
Worker threads / operation queues are very clean and easy-to-understand techniques to implement the concurrency in an application. Their use also seem to lead to better design, since they force the developer to model the application in terms of processes which may be executed in parallel. Spawning new threads manually with detachNewThreadSelector:.. on per need basis seems to decrease code readability and maintainability, since application's runtime structure (i.e. threads) isn't reflected in application's static structure (i.e. classes/components). So there seems to be a relationship between operation queues and components their are part of - e.g. a cache component has an operation queue of caching operations, an image processing component has a queue of image processing operations etc.

Would you like to discuss about software design in terms of potentially parallelly executable processes?

Comments RSS feed for this page

Add your thoughts, post a comment:

Spam and off-topic posts will be deleted without notice. Culprits may be publicly humiliated at my sole discretion.

The Answer to the Ultimate Question of Life, the Universe, and Everything?
Formatting: <i> <b> <blockquote> <code>.
NOTE: Due to an increase in spam, URLs are forbidden! Please provide search terms or fragment your URLs so they don't look like URLs.
Hosted at DigitalOcean.