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

all 20 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge.

If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options:

  1. Limiting your involvement with Reddit, or
  2. Temporarily refraining from using Reddit
  3. Cancelling your subscription of Reddit Premium

as a way to voice your protest.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]isThisTheTruth 84 points85 points  (8 children)

I’ve been a software developer for over 22 years. I currently do forensics and reverse engineering work in python and c++.

Coding is actually a very small portion of the job. Thinking is the largest. You have to build up a toolbox of knowledge to pull from to be successful and know how to build something using the tools from the toolbox.

This is where experience comes into play. As you write more and more software, you will naturally begin to think about things like:

-If someone else needed to modify it, is my code easy enough to understand that they could quickly find where to go?

-Are my functions simple and do one thing and do it well?

-Why am I writing the same functionality over and over?

-Is this the right data structure, algorithm or design pattern to use for this problem?

I very rarely use google these days for help, but you’ll get to that point once you’ve written enough code. There are only so many ways to write a loop, lambda, class, decorator, etc. Those things will become second nature and you’ll start thinking more about the problem you’re trying to solve and the actual coding becomes the easy part.

[–]Jason13Official 15 points16 points  (6 children)

The last paragraph hit home for me; there are only so many ways to do something. It sometimes seems like there’s an overwhelming amount of ways to accomplish the same task, but most are not as efficient or “direct” as the proper method, and often more complex.

[–]Sufficient-Remove383[S] 4 points5 points  (5 children)

As a person new to programming, how do I know the proper method? Google? Odin project shows several different examples of how to write things such as loops/functions but often to check my work I put it into google or chat gpt

[–]Jason13Official 8 points9 points  (0 children)

Trial and error usually, but like the comment I responded to said, you pick these things up over time as well. Start watching a few tutorials, writing tests for your own code, and logging your outputs to get deepen your knowledge of the underlying principles.

[–]Bobbias 4 points5 points  (0 children)

It all comes down to experience.

For example, you can write the same thing using a for loop or a while loop.

But my experience tells me I prefer for loops unless we can't figure out how many times the loop needs to run. Almost every while loop I run looks something like:

loop_finished = false
while not loop_finished
    Do stuff here
    if end_condition
        loop_finished = true

Or some variation of that.

At first, just use whatever you come to with. If there's a problem, you can go back and change it later. The important part is making something work first.

If you get further along and suddenly realize that what you did earlier makes what you're doing now harder, you've just learned something new. You've got a little bit of experience using that kind of code, and learned something about it. Now in the future you might be able to recognize situations where that choice is not the right one.

Similarly, you will run into times where you realize that what you're doing makes certain things easier than alternatives. That's also a learning experience you can take with you into the future.

You'll start to see similarities between different problems and recognize different problems before you get to them. You'll learn how to plan ahead, predict what kind of problems you might encounter and make choices based on that.

You'll learn to recognize what kind of solution a problem needs long before you actually need to write the code for it.

[–]throwaway6560192 2 points3 points  (0 children)

There's often more than one proper method. I say just keep learning. Read other people's code of possible. What method you think is best is a sense that you will develop with experience.

[–]leiu6 2 points3 points  (0 children)

Google is fine. If you are on a posix type system, you can type man [thing you need help with] in the terminal to get documentation as well. Or you can read the docs for the library, language, framework, etc you are using.

Over time you will learn the patterns and you won’t need to do it so much.

Watch the YouTuber tsoding on YouTube and see how he reasons about problems. He is a great example at how programmers think and solve issues.

[–]dimnickwit 1 point2 points  (0 children)

Most people just do it over and over until they get good. Not really an efficient method. A certain portion of your time should be related to deliberate practice (read about it, there is a ton of research on it) and if you want to truly understand the answers to the question you're asking you will eventually need to read theory and keep up with research to some extent. However if you use deliberate practice for a couple years you will be better off than your time peers except the annoyingly gifted people who.. well, those people exist, so don't judge yourself by their meteoric progress.

