Category Archives: Week 8

Exploring Python & R with a beginner’s HTML/CSS Background

Victoria Gomes-Boronat

Prior to taking a basic HTML and CSS coding class in my undergraduate program, I was absolutely terrified of programming. I believed that computer programs were made up of a combination of numbers, specifically 0s and 1s, and it took a super genius and lots of memorization to interpret/create it. Once I took the beginner’s HTML course, however, I understood it more as a language of variables and commands. As discussed in the readings and the python tutorial videos by Annyce Davis, each language has its own syntax (rules of the programming language) and semantics (meanings) (2017). I always knew that programming heavily consisted of STEM, however, I also realized that my extensive background in language (journalism) could actually be an asset to learning these languages. As Evans explains, computer science and programming actually have strong connections to language liberal arts, such as grammar, logic, rhetoric (2011, p. 15). You can see that with how code is constructed, or the syntax of it.

HTML and CSS are optimized for webpage creation, therefore it is important to be very specific with your commands and where they should function. For example, in HTML, every command must reside within <html> </html>, and you must also specify whether it resides in the head (the metadata) or the body of the page (visible on the webpage) by inputting it within those markers, i.e. giving the body of your predominantly blank page the title, “Hi, World!”, would look like this <html>
<head>
<meta charset=”UTF-8″>
<title>Untitled Document</title>
</head>
<body>
<h1> hi world </h1>
</body>
</html>

You can see you how creating a full webpage could become thousands of lines long very quickly. And if you forget even just one closer tag it can cause so many bugs and crashes. The most frustrating part about the HTML language is that it becomes very difficult to find the source of the problem within in so many lines of code. However, the longer you work with it, the better you become at finding issues in the code’s syntax that are affecting the code’s semantics (meaning/resulting outputs). The work of troubleshooting is very akin to the work of an editor revising papers for grammatical mistakes that could change the semantics (meaning) of the work.

When working with python, I was floored by how concise and simple the commands were! As Davis explains, Python is an extremely popular choice for beginner coders because it can be used for a multitude of computations, is user-friendly, and clean/concise. I found the syntax of Python to be much more user-friendly than that of HTML and CSS. Learning how to use Visual Studio Code was also extremely helpful in understanding how codes could be constructed and troubleshot. Python and python interpreters could be easily installed, allowing for code auto-complete, making the process of writing code that much easier. It is important to note that Python can’t be used to create webpages, rather it is optimized to create web applications and various computational functions that can then be added to web pages.

Python also reminded me of another language I have just started to learn: R. R is a programming language that is used for statistical analyses. Many of the rules or syntax of the language are actually very similar to python. with concise commands, you are able to run statistical analyses and create resulting graphs. From what I’ve found, learning one programming language helps tremendously in learning others, especially when you learn and understand the process of how each programming language is constructed of expressions (syntactic values) and evaluations (the meaning of the value associated with an expression) (Evans, 2011, p. 40).

 

References

Davis, A. (2019). Programming foundations: Fundamentals. LinkedIn Learning. https://www.linkedin.com/learning-login/share?forceAccount=false&redirect=https%3A%2F%2Fwww.linkedin.com%2Flearning%2Fprogramming-foundations-fundamentals-3%3Ftrk%3Dshare_ent_url&account=57879737.

Evans, D. (2011). Introduction to computing: Explorations in language, logic, and machines. http://computingbook.org/.

Into the Black Box of Computational Thinking

Jalyn Marks

Yet again in this course, I’ve come across another black box that even I, the English major, from the land of “Are You Going to be a Teacher?” and the land of soft skills galore has been open to explore. The accepting tone of Wing’s “Computational Thinking” article (2006) greets the reader with a warm welcome: “Computational thinking is a fundamental skill for everyone, not just computer scientists.” Wing describes the relationship between computers and humans similarly to W. Brian Arthur in The Nature of Technology: “…technologies are shaped by social needs; they come often from experience gained outside the standard domain they apply to” (2009). Like Arthur, Wing states that the ways humans think about and solve problems (read: soft skills!) is mirrored in computational thinking. “[Computational thinking] is not trying to get humans to think like computers” (Wing 2006). Instead, it uses things like planning, learning, and scheduling to meet various social needs.

