If you regularly work on software development, how often do you work code out using pen and paper?
@djsundog i don't do this nearly often enough for my own taste.
@djsundog did that more in my last job than this one
@KitRedgrave it is a luxury in a lot of environments unfortunately
@djsundog there's only been one bit where i might have had something tricky enough to plan out, but i just kinda bashed out a recursive algorithm for it iteratively
@djsundog it's kinda like ... for the effort it would take me to serialize my thoughts, i could just write code instead
@djsundog but i also definitely do design docs for larger things, so does that count? :p
they aren't pen and paper either, but i do use draw.io
@KitRedgrave it's definitely on the same spectrum
@djsundog i don't always work on software development, but when i do...
@djsundog I have a graph paper book that I write in when I'm trying to brainstorm ideas that I can't express in code. I'll use it when I don't have access to the internet for long periods of times.
@djsundog never pen and paper but new ideas always start sketched out on whiteboards before heading to design docs
@evilchili I literally cannot have too many whiteboards
@djsundog i had 12 feet of them in my home office; two 6x4s I found in the construction recycling depot back in the day. Of course that was in pgh where wall space was seemingly unlimited.
@evilchili next place we move, one of the bedrooms is getting covered in the adhesive whiteboard film, dagummit
@djsundog used to be every time, but then i started to be able to think in the abstractions necessary
@djsundog like thinking about it it seems like i depend a bit too much on brain state and should probably use pen and paper more
@chaomodus it's possible, it might even be a net speedup depending on the project and your personal flow (but it really is personal from what I've been able to see)
@djsundog I find this to be the cheapest form of debugging possible
@ninjawedding desk check twice, compile once ;)
@djsundog also if I can use physical objects, like post-its or magnets, to represent data flow, I find that the physicality of that helps model and understand computations
sometimes it backfires and we think things are too slow because we're trying to play computer at human timescales, but I'm not ready to give up on it yet
@ninjawedding ooh, I do this too! I always think of it as my data wargame
@djsundog haha, now I'm wondering if someone has proven Risk or Settlers of Catan to be Turing-complete
@ninjawedding I was hoping someone would magically link us to a whitepaper ;)
Ironically, statically typed, early-bound languages are where I use this technique the least. Nothing hurts more than a 3AM page from a monitoring system because your customer-facing project, which went through days of rigorous testing, nonetheless dies a fiery death due to a type-related bug that any compiler could've found in milliseconds.
And then you apply a patch including unit tests, but you hope there isn't some other place in the code that you missed due to some equally obscure dependency on the bug you just fixed.
Been there, done that, burned the t-shirt as effigy, and is probably the #1 reason why I want to leave IT forever as of this writing.
@djsundog Not code. But when doing graphics that involves a lot of trigonometry I draw it on paper to work all the coordinate out.
It's far too easy to get that stuff wrong if you write the code first, and drawing it on paper first really helps you get everything right.
@djsundog I sometimes work out ideas on paper, drawing diagrams, writing out requirements, working on equations etc. But I don't work out the exact code that way. I would probably say it's somewhere between "Often" and "Once in a while".
@djsundog often do this for data structures and multi-step processes. And of course for user interactions, which I can’t separate from code. It’s one big awesome mess!
Well, actually I did in high school in 1979. Had to turn in a written copy of your code along with it's output because we didn't have floppy disks or CDs or USB drives. All we had was pen and paper. It was sticks and bones programming, Baby!
@djsundog back when laptops were heavy and crappy and we had no smartphones, i’d bring a pad of paper with me and code while i was waiting for whatever.
@djsundog these days its only when i’m designing something new, or completely rewriting it, in which case i’ll print out all the code and have a selection of different colored pens and highlighters.
@djsundog only in dev? I do this often but I work in network/system admin and the working out is mostly related to like, the system or network architecture that the code is going to have to work with.
@djsundog not a dev but i need some way of drawing whenever i have to explain something complex
@djsundog Does a whiteboard count?
@aschmitz yeah, I suppose, as it's a popular solution for the same need
@djsundog Also easier to erase. 🙂
(I'm not sure this changes my answer though: once in a while, when I can't just reason through it in my head in a couple minutes, or if I need to explain to someone else.)
@djsundog i do a lot better with physical paper than digital for a lot of things...
@djsundog it comes down to what I'm doing. If it is creating or checking a new algorithm or set of processes then it's more likely.
@djsundog Notes in a text file, and usually a REPL.
@djsundog Code? Almost never. Design or architecture? All the time, every time.
Well, okay. 50%. I usually regret the other 50%.
@djsundog Used to be I'd design class hierarchies and some pseudocode on index cards or notebook, then translate to Java, C, or ASM. But since better languages came out I can design & prototype on the computer. Probably haven't coded on paper in 15 years.
@djsundog Maybe once a month, if I’m being honest.
@djsundog Pen/paper? Never. Whiteboard? Once a week.
Approximately once every four months unless you count teaching / whiteboarding (where I do it regularly).
In the cases where I create something on paper, it's often nearly a requirement (so typically for math).
I feel like I've done this less often over time / as I've become a better programmer. Part of this is laziness; another part is I've gotten very good at thinking about the relatively-complicated logic laying in bed with my eyes closed.
This is a private instance that @email@example.com is using for development and testing.