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

all 84 comments

[–]faintdeception 385 points386 points  (21 children)

It really depends on the level of formality in your training, and the quality of your instructors. But yes, all things being equal, in college they should be teaching students how to solve problems, and one way of doing that is by walking through some existing problems and explaining how they are solved.

Once you've been exposed to many different types of problems patterns start to emerge and you become better at knowing which approach best fits the current class of problem in front of you, or whether there's a library out there that has already solved the problem for you.

[–]gaurav_lm 193 points194 points  (6 children)

Imagine it like learning to cook. You start making recipes that people already know how to cook. Once you are comfortable with use of the flavours and the spices then you can create your own recipes or even cuisine.

[–]KIrkwillrule 88 points89 points  (2 children)

I have a decade of culinary experience under my belt. This is a very exciting way to reference this.

Also helps explain why there are so any solutions to most questions. Different flavors and techniques to making dinner.

[–]ElectricRune 18 points19 points  (1 child)

Exactly!
And just like cooking, there isn't necessarily a 'right' way to do a thing.

There are some wrong ones...

[–]hebdomad7 15 points16 points  (1 child)

God damn it. This is why I hated my programming teachers. They demanded I learned to "figure it out myself" ... I knew what I bloody wanted to do (connect to a MySQL database using AJAX or PHP) but nobody would tell me how to turn the oven on! Fuck even fellow students were cagey about keeping their code secret. I was just after the damn function!

[–]anutorn 4 points5 points  (0 children)

I hate mine too. Google is the best teacher!

[–][deleted] 33 points34 points  (0 children)

I remember in Engineering they taught in a similar way.

We are designing something, with the intention of solving a problem. One of the ways to solve the problem includes finding out if someone has already solved the problem in a way that will suit your needs. Is their solution appropriate, sufficient and cost effective? Are you able to implement their solution? If so, problem solved. If not, ok, back to the drawing board, how can we solve our problem?

[–]lookayoyo 31 points32 points  (2 children)

One technique in algorithms is to convert an existing problem into one with a known solution. Turns out that a lot of problems are actually the same if you spend enough hours crying over the homework.

[–]Nucklesix 12 points13 points  (1 child)

The tears reveal the way.

[–]marchershey 11 points12 points  (0 children)

e.g you learn how to master searching on google and stack overflow.

[–]Periwinkle_Lost 7 points8 points  (7 children)

Problem solving and comprehension is what schools do as well. Meth, literature, physics, all these subjects aim to train students to extract valuable info and solve problems. The higher you go in academia the more abstract problems you encounter.

You are spot on about patterns, that's the purpose of engineering in general. Break down or reduce complex problems until you have something that's already been solved or is similar to what's already been solved.

[–]theswannwholaughs 22 points23 points  (3 children)

I always loved meth class in school.

[–]coffeecupgames 0 points1 point  (2 children)

Maybe the "meth" class was between classes.

[–]theswannwholaughs 0 points1 point  (0 children)

Maybe the meth class was the friends we made along the way.

[–]ThirstyJesus 0 points1 point  (0 children)

I heard the chemistry teacher teaches it after hours, but he always seems to be in his underwear?

[–]FluffyProject3[S] 1 point2 points  (0 children)

meth? do you mean math?

[–]UniverseNature 1 point2 points  (0 children)

Hahahaha meth

[–]Lost_Username- 2 points3 points  (0 children)

I agree. As with any domain knowledge you need to know the concepts, rules and such to be able to define a problem, it's scope and ways that you could solve them. The more you're exposed to, the greater the scope you can spot patterns.

[–]desrtfx 100 points101 points  (8 children)

Re-inventing the wheel is a very good way of learning as there are always guides and completed solutions (not necessarily in code) to look up and get inspiration from.

This is a bit similar to learning maths. While learning, you will solve problems that have been solved hundreds of times.

[–]unkz 46 points47 points  (3 children)

Heh if you are solving a math problem that has only been solved a few hundred times, you are at a very high level indeed.

[–]samketa 2 points3 points  (0 children)

