17
14

Possible Duplicates:
What is the single most effective thing you did to improve your programming skills?
How to improve problem solving skills?

solve puzzles ? Solve programming problems ? what else ?

Someone told me that I need begin with solving typical programs in C like those of factorial, recursion etc to improve logical thinking skills. What else do I do ? How do i go about it ?

I am a beginner to programming.

edit|reopen|undelete|flag

4
 
Practice makes perfect. Well, perfect practice makes perfect. – Carl Norum May 10 at 17:59
 
 
I think you can't improve your logical thinking skills. That's something you are or are not born with. – Pavel Shved May 10 at 18:23
2
 
@Pavel, I'd say that's only partially true. You may not be able to improve your ability to think logically, but with practice you should be able to improve your tendency to apply logical thinking to things. It's the same as anything, the more you use it, the easier it gets to use. I've found my brain definitely gets "out of shape" if I don't exercise it. – tloflin May 10 at 18:48
4
 
I disagree with Pavel, but my lack of logical thinking skills is preventing me (temporarily) from coming up with an elaborate proof of my conjecture, or counter-example to his hypothesis. – Warren P May 10 at 18:51
 
 

closed as exact duplicate by gnovice, Marc Gravell? May 11 at 5:29

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question.

deleted by John Saunders, Robert Harvey, Roger Pate yesterday

11
  • Programming/Math practice: http://projecteuler.net/
  • Puzzles are all over the place, but I love http://perplexcity.com/, though you have to buy the cards.
  • Search around for "engineering interview questions" and start tackling them.
  • FIND A PERSONAL PROJECT. Write a game, website, library, anything. The best way to get better at this stuff is to make it your passion. You won't be able to engineer your brain to want to be an engineer.
link|edit|flag
deleted yesterday
10

I think it would be a mistake to restrict the "logical and analytical thinking skills" that make "an awesome programmer" to logical puzzles and math problems. Sure math and logical skills are important, but analytical thinking and great programming entails much more than that. Great programmers are creative people with an insatiable curiosity. Creativity and curiosity are cultivated when programming is contextualized in a historical and philosophical framework.

Here are my suggestions on how to do this:

  1. Read Hofstadter's Godel Escher Bach. The book gives a great sense of the philosophical questions and meta-questions that are fundamental to the fields of computer science, information technology and programming. Hofstadter also does a great job of bringing concepts to life with examples from literature, music and art.

  2. Get a sense of the history of information technology. This is important to understand the significance of the generation that we are working in today and to anticipate the future of the field. Read up on Moore's law and its many corollaries. How can this exponential growth be explained? Why is it that the field of information technology has been blessed with exponential growth whereas other technological fields such as husbandry have not? Once you've explained the exponential growth, how long will this growth carry on for? What will the near future look like if these trends continue?

  3. Understand design patterns. Don't just be able to do object oriented programming but make sure you understand its methodological and historical importance as a breakthrough programming methodology. Make sure you can appreciate the elegance of the different design patterns. Try to invent your own design pattern. Determine on your own what types of projects would be best suited for a given design pattern.

  4. Why is parallel processing such an important breakthrough in computer science? What will the next breakthrough be?

  5. Try to tackle the biggest and best algorithmic problems in computing today. Start designing your very own natural language programming language or a machine that can pass the turing test.

  6. Master the art of outlining and detailing software development projects. Invent new and betters ways to do this.

  7. Understand why the waterfall method of software development fails so often and why agile methods are a major improvement. Invent your own programming methodology.

  8. Understand the P versus NP problem of computer science (a millennium problem) to the best of your ability. Whenever you have spare second in an elevator or before you go to sleep at night you should be working on that problem trying solving it. Is it or is it not theoretically possible to solve the seemingly endless amount of important NP-hard problems out there? Can the human mind solve these problems? What is the computational analog for human creativity and intellectual insight?

  9. Make new questions to think about and add them to this list.

link|edit|flag
deleted yesterday
1
 
Potential addition to your point #3: "How can you design a language so that a given pattern is irrelevant?" – dss539 May 10 at 19:06
4
 
+1 for the verbose answer. – Kasturi May 10 at 20:52
5

I voted for the Code Kata answer which I think is awesome, but even more generally--

NOTHING will help more than re-writing your code over and over again. Even at work, take the time to make 2 or 3 passes through all your code.
If you are having a lot of trouble with some code you wrote, toss it all and re-write it. Make a lifetime habit of rewriting code. (Don't worry about speed either, just rewrite it until it works smoothly and you're comfortable with the implementation).

Always take time to craft your code. Your ultimate goal is DRY. This doesn't mean don't write the same code twice, it means you don't have the same logic in two places in your code EVER. Even code like this:

String name;
String age;

JTextArea aName=new JTextArea();
JTextArea aAge=new JTextArea();

frame
.add(aName);
frame
.add(aAge);

...

should drive you ABSOLUTELY NUTS. Look at the pattern in your code. ABSTRACT that crap out--refactor it until you have only one place that instantiates text area, one place that copies a value into the text area and one place that removes it and stores it.

Always look for patterns like this and try to figure out ways to eliminate them. It's likely that you will have to go to reflection--you will certainly need meta-data. Get comfortable with the idea.

Write it the way you might normally do it (the way I just did), make it work, then start refactoring with a working, tested model. I've removed 4/5 to 9/10 of files like this and changed them into simple data-driven systems where it's much harder for a bug to slip in (almost impossible since each path is so well-tested, it's used repeatedly for every run!

Honestly nothing has made as big a difference in my career as my resistance to duplicate code.

link|edit|flag
deleted yesterday
 
 
excellent answer – dss539 May 10 at 19:02
3

Personally i learned a lot from Knuth's The Art of Computer Programming

link|edit|flag
deleted yesterday