I only understand what a compiler is doing after having written one (albeit a tiny one) myself during my studies.
I only understand what a compiler is doing after having written one (albeit a tiny one) myself during my studies.
How many people need to understand how a compiler works to sling some code for a paycheck or just for fun.
I learned how compilers work purely for fun, it provides me absolutely no benefit in my day to day life, and before that I taught myself how to code for the exact same reason. If I had to go the opposite route, learn how compilers work before learning to code, I seriously doubt I’d have taken the time.
Other things are the same, I’m horrible at doing math but managed to learn enough linear algebra to finish a coding project I was interested in doing. If I would have had to code up all the hard bits instead of calling matrix1 * matrix2 that project would never have happened.
Another layer of abstraction isn’t always a bad thing, these AIs will eventually figure out how to write bug free code when you tell it to “write a function which calculates the flight velocity of a sparrow carrying a coconut”.
Only the ones who want a good job.
One of the consequences of automation has been a widening gap between top jobs and ordinary jobs. It's plausible that AI will continue the same process. Many jobs that pay well and are intellectually and socially rewarding today may become similar to airport security checks in the future. You observe what a machine does, double-checking its conclusions and looking for anything out of ordinary. And you often fail at that, because the human brain is poorly suited for such tasks.
When the future is uncertain, its good to have a deeper and wider understanding of things than what your current job requires.
I think it's pretty important. I use my very basic knowledge of how compilers work occasionally in my mostly-interpreted code world to diagnose and debug performance issues.
I also used a low-level debugger and taint/trace method recently to diagnose Windows DLL issues that happened after X seconds of starting up a program that interfaced with specialty hardware. A couple young early-career technicians/engineers watched me do it and were incredibly flabbergasted and figured me for some sort of genius when in reality I kinda only know how it works and was just reading the stack/heap as I was paging through; knowledge I acquired from booting SoftICE a few times as a kid.
There's a real lack of simply knowing how a computer and/or a network works, which is to be expected since layers and layers of abstraction have made it very easy to teach computer literacy and even computer programming on many levels. The issue is that when things go wrong and Stack Overflow doesn't have the answers, almost all young engineers I work with have no experience at low-level analysis and debugging, very little knowledge of first principles, and don't know where to Google to start acquiring it.
This isn't me shaking my fist at the kids or anything. They're more productive than I was at their age/experience level with code, and that's due to better knowledge and integration using IDEs which I never had, plus likely better high-level understanding of what's going on. But I fear a generation of developers and technicians who largely have little understanding of how computers work is problematic.
I asked it to retry, and got this:
function calculateSparrowFlightVelocity(coconutWeight) { // Assume that a sparrow can carry a maximum of 1.5 ounces of weight if (coconutWeight > 1.5) { return 0; }
// Assume that the flight velocity of a sparrow is 5 meters per second // and the weight of a coconut is 0.5 ounces return 5 * (1 - (coconutWeight / 0.5)); }
// Example usage: console.log(calculateSparrowFlightVelocity(0.5)); // Output: 4 meters per second console.log(calculateSparrowFlightVelocity(1.0)); // Output: 3 meters per second console.log(calculateSparrowFlightVelocity(1.5)); // Output: 0 meters per second (sparrow cannot carry this weight)
Can any Monty Python fans confirm if this is correct?
Beside, with ChatGPT in its current state, it's still absolutely impossible to get it to produce any useful code without knowing how code works. There is an advantage to the precise specification of a formal language. At least for the next decade, I think there will be human proof-reading AI output before generated code is ran, with catastrophic consequences when that doesn't happen.
What I've difficulties getting over right now is every time I write something (text or code) I ask myself "Could ChatGPT have written it better?"