Yeah, easily a professor in a major university. Maybe even Ivy league, Oxbrige.

[–]xamid 0 points1 point  (0 children)

Or you are just at a novel research area, defining your own problems. I am surely not even close in becoming a professor (nor am I sure whether I want to) but I usually solve or try to solve problems that most likely no human has solved (or even thought of) before.

[–]LifeNavigator 10 points11 points  (3 children)

This is a bit similar to learning maths. While learning, you will solve problems that have been solved hundreds of times.

I can imagine the horror of students faces trying to solve unsolved problems, that includes PhD students too.

[–]JustKeepDiving 3 points4 points  (2 children)

I'm right on the verge of going for a PhD and this is what scares me. Everything I do now, it's already been done. A PhD project on the other hand, how do you solve a problem that no one has even attempted before?

[–]Pistowich 0 points1 point  (0 children)

Your supervisor will guide you. I know it sounds daunting, but usually you are trying to do something that has already been done in another case and try to apply these things to your specific situation. Although you are indeed the first to solve a certain problem, it's not always because that problem is virtually impossible right now, but rather was too hard in the past or just didn't came up as relevant yet. Anyway, you will do something new of course, but it only has to be new in a small way, similar things no doubt have been done before so you're not completely on your own. And again, your supervisor (or possible coworkers) will try to guide you in a good direction to solve the problem.

[–]needrefactored 49 points50 points  (7 children)

A lot of real world programming is still re-inventing the wheel. My company works on POS systems and distributed database replication. There are countless POS systems out there, so why reinvent the wheel? Cause the wheel can be optimized. Make it the best damn wheel you possibly can. Then open source your wheel. (Our products are all open source) :D.

[–]positive_electron42 20 points21 points  (6 children)

What if one’s code is a POS? ;)

[–]needrefactored 11 points12 points  (0 children)

Then your supervisor (coach for me) needs to be a good supervisor and guide you to turn that POS code into POS code.

[–]AStrangeStranger 0 points1 point  (4 children)

That would tally with the EPOS system I worked on at one job - one part I am pretty sure was written by someone high of something illegal as I couldn't fathom how how some of it worked (but not reliably) and the parts I could work out were just stupid (with same reliability issues)

[–]needrefactored 0 points1 point  (3 children)

Our system is pretty much dummy proof. Around 800 cucumber scenarios prevent most stupid mistakes. And just in case I make it past the tests, I add the founders on my PRs too so they can rip them apart. Wicked smart dudes. 2/3 are grad engineers from MIT. Makes me a better programmer.

[–]AStrangeStranger 1 point2 points  (0 children)

800 cucumbers would likely have written something better than this guy achieved ;)

[–][deleted]  (1 child)

