Code Architecture - Optimize your code for the future
Michael Haynes
Software Developer with expertise in Audiovisual, DSP, AV Design, Content Creator and Extron , Crestron , QSC , Biamp ,AMX, Lutron ,and iOS Programmer. ?? Tech & Photographer Wizard.
Most computer science degrees start with design patterns. Some of the first course work that you would take for Electronic Engineering is circuit analysis. These classes are developed to change the way that you think and analyze problems. To become an engineer, you must learn to think differently.
?
?
I remember my first elective was a foundation course in computer science. But it did not have a single page of code in it. The course was designed to change the way that you look at problems, not to teach a programming language. In the audiovisual industry, I have seen one common thread between different programmers in the audiovisual field in that their code is static. There is some type of fixed relationship in the number of buttons on the touch panel or control ports on a processor and the amount of code. If you add more buttons or control ports the code increases. Most would never question this design practice. But this is why those fundamental computer science and electronic engineering classes are critical.
?
?
“In computer science, program optimization or software optimization is the process of modifying a software system to make some aspect of it work more efficiently or use fewer resources.” — Wikipedia
?
“Scalability is the capability of a system, network, or process to handle a growing amount of work, or its potential to be enlarged to accommodate that growth.” — Wikipedia
?
As companies look to reuse code (to increase profit) or programming for a project involving a skyscraper project with hundreds of systems, the static relationship between button and code does not provide code optimization or scalability. With code optimization, audiovisual programs can be designed with the capacity to be changed in size or scale. The amount of code or files needed to for a full audiovisual system can be the same for two or 200 rooms. Besides the code that is related to physical and ‘virtual’ ID’s (touch panels and control processor ports), optimization can provide dealers an option to reuse code regardless of the number of rooms. In fact, for jobs with divisible rooms, the same code can be configured to combine modules.
?
How do you design an audiovisual code architecture that is scalable and provides code optimization? Some Crestron programmers (SIMPL Windows) include everything in their template programs. With cross point symbols and/or commenting out code, they can change what is being controlled. But this type of code architecture does not describe code optimization or scalability. Reflection can be used to provide audiovisual code architecture, effective use of resources and code scalability.
Reflection is the ability of a computer program to examine, introspect, and modify its own structure and behavior at runtime.
?Using modules, virtual devices and reflection, a code package can be designed to initialize two or 200 rooms. Changing a variable can determine how many module references are running on an AMX, Crestron, Extron (python) processors or Utelogy Systems. Instead of sending commands to a device, your code sends commands to a virtual device. Through reflection (ReBuild Event commands), virtual objects can be reassigned to different control ports. A module can send commands to other modules which send control commands to serial and IP devices. This type of code design is scalable and will support systems with divisible rooms. Modules and virtual objects communication can be configured at run time. Virtual devices can be variables and reflection can be applied to change the command strings and control ports location.?
No additional third-party applications are needed to design code architecture that is optimize and scalable.
For information about source code, please read Source Code Revealed. The Source Code Revealed article will discuss what audiovisual dealers and manufactures need to know about source code, file extensions, wrapper code, and source code for modules.
领英推荐
Some benefits of this type of code architecture:
With optimize and scalability design code, dealers can increase their profits and provide an enhanced user experience for their customers.
Programming is a life-long learning experience. Experienced software engineers seek to find solutions to problems they haven’t solved yet because it gives them the opportunity to learn more. If you find yourself waiting for the moment when you finally feel like you know everything their is to know about coding, know this: the day you’re waiting for will never come.?Please follow me on social media and I will be posting (open source) examples of code architecture. Those examples will show how optimize, audiovisual, code can use asynchronous timelines and threads to design multithreaded applications.
Resources
?
Software Developer with expertise in Audiovisual, DSP, AV Design, Content Creator and Extron , Crestron , QSC , Biamp ,AMX, Lutron ,and iOS Programmer. ?? Tech & Photographer Wizard.
5 年Crestron Masters - Caribe Royale Orlando,03/31/2020 https://www.dhirubhai.net/posts/michaelshanehaynes_crestronmasters2020-crestron-cariberoyaleorlando-activity-6613609867448066049-8ftT #Crestron #CaribeRoyaleOrlando #Orlando #training? #socialmedia ?