How I Learned to Stop Worrying and Love the Bomb
Read Full Article
Errors are your friends. This idea was difficult for me to grasp when I first started programming. A typical block of work time would consist of the following: Write some tests and some code that should theoretically make those tests pass Run the tests Get terminal output similar to the image above Panic I would watch my screen fill up with terrifying error messages and I'd freeze. Yes, I know my code is broken thankyouverymuch. It took me a while to appreciate that what lay before me on the screen was not a pile of computer word vomit but rather a roadmap of sorts, and all I needed to do was learn how to read it. To be completely honest, I hated school until I figured this out. One of the most important things a new developer can do is learn to read a stack trace. So, how does one learn to read a stack trace? Read on for some tips: Practice. The more error messages you read, the easier it gets. This is true for just about everything when it comes to programming, but especially so with stack traces. If you're just starting out, ask someone for help. The more you practice, the better you'll get at learning to... Recognize Patterns. If one error is intimidating to a new programmer, then multiple are just downright scary. But often, a single mistake in one's code will have a cascading effect across the entire codebase. Stack traces let us see this easily. For example, if five tests are all failing with error messages that all implicate a particular method, chances are good that this is a place to start troubleshooting. In this case, the stack trace becomes a step-by-step guide to fixing errors or refactoring. Learn What to Ignore. Most stack...
Upload Background Image