How to Think Like a Hacker, Even If You Can’t Code

3. Refine your basic solution. Are there any patterns in the brute force algorithm? Are some steps reformulations of other steps or already-solved problems?

4. Recurse these initial steps to the subproblems. Apply steps 1-3 to the steps/subproblems identified in step 3.

5. Implement each subproblem solution. Along the way, it’s important you design your process for repeatability. In a coding context, that means using standard best practices like defining terms (naming variables in a way that makes sense to another reader), adding explanatory notes (commenting), and formatting properly (spacing). More on that below.

6. Test each subproblem solution. Be sure to check boundary cases. Separating code into modules and rigorously testing each allows the programmer to localize errors so that instead of having to search the entire program, he or she need only search one small section. This general principle applies to pretty much any complex system.

7. Critically assess inefficiencies and iteratively improve solutions. Programming often involves returning to one’s work to make further optimizations or adjustments—ie, never being satisfied. , for example, the name of one of the most famous and elegant algorithms in computer science, was the product of decades of iterative improvements by multiple academics. The Lean Startup movement draws from this same philosophy.

8. Once all subproblem solutions have been implemented, tested, and refined, do the same for the overall solution.

How would you modify this rough pseudo-algorithm for solving problems?

While not discrete steps, two best practices are also critical for effective algorithmic problem solving:

1. Document process and results. An example of documentation is the use of metadata, defined by Frank Dilorio’s guide as “data about data and the processes that support the creation of data and related output.” Dilorio notes that designing metadata is “part fine art” and “part black art,” meaning that programmers need both an aesthetic sense and programmer intuition. To be sure, inserting metadata is extra work in the short run, but in the long run it’s a Quadrant II activity which makes your work much more useable.

2. Set up the process for long-term, unmanned use. A final characteristic of great programmers is the ability to sacrifice short-term convenience for the sake of sustainable longevity. Programming that takes easy shortcuts for the sake of expediency (e.g. non-intuitive variable naming or inefficient use of libraries) leads to unscalable, problem-ridden code. First-class programmers create with an eye for the long-term consequences of what they develop. The ability to control impulses and delay gratification is a relatively stable and important trait.

A well-known study found that children who are able to resist the temptation to eat a marshmallow for 20 minutes in order to receive a second marshmallow turn out to be better psychologically adjusted, more dependable, and to score higher on the SAT years later than children who eat the marshmallow right away. Fortunately, it is possible to improve self-control simply by thinking about the world in a more global, abstract, and high-level way.

Given the efficacy and broad applicability of algorithmic thinking, I think it should have a place in the standard academic curriculum. Here’s a proof: it’s common for employers and VCs in some of the industries with the highest recruiting standards (software, strategy consulting, finance) to hire/back people who have degrees in disciplines like philosophy, physics, and electrical engineering. This is surprising since those professions have virtually nothing to do with those intellectual disciplines.

The reason employers do this is that certain disciplines like those listed provide training in algorithmic thinking, and employers/VCs assume that if you can master those disciplines you’ll be able to master the skills to work in the specific functions for which they’re recruiting. The four highest-paying degrees in 2012 are engineering, computer science, physics, and mathematics. The marketplace clearly values them, even though relatively few students with degrees in physics or math actually work in a job that requires only those skills.

As Prof. Cathy Davidson of Duke points out, our current gold standard for large-scale testing, multiple-choice tests, was invented in 1914 on the model of the assembly line. Its creator characterized it as a way of assessing lower-order thinking. Indeed, multiple-choice tests reward rote learning.

Why not ask algorithms questions instead wherever possible? An algorithm is right if it works and wrong if it doesn’t, with better algorithms having shorter run times. Algorithmic thinking is process-oriented and exhaustive. It forces students to think meaningfully about problems: they must deconstruct the logical structure of the problem, consider every contingency, and come up with a solution. Because there is rarely a single right answer, students are always creatively engaged in finding more and better solutions. Best of all, algorithms are easy to teach. Michelle Levesque of the Mozilla Foundation, has even started testing out a few strategies to do this.

What else in your life is computable?

Thanks to Matt Joyce for help researching and drafting this, and Joan Xie for initial research.

Author: David Teten

David Teten is a Partner with ff Venture Capital and Founder and Chairman of Harvard Business School Alumni Angels of Greater New York. ff VC has made over 180 investments in over 70 companies since 1999. HBS Alumni Angels of NY is the second-largest angel network in New York. David led the first-ever study of best practices of venture capital and private equity funds in originating new deals and the first-ever study of VCs in creating portfolio company value. He has published in Harvard Business Review, Institutional Investor, the Journal of Private Equity, etc., and is the lead author of The Virtual Handshake: Opening Doors and Closing Deals Online. David is a frequent keynote speaker to audiences such as technology entrepreneurs (MIT CIO Symposium; NY Software Industry Association; Software Information Industry Association); institutional investors (Kauffman Fellows; Franklin Templeton; Association for Corporate Growth); and senior executives (Vistage; CEO Trust). He has received the highest ratings of any speaker at three different conferences. David is cofounder of the Venture Capital Access Program, which helps women and minority entrepreneurs raise venture capital from members of the HBS Angels network. He is a Mentor with Founder Institute in New York and Singapore, Dreamit Ventures, Entrepreneurs Roundtable Accelerator, Lean Startup Machine, and Startup Leadership Program. He is Founder and Chairman of Navon Partners, a data analytics startup, and formerly Acting CEO of Vertical Key, a SaaS business for managing large-scale events. He was previously a Managing Director with Evalueserve, a 2,500-person global research and analytics company, and Founder and CEO of Circle of Experts, an investment research firm acquired by Evalueserve. David was formerly Founder and CEO of GoldNames, an Israel-based investment bank focusing on the internet domain name asset class. He worked with Bear Stearns’ Investment Banking division in their technology/defense mergers and acquisitions team, and was a strategy consultant with Mars & Co. David holds a Harvard MBA and a Yale BA, both with honors. While still in college, he started and ran a computer consulting group with over 35 clients. He grew up in Marin County, Northern California, and learned to program on an Atari 800. He trains in parkour, a sport in which crossing the chasm is more than a metaphor. He speaks passable French and Hebrew but has completely lost the Portuguese he learned while working in Brazil.