Week 4: Computation Concepts

Emily Fuerst

I enjoyed the exercise we were assigned involving Code Academy and learning more about Python. The first section was significant for all of the sections since it taught the user how to declare variables and to set these variables to different values. I took a class during my undergrad called Beginning Online Publications where we used HTML Kit to code different websites. I figured that I would be more confident when using Python but these tools seemed extremely different. I thought it was interesting how Python can do mathematical computations. There was a section that focused on these mathematical computations where the user was asked to set variables to the price of a meal, the sales tax and then the tip. In the end we computed the total which is one of the more entertaining sections. I never learned to do mathematical computations in HTML Kit and I am not entirely certain that the device is capable of basic math.

The section in Python regarding string methods was rather confusing. Even though the user is asked to use each example of a string method, it would be helpful if the tutorial offered examples explaining the usage of the string methods and why are they are important in coding. I understood the effects of the upper and lower case strings and their usage. However the “len()” method I was unable to grasp how to properly use it as well as the significance of this method. Can anyone provide their understanding of this method?

I encountered a few errors within Code Academy while engaged in the tutorials. I read on the website that often the browser you are using plays in a role in whether the exercises will work properly which resulted in me downloading Google Chrome instead of running the website on Internet Explorer. This initially solved the problems I was facing when trying to enter in my data to see if I had correctly entered the code. At the very end the Python tutorial in Section Five, I was unable to complete the section due to the red line under the “Run, Reset and Save” button. The red line refused to disappear, I attempted to reset the page and still found that I was unable to solve this issue. In the Question and Answer Forum on the Code Academy site, several people mentioned how the red bar did not finish loading and in result the script would not run properly. Even though the error with the red line caused issues in completing the section, I was already having a few problems finishing the final step in Section 5 which related to “Review on Strings and Console Output.”

Overall I found the Code Academy website and the tutorial regarding Python fascinating since I was able to compare it to the HTML Kit. I had a textbook for HTML Kit which helped me in achieving my codes at a faster pace. However the Python tutorial provided a “Hint” button within each exercise which proved to be beneficial when figuring out how to write the more complex codes.

While reading Alan Turning: One of the Great Philosophers by Andrew Hodges, I came across a concept that I have always been intrigued by and have never fully understood. While discussing the idea that computable operations include intelligent behavior, Hodges states one of Turing’s examples, “Given a position in chess the machine could be made to list all the 'winning combinations' to a depth of about three moves on either side. This is not unlike the previous problem, but raises the question 'Can the machine play chess?' It could fairly easily be made to play a rather bad game. It would be bad because chess requires intelligence. We stated at the beginning of this section [i.e. when describing how programming is done] that the machine should be treated as entirely without intelligence. There are indications however that it is possible to make the machine display intelligence at the risk of its making occasional serious mistakes. By following up this aspect the machine could probably be made to play very good chess” (Hodges 6). I have never been able to understand how computer users are able to play against the computer in games such as checkers, chess, scrabble and other popular board games. When I was younger I believed that there were people who were employed to play against you as the “computer” competitor. Part of me believes that the computer is designed to win several games while then allowing the user to win a certain amount of games and that the percentage of winning is based off statistics. I tried to find more information online that would aid me in figuring out this dilemma I have always had but was unable to word my question appropriately that would result in the research I am looking for. This may be a far-fetched/silly question that I am posing but I have always been interested as to how exactly users are able to play competitive games against their computer?

Hodges, Andrew. "Alan Turing: One of the Great Philosophers." . N.p., 2007. Web. 25 Sep 2012. <http://www.turing.org.uk/philosophy/ex6.html>.

Future Trends in Programming Languages – Intentional Programming

Programming language derives its historic origin from the word “code”. The Code of Hammurabi, circa 1780 BC, is one of the earliest records of a ruler establishing a body of instructions, or “rules”, arranged in orderly groups, for his people to follow. It was coded on an eight feet high, black stone monument, for display in public view. Even though there is no mathematical relation in programmatic terms, you can find similarities in structure, syntax, and any pro coder will tell you the more the better when it comes to documenting your work.
Predicting shifts in software development is a difficult proposition at best, due to the wide range of factors that are involved in developing applications globally and in scale, and the complexity of their interactions with existing business, government, and consumer IT ecosystems. TIOBE is a Swiss company that specializes in assessing and tracking the quality of software. They calculate an index every month that is an indicator of the popularity of programming languages. The ratings are based on the number of skilled engineers worldwide, training course enrollment, and third party vendors. The popular search engines Yahoo, Google, Bing, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. The table below contains the TIOBE Programming community index as of September 2012:
Prog. Language Table 2012.jpg
It is interesting to note many of the languages on the chart are traditional, procedural languages, usually written as a list of step-by-step instructions for the computer to execute. Included on the list in this category are: C, C++, C# (C sharp), Perl, JavaScript, Delphi/Object Pascal, Ada, and PL/SQL. Conversely, you will also find the reflexive, functional languages. They possess a more natural programming structure and by using reflection, are able to modify the structure and behavior of the program object at runtime. Although the classification of programming code is much more extensive than the coverage given here, the point worth noting when focusing on the “Delta in Position” column is that in general, procedural languages are decreasing in popularity while functional languages are gaining wider acceptance.

