Advice on Getting better on General Programming

Started by
11 comments, last by AhmedCoeia 10 years, 1 month ago

For the 5 years I worked for various companies, I worked in large software like computer vision kits, embedded, games. I found myself very good at debuggins skills, I've even found and fixed bugs in frameworks and I solved them. The problem is that I'm very weak at problem solving. I got interview with Qualcomm, and they said you're fine at software, but you have a limited problem solving, I also had the same results with Google.

I'm very bad at solving puzzles and brain teasers. During the interviews I solve all of the software related problems on the blackboard, but when I went to the GM and face math problems and probabilities, I struggle.

How can I improve my problem solving skills?


Some of the problems:

  1. A cake that is cut from anywhere and needs just one cut to halved in equal. I told him cut it horizontally, he said No, consider it as a 2D Problem!.

  2. Consider a concenteric 3 circles, each one can get a color, but not matched with the other circle, how many blobs you can make out of those circles ? this was with the GM ( Augmented Reality SDK)

  3. Consider a train, an infinite one, and you looked at the window, and there are two cars, one big, and one small, what is the probability of having only a big car, I said 50%, he said, what if that two cars you dont know their length, and you want to get the probability of getting the biggest one, I struggled, didn't solve it... I was really exahusted after long day of interviews

  4. prob of having a number divisible by 5 in numbers from 1 to 100.. struggled!!

All coding questions I solved them like reverse a string, detect a cycle in a linked list,..etc.

Advertisement

Practice. smile.png

Have you been attempting those problems from Project Euler? Have you been trying to solve other puzzles?

- Jason Astle-Adams


I'm very bad at solving puzzles and brain teasers. During the interviews I solve all of the software related problems on the blackboard, but when I went to the GM and face math problems and probabilities, I struggle.
How can I improve my problem solving skills?

For general puzzles and brain teasers, perhaps buy some of the puzzle magazines and work through them. There are many different styles, offering logic problems, word problems, mathematics problems, and organizational problems.

For all of them, if I felt uncomfortable I would take the direct approach: "This seems like a trivia problem, either you have seen it before or you haven't. Is this typical of the engineering problems I will be facing in my job?" I asked that once after a trivia question; the questioner blushed, the others in the room laughed, and they proceeded with actual realistic problems.

1) While it is probably a trivia problem, it could be a legitimate problem. Bifurcation (cut the thing into parts) problems are common enough in the real world. You might have a connectivity graph and want to cut it in half while disrupting as few connections as possible. Path splitting, hop-minimization, and other problems can get extremely mathematical.

2) Also sounds like a trivia problem, but they might be getting into the mathematics of graph coloring. The four color problem (how few colors do you need to color contiguous countries on a map) is a classic one, but it can have applications in 3D graphics and modeling. For example, you might have a need to figure out how to turn 3D model lighting into 2D surface textures. If they wanted someone with a math degree the should hire one, but many graphics programmers are also fairly competent mathematicians.

3) Statistics are important for many programming jobs. We frequently play card games and occasionally after an improbable combination of events someone will utter "what are the odds?". Usually within 15 minutes of returning to work, one of the stats-oriented people in our group will have calculated the actual odds. Some are extremely improbable yet still possible (For example, one Magic:The Gathering game, 60 card deck, 23 basic plains cards with 3 in opening hand of 7 cards. He drew 12 plains cards in a row from a well-shuffled deck in a 4-person casual game before he was mercy-killed.) I'm sure your problem had a more nuanced description than what you gave, so I can't help you come up with a better answer.

4) Again, statistics are important for many programming jobs. That one isn't too difficult, figure out how many numbers are divisible by 5 within that range. Since you have 100 numbers, that number is also the percent of numbers. Or also rather easily, for any range of consecutive integers one in X is evenly divisible by X.

If you are just a little out of practice a few cheap "brain training" style magazines may be useful. If you really are lacking on the mathematics perhaps some more serious study is in order.

Most professional careers require continuous training and learning. Doctors must constantly learn new treatments and practices; lawyers must constantly learn the ever-evolving law; and programmers must constantly learn new languages and problem-solving skills.

@Jbadams, I crossed post it, because got the same results last week and I did practice too ! sad.png I'm getting depressed

@Frob, Thanks so much for pointing out a lot of things.

Practice. smile.png

Have you been attempting those problems from Project Euler? Have you been trying to solve other puzzles?

Yes, practice. A lot.

I'll also add my $0.02. YMMV.

Fresh out of university (ca. 2002), my programming skill was decent but my problem-solving skill was really, really bad. As time passed, I realized it was because I had not worked hard enough on my education, and lacked solid fundamentals. I then set out to learn on my own what I had not learned at school. As it turned out, what I really lacked was not programming (which I kept on practicing anyway, of course), but science - math, logic, and physics.

Books that I read and helped me ENORMOUSLY, and I can wholeheartedly recommend:

- How to Prove It: A Structured Approach, by Daniel J. Velleman

This book will do more than teach you proof techniques, it will teach you logic.

- No bullshit guide to math and physics, by Ivan Savov

This book will teach math fundamentals, vectors, calculus and physics.

