• I ❤ Code Review

    Code review has the proven benefit of reducing bugs, but there are so many more reasons to love code review. It is also a great way to improve code clarity, avoid the “hit by a bus” problem, learn new things, and solidify the team.

  • Why Move From WordPress to Jekyll?

    GrokCode has officially been a Jekyll site for a few months now. Why move from WordPress to a static Jekyll site hosted on GitHub Pages? Lots of reasons!

  • Snakefooding Python Code For Complexity Visualization

    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.

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

    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.

  • You Should Change Your Python Shell

    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.

  • Deploy with ‘Git Push’

    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.

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

    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.

  • Dear Python, Why Are You So Ugly?

    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.

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

    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.

  • Launching Downloadable Products Quickly

    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.

  • Be a Paranoid Pessimistic Programmer

    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.

  • What Is This Cloud Thing Anyway?

    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.

  • How To Use Source Control Effectively

    There are a number of great version control 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.

  • Ruby on Rails Hosting Reviews

    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.

  • The Ergonomic Keyboard Productivity Myth

    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.

  • Scientifically Proven Tips For a More Productive Office

    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.

  • Meta: The Anatomy of the GrokCode Redesign

    The grokcode.com 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.

  • Test Driven Development and the Meaning of Done

    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.

  • Java Build Systems: A Sad State of Affairs

    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.

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

    “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.

  • Learning Clojure with Project Euler

    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.

  • Building a Ubuntu Box

    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.
  • 51 Insanely Useful Emacs Shortcuts

    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.

  • Interview: Lynne Jolitz

    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!

  • Practice Your Code-Fu: Programming Contests and Puzzles Online

    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.

  • How To Setup a Windows SVN Repository

    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.

  • T-Shirts: Display Your Inner Geek

    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.

  • GrokCode T-Shirt Giveaway

    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.

  • 6 Easy Ways To Get Started Programming Open Source

    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.

  • Interview: Rebecca Heineman

    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.

  • Programming Syntax Brain Teasers

    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.

  • Definition and Origin of ‘Grok’

    ‘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.

  • Learning Scala With Project Euler

    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.

  • Sweet Hacks Vol III – Steampunk, Vinyl, and More

    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 jess@grokcode.com. Hacks are accepted for the series based on my whim.

  • 5½ More Books In a Hacker’s Bookshelf

    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.

  • The Power of a Programming Portfolio

    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.

  • Famous Programmers From Adleman to Zimmermann

    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.

  • The Essential Programming Language Toolbox

    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.

  • Sweet Hacks Vol II

    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.

  • Become a More Satisfied Programmer. Today.

    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.

  • Measuring Programmer Job Satisfaction

    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?

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

    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.

  • The Top 9½ In a Hacker’s Bookshelf

    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.

  • Sweet Hacks – Vol I

    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.

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

    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.

  • J2EE Application Environment Optimization Checklist

    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.

  • Ravatar WordPress Plugin for Random Avatars

    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.

  • Top 7 Development Tools

    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.

  • Using Axis to Generate Java Files From WSDLs

    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.