Unknown_300000
Badges: 9
Rep:
?
#1
Report Thread starter 1 year ago
#1
What are the principles of computer programming?
0
reply
username4861258
Badges: 11
Rep:
?
#2
Report 1 year ago
#2
(Original post by Unknown_300000)
What are the principles of computer programming?
I'm not sure too much on what you mean but theres selection, sequence, iteration, if this is what you mean
1
reply
Unknown_300000
Badges: 9
Rep:
?
#3
Report Thread starter 1 year ago
#3
(Original post by 183022)
I'm not sure too much on what you mean but theres selection, sequence, iteration, if this is what you mean
I've done a bit of research and found things like "Keep It Simple Stupid" and all that. I am looking for stuff like this (keep it simple, etc) but I would like some examples to go with it. In addition, if you don't mind, could you please explain what selection, sequence and iteration mean? Please
0
reply
username4861258
Badges: 11
Rep:
?
#4
Report 1 year ago
#4
(Original post by Unknown_300000)
I've done a bit of research and found things like "Keep It Simple Stupid" and all that. I am looking for stuff like this (keep it simple, etc) but I would like some examples to go with it. In addition, if you don't mind, could you please explain what selection, sequence and iteration mean? Please
The KISS (keep it simple stupid) is just a saying used to recognise that code doesn't have to be really complicated or complex to get the job done, it can be applied to lots of situations both frontend and backend. I reccommend https://en.wikipedia.org/wiki/Minimalism_(computing)
or
https://simplicable.com/new/keep-it-simple-stupid
to resesarch this idea further and some others are also located there. One example could be a when coding, if you have to use lots of comments to tell others what a bit of code does, it could likely be written to be more simple. Of course that is not the case all of the time and comments should be made anyway but if you have to go in depth to explain you could try a different way.

As for the sequence selection interaction, this refers to the programming constructs that will be present in most or maybe all programs. Sequence is the act of reading the instructions or doing things in sequence like a=1, b=2, c=a+b returns (3) this is sequence as one thing happens after the others. Selections is like selecting the path you want the computer program to travel, eg( if else statements ). As for iteration, this is used to compute iterations of instructions eg( for loop)
0
reply
Unknown_300000
Badges: 9
Rep:
?
#5
Report Thread starter 1 year ago
#5
(Original post by 183022)
the kiss (keep it simple stupid) is just a saying used to recognise that code doesn't have to be really complicated or complex to get the job done, it can be applied to lots of situations both frontend and backend. I reccommend https://en.wikipedia.org/wiki/minimalism_(computing)
or
https://simplicable.com/new/keep-it-simple-stupid
to resesarch this idea further and some others are also located there. One example could be a when coding, if you have to use lots of comments to tell others what a bit of code does, it could likely be written to be more simple. Of course that is not the case all of the time and comments should be made anyway but if you have to go in depth to explain you could try a different way.

As for the sequence selection interaction, this refers to the programming constructs that will be present in most or maybe all programs. Sequence is the act of reading the instructions or doing things in sequence like a=1, b=2, c=a+b returns (3) this is sequence as one thing happens after the others. Selections is like selecting the path you want the computer program to travel, eg( if else statements ). As for iteration, this is used to compute iterations of instructions eg( for loop)
thank you so much!!!!!!!
0
reply
winterscoming
Badges: 19
Rep:
?
#6
Report 1 year ago
#6
(Original post by Unknown_300000)
I've done a bit of research and found things like "Keep It Simple Stupid" and all that. I am looking for stuff like this (keep it simple, etc) but I would like some examples to go with it. In addition, if you don't mind, could you please explain what selection, sequence and iteration mean? Please
How are your Computational Thinking skills? (i.e. how well are you able to 'how to think like a programmer'?) when it comes to analysing and solving problems? Computational thinking is generally the thing which people find most difficult with programming, and it's pretty fundamental to being able to write code in the sense that you need to be able to analyse and break down a problem before you'll really be able to write the code to solve it.

Try some of these videos which explain the concepts:

If you're already confident in solving problems algorithmically then there are a lot of principles related to design and structure of code which can act as useful guidelines, including "KISS" mentioned above. (But remember that ALL programming principles are merely advisory -- the most important thing about programming is that 'there are no rules' - whatever recommendations and principles you find, they are just guidelines and aren't to be followed dogmatically. The key to programming is to think and use your own judgement -- if something feels wrong or inappropriate to the code you're writing or the problem you're solving then it probably is...):

DRY (Don't Repeat Yourself) - https://en.wikipedia.org/wiki/Don%27t_repeat_yourself
YAGNI (You Aren't Gonna Need It) - https://en.wikipedia.org/wiki/You_ar..._gonna_need_it
GRASP Principles (OO Programming principles) - https://en.wikipedia.org/wiki/GRASP_...iented_design)
SOLID Principles (OO Programming principles) - https://en.wikipedia.org/wiki/SOLID

Don't worry too much if GRASP/SOLID principles go over your head a bit and feel very loose/abstract - they're the kinds of principles which are useful to consider when you begin writing 'Object Oriented' code (they are about ways of approaching class design so they don't really apply to Functional or Procedural code),

GRASP/SOLID principles will probably only really make sense when you're looking at larger and more complicated programs with thousands of lines of code. You'll probably know when you reach that point if you start to feel like your "OO" code is turning into a complicated and un-managable mess, when you do it'll be worth doing more research and digging deeper into those principles

('SOLID' may also surprise you if you end up learning the 'classic' way of thinking about OO from the 1990s because it provides an alternative way of looking at classes by dismissing some of the commonly-found advice about OO and classes which you'll find spread around the internet..).


Also, if you're looking to find some good general best-practice for how to become a better programmer, then this book (despite its age) has got tonnes of really good practical advice in it: https://www.amazon.co.uk/Code-Comple.../dp/0735619670
Last edited by winterscoming; 1 year ago
1
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Current uni students - are you thinking of dropping out of university?

Yes, I'm seriously considering dropping out (185)
14.17%
I'm not sure (59)
4.52%
No, I'm going to stick it out for now (382)
29.25%
I have already dropped out (37)
2.83%
I'm not a current university student (643)
49.23%

Watched Threads

View All