4 ms·
In the software world we often seem to end up with abbreviations which are ubiquitous but no longer strongly linked to their unabbreviated form. I often find th
by billforsternz 13y ago
In the software world we often seem to end up with abbreviations which are ubiquitous but no longer strongly linked to their unabbreviated form. I often find this annoying and distracting. I try an avoid being the source of such annoyance for others. For example if I find myself using abbreviations in my source code, maybe as a prefix for example, I will always ensure the abbreviation is explained at least once in a place that won't be lost (in a header file for example).
An example from back in the day was the acronym (presumably) "Afx". Vast numbers of identifiers in the old MFC (Microsoft Foundation Classes) Windows API C++ wrapper used this prefix. For some reason not knowing what it meant caused me chronic stress.
- csense 13y agoIn a lot of Windowsy projects, there are files called stdafx.cpp and stdafx.h. I'm not sure what they do either.
- johnsoft 13y agostdafx.h is a Microsoft invention used to help speed up C++ compilation. Instead of parsing your 100000 lines of headers for every source file, you would do it once, and the compiler would dump its state to disk. Then, whenever you started another source file with `#include <stdafx.h>`, instead of repeating that work, it would load that state into memory and pick up compiling from there.
- nfg 13y ago“One interesting quirk of MFC is the use of "Afx" as the prefix for many functions, macros and the standard precompiled header name "stdafx.h". During early development what became MFC was called "Application Framework Extensions" and abbreviated "Afx". The name Microsoft Foundation Classes (MFC) was adopted too late in the release cycle to change these references” http://en.wikipedia.org/wiki/Microsoft_Foundation_Class_Library http://en.wikipedia.org/wiki/Microsoft_Foundation_Class_Libr...
- billforsternz 13y agoThanks. Actually this explanation reminds me that part of the frustration came from the feeling that Mfc would have been a much more logical prefix and wondering why oh why they hadn't used that instead.
- almost 13y agohttp://stackoverflow.com/questions/391791/whats-with-the-afx-in-stdafx-h http://stackoverflow.com/questions/391791/whats-with-the-afx... TL;DR: it stands for Application Framework X (a group at MS responsible for the MFC, Microsoft Foundation Classes, library at some point)
- billforsternz 13y agoThanks
- nailer 13y agoI once asked a very experienced colleague in a Linux team to fix the modes on a file, and he wasn't sure what I meant. Explaining the acronyms helps. It gives a feeling that things were actually designed, and allowed you to see the consistencies since those acronyms keep appearing in multiple places.