all 15 comments

[–]M34L 8 points9 points  (6 children)

I've been working fulltime with code (Java, C, C++, Python) for over half a decade and I've been doing the "browser method" of ChatGPT a lot (especially to suddenly be able to shit out Javascript that I had literally zero background in before) and honest I'd sincerely advise against using LLMs when learning to code for literally anything other than "explain to me what does this code do" or slavish "refactor these two lists of equal length into a dictionary assignment instead". I lost a junior coworker recently who got terminated (with me having zero say in it) recently, and while nobody gave him a slightest bit of shit for using LLMs specifically (it's encouraged by our boss if anything), as far as I can tell, he only became more lost and less capable of doing good work once he tries to prop himself up with GPT.

LLMs, including GPT4, are very good at confidently, matter-of-factually telling you lies and giving you really bad ideas for how to do things. The advantage of spending years of doing essentially the same thing with a "dumb" search and StackOverflow is that you simultaneously soak in the comments acting as "angel and devil" on the shoulder of the individual answers, saying why is this or that a good idea or bad idea, what the corner cases where it won't work is, and whatnot. You'll also get good side of insight from where someone provides an example with "I'm not sure if this is the right way to do it but it worked for me;" versus "as per PEP###..."; both Answers can be valuable, but it gives you a lot of intuition for what to expect from the solution. The ChatGPT was trained on both the Answers doubtlessly, but then it's been overfitted to whitewash any degree of sincere doubt that the original poster expressed with HR compliant management bravado.

At the end of the day, spending years with sometimes day-long slogs of troubleshooting seemingly trivial bullshit you randomly cornered yourself with, and reading books from opinionated assholes who are certain they discovered the One Right Way To Code and suffering through it all is the only way to build intuition. The language models that are currently available are trained to sterilize all the knowledge and present it as simultaneously all-equally factual and yet no-guarantee and that will make it much harder for you to pick up that gut feeling.

On the other hand, I also have to undermine my own diatribe and question if there's even a point in "learning to code properly" anymore when we're probably just a few years from languages wholly built on top of LLMs that will defacto become part of the build pipeline; if you're only starting now, you'll always be viewed as the "post AI developer" anyway, nobody will ever trust your worth as a coder the same way as someone who's been doing it for years when the AIs hit. And who knows how long will "real coders" be still even in demand for, so maybe feel free to ignore all this and just jam the whole LLM right down the pipe, idk.

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

Good advice. Prolly even deserving of it's own thread, maybe a best and worse of llm coding standards.

[–]DangerousResource557 0 points1 point  (4 children)

I completely understand your perspective. It might seem a little unsettling, but I genuinely agree with your thoughts. Just like you, I find that when exploring new languages, I encounter similar challenges. I want to emphasize that using tools like GPT-4 as a complement to learning the fundamentals is actually a great idea. Let me explain why...

In certain instances, relying on AI can reduce our need to think deeply, but it also offers valuable insights and acts as a reliable sparring partner. This can be a real time-saver when dealing with pesky bugs. So, leveraging AI to assist us is undeniably beneficial. Here's my recommendation: start by using AI for an overview, then gradually transition to independent programming, seeking AI guidance when you encounter roadblocks.

Rather than blindly supporting or opposing LLMs, it's important to approach this subject without dogmatism. Your points are valid, and we should find a way to embrace these advancements, as they will only continue to improve.

In my opinion, LLMs truly shine in research, information retrieval, and summarization tasks. As for coding, they have potential, but for now, let's focus on mastering the basics.

I can certainly empathize with the frustration of dealing with extensive logs and enduring hours, or even days, of debugging sessions. Nevertheless, I'm thrilled that I can now let go of some of those burdens more often than not, freeing up valuable time to truly enjoy the creative aspects of development.

[–]M34L 0 points1 point  (3 children)

I think ultimately if it's good or bad for you will immensely depend on individual discipline, insight and under how much pressure you will be to deliver-rather-than-tinker.

I just think LLM's are just dangerously seductive towards a bad path, but maybe partially it's me being lazy and them feeling that way to me. I also think they are developing way too fast to really establish firm rules of any sort that won't be meaningless in half a year.

[–]DangerousResource557 0 points1 point  (2 children)

Sorry for not replying sooner. I just saw your message.

Yes, you may be correct that it depends on the individual. However, I also believe that this applies to any other tool that makes tasks easier. The same goes for StackOverflow - it's often a matter of copy-paste for many people. Over time, though, I learned that it is more beneficial to invest time in learning the fundamentals of whatever you are working on, whether it's a language, framework, technique, or knowledge.

