Snakefooding Python Code For Complexity Visualization

by in Books & Tools on August 26, 2014

Snakefood is a tool written by Martin Blais to create Python dependency graphs. Combined with GraphViz, snakefood can create beautiful visualizations of Python codebases. Here are graphs for some notable open source projects written in Python. Continue reading »

How To Use Django’s Signing Functions For One Click Unsubscribes

by in Tips & Tutorials on February 13, 2014

Sometimes it is handy to allow users to change part of their profile without having to log in, as long as we can be reasonably sure of their identity. The most common use case is to unsubscribe from email newsletters, where it is annoying to have to login first. Continue reading »

You Should Change Your Python Shell

by in Books & Tools on December 16, 2013

If you write Python code, switching to IPython is the number one thing you can do to immediately improve your productivity. Bold words, I know. Let’s look at how IPython can make you a more productive programmer. Continue reading »

Deploy with ‘Git Push’

by in Tips & Tutorials on November 5, 2012

Single command deploys are awesome. When setting up a testing or production server, I always setup a script to deploy in a single command because it makes life easier and encourages frequent deploys. Continue reading »

How to Setup a Linux, Nginx, uWSGI, Python, Django Server

by in Tips & Tutorials on July 25, 2012

This is a tutorial for setting up a Linux, Nginx, uWSGI, Python, Django server with a PostgreSQL database. This is the easy, straightforward approach to server setup and deployment. The intended audience is developers or teams who need to get an application or two running in production without too much hassle. Continue reading »

Dear Python, Why Are You So Ugly?

by in Programming Languages on April 26, 2012

Dear Python, something has been bothering me for a while. Its just that, well, ummm…you’re kind of ugly. Look, you are beautiful inside: Python is a beautiful language and the Python community is open and welcoming. But Python resources are ugly enough to affect usability and adoption. This is damaging to the community. Continue reading »

Startup Sheep Vs. Non-Startup Goats (Or Transitioning From Coder to Founder)

by in Career on March 29, 2012

There is some famous research, by Saeed Dehnadi and Richard Bornat, about “programming sheep and non-programming goats.” The gist is that educators find that there are two populations of students, those who can program, and those who can’t. Each population has it’s own independent bell curve. This “double hump” persists despite variations in programming language, application type, IDE, and student motivation. Continue reading »

Launching Downloadable Products Quickly

by in Books & Tools on March 27, 2012

My intent is to give recommendations that will be of use to other programmers who are trying to quickly turn a side project into a professional product that they can sell. Continue reading »

Be a Paranoid Pessimistic Programmer

by in Career on November 22, 2011

We aren’t copy writers or social media experts; we’re programmers. We need to constantly foresee and prevent problems before they happen. Cultivating a healthy paranoia and a heavily pessimistic attitude is the path to becoming a better programmer. Continue reading »

What Is This Cloud Thing Anyway?

by in Extras on August 21, 2011

Cloud computing is the most poorly-defined, over-hyped technology that has hit the tech sector for a long time. The technology behind cloud computing isn’t particularly new or innovative, and the hype is all out of proportion to the tech involved. The true innovation of the cloud isn’t the tech at all. Continue reading »

How To Use Source Control Effectively

by in Tips & Tutorials on June 30, 2011

There are a number of great version control1 systems out there; the most important thing is to pick one and learn to use it effectively. No matter which source control system you decide to use, there are a number of universal principles that will help you to get the most out of source control. Continue reading »

  1. The terms ‘version control’, ‘source control’, and ‘revision control’ are used interchangeably here. []

Ruby on Rails Hosting Reviews

by in Programming Languages on June 17, 2011

Cloud platforms are extremely useful when launching a minimum viable product because most of the system administration is handled by the hosting provider, while reserving the option to scale up later if required. Some offer free starter plans to bootstrap applications without making an initial investment. Here is a look at the available options for Ruby on Rails hosting providers, including comments on which one is most appropriate for various types of projects. Continue reading »

The Ergonomic Keyboard Productivity Myth

by in Books & Tools on April 15, 2011

Keyboard manufacturers would have you believe that ergonomic keyboards increase worker productivity, reduce injuries, and increase typing speed, but the real benefits are murky. The body of research on ergonomic keyboards is inconclusive, with a number of studies showing that ergonomic keyboards are of dubious value or that they decrease productivity. Continue reading »

Scientifically Proven Tips For a More Productive Office

by in Career on March 15, 2011

Research shows that reordering your office can significantly boost productivity. Here are four simple tweaks, all backed by scientific research, that you can make to your work environment today to increase your productivity. Continue reading »

Meta: The Anatomy of the GrokCode Redesign

by in Extras on January 20, 2011

