Live data from Hacker News

How I Write Code: Pen and Paper

noteflakes.com

91–100 of 110 posts

Re: How I Write Code: Pen and Paper

#91
I've always used writing to sketch out informal specs or high-level architectural things. I've always heard about people writing code by hand on paper. I gave it more of a shot after reading, Algebra Driven Design. It's a powerful technique.

While I often prefer the interactive feedback of a proof assistant or model checker I find spending time away from the screen and thinking on paper to be very relaxing and helps me with, "connecting the dots," so to speak. I tend to get a very narrow focus on the problem at hand when I'm at the computer.

I too hope to one day be able to write code by hand on my RM2. I have hacked a basic editor into an RM1 but it's slow going.

Re: How I Write Code: Pen and Paper

#92
post #88
post #37

Earlier quoted context omitted.

It's because the real conflict (up front design vs finding as you code) is hidden by the small quirk of writing code with pen and paper. Rename the article "why TDD is useless", change the angle a bit and you'll create way more controversy.

Don't think it conflicts that much with TDD. The test is the problem statement, or maybe a theorem. You then need to figure out how to solve/prove it. You can do this on paper then type it in or directly. It doesn't really matter. When the test goes green you know you've solved it.

That's a good point, you could indeed run the tests in your head. I think I can still save this though: this would prove that you only test for what you think about, and thus the existence or the absence of a test doesn't affect the development at all. Which could be countered again by property-based testing, but this one won't work in your head or one paper.

Re: How I Write Code: Pen and Paper

#93
I often write code outlines on paper, to focus on logic instead of syntax. It is often my starting point. It helps me stay in the logic flow, without any interruption from the IDE every other second. Later, when ready to type the code in, I pay attention to syntax knowing the logic has been worked out. More efficient for me.

Re: How I Write Code: Pen and Paper

#94

I accidently discovered the benefits of writing code on pencil and paper some years ago when I was looking for a career change. I picked up a C book that had exercises in it but only had time to go through the book during my commute on the metro. Because I worked in a SCIF I couldn't take any electronics with me to work. So I would read a section the night before, go to bed, and churn out the lab solutions in a noteb…

When I was a student I identified the keyboard as one of my greatest impediments to good programming. Something about being in front of one before doing the 'real' work of thinking through the problem was just too tempting, and I'd ignore the problem solving and just start typing.

Re: How I Write Code: Pen and Paper

#95

I always feel boxed in inside an IDE -- Why can you not attach images inside IDEs? diagrams of what you want to do... I like doing this in notion -- here you can write code with the syntax highlighting and attach all sorts of stuff to the document -- once you've crystalized exactly what you want to build, you can fireup your IDE and get to work. I think it ties with the theme -- A programmers work is not to type thin…

You should check out Julia's built in notebooks. It's basically a script / source file with comments that get rendered as markdown, which means you can add images and it is all rendered nicely in editors that support it. It's better than jupyter notebooks, because they're not big blobs of Json that can only be edited efficiently in the rendered environment, but not as plain text.

Re: How I Write Code: Pen and Paper

#96

Earlier quoted context omitted.

You have to read up on "Lead Grades" used in Pencils; use 2B or 4B (or higher) to get dark, clear and smooth writing. Another factor to choose is the "Lead Diameter"; use 0.7mm(ballpoint fine)/0.9mm(ballpoint medium) for thicker lines. See https://www.jetpens.com/blog/The-Best-Lead-Grade-For-Every-A... https://www.jetpens.com/blog/Mechanical-Pencil-Lead-Size-Com... and https://www.youtube.com/watch?v=73gZFjIAHtw

Do you have a recommendation for pens?

Oh Man! I went down this rabbit hole quite recently and hence have plenty of information (Note: always check reviews first on Jetpens, Amazon and Youtube ;-)

My current favourite is the classic Tombow Zoom 505 series - https://www.tombow.com/en/products/zoom_505/ Not too costly, well made, elegant and professional looking. I have the Rollerball (i.e. water-based ballpoint), Mechanical pencil and Multi-function pen all in Black.

