News for hackers. Stuff that matters.
Re:What will programming look like in 2020? (2012) by junon on Saturday September 25, 2021 @06:51PM (#28656858)
http://lambda-the-ultimate.org/node/4655#comment-73772

> ... the beginnings of intelligent ... assistants in our IDEs ... specialize (sic) in ... C/C++, Java, Mobile. They will have intimate knowledge of common APIs ... trained on tens of thousands of code projects pulled from the open repositories across the web (google code, github, bitbucket,...). In addition to having 'read' more orders of magnitude more code then any human could in a lifetime, they will also have rudimentary ability to extract programmer intent, and organizational patterns from code. ... The computer automatically bringing up example code snippets, suggesting references to existing functionality that could be reused.

This person (Marc DeRosa) predicted Github Copilot within a margin of one year. Incredible.

Re:What will programming look like in 2020? (2012) by lelanthran on Sunday September 26, 2021 @02:00AM (#28658750)
Cherry picking only the accurate prediction makes it seem like the predictor is really good!

Look at the rest of that quote:

> The human, computer pair, will also interactively suggest, confirm and fine tune specifications of mathematical properties and invariants at points in the the program.

That hasn't happened and as far as I am aware, is not even close.

> This will help the computer assistant to not only better understand the program but also to to generate real time, verification test runs using SAT technology,

Ditto.

> Interactive testing will eliminate whole classes of logic bugs, making most non ui code correct by construction.

Ditto..

So, 1 out of 4 predictions correct, which makes it worse than random chance?

Re:What will programming look like in 2020? (2012) by still_grokking on Sunday September 26, 2021 @02:12AM (#28658779)
Someone imagined an AI mathematician. What we've got is a parrot…
Re:What will programming look like in 2020? (2012) by sourceless on Sunday September 26, 2021 @05:39AM (#28659571)
I don't know, some of that is at least starting to happen with Idris 2, though not in the exact way predicted: https://www.youtube.com/watch?v=mOtKD7ml0NU (Type Driven Development with Idris 2)

Short summary of linked video: when your type system is powerful enough you can restrict the set of possible implementations to the point that the compiler can make a decent guess as to what the program should be to satisfy the type signature.

Re:What will programming look like in 2020? (2012) by CardenB on Sunday September 26, 2021 @02:02AM (#28658756)
Can you explain how this is worse than random chance?
Re:What will programming look like in 2020? (2012) by GuuD on Sunday September 26, 2021 @03:04AM (#28658994)
It is, for people who think that the chance of meeting dinosaur on the street is 50% (you either do or don’t)

/s

Re:What will programming look like in 2020? (2012) by jhgb on Sunday September 26, 2021 @11:41AM (#28661773)
Does that account for multiverses?
Re:What will programming look like in 2020? (2012) by maest on Sunday September 26, 2021 @05:26AM (#28659524)
They're just using a flat prior, which is maybe inappropriate.
Re:What will programming look like in 2020? (2012) by Sharlin on Sunday September 26, 2021 @07:16AM (#28659949)
A flat prior over a probability space with only four possible events, but in reality there are of course many more possible events from which those four were originally picked.
Re:What will programming look like in 2020? (2012) by junon on Monday September 27, 2021 @02:21PM (#28674140)
Yes, if we're being pedantic then they were far off.

I was just pointing out something fun.

Re:What will programming look like in 2020? (2012) by zozbot234 on Sunday September 26, 2021 @07:30AM (#28660018)
> That hasn't happened and as far as I am aware, is not even close.

Isn't that just the Rust borrow checker?

Re:What will programming look like in 2020? (2012) by jhgb on Sunday September 26, 2021 @11:42AM (#28661783)
In terms of end result, yes, but not in terms of means.
Re:What will programming look like in 2020? (2012) by chubot on Saturday September 25, 2021 @07:36PM (#28657068)
> Leveraging the strengths of the computer and human will lead to an order of magnitude improvement in programmer productivity. Interactive testing will eliminate whole classes of logic bugs, making most non ui code correct by construction.

I'd like to see evidence / experience reports backing up this part. Certainly Copilot exists, but what I've read about it is pretty mixed.

Re:What will programming look like in 2020? (2012) by kaba0 on Sunday September 26, 2021 @12:59AM (#28658519)
More like Brooks was the one being right (for like 3 decades now) with his ‘No silver bullets article’, in that we will not have another order of magnitude productivity change in programming after high level languages became a thing.
Re:What will programming look like in 2020? (2012) by kragen on Sunday September 26, 2021 @07:46AM (#28660097)
Brooks wrote "No Silver Bullet" in 01987. The examples of high-level languages he mentions in his paper are Ada, Modula (not sure whether the 01975 version or Modula-2), Simula-67, APL, Pascal, Smalltalk, Fortran, COBOL, PL/I, and Algol, and of these he thinks Ada is the most promising. Does his thesis hold up in the face of modern programming language advances?

I am not confident that there are programs I can write in Python, JS, or OCaml in one hour that nobody can write in Ada in ten hours, and programs in those languages in ten hours that nobody can write in Ada in 100 hours. I'm even less confident that they beat Smalltalk by as much. The exception is for very small programs: you can write things in Python in 5 minutes that nobody can write in Ada in an hour.

http://canonical.org/~kragen/sw/dev3/rpneact.py is maybe one example, which I wrote over the course of about 12 hours on January 2. It's a simple interactive calculator app that includes a general-purpose numerical equation solver; from the Python standard library it gets floating-point and complex arithmetic, regular expressions, and command-line editing. I don't think it would take me even as long as 120 hours to write it in C, which is roughly the same level as Ada but more painful to debug.

Similarly, http://canonical.org/~kragen/sw/dev3/lmu.py is a very limited MUD, where multiple users can connect, interact, and collaboratively build a textual world by creating rooms and other objects and setting their descriptions: sort of like a Wiki for interactive fiction, though without much richness of interaction. I wrote this between July 18 and July 24 last year, probably taking more than 20 hours in total. Writing it in C would have been slower but surely would not have taken 200 hours.

The main thing that's happened since 01987 is that computers have gotten a lot faster and bigger, so we can get by without as much attention to efficiency, and software libraries are also enormously more powerful. It's not that much easier now to write a SQL database than it was in 01987, but it's a hell of a lot easier to link in SQLite. It's not that much easier to write a regular expression matcher, but every modern language has one in the standard library already. Rendering Telugu text properly still involves a lot of hairy cases, but whether you're in a terminal or a browser, generally all you need to do is emit some UTF-8 bytes and you're golden.

Re:What will programming look like in 2020? (2012) by kaba0 on Sunday September 26, 2021 @11:20AM (#28661542)
I may not really get your point: are you trying to prove or disprove the original article?

In my opinion it does hold up, since indeed we can hardly even be 2x more productive in a barebone project with different programming languages, let alone an order of magnitude.

And what you are getting at is as far as I remember was the escape hatch mentioned by Brooks himself, that is the only significant improvement in productivity will come from the ecosystem. And I think we are behind even at that, in that we unfortunately have many NIH projects doing the exact same thing across language ecosystems, with not much interoperability. Eg. the JVM, Python, JS ecosystem has barely any shareable elements. Hopefully something like Graal’s polyglot might change it in the future.

Re:What will programming look like in 2020? (2012) by kragen on Sunday September 26, 2021 @12:06PM (#28662027)
Well, I was hoping to disprove it, and then I looked at things I'd written recently in high-level languages, for which I had logs of how long it took me, and came to the opposite conclusion: Python might be more productive than Ada, but not by an order of magnitude. Of course someone else might be a much better programmer than I am in Python, but in all likelihood their improvement over me in lower-level languages would be even bigger.

The library ecosystem is a great bright spot: the cost of modularity has fallen to such a point that leftPad is its own NPM module. The fact that Python has a separate leftPad as the .rjust method on strings seems less significant than the reduction of duplication within each ecosystem. Historically if you wanted your library to be usable from anywhere, like D-BUS, you wrote it in C, and that's still a viable option; but Rust is shaping up to be a better alternative there.

I do think we can be more than 2× more productive in a barebones project with better programming languages, because I've been programming in assembly language this week, and it is pretty slow going. But I reluctantly came to the conclusion that Brooks was right: the big leap in raw productivity was from assembly to Algol 60, not Algol 60 to JS. (And, separately, from batch mode to interactive programming.)

Re:What will programming look like in 2020? (2012) by laurentlbm on Sunday September 26, 2021 @11:47AM (#28661834)
Why do you write years with a preceding zero?
Re:What will programming look like in 2020? (2012) by kragen on Monday September 27, 2021 @08:46PM (#28678000)
Re:What will programming look like in 2020? (2012) by chakkepolja on Sunday September 26, 2021 @08:33AM (#28660385)
Availability of internet & resources like Stack Overflow can be considered a silver bullet, if you consider less proficient / junior programmers.
Re:What will programming look like in 2020? (2012) by Areading314 on Saturday September 25, 2021 @08:03PM (#28657212)
Does anyone actually use Copilot day to day? How much time does it actually save?
Re:What will programming look like in 2020? (2012) by pps on Sunday September 26, 2021 @04:58AM (#28659419)
I do, it's helpful most of the time, mostly because it behaves like intelligent text expander, and couple of times a day I'm consciously aware how it helped me in even more "intelligent" way. There were also situations when it was distracting/confusing, but I can deal with it. I'm working as web dev, with TS, JS and PHP, and in my case there is no place for some great solutions that I wouldn't thought about myself (less than 5 times I've used something generated with comment), it's simply predicting what I want to do next in the line and instead of writing 50 chars to end that, I can hit tab. Honestly, I don't want to work without it anymore.

EDIT. regarding these situations when it doesn't predict what I wanted, I feel that my brain is getting better at not focusing at that and moving on. At first it was distracting, now I subconsciously know that the provided solution might be wrong and I'm deciding faster if it's something I should choose or skip. Your tool is adapting to you and you're adapting to your tool to find the right balance :)

Re:What will programming look like in 2020? (2012) by maest on Sunday September 26, 2021 @05:29AM (#28659537)
Perhaps controversial, but maybe that's an issue with the PL - if higher level, domain specific, more powerful abstractions were baked into the language, maybe all the boilerplate would not be necessary.

Of course, getting a new language to wide spread adoption is far from trivial, but that's a separate problem.

Re:What will programming look like in 2020? (2012) by solidr53 on Saturday September 25, 2021 @09:14PM (#28657537)
Writing scrapers with it is also amazing. All from the puppeteer code, response interface and casting to a local class model. Very time saving indeed.
Re:What will programming look like in 2020? (2012) by 37ef_ced3 on Sunday September 26, 2021 @01:36AM (#28658673)
How close are you to being fully obsolete?
Re:What will programming look like in 2020? (2012) by bspammer on Sunday September 26, 2021 @07:31AM (#28660023)
The correct response to becoming obsolete is to learn something new, not to fight the thing making you obsolete. Doing the latter is about as productive as yelling at the tide to not come in.
Re:What will programming look like in 2020? (2012) by 37ef_ced3 on Sunday September 26, 2021 @11:20AM (#28661543)
Yes, I guess it's like complaining about nuclear weapons. Best to embrace them.

If we can do it, we should do it. All technology is progress. All technology improves the human existence.

Re:What will programming look like in 2020? (2012) by bspammer on Sunday September 26, 2021 @07:20PM (#28665531)
It's irrelevant whether the technology is good or bad. There's nothing you can do to stop it happening, so do you want to complain, or do you want to embrace the change and stay ahead of the curve?
Re:What will programming look like in 2020? (2012) by 37ef_ced3 on Monday September 27, 2021 @10:59AM (#28671439)
I work on deep learning professionally, at the most important company in the space. I even have open source deep learning projects, most recently:

https://NN-512.com

I profit from your obsolescence. I'm making you obsolete. I know what I'm doing. I'm making you worthless. The fact that you can fail to do even a basic check into me speaks volumes.

Re:What will programming look like in 2020? (2012) by bspammer on Monday September 27, 2021 @12:04PM (#28672426)
Very impressive, but if I spent my days googling the random hex usernames of every person I replied to on hacker news I'd be obsolete even faster :)
Re:What will programming look like in 2020? (2012) by 37ef_ced3 on Monday September 27, 2021 @12:40PM (#28672893)
I am the one who knocks.
Re:What will programming look like in 2020? (2012) by fermuch on Saturday September 25, 2021 @09:24PM (#28657584)
Writing boring chores or repetitive code is amazing. Need to handle all cases in a case in pretty much the same way but changing only one thing? Write the first one, the rest is auto coded perfectly.
Re:What will programming look like in 2020? (2012) by cube00 on Sunday September 26, 2021 @01:35AM (#28658669)
> Need to handle all cases in a case in pretty much the same way but changing only one thing? Write the first one, the rest is auto coded perfectly.

As someone who has suffered though inheriting a code base of excessive copy/paste with things done "pretty much the same way but changing only one thing" it's a nightmare to take it to diff and try and refactor out the common code. In my case I had to fix a bug in their copy/paste mess and found six separate copies of a whole functions worth of code duplicated.

I suspect part of the reason is for the initial developer it's a great feeling to churn out tons of code and it all kind of works without having to think how you make a block of code generic (avoiding temptation to just pass in a global state struct and dealing with function pointers in the worst cases etc) but having suffered the after effects, I implore you, PLEASE don't repeat yourself (DRY)

Re:What will programming look like in 2020? (2012) by Jensson on Sunday September 26, 2021 @01:15AM (#28658588)
Sounds like a technical debt generator. I feel for the devs who will have to clean up the legacy from this in 10 years.
Re:What will programming look like in 2020? (2012) by bserge on Sunday September 26, 2021 @05:56AM (#28659615)
Sounds like a job creator :P
Re:What will programming look like in 2020? (2012) by nsoonhui on Saturday September 25, 2021 @11:47PM (#28658238)
But isn't much better to just manually code it into reusable function and use it repeatedly, instead of letting AI generates all the boilerplate code and causes maintenance headache down the road?
Re:What will programming look like in 2020? (2012) by tobr on Sunday September 26, 2021 @01:17AM (#28658595)
> boring chores or repetitive code

> manually code it into reusable function and use it repeatedly

Refactoring every place where you do x into a reusable function that does x is a boring repetitive chore.

Re:What will programming look like in 2020? (2012) by jrochkind1 on Sunday September 26, 2021 @01:57AM (#28658745)
Can you clarify if this is from your personal experience using copilot, you are using it to do those things, successfully, in your routine work?
Re:What will programming look like in 2020? (2012) by pharmakom on Sunday September 26, 2021 @04:17AM (#28659257)
Sounds like a really limited programming language if there aren’t smarter ways around this in the code.
Re:What will programming look like in 2020? (2012) by davidpires on Saturday September 25, 2021 @08:24PM (#28657304)
Depends on the task, writing e2e tests using copilot it's amazing
Re:What will programming look like in 2020? (2012) by byteface on Sunday September 26, 2021 @04:32AM (#28659321)
I do every day. I code 5 times faster on problems several times harder.

You also get good at 'using copilot' just like you can be 'good at googling'. So if you not already doing it. Start now.

IMO. There's literally no point coding without it. You are completely wasting your time. However it has limits. It only helps you write code. Architecture is still down to you. If it could read your whole codebase rather than just the page you are on. And if you could supply it prompts via urls. i.e. preloads it with hints from other code bases. Then it will really become something else.

Re:What will programming look like in 2020? (2012) by meijer on Sunday September 26, 2021 @07:44AM (#28660091)
> There's literally no point coding without it.

Except maybe that it is still not generally available.

Re:What will programming look like in 2020? (2012) by byteface on Sunday September 26, 2021 @10:06AM (#28661003)
True. My son is on the waiting list several week now. But honestly traditional coding is the past. Soon they might be asking for someone with 12 months copilot experience. I don't mind the negative downvotes from luddites. Copilot is smarter and faster than you. Accept it and learn to use it.
Re:What will programming look like in 2020? (2012) by rak1507 on Sunday September 26, 2021 @11:52AM (#28661872)
If copilot is smarter and faster than you, that says more about you than it does about copilot :)
Re:What will programming look like in 2020? (2012) by byteface on Sunday September 26, 2021 @04:29PM (#28664383)
If you don't think it is. It says a great deal about you too :)
Re:What will programming look like in 2020? (2012) by rak1507 on Sunday September 26, 2021 @06:36PM (#28665308)
I don't just think it isn't, I know it isn't. I've tried it, and watched friends try it too.

Copilot is decent at speeding up some commonly occurring boilerplate in a common language, and pretty bad at anything else.

FWIW, there was also this https://challenge.openai.com/codex/leaderboard, and Copilot's 'time' was laughably bad compared to any decent human.

Does this mean that it couldn't potentially be a useful tool? No. I think it could be, and for some projects I would probably use it myself to speed up some laborious tasks. But currently, claiming it can help with anything remotely more complex is just untrue.

If you have evidence to the contrary, I'd like to see it.

Re:What will programming look like in 2020? (2012) by byteface on Monday September 27, 2021 @02:39AM (#28667751)
Not sure what you would take as evidence. You seem convinced. I have github repos. If you like, take any app idea. In any language you want. We can both spend 2 weeks building it. Screen record yourself making it and ill use copilot, you don't. We can see who's is better?

edit.

- ok so you conceded in your sentence that it's faster and you would use it for that reason.

so your only disagreement is it can't help you solve harder problems?.

- the average dev is hitting stackoverflow 10x a day for that very reason. And that data is embedded in copilot. I've literally typed the name of functions I was going to have to spend 20 minutes googling to figure out how to achieve. typed the pseudo code comments and boom. copilot has done it before I even had to think. If not I just have to change how i prompt it by feeding it a few variable names or changing my comments. As I said. You can get good at using it. If copilot is crap it's because of the person using it. I.e. if you are looking for a bike and you google 'chicken sandwich' well. You aint gonna get a bike.

Re:What will programming look like in 2020? (2012) by rak1507 on Monday September 27, 2021 @07:12AM (#28669294)
That sounds like an interesting idea, but to me a more convincing thing would be seeing the same person do something with + without copilot and see if it makes a big difference when used correctly.

To me 'smarter and faster' means being able to solve harder problems + accurately reason about things, etc. (And not introduce security issues, which is a whole other thing...)

If it is just a replacement for stackoverflow, it's probably useful and it could save time, but I'm not sure it's 'smarter and faster' any more than any other feature in an IDE (you could also create a hotkey or something to search SO which would probably be just as fast too).

Re:What will programming look like in 2020? (2012) by byteface on Monday September 27, 2021 @07:57AM (#28669590)
You really notice when you don't have it anymore after using it for several weeks. Writing each line again, each painful character one at a time. I keep accidently opening sublime and going to type then realising it doesn't have copilot. And think ugh.

It's nice to reason about your actual problem and not the features of code.

Re:What will programming look like in 2020? (2012) by jen20 on Sunday September 26, 2021 @09:48AM (#28660869)
Or trivial matters like “license compliance”.
Re:What will programming look like in 2020? (2012) by moogly on Sunday September 26, 2021 @12:27PM (#28662201)
People only seem to have heard about GitHub Copilot. But Microsoft has a similar solution (that is not as... invasive) that was first released in preview in 2018. It's called IntelliCode, available for multiple languages both for Visual Studio Code[1] and regular Visual Studio[2] (but not enabled by default last time I checked -- which was a while ago, granted).

JetBrains has their own experimental thing that is not enabled per default.

And there's also Codota and Tabnine.

Copilot is actually fairly late to the party here.

[1]: https://marketplace.visualstudio.com/items?itemName=VisualSt...

[2]: https://github.com/MicrosoftDocs/intellicode/blob/master/doc...

Re:What will programming look like in 2020? (2012) by byteface on Sunday September 26, 2021 @04:25AM (#28659287)
Well people were making API calls to stackoverflow at the time to pull the most popular answer based code comments. There were several Sublime plugins. So this wasn't so hard to imagine.
Re:What will programming look like in 2020? (2012) by lasc4r on Sunday September 26, 2021 @12:51AM (#28658483)
FYI, specialize is the American spelling.
Re:What will programming look like in 2020? (2012) by junon on Sunday September 26, 2021 @04:23AM (#28659277)
Yep, I'm an American. It was missing the 'D' on the end ("specialized") hence the (sic).
Re:What will programming look like in 2020? (2012) by ldjkfkdsjnv on Saturday September 25, 2021 @08:37PM (#28657375)
Its honestly not that hard to predict, with a bit of statistics and some insights into early deep learning, its obvious that alot of data with discernable patterns will produce good results.
Re:What will programming look like in 2020? (2012) by sandwichbop on Saturday September 25, 2021 @09:27PM (#28657596)
What will programming look like in 2028?
Re:What will programming look like in 2020? (2012) by Koshkin on Saturday September 25, 2021 @10:10PM (#28657811)
2028 will be the year of Linux on the desktop, so…
Re:What will programming look like in 2020? (2012) by craftinator on Sunday September 26, 2021 @02:30AM (#28658848)
We'll all be using Deno, Crystal, Nim, and Zig, and lament with great nostalgia the days of Node, Ruby, Rust, and C/++.
Re:What will programming look like in 2020? (2012) by nsonha on Sunday September 26, 2021 @02:35AM (#28658870)
I understand that the value proposition of Rust is better C++, Deno is better Node. Crystal's "Better Ruby" doesn't sound like much given Ruby is niche anyway. What is it for Nim and Zig?
Re:What will programming look like in 2020? (2012) by dosshell on Sunday September 26, 2021 @03:54AM (#28659179)
Zig is a better C in many ways. Memory handling, error handling, security, but most importantly it can be used together with C. No need to port your code base just swap to zig and continue. Of course now you have a code base in zig and C... :/
Re:What will programming look like in 2020? (2012) by Alekhine on Sunday September 26, 2021 @03:00AM (#28658981)
What makes you think Rust will be out the door? None of those languages are as fast, while also being memory safe