I’m always a little annoyed I have to implement sorting Map keys by their values myself in Java. It seems like they should be a part of the standard Collections library or something. Maybe they are and I just haven’t seen it? My solution (gist) is based on feedback from Josh in the comments to [...]
Posts Tagged ‘programming’
Java maps and sorting
Posted: 1 August 2009 in UncategorizedTags: algorithms, code, collections, java, programming, sorting
Fun with trees in Ruby
Posted: 20 November 2008 in UncategorizedTags: algorithms, github, inheritance, interfaces, java, programming, ruby, ruby gems, trees
Like Java and unlike Python, Ruby does not support multiple inheritance. Also there is no explicit way to create an interface. One way Ruby lets you get around both problems is by allowing you to include a module in a class. It’s not quite the same, but with the proper planning you can duplicate the [...]
LDA in Ruby
Posted: 17 November 2008 in UncategorizedTags: c, code, computational linguistics, git, github, latent dirichlet allocation, machine learning, programming, ruby, ruby gems, rubyforge, topic modeling
Since Ruby is my new favorite toy, I thought it would be fun to try my hand at C extensions. I came across David Blei’s C code for Latent Dirichlet Allocation and it looked simple enough to convert into a Ruby module. Ruby makes it very easy to wrap some C functions (which is good [...]
Pythonic Matlab
Posted: 15 May 2008 in UncategorizedTags: computer science, functions, matlab, memory, memory management, programming, programming languages, python
I attended a Matlab training seminar yesterday with the dual topics of “Advanced Matlab Programming” and “Distributed and Parallel Computing.” Of the two, the Advanced section was more interesting, though my original motivation for going was the parallel computing part. In the morning, I felt like it was going to be a waste because my [...]
What’s in a CS degree?
Posted: 28 January 2008 in UncategorizedTags: college, computer science, computing education, java, programming, robert dewar, software engineering, universities, usc
Just what value is there in getting a degree in Computer Science (CS)? Are new graduates competent programmers? Is that the purpose of a CS degree? Should companies be spending money to train new hires out of college in the programming languages and practices that they use? Robert Dewar is a professor emeritus at NYU [...]
Donald Knuth = 70
Posted: 10 January 2008 in UncategorizedTags: alan turing, algorithmic analysis, birthdays, blogs, computer science, donald knuth, latex, programming, tex
Today is Donald Knuth‘s 70th birthday. If you haven’t at least heard of him, then you probably are not a programmer. I’ve heard several bloggers refer to him as a modern-day Alan Turing (who is widely considered the father of computer science). Knuth is sometimes referred to as the father of algorithmic analysis, so at [...]
Recommended Reading
Posted: 23 December 2007 in UncategorizedTags: code bloat, coding, java, programming, software, software engineering, steve yegge
I think this should be required reading for any novice programmer and probably even more so for established programmers. Agree with him or not, I think you’ll agree that Steve Yegge has some interesting things to say. My favorite quote: “Bigger is just something you have to live with in Java. Growth is a fact [...]
Which IDE do you use?
Posted: 10 December 2007 in UncategorizedTags: computers, eclipse, ide, netbeans, programming, software engineering, subversion
Up until recently, I was pretty old school with how I write my code. Vim, baby. No code completion only syntax highlighting. I had used a couple IDEs back when I first started taking classes, but just found them cumbersome. For my software engineering class this semester and for my project next semester, I will [...]
Java Properties
Posted: 5 December 2007 in UncategorizedTags: code, java, java tips, programming, properties, settings, software projects
I discovered the java.util.Properties class a couple weeks ago in the ginormous Java API docs. If you’ve ever created a software project where you have a lot of different settings that change frequently, this is the class for you. In my research, I implement all these different algorithms for various things, find out they don’t [...]
Python ecstacy
Posted: 5 December 2007 in UncategorizedTags: humor, programming, programming languages, python, python love, xkcd
From the most excellent xkcd: I felt the exact same way when I first picked up python. It was like finding the holy grail of programming languages. To be able to just throw things into a list and access them without having to worry about casting. To throw around functions like they were variables. To [...]


