I'm looking for courses that seem to be the opposite of this... no language or programming at all, but instead looking at the process of breaking down problems.
We've hired several devs out of bootcamp, and they're all taught how to code, but not how to solve problems using code... Anyone have material that might be good for this? Books, videos, courses?
- When you have multiple layers of "companies" ( in a single table: Company) and every company has employees (table: Employee). Request: - List all company employees that have a random company as mother company, including their childs, all layers deep. So you create a optional integer parentCompanyId on the Company for the inheritance ( that's easy) How would you go further? - You may not use a recursion of sql Queries (or in code) to procedurally get the parentCompany or "child companies" of all layers deep. - You may change the database ( and you may use joins also)
coding: "write a socket listener that reads from a buffer and converts it into a null-terminated string".
solving a problem: write a program that does (some open-ended business problem). Or generalize the socket listener so that it works on any platform, OS, hardware, network configuration, etc. A coder might do great on confined problem space, but when you ask them to write a larger program they dont normally know how to design it. This isn't just true of bootcamp coders though. Tons of CS grads wouldn't do any better. Otherwise FizzBuzz would have never been a thing.
Parse this file and tell me the total of all $ amounts, and the line where we've reached 50% of the total $.
How do you approach this problem and break it down. I've seen problems like this solved by looping through the file twice, because they answer one question at a time... But I'm hoping there is something out there that can teach the general process of breaking down the problem, identifying loops, identifying generalizable code, and anything else that needs to happen before your code can work.
I have no idea if this works (it did for 3 test cases), and I still end up reading through the array (but not the file) twice.
# assuming file with $100\n$200\n$23\n$50 etc.
linenum_vals = []
with open('numbers.txt') as input_file:
for i, line in enumerate(input_file):
try:
linenum_vals.append([i, float(line[:-1][1:])])
except ValueError:
print("Not a number value on line", i)
total = 0
for i in linenum_vals:
total += i[1]
half = total/2.0
for p in range(len(linenum_vals)):
if linenum_vals[p][1] == half:
print("Half of total found on line", linenum_vals[p][0])
break
else:
if linenum_vals[p-1][1] < half and linenum_vals[p][1] > half:
print("Half of total in between lines", p-1, p)
break
else:
if p+1 != len(linenum_vals):
if linenum_vals[p][1] < half and linenum_vals[p+1][1] > half:
print("Half of total in between lines", p, p+1)
break
print("Half of total wasn't found in the file.") # probably because the list of values isn't in order
What way would you do it? I feel like I'm missing something.
> We've hired several devs out of bootcamp, and they're all taught how to code, but not how to solve problems using code...
Frankly any Algorithms & Data structures book should do the trick. Choosing the right data structure is often half the solution when solving a problem. That plus SICP and a book about Discrete Math should be enough for 90% of the daily problems.
FYI, it's spelled 'discrete math.' I know this only as someone who spent years incorrectly spelling 'discreet' as 'discrete' because of my math background.
Pretty much this. I show/tell people all the time that most of solving the problem is how you structure the input data. `Rock, Scissors, Paper` is perhaps the best simple demonstration of this.
That said, I don't think it's something that correlates to being a bootcamp grad. I'm usually the one `solving problems with code` and the closest thing that I have to an education in this industry is the boot camp I attended (lifelong programmer regardless). I know other boot camp grads who are the same way. I encounter developers from all backgrounds who know how to code but can't solve problems. There's just _a lot_ of bootcamp grads right now.
I'm not sure Algorithms & Data Structures will help you all that much in the real world. In most modern languages, all the algorithms and data structures are already implemented in the standard library, and while having heard of them is beneficial, you won't get a lot of value out of knowing how to do a binary search.
The problems that I see most junior devs struggling with are at a much higher level. How do you organize large scale programs? How do you make sure that different parts interact flawlessly? A book about design patterns could help here, but without experience you won't appreciate what the patterns are good for. But by far the most difficult part to wrap your head around is concurrency. How do you make sure your assumptions all hold up when multiple threads / processes / users are all doing stuff in parallel? That's really hard to understand, and you need a combination of theory and experience to master this. I'm not sure what my point is. Software development is hard, a bootcamp and an Algorithms book is probably a good start, but after that you need to still put in a lot of effort to reach your full potential.
Algorithms and data structures can actually be great not because you implement your own but because you can find out why your N^3 algorithm is slow (give you three guses) and why iterating through your data is slow (since you used the wrong data structure) I like Bootcamps for what they are, a tool to fill Junior level positions for people to begin working their way into a career and I love teaching the people who graduate and are interested in continuing their career, but there is more to programming than paying for a Bootcamp and spinning up a Rails/React app. PS: Forget anyone who says "I already know how to code, I don't need to learn this". Those people are fucking boat anchors, they just sink.
> The problems that I see most junior devs struggling with are at a much higher level. How do you organize large scale programs? How do you make sure that different parts interact flawlessly? A book about design patterns could help here, but without experience you won't appreciate what the patterns are good for.
I couldn't disagree more. Algorithms are the base level that you build on. Anything non-trivial you will have to understand what is available to you and create something new. Take something common, doing a substring match on a list of items. If you don't have algorithms knowledge I'd bet your solution is going to adversely affect the final program. Good choices of data structures, and solid understanding of algorithms are the units of composition in creating software. IMO > But by far the most difficult part to wrap your head around is concurrency. How do you make sure your assumptions all hold up when multiple threads / processes / users are all doing stuff in parallel? That's really hard to understand, and you need a combination of theory and experience to master this. Or use Rust and have the compiler check it for you, so you don't have to be a wizard.
I'm inclined to disagree as well. Organization of large scale programs/problems is straightforward if the composing parts are sensible. The datastructure is root of all. A proper explicit structuring of the data is crucial to constructing a good abstraction. I usually accent reading others' programs or solutions, with objective of finding new ways to see the problems. Of course it's important that said programs are good quality. Inspirational properties of elegant programs should not be underestimated. To me, most influential such readings were classic textbooks (Norvig's PAIP), classic algorithms (like qsort) and others' kata solutions. Also, another thing that I find is very important is if you work on very complicated stacks like web or native apps, to step back from time to time and do some cleaner programming in simpler environments. This helps maintain curiosity. What I do is write small programs, and I don't implement actual stack calls (like filesystem calls or dependency calls), just stub them. This let's the mind feel free. When I'm done, if I want to have it functional, I'll implement the calls. Point here is not to burden self.
As an algorithmist, I strongly agree. Algorithms are of value, but they are not a high priority for junior devs. For a tiny fraction of problems, algorithms knowledge is absolutely essential, and often cannot be picked up at the time of need. But for almost all problems, especially the problems facing junior-to-intermediate devs, there is rarely any algorithms work. As you said, code organization. Long lists of things to remember to take into account (e.g. what areas require one to stop and get a security expert). Etc.
I think the best thing you can say for algorithms training is that, without it, you often don't notice that you need to get an algorithmist. When people say, as my sibling commenters do, "find out why your n^3 approach is slow", or "do a substring match", I wonder what problems they're solving. Has this shit actually come up in your career, or is it just something that you imagine will come up? How many times has a cubic algorithm actually been the problem? As compared to doing five hundred DB queries, instead of one query that JOINs properly and returns a 500-row result set, which I see juniors and students do all the time, and is not an algorithms problem at all (it's the same asymptotic complexity, btw!). How many times have you tried to figure out a fast approach to substrings, and how rude was your code reviewer when they pointed you at the standard library?
I agree that it would do the trick... but given that Problem Solving is such a basic skill, I would hope that someone could have figured out how to do it without requiring years of college math and csci.
(for reference, my real concern is my cousin is in a csci-150 course, having trouble because her prof isn't used to teaching to students who haven't been programming for years... nobody has bothered to figure out how to teach problem solving, and they're left to teach themselves or drop out)
Put the newbie gumshoes to work by tracking down simple bugs and designing simple patches to fix them. They need to be able to read other people's code to decipher and debug the coding style they are seeing before they are allowed to build any new module themselves. They need to understand other styles so they can form their own. They should be able to detect any code "smells" and reason with pros/cons why their implementation could work better and provide proof (like execution timing or better readability).
Playing a lot of puzzle games help as well, especially games where the thing to do is very abstract like in a point-n-click adventure game.
I'm hoping there's a way to teach them problem solving BEFORE they learn to code... I feel like it should be a prerequisite to enrolling in the bootcamp. I don't remember how I learned it, but it certainly wasn't reading other people's code at my first job.
I don't really know of anyone who learned problem solving with a computer before they learned to code. Supposedly Dijkstra, but that man thought computers cheapened computer science.
Comments (135) 24 threads
Show all comments
Showing thread 1 of 24
We've hired several devs out of bootcamp, and they're all taught how to code, but not how to solve problems using code...
Anyone have material that might be good for this? Books, videos, courses?
- When you have multiple layers of "companies" ( in a single table: Company) and every company has employees (table: Employee).
Request:
- List all company employees that have a random company as mother company, including their childs, all layers deep.
So you create a optional integer parentCompanyId on the Company for the inheritance ( that's easy)
How would you go further?
- You may not use a recursion of sql Queries (or in code) to procedurally get the parentCompany or "child companies" of all layers deep.
- You may change the database ( and you may use joins also)
solving a problem: write a program that does (some open-ended business problem). Or generalize the socket listener so that it works on any platform, OS, hardware, network configuration, etc.
A coder might do great on confined problem space, but when you ask them to write a larger program they dont normally know how to design it. This isn't just true of bootcamp coders though. Tons of CS grads wouldn't do any better. Otherwise FizzBuzz would have never been a thing.
How do you approach this problem and break it down.
I've seen problems like this solved by looping through the file twice, because they answer one question at a time...
But I'm hoping there is something out there that can teach the general process of breaking down the problem, identifying loops, identifying generalizable code, and anything else that needs to happen before your code can work.
Continue this thread — 2 replies
https://www.amazon.com/Think-Like-Programmer-Introduction-Cr...
Frankly any Algorithms & Data structures book should do the trick. Choosing the right data structure is often half the solution when solving a problem. That plus SICP and a book about Discrete Math should be enough for 90% of the daily problems.
That said, I don't think it's something that correlates to being a bootcamp grad. I'm usually the one `solving problems with code` and the closest thing that I have to an education in this industry is the boot camp I attended (lifelong programmer regardless). I know other boot camp grads who are the same way.
I encounter developers from all backgrounds who know how to code but can't solve problems. There's just _a lot_ of bootcamp grads right now.
The problems that I see most junior devs struggling with are at a much higher level. How do you organize large scale programs? How do you make sure that different parts interact flawlessly? A book about design patterns could help here, but without experience you won't appreciate what the patterns are good for.
But by far the most difficult part to wrap your head around is concurrency. How do you make sure your assumptions all hold up when multiple threads / processes / users are all doing stuff in parallel? That's really hard to understand, and you need a combination of theory and experience to master this.
I'm not sure what my point is. Software development is hard, a bootcamp and an Algorithms book is probably a good start, but after that you need to still put in a lot of effort to reach your full potential.
Algorithms and data structures can actually be great not because you implement your own but because you can find out why your N^3 algorithm is slow (give you three guses) and why iterating through your data is slow (since you used the wrong data structure)
I like Bootcamps for what they are, a tool to fill Junior level positions for people to begin working their way into a career and I love teaching the people who graduate and are interested in continuing their career, but there is more to programming than paying for a Bootcamp and spinning up a Rails/React app.
PS: Forget anyone who says "I already know how to code, I don't need to learn this". Those people are fucking boat anchors, they just sink.
All junior (and many senior) devs struggle with that. This is solved with experience, not training.
I couldn't disagree more. Algorithms are the base level that you build on. Anything non-trivial you will have to understand what is available to you and create something new. Take something common, doing a substring match on a list of items. If you don't have algorithms knowledge I'd bet your solution is going to adversely affect the final program.
Good choices of data structures, and solid understanding of algorithms are the units of composition in creating software. IMO
> But by far the most difficult part to wrap your head around is concurrency. How do you make sure your assumptions all hold up when multiple threads / processes / users are all doing stuff in parallel? That's really hard to understand, and you need a combination of theory and experience to master this.
Or use Rust and have the compiler check it for you, so you don't have to be a wizard.
I think the best thing you can say for algorithms training is that, without it, you often don't notice that you need to get an algorithmist.
When people say, as my sibling commenters do, "find out why your n^3 approach is slow", or "do a substring match", I wonder what problems they're solving. Has this shit actually come up in your career, or is it just something that you imagine will come up? How many times has a cubic algorithm actually been the problem? As compared to doing five hundred DB queries, instead of one query that JOINs properly and returns a 500-row result set, which I see juniors and students do all the time, and is not an algorithms problem at all (it's the same asymptotic complexity, btw!). How many times have you tried to figure out a fast approach to substrings, and how rude was your code reviewer when they pointed you at the standard library?
(for reference, my real concern is my cousin is in a csci-150 course, having trouble because her prof isn't used to teaching to students who haven't been programming for years... nobody has bothered to figure out how to teach problem solving, and they're left to teach themselves or drop out)
Playing a lot of puzzle games help as well, especially games where the thing to do is very abstract like in a point-n-click adventure game.
Continue this thread — 3 more replies
Continue this thread — 2 more replies
Continue this thread — 14 more replies