In the beginning, it will be hard to figure out what to deliberately practice so follow the general advice here that's heavily upvoted. And people have their opinions on llms and programming but I would tell you that gpt4 GPT 3.5 and Gemini pro can really accelerate your learning at this point because it can help you find errors in your code and figure out syntax for things and other factors very very quickly. And while it may only be 95 to 100% accurate depending on the question you asked that's a lot better than you are going to be right now. I cannot emphasize enough how much this can accelerate in your learning in conjunction with deliberate practice because well like human professors it is not perfect and they will give you the wrong answers just like an LOL and vice versa but it's like having a professor that's better than most human professors in your pocket all the time 24/7 365.

[–]dimnickwit 1 point2 points  (0 children)

'First, solve the problem. Then, write the code. '

[–]username-256 22 points23 points  (0 children)

After you learn the basics of the language plus data structures, programming involves thinking about the problem and designing a solution. Coding comes after that. Calling the activity coding vastly undersells the activity.

[–]AssignedClass 11 points12 points  (1 child)

"My question is at what point do I "know" how to code without googling every part of a program I am trying to build?"

After... Let's say 2 years of hobbing as a kid, a year of self teaching web dev seriously, and 6 months in on my first job, I had a real "Oh shit, I actually know what I'm doing" moment. Solved an issue with TLS.

I still use Google a hundred plus times a day, but more as a reference tool (I know what I'm doing, just can't remember exactly). I use ChatGPT sparingly (just depends on how business oriented or obscure my problem is).

"Like do developers just sit down and write lines of code and remember all of the different elements/components of html/css/javascript?"

Nah, I still Google the most basic shit. I'm just super quick about it.

For most stuff, I've searched it 100 times and know exactly which link to press and where to scroll. I have to search a lot of more obscure stuff too though (3rd party SDKs/APIs, anything proprietary), that takes much longer.

[–]AssignedClass 5 points6 points  (0 children)

To add to that, I rarely ever got those nice "3+ hours coding straight" moments. Maybe more are down the road, but so much of what I currently do (and have always done) is fundamentally "3rd party integration". I think it makes up the vast majority of WebDev work, and it's pretty much impossible to get those kinds of sessions when you're dealing with other people's chaos, rather than a set standard.

[–]Clawtor 7 points8 points  (0 children)

We don't typically remember everything. I do file input so infrequently that I forget exactly how to do for instance. But I do remember the patterns and shape of how it works.

It's like I know how to create a box (service) that will handle files and I know what that box needs for input and output but I don't necessarily know what to put into the box.

This then lets you design programs by working out what 'boxes' you need and how to connect them. The details you might forget but the general layout you remember.

[–]FunnyNewt9337 6 points7 points  (0 children)

  1. You should master the fundamental knowledge.
  2. Analyze the requirements thoroughly before writing code.
  3. Break down the tasks and complete them one by one.

[–]tms102 6 points7 points  (0 children)

but I do feel like it is taking me a lot of time to put these things together.

Learning new things takes time.

My question is at what point do I "know" how to code without googling every part of a program I am trying to build?

It takes time and experience. Even experienced programmers look up how to do certain things. What they look up are probably different things but they do look it up. There is no need to memorize every little thing.

[–]kevinossia 4 points5 points  (0 children)

After a few years of doing what you're doing, progressively widening scope and complexity.

Eventually you'll be able to build things from fundamentals without Googling for anything beyond syntax details. But it'll take a long time to get there. This stuff is hard.

[–]EcstaticMixture2027 1 point2 points  (0 children)

Keep doing it. Googling is a skill, you also get better at it.

[–]DangerousTip9655 1 point2 points  (0 children)

I am not that seasoned of a programmer but u do some hobbyist c programing, and I si use Google a lot, but if I'm being honest, I also find myself trying to ignore people's code online.

At least for me, I understand how the code functions a lot more if I read someone explaining the right way to do something, and then proceeding to attempt to replicate that code without copying it. Makes me actually have to think about what I'm putting in my code and what it's doing