Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
RailsConf 2019 - Code Spelunking: teach yourself how Rails works by Jordan Raine _______________________________________________________________________________________________ Cloud 66 - Pain Free Rails Deployments Cloud 66 for Rails acts like your in-house DevOps team to build, deploy and maintain your Rails applications on any cloud or server. Get $100 Cloud 66 Free Credits with the code: RailsConf-19 ($100 Cloud 66 Free Credits, for the new user only, valid till 31st December 2019) Link to the website: https://cloud66.com/rails?utm_source=-&utm_medium=-&utm_campaign=RailsConf19 Link to sign up: https://app.cloud66.com/users/sign_in?utm_source=-&utm_medium=-&utm_campaign=RailsConf19 _______________________________________________________________________________________________ Have you ever wondered how something works deep in the guts of Rails or been stuck when a README says one thing but the code acts another way? Guides and docs are often the best way to get started but when they fall short, you may need to get your hands dirty. Using method introspection, this talk will show you ways to confidently explore Rails code. By looking at common problems inspired by real-world situations, learn how to dive into Rails and teach yourself how any feature works under-the-hood. Let’s go spelunking!
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 this talk presented at RailsConf 2019, Jordan Raine explores the intricacies of the Ruby on Rails framework, focusing on how developers can better understand and navigate complex codebases through a practice known as "code spelunking." Raine emphasizes that getting lost in someone else's code can often lead to deeper insights and understanding. Here are the key points covered during the session: - **Understanding Developers' Time:** Raine highlights research indicating developers spend approximately 82% of their time on program comprehension and navigation, with only 5% of their time devoted to editing code. This underlines the importance of effective navigation techniques. - **Challenges with Rails:** Raine discusses several obstacles that make Rails challenging for developers: - **Size**: A new Rails application might come with a vast amount of code, including dependencies, making it larger than the application itself. - **Complexity**: Rails is structured in small components, which can span many files, complicating the flow of logic. - **Dynamic Nature**: Rails employs conventions and dynamic code that can be confusing if not well understood. - **Familiarity**: Developers often lack familiarity with the Rails internals as they do not actively contribute to it. - **Techniques for Code Spelunking:** Raine presents techniques to explore and understand code effectively: - **Ask a Question**: Start with a specific question that needs answering. - **Start with What You Know**: Leverage existing knowledge to guide the exploration process. - **Read Relevant Code**: Focus only on the code that pertains directly to answering the question. - **Example Exploration:** Through a practical example, Raine illustrates how to navigate a method in Rails without the documentation by using method introspection. He shows how to differentiate between similar methods (e.g., `try` and `try!`) in Rails, emphasizing the importance of understanding what each method does through the source code. - **Real-World Application:** Raine presents a scenario where a developer needs to track request IDs for jobs in a background processing system like Sidekiq. He details the spelunking process used to determine how to inject the request ID into job processing, showing the iterative method of following methods to gain insights. In conclusion, Raine encourages attendees to practice code spelunking and to invest in their ability to understand unfamiliar code, asserting that small improvements in comprehension can lead to significant gains in productivity. He recommends further exploration of debugging tools like Byebug and Pry for enhanced understanding of their codebases.
Suggest modifications
Cancel