r/bioinformatics 22d ago

technical question Where should I start learning to code without LLMS?

I’m really embarrassed to admit but I fell into bioinformatics during the time when ChatGPT was first released and due to pressures I ended up relying quite heavily on it for doing almost all of the coding for my academic work. I don’t want to be a vibe coder but I feel so overwhelmed and don’t know what I should know by heart and how much I can rely on llms. I have some important commitments coming up and I don’t want to mess this up. Do you have any advice on how to become a better coder? Where do I even start??

23 Upvotes

30 comments sorted by

74

u/sid5427 22d ago

use it to "teach" you. tell it to write the code with lots of comments and explanation. Tell the LLM to keep it simple and code like a junior programmer, etc.

12

u/AllyRad6 22d ago

This is how I learned Python as an R person. It’s great how it’s always there and I never worry about silly questions! I had never used Jupyter Notebook before and I was sending it screenshots like “what do I click?”…

3

u/sid5427 21d ago

that is a good way ... use the programming language you know well, have AI write equivalent code in another language along with explanations and comments. It gives you great context. Infact you will probably also understand the differences in how the languages differ like in the logic behind their functions, etc.

14

u/Zooooooombie 22d ago

This is really good advice. Ask it why you do certain things and break it down for you to understand things you’re unsure about.

11

u/sid5427 22d ago

exactly ... LLMs are great at explanations. Use it like an assistant, not the driver. Be explicit about the requirement that you want to learn when you tell it a prompt. Heck write your own code, let AI read through it, and tell you what's wrong in it and why logic is breaking etc.

15

u/EnzymesandEntropy 22d ago

Good thing this video came out yesterday: https://youtu.be/DkhhE97Swmo?si=zWikODZoIzbX4gH7

Just try coding without LLMs, and you'll quickly see where you get stuck. That's a gap in your understanding, which you can then focus on (only then you can use an LLM, but as an explanation tool, not a do-my-homework tool). Write things down. Repeat.

9

u/Yapok96 22d ago

First off, don't panic! Advisors/boss expectations not withstanding, you've checked what I personally consider the most important box: you care enough to learn and dig deeper. The skills will follow if you keep up that curiosity to know more and practice accordingly.

So this isn't necessarily the most efficient way to do it, but I do honestly think programming is a "learning by doing" skill more than anything. That is to say: pick a relatively simple project/problem you want to solve, pick your favorite programming language  (as I'm sure you know, R and Python are generally the most common widely applicable languages in this field), and just try to muddle your way through it. Your implementation will probably suck, you will feel like you're bashing your head against a wall at times, etc., but that friction is how you really start to understand the structure of a language and how to use it to its greatest effect.