Evans describes computational thinking not only as something everyone should have access to, but as something that can serve as a “the ultimate mental amplifier” when problem solving (2013). According to him, computer science is interdisciplinary, attributing to its multi-use, multi-user flexibility. When using the Linked-In Learning course on programming, I found–much to my surprise–that coding was fairly intuitive to me, in more ways than one. Most closely, coding is like like poetry; the semantics of a sestina about nostalgia compared to a villanelle about nostalgia might be similar, but the the syntax will always be different. Different poem structures elicit different poetical affects.

As fun as it would be to go into affect theory now, I’m going to shift this essay to my current academic pursuit: Disability Studies. How is computational thinking relevant to the disability world?

There are several starting points I could use (all ideas derived from Evans 2013):

  • Coding executes problems in a faster, shorter way than typing everything out.
  • Universality is the pinnacle value included in universal design (UD).
  • Abstract ideas are concretized in coding.
  • Coding is a textual language and not a natural language. For those who do not use, unreliably use, or minimally use natural language, is textual language more or less accessible? Without much research, my intuition is telling me that yes, textual language is probably more accessible (given my limited interactions with the “Spelliverse” and I-ASC community).
  • Clear rules are helpful to people who like them and challenging for people who don’t. (E.g. Stereotypic that autistics like rules, stereotype that people with developmental disabilities and some behavioral disabilities have trouble following rules)
  • “Anyone who is able to master the intellectual challenge of learning a language… can become a good programmer” (Evans 2013).

Lastly, an original poem/some code:

title = “Python”

num = 26
age = num
age = years_it_took_me_to_learn_Python

if num % 6 == 0:
print(num, “is divisible by the number of lines per stanza in a sestina”)
else:
print(num, “could be lines of a free verse”)

6 != 26

>>> I = 26
>>> Y = 6

NameError: name ‘Y’ is not defined

>>> I == 26
True

>>> 6 * (26==6)
0

print(“Next time, I’ll rhyme.”)

 

References

Arthur, W. B. (2011). The nature of technology: what it holds and how it evolves. Free Press.

Evans, D. (2013). Introduction to computing: explorations in language, logic, and machines. Creative Commons.

Wing, J.M. (2006). Computational thinking. Communications of the ACM, 49(3), 33-45.

Around the Code

I had heard the term “source code” numerous times but to really understand it I had to interact with it. Source codes are lines of code that can run a program. But when it comes to the practical world, it seems IDEs (Integrated development Environments) are used to write source codes, as they have more functions and better UI than simple text editors. In fact, IDEs like Xcode even try to make use of color conventions and indexes to make the coding process smoother.

Having an understanding of how coding works can help us deblackbox many of the cognitive symbolic technologies like the applications that run on iOS. By understanding the features and limitations, the affordances and constraints of Xcode, we can see why certain apps in the iOS ecosystem tend to be designed in the way they are.

Like natural languages, programming languages have a grammar too, i.e. syntax rules. They have functions as equivalent phrases, which are the most commonly used codes of line boxed into a single block. They have statements, variables, whitespaces, strings, all of which perform some function to translate actions from human language to machine language.

When we go deeper we see that any code at the basic level is translated into machine language which is in bits. Bits that are the basic unit of Information: a string of 1’s and 0’s. Numbers still lie at the center of programming languages. Working with numbers is still a basic skill one must learn to be proficient with in Python.  We can then see Python as part of a cognitive symbolic continuum, (Irvine, 2) where ratiocinators and analytical engines that used crunch numbers, underneath all the programming devices with advanced user Interfaces.

I tried python on the visual studio code software and it was interesting how even single lines could be run to see what results they give. It reminded me of the feedback that is expected of good GUI so that we can go about coding much easily without focusing on the syntax all the time.

While reading Evans (2011), I was particularly fascinated by the example he gives for colour. Since computers essentially run on bits, it means that each 1 and 0 could mean yes or no to a variety of colour inputs. This means that the computer has a finite range of colour options which it can use on a single pixel and together these varied coloured pixels will come together to deliver an image. But what about a painting? In a physical form, the colours are mixed to form interesting hues and if non-experts stand in front of a Van Gogh we cannot really tell the difference between a fake and an original. Yet an original “Starry Night” impacts us profoundly. Evans says that “The set of colors that can be distinguished by a typical human is finite; any finite set is countable, so we can map each distinguishable color to a unique bit sequence.” (Evans, 2011, 12)  But does that mean a computer image of painting that is indistinguishable from a painting has the same richness in colour? Does it have the same impact? I would like to leave you with this question.

 

