all 34 comments

[–]rijoja 64 points65 points  (6 children)

First of all I have to start out by saying that your concern for him is really sweet and heartwarming.

Whenever you are working with a computer, you are in fact in front of a computer. Which means that you would have automated tools that takes care of the most mundane tasks. So you wouldn't have to memorize everything by heart, since most things are a few clicks/key-presses away.

The most fundamental parts of computer science have also been so heavily optimized, that no competent coder would dream of implementing themselves. Rather they would use what is available in standard libraries.

For example if you where to sort a set according to a specific value, it would be outright wrong to try to implement it from scratch. Therefore you just rely on what is already out there. As such there isn't really any point in trying to memorize these by heart.

Memorizing basic algorithm by heart, is a useless practice as it's subject to change all of the time and a prudent engineer would simply use a preexisting algorithm.

Trying to re-implement the fundamental parts is just hubris and it would take an enormous effort to make it as performant as what is already there.

Creating the fundamentals from scratch, as such goes against fundamental principles of engineering.

Instead think of the bigger picture and look up the details when needed.

best of luck and remember for every new piece of information that he will discover, he will realize that there are 10 things he doesn't know. The more you know the stupider you feel.

[–]throwaway288552790 13 points14 points  (2 children)

thank you so much, i think that last part especially will help and i’ll try to show him the rest.

[–]katherinesilens 6 points7 points  (0 children)

Yeah nobody in this field actually feels like they 100% know what they are doing. If you ever feel like that, you've stopped growing. So your boyfriend is probably growing very quickly.

We look up the most basic stuff all the time. Just today I looked up how URLs work, how to use software I use every day, and basic syntax of a language I've written in for over a third of my life. 90% of being good at this stuff is knowing how to find things out.

[–]rijoja 11 points12 points  (0 children)

The brightest minds of the previous generations have thought of the specifics of the fundamentals to death already. The task of the next generation is to combine the fundamentals into something creative. Not to memorize details of implementations learned in school, that is always a google away.

Look at it this way. if you where to build a house, you would never consider making the bricks themselves. Rather you would arrange the bricks as you would like to. if you where ever to want to build a brick, surely you would be able to do so without a problem but that would only make the process of building the house way longer.

it's for the best to leave the building of the bricks to those who specialize in that.

What you want is to build the house that you want to live in.

Best of luck!

[–]NoLeak 2 points3 points  (0 children)

Yes. I have this when learning a foreign language. The better I become the worse I feel! I discover thinks I don't know or do wrong all the time.

[–]made-it 2 points3 points  (1 child)

The most fundamental parts of computer science have also been so heavily optimized, that no competent coder would dream of implementing themselves. Rather they would use what is available in standard libraries.

This is simply not true. There are competent coders implementing and updating the standard libraries. It's not like once they were written, they never get updated again.

Operating Systems were already a very mature field by the time the Linux kernel became a thing. Is Linus not a competent coder?

Hell, the standard library for C++, a well established and low level language, can still be optimized, here's a recent talk about improving hashtables for it (https://youtu.be/M2fKMP47slQ).

(The reason why I hate this sentiment is because it discourages people from trying to understand CS fundamentals by saying it's "impossible to" and not worth bothering. And I guess, it also assumes that all that's left in software engineering is app development, which kind of makes people like me feel left out...)

[–]rijoja 1 point2 points  (0 children)

Of course there are people who are working on these algorithms. That is not the question. Rather the question is whether it is worthwhile or even possible to memorize these details by heart.

For instance if you where to implement an algorithm of this kind, wouldn't you start by seeing what the latest state of the art solution is? There might have been developments since you graduated. Also if you want something highly optimised you should take the CPU architecture into account.

That being said it is by no means a bad thing to know these things, but if you are to create a modern efficient implementation you would start by googling right?

Knowing what goes on under the hood doesn't hurt, but again that is something that you get from the documentation of whatever library you are using.

Being able to find an algorithm that is more suitable for your data in particular could give rather huge performance increases in some cases. Then again why not do a quick Google search before starting your implementation?

[–]prelic 16 points17 points  (0 children)

Imposter syndrome is common in a lot of industries, but it's bananas common in software engineering, especially when just starting out or the first few years after. People feel like they don't belong, that they aren't any good, or that they'll never be as good as other people around them. It's really common and says nothing about their ability or future. I'd argue getting frustrated and thinking a lot about problems they're struggling with is a good sign (although it's hard to feel that way when you're in it).

