"First a punch is just a punch,
Then a punch is not only a punch,
And finally a punch is just a punch" (heard from Bruce Lee)<p>Basically it means that in the beginning we punch like we can.. then a martial arts student learns the proper and different ways to punch.. so a punch is no longer just a punch... Is a lot of instructions..
Then to sheer practice and repetition the right way to punch becomes second nature.. so the right way to punch is the only way so it's only a punch again.<p>So coding it's just ifs and loops... Then is OOP and Functional and Logic... But then once you transcend all those paradigms you understand that is all ifs and loops.
That first reply is so funny to me because it hits too close to home<p><a href="https://twitter.com/nice_byte/status/1466940940229046273" rel="nofollow">https://twitter.com/nice_byte/status/1466940940229046273</a><p>The more I do this, the more I gravitate towards the simple things.
Well, quite: if you add that code must run sequentially it's the Boehm-Jacopini theorem: <a href="https://en.wikipedia.org/wiki/Structured_program_theorem" rel="nofollow">https://en.wikipedia.org/wiki/Structured_program_theorem</a>
Thats why i am seeing DB schemas without indexes lately. End of the day people with this kinda thinking make others to fix the broken code that they left behind.<p>As a senior software engineer i had to spend a lot of time at night fixing code written by junior devs and interns.<p>the code that company and devs (just ifs and loops gang) proud of was a pain in the ass for me so i quit the job entirly and do freelancing these days.<p>I tried to explain how something was wrong and why but no one would listen all believe they were 10x developers, Life lesson learned, never ever try to correct an idiot.<p>Here are some of the practices they followed
* No indexes on tables, not even unique
* No DRY, NO KISS
* Switching to new shiny framework/library every week
* no tests
* Keeping entire codebase in a single file (4k LOC)
* no versioning
* Exposing DB credentials to the entire internet and not acting when being warned
If you want to go even lower than that, coding is basically just saying <i>yes</i> or <i>no</i> in response to a <i>yes</i> or a <i>no</i>.<p>Sure, that's oversimplifying it, but that's the smallest unit of information being changed during computation.<p>But yes, once you learn the basics that are shared between most programming languages and don't get distracted by the nuances, it doesn't take that long to pick up a different language. Being <i>proficient</i> is of course another question, but achieving a basic understanding shouldn't take all that long when you just focus on how to if-else, how to setup loops, and how to assign variables.
This is funny, but it's like saying "Math is basically pluses and minuses".<p>I see coding as playing with hardware without having to use soldering iron.
UGH. Back in my day the only language was BASIC and we only had IF and GOTO. Dijkstra has made these children SOFT and I'd piss on his grave if I could be arsed to get out of my rocking chair.
In my twenties, I wanted to use all the cool PL techniques: meta-programming, reflection, monads, macros, type-level programming, etc. I'm getting older and now I want my programs to be 90–95% functions, arrays, structs, enums, and loops and only parsimoniously throw in more advanced language features.
There’s a joke in the fp community I can’t find right now that describes the evolution of programs from imperative side-effectful statements to a for comprehension, with exception catching, that looks nearly identical.
Then what the fuck is a monad?!?<p>Seriously I still don’t know what a monad is and apparently it’s just a bunch ifs and for loops, so I guess I’m pretty stupid.
Actually coding is just literary translation into a language spoken only by pedantic idiot savants<p>That's why it's pedantic idiot savants who tend to be the best coders
Good code explains the problem to the reader and implements the solution as a side effect.<p>You can often express the problem quite well using a combination of if, for, comments, variable names, function names, list/set and map data structures.<p>Sometimes (<10%) you encounter a problem that's interesting enough to define a custom type, and sometimes you make tree data structure out of it (<1%). On very rare occasions (<0.1%), you need a more complex data structure.<p>Code that uses thousands of classes is very hard for a reader to approach, but so is a single file with a never-ending ifs and for loops. Always write code for another person. If nothing else that other person might be you in a few months (or much sooner).<p>Coding is basically just writing for humans in a language a computer can execute.
I remember explaining recursion to an aspiring programmer to apply to some tree node walking or something, and at some point it clicked! I saw the second it worked in the reflection in her eyes, they got big and lit up and there was this palpable sense of "a-ha" in the room! It was one of the coolest moments of my professional life.
But yeah, my kids (one of whom is picking up programming) would be right behind the "ifs and loops" statement.
Sounds like the Re-birth of the "Expert System". Now with neural networks ;)<p>Learning from Artificial Intelligence’s Previous Awakenings: The History of Expert Systems<p><a href="https://ojs.aaai.org/index.php/aimagazine/article/view/2809" rel="nofollow">https://ojs.aaai.org/index.php/aimagazine/article/view/2809</a>
my professor at uni always said that machine code is just 1's and 0's and if you can count to one you can understand computers<p>(with a smile on his face and shrugging his shoulders)
The way I interpret this is that the 'just ifs and for loops' is like Matrix rain code. In the beginning it looks like gibberish scrolling down the screen. When you master it, it's still gibberish scrolling down the screen, but it's simultaneously something else on another level as well.<p>I often find myself writing simple things with a compact-but-high-level-conceptualization, that when edited by someone else, clearly only saw the rain.
Ifs and for loops are trash. Real programmers just write massive linear algebra operations that they can throw on a cluster of GPUs to get 50,000x parallelism. ;)
Lol no. It is a whole sets of skills, from extracting just right abstracts from the problem domain and defining adequate sets of interfaces, to arrive at just right (clear, concise, mostly-functional) modular implementation.<p>Almost no one nowadays possess these skills. I we have is node_modules crap and J2EE-like design bullshit.<p>This like saying that poetry is just words and commas.<p>But he is just a kid, I know. ;)
Ahem, and <i>math</i> in between. Quite a lot of it.<p>Calculating the square root of a number is ifs and loops but wouldn’t be much fun without the math.
I'm one one of a small number of people at my FANNG company that can work on a legacy MM LoC Perl project.<p>Many of them are much smarter than me, but I think my insight which I remember getting around 6 months in is that it's just code, in many places hard to read/follow, but it will ultimately just do a logical set of instructions.
Ah, keen observation, young grasshopper! But nota bene: just as man cannot live on bread alone, one's understanding does not arrive merely from the consideration of a collection of atoms.
Just to be clear: a language with only if() conditionals and for() loops with known number of iterations (so for instance all for-each loops) isn't actually Turing complete. This is called primitive recursion, and an easy to prove example of what it cannot process is computing the Ackerman function.<p>Also, you can easily see that something is fishy because all such code must terminate (where's the halting problem here?)<p><a href="https://en.m.wikipedia.org/wiki/Primitive_recursive_function" rel="nofollow">https://en.m.wikipedia.org/wiki/Primitive_recursive_function</a><p>Otherwise I completely agree with the aphorism.
joke aside. we know a language is Turing-incomplete if it has only ifs and bounded for loops. And if 90% programmers' tasks can be done using a Turing-incomplete language, is there any benifits we can get from this?