Intentional Programming matches the level of abstraction between the programmer’s intention and the information in the source code. The code can also be developed, tested, and modified using the intended application behavior in a WYSIWYG environment. In other words, the test and production environments would be identical. There is potential for economies of scale in both cost and productivity when coupled with cloud technologies.
So if we go to code academy’s tutorial in how to print “Hello World”, here is how it would look in a procedural language like JavaScript:
1: <script type>=”text/JavaScript”>
2: console.log (“Hello World”)
3: </script>
This is how it would be written in a reflexive, functional language such as python:
1: print = “Hello World”

Which language most closely matches the intention of the artisan with the end product of his work? The exponential jumps in computational power attained by advances in hardware have finally narrowed the gap between software development and processing speed. Next generation intentional languages will bring substantial advances in programmer productivity, application creativity, and increased execution speed and code size efficiencies. Instead of spending time closing curly brackets and scanning lines of code looking for errors, programmers can spend their time doing what they do best; coming up with creative ways to keep users happy and computers busy.

“codeacademy.com” = useful learning tool

Kassie Barroquillo

I have always seen code from the outside looking in. I am familiar with the terminology and have seen code being written, but I never understood the actual language. I found Code Academy to be very useful, as I do now feel I have a better understanding of coding and how computer languages work. It seems as if, at least in Python and Java, the languages are very straightforward. I was able to complete the first series of lessons in Python, but once I started the Strings & Console Output section, it would not respond when I hit run. (See screenshot below.)

As I did not feel I had done enough in codeacademy, I went on to the Java portion because I know Java is used by many of my friends who are software engineers, especially in coding websites. I found some of the differences to be interesting. In Java, whitespace does not have much importance, it does not dictate the spacing of the script in a way it does in Python. Symbols have more importance in Python, where using a symbol like “;” means the statements needs to go down to the next line. I think I will do more work in Java because it seems more practical in the long run, but I am also interested in learning languages like “C.”

After reading the first two chapters of Hillis’s, “The Pattern on the Stone,” I found I was very interested in the way software and hardware interact. Hillis explains the use of binary and logical function, among other topics. In all of our readings, it seemed obvious the concept of a computer came first, then the hardware was created, and finally, software has come into play. In Milton’s, “The Relationship of Programming Languages to Binary Machine Code and the Computer’s Digital Electronics,” he states, “Understanding the binary nature of the computer’s electronics is the understanding of how programming instructions are recognized at the system level and the way that the computer receives and stores data” (Pg. 5). From this, it is my understanding that binary basically translates code into something the computer can then read. Does this make binary both hardware and software? Hillis says binary is what flips the switches, which in turn make the computer function in the way the user needs it to. It is the great "middle man" of computing.

In general, I wonder how Turing would feel about how far computers have come since his initial studies. He was one of the great pioneers of computing and I feel as if the last decade has been very impressive, as the emergence of the internet has now become a mainstream concept. Would he be concerned the technology he worked so diligently to help produce is used for entertainment, more than reasons of mathematical learning? Would he be excited to see widespread use of his concept? Personally, I feel as if Turing would be happy to see the widespread use of computers, but he would not be pleased to see how they are being used. I don't feel as if computers, in the mainstream, are necessarily used to the best of their potential. When people only have a computer so they can view their social media, it seems very disconnected from the initial hopes of the computer.

Works Cited

Hillis, W. Daniel. "The Pattern on the Stone: The Simple Ideas that Make Computers Work." cs.rugers.edu. Basic Books, 1999. Web. 26 Sep 2012. <http://www.cs.rutgers.edu/~mdstone/class/503/readings/hillis-pattern.pdf>.
Milton, Robert Milton. "The Relationship of Programming Languages to Binary Machine Code and the Computer's Digital Electronics." homesaustin.com. homesaustin, 31 01 2002. Web. 26 Sep 2012. <http://www.homesaustin.com/Documents/BinaryNotation.pdf>.

Really interesting observations! Here is a good article in Technology Review on Charles Simonyi, the Microsoft programmer (who first wrote MS Office, but we won't hold it against him) who helped start the "Intentional programming" movement, which he first called "meta" (conceptual) programming: