How I learned to stop worrying and love Findbugs

Update: I know this is about a year late. I should do git stash pop more often. Also, after tweaking Jekyll Bootstrap too much I’ve decided to give up and port to something sane like Ghost or Octopress. The Five Stages of Grief Here is a cycle I see repeating in programmers (including myself) whenever a static analyzer is introduced in build process too late in the game. Denial: Before running anything “My code is awesome, the static analyzer will not catch anything for sure.” And after running – it should be a minor fix to resolving any issues Anger: ...

September 20, 2013 · 4 min · NextDoorHacker

Installing Emacs 24.2 from source with Checkinstall on Ubuntu 13.04

Caveat This isn’t very well written, I might revisit this at some point. These are really just my notes in installing emacs and some reasons why I’m going out of the vim world in response to some crazy issues I’m having. I recently decided that I should give Emacs another go. As you might know based on my posts that I really like vim. It’s just simple and easy to find everywhere. Great for sysadmins and programmers alike. What I’ve been finding is the same kind of bloat that I saw in Emacs years before. As I kept adding more languages and features to use Vim as more of an IDE (for clojure specifically), these warts became more apparently. For example, I was segfaulting my vim editor every once in a while while editing Clojure because something odd was happening with my syntax analyzing plugin and the vim buffer. There are additional problems with Vim and Clojure that I found.. say, you absentmindedly wrote a code like this. I use the magnificent Vim Fireplace plugin to code in Clojure. ...

July 20, 2013 · 4 min · NextDoorHacker

Perfect Vim Setup for Go

So, the more I use Go, more I like what I’m getting. It’s one of the very few languages that guides you to write better code right off the bat by making it easy and not pedantic. I have a big rant in my head about this but I’ll save you the pain. This was one thing my vim setup was missing. As my go programs became bigger, I kept thinking, I’d really like better autocomplete and, heck, even syntax highlighting. I’ll focus on two ways to do this for vim, one without using Pathogen, Vundle and one using Pathogen ( I don’t use Vundle but the idea is the same ). ...

July 5, 2013 · 3 min · NextDoorHacker

Nicer Music Posts

So, I found this awesome library called VexTab that allows you to write down musical notations in a simple syntax and generates a HTML5/javascript rendering of the notation. I have some little snippets to allow rendering chords and tabs with/without notations. This will be specific to Jekyll generated sites on Github, you can be much cleverer on your server. It’s almost too easy but here you go. How to include music notation in your blog – you can ignore raphael.js and chart/chord.js files if you don’t want chord representations. Put these files in your html from vexflow/vextab projects. <script src="/js/raphael.js"></script> <script src="/js/jquery.min.js"></script> <script src="/js/underscore-min.js"></script> <script src="/js/vexflow-min.js"></script> <script src="/js/tabdiv-min.js"></script> <script src="/js/chord.js"></script> <script src="/js/chart.js"></script> <script src="/js/music-post.js"></script> ...

April 14, 2013 · 2 min · NextDoorHacker

Organizing Research Papers

I keep finding myself asking this question way too often I definitely read that in a paper (or, blog post, quora article) a while back, where was it? Most often it’s either in one of my moleskine notebooks (seriously, those things are incredible - I keep two), date stamped with some scribble or on Evernote. I don’t get annotations and in-place notes. I like to scribble on the side a fair bit and annotate. While iAnnotate apps work, I can’t save that to Evernote yet, while keeping it editable. While I’m pretty sure Evernote or Dropbox can be adapted to do all of this with some cleverness or discipline, but here’s some of the research I did on how to organize your documents, research papers. ...

January 31, 2013 · 4 min · NextDoorHacker

Wi Fi Diagnostics, monitoring tool in OSX

I recently found this hidden/undocumented tool (at least not in Network Preferences) in OSX while trying to debug some wireless connectivity issues at the house. Most modern Linux distributions already come with a few of these tools to do monitoring, watching when the network drops, or just monitoring signal vs noise ratio. I wont go into the detail of how to do that with Linux (perhaps another blog topic). If you want to checkout the Linux side, you might want to start here . ...

January 5, 2013 · 2 min · NextDoorHacker

Moving on to Jekyll Bootstrap

So, I finally decided to port this site to Jekyll-Bootstrap along with a bunch of other projects. There are some helper functions in Jekyll Bootstrap that I find very convenient to use. Particularly since I’m using ruby/rake all the time, it’s easier to just run the rake post command to just post whatever you need to. I’ll add a few more things in the future. Right now, I’m just testing a bunch of things and didn’t exactly pay much attention to making the site look good. ...

December 10, 2012 · 1 min · NextDoorHacker

Abusing Git pre-commit hooks for fun and profit

So, git pre-commit hooks are executable files (yes, you have to declare them as chmod +x - for some reason I forget this every time I write hooks) that are run right before you commit. This type of stuff lets you verify that your application is working, run a few tests, etc before it gets committed. At least the current use case I have (that probably illustrates the point of this particular hook fairly well) is related to this website. So, as I started working on this, I realized that categories are implmented as user plugins which aren’t allowed by github-pages for security reasons. Since all I’m doing is generating a static website, that doesn’t really matter as long as I copy the categories directory to the root, right? Why not automate that shit? ...

January 19, 2012 · 2 min · NextDoorHacker

PHP isset with variable name

I wont try to justify PHP hacking but I was working on a project that’s based on CodeIgniter. It’s on a cycle of heavy refactoring. I was wondering if I could do something like isset("variable_name"); similar to python "variable_name" in globals() Same idea with locals() in python. Thankfully, php has the equivalent of globals() being $GLOBALS which would return you all the variables declared so far. Now you can just write your own isset_varname(). get_defined_vars() is equivalent in php to locals(). in python. ...

January 18, 2012 · 1 min · NextDoorHacker

New Blag - how I learned to stop worrying and love Jekyll

So, I’ve been thinking about this for a while and I finally decided to pull trigger on moving my site fully to github. Let’s see where this goes. Also, I want to give a little intro on how to build a site like this (very bare-bones right now, I’m not very fancy). Originally, nextdoorhacker.com was running on a Linode box that I owned since 2008 (summer of freshman year, oh the times), since I was doing a lot of PHP around then, I ran wordpress on it. Later on, I ran 4legs.org on it along with a wide-assortment of side projects. But wordpress tends to get really annoying to manage if someone isn’t paying you to do it. For me, blogs have always been luxury. So signing in, writing some stuff in a textbox, obsessing over the typeface, getting annoyed over wordpress messing up the format and above all, keeping up with the security patches, new versions becomes work for a blog that probably total of two people ever read. ...

January 16, 2012 · 2 min · NextDoorHacker