3 ms·
There was a time where visual and actual compactness was important. So for instance things like `malloc` date to that era. I'd argue that changing it to `alloca
by jghn 8y ago
There was a time where visual and actual compactness was important. So for instance things like `malloc` date to that era. I'd argue that changing it to `allocate_memory` now would be even more confusing than leaving it as `malloc`
- ppeetteerr 8y agoI fully agree. This reminds me of how some text books will teach people to write `a = 10` rather than `age = 10` for the sake of brevity. From that moment on, it becomes a habit to write code in a terse manner. It took me a few years and some good IDEs to no longer be afraid of names like `ageOfUser`/`age_of_user`.
- jghn 8y agoHopefully not modern textbooks. I know when I was in my CS program in the early 90s it seemed like that was transitioning. The older profs would teach us every trick in the book to reduce the actual file size & visual noise in our code. The younger profs would beat in our head to not do that.
- hinkley 8y agoEven in modern languages with traditions of verbosity, the moment they add generics they almost always go back to single letter names. Map<K,V> drives me nuts. Especially since K has to be comparable and/or hashable.
- Sohcahtoa82 8y ago> `ageOfUser`/`age_of_user`. I'd be going with `userAge` or `user_age` either way. :-P
- ppeetteerr 8y agoWe can't be friends :P
- emodendroket 8y agoI believe I also read that the keyboards they used in the 70s stank so bad that they wanted to avoid typing long stuff out.
- jackhack 8y agoThere were a lot of reasons for concise, pithy code in the 1970s. Poor keyboards was not one of them. (in fact, some of the best keyboards I've ever used were of the old mechanical-switch variety found on IBMs, teletypes, and various CRT terminals. Even the worst of the bunch were a lot better than the almost-legendarily-bad macbook keyboard I'm using at this moment.)
- emodendroket 8y agohttp://www.catonmat.net/blog/why-unix-commands-are-short/ http://www.catonmat.net/blog/why-unix-commands-are-short/ > I was watching videos about my favorite topic, UNIX history, and found a talk by Hendrik Jan Thomassen. He's the UNIX pioneer in the Netherlands and has worked with Thompson and Ritchie in the past. He says the real reason why UNIX commands like ls, cp, mv, etc., are short is because PDP11 console keys were super hard to press. You'd get knuckle pain if you typed too much. So to save your fingers, all the commands were designed to be as short as possible. True or not, that's a fun story. The page includes a video.
- jackhack 8y agoThat's a great contribution. Thank you! And all this time I thought they were mere stylistic choices. As an undergraduate, I was relegated to the teletypes or a modem on one of the 10 dialup lines -- upperclassmen and grad students got first pick of the CRTs and there was rarely a free one available. I suppose I get the last laugh, as I didn't developer carpal tunnel syndrome. Coding assembly on a teleterminal using greenbar paper now seems equal parts primitive, badass, and insane.
- dragonwriter 8y ago> There was a time where visual and actual compactness was important. It still is; there is a reason people tended to shorten terms in the field they are deeply engaged in. Verbosity gets in the way, and there is always a tension with it (and where the optimum point for clarity is depends on the focus and expertise of the audience.)