References –

Martin Irvine, “Introduction to Cognitive Artefacts for Design Thinking” (seminar unit intro).

David Evans, Introduction to Computing: Explorations in Language, Logic, and Machines. 2011 edition.

 

Computational thinking

I think Wing’s article changed my take on computational thinking as I always think that this is something how science people think – logical thinking. And maybe only people who work in the field like computer science or engineering will need to know this computational thinking. But Wing labels it an “attitude and skill set” that everyone can learn and use. The emphasis is on solving problems by exploiting the fundamental concepts of computer science: abstraction, decomposition, recursion, separation of concerns, and so on. In sum, Wing equates computational thinking with thinking like a computer scientist.

Moving on to this week’s LinkedIn python learning and programming, it is very easy to understand for someone who has zero background in programming, like myself. I used to work at a high fashion jewelry company in New York and since it is an e-commerce company, we had two developers in house(at that time, now I think the developers team has expanded to at least five or six people) to write codes and develop and upgrade websites. Every time I passed by their desks, they were always on this black screen full of codes and writing stuff that I just couldn’t understand. I found that so interesting and now that I have finally come to contact with programming, it is not as super difficult as I thought in the beginning. Just like what Ms. Davis said in the video, there are hundreds of, if not, thousands of programming languages. And learning python as a start is good for beginners like myself because of its concise format. I used to think that programming is dull and boring and I always have this stereotypical programmers image deeply rooted in my mind: a dude (usually Asian) with glasses sitting in front of at least two or three computer screens with a monochrome hoodie; a bit socially awkward and may appear looking weird or creepy. Now I feel like that programming is a joyful thing and it can be cool. This is not just nerds do and it can be for everyone just like what Wing said! I followed the instructions on Ms. Davis’s video and tried “hello world” and the sense of accomplishment gained after using code successfully is beyond words.

Hello World, right now.

In [1]: print (“Hello, World!”)

Hello, World!

 

References:

Davis, A. (2019, 7 12). Linkedin learning. Retrieved from Linkedin: https://www.linkedin.com/learning/programming-foundations-fundamentals-3/basic-statements-and-expressions?u=57879737

Jeannette Wing, “Computational Thinking.” Communications of the ACM 49, no. 3 (March 2006): 33–35.

 

Computational Thinking and Problem Solving

Computational Thinking and Problem Solving

Yingxin Lyu

When I learned the Basics of Programming courses on Code Academy website, I found out that many practical problems are transferred into a mathematical or logical problem, which made many troublesome problems become clear to understand and solve. For example, the course uses a hamburger-making process to explain the concept of function. It is easy to understand that making a hamburger is step by step, but for many other problems, usually it is not clear about how to carry it out in such a way. However, if people can decompose a complicated problem into clear smaller and easier problems that can be solved in sequence, like a computing way of problem solving which translates solutions into instructions easy enough for computers to understand and execute, and that is as what Evans writes in the book: “computer scientists think about a problem as a mapping between its inputs and desired outputs, develop a systematic sequence of steps for solving the problem,”1 the problem solving process of practical problems will be far more efficient.

Another example is the concept of conditional structure. If applying the concept in the problem solving process in reality, the problem will be processed in a quite logical way. It is just like a reminder for people to always have a plan b, but actually they need to take as many conditions as possible in order to prepare for any probable situation that may appear when coming across a problem. Let’s suppose that a company is going to publish a new application, but before that, they plan to invite some users to experience the beta version of the app and give their feedback in order to ensure the app will be a success. Thus it is important for a manager to predict what kind of situations may happen after the test. First, there may be no severe problems and the app runs well at most of the time, so the company can publish the app as scheduled. Second, if there come some severe problems that lead the system to break down often, the schedule must be delayed, so how to resolve the delaying time? Third, if the users gave a lot of advice, which ones should the company take and make a change, and which ones should it omit and ignore? Should they accept and resolve all the advice? The manager should take all possible situations and outcomes in advance like a programmer inputs instructions including all possible situations may happen in a program. Computer science is invented to transfer practical problems into a way that computers can understand and solve them. Now, people take advantage of it to solve the problem by themselves, and that’s the circulation which leads human society keep stepping forward.

