4 ms·
> You earn extra Brownie points whenever the beginning and end of a block appear on separate pages in a printed listing. I'm aware that this is from 1997-1999,
by vog 11y ago
> You earn extra Brownie points whenever the beginning and end of a block appear on separate pages in a printed listing.
I'm aware that this is from 1997-1999, but I'm curious: Do people still print out source code for better reading?
- sea6ear 11y agoI tend to do it whenever I'm working on something I find tricky. For me it's much easier to focus if I take my printouts and get away from the computer and edit and write code by hand, then go back and type in the changes. I started doing this when I thought back to times I programmed back in high school and college and remembered that I'd always had the most success with programs working correctly when I'd written them out by hand before typing them in. I think it forces me to really think about what's happening, rather than just trying stuff until things "mostly" work. I find that when I'm sitting at the computer, I have a much more iterative style, where I try something, see how that went, and make changes. When I'm working out something away from the computer, I have to have a coherent mental model of what I'm trying to accomplish. So at the computer is good for experimenting and exploration, away from the computer is good for coherent designs. I think there's something analogous with languages, I find dynamic languages much easier to deal with when I'm sitting at the computer, but if I'm working away from the computer on paper, then I prefer languages like SML or OCaml (or maybe even Go?) where I can look at the code and work through in my head exactly what is going on.
- tvmalsv 11y agoYes. Well, relatively recently. I did it just a couple of years ago.
- spacecowboy_lon 11y agoIf you have a lot of code printing it all out and laying it out on a spare desk - so you can look at all the code in one go is still useful.
- Symbiote 11y agoThe essay was presented half-seriously as part of a module on software maintainability [1], which I took in 2007. Perl was given as an example of a write-only language: modification of a typical Perl program requires at least a partial re-write. (The extra joke was that many of the computing department's internal systems were written in Perl.) More seriously, there were discussions of library versioning schemes, backward compatibility etc. I see Susan no longer lectures, which is a shame, as she was one of my favourite lecturers. [1] https://www.doc.ic.ac.uk/~susan/475/ https://www.doc.ic.ac.uk/~susan/475/ (The replacement course seems to be this: http://www.imperial.ac.uk/computing/current-students/courses/475/ http://www.imperial.ac.uk/computing/current-students/courses... )
- gohrt 11y agoStill, when two writes of a Perl program is less code and time than one write plus one modification of a C program, Perl still looks good.
- marcosscriven 11y agoI fondly recall her design patterns course, way back in '96!
- roel_v 11y agoI was watching a TV documentary a few weeks ago about a botched government IT project, and a company that also had bad experiences with the company that did the project had some British auditor review the software that was delivered for their project. The show interviewed the auditor and he actually pulled out a box (maybe 50cm/20 inch high), completely full, with printouts of the whole source code of this application. He was showing his notes in them, it seemed like he actually went through and annotated 4000-6000 pages (if I estimate it from comparing to the height of a pack of printing paper which has 500 pages) of printed Java source code.
- DCoder 11y agoTo be fair, an IDE is not geared at auditing and it would be much more painful to do freeform annotations in it. Circling problematic areas, drawing connections between variables/functions, making handwritten notes in the margin... all that is easy on paper and requires workarounds/other programs on a PC.
- roel_v 11y agoI can see that, but how does one work through 5000 pages? I'd shoot myself in the head before the end of week 1 (metaphorically speaking). And I guess they used a combination of digital/analog methods, but still since the GP asked - that guy must've spend weeks studying printed source code...
- DCoder 11y agoAs I see it, the auditor's job is to analyse the system thoroughly, not to skim some areas of it. Looking through 5000 pages worth of code on a computer screen would also be quite a challenge, even with the interactive aids you get from an IDE. Tangent: speaking from personal experience, sifting through an existing foreign code base is a really exciting task for some people, figuring out what makes it tick and how the pieces fit together can be fun. Granted, I was reverse-engineering a closed-source product, not reading its actual source, but that was even more fun :D Come to think of it, the tool I used for that, IDA Pro, has some interesting features that IDEs don't, such as graphical representations of function call graphs [1] and function basic blocks [2]. It would be interesting to see what a creative person could do by integrating those into a regular IDE. [1] http://scratchpad.wikia.com/wiki/Reverse_Engineering_Mentoring_Lesson_005 http://scratchpad.wikia.com/wiki/Reverse_Engineering_Mentori... [2] https://www.hex-rays.com/products/ida/tech/graphing.shtml https://www.hex-rays.com/products/ida/tech/graphing.shtml
- iaskwhy 11y agoJust happened, working on a new codebase. I never print more than ~5 pages but it helps me organise the codebase in my head when it's a complex one. As an alternative, I also write down code flows. I always keep a notebook by the laptop.
- OJFord 11y ago> Do people still print out source code for better reading? Can be required, academically. (Where "better reading" means "how someone's decided they want to read it"!)
- throwaway7767 11y ago> I'm aware that this is from 1997-1999, but I'm curious: Do people still print out source code for better reading? I know a bunch of embedded C programmers who have been doing it for a long time who do this regularly. They know their stuff. They don't print out the whole codebase, just a few pages of whatever they're working on, then they annotate it with a pen while thinking about whatever problems they are solving.
- yoklov 11y agoI can imagine this being more helpful if you lacked access to a debugger, and lacked the time (or desire) to build debugging tools by other means... Which I imagine is plausible in that context.
- throwaway7767 11y agoNo, they have debuggers and modern dev tools. They just prefer to read code from paper when they have to really focus on it for a long time.
- roghummal 11y agoIn my experience, it's less about reading code on paper than it is the other thing you mentioned: >then they annotate it with a pen while thinking about whatever problems they are solving. Paper and pen offer a lot of options you don't have in vim (or emacs/notepad.exe/etc ;)). Circling, doodling, arrows, underlining, furiously scribbling...
- chrisBob 11y agoI am a mechanical engineer and lots of my friends have a thesis where appendix 3 is a bunch of printed MATLAB code. Of course in this case it doesn't matter because no one will ever read it.
- Jtsummers 11y agoI haven't recently, but I have 4 monitors at work. I use emacs with follow mode and multiple buffers opened so I can see lots of text at once. But when I only had one monitor, I printed a lot of things out. The difference is like trying to drive a car in the winter with only a 1'x1' patch of clear windshield versus having the entire view.
- kingosticks 11y agoMy colleague does this and he is the main user of our office printer by far. As a driver writer, every now and then he'll print a few parts of the hardware source out in minute font and proceed to annotate/highlight it. He then files it away under his desk in the folder for that version. I'm happy in the knowledge that should our fileserver and backups spontaneously explode, we have a semi-versioned copy ready for someone to just type back into the computer. But in seriousness, it seems to work for him.
- omouse 11y agoI did that at my first full-time development job. There was a 50 line method to refactor and it was making calls to some other methods so I printed maybe 5-6 pages of code. It helped to get away from the computer because I could focus only on the logic that I was refactoring rather than worrying about making tests pass or seeing it work in a web browser. It's easier to solve a problem when you remove all the fluff and noise. On the other hand, you won't know if you have a good solution until it's implemented. A bit of a trade-off.