Steve Losh's "Teach, Don't Tell" advocates for a more effective approach to conveying technical information, particularly in programming tutorials. Instead of simply listing steps ("telling"), he encourages explaining the why behind each action, empowering learners to adapt and solve future problems independently. This involves revealing the author's thought process, exploring alternative approaches, and highlighting potential pitfalls. By focusing on the underlying principles and rationale, tutorials become less about rote memorization and more about fostering genuine understanding and problem-solving skills.
John Ousterhout contrasts his book "A Philosophy of Software Design" (APoSD) with Robert Martin's "Clean Code," arguing they offer distinct, complementary perspectives. APoSD focuses on high-level design principles for managing complexity, emphasizing modularity, information hiding, and deep classes with simple interfaces. Clean Code, conversely, concentrates on low-level coding style and best practices, addressing naming conventions, function length, and comment usage. Ousterhout believes both approaches are valuable but APoSD's strategic focus on managing complexity in larger systems is more critical for long-term software success than Clean Code's tactical advice. He suggests developers benefit from studying both, prioritizing APoSD's broader design philosophy before implementing Clean Code's stylistic refinements.
HN commenters largely agree with Ousterhout's criticisms of "Clean Code," finding many of its rules dogmatic and unproductive. Several commenters pointed to specific examples from the book that they found counterproductive, like the single responsibility principle leading to excessive class fragmentation, and the obsession with short functions and methods obscuring larger architectural issues. Some felt that "Clean Code" focuses too much on low-level details at the expense of higher-level design considerations, which Ousterhout emphasizes. A few commenters offered alternative resources on software design they found more valuable. There was some debate over the value of comments, with some arguing that clear code should speak for itself and others suggesting that comments serve a crucial role in explaining intent and rationale. Finally, some pointed out that "Clean Code," while flawed, can be a helpful starting point for junior developers, but should not be taken as gospel.
Good software development habits prioritize clarity and maintainability. This includes writing clean, well-documented code with meaningful names and consistent formatting. Regular refactoring, testing, and the use of version control are crucial for managing complexity and ensuring code quality. Embracing a growth mindset through continuous learning and seeking feedback further strengthens these habits, enabling developers to adapt to changing requirements and improve their skills over time. Ultimately, these practices lead to more robust, easier-to-maintain software and a more efficient development process.
Hacker News users generally agreed with the article's premise regarding good software development habits. Several commenters emphasized the importance of writing clear and concise code with good documentation. One commenter highlighted the benefit of pair programming and code reviews for improving code quality and catching errors early. Another pointed out that while the habits listed were good, they needed to be contextualized based on the specific project and team. Some discussion centered around the trade-off between speed and quality, with one commenter suggesting focusing on "good enough" rather than perfection, especially in early stages. There was also some skepticism about the practicality of some advice, particularly around extensive documentation, given the time constraints faced by developers.
Summary of Comments ( 53 )
https://news.ycombinator.com/item?id=43380833
Hacker News users generally agreed with the "teach, don't tell" philosophy for giving feedback, particularly in programming. Several commenters shared anecdotes about its effectiveness in mentoring and code reviews, highlighting the benefits of guiding someone to a solution rather than simply providing it. Some discussed the importance of patience and understanding the learner's perspective. One compelling comment pointed out the subtle difference between explaining how to do something versus why it should be done a certain way, emphasizing the latter as key to fostering true understanding. Another cautioned against taking the principle to an extreme, noting that sometimes directly telling is the most efficient approach. A few commenters also appreciated the article's emphasis on avoiding assumptions about the learner's knowledge.
The Hacker News post "Teach, Don't Tell (2013)" has a moderate number of comments, discussing the linked blog post about the "teach, don't tell" approach in programming and other fields. Many commenters agree with the core principle of guiding someone to a solution rather than simply providing the answer. However, there's significant discussion around the nuances and practical application of this approach.
Several commenters point out the difficulty of balancing teaching with the pressure to deliver quickly, particularly in professional settings. One commenter highlights the importance of gauging the learner's current knowledge and adjusting the teaching style accordingly, suggesting that sometimes "telling" is the most efficient approach. Another emphasizes the need for patience and willingness to invest time in teaching, acknowledging that it might slow down immediate progress but leads to greater long-term gains.
The importance of context is also raised. Commenters note that "teach, don't tell" might not be suitable for all situations, particularly in time-sensitive scenarios or when dealing with highly experienced individuals. One commenter provides an anecdote of a senior engineer preferring direct solutions, highlighting the need to adapt communication styles to the individual.
Some commenters delve into specific methods of effective teaching, suggesting techniques like asking guiding questions, breaking down problems into smaller parts, and encouraging experimentation. The Socratic method is mentioned as a relevant example.
A few commenters express skepticism about the universal applicability of "teach, don't tell," arguing that sometimes simply providing a solution is the most practical approach, especially for simple problems. One comment suggests that blindly following this principle can lead to unnecessary delays and frustration.
Overall, the comments generally support the value of teaching over simply telling, but also acknowledge the practical limitations and the need for flexibility and judgment in its application. They offer valuable insights into the complexities of knowledge transfer and the importance of considering individual learning styles and situational context.