Next up are the "Parker Jotter Originals" for EDC (https://blog.penvibe.com/parker-ballpoint-pens-ultimate-guid...). They are very affordable and hence i keep them everywhere.

Multi-function pens (which have 2 or more ballpoints and a mechanical pencil) are another must have (I limit myself to 2+1). Buy a good professional looking one (eg. Cross/Zebra/Pentel/Rotring etc.) rather than the cheap plastic ones (they look ugly).

Staedtler has a series called "Triplus" which have a triangular body (supposedly more ergonomic) - https://www.staedtler.com/intl/en/products/writing-pens/

Many of the OEMs who actually manufacture the pens but which are sold under other well-known brand names are now releasing them under their own name. Two of them are TWSBI(Taiwan) and Penac(Japan). You should check out their offerings.

If you are a Fountain Pen connoisseur, you should know that India has a large number of Artisanal Specialist Fountain Pen makers - https://www.bbc.com/news/world-asia-india-55314701 and https://www.fountainpenindia.com/

Finally, always check the offerings from Japan (Amazon.co.jp and Jetpens are your goto sites); they make some of the best and most innovative stationery.

Re: How I Write Code: Pen and Paper

#97
post #26

I used to code in pencil during the day at school, so I could test when I got home (and avoid boredom). These days I'll still sometimes use paper if I'm trying to optimize some inner loop assembly, easier to draw the code and the data side-by-side when both are changing. Edit: This line resonated with me: > Maybe someday I’ll be able to handwrite code on an e-Ink device and then run it. Are there successful projects…

I found a series of papers about HyperFlow, a data flow visual language for tablets: http://web.archive.org/web/20200803001819/https://hopl.info/...

I'd also be remiss to not mention Ken Perlin's Chalktalk project, though that's mostly a presentation system as it stands: https://github.com/kenperlin/chalktalk

These are both largely graphical and gestural, with a good number of low-stroke symbols instead of handwritten strings for the most part.

Re: How I Write Code: Pen and Paper

#98
I used actual toilet paper to write programs on for the first year or two after I started programming. (I just had no computer of my own.)

This was not the kind of toilet paper you would see nowadays, though. It was not in a roll, but a deck of precut pieces, and they were not soft at all. One side was glossy, and the other - rough. The glossy side was perfect for writing. It was almost like a notebook, only cheaper.

Here's a link to a somewhat similar kind - https://www.ebay.com/itm/VERY-RARE-OLD-ORIGINAL-RUSSIAN-TOIL...

(I'm not the seller, I swear.)

I do miss these times. I could actually write a whole program without compiling it, and it would run fine on a computer later. Most of the times.

Re: How I Write Code: Pen and Paper

#99

I accidently discovered the benefits of writing code on pencil and paper some years ago when I was looking for a career change. I picked up a C book that had exercises in it but only had time to go through the book during my commute on the metro. Because I worked in a SCIF I couldn't take any electronics with me to work. So I would read a section the night before, go to bed, and churn out the lab solutions in a noteb…

Terse languages like J and K also make good candidates for writing code using pen and paper. Hillel Wayne has an interesting blog post detailing the very same note.

https://www.hillelwayne.com/post/handwriting-j/

Re: How I Write Code: Pen and Paper

#100
post #43

Earlier quoted context omitted.

As someone who's worked a fair bit now - coding has absolutely no value to any company. What delivers results is deploying solutions - whether those solutions are powered by hotpockets and red bull at 3AM or whether they are entirely composed of meetings discussing how to inform customers of the change - it is never "coding" that solves a problem. "Coding" is at most the effort of transcribing a solution from your br…

if what you say is correct in all cases then why do we not just call coding 'typing'?

Like another commenter said, it’s probably just semantics, but in software most don’t share a common educational background and language. The SDLC [1] is used where I work and coding / typing is called development. It’s where the actual code is written.

I think it’s always true that there is some time spent figuring out what problem is being solved, what needs to be built to solve the problem, building something, and making sure that it solves the original problem.

In mechanical or electronics it tends to be called manufacturing instead of development. In civil engineering or architecture it tends to be called construction instead of development. I think the difference in creating software is that one person can do all phases. They can even do the phases without formally documenting anything. The phases can be much shorter and iterated on much quicker in some software projects. I think when the software projects become larger and require more developers that they tend to have a more clear demarcation between phases and use more formality in documentation.

I think it would be more beneficial to the software industry if everyone was working with similar enough terminology that discussions don’t end up revolving around who is operating under what definition and which definition is best. But at the end of the day that’s just my opinion.

Post reply on HN