The redesign is now live. GrokCode is built on WordPress, and uses a custom theme. It is valid HTML5 and CSS3. Here is a quick overview of what’s new, what’s changed, and what’s still broken. Also a few notes on browser and operating system compatibility. Continue reading »

Test Driven Development and the Meaning of Done

by in Tips & Tutorials on October 23, 2010

There is quite a bit of disagreement on how Test Driven Development affects development speed and code quality. As with any programming methodology, the success of TDD depends on many variables, but research suggests that the most critical factor in the success of TDD projects is the definition of done. Case studies of projects developed at IBM and Microsoft bring a bit of empirical evidence to a debate that has been dominated mainly by anecdotes and opinion. Continue reading »

Java Build Systems: A Sad State of Affairs

by in Books & Tools on October 4, 2010

The evolution from Make, to Ant, and then to Maven has done precious little to advance the state of Java build tools. Developers are still stuck with poorly thought-out tools that force us to violate DRY and write XML tag soup. Your team may be better served using a less popular alternative. Continue reading »

Knuth’s TAOCP Vol. 4A Now Available For Pre-order

by in Books & Tools on September 19, 2010

“Combinatorial Algorithms,” the 4th Volume of Knuth’s seminal work, The Art of Computer Programming, has been a long time in the making (Volume 3 was published in 1973), but it is now available for pre-order from Amazon. TAOCP is widely regarded as the most comprehensive book on its topic and is included in GrokCode’s list of essential books for programmers. Continue reading »

Learning Clojure with Project Euler

by in Programming Languages on September 20, 2009

This article is a quick introduction to Clojure from someone still learning the language. I work through a few Project Euler problems, refining solutions along the way. In the end I give some general impressions of the language, the install and setup process, and support for Clojure within different development tools. Long time readers of this blog will remember I also used Project Euler to learn Scala basics a while ago. Continue reading »

Building a Ubuntu Box

by in Books & Tools on April 27, 2009

I’ve been in need of new workstation for a while, and finally plunked down the cash for it. I built a mid range workstation and installed the latest long term release of Ubuntu (Hardy Heron) 64 bit. The install was remarkably painless, and all of the hardware was auto-magically detected and works great in Ubuntu. Hardware support is much improved in the recent Ubuntu releases, but if you are looking for a rock solid build that just works with Ubuntu, give these specs a try. Continue reading »

51 Insanely Useful Emacs Shortcuts

by in Books & Tools on April 8, 2009

Intimate knowledge of your code editor is required to be competent and productive developer. Here is a list of shortcuts anyone on the path to becoming an emacs guru should be familiar with. This shortcut reference card covers mostly intermediate and advanced shortcuts for GNU emacs (most of them will work with Xemacs as well.) I learned some great new shortcuts while making this cheat sheet; I hope they will be helpful to GrokCode’s readers as well. Continue reading »

Interview: Lynne Jolitz

by in Career on March 17, 2009

This is the second interview in an ongoing series of interviews with famous programmers and authors of books that should be required reading for any serious developer. Lynne Jolitz is an accomplished author, 386BSD hacker, Silicon Valley entrepreneur, and all-around geek. She has long been a figure in the tech community. Regular readers will remember that she was included in the analysis of famous programmers. Lets get to the interview! Continue reading »

Practice Your Code-Fu: Programming Contests and Puzzles Online

by in Fun Projects on February 26, 2009

This is a list of the best sites on the net for practicing your coding chops, showing off your programming skills, and competing for fame and fortune. Exercise your brain by untangling obfuscation, applying algorithms knowledge, growing your inner math geek, or playing a bit of code golf. These sites have exercises to build on and refine what you already know, or learn the language du jour. Continue reading »

How To Setup a Windows SVN Repository

by in Tips & Tutorials on January 7, 2009

This is a tutorial on how to setup a Subversion (SVN) repository on Windows that allows secure connections over SSH. The tutorial also goes through setting up an SVN client and connecting to the repository. Some basic knowledge of a UNIX based command line will help, but you might be able to muddle through without it. Continue reading »

T-Shirts: Display Your Inner Geek

by in Extras on November 8, 2008

Show off your inner geek with these t-shirts from CafePress. There are quite a few classic geek shirts here: Space Invaders, Ubuntu, Whisky Tango Foxtrot (WTF!), Office Space, the regular expression version of “To be or not to be”, Lisp, and more. Click on any shirt for more info. Continue reading »

GrokCode T-Shirt Giveaway

by in Extras on November 7, 2008

GrokCode is giving away some free schwag to thank our readers this month. Up for grabs is a free T-shirt, golf shirt, or tanktop that will announce to the world that you grok code. Entering is as easy as subscribing to GrokCode via email or RSS feed, then confirming that you are an active subscriber. Continue reading »

6 Easy Ways To Get Started Programming Open Source

