11.3: Bugs as an Opportunity for Growth
selected template will load here
This action is not available.
No matter how much prior experience you have, you need to be prepared for some frustration in this chapter. First, mistakes and bugs are inevitable in programming. As I’ve said before, you need to think of mistakes and problems as opportunities for learning. In fact, I encourage you to play with the example scripts in this chapter, changing them to see how they work or to try new things. You’ll get lots of error messages, but that’s actually part of the reason for playing. And that’s why I wrote the Troubleshooting Guide in Appendix 2.
I made literally hundreds of mistakes while creating the example scripts in this chapter, and I can’t count how many times I heard Matlab’s error sound. Most of these mistakes were small and easily fixed. But others were more conceptual and took some time to understand and remedy. In this chapter, I’ll describe some of my mistakes, how I discovered them, and how I solved them. I want to both show you that making mistakes is part of the process and give you some insights into troubleshooting approaches. There are probably still some mistakes in the scripts for this chapter. If you see something that doesn’t quite make sense, it could well be an error on my part.
As you go through the chapter, keep in mind that there are millions of small details about Matlab and EEGLAB that I don’t mention. If I provided every possible detail, this chapter would have turned into an entire book, and it probably would have required several volumes. I wanted to keep the chapter reasonably brief, so I’m counting on you to draw inferences from what you see and to figure some things out for yourself. This will be a little frustrating at times, but you’ll learn a lot more this way. When you have questions, do what I did hundreds of times while writing this chapter: Google it. Or ask someone with more experience. Or post a question via email to the EEGLAB or ERPLAB listservs. And don’t forget about the Troubleshooting Guide in Appendix 2.
Once you’ve completed the exercises in this chapter, you should take a look at the example scripts in the previous chapters. They include examples of specific processing steps and options that aren’t covered in the present chapter. You can also find lots of examples of EEGLAB/ERPLAB scripts online, and you may have labmates or colleagues who can provide example scripts. However, I have an important rule about this: you should never apply someone else’s script to your own data unless you fully understand every line of code in that script. People often violate this rule, and they end up with garbage (and often don’t realize it).