What counts as "code" or "programming"? This was ...
# thinking-together
d
What counts as "code" or "programming"? This was an interesting topic between @stevekrouse and @pbiggar in podcast #43 (Unveiling Dark). Some of the contested areas were: * Incidental (accidental) complexity, vs essential "this is what it does" code * Whether it looks like "code" / is symbolic * Whether it's the boring / tedius stuff, or the "fun" part of programming What does everyone else think?
p
Controversial (though maybe not in here): excel and scratch are both programming
โœ”๏ธ 4
๐Ÿ‘ 3
t
I'd say if you're composing a computation (aka a transformation of data) which will be carried out by a machine, you're programming
๐Ÿ‘ 3
d
One view was that even just specification of things counts as "programming", especially if you would normally "write code" to do so. Bret Victor presents the opposite view in "Learnable Programming": Dragging shapes onto a canvas "isn't programming", but neither is writing code to do so - it's just a very cumbersome form of illustration (i.e. of specifying). Thus, learning how to draw shapes with code is just learning how to use a poor interface (code) for doing something that's "not programming"
โ˜๏ธ 2
I mostly agree with BV, that someone taught to code static shapes has not "learned to program", and might still not know what programming even is. ... But maybe (for better or worse) they have in some sense learned "to code" (so maybe programming โ‰  code?) But on the other hand, the whole point of programming is to specify something. For code obsessed with its own abstractions and in which the thing it's supposed to "be" is hard to infer, I'd say that programmer has missed the whole point of what software really is.
b
My view of code is probably rare. I would consider DNA code. I would call it a 3-D spatial notation. I would as well consider chemical molecules as a type of 3D spatial notation. I would say human invented notations/languages are a subset of code. Programming I would generally refer to as what we typically think of: writing in a programming language. I would consider psuedocode a programming language. I would agree that excel and scratch are programming. I would call a "
Programmar" as someone fluent in many programming languages
not sure what the cutoff would be, but probably at least 10 (if you count things like Regex, binary, hex, etc, as languages), probably more like 20 for an entry level programmer
An expert programmer I would say is fluent in at least 100 languages and could pick up others quickly (again, things like Excel, Make, CSS, regex, types, binary, hex, latex, floating point, control flow, I'd count in those languages)
d
Are there things anyone would consider to be programming, but not code? Or code, but not programming?
k
Transcript: https://futureofcoding.org/episodes/043 Pretty sure I've read it before, but seems worth a re-read.
"Oh, you take that back." ๐Ÿคฃ @pbiggar doesn't like Salesforce.
โค๏ธ 1
d
We interact with computers using artificial, formal "languages". These aren't human languages, they are designed primarily to be understandable by the computer, with usability for humans taking second place. But they do have syntax and grammar. An utterance in one of these languages is "code". When you type a command in the Bourne shell, that is code: you are writing a short program and executing it. A URL is also code. But code doesn't have to be textual, any more than human language has to be textual (eg, there is also speech, and sign language). "Gestural" interactions with the computer (eg, in a GUI) are another kind of formal language, and they are also code.
๐Ÿ‘ 4
Once we define code in this way, then we can take the next step, and think about ways to support abstract mechanisms (like names, function calls) in all of the various kinds of code that we use to interact with computers. That is part of my vision of the Future of Coding.
k
I'm struggling to see what ground this thread is covering that we haven't already discussed in the past week or month. OP is fun to read. The rest of you are arguing angels and pinheads.
d
I don't see myself arguing angels and pinheads. I'm arguing for a definition of "code" that I think is necessary in order to make fundamental progress on the FoC.
d
1. It's an interesting topic with very different opinions (at least some of the specifics), which are also interesting. 2. More practically, breaking down base assumptions and getting to know the different points of view (rather than assuming what they are), especially about something so fundamental, adds a lot of context for what it is that we are wanting to shape. Is it the future of symbolic expression, or of user interaction, or what?
d
I don't think we can build an engineering discipline or a scientific research program around the future of coding, if the definition of code and coding are a mere matter of opinion. I think we need a principled definition based on objective criteria, otherwise we don't have a field of study.
The OP asks if the term "code" is a value judgement. "code" is tedious, "no code" is fun. "code" is text, "no code" is graphical. "code" is the old technology that my competitors are pushing, "no code" is the new hotness that I am selling, that you should buy instead. This kind of "definition" is quicksand, you can't build a research program on it.
โœ”๏ธ 1
To put things in historical perspective, Fortran was one of the earliest "no code" programming platforms. IBM marketed it in 1956 as an "automatic coding system". You don't have to write code, the computer does it for you. In the pre-Fortran era, "coding" was literally the human act of writing machine code. Fortran was an automatic coding system because the compiler generated the machine code for you.
๐Ÿ‘ 3
In time, people began to regard Fortran programs as code: they were full of mathematical symbols. Cobol was the next advance in "no code" programming. According to the marketing, it would allow businessmen to express business applications in ordinary English -- no coding required.
๐Ÿ‘ 2
To create a research program around the Future of Coding, we need an objective definition of "code" that is independent of current fads. What we identify as "code" today will continue to be identified as "code" in the future.
k
Assumptions you're making: * FoC needs to be a new discipline. * FoC requires a "research program". * A research program must define its terms before it begins. I thought OP was pretty transparent about struggling with definitions. It doesn't prevent trying out a new approach. The rest of us too are building projects without having a definition. That seems like a pretty good sign that the definition is not on the critical path. The day I see a useful definition I'll start using it with relief. In the meantime it's just one of the many ambiguities I have to wrestle with. Like peace or hunger, it seems unlikely to resolve by discussion alone.
d
The main intention is to spark thought and discussion, especially on something open ended that not everyone agrees on. I don't think this community (here on Slack) can or should be a formal anything - we range from hobbyists to serious researchers, etc. But regardless of where anyone is on that spectrum, "Perspective is worth 80 IQ points" (AK)
That being said though, I actually think we actually could (and it would be very interesting & useful to) distill exactly what is code and what is programming, in a literal or technical sense. (Granted, that's different from what is sometimes meaningful to refer to as such. For example "Yes, technically x is code; but when I say 'code' in this context, I'm just referring to y". But I do think we can distill some technical definitions)
I think "no-code" is definitely a marketing thing, based on what people think of it associate with "code", and we can separate that from what is technically (and not just culturally) "code". (@Doug Moen - Thanks for outlining that so well! I had no idea that there was such an extended history of "no-code")
โœ… 1
For starters, can we all agree with the following? Coding is building or editing code. Code is anything that: * Is a specification (blueprint) for something (else) * Is interpreted / executed / followed, to produce some effect (e.g. generate something or cause things to happen) * Is specified in some "language" (i.e. some defined format) that the consumer of the code understands (Potential) Examples of Code: Traditional software code, DNA, Settings, Command-line inputs, Recipes, Play scripts, (the stored contents of) Media files (mp3, etc.), Assembly instructions (e.g. for a bedframe), SVG, Game save-states
๐Ÿ‘ 1
I think "*a program*" is an incidental concept like a file or OS, and so not super meaningful in this context. But programming is definitely more than just "making programs", and I suspect it will be the more complicated thing to define. (For example, a person can be "programmed" to behave a certain way)
o
Very interesting subject that I wanted to investigate and to see what people here think about it. So, thanks @Dan Cook for asking and all for sharing your thoughts!
In fact at some point, to build things in this field I feel the need to have a very good understanding of the raw material I work with. Naming programming and code.
So first, for me, I see programming as the activity of specifying behavior and code is the technical tool that permits to do so with the less ambiguity as possible.
And my meaning of behavior is very broad. From classical apps to rendering (web page, documents...). Anytime I want something (computers...) to have specific behaviors, the actions I will do to make this happens is programming for me.
For that I need some technical "artifact" that I can use to communicate this behavior expectation to the corresponding entity. So there is a need for a formal "agreement" on how I communicate to the entity, there is a need for a "code" between us, that avoids as much as possible risk of misunderstanding.
d
That's also my thought: programming is specifying behaviors, specifically when the behavior is something "set up" to happen versus just doing the behavior yourself on the fly. This does not necessarily involve code, and not all coding is programming. But when the code specifies (or contributes to) behaviors, then it also counts as "programming", because the code is the vehicle for "setting up" the behaviors.
๐Ÿ‘ 1
o
Yes, and I guess for me, this "set up" can also happen live, i.e. I see the behavior at the moment I set it up in my tool. Like when I change a bit of code in Scratch and see the cat behavior changing.
So, to sum up, for me programming and code are two distinct clear concepts. Programming is what I am doing to specify behavior of an entity, and code is the necessary technical tool I need to do programming. And code is communicated to the entity.
d
Hmm, well how about this: I'd say that giving a list of instructions to an RC car (e.g. move, turn left, move, honk) is "programming", because the instructions were set up / batched, even if those instructions are not persisted afterward. But I would not have called it programming if the RC car just responded in real time to immediate button pressing on the controller. ... But maybe I can reconsider. Maybe it's about specifying behavior through some interface or language, regardless? But then would you say you're programming a drone every time you fly it around? Maybe it is, even if one wouldn't normally think about it that way?
o
For me, in your RC car example, you give instructions using a code it can understand. Even if you don't write it down. It is the same difference between a bash script and you executing each line of the script in the terminal. And, for me, you are programming it. You are specifying its behavior, but you do it live.
Maybe to make it "looks more like" conventionnal programming/coding, you need a kind of controller that hears and records your instructions (your code) and that can replay them at will for your car to have again this behavior. The same way, one can type a list of commands in her terminal to specify some behavior, type "history", gets the interesting commands, puts them on a script file then executes them again at will with the script.
d
I actually have to totally agree with your previous reply. Recording and echoing back to make it "feel" more like "programming" seems to superficial of a difference to determine whether it qualifies. More thoughts in a bit...
Thinking out loud: So code is a specification for a thing (or for some effect), and coding is providing that rather than just creating the end thing (or effect) directly. Something has to interpret the code, and therefore there's a formal language involved. Code is prepared and exists as a thing that can be run or rerun later. Programming is specifying behavior, and something interprets that specification, so there's language there too. Using a controller or a user interface (of any kind) is programming, because it fits the aforementioned description, and coming through the "interface" means that there's language (e.g. commands) that is being interpreted. "Not programming" would be not going through the interface / language. For example, grabbing the car and moving it around with your hand.
Not all language-communication is programming, unless you use it to change internally wired behaviors (e.g. training a dog or brainwashing a person)
๐Ÿ‘ 1
o
Well, Dan, I fully agree with you when you said "...and not all coding is programming. But when the code specifies (or contributes to) behaviors, then it also counts as programming". I guess this spots a difference in concept between the two.
d
"contributes to" is touchy. Does specifying a (static) shape or style affect behavior? Can any declarative thing also be interpreted as a command to "make it so"?
o
And for me, "programming" is some kind of mind set, i.e. "I want this thing to behave like that, what do I need to do for that?", and coding is part of this, but as a technical and concrete activity/tool.
โœ”๏ธ 2
d
Yeah, I'd say that's roughly the essence of it.
o
If I separate the two this way, it is because building environnements for FoC/FoP (or FoPaC ;-)), is creating tools that help people doing programming activies by helping them effitiently produce code. Then focus on "programming activities" from the "UX" point of view, and focus on "code" as the raw material those tools are manipulating.
โœ”๏ธ 1
And I want to remind this article by @Will, which has a very broad sense of what is coding/programming http://willcrichton.net/notes/what-is-a-programming-language/
โค๏ธ 1
d
I retract my previous statement, and hold that sending a sequence of commands to be executed by an RC car is programing, but controlling it in real time (i.e. do what I say as I say it) is not programming. I originally conceded that the difference was too superficial to say they are different. But I think it was actually just a superficial example of programming. It's not necessarily about whether commands are "prepared" or "batched" (although that is what qualifies as "code"). It's about specifying or altering the the behavior of/for something else, rather than being in direct control as it happens. Otherwise you are the one doing the behavior (albeit through some interface). It just so happens that the most familiar form of programming (when thought of as such), is to "script" the behavior ahead of time, in which case that script is called "code". But a person (or machine learning AI) can be programmed to behave a certain way through conditioning or +/- reinforcement -- no "code" involved (for the programmer) Although if you go see a play or a musical, people follow a "script", and you are given a printout of "the program" (here's what will happen, here's who is involved, etc.)
๐Ÿ‘ 1
Maybe that means that movie directors and choreographers are (in a sense) "programmers".
๐Ÿ‘ 1
o
It's about specifying or altering the way something does (or will) behave,ย ratherย than you being in direct control as it happens. Otherwiseย youย are the one doing the behavior (albeit though some interface).
Well, I find your distinction between the two very interseting and usefull. So there is two kinds of activity: programming and controlling (or "commanding"?). Another example might be MIDI in music. You can control a midi instrument with midi controllers (keyboards, control surface with faders...) or you can program it with sequences via pianorolls or with generative algorithms. And to blur a bit mors the frontier, your midi instrument can be a program (say coded with MaxMSP our PureData).
And I think it can be usefull to have an environment when you can do both controlling and programming and mix them. Again, examples of such environment ar MaxMSP and PureData. And ObservableHQ. And Jupyter Notebook.
d
Very interesting! That reminds me of a "programmable" game controller, which could record a sequence of button-presses (with timings) and associate it a button. So I could record a couple combo moves in Street Fighter II, and then just push the right button to replay it at any time. Is call that "programming" the buttons. I think that's essentially the same concept of "programming" as for MIDI, mixers, synthesizers, etc.
๐Ÿ‘ 1
You'd think that would be called "real time programming", but it seems to already refer to programming for real time software: https://www.quora.com/What-does-real-time-programming-mean
d
Audio programming (eg, for MIDI) is real time programming, though.
d
I'm not actually familiar with how audio/MIDI programming actually works. Is it "real time" in the sense that you program it as it is running or being used? Or in the sense that you are capturing or manipulating sound in real time? Or is the programming is done ahead of time (e.g. program it, then run it), but relates to real-world timing which will be relevant when it is run?
o
Well... Hmmm... All of that! ๐Ÿ˜‰ You choose. But I guess Doug wanted to focus in the fact that the raw material you handle with Audio (and MIDI) is stuff that happens at given times in the real world. Hence "Real Time" programming.
d
> Is it "real time" in the sense that you program it as it is running or being used? I would call this "live programming". Live programming can also be real time programming, especially since it is popular for musical performances.
d
Thanks, that's the term I was looking for: "Live Programming" I guess it's unreasonable not to expect people to interpret "X programming" to mean "programming for X", and thus we need separate terminology for when programming is X (e.g. "live" and "visual" programming as opposed to "real-time" and "graphical" programming)
I just realized something about "no code". Based on what has been laid out, "code" is a scripted (e.g. repeatable / replay-able) specification for doing or generating something. Yada yada language, interpreter, etc. So I'd say that even a diagram or animation of what will happen, is code -- so long as it's a sufficiently complete and interpretable specification. But there's a lot of such things that people don't call or think of as "code". People talk about "code" when that's literally all it is: this stuff that when I read it, I understand that it means to do this and then do that, and I can picture in my head what that might look like or how that might play out. But when you work with a very direct representation of the actual thing (or behaviors), then it's not "code", it's just that thing itself (or a depiction of it). So a written description of shapes to be drawn, is code. But dragons shapes on a canvas is "no code". Technically it all is code, but you're not looking at "code", you're working with (e.g.) a direct representation of the thing -- there's no reason to think of it in terms of "code" because it just is
So maybe "code" (in the cultural sense) means that I have to interpret it's meaning. I have to read it and playing it out (simulate it) in my head. It's literally code to me because I (and not just the computer) am the interpreter.
That also hints at how much better "code" can be: direct representations that have (comparatively) immediate meaning at a glance, or for which the computer can demonstrate it. We have these powerful simulators, so why don't we offload to them vs having to manually parse and play out "code" in our heads?
d
My definition of "code" is based on expressive power, and on what abstraction mechanisms are available. It's not directly based on how code is displayed to the user. I don't consider SVG to be code, because there is no support for parameters, conditionals or iteration. Postscript, also a vector graphics standard, is code. Inkscape, a graphical/GUI based editor for SVG images, has groups and layers, which are abstraction mechanisms, but that's not powerful enough to quality as code. Some parametric CAD programs are powerful enough to qualify as code, even though what's displayed on the screen is the geometric model, which you can modify using direct manipulation. When you edit a pixel based image using a simple image editor like MSPaint, what you see (the pixels) are all there is. When you transition to a vector-based image editor like InkScape, now the pixels that represent your image are no longer all that there is. The image is partitioned into geometric objects, and each geometric object has hidden state that represents its abstract structure. This state can be revealed and edited. a bezier curve has control points that you can edit: they are normally invisible, but you can make them visible on command so that they become editable. When you transition from Inkscape to a vector based image representation that is powerful enough to be considered code, now you have more hidden structure that needs to be revealed on command so that it can be edited. If you are deeply embedded in text-based programming culture, then you might think the only way to do it is to have two panes: one shows a traditional text based program, and the other show the image that the program constructs. However, that's not the only possible user interface. Constraint based CAD programs have been demonstrating a different way to do it, going back to Ivan Sutherland's Sketchpad UI in 1960.
๐Ÿ‘ 1
d
I think you're saying that something counts as "code", to the extent that using it counts as "programming". On the one hand, it's somewhat of a closed view: code is just the means for programming, and programming is only understood in terms of code. On the other hand, that's probably the most meaningful and practical definition for 99.99% of anyone who's even talking about "code" to begin with. So I guess it depends on whether your context is immediately practical, or about reinventing everything from first principles.
d
As I mentioned before, the definition of "code" keeps changing. In 1956, "code" was machine code, and Fortran programs were not code, they were a way of programming without writing code. Today, the Scratch programming language is considered "no code", despite it being a very thin layer of graphical syntax on top of a conventional imperative programming language. For programming language research, I need a definition of "code" that is general and timeless.
๐Ÿ‘ 1