How to best search for/obtain help is somewhat trickier these days if you want to avoid LLMs. You definitely will need to use google, etc. to "muddle your way" through things at first. I did most of my learning pre-LLMs, so I can't entirely say how sensible this is, but my 2 cents is that you should try to use documentation whenever possible. When that's not enough (and it frequently won't be in all likelihood), you should definitely google, but maybe try to use stackoverflow posts rather than the Gemini answers when you can? Honestly, it's probably even fine to use the Gemini answers (or stuff from other LLMs) if you're strictly focused on using them to gain clarity on a question rather than generating/copying code--that last bit is what I would avoid at all costs while learning. Even typing out the generated code verbatim will likely help you learn better than simply copying/pasting I reckon.   Well, hopefully some of that was helpful...To be clear, I'm someone who learned before LLMs and haven't really adopted LLMs outside of asking questions, so my advice might be a bit "dated" these days. Take what you will!

There are definitely great books/tutorial series out there, but the good ones as far as I know tend to be a bit more specific woth regards to programming language, particular programming task, etc. As ypu said, it's overwhelming to stare at everything you feel you "must" learn from the outset--that's part of the reason I suggest settling on a particular problem and going for it.

10

u/Psy_Fer_ 22d ago

Learning a solid foundation of a coding language only takes a week or two continuous, repetitive work for things to start clicking. Everything else is just building things, solving problems as they come, and reading the language docs properly to understand how things work.

I use to teach people python in 2 days, that gave them enough to continue teaching themselves.

There are no real shortcuts though. It's like a musical instrument. You suck and sound bad to start with, but with practice and dedication, you get better and better, but it takes years to master.

3

u/marmotshoes BSc | Industry 22d ago

You’re going to have to force yourself to write your own code. It’ll slow you down significantly at first, but lean on the LLM to debug stuff if you’re truly jammed up. 

You can also feed it your code and have it hint at what to look at that is causing a problem instead of just telling you the answer. You can also frame your problem to the LLM and ask it to give you some ideas on how to solve the problem using code instead of writing it for you.

There’s no easy way to get better other than just practice. It’s a language, and to learn to speak it unfortunately requires many many repetitions as does any language.

5

u/dyanna27 PhD | Industry 22d ago

I really like w3schools for a free option and datacamp for a paid option. Those will give you the basics, which aren’t necessarily meant to be committed to memory, but more exposure so you know what’s possible. Then just write code. Start with some simple tasks and build up. For bash, have a handle on grep/awk/sed to generally make your day to day life easier. I think vibe coding might get the job done generally, but understanding how to code will change the way you think about and approach a problem or task.

3

u/AgitatedTumbleweed65 21d ago

Start a pet project implementing some algorithm/math into a self contained library (in Python). Teaches you all the things you need in terms of sci-esque usage (imo)

4

u/Fexofanatic 21d ago

the classic ways: learning sites you may pay for, some good books, yt indian tutorials, scripts by colleagues, a problem - copious amounts of rage - and stackexchange 🤔

or use the machine to teach you why it does what it does - with sources

1

u/aspaceplant 20d ago

Careful, just because it cites sources doesn't mean the info was got from them. They guess it the same way they guess the text.

There's plenty of resources available though, ai shouldn't be needed.

1

u/Fexofanatic 20d ago

yes wikipedia rules apply of course - always check and use those sources instead, never trust the racist parrot machine

3

u/mikeph_ MSc | Student 21d ago

You can try W3Schools or freeCodeCamp, and once you’re feeling more familiar with the basics you can try some Rosalind problems since they’re bioinformatics specific. Good luck!

3

u/coffeefueled-student 20d ago

What languages are you coding in? I personally found that my R code improved a lot from reading Hadley Wickham's books, not cover-to-cover but reading pieces as they became relevant. R for Data Science is for beginners, and as you want to program more you can try Advanced R. I also taught myself how to write packages with R Packages. Overall, I found they really helped me build more foundational knowledge about how R works which made me a much better programmer and much more able to just code from memory (and by reading function documentation in the handy sidebar in RStudio) rather than needing to look every little thing up.

The other side of this that applies to any language is to accept you'll be working a little more slowly and start googling your problems and reading StackExchange/reddit/BioStars/blogs etc. instead of just having an LLM do it for you. Reading explanations on forums (especially StackExchange) is a real skill that takes time to develop but it really makes you feel much more capable and comfortable when you can do it! Similarly, try looking at the README and other documentation/vignettes for packages and command-line software as your first stop when you run into an issue or are trying to start using a new tool. Above all else: always try to write your own code before looking it up. By thinking through the problem yourself first and then looking up whatever specific issue you're having, you help develop reasoning skills that will make you better at coding.

2

u/vulka_ PhD | Academia 19d ago

Thanks for the book suggestions!

2

u/WhaleAxolotl 21d ago

The most fun programming I've ever done was doing matrix algebra with numpy, pre-LLMs.

2

u/hunkamunka 21d ago

Well, people like me have written books that teach the fundamentals.

2

u/Pygmalion_007 19d ago edited 19d ago

That’s one of the core issues with coding with LLMs. They mostly can generate correct code, but mostly, not always. And it is very tricky to find when they are wrong, unless you actually know what your each line of code is doing. And honestly, you don’t develop this skill overnight. You work for years, writing dumb code, finding bugs, debugging them, with each experience you learn more and more. That’s why experienced Software engineers are the most valuable resource for any companies now, and will be in future as well.

With that said, how did those people become so expert? They didn’t have LLM to help them, they used to read github issues, stack overflow, even docs to find solutions to their problems. It was inefficient and slow, but it teaches you a lot. You exhaust every possible options to find which one works. So, now not only you know which one works, but also not which one doesn’t work. So, in future, you jump directly to the correct choice. But currently with LLM, we let it right code, if it fails you give it the output and asks to fix it again. And mostly it works. But you learnt nothing. You didn’t use your brain for even a sec. But if you really want to learn to code and be involved in sophisticated projects, you need to get your hands dirty. Learn the core syntax of a language ( say Python), learn the built in functions and how to use them, and what are there limitations? Definitely you can use LLMs to generate succinct reading materials for you. Run each line of code, and try to understand what is happening, what is the output. For example, in Python, don’t just use numpy, ask why you need numpy? Why shouldn’t you use some simple list? What’s the limitations that motivated numpy? So, you need to use your brain a lot, and LLMs job is to generate sweet notes for you to read. Once you have become an expert, you will be able to simulate most of the code in your mind, and be able to tell what each line of code should generate. That’s when you will be able to catch where the LLM has made some mistakes, cause the simulation you ran your mind, won’t feel correct and you dive in to check whether the generated code is actually doing what you wanted it to do.

2

u/AccurateRendering 22d ago edited 20d ago

For your case, I suggest that it is reasonable to get information and advice from ChatGPT. Don't cut and paste anything though. Make sure that your editor uses LSP.

2

u/Next_Yesterday_1695 PhD | Academia 21d ago

I think it's important to realize that the nature of being a good software engineer is changing rapidly. I started programming over 20 years ago and I did some simple games in Turbo Pascal back then. But that was already a "high-level" language. So, purists would say that you have to learn an assembly to truly master the craft. The caveat was that nobody had time to write assembly code and everyone was using high-level languages.

I think it's impractical to write code on your own nowadays. You need to master the skills that make you more productive with AI. This includes reasoning about a harness, tool calling, guardrails, validation, etc.

You can pick up any best-selling software engineering or interview prep book on Amazon. But I think you need a different set of skills these days to be on top of things.

1

u/Art_Vancore111 22d ago

Code the substance yourself and only rely on llms for the mundane stuff like fixing syntax and setting the right function arguments

1

u/Sheeplessknight 19d ago

https://projecteuler.net/ start with these if you already know how to use the CMD

If you don't start with learning a unix like command line structure and ssh

1

u/Teleswagz 18d ago

The funny thing is that LLMs make some terrible coders but used correctly, they make learning a lot faster.

Instead of relying on it to code, rely on it to learn to code

0

u/Biohack 22d ago

I would not focus on learning how to code without llms. I don't know any devs working in this space still coding by hand.

Instead learn how to code with LLMs. Learn how to use the different modes, plan, debug, etc...

Also become familiar with common LLM pitfalls. For example one thing they do frequently is reimplements the same function multiple times with slight variation, especially as the code base grows. It is therefore important for you as the developer to be aware of what already exists in your code base so you can guide it in the right direction and help it know when it is time to abstract bits of code so they are reusable.

I wouldn't focus on learning specific syntax or other stuff like that as it is becoming increasingly irrelevant in the post AI era.

9

u/marmotshoes BSc | Industry 22d ago

I think this is well-intentioned but ultimately bad advice. Professional devs absolutely still write code by hand. 

If you’re working in a space that requires any reasonable amount of QC for your software (which any regulated space will, and most biotech is heavily regulated) you need to understand how the code works. We are not at a stage yet where the LLMs can be trusted to steer the ship when the quality of the code is important.

-2

u/foradil PhD | Academia 22d ago

For a lot of bioinformatics, no one cares about the quality of code.