by in Fun Projects on October 31, 2008

Open source projects can be a good way to geek out and do what you love, and having a side project can help improve overall job satisfaction, keep you at the top of your hacking game, and can often lead to other opportunities. The problem is a lot of people have trouble making that first step because they don’t really know where to start. Here are 6 easy tips for getting started with F/OSS. Continue reading »

Interview: Rebecca Heineman

by in Career on October 17, 2008

This is the first interview in an ongoing series of mini-interviews with famous developers and programming authors. Rebecca Heineman has kindly agreed to be the first interviewee. She has been a games programmer for almost 30 years – she has written and designed many titles over the course of her career including a Bards Tale III: Thief of Fate, Battle Chess, Wasteland, and Tass Times in Tonetown. Rebecca was also a founding member of Interplay, Logicware, and Contraband Entertainment. Continue reading »

Programming Syntax Brain Teasers

by in Programming Languages on October 5, 2008

This is a collection of 4 programming brain teasers in C and Java. Some require a sudden flash of insight or knowledge of good coding style to solve, others demand intimate knowledge of the compilation process. The problems range from easy to insanely tricky. The C brain teasers come from The C Puzzle Book and the Obfuscated C Contest. The Java problems are from the Java Puzzlers book. Answers to all problems are at the bottom of the page. Continue reading »

Definition and Origin of ‘Grok’

by in Extras on September 28, 2008

‘Grok’ is a fairly common word amongst geeks and techies, and usage is especially dense within the Computer Science university crowd, but it hasn’t really permeated mainstream usage. So where did the word ‘grok’ come from? What exactly does it mean? Have you grokked grok? It only makes sense that a site called GrokCode should try to answer some of these questions. Continue reading »

Learning Scala With Project Euler

by in Programming Languages on September 15, 2008

This article is a quick journey through the mind of a Scala newbie while learning the language. I work through a few Project Euler problems, refining solutions along the way so they use more idiomatic Scala. In the end I give some general impressions of the language, the install and setup process, the Scala community, and support for Scala within different development tools. Continue reading »

Sweet Hacks Vol III – Steampunk, Vinyl, and More

by in Sweet Hacks on September 13, 2008

Well this is the third edition of the sweet hacks series. In each edition I highlight clever code, cool uses of technology, and do it yourself projects that I find on the net. Anyone is welcome to submit their own sweet hacks by sending an email to Hacks are accepted for the series based on my whim. Continue reading »

5½ More Books In a Hacker’s Bookshelf

by in Books & Tools on August 4, 2008

This is a follow up to the list of recommended books for a hacker’s bookshelf that was posted a few months ago. Here are 5½ more essential books for a hacker’s bookshelf. This list is based on reader suggestions, and like the previous list of recommended programming books, it contains a nice mix of computer science texts, developer references, and books giving insight into the programming industry. This is another list of hackers’ classics. Continue reading »

The Power of a Programming Portfolio

by in Career on July 29, 2008

Portfolios have been used for years by architects, artists, and designers, but why not for computer programmers? A programming portfolio is a great way to showcase your best work, and highlight your involvement in challenging projects. It provides a great talking point during an interview, and gives more insight into your work than a resume alone could. A programming portfolio can help you stand out from a sea of other candidates. Continue reading »

Famous Programmers From Adleman to Zimmermann

by in Extras on June 29, 2008

View an analysis of 222 famous programmers who are revered in the hacker culture as respected innovators, superstar coders, and the heroes of the computer revolution. Graphs break down the projects that propelled them to fame, the number of projects it took to make them famous, and the relative numbers of men and women who make up this elite group of famous hackers. Continue reading »

The Essential Programming Language Toolbox

by in Programming Languages on June 22, 2008

Everybody has a different idea of which languages are important. And the answer really depends on who you are and what you believe is important. I came to programming through a theoretical computer science route which initially gave me a shallow understanding of a wide breadth of topics. In this school of thought, languages are just a vehicle for learning about the big ideas in computer science. And to get at all of the ideas, you need to use a language that lends itself to the topic. Continue reading »

Sweet Hacks Vol II

by in Sweet Hacks on June 2, 2008

Welcome to Volume II of the sweet hacks series. A sweet hack can be a clever piece of code, an innovative way of solving a technical problem, or pretty much whatever strikes me as cool. This edition includes Star Wars, Twitter, Rubik’s cubes, Webcams, Pong, Legos, and The Naked Game – with such a high concentration of geekiness mixed in with a little naked code you really can’t go wrong. Read on to get the full scoop and nominate your own sweet hack for the next edition. Continue reading »

Become a More Satisfied Programmer. Today.

by in Career on May 26, 2008

