Pros and cons of each driving navigation alternative
Visiting a new place and having a friend give you directions can be an option if you do not have a data plan or a navigation system in the car. Both navigation systems and a phone call has pros and con and are analogous to both compiled and interpreted codes.
Phone Call Pros and Cons
- Your friend is already familiar with the city and can provide insightful options and guide
- Does not require downloading of information from the internet
- Having your friends constantly on the phone burns up a lot of credit
- Instructions might not be clearly understood
- Cellular reception may not be optimal, dead spots
- Friend may not be aware of all the optional routes
- Friend may give a full route which is not easily remembered or written down
GPS Pros and Cons
- Offers turn by turn instructions
- Reroute if an instruction or route is missed
- Can reroute if traffic increases
- Does not use constant cellular reception can work offline
- Is normally very accurate
- May not be aware of road foreclosure for maintenance
- May not be aware of traffic congestions
Pros and Cons of compiled vs. interpreted code
There are three types of codes; compiled, interpreted and intermediate. For the purpose of this discussion, I will be focusing on the first two. Figure 1.0
What is a compiled code as opposed to interpreted code? Compiled code as the name suggest uses what is known as a compiler to translate sources codes to machine language. The compiler is ultimately responsible for checking syntax error and then compiles the source code into an executable file to be run immediately or at a later time. Figure 1.1. As with the GPS system that is compiled and can be executed immediately or for another trip. In an article by Eckert(n.d) he claims that “Compiled programming languages can be used to create almost anything! The only downside to them is that they are complex, and it takes a while to plan for and create code that can be compiled without errors and also has a structure that is easily modified in the future. ”. An example of these is C, C++, and Objective-C.
On the other hand, an interpreted code also known as scripting languages is one in which no compilation is needed. The source code is actually the executable code. This, however, can not be executed with the help of an interpreter. The interpreter, in this case, is also responsible for checking syntax error. As with the direct phone navigation in which you are instructed on a turn to turn basis, an interpreter “executed the instructions as they were translated instead of recording the translated version for future use.” (Brookshear, 2012, p242). An example of these is PHP, Ruby, and Python.
Figure 1.0 Here’s a flowchart showing how high-level languages communicate with the computer. (Bradford ,2014)
These two type of executable codes offers their own set of pros and cons, which we will be looking into shortly. Figure 1.2
Pros and Cons of compiled code
- Executes faster when compared to interpreted languages
- Ready to run
- The executable file is isolated from source code, which offers source code protection.
- Can be tailored for specific types of applications
- Web programming
- Logic programming
- Platform dependent — which simply means that once the application is compiled for a specific
- Does not offer much flexibility
- Debugging and Tweaking requires re-compilation which is time-consuming
Pros and Cons of interpreted code
- Debugging and Tweaking is faster and simpler.
- Platform independent
- The interpreter is a requirement for the host system
- Runs more slowly than compiled codes
- The source code is accessible
Figure 1.1 Illustrating how compiled and interpreted languages work. (Wright State University, n.d)
Figure 1.2 Quick table to show the pros and cons of each (Bradford ,2014)
Bradford, L. (2014) Source Code And Language Differences, Available at: http://learntocodewith.me/programming/source-code/ (Accessed: April 24, 2016).
Brookshear, J. G., Smith, D. and Brylow, D. Computer Science: An Overview, 11th Edition. Reading, MA: Pearson (Addison-Wesley), 2012
Eckert, J. (n.d) Compiled vs. Interpreted Programming Languages, Available at: https://www.trios.com/career/?section=Whatsnew153 (Accessed: April 24, 2016).
Wright State University (n.d) CS 480/680 – Comparative Languages, Available at: http://birg.cs.wright.edu/cs480/ (Accessed: April 24, 2016).