Thursday 11 July 2013

Piece of Algebra


The most useful C-programming snippets on the Internet
to help you find your X
There are certain moments in programming when you stumble on some problem that has definitely been solved previously. You don't need to reinvent the wheel! There are around lots of libraries, like CBLAS and LAPACK that offer a great deal of well-tested and well-documented functions for all sorts of algebraic operations. There are however cases when you do need to re-implement matrix-vector multiplication and other trivial operations. Such a case is when you're writing code for Arduino or some other low-level system. In this post I'm disclosing some of the finest code snippets known to humanity - feel free to copy and paste them in your code, change the variable names and pretend it's your own exploit and impress your friends with your skills.  :~P

Monday 24 June 2013

Constructors for C Structures

So, if you're not Chuck... consider using structures
in your C code.


Cassandra configuration

Chuck Norris can optimize Cassandra without
reading any instructions!
 In this post we'll go through Cassandra's architecture trying to explain how exactly data is stored (in memory and filesystem). It is important to have an overview of the overall workflow in order to identify critical points, optimize its performance and avoid OutOfMemoryErrors. According to the Cassandra Wiki 4GB is the bare minimum for running Cassandra and I can verify that it is necessary to have 4GB even for testing. For production it is recommendable to use minimum 8GB of RAM while some people report that 12GB is OK. In all cases, one should heed to fine tune Cassandra to avoid nasty surprises...