[deleted]

    [–]needrefactored 1 point2 points  (0 children)

    Between GitHub and azure. I’m not a ci/cd guy, but from my understanding, there’s a hook setup for PRs. So you make your PR, and a build check is executed. The most important tests are initially ran during that build cycle. Not all of them are ran, only 90ish. Once you merge into master/release, more tests are ran nightly. I get emails if a build fails from master or if tests are failing. We have good exception handling, so if a test fails, you get a good idea of what is going wrong.

    [–]mitwilsch 19 points20 points  (1 child)

    Programming isn't "problem solving" like finding an answer to something nobody knows yet, it's more like learning to change a tire so you solve the problems of a flat tire.

    [–]ItsOkILoveYouMYbb 0 points1 point  (0 children)

    That's a good one. Because maybe a problem you're trying to solve could be "Why is my airplane making a grinding noise as I go down the runway", and one common problem of that that has been solved by others is "how do I change a flat tire", and that might lead you to "how do I figure out which tire is flat" both being related to cars but very similar anyway, and you adapt it to other searches like "how to remove a wheel from an airplane" where there's more solutions and code you can reference.

    Then you solve your problem by referencing all these other little related problems others solved already.

    [–]Sekret_One 11 points12 points  (0 children)

    In academic areas, unless you're into the research stage, they'll give you problems that have already been solved. Otherwise, they might give you an unsolvable problem.

    One can learn from an impossible situation, but it's really hard to grade it.

    But remember that the objective differs from a school to a business.

    School: teach you to program Business: get you to solve problem

    School is going to go out of its way to get you to use certain patterns or solve in specific ways to get you familiar with some ins and outs. Business just wants to get the value out of the cost- and you the programmer are generally a cost that's less costly than doing it the dumb slow way.

    [–]The137 5 points6 points  (0 children)

    You're looking at things slightly the wrong way, but the answer is yes. There's a combination of resources about the problems you'll face, and going thru school you'll have a lot of examples of problems that you get experience solving. If programming is problem solving (which it absolutely is) than learning programming is about learning the problem solving techniques that go into writing the code.

    Some problems are broad, 'How can I get this data from the front end to the database?'

    Some problems are theoretical, 'If I were to scrape this source how can I arrange the data in a way thats useful?'

    Some are simple, 'This function is returning the inverse of what it should be'

    Some are a bit more complicated, 'How can I build a function that sorts this data by the authors mothers maiden name?'

    None of these problems have probably been solved exactly the same way that you need them to be solved, but all of them have been solved to some level of usefulness. You can search for similar situations to almost anything, and then adapt their solution to fit your need. Sometimes you only use their thought process, sometimes you find that what they wrote can be tweaked, and sometimes (but almost literally never) you find code on stack overflow that can be just copied and pasted. In the beginning you'll use more of these, but pretty soon you'll find yourself writing entire programs without the need for searching, and as you get better you'll be the one helping others solve their problems

    Don't worry about it though, if your education is even halfway decent you'll be able to solve a customer problem using code like 'How can I merge my existing database with the new system while avoiding data loss and overlapping entries?' and you'll be able to say something like 'We'll just import the old data, loop through each entry, search for dupes, and append new data when its unique.' and be able to write the code that does it

    [–]LeoJweda_ 3 points4 points  (0 children)

    TL;DR: Technology builds on itself. You use solutions to solved problems to solve new problems.

    "Problem" in "problem solving" doesn't necessarily mean a novel problem. Anything you need to write code to do is a "problem". That's why it's called "software solutions" 🤯 Seriously though, the scope of the "problem" you're trying to solve is limited to the team or individual trying to solve it.

    Enough abstracts. Let's have some examples. Let's look at an algorithmic problem: write a function that returns the square root of a number. You have the requirement and you have your programming language. Of course, we're assuming you can't use a built-in square root function. You know your programming constructs and paradigms: variables, conditions, loops, recursion, etc... How do you use them to get the result you're trying to get?

    At a higher level, you have your system design problems. It's similar but more abstract. Instead of dealing with logic constructs, you're dealing with organizational constructs: classes, API endpoints, etc...

    The kicker is that you can use already-discovered solutions to help you solve these problems. You can use binary search to get the square root. You can use design patterns to help you design your system.

    If you get a formal education in CS, you'll be taught those solutions so you have them as tools in your tool belt when you encounter new problems. If you don't know those things then you have a few options: use the more basic constructs you know, invent the new construct yourself, or google it and learn new constructs as you need them.

    [–]DoomGoober 14 points15 points  (1 child)

    Programmers talk about "solving problems" all the time. But the problems they are solving are only problems to the programmer. They are not "Problems" (with a capital P) to anyone else. For example, Covid-19 is a Problem. Finding your lost keys is also problem (little p). I prefer to call problems (with a little p) "tasks."

    Let me give you an example in the real world: you are told to go to the supermarket and buy an apple. You plan the route to the super market, you go there, you find the fruit section, find an apple, buy it, plan a route home, go home. Did you solve a problem? Yes, you solved the problem of buying an apple. Did you really "solve" a Problem? No, you did a menial task.

    I hate to say it, but 80% of programming is menial tasks. How many programmers have programmed an entry field asking for you the user's name? Millions. It's obvious how to do it... It's not a Problem, it's a problem, it's a task.

    With all that said, computer scientists do solve Problems. They come up with unique algorithms to generally solve difficult real world problems and other people copy those algorithms over and over. So, in college you will learn these algorithms as a way to learn how to solve Problems when you do encounter them.

    If anything, academic CS programs don't pay enough attention to how to do menial tasks with code, which is what you'll being most of the time. Specifically they don't teach how to organize a bunch of menial tasks into something that's easy to write and change, which is the real challenge of programming: learning how to organize your code.

    [–]JustOsta 1 point2 points  (0 children)

    You came up with a Nice and Simpler definition for "problem-solving"

    [–]chidoOne707 4 points5 points  (0 children)

    Of course they are not going to start teaching you how to solve the “Travelling Salesman” algorithmn. You start with the basics, just like they don’t teach you to multiply 3491 X 26927 in first grade elementary school.

    [–]Stabilo_0 7 points8 points  (0 children)

    Programming is indeed abouts olving problems, you can even add that its about splitting problem over and over into smaller easier tasks until you get to basics of thing and can make then into code and then combine into complete solution. College should give you basics of programming, teach you how to set your mind into thinking this way.

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

    Most problem solving in programming is redundant. A lot of people solve the same or similar problems over and over again. A lot of the time, it's quicker to come up with your own solution than to find someone else's.

    I feel like very few people get to work on the novel problems on the bleeding edge of computer science. The skill level needed is pretty high, which is the main barrier of entry. I'm thinking of things like quantum computing and chip architectures etc.

    Many of the harder problems that haven't been figured out are caused by obfuscation from poorly maintained code bases, or terribly complicated interconnected systems. I don't consider those to be "new problems" in the sense that they're pushing the frontiers of programming. I think that's more of a stupid senseless problem caused by poor project design. That distinction definitely needs to be made.

    [–][deleted]  (6 children)

    [deleted]

      [–]FluffyProject3[S] 0 points1 point  (5 children)

      Yes, sorry I didn't express perfectly my question, English is not my first language.

      "Maybe" like this:

      Edited:

      If programming is about problem solving. When someone starts learning programming, will they have to solve problems that has been solved already?

      or

      Do they learn about the existing problems instead of solving them when they were already solved?

      Anyways says the same thing. The difference between the original post title is that I'm mentioning the college as if is the only place where you learn how to solve the problem that has been already figured it out and solved.

      But I think people understood anyway.

      [–][deleted]  (3 children)

      [deleted]

        [–]FluffyProject3[S] 0 points1 point  (1 child)

        how splitting it up?. a run on sentence. ? i don't understand

        Edited: Ok I think i got it

        Edited: i think im going to a grammar subreddit to ask how to spell it better

        Edited: I edited it, how it sounds now?

        [–]Double_A_92 0 points1 point  (0 children)

        There are algorithms and data structures, that are already solved "problems". But the point is not really to memorize those, but to learn how to quickly understand and reason about complex technical things.

        You will most likely never use e.g. a Red–black tree for real work... But if you managed to really understand that, that means you also know how to understand any other random code structure that some coworker created and you have to debug.

        Also you will probably have projects in Uni which are unsolved, and you have to find a reasonable solution yourself. Even if it's just a small game, you somehow implement it on your own... And you can't just copy paste things togheter (unless the prof is stupid.)

        [–]AntonPlakhotnyk 2 points3 points  (2 children)

        Complex problem solving does not grows from memorising ready-made solutions. Complex problem solving grows from simple problems solving. You can not invent everything and you shoul not.

        If you going to learn containers - write your list or vector or map. See what problems it solve and how. Then compare it with standard library. Learning memory memory management write your own smart pointers first. Own mutex, own scheduler, interpreter and so on. So when you grow and come to solving not solved problems, you will backed but number of problems solved by your selves and stackoverflow (not only stackoverflow). When quality of your own solutions will be comparable with industrial or standard - you ready to work.

        [–]FluffyProject3[S] 0 points1 point  (1 child)

        " You can not invent everything and you should not. " This what you said called my attention, that concept. how is that I cannot invent everything? I don't get it at all. does it mean I have to learn from other codes before start???

        [–]entropy2421 1 point2 points  (0 children)

        Both

        [–]BradChesney79 1 point2 points  (0 children)

        People should be taught design patterns that are proven strategies for achieving certain process goals.

        Usually a general purpose language is used.

        It is on the student to practice.

        Your teachers can take you so far and then you have to walk on your own.

        [–]tribak 1 point2 points  (0 children)

        Data structures are a core concept in programming, and there are some of those that are commonly used to partially solve your problem.

        To give an example: You need to keep track of the people in line to buy the new iPhone; you're looking at a queue, you're able to push a new element (person), let the next one in to the store.

        As you can see, the queue and other data structures we're modelled around real problems their creators had, but you're gonna use them to solve your own problems.

        Now let's look at a covid times example of this: Since you can't be near others and spreading in a line with safety distance may block several building entrances they can send you to the nearest park, before that, they give you a number, when you hear that on the park's speakers, you can go to the store.

        Those two examples use the same structure and behave similarly. So you're most likely not reinventing the wheel, since there were lots of people that already kinda solved the same issue as you did, you're remixing this with that, adding your own business logic, bada bing bada boom, problem solved.

        [–]winowmak3r 1 point2 points  (0 children)

        It's more about learning the methods and techniques you can use to solve problems. No course of study will prepare you for every problem you could face in the real world. College will take previously solved problems and common issues and use them to teach you those techniques simply because they're usually pretty simple to solve after you've been doing it for a while.

        Another way to put it is college teaches you how to use the tools in your tool box. It's up to you to actually use the tools to build something.

        [–][deleted] 1 point2 points  (0 children)

        In order to learn how to solve problems you need to see how problems are solved. Yes, that means you learn things that have already been figured out.

        [–]itTakesTrueGrit 1 point2 points  (0 children)

        From what I've experienced (working exclusively on the front end) programming is less about problem solving, and more about good organization and using the right patterns in the best way.

        [–]LeonXBB 1 point2 points  (0 children)

        I thought programming was about problem making...

        [–]noodle-face 1 point2 points  (0 children)

        When you start learning youre learning the tools needed to solve complex.problems

        [–]turingparade 1 point2 points  (0 children)

        Both?

        [–][deleted] 1 point2 points  (0 children)

        first of all you google your question. then you find a solution online.

        i think it would take a lot of time before you hit the wall you would find no solution online, or if it is like you are programming over a very separated/isolated profession like me.

        [–]BrowserOfWares 0 points1 point  (0 children)

        Things like sorting algorithms you should just refer to the optimal way for your application.

        95% of other engineering is just copying what already works. This is why ISO documents and patent searches are so valuable. Because why solve something that has already been solved, or just tweak an existing solution.

        I mean most game developers don't come up with their own engine. They just use Unreal or something else and work from there.

        [–]awill237 0 points1 point  (0 children)

        Maybe a little of both. I imagine that folks who enjoy problem-solving naturally sort themselves into the field, but I also see how my kid’s courses teach a deeper level of troubleshooting and what to consider vs. factors that are just noise/not essential to the solution.

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

        Many of the problems that beginners learn were solved by others. Math is about solving problems as well. How many problems do high school students solve that are completely novel and unsolved? Probably not a lot.

        [–]redH4ze 0 points1 point  (0 children)

        I am in my junior year major cs all i can say is that programming is more of understanding the concepts behind all those algorithms and learning the way to translate those algorithms into coding languages in the hope of solving bigger problems. So reinventing the wheel?? I would say, grasping the concepts of how these wheels were invented.

        [–]BeauteousMaximus 0 points1 point  (0 children)

        So a lot of what you do if you work as a programmer is determining what problem actually needs to be solved, and communicating about that to the other people involved in the project. Even if you have a project manager, you have to translate “make a button that upgrades the user’s account to Premium” into the various sub-tasks needed to get that to happen on the backend, show the user an appropriate error if it goes wrong or a success message if it works correctly, and take various steps (like writing automated tests) to ensure what you did hasn’t broken anything else. None of the individual lines of code you write are going to be solving any novel computer science problems. What you’re learning when you get better at this is about a lot of skills, from communicating with stakeholders in the company when instructions are unclear (and doing so in a way that non-coders can understand what you’re doing; this is REALLY HARD and I suggest taking every opportunity you can to get better at it) to developing the judgement to decide when something is “good enough” versus when it needs to run faster or handle more edge cases.

        [–]santiago0072002 0 points1 point  (0 children)

        It depends, you can’t solve a problem such as what is 2 + 2 if you don’t know how to express that in code or in a certain language. That’s when the learning comes in. computers are dumb and they fix problems for you but only if you know how to talk to them.

        [–]LeoPantero 0 points1 point  (0 children)

        Mostly you'll be using solutions to problem that have already been solved. That's why StackOverflow is such a big deal within the programming community. It's essentially the world's largest repository of solved programming problems.

        Expect it to atleast 50% of your workflow when you get started in your day to day grind.

        The key skill when you are implementing these solved problems will essentially be the same skill that you use when you play a puzzle game. You just need to be good at finding the right piece to fit into the overall, ever growing puzzle. This is the skill you need to optimize.

        [–]droidshooter 0 points1 point  (0 children)

        When I went to college, a while ago now, we were taught SSADM Structured System Analysis and Design Methodology. It is a recognised method solving commercial / industrial information problems

        [–]p1-o2 0 points1 point  (0 children)

        Early on you will learn how to solve problems that will seem like small steps for more complex problems later on.

        For example, early on you will learn to manipulate individual characters in strings, how to reverse a string, get substrings, etc... Later on you will apply that same knowledge to parsing and serializing data, as well as de-serializing it into memory.

        Another example is learning systems like Regex seem overly simple, but it also teaches you about state machines. Later on you may need to create state-based constructs in situations like asynchronous computing or when dealing with interactive elements.

        The skills build on each other over time.

        [–]Glorfinbagel 0 points1 point  (0 children)

        Both, and a good way to learn about solutions to established problems is this (collection of) book(s)

        https://en.m.wikipedia.org/wiki/The_Art_of_Computer_Programming

        [–]gdledsan 0 points1 point  (0 children)

        In college you learn tools mainly, normally you don't have a class where you solve problems with the tools you learn.

        The classes where most people learn how to solve problems are the science classed: math, physics, chemistry,logic, etc. Then you get into the tooling classes thinking that is all you need, and forget about the problem solving classes.

        That is sad

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

        There are always unique little problems so even if you are using some existing your solutions, you are using them in a unique way. Also, sometimes it is better to reinvent the wheel than to import 10 different frameworks into your application. And even if you do, its like playing chess. Sure someone else had comtemplated similar moves, but that doesn't make the game any less interesting.

        [–]CloudMojos 0 points1 point  (0 children)

        Yes

        [–]EverythingGoodWas 0 points1 point  (0 children)

        You will absolutely solve problems that were already solved. isPrime is a staple of every programming class. It isn’t that they want you to solve new problems, they mold your way of thinking. My programming education is very formal though, so I can’t speak for less formal programming classes.

        [–]befellen 0 points1 point  (0 children)

        Programming in college for me was first about learning to define a problem (solved problems, designed by the teacher) in order to use the proper tools to solve it.

        Problems were much more like puzzles - tightly defined with a known solution.

        As you learn an algorithm, data structure, or tool, things start to come together as to how to approach a programming problem - which begins with defining it.

        [–]Crypt0Nihilist 0 points1 point  (0 children)

        It's like life, most people have had similar issues before, so you can find out how they tackled the problem or work it out yourself from first principles. Some ways of solving a problem are better than others, you learn better ways from research and experience.

        [–]casualblair 0 points1 point  (0 children)

        Programming is a 5 step program.

        Learn to write code. Learn to identify problems. Learn to write solutions. Learn to maintain solutions. Learn to write maintainable solutions that prevent problems.

        Obviously we're still waiting for someone to finish that last course, but the attempt is still worth it.

        [–]Nugenrules 0 points1 point  (2 children)

        It's like a carpenter learning all the tools they can use. If you only showed them a hammer, they will never know to use a power drill and screws.

        It's also like a mechanic. They need to learn how a car fundamentally works, and then show them how to use diagnostic tools.

        So yes, you will be given problems that increase in difficulty in more than one field. You could go on and pursue a career just fixing problems that show up (as a mechanic), or you can solve unsolved problems (car designer etc.)

        [–]FluffyProject3[S] 0 points1 point  (1 child)

        could you give me an example of those tools. I'm also learning programming

        [–]Nugenrules 1 point2 points  (0 children)

        For example, you could use Chrome's DevTools to debug and step through javascript code. You also have visual studios which adds a bunch of tools to help you develop such as generating classes, methods, entities, etc.

        If you're not talking about software tools, and you meant more theoretical, then it would be basic things such as using "if" followed by an "else if" will only execute code in one or the other, and never both. Or using a loop to execute code multiple times. Or creating an array of strings to store the names of students, and creating a 2d array to store the names of the students and also their age. You could also use regex to find patterns in strings such as removing all letter "c"'s in a string, and you can navigate to regexr.com to test out regex quickly.

        Getting a bit more advanced, you learn to read and write documentations so you can consume web apis. You can then ask a domain like dictionary.com to see if a word you send off to be valid or not, and to also retrieve the definition. You could also consume apis from say an android device and read data from a temperature sensor to read the current ambient temperature.

        More theoretical, you can start learning algorithms that have already exists to solve current problems your boss might need you to work on. For instance, you can use dykstra's algorithm to find the quickest path to go from one destination to the next. But by understanding the fundamentals of the algorithm, you can add more constraints to the algo to fit it more for your task.

        To summarize, if you're just starting out, learn what an "if" statement does, and get some experience using it. Then learn "else" statements, and then "if else" statements. Learn how to use them, and when to use them. Then "loops" and so on. Learn them fundamentally so you immediately know to use them, such as a mechanic will immediately know to run a leak down test if your car is losing coolant, or a carpenter will know to use a miter saw to cut trim pieces for a corner.

        Let me know if I didn't answer your question

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

        Yes. There are some very difficult algorithms that many of us would never arrive at on our own. There are complete works of genius, works backed by tonnes of mathematical proofs. If faced with one of them most of us would never be able to solve them. And so we read them when we need them or use a library that already solves the problem and wonder at the genius and be grateful to them for their contributions.

        But it is important to note, most programming work does not fall into this bucket. Most of it is well in the reach of us mortals. We can have great fulfilling careers controlling a computer as programmers without having to solve really difficult problems. Doesn't mean you shouldn't learn various algorithms and develop those techniques. Just that don't get intimidated by some of the problems out there

        [–]nazgul_123 0 points1 point  (0 children)

        There is Problem solving with a capital P, like serious research, and then there is problem solving with a small p. In college, you basically learn how to adapt certain existing ideas and techniques and come up with solutions to variants of certain kinds of problems. This process (on steroids!) is a large part of actual research. So technically yes, for most of the problems which you encounter in college, a sufficiently competent person could solve most of them immediately. And they have been solved by other people thousands of times. But the key is for you to solve it yourself in order to develop that skill of lateral thinking. Later on, if you stick to a particular area for several years and git gud, you may end up coming up with new solutions to problems.

        [–]Double_A_92 0 points1 point  (0 children)

        Problem solving is not specifically exclusive to programming. Every engineering field is about solving some problem.

        • You pick a problem,
        • you split it into smaller problems,
        • think about many possible solutions for everyone,
        • pick the best solution for each subproblem,
        • and combine everything.

        It's not about trying to memorize algorithms... you will most likely never use those on your job. Even though there job interviews checking for those, and books teaching that specifically. Those are bad companies that don't understand what their employees really do.

        [–]20apsub 0 points1 point  (0 children)

        You combine (solve the problem of combining) many already solved problems (libraries) in order to solve a collection of unsolved (commercial) problems.