Archive for June, 2009
PitaTranslate continues to grow
Posted by abingham in Uncategorized on 2009/06/25
My little android translator, PitaTranslate, continues to grow and evolve. What started out as an exploratory project to learn android has turned into a program that I (and others, from what I gather) use every day. Some of the features planned for the near future include: Preferences dialog for changing some settings Access to translation […]
Two methods for python method access from C++
Posted by abingham in programming on 2009/06/19
Lately I’ve been exploring ways to improve the performance of some areas of code where embedded python calls are made from C++. A common and obvious (and often effective) approach for increasing performance in these areas is to forgo python and rewrite performance-critical areas in C/C++. However, I got curious about other, less invasive ideas, […]
Foreshadowing
Posted by abingham in programming on 2009/06/16
Has this ever happened to you? You’re coding something new and exciting, and you can see that you’re getting close to a big goal. You don’t want to be distracted from reaching your perceived milestone, and you leave a trail of TODOs, FIXMEs, and other notes to yourself to take care of “minor details” after […]
Euler 71
Posted by abingham in euler, programming on 2009/06/10
I finished Euler 71. It was a relatively painless problem which, for my approach at least, involved reducing a search space through a little analysis to get a performant solution. I haven’t read the discussion yet, so there may well be better approaches than mine, but I’m solving it in a few seconds. One noteworthy […]
Tricky bugs and release libs
Posted by abingham in programming on 2009/06/09
I’m wrapping up a bug right now that has to do with translating python exceptions into C++ exceptions. The translation occurrs as follows: Catch boost::python::error_already_set Import python modules which contain the exception types that I want to compare against Compare the thrown exception with the imported types using PyErr_ExceptionMatches Take appropriate actions (e.g. throw a […]
Euler 70
Posted by abingham in programming on 2009/06/04
I finished problem 70 from Project Euler. My submission was based on a largely brute-force approach, but one which was guaranteed to find the answer. After submitting, I read through the problem discussion, and the fast solutions all seemed to rely on really educated guesswork. This bothers me a bit. The guesswork for the fast […]
rst2wordpress
Posted by abingham in programming on 2009/06/04
One technology that seems to be getting some traction lately, and one that I really like, is reStructuredText, a part of the Docutils project. I use it extensively for both code documentation and "normal"documents, and I’ve reached a point where I really feel productive in it. Because I like restructured text, because I’d rather write […]
Getting started with oprofile
Posted by abingham in programming on 2009/06/02
I recently needed to do some profiling of a largish C++ program, something I hadn’t done in a while, so I did a little research into the available free options. My first stop, of course, was the old standby gprof which I quickly (though not after recompiling everything with -pg) abandoned because it still, after […]
Performance gains from transactions in sqlite
Posted by abingham in programming on 2009/06/02
Anyone who does work with databases has probably had it drilled into their head that transactions can be used to increase performance in many cases. I’ve been doing a fair amount of work with sqlite recently, and got curious about just how much transactions could help in a particular case of mine. The answer: tremendously. […]