Thursday, January 14, 2016

Differences between for loop and while loop



For Loop:

It is a fixed repetition loop. It will run the given number of times no matter how the body of for loop code changes the values of the variables.

If you have a constant (Eg: Max students), you can run the For Loop for that many times. You can change the value of the constant. Every year you can change the value of Max Students.

The counter value increases or decreases depending upon the for loop min, max, incremented or decremented values automatically as stated per requirement- no separate statement is made within the body of for loop.

A separate variable is needed most times to run a For Loop.

A For Loop can also start with a maximum value and decrease each time the body of the loop is executed.

While Loop:

While loop can have various conditions and they can be joined (AND OR). The control enters the loop body only when the condition is met. If the condition is not met, the control goes to the statement following the end of the while loop body. A statement within the while loop changes the criteria and that actually moves the control out and to the statements that are following the ned of while loop body.

Thursday, October 29, 2015

Bits, Bytes, Compilers, and Interpreters

      Every character shown right now on this post is represented by a byte, a form of a computers memory. A byte is made up of 8 bits, which are placeholders of a binary system. The binary system comprises of 0s and 1s representing off and on respectively. The character "z" for example is made up of strings of 0s and 1s like "01001101"(Not actual value). When you press "z" on the keyboard, it sends a message to the computer to display "z" on the screen or monitor. The compiler takes the signal and compiles the value to be whatever it is. An interpreter does the same thing except line by line. Say the value of the character "z" is "01001101"(Once again, probably not real value). When the compiler receives the value "01001101" it is able to send a message to display a certain combination and pattern of pixels on the screen to make up the character "z." All of this happens in milliseconds which is why we are able to type the characters on screen almost instantly after we typed them. It only takes a 16-bit computer to store over 50,000 numbers(65,536 to be exact). Later, languages were invented and the rules of these languages were also established. The computer languages make it easier to interact with the computer.

My Perspective on Computer Architecture

Computer architecture to me seems like the layout, hardware and software, of a computer. In hardware some of the parts of a computer I know of and their functions are:

  • Core processor: The chip that processes the binary and interaction between functions in a computer, the fastest I know is an i7 intel core
  • RAM: Auxiliary memory in a computer

Computers use the sensors under the keys, binary, screen, and compilers to show the message. The keys give the signal to display a character, which is represented as a binary byte, and the compiler converts the binary into on-screen text made up of pixels

Thursday, September 24, 2015

Systems Thinking

(1)A system is a process in which objects interact with each other to complete a certain goal. A subsystem is a system part of a system, but sometimes, by itself, is not a system, since it can't function independently. (2)It interacts with its individual parts or subsystems to complete a certain task. Sometimes the individual parts are made up of groups of people, and sometimes it is machinery.
(3)Computers and programming or coding languages are a system and subsystem respectively. The computer parts work together to function and the languages also function using other subsystems of the computer and of the language itself. All of the computer languages can be facilitated to learn once the dynamics of a system are applied. Overall, the subject of computer science is just learning and applying a system.

Thursday, September 17, 2015

Name Card-Reflect

This experience of making name cards has its many values. The most enjoyable part is actually creating the product, because it sparks creativity and artistic capabilities, and you get new ideas along the way. Though, there were this projects ups, there were also their downs, especially the time concern and the define step; it makes you cut down some of the ideas due to time. The main improvement for this project is to add an extra day.

Name Card-Prototype/Test