10 ms·
Why Programming Is a Good Medium for Expressing Poorly Understood Ideas (1967)
- gpuhacker 6y agoMy PhD supervisor used to say: "one week of programming easily saves an hour of thinking"
- CyberFonic 6y agoThat is the core difference between academia and business. Any engineer who sits back and stares out the window thinking is reprimanded or even fired by the managers for not working.
- saagarjha 6y agoI know a lot of engineers who take walks and stuff and still keep their jobs. As long as they’re not skipping out on meetings and actually getting work done at some point, I don’t think it really matters all that much.
- LifeIsBio 6y agoHmm... as an engineer in industry, if I decide I want to take a walk in the middle of the day, I make sure I don’t have any meetings, then I get up and leave. There are a lot of differences between academia and industry, but this isn’t one of them. I can’t imagine working for a company where I was worried about something like looking out a window, or not appearing to be working.
- arvinsim 6y agoYou would be surprised of the number of companies who still has a “butt-in-seat” mindset.
- WrtCdEvrydy 6y agoThey probably have legacy software and turnover problems... those are usually required before getting a "butt-in-seat" mindset.
- gspr 6y agoI undertand the general idea you're trying to convey, but holy shit, you seem to be in a terrifyingly bad work environment.
- deleted 6y ago[deleted]
- Sharlin 6y agoPerhaps ”some” but certainly not ”any”.
- empath75 6y agoNo software development job I’ve ever had has been that way.
- afarrell 6y agoI have never seen this.
- gspr 6y agoThis is so true, and I'm stealing this. One thing I have found programming helpful for in the thought process, though, is to uncover things that one thinks one has already thought through fully, but where there are gaps of detail one has leapt across without even noticing. Programming tends to reveal those.
- KineticLensman 6y ago> gaps of detail one has leapt across without even noticing. Programming tends to reveal those Agree. As a hobbyist coder I try where possible to do some conceptual thinking by writing out in English my high-level solution approach, and then start coding, fully expecting to uncover some details I hadn't anticipated in advance. I try to avoid diving right in with a hack. But sometimes I find it useful to start with a quick-and-dirty implementation, especially if I'm learning a new tool or language.
- deleted 6y ago[deleted]
- lpill 6y agoWhat about pen and paper? This phrase only applies when the "idea" is CC related. For all other subjects - and their intersection with CC - programming is secondary. Whenever I got the time to first sketch the idea I become much more assertive when coding it.
- KineticLensman 6y agoI once heard a training course described as "One day of useful content squeezed into a whole week"
- swyx 6y agohonestly im not sure how sarcastically to take this. you can listen to one day of content and really not absorb any of it. it takes the rest of the week to apply, reframe, doublecheck, internalize.
- KineticLensman 6y agoTotally agree with you about the time to internalise training. That said, the quote was a sarcastic one about a specific training course that one of my colleagues thought had too little content.
- amelius 6y agoBecause programming is 99% plumbing and 1% thinking.
- jcelerier 6y agoTo give another data point I don't remember one time during my phd where hours of thinking didn't crumble immediately after starting to write code to validate it (or did survive to live to this day if the line of thought was indeed valid). I've been in meetings that lasted for days and which were all ultimately invalidated by actually writing matching code which immediately made all the issues in the lines of thought glaring and obvious.
- 0xdeadbeefbabe 6y agoIf programming is a random walk or if the programmer is a fitness function. UI programming makes me feel this way especially.
- AnimalMuppet 6y agoI believe the original of this type of quote is "A couple of months in the laboratory can frequently save a couple of hours in the library." This saying is referred to as Westheimer's Discovery.
- sn41 6y agoI know this is a favorite idea that is often quoted. But as a plodding person doing research in CS, I don't find that programming enhances big-level understanding. It may refine some of the nuances one does not notice in the first pass, but after a tiring debugging session, I don't usually find any flashes of insight about the overall problem. An example: rotation and balancing of binary trees - does battling the inevitable core dumps during implementation really enhance any understanding of the principle of the algorithm?
- lgas 6y agoIf your goal in implementing rotation and balancing of binary trees is to better understand a poorly understood idea then you're probably better off using a language like Haskell that is garbaged collected and doesn't have nulls so you can both avoid having any core dumps and also have a smart compiler to help guide you to the solution and the understanding.
- theelous3 6y agoThis is the right mindset. Language and idioms are important to teaching and learning. I see people using python to teach/learn something like array iteration and do for i in range(len(my_list)): print(my_list[i]) What they have done, is conflated the implementation they think is computer sciencey from learning C, and the essence of list iteration. Python is a great language for learning about iteration: for item in my_list: print(item) Here it's much closer to the essence of the lesson. C is good for teaching about array indexing in the loop and exposing how the loop variable is reused: for ( int i = 0; i < myArraySize; i += 1 ) { printf("%d\n", myArray[i]); } If you're trying to understand something in programming or through programming, there are right languages for the job, and it's a tricky affair.
- redis_mlc 6y agoYou're correct, it's better to know the algorithm on paper before starting to program it. An extreme example of that is MySQL's InnoDB. It was written by 4 math PhDs who focused on rigor and correctness, which is why InnoDB is one of the most outstanding codebases in Open Source. The Internet basically runs on InnoDB. Having said that, programming experience will make you more logical over time, which can help with analysis.
- mcprwklzpq 6y agoProgramming does definetly helps me when i do not understand an idea. For exmaple: I did not understood why in the Monty Hall problem [1] do i have 2/3 chance of winning if i do change the door instead of 1/2 that my intuition tells me until i wrote it as two functions. function change() {return random(3) != random(3);} // 2/3 chance function not_change() {return random(3) == random(3);} // 1/3 chance Then i also saw that i do get that 1/2 chance of winning if i choose between changing the door and not at random. function random_change() {if (random(2) == 1) {return change();} else {return not_change();}} // (1/3)/2 + (2/3)/2 = 1/2 chance This was so much more convincing than math and theory and even explanations with cards and drawings because i could run it in a loop a 1000 times and see the results be close to the prediction. 1 - https://en.wikipedia.org/wiki/Monty_Hall_problem https://en.wikipedia.org/wiki/Monty_Hall_problem
- gspr 6y agoReally? I also value the evidence that numerical simulations provide, and if I didn't know of the problem at hand, the simulation would indeed convince me of the correct answer. But has one really understood something just because one has become comfortable with its behavior?
- theelous3 6y agoI would say it was more so the process of implementing that same logic forces you to understand it, and then seeing that logic pan out is a confirmation of what was learned in implementation. Much like you can understand the math of a lever and see levers working, but precalculating that x can lift y with a z long lever, and then building it, reinforces the logic you used in precalculation and binds the abstract to the real.
- mcprwklzpq 6y agoI was able to predict how simulation would go when i saw the program that i wrote. When i saw the simulation confirm my prediction it was so much more convincing then any other method. If the logic was to complex for me to understand then i would only see the behavior and not much more.
- 6y ago
- js8 6y agoAccording to Curry-Howard correspondence, writing programs is like writing proofs. So a working (or at least type-checked) program is like a proof that was verified by the computer. In that sense, the poorly understood ideas have to be expressed more precisely, when writing a program. The program itself, however, is not necessarily a good medium to express the most interesting ideas, because they can drown in technical details.
- justinmeiners 6y agoJust because the program corresponds to a proof, doesn't mean it proves anything interesting. It may not give any insight into the subject you're trying to understand
- ulrikrasmussen 6y agoThe "propositions" that are proved in anything but dependently typed languages are trivial though, so Curry-Howard is not that relevant in this context. E.g. a program of type "Int" merely proves that the set of integers is non-empty, and it doesn't even prove that for languages that are Turing complete (as the "proof" may crash)
- js8 6y agoThat's why I used phrase "working program" and "verified" in my comment. ;-) If you have a working (tested) program, you might not have a mathematical proof that it works, but you have certain sense that what you're doing is not entirely logically implausible. It is a form of verification (although without complete guarantee of correctness). (Another way to look at it is that the testing you did determines what kind of sentence you proved to be true. So instead of assigning the type to the program in advance, you deduce it the other way around - we observe how the program works and that gives us its type.)
- auggierose 6y agoYeah, that's why I call bullshit on Curry-Howard. It's really not that important or noteworthy. Writing down a program is not like writing down a proof. It is like writing down a specification.
- itronitron 6y agoWhy Medium is Good for Poorly Expressing Understood Programming Ideas
- launch_queue 6y agofunny
- hcarvalhoalves 6y agoAlso see "Programming as theory building" by Peter Naur http://pages.cs.wisc.edu/~remzi/Naur.pdf http://pages.cs.wisc.edu/~remzi/Naur.pdf
- elbear 6y agoThis is how I'm modelling things that I'm learning. I'm defining types (in Haskell) and functions that map those types to other types. Even if I don't write the implementation of the functions, that still gives me a clearer idea of the domain.
- WalterBright 6y agoI once attended a fascinating presentation where the presenter had realized that since laws were written in a specialized legal language, that this could be used to write proofs and discover inconsistencies and errors in the law.