Tag: programming

Programming Practice

If some entrepreneur introduced the bicycle today, no one would fund him. You have to actually learn how to use it! …I saw a controller for Guitar Hero that costs a couple of $100. You can get a decent electric guitar for that price. But you’d have to actually learn something to play it! It’s important to remember how much we lose when we think that ease of use is everything. Many things worth doing are hard, requiring a great deal of practice before you achieve mastery.

unwillingness of people to work hard to learn new skills

GMock

nice

Today, we are excited to release Google C++ Mocking Framework (Google Mock for short) under the new BSD license. When used with Google Test, it lets you easily create and use mock objects in C++ tests and rapid prototypes. If you aren’t sure what mocks are or why you’ll need them, our Why Google Mock? article will help explain why this is so exciting, and the Testing on the Toilet episode posted nearby on this blog gives a more light-hearted overview. In short, this technique can greatly improve the design and testability of software systems, as shown in this OOPSLA paper.

Mathematica Image Processing

wow. a potential shell of the future will do these kinds of transforms for everything in your field of view.

One of the main advantages of doing something like this in Mathematica is that you can trivially replicate operations for many images. Sure, you can write PhotoShop scripts; I’ve done that many times, and every time I end up swearing at the thing wishing I could use a real language (and now that Mathematica 7 is out, I finally can). Beyond a certain level of complexity it’s simply not efficient to mess around with dialog boxes and script editors: you want a real language with a real syntax and a real API.

Memory Details

As CPU cores become both faster and more numerous, the limiting factor for most programs is now, and will be for some time, memory access. Hardware designers have come up with ever more sophisticated memory handling and acceleration techniques–such as CPU caches–but these cannot work optimally without some help from the programmer. Unfortunately, neither the structure nor the cost of using the memory subsystem of a computer or the caches on CPUs is well understood by most programmers. This paper explains the structure of memory subsystems in use on modern commodity hardware, illustrating why CPU caches were developed, how they work, and what programs should do to achieve optimal performance by utilizing them

by glibc maintainer ulrich drepper. incredibly detailed, a hefty 100+ pages.

Against PCRE

This is a tale of 2 approaches to regular expression matching. 1 of them is in widespread use in the standard interpreters for many languages, including Perl. The other is used only in a few places, notably most implementations of awk and grep. The 2 approaches have wildly different performance characteristics:

Thompson NFA graph
death to PCRE