Exercises

Powerful Command-Line Applications in Go — by Ricardo Gerardi (57 / 127)

The Pragmatic Programmers
The Pragmatic Programmers

--

👈 Reduce Scheduling Contention | TOC | Wrapping Up 👉

Before you move on, you may want to expand the skills and techniques you’ve explored in this chapter. Here are some suggestions:

  • Execute the tracer on the last version of the tool. Look for the new goroutine pattern. Is there a difference between this version and the previous version? Have you addressed the scheduling contention?
  • Improve the colStats tool by adding more functions such as Min and Max, which return the lowest and the largest values in a given column. Write tests for these functions.
  • Write benchmarks for the new functions Min and Max.
  • Profile the functions Min and Max, looking for improvement areas.

👈 Reduce Scheduling Contention | TOC | Wrapping Up 👉

Powerful Command-Line Applications in Go by Ricardo Gerardi can be purchased in other book formats directly from the Pragmatic Programmers. If you notice a code error or formatting mistake, please let us know here so that we can fix it.

--

--

The Pragmatic Programmers
The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.