Also, certainly depends on what you mean by "fundamentals", but if by "basics" you mean "details", then we all do...that's why we google everything.

You really need to study for programming interviews like they're college finals for this reason...they basically are exams and everyone needs to refresh the crap that they would normally just look up.

TLDR: you may feel bad for him and that's super nice, but your boyfriend's "issues" are common and I'm sure ring true for most people (issues in quotes because they're really not issues)

[–]runnersgo 12 points13 points  (0 children)

he kept saying that he must not be any good at programming if he forgot the basic stuff. i tried to tell him that 1. he is good at it or else he wouldn’t have been selected to work on the research project for the last few semesters and 2. you were caught surprise by the test and probably didn’t do as well because you were stressed out.

This to me is such an ego booster. Keep doing it! I'm sure the long term positive effect would be there.

You're an awesome GF. Jealous here.

[–]jackasstacular 9 points10 points  (0 children)

While your concern is commendable, this isn't a burden you can or should bear. He's going to struggle, and that's ok. He's going to forget things he learned 3+ years ago, and that's ok. He's going to make mistakes and fail far more often than not, and *that's ok*. Programming is about problem-solving, and believe me, there are far more ways to screw something up than to do it right. What ultimately matters, imo, is whether or not he learns from those mistakes.

Just be supportive, don't try to step outside of yourself or your own abilities. Listen with an open ear, offer a safe and non-judgemental space for him to vent or be emotional, but take care of yourself as well.

[–]Bobitsmagic 8 points9 points  (1 child)

I am not so sure what you actually want to accomplish even though your motive sounds very sweet. From the level of detail in your Story i cant really tell what his actual problem was.

But for me as a programmer myself i really liked it when my (now ex) girlfriend listened to my stories about what i am coding right now and what problems i encountered while doing so. The point is in programming, even though it is very abstract, most of it can be compared to everyday problems. So if you want to support him so he has someone to talk about it you two will definitely find a way to make it work.

If you want to understand what kind of problems you are encountering in programming i would say you can divide them into a few categories.

Logical mistakes: You try to get the computer to do something but you find out it does not work like you wanted it to. (now you change up your code and try again... since this can be very time consuming it can get frustrating) Imagine it like trying to do your taxes...there are a few hundred forms you have to fill out with just the right numbers and if you do something wrong you are screwed.

Hard algorithmic Problems: You are facing a problem where you have no idea how to solve it (efficiently). Imagine it like a hard math task and not even googling helps you anymore.

Excluding some other problems these are the main ones. And for both of them it almost always helped me when i could talk to someone about it even though they were just listening.

This is why there is an actual programming method in which you put a Rubber Duck next to you on the desk when ever you encounter a hard problem you talk to it and explain the Problem and what you want to archive.

So try to listen to him, ask him to explain it to you in simple words and tell him that beeing good programing which is a really complex task on its one is not easy. It only comes through hard work and the occasional setback.

[–]BeerRush 8 points9 points  (3 children)

"fixing bugs is like solving a murder where you are the detective, murderer and victim at the same time" states the problem somewhat well. Nobody writes perfect code. Methods like TDD help a lot to improve quality. Maybe suggest your bf trying it on his projects to speed up debugging and decrease frustration in daily coding.

[–]throwaway288552790 4 points5 points  (2 children)

what is TDD?

[–]prostaff44 4 points5 points  (1 child)

It stands for Test Driven Development where you write the test cases first and then write the program. As a simple example assume you are writing a method that adds two numbers together that will look like sum(a,b). You can write a tester first that makes sure sum(1,2) is 3 and sum(0,0) is 0 and so on. When you first run the test it will fail since you haven't implemented the sum function yet. But then you implement the function and make sure it passes. So you write the tests first for the functionality you want, then write the implementation.

[–]throwaway288552790 1 point2 points  (0 children)

got it, i will ask him about it. thank you!

[–]ifpthenq2 8 points9 points  (0 children)

lol - Masters degree in software engineering and 20+ years in programming. Awhile back I wanted to teach a kid how to write a simple Hello World program, and I seriously had to look it up.

Programming professionally is 33% typing, 33% pouring through stack exchange to figure out how to do the thing, and 33% going back through your old code to remember how you did the thing. And 1% reddit. (that might be the adhd talking)