Combining what Wing2 describes as one of characteristics of computational thinking, it is “a way that humans, not computers, think.” Thus people can take full advantage of using it, whether to control computers, or solve any other kinds of problems in reality. To explain more about the point, coding language is a good example to prove it. In primitive society, people invented language because they want to communicate with others to solve problems. Now, people want to communicate with computers in order to solve some bigger problems, thus they invented a new kind of languages. These languages are simple, clear, and understandable to both humans and computers. Moreover, if a person can apply the computational thinking in his or her professional field to solve problems with efficiency, he or she must be very outstanding. This can explain that “one can major in computer science and do anything.”3 Having a good command of computational thinking is important for anyone.

 

References:

  1. David Evans, Introduction to Computing: Explorations in Language, Logic, and Machines. 2011 edition. 16.
  2. Jeannette Wing, “Computational Thinking.” Communications of the ACM 49, no. 3 (March 2006): 35.
  3. ibid.

Computational Thinking

I found this week’s readings on the principles of computing to be especially interesting. The computer science courses that I’d taken only covered the syntax of programming languages. In these courses, I learned how to make remedial programs with C++, JavaScript, and Jython (a Java implementation of Python), but I never really understood the underlying design of the computing technology that they were implemented on. In one of these courses, I even remember talking about bits and bytes and learning how to decode numbers and letters into binary. But, we never talked about what the bits were. Even though we talked about information theory last week, I found Evans’ (2011) book to be extremely helpful when explaining how binary questions lessen uncertainty. His example of the number of bits in the outcome of tossing a six-sided die really helped me to conceptualize how computers can efficiently convey information. Instead of evaluating whether or not the die landed on one number, the computer can speed up the process by checking if it is greater than or equal to 4. By doing this, the program has a 1:1 chance of being true rather than a 1:6 chance.

On a broader level, an overarching theme that I noticed throughout the reading was that computer science is an interdisciplinary field. Wing (2006) argues that students, teachers, and parents need to know that “one can major in computer science and do anything” (p. 35). Her reason for thinking this is that computational thinking is a way of analytical thinking that could yield solutions to problem in any discipline. Further, Evans (2011) argues that computer science has roots in engineering, hard science, and the liberal arts. It is intuitive to think of computer science as a form of engineering or science, but the link between computer science and liberal arts seemed less clear. However, Evans’ argument that computer science has strong connections to the Trivium and Quadrivium was quite compelling. These arguments re-framed the way that I viewed computer science.

I also really enjoyed the LinkedIn Learning course on programming. Davis’ (2019) analogy of programming being like a recipe was particularly insightful. While this course was helpful, I’ve been taking a course on LinkedIn Learning called PHP for WordPress by Casabona (2020) and I encountered a common theme that we’ve been discussing in this course: modularity. For this reason, I’ll focus on the PHP course. In the course, Casabona (2020) kept referencing functions that PHP has created. He then mentioned that WordPress built on the functions that PHP created to make functions that are useful to WordPress developers. When he said that, I immediately thought of this course. Irvine (n.d.) writes that modular designs are “conceptual models of systems with interconnected subcomponents that can be implemented in real constructed things” (p. 1). While a program isn’t exactly physical, PHP developers defined functions based on the existing subcomponents of the programming language. WordPress developers then expanded upon these functions to make certain tasks easier for theme developers. These layers of abstraction make it easier for new developers to perform certain functions. But, if developers need a function to do something that no predefined function can do, they can always create their own function using the subcomponents of PHP. This example wasn’t a part of our reading, but I found it really interesting that developers could collaborate and modify things using the predefined PHP functions in WordPress.


References

Casabona, J. (2020). PHP for WordPress. LinkedIn Learning. https://www.linkedin.com/learning-login/share?forceAccount=false&redirect=https%3A%2F%2Fwww.linkedin.com%2Flearning%2Fphp-for-wordpress%3Ftrk%3Dshare_ent_url&account=57879737.

Davis, A. (2019). Programming foundations: Fundamentals. LinkedIn Learning. https://www.linkedin.com/learning-login/share?forceAccount=false&redirect=https%3A%2F%2Fwww.linkedin.com%2Flearning%2Fprogramming-foundations-fundamentals-3%3Ftrk%3Dshare_ent_url&account=57879737.

Evans, D. (2011). Introduction to computing: Explorations in language, logic, and machines. http://computingbook.org/.

Irvine, M. (n.d.). Introducing modular design principles. Unpublished manuscript.

Wing, J.M. (March 2006). Computational thinking. Communications of the ACM, 49(3), 33-35.