Hi all,
Am new to programming, can anybody give me guidelines how to improve the logical thinking.. Right now i learnt all the syntax(c#),now am practising simple examples like sum of n numbers,fibonacci series,,
But me failure to get the logical think behind the code, so pls give me some guidelines.
Dear moderator, i am in confusion where to post this so only i made this post here, if this is not right means.. tell me the right link to post..
Thanks
This is probably more of a general developer like question
Anyway before moving on and creating large applications, make some simple applications like a calculator or a simple text editor. As for understanding code read some tutorials.
Anyway maybe look at examples and try figure things out. Like:
A <- 6
B <- 6
FOR COUNT 1 to 3
A <- A - COUNT
B <- B +A
OUTPUT A,B
That is an example of code in a NS-Diagram that my teacher gives the class often. No IDE to work it out has to be done on paper. Once you get the handle of that it is easy
Thank u for the tips... tell how the answer will come as A=0,B= 14..
i Worked it and got the ANSWER AS A=3,B=18..
Also give more examples like this,its interesting
Visual Studio.net 2010
If this post is useful, rate it
Thank u...
i think u know well what mistake i did while solving...
can u give me more examples...or else give me some small samples which will give more work to brain.
send as a PM too..
Am refering the website which u told me to see.. its nice,
Visual Studio.net 2010
If this post is useful, rate it
To think logical you need to break everything down into simple basic steps. Everyone can do programming if they could tap into their logical thinking.
Take any manual task and write the steps to do it in as much detail as you can.
For example, opening/drinking a beer.
1. Think to self, "Do I have any beer in my fridge?
2. If no GoTo store and buy (simplified here because im tired). Once obtained goto step 8
3. If yes then GoTo fridge.
4. Open fridge door by extending out had, grasping handle, and pulling on it until it opend, then stop pulling
5. Use eyes to look around in fridge for subject of desire - beer.
6. Once beer is located, use other hand (as first hand is holding door open) and extend out had to location of beer, grasp on to it, lift and retract towards self.
7. Once beer is obtained use other hand and close door.
8. Return to your place of rest.
9. Use hand and twist off beer top (assums twist off top type).
10. Raise beero to mouth.
11. place beer bottle in nouth comfortably.
12. Tilt beer bottle upward so refreshing fluid inside will pour into ones mouth.
13. Drink beer down in a guzzle of furybecause you are so stressed from programming.
14. return beer bottle back down and close mouth.
15. Repeat steps 9-14 until Beer = Null.
Now the same is done with coding.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
An obscure body in the SK system. The inhabitants call it Earth
Posts
7,957
Re: Logical thinking
Vijy, is Mensa active in India? If so, join (it's nowhere near as hard to get in as members like to think ). They'll cheerfully send you a constant stream of logic problems to solve. In fact, you don't really need to be a member, they're happy to send alot stuff out to anyone. Here's a link to a site where you can subscribe to their puzzles lists.
edit> Robdog, Could you write me an algorithm for decent wine, please? I'm planning on taking my alcoholism up-market.
The best argument against democracy is a five minute conversation with the average voter - Winston Churchill
Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd
Funky, only through solving maths is the way of thinnkin logically?
Let me try....
thank u, yes mensa available..
i will join,
Wat do u meant by decent wine?
Shall i try for this algorithm?
Tell the requirement clearly once again?
Visual Studio.net 2010
If this post is useful, rate it
Try to see what is meant by locically thinking. Its more of a scientific approach to performing some task. Doesnt matter what it is, just try to perform it scientifically not emotionally.
"I am really really thirsty. I want a beer. I think I will get and drink a beer."
Do more granular analysis of the task/problem.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Logical thinking can only get you so far, too. One of the other things you should consider whenever you are designing a program is how you want to interact with the program. For most users, the interface IS the program, and what happens behind the scenes is relatively unimportant. Therefore, spending considerable thought thinking about how you would like to perform a task can really pay off in ease of use and friendliness of the interface, and none of that is necessarily logical. For instance, many people have tried to replace the mouse with various other things, yet mice are still on every desktop (mine's embalmed, but that's another story). Look at the things you do to perform a certain task on the computer, and consider how it could be made better, faster, etc. Good interface is a good start.
And now on the more flippant side: Some tasks don't bear much thinking about. I was once working on a chess program, unitl I realized that the rules to win a King-Rook endgame are unlike the rules that would guide any other decision in the game. Some of that happens in life. Never stop to consider your own tongue, or the very implausibility of it may cause you great harm. Eating is something like a video game for tongues where two great blades are crashing down in a roughly predictable order, and you are dancing around between them trying to synchronize your motion with the blades.
The point being: Not all things bear rational thought. Sometimes you have to take a guess at how something should work, and give it a try. I bit the hell out of my tongue the other day.
Thanks a lot to all,to share there views.
I will analysis the problem given by robdog..
i too got some ideas from shaggy.. Analysing the problem is must...
Visual Studio.net 2010
If this post is useful, rate it