Рет қаралды 15,849
Organised code is so much easier to read, debug and maintain.
► PCBWay $5 for 10 pieces www.pcbway.com
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." - Martin Fowler (en.wikiquote.o...)
► Summary
I was taught early on in my computer programming career that beautiful code indicates a tidy, organised mind too - and probably leads to code that works first time, is easily understood by others and can be maintained in the years to come.
In this video we look at how we turn "prototyping code" into a well-structured, modular program by separating the various components of the program into separate files.
All the code in the video is available in the GitHub for you to play around with:
github.com/Ral...
► Hardware used in demo project:
LCD screen INCL I2C backpack (ships from UK): www.banggood.c...
Separate Backpack (for bare LCD screen): www.banggood.c...
DS18b20 temperature sensor (TEN pieces): s.click.aliexp...
DS18b20 Waterproof version (1m cable): s.click.aliexp...
Pictures and more info in my GitHub: github.com/Ral...
► Next Steps
The next video (BB10 in this series) progresses this theme and will cover namespaces - which goes some way towards getting rid of true globals. Grr!
Stay tuned!
► Useful or interesting video? You can support my channel:
Buy Me A Coffee! www.buymeacoff...
► List of all my videos (Special thanks to Michael Kurt Vogel for compiling this)
bit.ly/KZbinV...
► If you like this video please give it a thumbs up, share it and if you're not already subscribed please consider doing so and joining me on my Arduinite (and other μControllers) journey
My channel, GitHub and blog are here:
------------------------------------------------------------------
• / ralphbacon
• ralphbacon.blog
• github.com/Ral...
• buymeacoffee.c...
------------------------------------------------------------------