In the first post in this series, I talked a bit about different indicators of job satisfaction and how you can rank your own job for each of those criteria. In this post I’ll list simple steps anyone can take to improve personal job satisfaction in each of these areas: quality of projects, work-life balance, bureaucracy & politics, recognition & respect, compensation, and teamwork. Continue reading »

Measuring Programmer Job Satisfaction

by in Career on May 5, 2008

Are you satisfied with your job? Are you satisfied with where your career path is taking you? These are important questions, and I try to take time to think about this every 6 months or so. Its usually trivial to make a general statement rating job satisfaction: “Yeah I like my job.” or “My career is going nowhere.” But what factors influence programmer job satisfaction? How can hackers become more satisfied with what they do? Continue reading »

E2: The (NP-Complete) Kids’ Game with the $2 Million Prize

by in Fun Projects on April 21, 2008

The Eternity 2 (E2) puzzle has attracted the attention of puzzle fanatics, computer programmers, and mathematicians for many reasons, not the least of which is the $2 million prize for being the first to solve it. E2 is an edge-matching puzzle with 256 pieces. The general class of edge-matching puzzles is known to be NP-Complete, but it is unknown if there are aspects of E2 that can be exploited to make it tractable. In the spirit of cooperation, a few people have made their automated solvers available online, and I have provided an overview and back-of-the-napkin analysis of two of them. Continue reading »

The Top 9½ In a Hacker’s Bookshelf

by in Books & Tools on April 4, 2008

Every hacker should have a good solid dead tree library to draw ideas from and use as reference material. This list has a bit of everything – textbooks you will encounter at top tier computer science universities, books giving insight into the industry, and references you shouldn’t be caught without. It is a list of hackers’ classics. Continue reading »

Sweet Hacks – Vol I

by in Sweet Hacks on March 13, 2008

A sweet hack can be a clever piece of code, an innovative way of solving a technical problem, or just a cool use of technology. I put together a list of 5 hacks that I think are really sweet.

I am making Sweet Hacks a regular series here at GrokCode, turning it into a blog carnival that runs every three months. If you would like to nominate your own sweet hack for the next issue, send an email to jess [AT] with a short description of the hack and a link. Or if you are a user, tag the page “for:grokcode” to put it into my “links for you section.” Continue reading »

How to Write Original Jokes (Or Have A Computer Do It For You)

by in Fun Projects on March 1, 2008

This is a Common Lisp code walkthrough for generating original jokes. You seed the generator with knowledge about different objects, and it uses that vocabulary to generate unique jokes. All of the jokes are of the form: “What do you get when you cross X with Y?” This code was originally written for my CS288: An AI Approach to Natural Language Processing class at UC Berkeley in 2004. Continue reading »

J2EE Application Environment Optimization Checklist

by in Tips & Tutorials on February 15, 2008

Optimizing J2EE applications is hard. Even if all of your algorithms have been analyzed in big-O notation and finely tuned, you can have abysmal performance due to a poorly configured environment. J2EE applications depend on many lower layers which all must be properly optimized in order to give good overall performance. This page gives a checklist of optimization tips organized by layer. It includes optimizations for the HTTP Server, Application Server, Java frameworks, database, and the application itself. This page isn’t intended to be a comprehensive optimization guide; it is a checklist of the most effective optimizations I have found that can be applied in most situations. This checklist is a good place to start before more focused optimizations – and you may even find that nothing more is required. Continue reading »

Ravatar WordPress Plugin for Random Avatars

by in Fun Projects on January 27, 2008

I was looking for a WordPress plugin to spice up comments with custom avatars, but I didn’t find exactly what I was looking for. So I hacked together the Ravatar WordPress plugin that will display a randomly generated avatar for each visitor. The icons are based on email, so a given visitor will get the same icon each time they comment. It’s totally customizable, so you can set it up with images that match your blog’s theme. Visitors can optionally choose their own avatar by setting up a Gravatar. Download the plugin here. Continue reading »

Top 7 Development Tools

by in Books & Tools on January 14, 2008

Every developer should have a collection of tools at their disposal to facilitate project planning stages, speed development, automate testing and building, organize code versions, and otherwise make life easier. Here is a list of the standard tools in my toolbox that make me more productive. Almost all of them are F/OSS and multi-platform. This list has a slight Java slant, but most of these tools are language independent. Continue reading »

Using Axis to Generate Java Files From WSDLs

by in Tips & Tutorials on December 29, 2007

Apache Axis is an implementation of the SOAP protocol. It is a framework for constructing SOAP clients and servers. A Java client application is able to use a Web Service by calling Java stub classes created from WSDL files. These WSDL files are made availible by the SOAP server application. As an example, we will go through the process of creating a jar file from WSDLs using the Yahoo’s Enterprise Web Services (EWS). The EWS platform makes Yahoo’s Search Marketing API available. Continue reading »