-
0
Question: What is the most complicated computer code?
- Keywords:
-
Kirsty Ross answered on 15 Feb 2024:
It depends on whether you are talking about complicated computer languages, or specific pieces of complicated code. Coding languages can vary in terms of how easy they are to learn.
https://techreviewer.co/blog/the-easiest-and-hardest-programming-languages-to-learn
Code can also vary massively in size, depending on what it is designed to do. For example, the number of lines of code in a programme can be meaningless. Some of those lines may be blank, to enable the programmer to more readily spot errors or make it easier to read. Some of those lines may be explaining the purpose of the code to a human, and won’t ever be read/implemented by the computer. Google has about 2 billion lines of code in it and high end cars can have 100 million.
https://interestingengineering.com/lists/whats-the-biggest-software-package-by-lines-of-code
However, computers are literal and will do what you tell them to do. A single ‘0’ in the wrong place can wreck things.
https://www.bbc.com/future/article/20160901-the-tiny-bits-of-code-that-can-wreck-computers
-
Cliff Williams answered on 16 Feb 2024:
I agree with Kirsty and would add just a few more points.
What may be complicated code to humans is really just a set of instructions to a computer. The instructions will simply run or through up an error.
As Kirsty explains computer are literal and will do EXACTLY what you ask them, however stupid it may be. This means that in practice most computer applications have the majority of their code written to deal with potential problems, or misinformation. If we didn’t put in all this additional ‘error handling’ code, then the applications would be for ever crashing. So, for many applications, it is the error handling code can be far more complicated that the solution it is trying to achieve.
Kirsty gave some very good examples of why the number of lines in a piece of code may not be an good indication of its complexity but there are others. One very powerful tool that computer programmers can make use of is recursion. Simply put recursion can be defined as a way of solving a computational problem by calling and solving a smaller version of the problem. In practice it often means calling a functions several times to solve the same function. Using recursion the number of lines needed to solve a complex problem can often be significantly reduced.
-
-
Barbara Shih answered on 18 Feb 2024:
If you meant code itself, it would be hard to judge – you can have a very complicted and badly written piece of code, or you can have well-written code that is relatively understandable but do very complicated tasks.
If you meant the coding language, I find the less information and examples there are, the harder it is to learn the language. The group of coding languages referred to as esoteric programming language would probbaly be the most complicated to learn, as they’re not designed for usability (and sometimes they are designed for exactly the opposite of usable).
-
Martin McCoustra answered on 19 Feb 2024:
I think I agree with the other scientists. It isn’t really about the complexity of the code but more about whether the code is correct. That’s why amending code like Windows without very careful thought can cause more problems than it cures.
-
Alexander De Bruin answered on 20 Feb 2024:
there’s several levels to answering this question. There are some languages that are hard to learn, but that’s quite subjective and some people may find learning any coding language easy or impossible! Even widely used languages like C++ are quite tricky to master. There are lots of intricate codes found in video games, as they’ve got to calculate physics and give the non-player characters some form of “artificial intelligence”.
The joke answer to this is that the most complicated code is somebody else’s! -
David McGonigle answered on 21 Feb 2024:
The specialists in this field have given great answers: as a non-specialist, but as a neuroscientist who has to deal with pieces of computer code that generate experiments, analyse data etc… I would say that the most complicated pieces of code, in any language, are those that are not well commented and presented.
Even someone like me can get a ‘gist’ of how code works if the writer has included enough comments – and also structured their code nicely so that it’s clear how the ‘path’ from input to output works. I have literally spent DAYS with other peoples’ code, trying to work out what the heck it’s trying to do… So Alexander’s answer is not so much of a joke, more like a quote:
‘Hell is other people’s code’…
Dave
-
Michael Schubert answered on 29 Feb 2024:
Code can be as simple or as complicated as it needs to be to do its job! Of course, you can also write code that is more complicated than it needs to be, just like you can write sentences that are more complicated than necessary. The best code is always as simple as possible (while doing its job) and well-annotated (which means that other people can look at your notes and understand why you’ve written the code the way you have).
Related Questions
What is AI?
what is data science how would it help me in the future
how do computers understand code if they aren't coded to do so?
How do you get computers to understand code?
What's the worst attack you've defended against?
what is big data analytics
What are some of the key skills or qualities that you believe are essential for success in the field of computer
do you know anything about computer cyber security
will ai take over the world
how long did it take to get used to AI algorithms
Latest Questions
-
How do you make new drugs
-
how many plants do you study normally?
-
what happens when a person whos sick gets a DNA while the person is sick what do you do
-
What are polysaccharides?
-
how many nuclear explosions happen in the world
-
how does your job effect your daily life ? (2 Comments)
-
why does nuclear waste glow in the dark? (1 Comment)
-
how to you deal with problems you come across when doing your research? (2 Comments)
-
If you have been emotionally invested (focusing on anxiety if you suffer with it, dementia etc) do you find it
-
what motivates you to carry out your research? (1 Comment)
Latest Comments
-
how does your job effect your daily life ? (2 comments)
-
why does nuclear waste glow in the dark? (1 comment)
-
what motivates you to carry out your research? (1 comment)
-
how to you deal with problems you come across when doing your research? (2 comments)
-
How long have you been a scientist for (2 comments)
Comments