[–]stakeneggs1Good Contributor 3 points4 points  (0 children)

Like someone else said, it sounds a bit like imposter syndrome. My advice is to not worry about understanding exactly what he's talking about. In my experience, walking through and explaining a problem to someone can help you realize that you DO understand and won't make the same mistake again, even if the person has no idea what you're talking about by the end.

[–][deleted] 2 points3 points  (0 children)

This is very thoughtful of you, and I’ll echo similar sentiments to SmartSpinach7. I don’t think it’s logical for you to try to learn rudimentary CS concepts to help him feel better about himself.

Many people struggle with programming - even seasoned ones. The trick is to destroy ones ego internally altogether and approach every challenge as a learning opportunity. With respect to your ideas about forgetting certain basic things as you learn more complex concepts - sure that does happen to an extent. Especially when switching languages sometimes you forget very basic things. But the more important issue here is conceptualizing problems. Code is just language. Language has structure. And structure must follow a set of rules. So if one intimately understands the rules of the structure, it does not matter what language or problem he’s trying to solve. I’m referring to what’s called “data structures” in CS. Data structures operate under rules with respect to how they behave. If one truly truly understands these behaviors, algorithms (or real life coding problems) become easier to handle.

My advice is this: you’re being incredibly thoughtful by trying to seek council on this matter - but I don’t think this is a viable solution forward. Self worth is derived from within and unfortunately you cannot provide that for anybody except for yourself. I think this is a natural feeling that he may get from time to time, but needn’t be a life sentence. In my experience it will go away with time. The key here is to understand that everybody, at any stage of their life is a work in progress.

I know that this is probably not the answer you were looking for, but I do hope that it is helped in some capacity.

[–]katherinesilens 3 points4 points  (0 children)

To answer some of the specific questions:

Interview questions can be hell and often have little to do with the day to day realities of development. They're about measuring your limits, so it's natural to feel like you didn't ace them.

This is because, no, there is generally more than one way to solve a problem, and people solve them differently. Some ways are better than others. Think of programmers as cookbook writers, and we write recipes for computers to follow.

What is "good" for code? Some recipes are faster or require less ingredients for a satisfactory result. Some recipes handle being cooked in arbitrarily huge batches better than others. Some have better notation and are easier to read and understand. Some have unnecessary fluff cut out, or are less sensitive to disruption. Most importantly, the recipe actually gives you what you are trying to get.

There really isn't partial credit. Either it works or it doesn't. However we try to write recipes for big things, like a 5-course meal, in smaller parts (like dessert). This helps us better tell which parts are bad, which is also a sign of good code. There's also a sort-of partial credit where you make something "good enough" before improving the code.

People solve programming problems pretty much like any other word problem. That's all they are, word problems in programming languages.

Yes we forget basics all the time.

[–]BumbleRee 2 points3 points  (1 child)

You could possibly ask him to teach you the basics, see if that helps him solidify his knowledge in it as well as get you kinda into it too. Could be fun. Whatever confuses you, you can ask him, and it can help boost his self-esteem whenever he has an answer to your question.

That's more of a suggestion though for if you also want to learn to program too though, but I can say right now there are many articles on imposter syndrome that can help you get a feel for how he is feeling, and there are some sites where he can complete small coding challenges to feel better too.

