Many articles have been provided for me to read over the years that have helped me learn more about development. This will be an attempt to help the community learn more about computers and how to program. This is not an attempt to replace any other articles already written on how to program. I have been in the industry for years and hopefully can communicate valuable information to those starting out. This might also give some basic knowledge to those who want to understand the basics, because as technology evolves our lives will be shaped by its influences, both good and bad.
What is a variable?
A variable is like a piece of paper. It is a place to store information. In computers we call this memory. For the purposes of this tutorial we will use variables like X and Y. Computers find answers and then store the information they find so they can make decisions based upon those answers in the future.
What is an instruction?
An instruction is similar to a command. It tells a computer one thing to do. Computers are great with Math. At the basic level we can instruct a computer to add, subtract, multiply, divide, make logic choices, and move information from one place to another. These are the basic building blocks of all programs.
Examples of instructions:
- 1+2
- If I tell a computer to add 1 and 2 then the computer will return the answer 3
- 10/2
- If I tell a computer to divide 10 by 2 then the computer will return the answer 5
- X = 4
- If I tell a computer X equals 4, then the computer will store the number 4 in the variable X
What is a program?
A program is a set of instructions. Not much different than a chore list. A program tells the computer what to do and in what order.
A basic program:
- X = 1+2 – The computer returns the answer 3 and stores it in the variable X
- Y = 2+3X – The computer reads the value of the X variable. From the previous instruction we know the variable is 3, so the equation is now 2+(3*3), which the computer reduces to 2+9, which the computer reduces to 11. Now that the computer has found that the answer to the equation is 11. The computer will store the number 11 in the Y variable.
This example program has computed the answer to an algebra equation.
How does a computer make logic choices?
Computers have several different logic operations. They have the ability to check that two variables equal. They have the ability to check if a variable is less than or greater than the other. Computers use this kind of logic to determine which path of instructions they should follow. A real world example of a human making a logic decision would be if laundry is done drying then take laundry out of dryer, if laundry has not finished drying leave clothes in dryer until dry.
Example:
- if (X equals 4) do X=X+1 otherwise do X=X-1
- this is a true or false check, X = 4 from the line above so the computer will solve X=X+1, thus X=4+1=5, if X equaled 1,2,3,5,6,7 etc then the computer would have computed X=X-1
A more complex view:
How computers actually move information around is built upon electricity. Electricity is like water. Electricity and water both move. Water moves through pipes and electricity moves through metal or other conductive material. Computers have the ability to divert electricity into different paths using transistors. Water could be diverted to different paths based upon how much pressure flows through a pipe or which gates are opened. There are other examples in nature that could create computers as well. Computer manufactures create transistors from the element silicon (sand is silicon). They stamp small gates that tell the electricity where it can flow and where it cannot. Using this method they create addition, subtraction, multiplication, division, logic operations and the ability to store that information. Storing information is like a light switch, in computer programming we call this binary which is a 0 or a 1. Using 0s and 1s larger numbers can be stored, and even text, pictures, music, and videos. As well as more instructions for a computer.
Security in Computers
Why is security so important?
Many systems initially are built with the idea can we do this, rather than how do we do this best. Building a house without locks and doors could let the wrong people into our house. Computers are much the same. Computers are used in healthcare, and control our basic utilities like water, electricity, and even when shipments of food are sent to markets. They also are used to design buildings and even allow us to listen to music online and talk with our friends. They have become a part of day to day life and if we don’t secure them correctly all of the above and more could be affected by anyone in the world.
Why is security so difficult to do right?
There are many governments in the world with various levels of understanding of computer systems and cyber warfare. There are also rogue organizations of people in our country as well as other countries that might be able to launch attacks or attempt to steal secrets or leverage individuals. Another issue is the verification problem – one person could not add in many lifetimes even close to the numbers 1 computer could add in one second. So we are dependent on other machines to be able to verify what we know is correct, these machines themselves could be insecure or compromised. Further there are billions of people in the world and many services and computers all communicating at different times in different ways.
This global network is constantly evolving and the complexity is such that no one person, and no one machine (that I know of) would be able to capture and effectively analyze all this information. That doesn’t stop some from trying though. Humans are imperfect, and they might not always secure systems effectively or have the time or ability to do so. Computers are also imperfect, many of us would like to believe they do everything exactly right, but that is not the case, service outages, bugs introduced into the system, and systems interacting in unexpected ways and as a part of the more complex global network can all cause problems. Like cars or any other piece of machinery it would be unwise to believe that they will work perfectly all the time. This does not mean they are not useful and can’t help us solve many complex problems. It just underscores how important cyber security is to our lives.
Imagine a system where a dam controls water to a city. There is a set of computers that control water flows from the gates to make sure enough water gets through to power the generator. Now imagine that someone or some entity causes the dam to stop turning and create enough water pressure that caused the dam to bust and water to destroy a city. It is understandable we would want to keep people with packages from walking up to the dam because they might be carrying a bomb. It is not always as easy to understand that compromising these network systems could create the same level of problem. Even scarier these days is that even if a system wasn’t previously connected to a network, it is possible to install satellite and cellular chips that are now more accessible to the general public. So networks that were previously protected by a firewall can be just walked around like the wall the French built in WWII.
Securing computer systems requires physical security, network security, great programming practices, secure systems where the programs are built, and other complexities such as encryption algorithms. Scaling factors and fault tolerance also can be an issue as botnets could bankrupt cloud based companies and overload their systems.
If securing computers is so complex why do we even try?
Computers make life more convenient in many ways and can help us analyze complex data such as detecting tumors and saving lives. In the movie Interstellar they make this point talking about MRI machines. Computers also allow us to generate creative content and socialize with our friends around the world. They give us access to information and libraries that were previously not accessible to certain parts of the world. Insuring that we get that information in a secure way and they are not controlled by bad actors is paramount to their successful use. One of the things to remember about computers is there is no 100% secure system. We should all be careful about what information we share outside of our brains, and I am not sure even that might not be accessible in the near future, if not already.
Security is like the medical practice, just because we know bacteria could get on sterilized equipment in a certain small percentage of cases, we should still sterilize the equipment so we are optimizing the probability that something bad does not happen. Now imagine doctors trying to make sure their equipment is sterilized when a global network of people can mess with their office, where their files are, what times appointments are etc. We can make good security choices in isolation such as using a card reader to control access to a hospital. Making choices with many other factors becomes much more difficult.
Security can also slow down productivity, if someone is dealing with national security, time they are taking to deal with security systems could waste time if not implemented effectively. The benefit to securing a system has to outweigh the time it takes to follow the best practices of the system. Even as I type this there is no guarantee this will get to other users in the current form I have created it. Others could modify the words and the information and could build mistrust, or try to get people to trust systems they should not. This is why there are digital signing algorithms, a healthy mistrust of those is important as well, we should use them, rely upon that, but realize they might have been compromised.
Yet how in society do we have bridges that are built correctly and generally get through life for years? We have others that are vigilant and fighting this battle, and possibly those that prefer to leverage us will only do so when it benefits them. Important to remember that the potential for being leveraged is high by both good and bad actors so being careful of what information is communicated on these systems can possibly save a lot of heartache. Further it is important to remember that even though we might not be directly sending this information, others could be recording our conversation or taking our information and misusing it. Others can take compromising pictures or leak classified documents and share them on Facebook without our permission which can damage reputations and have much greater consequences. Sometimes the people doing this don’t have a valid grasp of social impact and the retributive damage it can do to their own lives. Sometimes they could just be drunk frat guys that thought something was funny at the time – not trying to excuse this behavior, just hind sight is 20/20. Not quite
Important also to remember that computers are just one tool in an arsenal of many. So they might not make the best judges, understanding mercy and being able to look at many factors might not be best left to statistics. It would be easy to think that just because it is 99% likely that they are guilty that their case shouldn’t be reconsidered. If those systems were insecure or leveraged at the time then they might not have made perfect judgements. Also important to remember judges are imperfect and might not have all the information as well. A healthy mistrust of all technology systems is important. Just like walking across the street there is a probability I might get hurt. Doesn’t mean I shouldn’t ever walk across the street, I just should do so in the safest way possible.
Be careful of any online addiction, it is simple to be lulled into a false sense of security. They can also be leveraged in ways you didn’t think were possible. I was watching a lecture by Former U.S. Secretary of the Treasury Timothy F. Geithner and Professor Andrew Metrick on the global financial crisis from Standford on Coursera. They talked about the problem being “A failure of imagination”. To be clear this is not from a position of judgement, just trying to save some others from experiencing pain like I have in my life.
———————–
I can’t say this is the perfect way to communicate this to every person out there, I think if I had read this and taken heed of its information I could have saved myself some problems and regrets in life.