I created an account on Stack Overflow, then deleted it within a few hours

Like many developers I come across Stack Overflow pages with some frequency when performing research. I came across a question to which I had an answer and I decided to was time to try and contribute. Well, my answer was deleted, and then the question was deleted, and at no time did I get any …

Continue reading ‘I created an account on Stack Overflow, then deleted it within a few hours’ »

Disabling NetworkManager dnsmasq integration

I’ve disliked the NetworkManager dnsmasq integration for some time. As far as I understand it has caching turned off by default so I’m not sure what the rationale is at all. So disabling means 1 less system process and less magic on the system (since resolv.conf will reflect the actual nameserver settings rather than be …

Continue reading ‘Disabling NetworkManager dnsmasq integration’ »

Reducing memory usage of rsyslog

I’ve never been a big fan of rsyslog, preferring syslog-ng instead. However, I am giving rsyslog another chance. One of my biggest problems with rsyslog has been it’s high memory usage, documented by many people in many complaints that can be found using google. Now this emmory is usually, though not always, virtual and not …

Continue reading ‘Reducing memory usage of rsyslog’ »

Stumbling on cool things

I’m interested in emulators, always have been, and I was wondering if anyone had used LLVM to write an emulator. I came across this highly detailed account which was a fun read: Statically Recompiling NES Games into Native Executables with LLVM and Go It concludes stating that static recompilation is probably less practical than JIT, …

Continue reading ‘Stumbling on cool things’ »

Amazon’s new TLS library

s2n source s2n announcement I’m liking what I see, good design principles, aiming for simplicity and reviewability. I would not be surprised to see this become a huge success as people eschew the extra functionality of OpenSSL (and others) in favor of software with less security risk. Amazon’s backing is likely to propel s2n over …

Continue reading ‘Amazon’s new TLS library’ »

Important detail for Rails apps at a sub-uri

When using passenger with an app deployed to a sub-uri most details of app paths are handled automatically. However, when deploying an app the precompiled assets using helpers such as asset_path will get the wrong path because it doesn’t know about the sub-uri. The solution is to set Rails.application.config.action_controller.relative_url_root in an initializer or environment to …

Continue reading ‘Important detail for Rails apps at a sub-uri’ »

Ruby best practices: count, length, size

When to use which: Hash size and length both call RHASH_SIZE which is O(1) count is enumerable.count which is O(n) – use only with block best practice: length without block, count with block Array size is an alias for length length calls RARRAY_LEN which is O(1) count is O(n) – use only with block best practice: length …

Continue reading ‘Ruby best practices: count, length, size’ »

Performance problems with FreeTDS

So FreeTDS is the glue between a linux systems and SQL Server, among other things. For my purposes I’m mainly using it to run Rails with a SQL Server backend. My understanding is that the alternatives to FreeTDS are Microsoft’s SQL Server ODBC Driver 1.0 for Linux or, if using JRuby, Microsoft’s JDBC Driver for SQL Server. But why …

Continue reading ‘Performance problems with FreeTDS’ »