How do people solve programming competitions so fast? [closed] - coding-style

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I hope this is not a vague/broad/subjective question. If it is, please close it.
Anyway, at several programming competitions (like Google's Code Jam, Facebook's Hacker Cup and so on), by the time I've successfully understood a problem and have an inkling of how to approach it, I see that half the questions are already solved by many people.
My question is, how do these people get so good? Is it pure genius? Is it experience? Is it the ability to think really fast? How would you suggest I improve my skills? I would say I'm a competent programmer. I can eventually solve some of those questions.
Additionally, whenever I inspect the code of winners, I see a LOT of macros being used. This implies to me that they sort of have a template (like #define for loops to some abbreviated version) which they use to program faster. Does this make a significant difference?

The thing is, you're competing against people who've spent massive amounts of time mastering their skill to compete in these competitions. You're unlikely to catch up any time soon, but...
How do these people get so good?
Have the theoretical knowledge to solve the problems and practice, practice, practice.
Is it pure genius?
It can be, but practice can to a reasonable extent make up for it.
Is it experience?
Yes.
Is it the ability to think really fast?
Not really. Practice allows you to approach the problem correctly and skip insignificant details in the problem statement.
How would you suggest I improve my skills?
Get the theoretical knowledge and practice.
Do macros make a significant difference?
It may cut 10% off of your time, but probably not much more.

Statistically speaking, any programming competition with a large enough audience will attract super-talents who can churn out nice and elegant code at super-speed. It's like running the marathon. Running it in 4 hours is really good, even if the world record is around 2 hours. Don't worry about it.
Focus on code quality and elegance instead, instead of being able to churn out code at super-speed. Practise, have fun, and don't look too much at how fast other people are working.

Related

How to improve coding skills? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I can't say I'm weak in programming but I can't come up with the logic faster. I can analyse others code and get to know the logic. But I can't do it on my own. How can I improve my programming skills?
Quite a broad question but from my own, 30yr experience I can tell you there is no way around starting to
analyze existing code,
modify some things (play with it until it feels like it's your own code)
see what the changes do
develop your own ideas on how to do things faster/better/more beautiful
implement your ideas
see if it works
go on to more complex tasks
read books (very important, because many things can't just be discovered by trial'n'error)
be very passionate and determined about what you want to become reality
if you want to learn faster, then write more code
One very important item. You should have fun with what you do is always the best guarantee for success
If you fail at these items then I'm afraid you will never succeed with programming. But then maybe it's like any other field of knowledge.
I experience the same difficulties during my learning journey, too. When I complete challenge tasks I create more complex tasks for myself to see what I can do. It takes me to the next levels of solving problems.
Practice, Practice, Practice!

How can I come up with creating an algorithm which simulates a real time situation [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm good at algorithms but not as good as converting real-time problems and learning them throughly to make it as an algorithm. I would like to know if there is any book/paper that teaches or makes you demystify the situation and formulate it as an algorithm. (Its much like training your mental ability to break the situation and comeup with algorithm in a crisp.)
Showing some of the ways to approach these kinda problems. and any easy learning links/material would help me a lot.
Note: I know SO doesnt allow to ask for the opinion or something vague (I dont mind my Q being downgraded). But I am asking some concrete problem and hope can get some nice info from some of the great minds here.
The word that fits better as a direct answer is "experience". There exists no magical formula to convert a real time problem into some algorithms that solve it. As an analogy, there exist no predefined patterns on how to solve a mathematical problem. It is a mind's task to express the solution, based on some fundamental knowledge and on experience that is accumulated though constant learning.

Developer Skill Matrix: Useful or Harmful? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
In a big corp, they often ask developers to fill in a matrix of what skills they have at what level. It's generally seen as a bit of a pain but is it actually useful, or another way for bureaucrats to try and reduce developers to a bunch of numbers on a spreadsheet?
Skills matrix are only partially helpful, they are good at giving you a general picture of your current "experience".
However these skills matrix does not include the most important aspect, the ability to learn.
This is the most important skill in IT in my view. And everyone learns at different speeds.
Eg. Throwing guy A into a new technology stack, and how long before he/she is productive?
Since IT/software development is a very wide field I regard skill sheets as quite useful. I used to be a Linux expert and my skill sheet reflected that. Then I shifted into iOS/Mac development and my now-employer asked me to fill out a skill sheet tuned to Mac... and I immediately noticed that I was novice in this field back then ;-) Vice versa, they were able to see whether I can fit into the company and where (in which team).
So of course they can be harmful if you lack the skills, but I think they make choices for employers easier (and I regard a big skill sheet in my CV as the most important part of the CV, even more so than the list of projects done).
The usefulness is totally dependent on what is being assessed. I work in an insurance company and this was done for all staff here. There was no category that I fit into and all the criteria were irrelevant.
I can see the benefit of assessing relevant criteria, it can identify weaknesses and target training, but those criteria need to be defined by someone who knows what you might not know.
Most of all, don't berate the bureaucrat for simplifying a complex object into a manageable set of information. As a programmer that's what you should be doing every day.
I think it is appropiate on big corps, but for small and specialized consultancies I would make a personal interview.
In big corporations if you dont fit in one place you may fit in other... in small teams I rather do personal assessment .

Whats the importance of data structures and algorithms for programming? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Possible Duplicate:
Why should I learn algorithms?
Hello, I'm a curious beginner and I don't understand how algorithms and data structures are useful in programming. Are they crucial for being a good programmer? Why should I learn them and how they actually help me when writing code?
Thanks so much!
They help you write efficient code and solve problems in optimal or near-optimal ways. Without them, you will be reinventing the wheel - not always successfully.
Also, they help you structure your code, so that it can be maintained more easily by encouraging a better design / implementation.
Algorithms and data structures are the basic tools of a programmer. They are as essential as a hammer (or nail gun) to a house framer. They are the tools that solve problems so you don't have to reinvent the solution.
You should understand what they are, why and how they work, and what their shortcomings are. Knowing this will save you a huge amount of time that could be wasted trying to solve a problem that has a solution.
You can get by programming without being proficient in a particular language, but you cannot program without the knowledge of data structures. Data structures are more of a Computer Science obsession. Each problem will have its own ideal data structure that fits naturally to it and to manipualte the data in the structure you will need algorithms.

Should I focus on code quality while Rapid prototyping? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
When you are rapid prototyping for features should you really worry about code quality & optimization?.
Looking back at the number of times a "prototype" ended up becoming the product, the answer would be yes.
Don't forget that you are not only prototyping the feature, you are also prototyping the design.
Yes to quality. No to optimization. This question should be community wiki.
I would focus on clarity.
If quality and optimisation are requirements for the prototype then yes. If not, then no. Just because you are doing rapid prototyping you don't abandon standard operating procedures like programming to a specification, using source code control, testing, etc. It is, perhaps, relatively unusual for high performance to be a requirement for a rapidly developed prototype, but that's another matter.
Yes. Focus on quality, clarity and simplicity AND comments to explain what its doing and why (don't bother with the how, unless its really complicated, that is what the code is for).
Just about all work we do here starts out as a what if? And if it works we continue with it.
We write comments that describe what should happen, before we write the code, then write the code to match the comments. Writing the comments first forces you to think about how you will structure it all. We've found that it prevents a lot of FALSE assumptions and actually makes development faster.
It also makes reusing this when you come back to it so much easier - you don't need to read the code and understand it, just read the comments. Don't go for the nonesense of self-documenting code, all that does is self-document the bugs, you've got nothing to check to see if the code matches the comments/documentation at all.
You can worry about optimization later - see this description of a huge win I got by changing from MFC CMaps to STL when working on a hobby project parsing some Apache log files. This was done after I had the initial concept working and only when it became apparent there was a problem with performance.

Resources