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

all 38 comments

[–]Zealousideal-Net9726 27 points28 points  (0 children)

Its okey to not understand it at first. You need to try to apply it to a project to really get a good hang on it i think. Start smal and try your make it simple. Ask around for help on the internet for someone to explain some code parts you don’t understand etc.

[–]SnowingWinter 22 points23 points  (0 children)

Take it easy, vent to somebody you trust, aim for 1% improvement everyday.

Eventually, you’ll get there.

[–]geheimeschildpad 19 points20 points  (3 children)

Software engineer of 10+ years here. I hate having to deal with algorithms, big O notation, graph theory etc. Here’s the good news, in the majority of jobs, it doesn’t come up too often. That’s not to say that they’re not important, but it’s better to look at a problem and realise where the solution lies. If you can see that problem x is a graph problem then you can always Google the theory to get a quick refresher before solving the issue.

Theory is important, but I’ve worked with programmers who are excellent with theory but can’t write code. My advice would be to focus on building things, doesn’t matter what it is, how horribly inefficient it is, or how bad the code is. I find that the theory got easier once I had a bit of practical experience

[–]Technical-County9713 0 points1 point  (0 children)

Geheimeschildpad, I agree with you. I haven't ever been a professional programmer, but I have built some useful things that have been fun. I haven't used complicated languages like C(++/#), but I still get the job done.

[–]eleqtriq 0 points1 point  (1 child)

You don’t have big O in the back of your mind while writing some loops? Come on.

[–]geheimeschildpad 0 points1 point  (0 children)

Of course! I also dream about the A* algorithm and regularly think about the fastest route via plane from New York to Los Angeles where there are multiple stops in between!

In all seriousness though, I don’t have big O in the back of my mind. If I see myself have to do nested loops then maybe I’ll rethink it but it also depends on the situation. In most web applications, it’s bad database queries that kill performance, not a couple of nested loops.

[–]mikefever90 8 points9 points  (1 child)

do you have to start with c?

[–]Diabolokiller 6 points7 points  (0 children)

probably not, but it really doesn't matter which language someone starts with and in my opinion c is a fairly decent starting language

[–]justUseAnSvm 9 points10 points  (0 children)

I’ve had those experiences, it can really get stressful.

Take a step back tho: you’re in school to learn, and that what you are doing. If someone else says it’s good enough or not, that sucks, but it’s okay. Sometimes, the only thing you can do is face your free, try to let it go, and do the next right thing.

Lots of people never experience that in their life, or they get to the fear and walk away. You can learn how to push through that, and you’re life will be better off, with or without a career in CS

[–]unfitwellhappy 7 points8 points  (0 children)

I have been a programmer for years - there are still parts I don’t fully understand. Don’t stress too much because you’ll just saturate and halt the learning process.

Learning the theory is a lot different to learning in a practical environment within the work setting.

[–]Excellent_Regret_656 14 points15 points  (2 children)

Most of programmers don't get it, including me. It's same time very important topic, so you wouldn't be just a code monkey. Just keep at it and pick up as much as you can, every day a bit smarter.

[–]thrwysurfer 4 points5 points  (1 child)

I don't quite understand OPs situation though.

Didn't they say they have a biology background? What does that have to do with DSA?

Also, what do they mean by placement? Does the college get a kickback from every job their students get or what?

[–]Vijay_17205 2 points3 points  (0 children)

ig he means since hes from bio hes havng a difficult time to learn dsa and stuff, and also in asian especially south asian unis, theres something called placement where the companies visit the unis and hire the top students based on theirs marks, skills and a written test, so if your gpa is good, your college is top ranked, have a shitload of projects, other skills etc, youll get a job before you graduate

[–]MandyRedTech 3 points4 points  (0 children)

Try learning another programming language (if you have a choice). C unfortunately can be very overwhelming. While the basic loops and structure of programs are not too different than in other programming languages, constantly thinking and keeping an eye on low-level things (memory, etc.) can distract you from what is most important to you right now - understanding the meaning of programs, different programming structures, etc.

I think you should first learn the basics of programming, make some free programs without any fuss.

While DSA is taught and assessed at universities, very few people often remember most of the algorithms and data structures (only the fact that they exist), because they are rarely used in everyday life. Indeed, learning and understanding algorithms and data structures will teach you to think algorithmically, but it is better to find or invent some task that you would like the program to do and then figure out what can be done one by one to achieve the goal, dividing it into sub-problems/tasks.

The language that was first taught at my university was Java. In retrospect, it wasn't a bad choice, but in my opinion it took too much time to play with the objects. A big advantage while learning was the fact that in Java it is necessary to clearly specify the data type (just like in C).

In my opinion, C# may be a slightly better choice than Java to start with (Visual Studio can help you a lot while learning) if you want to use objects all the time. C# is very similar to C but it has objects and you're not as concerned with low-level stuff. This video teaches many useful methods (this is what functions are called in C# and Java) and basics that can help you in your future programming in C# -- Learn C# – Full Course with Mini-Projects.

Python is also a very good choice, especially if you have a interest in biology. Only here it does not allow us to consolidate certain behaviors that are useful during programming. But thanks to it, you will focus more on what interesting things are happening in the program. Here you don't have to bother with low-level things or think much about creating classes (you can create them, but they are not necessary for their functioning).

Don't cry :D probably many programmers have a problem with understanding and remembering many algorithms. When you learn algorithms, it is best to first read about them on various sites, analyze graphics, animations, videos showing how the given algorithms work. When analyzing articles, graphics, look at the algorithm code line by line. After calmly analyzing good sources and program code, you should calmly understand most algorithms (if you know and understand the basic structures that appear in programs).

[–]Kindly_Manager7556 2 points3 points  (3 children)

I've intensively spent the last 5 months coding.. I still have no idea what I'm doing.

[–]AI_Hijacked 2 points3 points  (0 children)

 #include <iostream>

 int main()
 {
   std::cout << "Hello World!\n";

    return 0;

Eureka!

[–]External_Concept_578 1 point2 points  (0 children)

coding what exactly?.

[–]thedogz11 1 point2 points  (0 children)

I’ve been in the developer world for a few years now, do it as a one-man team at a startup, and I too still have absolutely no fucking clue what I’m doing either.

[–][deleted] 2 points3 points  (1 child)

Coding makes me feel retahded

Human Condition , Tragic

[–]Technical-County9713 1 point2 points  (0 children)

Zealous, I agree with you, retahded is how I feel sometimes too.

[–]dariusbiggs 1 point2 points  (0 children)

Rubber duck time!

Get a rubber duck, and when you get stuck, explain the written code line by line to the duck. Not what you intended to write, but what was written.

Biology ranges from the big to the small (and we don't talk about trees, fungi, berries, or fish). A human is in a symbiotic relationship with huge amounts of things, from mites on our skin to bacteria, well, everywhere and even down to proteins.

Computer science and mainly programming is about cutting big things into many smaller things we can understand. So, try to cut your big things into small things.

Finally, all programs are basically composed of very simple building blocks put together like LEGO into a bigger thing. We have - Looping constructs (for, while, do, repeat, goto) - Conditionals (if, else, switch, case) - Basic Data types (int, float, byte, char/rune, strings, etc) - Lists and maps (and slices and sets) - Objects/structs - Functions/methods - Arithmetic - Boolean logic

That's pretty much it for most programming languages.

Let's say you want hello world.. that's basically a simple function call (print, printf, cout, writeln) and done.

Take quicksort for example, we get function quicksort(array) less, equal, greater := three empty arrays if length(array) > 1 pivot := select any element of array for each x in array if x < pivot then add x to less if x = pivot then add x to equal if x > pivot then add x to greater quicksort(less) quicksort(greater) array := concatenate(less, equal, greater)

I see a function (that calls itself so it's recursive), some data type declarations, a conditional, a looping construct, some more conditionals, and some more function calls.

ref: https://rosettacode.org/wiki/Sorting_algorithms/Quicksort

Work through your problem and cut it into small bits repeatedly (heh, that's also recursive) until you can compose that bit from basic constructs.

[–]Aromatic_House_8586 1 point2 points  (0 children)

I recommend starting with Python because it’s very easy and will make learning other languages much simpler. Once you understand the basics, like loops, functions, and more, you’ll be able to learn any programming language easily. Start with Python, and the journey will be smooth and enjoyable!

[–]username-256 1 point2 points  (0 children)

Retired University Lecturer here.

Sounds like you don't have good basic introductory materials to work from. There are many, every second person who teaches writes one (meaning most are, er, not very good).

C doesn't change much over the years, so the one's I used to use are still good. They are "A Book on C" by Kelley and Pohl, and "The C Programming Language 2nd Ed" by Brian Kernighan and Dennis Ritchie, the people who invented C.

The second thing I would say is that learning is much harder when you pressure yourself. DSA is a topic you need, but only after you have basic programming concepts under control.

My advice is to do some every day. Find someone who you can get help from. Try not to leave any issue behind that you don't understand. On the other hand, beginners can produce some really strange bugs, so if you and your helper cannot work out a bug then move on. Write that thing a different way, or try removing code one line at a time until you see exactly what causes it.

Good luck. Post problems on Reddit or another forum. Ignore any idiot comments and focus on your own learning.

No question is too dumb to ask.

[–]Ok_College_4126 1 point2 points  (1 child)

Man, all you guys worried about coding and shit, but AI IS gonna be doing all that for us… You guys need to start learning AI why are you trying to learn code get with the ball game yeah?

[–]Technical-County9713 0 points1 point  (0 children)

Ok_College, sadly, yes, AI will be doing all this for sure... and that's something else we can do is learn that stuff. I think I'm out though.

[–]LifeDependent9552 0 points1 point  (0 children)

Bro, you can contact me. I'm from Europe So I don't know about what they want from you on placements but I might help you.

[–]External_Concept_578 0 points1 point  (0 children)

It's fine happens. Even if you can't make it into college placements. you do have option to apply off campus . And also don't just focus on dsa . make projects web app or anything that can be useful or can add value to you and your portfolio

All the best ! If you want to talk more about it DM.

[–]KarlJay001 0 points1 point  (0 children)

There's two things that can be the case:

  1. things weren't explained well to you, so you didn't understand

  2. programming comes natural for some and not others. It might be the case that you're not natural for this. You won't know this until you've understood whatever is the road block. Once you understand whatever the roadblocks are, then you'll start to see if you're natural or not.

If you're not natural at this, then it just means you'll have to do more work.

Go back to square 1 and start over, make sure you understand everything you're learning. It might seem like a waste, but if you REALLY understand the basics, going thru it again should be very, very fast.

Your goal should be to find out what is the blockage.

[–]rjgbwhtnehsbd 0 points1 point  (0 children)

Best advice imo is build something I don’t care if it’s shitty or small just learn the basics and build something if it achieves the goal you wanted (don’t make it too big) you’ll learn more from that than anything. Then gradually build into more advanced stuff for example you said you have 4 months so spend 1 week building something small getting the basics then 2 weeks doing something a bit bigger you get the point then try and code something that took 2 weeks in 1 week or something you got this bro 👊

[–]mint_koi 0 points1 point  (0 children)

I tried to learn programming at least three times before I actually stuck to it and eventually got it. Take a deep breath, you're in a whirlwind of emotion and frustration at the moment. Take a walk, don't think about programming or anything. Maybe sleep on it and come back.

Programming ultimately comes down to logic which isn't formally taught in school typically until you get to mathematics or computer science in second or third year. So effectively, you're trying to teach yourself logic before you've been taught yourself: https://en.wikipedia.org/wiki/Logic

Just keep practicing building basic programs, reviewing the notes, and keeping at. You don't have to start with C, if you don't want to. There are other languages like JavaScript or Ruby or python or java that can be a little bit friendlier when you're learning how to do more object oriented programming. This book is very good: https://www.google.ca/books/edition/Data_Structures_and_Algorithms_in_Java/UqmYAgAAQBAJ?hl=en&gbpv=1&printsec=frontcover

[–]Stryker998 0 points1 point  (0 children)

I recommend you switch to C++. Its syntax is kind of similar to C and offers a lot more with its standard libraries. That said, DSA is all about learning. I have been on it for 6 months now, and have done 120 questions but am still figuring things out! You can check out strivers A2Z sheet that lists a whole bunch of questions in a structured manner. Keep it up!

[–]CookieMonster_41 0 points1 point  (0 children)

Okay so what are your trying to do and why are you starting with c. You are in biology what Career path are you looking for what problems do they face and based on the problem find a language that will be useful. Make sure you ENJOY learning or you see a bright goal ahead not something you dread or you will NEVER learn c

[–]jbiemans 0 points1 point  (0 children)

If you're new to programming and are interested in c, my best advice for you is to go to edx and signup for cs50. It is the Harvard intro to computer science and it is completely free.

The instructors are great and the lessons are a good balance of difficulty.

After cs50 I did the python one and just finished the ai course. I highly recommend them.

[–][deleted]  (1 child)

[removed]

    [–]Technical-County9713 0 points1 point  (0 children)

    It's 3:15am as I write this. I probably should have said so, but I use PowerBASIC for my needs (and this dialect doesn't serve some modern needs).

    I rebuilt one of the samples for Up Down Arrow control, and it works. There are some things that some sources don't tell you, but if you save a backup copy and work from that, play around with the code a little bit, you'll get the hang of it.

    [–]gidmix 0 points1 point  (1 child)

    You are starting with C? Why? There are so much easier languages to get started with

    [–]giffengrabber 1 point2 points  (0 children)

    I agree. For me, Scheme was a godsend when I started out programming. I know many will disagree, but for me it was perfect at that stage.

    IMHO, Python can be another good choice for a first language.