1. Don't shirk on good practice. Most AHK code in the wild is jank because most AHK coders aren't software developers, they don't know any better. But you do, so use functions, proper data structures, abstractions, etc and the process will be a lot nicer.
2. You can use window groups to restrict a hotkey to just web browsers (via IfWinActive) or make a hotkey that alt-tabs through a specific set of programs (via GroupActivate)
3. The #If directive takes expressions. I have Numpad- flip a `subscript_mode` flag and two sets of hotkeys that are conditionally activate. That way I can use the same keycombo for ¹ and ₁
4. Find ways to group similar operations under the same root hotkeys. My favorite trick is using Input to make hotkeys that are two keypresses *in sequence*. So `^+d` could be the "open file" root, and the letter you press next determines *which* file
5. If you're doing the Input trick and storing options in an object map, be aware that dicts are case insensitive and you'll have problems if both `a` and `A` are in the dict. I built a weird workaround, you should probably just use a COM object docs.microsoft.com/en-us/office/v…
6. Also you can't index on strings, you have to use SubStr, but AHK will silently fail without giving an error if you try to index, which is hair-pullingly hard to figure out
7. `^d` is the hotkey "ctrl+d". `>^d` is the same, but ONLY when right ctrl is pressed. I use this to only place hotkeys on the right modifiers so I can use the left modifiers for the system default hotkeys
9. AHK is godawful at lots of things like database access, datetime processing, and string munging. If you have to do that, you're better off using RunWait to call an auxiliary program and doing the calculations there
11. Most remote presentation clickers work by sending keyboard codes to the computer, you can use AHK to make them into remote controls for any app. I once had my clicker restart songs in Spotify to practice a dance thing
12. Most programs don't let you remap keyboard shortcuts to mouse buttons like ctrl+middleclick or MouseWheelLeft, but you can add mouse shortcuts in AHK! eg
14. My favorite hotstring sigil is `;`, because there's basically never a situation where an alphanumeric character follows a ; in English or software.
15. Gleefully abuse the "hotstring helper" at the bottom of this link, it's great
While you could teach adults with Scratch, they'll probably feel patronized. Scratch's tutorials are all aimed at kids, and the language primitives are for art and games, not business or automation.
2. Quorum: an "evidence-oriented programming language". Fairly typical OOP lang, but with design decisions based on empirical studies of what's easiest to learn to and use. For example, STM over locks, static typing, better keywords and compiler errors
Aella expected Python to be like other "computer skills", where you can poke at it until it does what you want. And you can do this IF YOU ALREADY KNOW HOW TO PROGRAM. But it's not clear to layfolk that programming is so different from reg computers
When we say Python is a good "first language", we mean it's good a place to start building the *fundamental knowledge* of software development. If you don't build that knowledge, programming is nearly impossible. Again, that's not clear to Aella going in
One of my favorite things with learning about new programming languages is seeing all the "small ideas" that could easily be picked up by other languages. Here are some examples:
D has a special "unittest" block as part of the language syntax, instead of relegating it to a framework. You can have the unittests checked on every program run if you want
In Eiffel you can mark any method as "obsolete". JVM and .NET do something similar as an attribute, I think it's neat how in Eiffel it's a part of the language semantics
Here is the difference I think *they* are trying to make:
* "Coding" is a general term for developing any kind of software
* "Scripting" is a subset of coding, for making bounded linear "uncomplicated" batch jobs that assist people.
Scripting has a lower entry barrier than general-purpose coding. It's also a lot "easier": a beginner scripter can do a lot more with scripting than a coder can do with coding. For these reasons, general-purpose coding is considered more prestigious than scripting.
In my opinion, this is a very good thing. Scripting SHOULD be easier than coding, because then it's accessible to more people. You shouldn't have to know about testing, version control, packaging, modularization, and API design if you just need to scrape a few websites
Nuclear take: XML is actually a great format for adding metadata to unstructured text. It just sucks for representing structured data, which is, uh, what all the tooling and tutorials assume you're using it for
Why would you want to add metadata to unstructured text? To get metafiles, of course! I'm using it to store a series of iterations to a piece of code in one file, which I then use for making tutorials
You can tell this is Not Intended Use Case because all the tools are super weird about text following tags that aren't in other tags, even though that's the whole benefit of XML over JSON and YAML— inline markup
This is seriously messing with my head: the Dunning-Kruger effect might not be real! I read all of the linked papers, and they make a convincing argument that it's more likely to be a statistical artifact than a psychological effect: mcgill.ca/oss/article/cr…
The DK paper grouped test scores by quartile and plotted scores and self-perception, giving the famous X-shape. Turns out, you get the same shape if you do the same with completely random data! What you need to do is compare each *individual's* test score and self-assessment.
The critics studied a lot more people: 1100 vs DK's 60-80 undergrads (all from one classroom). Most individuals were pretty accurate with self-assessment. But when they did the same "quartile" aggregation, they got the famous DK x-shape! Good evidence it's a statistical artifact.