Chapter 1 - Computers People and Programming¶
1. What is software?¶
Sofware runs on hardware and is a collection of code instructions that are intended to solve a problem. For example to develop a self driving car it requires computers with running software programs that process sensor data and output actuator commands. This is achieved through algorithms programmed in software programs which are executed on the hardware.
2. Why is software important?¶
It helps to solve a variety of real world problems. Software is used by people every day which makes their hardware devices useful. It is the software that enables us to talk over the phone or write emails on our computers and send them via servers that run themselfes software to route the packages.
Software is important to help develop products that make our lifes easier in the best case.
3. Where is software important?¶
Software is important in the design and construction of machines. The produced machines run themselfes software which controls them. Software programs are programmed to process data and find useful information in this data. Software is important for monitoring, such as the heart rate of a human.
4. What could go wrong if some software fails? List some examples.¶
Errors in software can injure people or lead to death. Other errors are costly due to damaged or lost hardware such as mars rovers. For example a failure in the flight control system of airplanes flying towards each other can cause a crash. Failures in the software of monitoring devices or implanted heart rate devices can lead to peoples death.
If a bug leads to a server outage that might be used by many people can lead to a financial loss.
5. Where does software play an important role? List some examples.¶
Most computers work out of our sight and are part of the systems that keep our civilization going. Some fill rooms; others are smaller than a small coin. Many of the most interesting computers don’t directly interact with a human through a keyboard, mouse, or similar gadget.
Software is important in all kinds of fields:
7. What’s the difference between computer science and programming?¶
Programming is one of the fundamental topics that underlie everything in computer-related fields, and it has a natural place in a balanced course of computer science.
Computer since is a study or science that describes theories such as program algorithms and data structures. Programming is a tool; it is a fundamental tool for expressing solutions to fundamental and practical problems so that they can be tested, improved through experiment, and used. Programming is where ideas and theories meet reality. This is where computer science can become an experimental discipline, rather than pure theory, and impact the world. In this context, as in many others, it is essential that programming is an expression of well-tried practices as well as the theories.
A 1995 U.S. government “blue book” defines computer science like this: “The systematic study of computing systems and computation. The body of knowledge resulting from this discipline contains theories for understanding computing systems and methods; design methodology, algorithms, and tools; methods for the testing of concepts; methods of analysis and verification; and knowledge representation and implementation.”
Wikipedia defines it as: “Computer science, or computing science, is the study of the theoretical foundations of information and computa- tion and their implementation and application in computer systems. Computer science has many sub-fields; some emphasize the computation of specific results (such as computer graphics), while others (such as computational complexity theory) relate to properties of computational problems. Still others focus on the challenges in implementing computations. For example, programming language theory studies approaches to describing computations, while computer programming applies specific programming languages to solve specific computational problems.”
8. Where in the design, construction, and use of a ship is software used?¶
- Design: A ship or engine is desigined with the help of computer software creating, architectural and engineering drawings, general calculations, visualization of spaces and parts, and simulations of the performance of parts.
- Construction: A modern shipyard is heavily computerized. The assembly of a ship is carefully planned using computers, and the work is guided by computers. Welding is done by robots. In particular, a modern double-hulled tanker couldn’t be built without little welding robots to do the welding from within the space between the hulls. There just isn’t room for a human in there. Cutting steel plates for a ship was one of the world’s first CAD/CAM (computer-aided design and computer-aided manufacture) applications.
- The engine: The engine has electronic fuel injection and is controlled by a few dozen computers. For a 100,000-horsepower engine, that’s a nontrivial task. For example, the engine management computers continuously adjust fuel mix to minimize the pollution that would result from a badly tuned engine. Many of the pumps associated with the engine (and other parts of the ship) are themselves computerized.
- Management: Ships sail where there is cargo to pick up and to deliver. The scheduling of fleets of ships is a continuing process (computerized, of course) so that routings change with the weather, with supply and demand, and with space and loading capacity of harbors. There are even websites where you can watch the position of major merchant vessels at any time.
- Monitoring: An oceangoing ship is largely autonomous; that is, its crew can handle most contingencies likely to arise before the next port. However, they are also part of a globe-spanning network. The crew has access to reasonably accurate weather information (from and through — computerized — satellites). They have a GPS (global positioning system) and computer-controlled and computer-enhanced radar. If the crew needs a rest, most systems (including the engine, radar, etc.) can be monitored (via satellite) from a shipping-line control room. If anything unusual is spotted, or if the connection “back home” is broken, the crew is notified.
9. What is a server farm?¶
A “server farm” is a collection of computers providing web services. Every major company runs programs on the web to interact with its users/customers. Examples are Amazon (book and other sales), and eBay (online auctions). Millions of companies, organizations, and individuals also have a presence on the web, which is hosted in a server farm. Google uses its erver farm to provide people with answers to their search queries. This kind of computer use is often referred to as information processing. It focuses on data — often lots of data.
10. What kinds of queries do you ask online? List some.¶
- C++ programming questions, such as C++11 features.
- Weather queris for my current location.
- Home automation and robotics questions that interest me.
- News queries
11. What are some uses of software in science? List some.¶
Research — science itself — relies heavily on computers. The telescopes that probe the secrets of distant stars could not be designed, built, or operated without computers, and the masses of data they produce couldn’t be analyzed and understood without computers. An individual biology field researcher may not be heavily computerized (unless, of course, a camera, a digital tape recorder, a telephone, etc. are used), but back in the lab, the data has to be stored, analyzed, checked against computer models, and communicated to fellow scientists. Modern chemistry and biology — including medical research — use computers to an extent undreamed of a few years ago and still unimagined by most people. The human genome was sequenced by computers. Or — let’s be precise — the human genome was sequenced by humans using computers. In all of these examples, we see computers as something that enables us to do something we would have had a harder time doing without computers.
12. What are some uses of software in medicine? List some.¶
CAT (computed axial tomography) scanner and operating theater for computer-aided surgery (also called “robot-assisted surgery” or “robotic surgery”). The scanners basi- cally are computers; the pulses they send out are controlled by a computer, and the readings of the relevant body part are converted to (three-dimensional) images by quite sophisticated algorithms. For computer-aided surgery a wide variety of imaging techniques are used to let the surgeon see the inside of the patient. With the aid of a computer a surgeon can use tools that are too fine for a human hand to hold or in a place where a human hand could not reach without unnecessary cutting. The computer can also help steady the surgeon’s “hand” to allow for more delicate work than would otherwise be possible. Finally, a “robotic” system can be operated remotely, thus making it possible for a doctor to help someone remotely (over the internet).
Instant access to patient records. Knowing the medical history of a patient (earlier illnesses, medicines tried earlier, allergies, hereditary problems, general health, current medication, etc.) simplifies the problem of diagnosis and minimizes the chance of mistakes.
13. What are some uses of software in entertainment? List some.¶
Hollywood and Pixar use software for 3D animations. MP3 players and phones are small computers that run software that can be used to play music and watch videos.
14. What general properties do we expect from good software?¶
What do we want from our programs? What do we want in general, as opposed to a particular feature of a particular program? We want correctness and as part of that, reliability. If the program doesn’t do what it is supposed to do, and do so in a way so that we can rely on it, it is at best a serious nuisance, at worst a danger. We want it to be well designed so that it addresses a real need well. We also want it to be affordablei. Our code must be maintainable; that is, its structure must be such that someone who didn’t write it can understand it and make changes. A successful program “lives” for a long time (often for decades) and will be changed again and again. For example, it will be moved to new hardware, it will have new features added, it will be modified to use new I/O facilities (screens, video, sound), to interact using new natural languages, etc. Only a failed program will never be modified. To be maintainable, a program must be simple relative to its requirements, and the code must directly represent the ideas expressed.
15. What does a software developer look like?¶
Hollywood and similar “popular culture” sources of disinformation have assigned largely negative images to programmers. For example, we have all seen the solitary, fat, ugly nerd with no social skills who is obsessed with video games and breaking into other people’s computers.
There creation of a successful piece of software, computerized gadget, or system involves dozens, hundreds, or thousands of people performing a bewildering set of roles: for example, programmers, (program) designers, testers, animators, focus group managers, experimental psychologists, user interface designers, analysts, system administrators, customer relations people, sound engineers, project managers, quality engineers, statisticians, hardware interface engineers, requirements engineers, safety officers, mathematicians, sales support personnel, troubleshooters, network designers, methodologists, software tools managers, software librarians, etc. The range of roles is huge and made even more bewildering by the titles varying from organization to organization: one organization’s “engineer” may be another organization’s “programmer” and yet another organization’s “developer,” “member of technical staff,” or “architect.”
The myth of a programmer being isolated is just that: a myth. People who like to work on their own choose areas of work where that is most feasible and usually complain bitterly about the number of “interruptions” and meetings. People who prefer to interact with other people have an easier time because modern software development is a team activity. The implication is that social and communication skills are essential and valued far more than the stereotypes indicate. On a short list of highly desirable skills for a programmer (however you realistically define programmer), you find the ability to communicate well — with people from a wide variety of backgrounds — informally, in meetings, in writing, and in formal presentations.
16. What are the stages of software development?¶
We can describe the process of developing a program as having four stages:
- Analysis: What’s the problem? What does the user want? What does the user need? What can the user afford? What kind of reliability do we need?
- Design: How do we solve the problem? What should be the overall structure of the system? Which parts does it consist of? How do those parts communicate with each other? How does the system communicate with its users?
- Programming: Express the solution to the problem (the design) in code. Write the code in a way that meets all constraints (time, space, money, reliability, and so on). Make sure that the code is correct and maintainable.
- Testing: Make sure the system works correctly under all circumstances required by systematically trying it out.
Programming plus testing is often called implementation.
17. Why can software development be difficult? List some reasons.¶
Programming itself is more or less simple. The difficult part about software development is problem solving. Solving difficult problems requires the steps described in the prvious question. In the analysis of the problem things can go wrong such as misunderstanding of what the user exactly wants. Designing a program can be difficult because of a chosen design that works for simple tasks but has to be adapted to work more generically. Bugs that are introduced while programming are sometimes difficult to spot and can lead to unfulfilled constraints (time, space, money, reliability, etc.). A software program that is not tested will be difficult to debug if it consists of a large code base. Other difficulties with testing are forgotten tests that would’ve solved a unseen bug. Writing useful tests is difficult and takes time to master.
“Programming is understanding”: when you can program a task, you understand it. Conversely, when you under- stand a task thoroughly, you can write a program to do it. In other words, we can see programming as part of an effort to thoroughly understand a topic. A program is a precise representation of our understanding of a topic.
Information processing, such as providing answers to (Google) search queries, leads to challenges in the organization and transmission of data and lots of interesting work on how to present vast amounts of data in a comprehensible form: “user interface” is a very important aspect of handling data.
18. What are some uses of software that make your life easier?¶
Our civilization runs on software. Improving software and finding new uses for software are two of the ways an individual can help improve the lives of many. Programming plays an essential role in that. There are multiple computers that run software in my car which help me find my goal, stay in the lane when I press the gas pedal too much or brake too hard. Google’s servers provide me with the answers I search for and guide me to the web server that has the information I requested. My phone helps me to stay connected with my girlfriend, family and friends.
19. What are some uses of software that make your life more difficult?¶
- Technology has created a digital divide between generations. Seniors did not have our technology in their time, which makes it harder for them to learn how to use it now and be able to take advantage of it. And even if they do have computer access, most don’t know how to use it properly. It has also created a digital divide between developed countries, making undeveloped countries who do not have access to technology poorer.
- Today it is easier than ever to be a victim of identity theft. The internet has made it easier for anyone to meet strangers online, who can trick people into releasing their personal information. This is why so many people are getting their computers hacked and their identity stolen.
- Personal communication is suffering and social skills are decreasing because people are opting to communicate through things like Facebook, Twitter and texting instead of personally interacting with each other. Communicating through social media is hurting relationships because it can cause misunderstandings with unintended consequences. Since everything online is usually typed, people often misinterpret things, causing fallouts in friendships.
- We are spending more money because we often want to have the best and latest technology, which we don?t actually need.
One of the ideals (correcteness, reliability, well designed, affordable, maintainable) a programmer should aim for when creating a program.
One of the four stages (analysis, design, programming, testing) to develop a program. What’s the problem? What does the user want? What does the user need? What can the user afford? What kind of reliability do we need?
We learn from experience and modify our behavior based on what we learn. That’s essential for effective software development. For any large project, we don’t know everything there is to know about the problem and its solution before we start. We can try out ideas and get feedback by programming, but in the earlier stages of development it is easier (and faster) to get feedback by writing down design ideas, trying out those design ideas, and using scenarios on friends. The best design tool we know of is a blackboard (use a whiteboard instead if you prefer chemical smells over chalk dust). Never design alone if you can avoid it! Don’t start coding before you have tried out your ideas by explaining them to someone. Discuss designs and programming techniques with friends, colleagues, potential users, and so on before you head for the keyboard. It is amazing how much you can learn from simply trying to articulate an idea. After all, a program is nothing more than an expression (in code) of some ideas.
computer-aided design and computer-aided manufacture is the use of software to control machine tools and related ones in the manufacturing of workpieces. Wikipedia.
(from Latin communicare, meaning “to share”) is the act of conveying meanings from one entity or group to another through the use of mutually understood signs, symbols, and semiotic rules. Wikipedia. It is important for a programmer to intreact with other people to develop high quality software.
In theoretical computer science, correctness of an algorithm is asserted when it is said that the algorithm is correct with respect to a specification. Functional correctness refers to the input-output behavior of the algorithm (i.e., for each input it produces the expected output). Wikipedia)
For example someone who buys a piece of software or hardware that runs software.
Software programs are designed using best practices such as design patterns. One of the four stages (analysis, design, programming, testing) of developing a program. How do we solve the problem? What should be the overall struc- ture of the system? Which parts does it consist of? How do those parts communicate with each other? How does the system communicate with its users?
some sort of information that can be used to act upon. Feedback is achieved through testing a piece of software. Another application in control theory is to use the output as feedback to compare it against the desired output.
Graphical User Interface are used to interact with the user. Frameworks help you to develop GUIs, such as Qt.
Goals a programmer should strive for when developing a program. We want correctness and as part of that, reliability. If the program doesn’t do what it is supposed to do, and do so in a way so that we can rely on it, it is at best a serious nuisance, at worst a danger. We want it to be well designed so that it addresses a real need well; it doesn’t really matter that a program is correct if what it does is irrelevant to us or if it correctly does something in a way that annoys us. We also want it to be affordable; our code must be maintainable; that is, its struc- ture must be such that someone who didn’t write it can understand it and make changes. A successful program “lives” for a long time (often for decades) and will be changed again and again.
Programming plus testing is often called implementation. Obviously, this simple split of software development into four parts is a simplification. Thick books have been written on each of these four topics and more books still about how they relate to each other. One important thing to note is that these stages of development are not independent and do not occur strictly in sequence. We typically start with analysis, but feedback from testing can help improve the programming; problems with getting the program working may indicate a problem with the design; and working with the design may suggest aspects of the problem that hitherto had been overlooked in the analysis. Actually using the system typically exposes weaknesses of the analysis.
someone who develops programs; programmers, (program) designers, testers, animators, focus group managers, experimental psychologists, user interface designers, analysts, system administrators, customer relations people, sound engineers, project managers, quality engineers, statisticians, hardware interface engineers, requirements engineers, safety officers, mathematicians, sales support personnel, troubleshooters, network designers, methodologists, software tools managers, software librarians, etc.
One of the four stages (analysis, design, programming, testing) of developing a program. Express the solution to the problem (the design) in code. Write the code in a way that meets all constraints (time, space, money, reliability, and so on). Make sure that the code is correct and maintainable.
Runs on hardware to solve a specific problem or provide a service. Software is programming using a programming languauge and translated into machine code to be executed on a hardware. Good software is invisible. You can’t see it, feel it, weigh it, or knock on it. Software is a collection of programs running on some computer. Sometimes, we can see the computer. Often, we can see only something that contains the computer, such as a telephone, a camera, a bread maker, a car, or a wind turbine. We can see what that software does. We can be annoyed or hurt if it doesn’t do what it is supposed to do. We can be annoyed or hurt if what it is supposed to do doesn’t suit our needs.
In social psychology, a stereotype is an over-generalized belief about a particular category of people. Stereotypes are generalized because one assumes that the stereotype is true for each individual person in the category. While such generalizations may be useful when making quick decisions, they may be erroneous when applied to particular individuals. Stereotypes encourage prejudice and may arise for a number of reasons. Wikipedia
One of the four stages (analysis, design, programming, testing) of developing a program. Make sure the system works correctly under all circumstances required by systematically trying it out. Testing with unit tests that compare the output result of a program to an expected result.
Someone who uses for example a system or a piece of software or hardware that runs software on it.
- Pick an activity you do most days (such as going to class, eating dinner, or watching television). Make a list of ways computers are directly or indirectly involved.
The activity going to work involves computers in the form of traffic lights that are controlled by computers. My bike and car (depending which vehicle I choose to go to work) were designed using computers and my car contains multiple electronic control units. Before I leave the house I check the weather with my phone which involves not only my smartphone but computers that were used to determin the weather forecast. At work I enter the building using a chip card reader which uses cryptographie.
- Pick a profession, preferably one that you have some interest in or some knowledge of. Make a list of activities done by people in that profession that involve computers.
I picked software development for autonomous vehicles.
- Developing algorithms such as trajectory planning.
- Calibrating sensors.
- Modifying controller parameters.
- Simulating the behavior before testing it on a test vehicle.
- Testing on a test vehicle involves mutliple computers which are located not only in the vehicle.
- Communicating with gps sattelites to locate the vehicle on the street.
- Swap your list from exercise 2 with a friend who picked a different profession and improve his or her list. When you have both done that, compare your results. Remember: There is no perfect solution to an open-ended exercise; improvements are always possible.
- From your own experience, describe an activity that would not have been possible without computers.
- Letting a car drive on its own and sitting behind the steering wheel without intervention is an activity that would not be possible without computers.
- Measuring my heart rate while running wit my smart watch is another example.
- Make a list of programs (software applications) that you have directly used. List only examples where you obviously interact with a program (such as when selecting a new song on an MP3 player) and not cases where there just might happen to be a computer involved (such as turning the steering wheel of your car).
- Google Chrome-Webbrowser
- CLion, Visual Studio, …
- Android and its Apps
- Make a list of ten activities that people do that do not involve computers in any way, even indirectly. This may be harder than you think!
- Eat without electronic devices running in the background
- Read a book (leaving aside the fact that it was written on a computer and printed using a printer)
- Identify five tasks for which computers are not used today, but for which you think they will be used at some time in the future. Write a few sentences to elaborate on each one that you choose.
- Driving a car is a task that requires a human to turn the steering wheel and actuate the gas and brake pedals. Although there are efforts to automate this task and it is possible in some predefined situations, all challenges are not yet solved.
- Diagnostic analysis can already be done by machine learning algorithms which will improve in the future when more data will become available and is processed and used more efficiently.
- Political discussions can be complex to find a solution but maybe computers could be used to identify a satisfying solution.
- Parameter tuning for control and optimization algorithms is an art and requires knowledge in this area. An software that is aware of the parameters and their size should be developed to get the optimal parameter set. If there are multiple parameters for different situations the application should output the different parameter sets as its result.
- Searching for knowledge one is missing in understanding something is a task that requires time and effort to find the missing information. Computers could be used to detect which information a human is lacking and guide them in finding what they are searching.
- Write an explanation (at least 100 words, but fewer than 500) of why you would like to be a computer programmer. If, on the other hand, you are convinced that you would not like to be a programmer, explain that. In either case, present well-thought-out, logical arguments.
I want to be a computer programmer to help society by solving problems that, when solved, will improve the lifes of people. Another reason for me to learn programming is to learn about new algorithms and keep my brain active. Implementing algorithms and solving problems by programming an application helps in understanding the limits and best use cases of algorithms. For me it is also satisfying to find a solution to a problem and interacting with the running application, thereby learning more about the problem. It is the process to improve ones solution to a problem and to share it with others so they can profit from this insight a programmed piece of software can give. Being a programmer is great, because you can understand the code others have written and see their thought process of solving challenging problems. Thereby you learn a lot and can adapt their knowledge to your own. Last but not least, I want to program to earn a living. It is payed well and will be a valuable skill in the future, although it can already be done by computers themselves.
- Write an explanation (at least 100 words, but fewer than 500) of what role other than programmer you’d like to play in the computer industry (independently of whether “programmer” is your first choice).
Another role I would like to participate in the computer industy is finding algorithms to solve challenging problems. Thinking about a problem to solve it does not require one to be a programmer. Instead, a blackboard can be used to work on a solution for a problem and work on the sub tasks that need to be solved. I would like to find an approaches that can evaluate different algorithms. Another problem I would like to work on is to find the “perfect” interaction aware maneuver planner or predicting the intention of other road users with a certain probability in the future. These are just examples that I currently work on but there are other roles I would like to focus on. Making knowledge easier accesible while perserving quality. Missing information needs to be found quickly and should not lead to new open questions. I like to be a good designer using design patterns before actually start coding without really knowning the outcome.
- Do you think computers will ever develop to be conscious, thinking beings, capable of competing with humans? Write a short paragraph (at least 100 words) supporting your position.
- List some characteristics that most successful programmers share. Then list some characteristics that programmers are popularly assumed to have.
Refrences: book, medium: keepcoding, and scalablepath.
- Communication skills Good communication skills directly correlate with good development skills. A great developer is able to understand problems clearly, break them down into hypotheses and propose solutions in a coherent manner. They understand concepts quickly, or ask the right questions to understand, and don’t need to have everything written down specification document. Great offshore developers usually speak multiple languages coherently and are very comfortable with documentation in English.
- Quick learning ability and willingness to learn This is a trait that is highly overlooked by applicants when technology is always evolving and the skills and abilities a programmer has today will likely be outdated in a few years. It’s important to be a programmer who has an interest in keeping up with the latest trends and is eager to take any opportunity to learn new skills and improve existing ones.
- Problem-solving skills Great developers are usually independent and amazing self-learners. They have the ability to learn new technologies on their own and aren’t intimidated by new challenges. For those who have never attempted to create an application from scratch, programming can best be compared to solving an extremely difficult math equation. A good programmer thrives on being innovative and finding ways to make something work, despite the odds.
- Deep and broad technical experience
- Team player
- Passion for the work While some programming staff can simply serve as nine-to-fivers or clock watchers, many hiring managers are interested in finding someone who will gladly put in long hours when needed. True programmers are self-proclaimed “computer geeks,” spending their time gaming, building servers, or creating apps for themselves or friends. While this passion isn’t a necessity, it’s often a way to differentiate top-shelf programmers from the rest.
- Debugging Skills Creating code is only part of a programmer’s job. When software doesn’t work as expected, a programmer is expected to get to the root of the problem quickly and effectively. Instead of spending hours blindly making changes, search for a programmer who prefers to carefully investigate his code and research possible issues until an answer is found.
- Constraints Every project or job has several constraints whether it be time or budget. A good programmer knows how to code in terms of time and space complexity. Since budget is really important in a lot of projects, a good programmer will create a software using fewer resources. A good programmer knows how to manage the project requirements and is very flexible.
- Identify at least five kinds of applications for computer programs mentioned in this chapter and pick the one that you find the most interesting and that you would most likely want to participate in someday. Write a short paragraph (at least 100 words) explaining why you chose the one you did.
- medicine: computer axial tomography, robot-assisted surgery
- telecommunication: Mobile phones, video conferences
- Information data centers: Google servers
- Transporation: Ships, cars,
- Monitoring and Screens
I already work on self driving cars which is a topic where I am motivated to find solutions to trajectory and maneuver planning algorithms. These algorithms require solutions to predict intentions of other cars and pedestrians. Other than the field of transportation, where I currently work on self-driving cars, I would be interested to work in the field of medicine. Specifically to develop monitoring systems. For example to detect early signs of heart attacks or other diseas such as altsheimers or depressions. Thereby respecting privacy and not violating data protection rights.
- How much memory would it take to store (a) this page of text, (b) this chapter, (c) all of Shakespeare’s work? Assume one byte of memory holds one character and just try to be precise to about 20%.
- How much memory does your computer have? Main memory? Disk?
- Disk: 1 terabyte
- Memory: 16 gigabyte