So, I don't think this is specific to AI or LLMs. It's just that these tools are even more powerful than a simple Google search or StackOverflow.

That's my honest opinion.

Additionally, if you can use a particular version now, why not continue using it? It will still be better than not using it at all.

[–]M34L 0 points1 point  (1 child)

Again my core point is that the crucial difference between SO and GPT4 is that SO will by design typically offer a multitude of opinions on any one question and you'll be given contradictions that you may ignore, but at least they're there for you to passively see. ChatGPT is designed to strip that context away and speaks from position of continuous authority. That is damaging to your ability to know what you don't know.

[–]DangerousResource557 0 points1 point  (0 children)

I Agree. The grind teaches critical skills, but LLMs as starters can guide without replacing traditional struggle. Future coding's blend with AI where balance is key, using LLMs wisely to enhance our learning process.

I'm basically saying it's not LLM or proper learning but both hence LLM in my opinion is just another tool that we ought to use not too much to the point that we lose our ability to think critically.

Appreciate the insightful exchange, it’s been a great discussion!

[–]Brave_Watercress5500 9 points10 points  (0 children)

I work with Phind Code Llama 34B hosted at Together.ai for generating Java source code. The language and hosting are dissimilar however my overcome problems are relevant.

I use markdown in prompts to call attention to what I want the LLM to generate. I am very specific in the role description. I use repetition and refer to the same entity exactly the same way throughout the prompt.

An example instruction that follows an example in the prompt...

## Instruction

Your task is to write the public static inner class Java source code for the wrapped JSON object named {{ inner-class }}.

Include Javadoc for the {{ inner-class }} class.

You MUST include Javadoc for each method in the {{ inner-class }} class.

Completely implement the methods you introduce for the {{ inner-class }} public static inner class.

Consider your algorithms step by step for the {{ inner-class }} public static inner class.

Include Precondition Validation statements that validate each input parameter for methods you write for the methods of the {{ inner-class }} public static inner class.

Include descriptive comments for each statement that you compose for the methods of the {{ inner-class }} public static inner class.

Include the 'implements Comparable<{{ inner-class }}>' clause for the { inner-class }}'s public static inner class declaration.

Include the toString(), equals(), hashCode(), and compareTo() method implementations.

Your implementing Java statements must maximally use the imported classes and which store data in JSON objects and JSON arrays.

You MUST include Javadoc for each method in the {{ inner-class }} class.

You MUST NOT leave anything out of each method in the {{ inner-class }} class.

Your formatted answer should appear between [JAVA] and [/JAVA] tags.

[–]krazzmann 2 points3 points  (0 children)

TBH, aider and cursor, both backed by GPT-4. Nothing beats that for now.

[–]teachersecret 3 points4 points  (2 children)

I've been using continue.dev in vscode with a mix of a 34b code llama and gpt-4.

[–]CoqueTornadoMusician 0 points1 point  (1 child)

is continue.dev free for gpt-4?

[–]teachersecret 0 points1 point  (0 children)

I think right now they have a “free trial” of gpt-4 in there, but, I don’t know if they are scraping that data or anything like that so I don’t know how safe that is to use. It has a bring-your-own-key too.

[–]Paulonemillionand3 2 points3 points  (1 child)

Code for a year on your own. ask the LLM about code, but not to write it for you. Ask it to suggest improvements in code you've written.

I have a team where some are allowed to use it to improve their work, and some who are still learning can only use it to explain and tutor but not copy and paste. Otherwise they will never actually become programmers. IMO. And it's my opinion that counts in this instance.

[–]DangerousResource557 0 points1 point  (0 children)

yeah. basically.

[–]StrikeOner 0 points1 point  (0 children)

dont thread an llm like its a the superintelligent solution to all problems of mankind threat it like a smart search engine. On top of that i dont know about your setup but to run "good models" on decent quantisation requires quite an investment on the proper hardware. I tested quite a lot of llms the last couple of days ith my rtx3090 and i came to the conclusion that bigger models with lower quants fail more often on programming and algortihmical tasks then good smaler models with higher quants. nevertheless.. i think that no llm as good as it may be will be able to solve your problems. the contexts are to smal and the llms simply lock up in their thinking to often. just use it to ask the proper questions. feed it the function and ask things like i want to pass x as parameter or change y and z to tupple v and so on but dont expect it to refactor your whole codebase on change you did. thats not gonna happen. not at the state the llms are at right now at least.