Talks
Speakers
Events
Topics
Search
Sign in
Search
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
search talks for
⏎
Suggest modification to this talk
Title
Description
RailsConf 2017: Practical Debugging by Kevin Newton People give ruby a bad reputation for speed, efficiency, weak typing, etc. But one of the biggest benefits of an interpreted language is the ability to debug and introspect quickly without compilation. Oftentimes developers reach for heavy-handed libraries to debug their application when they could just as easily get the information they need by using tools they already have. In this talk you will learn practical techniques to make debugging easier. You will see how simple techniques from the ruby standard library can greatly increase your ability to keep your codebase clean and bug-free.
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
In the presentation "Practical Debugging" by Kevin Newton at RailsConf 2017, the speaker addresses the challenges developers face when debugging in Ruby and promotes utilizing the built-in tools provided by the Ruby standard library instead of relying on heavy third-party libraries. The talk is structured around various debugging techniques applicable to different types of problems: interface, state, and flow problems. Key points discussed include: - **Interface Problems:** These occur when there's confusion about the dependency structure of methods or constants. For instance, when dealing with `nil` values or undefined methods, Newton emphasizes checking method signatures and using methods like `methods` to introspect available methods on an object. - **State Problems:** These arise from incorrect assumptions about the internal state of objects in memory. The speaker demonstrates how to use `instance_variables` and `binding.irb` for quick introspection to identify what has been initialized or how object values change over time. - **Flow Problems:** Discussed as the most serious, these problems occur during runtime when developers are uncertain about the control flow leading to a specific state. Newton introduces tools such as `caller`, `TracePoint`, and `ObjectSpace` to track function calls and the lifecycle of objects, which assists in understanding how an object arrived at its current state. Throughout the talk, Kevin showcases a Minesweeper application as a practical example to illustrate these concepts. By walking through real code, he addresses common debugging scenarios, emphasizing the importance of Ruby's flexibility and the advantages of introspection. The overarching takeaway is that while debugging may require effort and careful analysis, Ruby's inherent debugging capabilities are robust and should be leveraged effectively. In conclusion, Kevin encourages developers to embrace Ruby’s tools to write cleaner, bug-free code and advocates against the dismissal of Ruby as a viable programming language, highlighting its unique advantages in rapid application development and debugging.
Suggest modifications
Cancel