11.3: Bugs as an Opportunity for Growth

Applied Event-Related Potential Data Analysis 2e · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    Read aloud

    How

    Speed: 1×
    Light up
    Highlight

    Symbols: Mulberry Symbols, © 2018–2026 Steve Lee, CC BY-SA 4.0 (licence, the set), the site's own copies.

    From LibreTexts, under CC BY-NC 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    11.3: Bugs as an Opportunity for Growth

    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 a normal part of the process and give you some examples of the troubleshooting process. 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. 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 ask ChatGPT, Copilot, Claude, or some other AI chatbot. 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, I recommend going back and looking at the example scripts at the end of 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 was last modified on Thu, 01 Oct 2026 18:52:37 GMT and is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Steven J Luck directly on the LibreTexts platform.