3 ms·
That depends. Sometimes I write significant amounts of code in vvery very short spces of time, other times it takes much much longer. When I was studying CS, I
by dkersten 16y ago
That depends. Sometimes I write significant amounts of code in vvery very short spces of time, other times it takes much much longer. When I was studying CS, I often did my assignments literally fifteen minutes before the deadline. Sometimes I can work extremely well (and fast) under pressure.
But heres the catch - programming is more than just writing the code. Its about solving problems. Its about architecting abstractions, algorithms and modules. Its about thinking.
Even though I may sometimes write substantial amounts of code in fifteen minutes or half an hour or an hour, an order of magnitude more time has already went into solving the problem in my head. Coding doesn't take much time when all you're doing is copying a solution from your head to the computer.
As an example, I found my first-year CS programming lab exams funny. They forced us to "do it on paper" for the first fifteen minutes, before you were even let touch the computer. Having already been programming for a few years prior, I could have done these assignments in my sleep, so I'd look at the spec for a moment, solve it in my head and sit there dong nothing until we were let use the computers. Then I'd copy'n'paste the solution from my head to the computer and walk out a minute or two later. The problems were easy enough to solve in under fifteen minutes and the "coding" was just dumping text from my head to the editor.
So, yeah, programming is more than typing into an editor. Most of it is done in your head.
- ayb 16y agoWhen I took CS101 (Summer 1993) we actually wrote Pascal code on paper for the exams :-)
- ramchip 16y agoI think it's rather common, even nowadays. I'm in computer engineering and not CS, but I've had many exams where I had to write C, C++, Java or Matlab on paper (introductory classes, system programming, OOP...). I've seen this posted before as well. Now, the Pascal bit is probably becoming rarer :)
- dkersten 16y agoEh, yeah. The end of semester exams were always on paper. Policy or something. Can't say I much enjoyed drawing UML or writing Java and C++ on paper. The worst was the digital image processing, where we did get to do it in the computer labs (basically, transforming images in matlab, usually fft -> masking, multiplication or some other simple operations -> ifft), but had to sketch the results on paper... This was only couple of years ago! Ugh.
- patrickk 16y agoI've just completed my (non-CS) degree, and for my second year exams (2008!), we had to write C# on paper.