Red-Green-Code

Deliberate practice techniques for software developers

  • Home
  • About
  • Contact
  • Project 462
  • CP FAQ
  • Newsletter

How to Learn an Algorithm

By Duncan Smith Leave a Comment Mar 11 0

QuickBars

If you want to get better at programming, you need to get better at algorithms. In some ways, that statement is tautological. To quote Computer Science pioneer Niklaus Wirth, Algorithms + Data Structures = Programs. But besides the algorithms that you write yourself, it’s also worth studying well-known algorithms such as those taught in introductory Computer Science classes. Some software developers object to that idea. They say their language or framework already provides all of the standard algorithms, or that they can easily find them on the Web. Why do they need to learn how they’re implemented? It’s certainly true that professional software engineers shouldn’t re-implement standard algorithms for the purpose of using them in a product. But that’s not the point of learning them. The reason they’re part of CS education is that they contain useful ideas. Here’s one example: In modern programming languages, you don’t have to worry about finding the end of a string. The language hides that aspect of string implementation. But by studying string manipulation algorithms in C, you find out about the idea of a sentinel value. This is helpful in understanding how leaf nodes are represented in a tree. And now you have a couple of examples of a concept you can use in other situations where you need to indicate the end of a section of data.

« Continue »

Learning to Code Online

By Duncan Smith Leave a Comment Feb 25 0

Programming With Biscuits

Last week I wrote about the benefits of working on programming fluency. But before a programmer can work on fluency, they need to learn to program in the first place. Until recently, prospective programmers had to go through a complicated setup process to get their compiler and environment up and running. There’s something to be learned from that process, but it can be a stumbling block for beginners. These days, it’s possible to skip that initial setup process completely. Over the last few years, dozens of sites have sprung up to teach programming in the browser. You can open a web site, and write your first line of code in a few seconds. Free options include Codecademy, Khan Academy Computer Programming, Code.org, and numerous others. There are also paid sites like CodeSchool and Treehouse. For a more do-it-yourself approach, or for those following a tutorial in a book, there are online compilers such as Coding Ground (formerly CompileOnline) and Ideone. You can find many more of these by searching online compiler. Online compilers are less likely to have built-in tutorials, but they do allow programmers to skip the compiler setup step, or write a quick program from someone else’s computer.

« Continue »

Communicating Fluently with Your Computer

By Duncan Smith Leave a Comment Feb 18 0

Paris Cafe

As you know if you’ve been following along, I’m currently working through a book called Competitive Programming 3. Each chapter has a set of practice problems, some of which are identified as “starred problems,” and are especially recommended. Chapter 1 contains 39 starred problems, categorized as “ad-hoc problems.” This generally means that they don’t focus on the standard algorithms that a beginning computer science student might learn. They only require some knowledge of a programming language, and the ability to turn a problem statement into an algorithm. This doesn’t mean these problems are trivial. A few are, but in general they do require some creative thinking. Some problems, such as How Many Knights, require almost no coding, but take some time to work out on paper. Others, such as Jollo, require a greater command of a programming language, and the ability to write and debug short programs (75-100 lines or so). And although these ad-hoc problems don’t involve implementing standard algorithms like binary search trees, some of them do involve well-known puzzles like finding all anagrams of a string.

« Continue »

Deliberate Practice for Software Developers

By Duncan Smith Leave a Comment Jan 20 5

the practice of programming

In Making Sense of the Deliberate Practice Debate and Coding is Underrated, I introduced the concept of deliberate practice, and suggested a specific skill that aspiring software development experts can use as their practice target. I’m now going to go into detail on a deliberate practice process for this skill. Here’s the skill description again:

Write correct, efficient, and maintainable code for a software component given well-defined requirements.

Remember that we’re not just hoping that the requirements will be well-defined. At the instant that you sit down in front of your editor to implement a section of code, your requirements have to be well-defined. If they’re not, then the code that you write becomes the requirement, possibly the wrong one. If you’re not sure about a requirement, clear up any questions before you start coding. Defining requirements is another skill with its own deliberate practice process. For the purpose of the process explained below, I’m going to assume that an expert in that skill (maybe you) has clearly defined the requirements.

« Continue »

Making Sense of the Deliberate Practice Debate

By Duncan Smith Leave a Comment Jan 6 0

reserved for instruction

Deliberate Practice

The summer of 2014 was a busy time for online chatter about deliberate practice, the specific type of practice that is designed to improve performance of a complex skill. In July, the journal Psychological Science published a paper (summary, full text) by Brooke Macnamara and colleagues, arguing that practice, even deliberate practice, plays only a small role in explaining the difference between novice and expert performance. This contradicts the argument, made in an influential 1993 paper by K. Anders Ericsson and popularized in Malcolm Gladwell’s Outliers, that even talented people make it to the top of their fields mainly by spending enough time practicing in a particular way. The new result prompted a flurry of articles and blog posts. For example:

« Continue »

  • « Previous Page
  • 1
  • 2
  • 3

Stay in the Know

I'm trying out the latest learning techniques on software development concepts, and writing about what works best. Sound interesting? Subscribe to my free newsletter to keep up to date. Learn More
Unsubscribing is easy, and I'll keep your email address private.

Getting Started

Are you new here? Check out my review posts for a tour of the archives:

  • 2023 in Review: 50 LeetCode Tips
  • 2022 in Review: Content Bots
  • 2021 in Review: Thoughts on Solving Programming Puzzles
  • Lessons from the 2020 LeetCode Monthly Challenges
  • 2019 in Review
  • Competitive Programming Frequently Asked Questions: 2018 In Review
  • What I Learned Working On Time Tortoise in 2017
  • 2016 in Review
  • 2015 in Review
  • 2015 Summer Review

Archives

Recent Posts

  • Do Coding Bots Mean the End of Coding Interviews? December 31, 2024
  • Another Project for 2024 May 8, 2024
  • Dynamic Programming Wrap-Up May 1, 2024
  • LeetCode 91: Decode Ways April 24, 2024
  • LeetCode 70: Climbing Stairs April 17, 2024
  • LeetCode 221: Maximal Square April 10, 2024
  • Using Dynamic Programming for Maximum Product Subarray April 3, 2024
  • LeetCode 62: Unique Paths March 27, 2024
  • LeetCode 416: Partition Equal Subset Sum March 20, 2024
  • LeetCode 1143: Longest Common Subsequence March 13, 2024
Red-Green-Code
  • Home
  • About
  • Contact
  • Project 462
  • CP FAQ
  • Newsletter
Copyright © 2025 Duncan Smith