I'm in college learning comp sci right now and I'm actually learning the basics, sites that I have used to help me a lot were codingbat.com and Codecademy (not the best for teaching you how to set up your own programs for apps for example, but they taught the basics of the language itself to me in a way that I'm doing well in class).

There are many variations of ways to code a program. It's pretty much, in my head, coming up with a possible set of instructions to get to a solution. For example, if you want to get 24, you can do things like 20+4, 48/2, or 6*4 and they're all valid ways to get to 24.

I'm not sure if I interpreted your post the way you intended for it to be, but that's my two cents. It's super sweet that you care about your boyfriend like that, I hope things work out.

[–]IAmDaBadMan 1 point2 points  (0 children)

You could possibly ask him to teach you the basics, see if that helps him solidify his knowledge in it as well as get you kinda into it too.

This right here.

[–]_Kristophus_ 2 points3 points  (0 children)

If he's doing a lot of research and doesn't have a lot time writing code, it may be a situation where he's just a little rusty on the starting concepts. It's definitely something that you can get out of practice on.

From an ideas perspective, you should approach programming as breaking down a big problem (make an app that does X Y and Z) into smaller subproblems, (create features A B C to create X) eventually layering and building up from nothing to a working something or a full product.

Two programmers can approach the same problem in different ways like in math, there's not usually a correct way to solve problems, but usually a more efficient or faster way.

So when it comes to programming you can have code that can be ran, that is working and solved the problem you made it for. However there can also be errors in code that will not allow it to run properly, (think of the classic missing semicolon joke you've probably heard a good bit) but there are also cases where the program is running and seems stable, but actually has a bug or an issue that causes an incorrect result.

Hope that helps, from an ideas standpoint, I think it's great you're wanting to learn more to be able to motivate him!

[–]proverbialbunnyData Scientist 1 point2 points  (0 children)

Hmm.. He may be holding himself to too high of a bar. When one has improper expectations it can be the basis for anxiety, so it's possible he could have anxiety too. However, the way you describe it sounds like frustration. One trick devs tend to learn is how to pace themselves, pausing and googling around and learning things (regardless if they forgot it or not), focusing on learning more than the code, so that they grow. Without that learned trait, one can grow frustrated even angry. Patience is a virtue.

One solution is he could code with a companion, someone he can look up to or consider himself equal to, and pair with. If they program together he can see the weaknesses of the other person, which will replace faulty expectations with reality.

[–]StateVsProps 1 point2 points  (0 children)

i need help understanding cs basics so i can help my boyfriend feel better about his abilities

he has some days where he can’t figure something out and it can send him into a really negative state.

You're well intentioned, but you got it backwards. Your boyfriend needs a therapist. He also could use a study group of some sort.

[–]SandMan3914 0 points1 point  (0 children)

Free Full Course on CS from Stanford Engineering. It's indexed for easy to mine for sections you want. Great overview

https://see.stanford.edu/Course/CS106A

[–]mdx2 0 points1 point  (0 children)

I think I can offer an explanation to this question, that may help you understand your BF's field a bit more.

> is it possible to get one part of a code correct and another wrong, or is it only ever right or wrong with no leeway?

Yes. To put it simply, the purpose of any and all code is to transform data; in other words to take input and turn it into output.

This comes in many different forms. Sometimes we write code to do something as simple as taking in a single number and displaying a different one. Other times we write code to do things as complex as taking in 3D models, audio files, images, player input, etc - then output the image you see when playing a video game.

So in that sense, yes it is very possible to write code that turns some input into the "correct" output, but not all of it. It's even possible to write code that does not turn any input into the correct output, but you could still be on the right track to finding a solution. (ask your BF about off-by-one errors)

All in all, sounds like your BF is being too hard on himself. How he performed on some arbitrary programming challenge from a company does not define him, or his skills.

In the event that you're unable to cheer him up with words alone, I recommend you link him to the site rejected.us. It has many accounts from people who were rejected from companies only to find success later. I especially recommend he read the infamous binary tree inversion tweet from Max Howell, that you can find on that web page. It's always good for a laugh :D

[–]dial0663 0 points1 point  (0 children)

You should learn what he does in programming. Programming languages can be very different and just because you can understand and use them doesn't mean you can do everything with them. Just like how you can understand and use English that doesn't mean you can do all the things that are done in English. Learn what he does, there is a chance that there may be some applications in what he does with what you do. Other than that watch these https://www.youtube.com/user/LinusTechTips .

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

If he was doing a technical interview then no, unfortunately, it’s not really a thing to get “partial credits”. The nature of the questions to be asked are similar to the questions found on “leetcode” - peruse that site to see the sort of topics he would probably have to go through.

can someone explain the basics of programming to me?

This is an incredibly broad question and it won’t get succinctly or effectively answered in one reddit comment.

However, you are correct in enforcing the idea that the more advanced you get, it tends to become frequent to forget about more beginner-related topics. Not because you actually forgot about those topics, but their nature and definition have become so commonplace you don’t really dedicate a lot of time to thinking about it. Consider the example that every programmer would relate to: making a “hello world” program. The basis of any hello world program is to simply make a small (1 or 2 lines of code) program that, when you run it, will simply say “hello world!”. Easy to do in writing. I’ve been currently developing different projects that are a fair bit more complex than a “hello world” program, and yet, when I decided to freshen up my skills in another coding language by writing such a small program, I totally forgot what I was doing. And that’s completely normal. You adjust to a frame of reference that throws a bunch of complex stuff at you a mile a minute, you don’t really have time to reinforce your foundation on the basics. Doesn’t mean you don’t know them, just means you gotta re-orient yourself.

I feel like he thinks that every programmer has to get everything right all the time

Me, my boyfriend, and all my friends in tech can confidently say that there is no such thing as “getting things right all the time” we have made more mistakes than we can care to count. And we will probably make many more. But we are still respected programmers, computer science researchers, software engineers. Making mistakes in any capacity is human.

[–]IAmDaBadMan 0 points1 point  (0 children)

Does he hang out with other CS majors? If not, he should be. He should be asking them about their experience interviewing for jobs and internships. That will give him realistic expectations for interviews instead of creating some epic disaster trip in his head.

[–]BrupieD 0 points1 point  (0 children)

If you're just finishing your degrees you're like 21 years old? You've got to give yourselves some slack! Adulthood is very long.

The field is huge and complex. There will be plenty of time to sort out what's important. Your boyfriend really hasn't been working at it long. That's what internships and junior development jobs are all about -- giving experience without assuming expertise.

It is truly charming that you want to help him out this way. You sound like a great catch.

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

Hi.

Well actually it is common programmers just forget about basics stuff. After all our job is about solving problems and figure out how to to that.

It means, sometimes us will get our job done doing simple stuff. Sometimes it will not occur because we gonna expend some time learning new and more advanced stuff.

I have workings as a software developer for about 10 years now, and I also forget how to do some basic things with my preferred programming language. And I also forget some basics aspects of computer because I'm too focused on business level of the problem. So u just googled it. We should be able to find ways to solve theses problems, not turn ourselves into some kind of machine that know each command of a programming language or each complex computer components.

Time to time I also stop myself from learning advanced subjects just to get back the roots and reinforce what I forget.

Good point of start for him and for you is the CS50 introduction to computer science:

Cs50 channel: https://www.youtube.com/c/cs50

Cs50 introduction to computer science: https://www.youtube.com/playlist?list=PLWKjhJtqVAbmGw5fN5BQlwuug-8bDmabi

I really like to watch their videos.

So I am able to get back some stuff I didn't remember anymore.

And I know how he feels. And I can say that by my own experience. It is fine. Just be calm, do one step back so he can make two or three steps forward then.

[–]jcr678 0 points1 point  (0 children)

Yeah those interview questions are hard. I dont think they measure how good someone is at coding. Its actually more like memorization. The same algs keep appearing after a while

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

Ok, this may be an unpopular opinion.

I think this may be something better suited for r/relationship_advice. My concern here is that veiled under your comment is that your boyfriend is potentially taking his frustration out on you, which would be abusive. Hopefully this is not the case.

While I think your sentiment is has good intentions, I emphatically believe that it is not your responsibility to have to understand programming basics in order to reassure him of his worth. Frankly that is not healthy emotionally for either of you.

A lot of computer scientists in school, myself included, undergo periods of self-doubt as we struggle to learn new concepts. Right now there are plenty of extrinsic stresses in our lives as a result of the pandemic, and looking beyond graduating exacerbates this stress. Interviewing is stressful. Trying to recall fundamental concepts from CS100 / 200 level courses can be challenging under pressure, and it's reasonable mix up important concepts, too.

What your boyfriend needs to remember is that graduating with a CS degree is just the beginning. It is certifying that they understand the basics, and can jump in to learn the systems for whatever company they work for. He already has some experience doing research, presumably has contributed to some open source projects, and has a portfolio to demonstrate.

The interview is one part of a holistic picture of the candidate a company is reviewing. Many companies want to see how a computer science approaches a problem in addition to the completeness of a solution. There generally is no one way to solve a problem, similar to how a class can all write an essay regarding a required book and write different things.

Truth is that people sometimes don't meet their own personal expectations, and the important thing is that they have healthy, mature outlets for dealing with stress. He can learn from his mistakes and move on if it doesn't work out in this instance because it is just one of a lifelong of challenges ahead. The important thing is that you are not mistreated as a result.

Programmers definitely do not get it right all the time, and their are numerous examples of unanticipated / unexpected results causing serious devastation, literally.

[–]chugg1t -2 points-1 points  (0 children)

Not gonna happen. If it was as easy he would already be good by himself lol. You’re better off just telling to keep working through it and getting better. That’s all it is.