Live data from Hacker News

Programming Is Mostly Thinking (2014)

agileotter.blogspot.com

331–339 of 339 posts

Re: Programming Is Mostly Thinking (2014)

#331
post #113

Earlier quoted context omitted.

I think first on a macro level, and use mind maps and diagrams to keep things linked and organised. As I've grown older, the importance of architecture over micro decision has become blindingly apparent. The micro can be optimised. Macro level decisions are often permanent.

I think this is probably a lot of the value of YAGNI. The more crap you add the harder it is to fix bad architecture. And the crap is often stuff that would be trivial to add if the bad architecture weren't there, so if you fix that you can add the feature when you need it in a week.

I think that's probably part of it; but on a really simple level with YAGNI you're not expending effort on something that isn't needed which reduces cost.

What I try to do is think about the classes of functionality that might be needed in the future. How could I build X feature in a years time?

Leave doors open, not closed.

Re: Programming Is Mostly Thinking (2014)

#333
I once did a weeks worth of 'debugging/looking at code, trying stuff and testing' before committing my two lines of changed code. About 40 hours of work to produce what would take less than a minute to type.

It wasn't even the worst code base I've inherited but it is the worst lines of code per hours worked I've ever had.

Re: Programming Is Mostly Thinking (2014)

#334
post #241

Earlier quoted context omitted.

I had the same thought as I read that line. I think he's actually describing Linus Torvalds there, who, legend has it, thought about Git for a month or so and when he was done thinking, he got to work coding and in six days delivered the finished product. And then, on the seventh day he rested. But for the rest of us (especially myself), it seems to be more like an interplay between thinking of what to write, writing…

>> …and when he was done thinking, he got to work coding and in six days delivered the finished product. And then, on the seventh day he rested. How very biblical. “And Torwalds saw everything that he had made, and behold, it was very good. And there was evening, and there was morning—the sixth day.”

> And there was evening, and there was morning—the sixth day.

I presume you're using zero-based numbering for this?

Re: Programming Is Mostly Thinking (2014)

#335
post #283

Earlier quoted context omitted.

Git is a special case i would say . Because it is fairly self contained. It had minimal dependencies on external components. It mostly relied on filesystem API. Everything else was “invented” inside of Git. This is special because most real world systems has a lot more dependencies. That’s when experimentation is required. Because one cannot know all relevant API’s beforehand and their behaviors. Therefore the only w…

> Git is a special case i would say . Because it is fairly self contained. It had minimal dependencies on external components. It mostly relied on filesystem API. Everything else was “invented” inside of Git. This type of developer tends to prefer building software like this. There is a whole crowd of hardcore C/C++/Rust devs who eschew taking dependencies in favour of writing everything themselves (and they mostly n…

ie closed off systems that don't interact with external systems.

and these are the type of coders that also favor types.

whereas if you do the 'informational' type programs as described by Rich hickey -- ie interact with outside systems a lot. you will find a lot of dependencies, and types get in the way

Re: Programming Is Mostly Thinking (2014)

#336
post #106

Great article! I've posted it in other comments before, but it's worth repeating: The best explanation I've seen is in the book "The Secret Life of Programs" by Jonathan E. Steinhart. I'll quote that paragraph verbatim: --- Computer programming is a two-step process: 1. Understand the universe. 2. Explain it to a three-year-old. What does this mean? Well, you can't write computer programs to do things that you yourse…

Any other similar book recommendations?

Re: Programming Is Mostly Thinking (2014)

#337

Earlier quoted context omitted.

it's an odd analogy because programs are complex systems and involve interaction between countless of people. With large software projects you don't even know where you want to go or what's going to happen until you work. A large project doesn't fit into some pre-planned algorithm in anyone's head, it's a living thing. diagrams and this kind of planning is mostly a waste of time to be honest. You just need to start t…

> You just need to start to work, and rework if necessary And making changes on paper is cheaper than in code.

I'm tempted to break out the notebook again, but... beyond something that's already merged, what situations make paper changes cheaper than code changes? I can type way faster than I can write.

Re: Programming Is Mostly Thinking (2014)

#338
post #106

Great article! I've posted it in other comments before, but it's worth repeating: The best explanation I've seen is in the book "The Secret Life of Programs" by Jonathan E. Steinhart. I'll quote that paragraph verbatim: --- Computer programming is a two-step process: 1. Understand the universe. 2. Explain it to a three-year-old. What does this mean? Well, you can't write computer programs to do things that you yourse…

Any other similar book recommendations?

Not really a book, and not sure how similar it would be, but you might enjoy this work from 2001 - "Programmers' stone". Introduction into "mapping" vs "packing" definitely influenced my own understanding of programming vs thinking back then.

https://www.datapacrat.com/Opinion/Reciprocality/r0/index.ht...

Re: Programming Is Mostly Thinking (2014)

#339
post #87

Earlier quoted context omitted.

> Nothing clever, nothing coupled Yes, simple is good. Simple is not always easy though. A good goal to strive for nevertheless. > nothing DRY That's interesting. Would you prefer all the code to be repeated in multiple places?

The problem is that most developers don't not actually understand DRY. They see a few lines repeated a few times in different functions and create a mess of abstraction just to remove the repeated code. Eventually more conditions are added to the abstracted functions to handle more cases, and the complexity increases, all to avoid having to look at a couple lines of repeated code. This is not what DRY is about.

Yep, exactly. I went into further detail in another comment.
Post reply on HN