Automator weekly meeting- Proper coding in AutoHotkey
Channel: AUTOHOTKEY Gurus
Date: 2024-01-10

Every week we have Team calls where Isaias levels us up.  I often record them and will try and share more of them if y'all like the video...
TLDR: Developers should focus on proper code organization, indentation, and error handling to improve the efficiency and maintainability of their scripts.

1. 00:00 📅 Be careful when including a library in a program, specify the file location correctly, and automatically download the Chrome driver if needed.
 1.1 The dot in the file path changes meaning when including a library in a program, and it means to look for the Library folder that pertains to the file.
 1.2 Including a library into a script from the working directory may fail if the library folder does not contain the necessary files, so it is important to be careful and specify the file location correctly.
 1.3 Include the rufadian library into your project, check if the file exists, and automatically download the Chrome driver if needed.

2. 04:10 📅 The developer is considering user-friendly library downloads and driver prompts, discussing user input handling and code organization for easier maintenance.
 2.1 The developer is considering whether to let the user decide how to download a library or to make it easy for them by just downloading it, and is also discussing how to prompt the user to download the necessary driver.
 2.2 The speaker discusses the process of handling user input and creating a function to download a driver based on user selection.
 2.3 Message boxes are for users, errors are for developers, and it is important to differentiate between the two in order to ensure that the user is making the decisions, not the developer.
 2.4 Organize classes into separate files, but if a class has sub classes, put them all in one file for capabilities, and if a class is just a subclass, put it inside the main class file.
 2.5 Get used to alignment and indentation in code to make it easier to fix later on, as the lack of alignment makes it difficult to understand and fix the code.

3. 12:22 📅 Indentation in coding is crucial for team collaboration, with the speaker emphasizing the importance of using tabs over spaces for control and choice in V2 organization.
 3.1 Indentation is important in coding, as different people have different preferences, and it is crucial for code to line up when working in a team.
 3.2 The speaker discusses the importance of indenting code with tabs instead of spaces in order to maintain control and choice.
 3.3 Changing tab indentation to spaces removes the speaker's choice and makes it difficult for others to work on the same code.
 3.4 The idea of V2 is to be organized in a way that makes it easier to work on and collaborate.

4. 18:06 🔧 Focus on fixing indenting and improving the downloads function, utilize the Json Library, and seek help from others to avoid unnecessary time spent on problem-solving.
 4.1 Fixing indenting is complicated, work on the downloads function, use the Json Library, and apply the changes.
 4.2 Experimenting with preferences and not spending unnecessary time fixing issues by asking for help from others who may have already solved the problem.

5. 21:10 📅 Seek clarification to avoid wasting time, focus on proper code indentation, and discuss creating a script for typing "clipboard" sarcastically and a shortcut to a dynamically updating folder.
 5.1 It's better to seek clarification and explanation from others to avoid wasting time on fixing issues that someone else already knows the answer to.
 5.2 The importance of proper code indentation and the impact it has on readability and collaboration.
 5.3 The team discusses writing a script to type out the word "clipboard" sarcastically and creating a shortcut to a folder that dynamically updates based on its content.

6. 24:41 📅 Automator team discusses creating dynamic shortcuts, using backslashes for improved readability, and setting destination paths for V2 scripts.
 6.1 The speaker discusses the idea of creating a dynamic shortcut that updates based on the current month to avoid manual navigation.
 6.2 The speaker discusses using backslashes instead of dots in file paths and the improved readability in V2 compared to V1.
 6.3 The speaker discusses the working directory and setting the destination path for a V2 script.

7. 28:12 📅 The speaker emphasizes the importance of breaking up text, aligning code, and maintaining consistent parameters in V2 script development.
 7.1 The speaker discusses the importance of breaking up long lines of text to make it easier for people to read.
 7.2 The speaker discusses aligning code and adding variables for a V2 script, including the base folder, destination path, and icons as parameters.

8. 33:24 📅 Developers should handle errors for file creation, ignore errors for file deletion, and leave errors for file shortcuts not being created for developers to address, emphasizing the importance of using notify and ignoring irrelevant information