Books that I've heard good things about, but have yet to read (shame on me, they're freely available!):

- How to Solve It, by George Polya (Wikipedia article here)

- Think Stats - Probability and Statistics for Programmers, by Allen B. Downey

I also learned this while getting my MSc: it's less about how smart you are, and more about hard work. There's NO FAST TRACK. Study, practice, work hard, UNDERSTAND. This way, when a new problem shows up, you'll have the TOOLS that you need in order to BUILD A SOLUTION.

geroger, you have the typical situation as me. same lacking skills, logic, maths,..etc. but programming is not a problem. I also lacked solid fundamentals!.

Thanks so much for the books mentioned, I really appreciated your efforts!.

geroger, you have the typical situation as me. same lacking skills, logic, maths,..etc. but programming is not a problem. I also lacked solid fundamentals!.

Thanks so much for the books mentioned, I really appreciated your efforts!.

Keep practicing the fundamentals: keep making more programs that test your programming solving abilities. This will guide you and give you more context. Once you have an solid understanding of it, make a simple game. Making a simple game will also give you even more perspective on programning.


During the interviews I solve all of the software related problems on the blackboard, but when I went to the GM and face math problems and probabilities, I struggle.

technically, programming is a linguistic type skill ( learning languages and APIs, and how to say and do things with them ).

its math, science, and engineering that tell you WHAT to program (what things you want to do with a language you "speak").

well... unless you're writing something like "learn a foreign language" software or something like that. <g>

and its software engineering that tells you HOW to program ( how to do and build things with a language you "speak" ) .

even for something like "learn a foreign language" software you need the software engineering skills to write a database driven multimedia app.

so, first you need the math, science, and engineering skills to know what to do.

then you need the programming skills so you're fluent in your programming language and APIs of choice.

then you need the software engineering skills so you actually know how to build software.

and yes, its an engineering exercise, just like building a bridge, skyscraper, space shuttle, car, fighter plane, MRI scanner, or any other complex machine / system.

in fact, it may be some of the most complex stuff you can build. every bleeding character of source code is a single "part" of the entire "software machine" you're building.

right now, my current project just passed 90,000+ lines of C++ code. can you imagine how many characters there must be in the file? probably around 1 million.

as i recall, the space shuttle only has (had) about 3 million components, and the typical car something like 20-30 thousand. someone may want to double check those numbers...

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

When we're giving references for math and such, I'd like to also include Khan Academy. It's online, free, has video guides and (for a lot of subjects) exercises.

https://www.khanacademy.org

Hello to all my stalkers.

My advice is something totally different. While many would of course suggest to train your "puzzling" skills directly (like the previous posts) by solving puzzles, I am doing something else and had a lot of success.

Train by solving puzzles is pretty hardcore because when your untrained brain tries to solve them it will fail; you get then depressed and your brain is learning "puzzles = depressing" and you will hurt yourself instead of helping.

It's like when you are trying to gain muscles - or to make it more precise you want to stem a barbel with 20kg/44lbs but can't lift it at all. Would you try to stem it until you succeed? No of course not!

You would try smaller, simple to stem but still heavy on the long run weights to gain muscles more and more and increase the weight over time until you reached your goal.

Same goes for your brain. Try solving simple things to train the brain to do so.

Assessment Centers are often doing such things to test peoples logic thinking by asking a lot of pretty simple questions.

I have a book (sadly only in my language and not in english) filled with such tasks. Easily solvable and repeating with the goal to solve them faster and faster and faster (all of them have a given time limit to reach)

Such simple puzzles are like

"In which direction is gear 11 roating in the given picture"

or "When folding this paper at the marked edges, which of the given Objects would be created"

So you can train your 'optical cognition', 'short-/long term memory', 'mathematic solving skills' (not only mental calculations but also mentaly logicaly getting the answer without brute force calculations), 'visual thinking', 'multi tasking skills', 'logical thinking', 'stress test' and many more brain regions all of them helping you to solve hard puzzles (normal in life) which are needing all such skills all together.

I did this 2 weeks in holiday because I had to learn for an intern intelligence test and my wife told me to do this. At first I thougt (because the tasks are so easy to solve) that it is a waste of time but I noticed when I was back at work and had to solve the big problem again our team was instructed to solve but didn't went any step further after weeks of development, I suddenly had an idea and solved it in 10 minutes. Also I succeded in the intelligence test (with similar logical tests) at best.

And I also had a lot of success in later upcoming problems. It felt like my brain was totally rebooted or like when you are resetting your OS on your computer everything works again pretty fluent and all this data-garbage is out of your computer/brain.

I also noticed when not doing those training once a week, after a while you are falling back in old shape.

Well, those are only my experiences of course. Maybe you want to try something similar.

I think it is called "brain jogging" but never used one of those books or exercise titled with that but used directly the exercises of an/our Assessment Center which is pretty known for in my country that it is hard to succeed (still the tasks themselfes are easy but 5 days of them 8 hours) and they where made by brain scientists. I guess "brain jogging" is the same.

Good luck

- Icca

This topic is closed to new replies.

Advertisement