Skip to main content
Social Sci LibreTexts

11.3: Bugs as an Opportunity for Growth

  • Page ID
    87990
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    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).


    This page titled 11.3: Bugs as an Opportunity for Growth is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Steven J Luck directly on the LibreTexts platform.

    • Was this article helpful?