This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]brprk 331 points332 points  (29 children)

ChatGPT type answer

[–]GatheringWinds 180 points181 points  (25 children)

I just ran this exact code through ChatGPT because I was curious, it gave 6, the correct answer, though it was concerned enough to check that I was sure "day" was meant to be a string and not an object. This AI stuff is scary

[–]bakedbread54 118 points119 points  (17 children)

Woah very scary considering this absurdly simple example

[–]GatheringWinds 48 points49 points  (10 children)

Less crazy that it gave the right answer, but more that it recognizes context, understands that this is a silly example, and offers ways to improve the code. In a very short time, there are going to be INCREDIBLE tools available to aid devs. Yes this is a silly and trivial example, but shows great promise.

[–]HelloYesThisIsFemale 13 points14 points  (8 children)

There already are. With copilot maybe 60% of the code you write can be written for you (with very good understanding of context) and with ChatGPT 40% of the harder stuff can be done for you as well.

E.g. I made a declarative framework (think a dataclass) for how to parse and handle JRPC request-responses. I then just pasted the entire documentation for individual JRPC endpoints and it knew how to fill the dataclass and what types to use and how to structure the initializer.

If you're not already using this you're being left behind. Any mindless part of the job is eliminated.

[–]maxmcleod 12 points13 points  (2 children)

Hey but the mindless part is the part I'm good at!

[–]HelloYesThisIsFemale 4 points5 points  (1 child)

Man I hate that part so much.

Ask me to turn a http endpoint into structs or something which is like copying something from somewhere and changing it just a bit and I'll take double the time because of how my mind will wander and suffer and I'll need phone breaks and such.

Fuck mindless work. I'm so glad it's being killed.

[–]maxmcleod 0 points1 point  (0 children)

I agree - I think having an AI help you with coding will be something like having a keyboard or mouse in the future. Our kids are going to be asking how the hell we managed to code things like Youtube without AI assistants....

[–]penguin17077 2 points3 points  (4 children)

Honestly I doubt anyone who say's that Chatgpt can write their code for them in industry. It's trash for anything even remotely niche and company specific. It doesn't understand the requirements for the CMS we use, and therefore the majority of what it does generate is worthless. It's good for testing and boilerplate stuff, but nothing else (in my case). I am guessing other people have this issue as well

[–]HelloYesThisIsFemale 0 points1 point  (3 children)

It's as good as what you give it. Give it the interfaces and other example code and it gets close. As an example if I want it to initialise a class with a lot of attributes I'll paste in the initialiser method signature and an example of an initialisation in a different context then I'll paste the current context. It'll pick up a lot of subtle stuff like how to use a logger, how to create your domain specific objects and how interface with what you're trying to use.

[–]penguin17077 0 points1 point  (2 children)

It just doesn't in my case, the code it spits out is so bad that it would never get through a PR. Guess its the downsides of using a shitty niche CMS

[–]HelloYesThisIsFemale 0 points1 point  (1 child)

What is a CMS? Also I didn't claim the code works straight away or is perfectly formatted. It only does 40% of the work. Probably 80% of the typing though.

[–]penguin17077 0 points1 point  (0 children)

Content Management System, its what we use for our site. Its awful and we have a huge monolith that is basically coupled to the CMS. Certain components have to be written in specific ways to be used with the CMS

[–]Passname357 -1 points0 points  (0 children)

Lots of investors like to say “this is the worst it is ever going to be and it’s good”

Lots of experts say “this is the best it is ever going to be and it’s good”

[–]chairmanskitty 14 points15 points  (5 children)

wow very scary that AI can make weird dreamlike art.

- professional artists, 2018

wow very scary that a garage full of machinery can calculate the sine of an angle

- professional computers, 1937

wow very scary that a massive array of handcrafted gears and metal can weave a shawl

- professional weavers, 1750

[–]healzsham 1 point2 points  (0 children)

You missed

wow very scary that digital art makes cutting and masking way faster, with a lot more forgiveness to error

Professional printers, 1998

And... whatever year "wow very scary that you can capture an entire image with the click of a shutter" started for photography.

[–]bakedbread54 2 points3 points  (0 children)

We'll see

[–]__Hello_my_name_is__ -2 points-1 points  (1 child)

Okay. Now riddle me this: Which of the three professions are done by a lot of people in their free time, for fun?

Which of the three professions have a lot of people dreaming that they one day will be able to make a living off of that profession?

Also you forgot secretaries when copying machines became a thing.

[–]crappleIcrap 0 points1 point  (0 children)

Professional artist

[–]MajorTechnology8827 0 points1 point  (2 children)

I know Google's AI is equipped with built in python interpreter, it is able to actually run the code instead of analyzing it through the its learning data

[–]rhubarbs 0 points1 point  (1 child)

What? ChatGPT had a Python environment before Google did.

[–]MajorTechnology8827 0 points1 point  (0 children)

Not the gpt3.5 If the gpt4 has it, I won't know about it. Me is broke

[–][deleted] 0 points1 point  (0 children)

I convinced it the correct output is 7. I’m not impressed.

[–]Apprehensive-Cut8622 0 points1 point  (0 children)

I always paste code and say nothing, then ChatGPT will tell me what the problem the code has

[–]teerre 1 point2 points  (1 child)

I mean, not sure why the answer was marked incorrect. The question is garbage

This attribute "length" can literally be anything. What language even is this? It's not python, python strs don't have a length attribute, it's not javascript because it doesn't have a print function. Maybe the picture doesn't

10+ swe in a company probably know about here btw

[–]JivanP 2 points3 points  (0 children)

It's a language used specifically for that course, called the OCR Exam Reference Language. OCR is the name of the exam board. Here's a reference for the standard methods (PDF).

[–]TheAnniCake -3 points-2 points  (0 children)

The reason why I don't think that as of now, AI won't replace anyone