Live data from Hacker News

The Essence of Programming (2021)

gingerbill.org

31–40 of 69 posts

Re: The Essence of Programming (2021)

#31
post #27

The essence of programming is designing a way to transform data. You ask yourself, "what is the nature input data and how it arrives" "what is the nature of the desired output data." When I started learning programming from books, the internet and later formal study this wasn't stressed nearly enough. A program transforms data. So much else starts falling into place about all the various abstraction techniques useful…

> The essence of programming is designing a way to transform data

I don’t agree here - in my experience data-oriented programming is only a subset of all useful programs.

For example, a game is in my opinion not like that. Sure, very pedantically it may be considered a “mathematical function”, but then so is every human interaction, and that’s not a useful pedantism.

Re: The Essence of Programming (2021)

#32
post #31
post #27

The essence of programming is designing a way to transform data. You ask yourself, "what is the nature input data and how it arrives" "what is the nature of the desired output data." When I started learning programming from books, the internet and later formal study this wasn't stressed nearly enough. A program transforms data. So much else starts falling into place about all the various abstraction techniques useful…

> The essence of programming is designing a way to transform data I don’t agree here - in my experience data-oriented programming is only a subset of all useful programs. For example, a game is in my opinion not like that. Sure, very pedantically it may be considered a “mathematical function”, but then so is every human interaction, and that’s not a useful pedantism.

I'm confused. What do you think games do with those tens of gigabytes of data?

Re: The Essence of Programming (2021)

#33
post #31
post #27

The essence of programming is designing a way to transform data. You ask yourself, "what is the nature input data and how it arrives" "what is the nature of the desired output data." When I started learning programming from books, the internet and later formal study this wasn't stressed nearly enough. A program transforms data. So much else starts falling into place about all the various abstraction techniques useful…

> The essence of programming is designing a way to transform data I don’t agree here - in my experience data-oriented programming is only a subset of all useful programs. For example, a game is in my opinion not like that. Sure, very pedantically it may be considered a “mathematical function”, but then so is every human interaction, and that’s not a useful pedantism.

Why is a game not like that? It transforms a stream of input events into stream of output events (video and sound hardware commands). Yes there is lots of state, but that can also be thought about as data that is transformed, step-by-step.

Re: The Essence of Programming (2021)

#34
post #27

The essence of programming is designing a way to transform data. You ask yourself, "what is the nature input data and how it arrives" "what is the nature of the desired output data." When I started learning programming from books, the internet and later formal study this wasn't stressed nearly enough. A program transforms data. So much else starts falling into place about all the various abstraction techniques useful…

True and useful way to think. Such a matter of course to me that I would also forget to mention it.

Output can also be an action performed through an actuator (robotic arm, welder, coffee pot, ...). Could be considered as data (signal coming to the actuator) but the "problem solved" is the action itself (and usually involves a feedback loop).

Re: The Essence of Programming (2021)

#35
post #27

The essence of programming is designing a way to transform data. You ask yourself, "what is the nature input data and how it arrives" "what is the nature of the desired output data." When I started learning programming from books, the internet and later formal study this wasn't stressed nearly enough. A program transforms data. So much else starts falling into place about all the various abstraction techniques useful…

Maybe we should differentiate the essence of programming from the essence of software development:

Software development, in my understanding, is about designing and implementing tools to solve particular (classes of) problems. Exactly what is being described in the article.

I think Programming in general is about writing instructions that (maybe not only) a computer can execute to produce (the desired) effects. These instructions may or may not involve input data and may produce side-effects along the way and may not even produce output data (although one could say that “nothing” itself is data similar to how we use 0 as a number).

I don’t think that we need a purpose for writing programs. We can program just about any nonsense and we don’t even have to ever execute it. I think “problem solving” is already too specific.

Even though it makes a lot of sense to think about programs as mathematical functions that transform data, underneath our abstractions are building instructions for the computer to execute and they tend to produce the desired output if we are doing it right and there are no interfering environmental circumstances.

A simple substitution of input data with output data would be the most primitive example, although it would be trivial. To produce non-trivial outputs, we need to replace the substitution with a (more complex) algorithm. Algorithms are tools that solve particular (classes of) problems. So here we are, doing software development, because we actually need a tool.

Re: The Essence of Programming (2021)

#36

Earlier quoted context omitted.

> The fact that it happens to execute without bugs and produces the correct output is far less important than the code being readable, comprehensible, and consistent as part of the larger system. It's more important that a function looks good, than that it actually works? I'm sorry, but that sounds stupid. A computer is a functioning machine first. If it worked from the start, it wouldn't need to be fixed later. You…

> If it worked from the start, it wouldn't need to be fixed later. True. But you ignore the fact that NO SOFTWARE IS EVER DONE. Software always has bugs, and even if it didn't, it will bitrot as the business needs change. In theory, it's better to have 100% working software. In practice, that never happens (or only happens for a few weeks at best). Eventually the software needs to be changed. In that case, software t…

> True. But you ignore the fact that NO SOFTWARE IS EVER DONE.

that is just false. I've seen plenty of one-use software - made specifically for trade shows, exhibitions, etc. which were never reused again because the entire software was the logic specific to that particuliar exhibition.

there is also a few thousand gigabytes of old game ROMs and abandonware on the internet which are all perfectly done software.

Re: The Essence of Programming (2021)

#38
post #27

The essence of programming is designing a way to transform data. You ask yourself, "what is the nature input data and how it arrives" "what is the nature of the desired output data." When I started learning programming from books, the internet and later formal study this wasn't stressed nearly enough. A program transforms data. So much else starts falling into place about all the various abstraction techniques useful…

Reminds me of this comment from antirez back in 2012: https://news.ycombinator.com/item?id=4560591

> This is one of the few programming quotes that is not just abstract crap, but one thing you can use to improve your programming skills 10x IMHO.

> Something like 10 years ago I was lucky enough that a guy told me and explained me this stuff, that I was starting to understand myself btw, and programming suddenly changed for me. If you get the data structures right, the first effect is that the code becomes much simpler to write. It's not hard that you drop 50% of the whole code needed just because you created better data structures (here better means: more suitable to describe and operate on the problem). Or something that looked super-hard to do suddenly starts to be trivial because the representation is the right one.

Re: The Essence of Programming (2021)

#39

Ugh. Programming is not craft. It becomes craft when journeyman that haven't yet matured into being able to understand the whole system see the application of holistic approach with success and think they've reached some sort of enlightenment. Approaching the issue of solving problems with incomplete information, they end up with circular conclusion, like the essence of programming being operating the computer. At so…

[deleted]

Re: The Essence of Programming (2021)

#40
post #27

The essence of programming is designing a way to transform data. You ask yourself, "what is the nature input data and how it arrives" "what is the nature of the desired output data." When I started learning programming from books, the internet and later formal study this wasn't stressed nearly enough. A program transforms data. So much else starts falling into place about all the various abstraction techniques useful…

Author of the article here:

I completely agree that the essence of a "program" is transforming data. In my previous article which I linked to in the main article, I specifically state "The purpose of a program is, and ought to be, something that transforms data into other forms of data".

But the essence of "programming" is different, and I stand by statement that "Programming is a tool to solve problems that you have in the domain of computers". And this article was an extension of the previous article meaning that taking it out of context has caused this confusion. But the term "programming" embeds the concept of "a program" already: programming produces a program. Programming does not start with hitting the computer with a baseball bat.

Post reply on HN