For the longest time I couldn’t get into the IntelliJ IDE for software development, however last year I tried out PyCharm and loved it. One of the key things for me when dealing with an IDE is their VIM support and JetBrains has one of the better implementations of VIM I’ve used in an IDE. Recently I noticed the performance of PyCharm had fallen off to the point where it was becoming unusable. Little things like moving up and down in the editor window sometimes had 0.5 – 1 second lag times which is totally unacceptable. My laptop is an old Dell D830 with a Core2Duo 2.0 GHz with 4GB of memory so it is getting a bit dated but still… I was almost ready to head back to the Ecilpse platform in order to save my sanity when I thought I’d try one more time to find an answer to my performance woes.
There are lots of tricks out and about that provide advice on performance improvements, most are common sense… don’t use network drives for files, have enough RAM, blah, blah, blah. I knew none of these were my issue. Finally, however, I saw something that caught my eye, something about the JVM having performance issues with Intel’s graphic card EXA acceleration method which my laptop uses. The fix was the simple addition of the following to the pycharm.vmoptions file.
I’ll be the first to admit that this trick didn’t make PyCharm a screamer however it is certainly usable again and hopefully I can squeeze a few more months out of my old Dell
I stumbled across a nifty little module for nginx called ngx_postgres. It allows you to access a Postgres database directly through nginx and HTTP with little more than a configuration file that creates a REST mapping to your tables. Interesting idea so I thought I’d give it a spin and see if it could be useful, however there were a couple of “gotchas” in setting it up that I thought I’d document.
First adding modules to nginx requires recompiling nginx so you’ve got to get your hands a little dirty to get it going. I’m currently running Debian 6 in a hosted environment so I’ll give you the blow by blow based on my config.
I’ve been working with Celery, Twisted and Cyclone recently on a side project I have going on, however the integration between Celery and Twisted is not ideal for asynchronous programming which prompted me to jot down some notes for what I’ve worked out. Hopefully this will be useful to someone, also if anyone wants to offer a better way I’m all ears .
Celery has some built in methods to allow you to check the completeness of a remote job by calling the successful() method on a returned AsyncResult object. For example you can do something like this…
As many of you know that follow my blog I’m an avid user of Linux and Mac. I haven’t had a full-time Windows PC since around 2001, so when I need a BIOS update it can sometimes be painful since most of the tools for updating a PC’s BIOS are written for Windows. Recently I needed to update my Dell D830’s BIOS to A15 from A08 and had to do some serious Googling to figure it out so I thought I would jot it down for others.
Before we begin you’ll need two things installed on your Linux machine…
- The first thing you’ll need is the dellBiosUpdate program. Depending on your distro you’ll need to Google around and find the appropriate package for your distro that contains this program and it’s associated libraries.
- Second you’ll need either Wine installed or an old Windows PC lying around. My wife has an old Dell Windows machine so I chose to use it rather than bloat my Linux distro with Wine.
That’s it for prerequisites, the rest is easy. (more…)
Just a quick tip to share since this was not as straightforward on Snow Leopard as I would have liked. I originally went to install psycopg2 on Snow Leopard and got the following error…
In file included from psycopg/psycopgmodule.c:32: ./psycopg/psycopg.h:31:22: error: libpq-fe.h: No such file or directory