I’m currently writing a plugin for an open-source tool that will let me use LDAP as a backend store. Rather than let it become vaporware, I’ll just post a note about it and what it does once I’ve submitted the patch.
In the meantime, I’ll note that having a clearly defined standard for naming things is always a win. Whether it is a coherent scheme for your variables or your systems, it’s one less thing you need to think about. It allows those who are familiar with the environment to make assumptions—it raises the bar of complexity you’re able to handle without memorization, and frees up your internal registers for what is actually going on, either in the code or network topology.
In that vein, I finally got around to looking up some examples of Apps Hungarian for use in the aforementioned project. As soon as I had finished refactoring to use the new AHN names, the entire project seemed (somehow) much clearer:
for ( strCatalog, mpKeyValue ) in mpCatalogMpKeyValue: # You can guess what everything is here pretty easily
First and foremost, any subconscious uncertainty about what a variable is used for disappears. It’s a palpable weight off your shoulders when you’re long into a parsing loop and have a dozen variables in use at multiple levels at any one time. I’m one who prefers verbose languages (think: C#). So if I can add the biggest win of that verbosity back into a language like Python simply by being disciplined in how I name my variables, it’s totally worth it.