The Global Leader in PC & Android System Health Solutions

Month: May 2008 (Page 1 of 2)

A Theory of Scheduling Low Priority Work

PC-Doctor delivers an enormous number of different products to different customers. Each customer gets a different product, and they get frequent updates to that product as well. Delivering these products requires complex synchronization between dozens of engineers. We’ve gotten great at scheduling the most important work. Our clients love us for that.

However, the low priority projects get released significantly less reliably. Until recently, I’d assumed that this problem was unique to PC-Doctor. Based on some extremely sketchy evidence from another company, I’m going to release my Theory Of Scheduling Low priOrity Work (TOSLOW).
Continue reading

Making Regexes Readable

Regular expressions are extremely powerful. They have a tendency, however, to grow and turn into unreadable messes. What have people done to try to tame them?

Perl is often on the forefront of regex technology. It allows multiline regexes with ignored whitespace and comments. That’s nice, and it’s a great step in the right direction. If your regex grows much more than that example, then you’ll still have a mess.

Click through to see another solution.
Continue reading

Anonymous Methods in C# are Your Friend

A previous post warned of some of the dangers of using Anonymous methods in C#. Yes, it’s true you can get yourself into serious trouble with these C# treats. But as you play with them some more, you can actually see that they are much more fun and less scary than you might first think.

One of the first things you need to realize when anonymous methods are created is that they capture / hijack variables that are used in that anonymous method from the scope that they were originally in. So yes, modifying the variable from a particular scope is going to change its value for everyone else within that same scope as well, regardless of which block it is executed from. This is very different from the Java way of doing things (as I understand) where a variable that is accessed from an inner class must be declared as final, read-only, uninteresting. That’s not to say that you can’t do the same thing in Java, but one dimensional arrays are such a pain. I digress. Continue reading

Nginx vs. Apache2 – in Rails Running Death Match

Recently I proposed running Nginx rather than Apache as the frontend web server for a soon to deployed Rails app that shall remain nameless. The response I received was that Nginx was unknown and likely introduced security risks. My response was, “maybe, but Nginx is faster and uses less server resources”. To which I was ordered… “prove it”.

And so I did, by setting up my Rails app on a local server with all things being the same but switching the frontend servers (Nginx, Apache) and running a set of performance tests. The results were interesting and I was able to create some pretty graphs of the results.

Continue reading

« Older posts