This is meant as an extension (no pun intended) of this. Please read that first.
Hello Everyone!
I've been making extensions for about 3 months now and I've learned a few things along the way that has made my life easier, and I'm here to share those things with you. I hope you can benefit from these, and if you have any other tips feel free to leave a comment!
1. Use an IDE
I can't tell you how many times my code has broken because I forgot a colon or bracket. If you don't know already, IDE stands for Integrated Development Environment and helps you develop by highlighting syntax errors, autocomplete and more. I recommend PHPstorm for PHP and JavaScript. PHPstorm is made by JetBrains. The entire JetBrains suite is free for students.
2. Use XAMPP to run your test environment
I've seen tons of complaints about Flarum's subpar error reporting. With a few exceptions, any problem in the backend (PHP) will return a 500 internal server error. For reasons unknown to me (mostly because I haven't looked into it) XAMPP will give you more helpful errors, this is extremely helpful for debugging your code.
3. Start small
This should go without saying but don't start on the most complicated extension. My first extensions were old extensions that I fixed up to work on the latest versions of Flarum.
4. Look at other extensions' code
You can learn a ton from other extensions code. If you get stuck, see if another extension does something similar, try to figure out how it does it. At the time of writing this, most (if not all) extensions (including Flarum) are licensed under MIT. This means that you are free to copy code and use it in your projects.
5. Ask for help
The Flarum community has several ways to get in touch with other developers on the Official Discord server. This was one of the most helpful things for me. Others have likely made the same mistakes and spent lots of time solving them, so you don't have to.
6. Have fun
If you get frustrated, take a break. No one is forcing you to do what you are doing. I've found that taking a break when I'm stuck and giving my brain a rest allows me to come back with fresh eyes, and I usually solve the problem pretty quick.
I hope you all got something out of this that will help your developing. I'm excited to see what you guys come up with. We as a community would like to thank you for all the hours you put into it.
Finally I'd like to give a shout to @luceos for helping me get starting making extensions, and his continued support.