3 ms·
Wow, the amount of compactness and craftsmanship in these lines of code is amazing.
by ateesdalejr 9y ago
Wow, the amount of compactness and craftsmanship in these lines of code is amazing.
- jstimpfle 9y agoI think there's nothing magical about it at all. It's rather that "modern software architecture" (examples for what I mean linked in another comment here about C# and Java) is a disaster.
- beefhash 9y agoIt might not even be that. I presume that kind of code used to be written with pen and paper, a compilation cycle almost prohibitively expensive. When you sit down and just design a piece of code for hours as to not waste your compilation cycle, I would guess that you naturally end up being fairly crafty after some time.
- oldcynic 9y agoNope, you just end up thinking that compactly as you type. When I learned C it was a given to code efficiently. Pointer manipulation and efficient structure packing was expected, and therefore taught. You'd rule out of an interview anyone who didn't easily grok it. It's probably no surprise that the fastest GUI editor I've used to date ran on a 7.1MHz machine. Such is "progress"!
- tech2 9y agoJust because I'm curious, CygnusEd?
- oldcynic 9y agoYes indeed. :) Most impressive, I think, is that it managed to be so fast and include smooth scrolling.
- vram22 9y agoBrief was pretty fast too. I only used it briefly (heh), but read in some computer magazines at the time, that it used a lot of code optimizations, one of which was that it used assembly language code, and another being (IIRC) that it used BIOS calls to dynamically change the speed of movement of the cursor when it detected that you pressed an arrow key for a longer time (probably by changing the key repeat rate or reducing the repeat time), so that when you did that, movement through the file would be faster. The idea being that a user pressing the arrow key for a longer time probably meant to move through a longer section of the file (than usual) to reach some other distant place in it, so Brief figures this out and assists them with that, by scrolling faster with that BIOS technique. Anecdote: On a trip to the US (Boston), I once met Norm Miles, who, my US colleague said, was the creator of Brief. The Brief editor is actually still available, here, and for free now: http://www.briefeditor.com/ http://www.briefeditor.com/ https://en.wikipedia.org/wiki/Brief_(text_editor) https://en.wikipedia.org/wiki/Brief_(text_editor)
- lazyjones 9y agoAmazing from today's perspective, but not surprising. With just a few KB of memory, minimalistic rather than modern expressive style was just natural.
- jstimpfle 9y agoI get cynic when "modern style" approaches with their megabytes and gigabytes of junk code that does nothing (or nothing anyone could clearly define) is called "expressive". Many of the modern conveniences might be expressive in the small (function level). But it quickly gets highly unexpressive as you move to a more global level. That is because this "expressiveness" is often achieved by arbitrary and non-orthogonal approaches, which increases dependencies and hinders modularity. In the end, it's only more convenient to paint yourself into a corner. Seen that in many codebases.