Turn on thread page Beta
    • Thread Starter
    Offline

    2
    ReputationRep:
    finding it difficult with programming
    Posted on the TSR App. Download from Apple or Google Play
    Offline

    18
    ReputationRep:
    Most people don't find programming easy when they first start - often the types of people who seem to find it "easy" on any course are the people who have done it before and maybe taught themselves at home or some other course before, so don't worry that you find it difficult; that's to be expected for anybody learning to program for the first time, you'll certainly not be the only one

    There's really only one way to not struggle with it, and that's to keep on persisting with it, and practice until it starts to make sense.

    The are usually two hurdles to overcome when first learning to program - firstly, there's the ability to understand the basic syntax of the language you're learning, including its "grammatical" structure, its keywords, and the usage of various symbols. Beyond that is switching your mind to learn how to "think" computationally. That means learning to look at problems in such a way that a computer can solve, particularly looking at problems from the perspective of conditional branching (for example - if/else or switch-case) and repetition (such as for, while, foreach). The only way to overcome either of these learning hurdles is to keep applying yourself to programming problems and trying exercises for yourself.

    Whenever you have a problem to solve which looks too big or too complicated, then take a step back and stop trying to solve everything at once. The way to solve most programming problems is Divide-And-Conquer. That means you want to start out by reading/analysing it slowly (even read it multiple times) and identify tiny pieces of the problem which you can solve on their own, then attempt each of those tiny sub-problems one-by-one.

    Whenever you're writing code, always re-run your program each time you make a small change - don't write a lot of code all in one go and hope that it works; the more code you write between each attempt at running the program, the harder it will be to see where you've gone wrong if there are any problems.

    If you're using a language like Python, Java or JavaScript to learn to program, then a good place to go for some extra programming practice is codecademy - https://www.codecademy.com/ - you can get a lot of extra practice by working through the lessons in those; by the time you reach the end, the language itself should start to feel more familiar, and you may feel more confident looking at problems using a computational/programmer mindset - taking a big problem and breaking it down into smaller ones, and thinking about the small, logical steps needed to solve that problem in computational terms.

    If you ever find yourself facing compiler errors, (or interpreter errors), or if you're just struggling to remember how to do something simple (e.g. how to read input from the user), make sure you use google. You learn by making mistakes, by finding answers to those mistakes, by looking at other peoples' examples related to the problem you're having to understand how and why they work, and by reading documentation/tutorials, then trying those examples for yourself to see how they work and tinker with those examples by yourself.

    At every step along the way, you'll likely find that things "just work" when you're not quite sure why. You'll often make assumptions about your code, or about the language, and the tools you're using, and you may find out that those assumptions are slightly off, but the key to greater understanding is to check all of those assumptions and find out whether your understanding is right, or to go looking for answers when they're wrong.

    Lastly, if you're writing code on your own computer, make sure you learn how to use the debugger in whichever tools you're using (for example, in Python using IDLE, or in Java using IntelliJ). A debugger is a quick and simple tool to learn, but allows you to "pause" or "step through" the execution of your program, in case something in that program isn't working properly - at which point you can inspect the variables and the flow of your program, to make sure that what it's actually doing matches what you expected it to do; if that doesn't match, then being able to see it in a debugger can often help you quickly recognise the problem.

    Good luck!
    • Thread Starter
    Offline

    2
    ReputationRep:
    thanks
    Posted on the TSR App. Download from Apple or Google Play
 
 
 
Reply
Submit reply
Turn on thread page Beta
Updated: March 4, 2018
The home of Results and Clearing

4,439

people online now

1,567,000

students helped last year

University open days

  1. Bournemouth University
    Clearing Open Day Undergraduate
    Fri, 17 Aug '18
  2. University of Bolton
    Undergraduate Open Day Undergraduate
    Fri, 17 Aug '18
  3. Bishop Grosseteste University
    All Courses Undergraduate
    Fri, 17 Aug '18
Poll
A-level students - how do you feel about your results?

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.