All you need is cache
What is cache More than a formal definition, I think that the best way of thinking about cache is an result from an operation (data) that gets saved (cached) for future use. The cache value should be identifiable with a key that is reasonably small. This normally is the call name and the parameters, in some sort of hashed way. A proper cache has the following three properties: The result is always replicable. The value can be scrapped without remorse. Obtaining the result from cache is faster than generate it. The same result will be used… Read More
Gorgon: A simple task multiplier analysis tool (e.g. loadtesting)
Load testing is something very important in my job. I spend a decent amount of time checking how performant are some systems. There are some good tools out there (I’ve used Tsung extensively, and ab is brilliant for small checks), but I found that it’s difficult to create flows, where you produce several requests in succession and the input depends on the returned values of previous calls. Also, normally load test tools are focused in HTTP requests, which is fine most of the time, but sometimes is limiting. So, I got the idea… Read More
The most annoying thing about online advertising
Right now there is a lot of discussion about how invasive and intrusive online advertising is, including the effects it has in performance. The funny part? I am still getting advertising that hardly qualifies as “targeted” or “interesting“. By now the whole internet should have a lot of contextual information on where I spend my time, what are the pages I read, and what interest me. What kind of ads I see? The same products I see on the broad TV. Just the usual cars, insurance, cleaning products. Plus the spammy “you’re the 10,000,000th… Read More
Typewriters
I have to say that sometimes I am incredibly surprised with some things. The last one has been to transform an old typewriter into a valid USB keyboard. This baffles me, because I am old enough to remember a word with typewriters. Well, I’m not that old. I only used a typewriter very briefly, on my school years, but I was close enough to people using them, most in particular, my grandfather. My grandfather was a journalist and writer, and for most of his life, he used a typewriter for quite a long time… Read More
Compendium of Wondrous Links vol X
More interesting reads worth checking out Tech Use Python on AWS Lambda instead of JavaScript. Create Escher like images using Julia. BeeWares, a collection of tools to help in all the phases of Python development Crete project templates with Cookie Cutter. An interactive Maze Solver. About development I’ve still confused with this “learning code is cool”, as this article says. I’m not sure if this is a bad time to be a beginner. Yes, it’s true that too many options is confusing, but the amount and quality of instructional material at the moment is… Read More
Leonardo numbers
Because Fibonacci numbers are quite abused in programming, a similar concept. My first impulse is to describe them in recursive way: But this is not very efficient to calculate them, as for each is calculating all the previous ones, recursively. Here memoization works beautifully Taking into account that it uses more memory, and that calculating the Nth element without calculating the previous ones is also costly. I saw this on Programming Praxis, and I like a lot the solution proposed by Graham on the comments, using an iterator. The code is really clean.
ffind v0.8 released
Good news everyone! The new version of find (0.8) is available in GitHub and PyPi. This version includes performance improvements, man page and fuzzy search support. Enjoy!
Optimise Python with closures
This blog post by Dan Crosta is interesting. It talks about how is possible to optimise Python code for operations that get called multiple times avoiding the usage of Object Orientation and using Closures instead. While the “closures” gets the highlight, the main idea is a little more general. Avoid repeating code that is not necessary for the operation. The difference between the first proposed code, in OOP way and the last one The main differences are that both the config dictionary and the methods (which are also implemented as a dictionary) are not… Read More
John Siracusa’s OS X reviews
Today John Siracusa announced that he won’t be making more OS X reviews. Typically journalists or reviewers don’t announce that they stop doing something. They just stop doing it, and maybe explain it after someone asks them. But John’s reviews were something truly special, and a lot of people on the tech world has lamented the announcement. I think that the Mac community has always been quite vibrant and passionate, allowing detailed discussion. Crossing the line of obsession sometimes. In other tech worlds, the discussion is more cold and rational, even aseptic…. Read More