Thursday, April 23, 2009

Ruby

This morning I was writing a history paper and decided listening to music was the best way to go about it. While I was listening to the radio, the song Ruby came on by the Kaiser Chiefs. I was thinking about it during the song, and realized that Ruby is actually a programming language too, so I decided to write about it a little bit. The name decision was between "Ruby" and "Coral", but Ruby was chosen because it is the birthstone of one of his colleagues. Ruby was developed in the mid 1990's in Japan and is inspired by Perl, and is a dynamic general purpose object-oriented programming language. The producer Yukihiro Matsumoto of Japan said the he developed the language for "the programmer productivity and fun" and follows the principles of good designs. It is also said to follow the POLS (Principle of least surprise) and is made in order to minimize confusion for experienced users even though the designer did not intend for it to follow that principle. It is a good language to make games on and such, becuase of the little confusion and good use of graphics.

Wednesday, April 22, 2009

SE Linux

Hey everyone, today during one of my classes we were discussing SE Linux and it seemed to really intrest me. I thought about looking up some random facts about it, and try to figure out some interesting things about it. SE Linux stands for security enhanced linux and it a feature by linux to provide a number of security policies. It was original tested in 2000 by the "open source development community" and was developed by the National Security Agency (NSA). About SE Linux, the NSA stated "It provides a enhanced mechanism to enforce the separation of information based on confidentiality and integrity requirements, which allows threats of tampering and bypassing of application security mechanisms to be addressed and enables the confinement of damage that can be caused by malicious or flawed applications".

It is available in Red Hat Enterprise Linux and for all future releases. Some of the features of SE Linux are its independent of specific policies and policy languages, as well as specific security formats. It also is a very flexible policy and supports policy changes.

Tuesday, April 21, 2009

Blue

I was thinking about writing about a prgramming language that I never heard of before, so I looked up a list on google. I picked the most interesting sounding language to me, at that was the language "Blue". Blue is used mostly as a teaching tool for students learning about object orientated programming. The prgrams are done in a collection of classes which is also called a "project". The blue enviroment also allows very flexible testing and incremental software development.

It is a fairly simple language to understand the code. For example, to add you have to use the addition sign "+", and to print a message all you have to write is print("string"). The special syntax that allows you to shorten the code instead of writing long lines is known as an alias. Alias' do not add any special functions to the program however, they are only for visual use by making things easy for the programmer and the reader to read. In conclusion, Blue is a very good language to learn about the basics of object orientated programming, howver, it is not the best to use for programmers on a higher level up.

Monday, April 20, 2009

Ada

Today I was thinking about programming languages to talk about and came up with researching about Ada, and not the American Dental Association. Ada was developed in 1977 by a tream contracted by the U.S. Department of Defense and is extended from Pascal and other programming languages. According to wikipedia, the language was named after Ada Lovelace who is credited for being the first computer programmer.

It was originally targeted for real-time and embedded systems, and supports a large number of compiler check to help avoid bugs during a run time. To allow a better quality for error messages, Ada does not allow you to use a ';' without putting a statement before hand. Also, if you want to declare a variable as empty you need to declare it by NULL. You can also avoid a dangling conditional statement, the user has to use an 'endif' statement to keep everything organized and working correctly. All in all, the Ada language is fairly easy to use and allows for functions such as strong typing, run-time checking, and parallel processing.

Tuesday, April 14, 2009

Going old school: MS Dos

Today I was feeling like researching up something from the past and decided to write about programming in MS Dos. To begin, MS Dos stands for Microsoft disk operating system and it was released in 1982. MS Dos uses a command line interface meaning users had to type in commands instead of being able to click commands, and versions such as Windows 3.11 used in a graphical user interface which made things easier to see for the user.

The MS Dos commands help the user so that they will be able to find out whats going on in the low level. A list of commands can be found on www.computerhope.com/msdos.htm. It supports some commands that Linux also supports such as path, batch, and chdir. It also supports its own commands such as command, break, and backup.

Monday, April 6, 2009

Just a giant heap of...

After talking about trees, and Binary Search Trees, I am going to expand upon that today and I will talk about a different kind of tree called a heap. A heap is a binary tree in which the root node is larger then both of its two children. It must also be a complete tree which means that every level has the maximum number of children and the bottom level is shifted as far left as possible. This way is easier to find the maximum value in the tree since it will be at the very top. This type of tree supports 3 different methods, which are heapify, heap_sort, and build_heap. Heapify compares a certain node to the number below it and if it is smaller, it swaps the 2 node's position. Heap_sort exchanges the last node in the tree with the largest node and then disconnects the largest number. By the end the tree is sorted from the smallest number at top to the largest number at the bottom right. Finally, build_heap uses an array and the uses the heapify method to make the heap tree.

Sunday, April 5, 2009

BSTs

As a continuation of my last post, I am going to go more in depth with the different kinds of trees. Today I will talk about the first kind of tree that I learned about in school, and that’s a Binary Search Tree, or BST. A BST is a tree in which the maximum amount of children that a node can have is two. Also the nodes are set up so that the left subtree contains a smaller number than the root, but the root is smaller than its right child. A BST supports a lot of functions, such as search, sort, insert and delete.

The insert function puts a node at the bottom the tree, following the root down, and going to the left or right depending on if it's greater or less than the root, until it reaches a null node. The delete function deletes a given node, and then switches that position with the nodes successor. It is also fairly easy to search, by going left or right depending on the value until you reach a null node or the value you were looking for. My next post will be comparing the BST to a Heap tree so look for that coming up soon.

Tuesday, March 31, 2009

Binary Trees: Not Just in Nature


Computer programming does not only deal with the different programming languages, but it also deals with different data structures. Recently, I was taught about the importance of the tree data structures and how there are so many different kinds of trees. The three different kinds of trees I learned about throughout the past year has been a binary search tree, a heap tree, and a red-black tree. A tree consists of a node, which then goes down and connects to other nodes which are its children, and continues to the last line when the children do not extend to anything else. In a binary tree, the maximum amount of children that a parent noode can have is two, which means that the maximum number of nodes on a level is 2^n. Each type of tree which will be described shortly, has different methods and algorithms to sort, insert, and delete nodes from the tree with different time complexities and their own unique style. For my next post, I will talk about how the trees are different, and which ones appear to be faster.

Saturday, March 28, 2009

Turbo Pascal

This morning when I woke up, I was thinking about what actually got me to choose computer programming as my future profession. I thought all the way back until my freshman year of high school when I decided to take a computer programming class. In that class we learned how to program in Turbo Pascal, which I had a lot of fun doing and then decided that this is what I want to do for the rest of my life.

Turbo Pascal is a very simple language, where a lot of the commands we used were pretty self-explanatory such as Write (to write a sentence) or readln (to read in an input). The first version of the software was in 1983 and is known to be the first popular IDE (or Integrated Development Enviroment). In my opinion, Turbo Pascal is a very good version to learn how to use GUI's (Graphical User Interfaces) and is a good way to ease into Java and C++.

Thursday, March 26, 2009

The Important SQL


Lately I've been searching for a summer internship, and while looking, I've noticed that many companies like the intern to know about SQL. I didn't really know what it was so I decided to look it up. SQL stands for structured query language and it is a database computer language that is designed for management and retrieval of data in a database system. The functions that are included are retrieval, updating, insertion and deletion. The SQL is divided into many different sections such as the Call-Level Interface, Object Language Bindings, Information and Deifnition Schemas, and many more. Another set of key words are the Data Definition Language. The most important functions of the DDL are create, alter, rename, truncate, and drop. Using the SQL is very important when it come to managing and retrieving items and that is why many companies require it.

Thursday, March 19, 2009

Why Linux?


After writing aboput operating systems I was thinking about which operating system would be the best to use. I was looking online for the advantages of the Linux OS and found a lot of them to be interesting. One of the reasons is the stability of Linux, as it can run for years without having to be shutdown and turned off. Another reason why it is better than Windows is the security, because 1) it is very hard to get a virus and 2) if you get a virus alot of people can help you look at the code and see what is wrong becuase it is open source to everyone. Price is also a big positive when it comes to Linux over Microsoft as it is completely free of charge to download, whereas the CD of the Windows Operating system can cost up to $300.00! When it comes to installing software, you can either get the software legally for free, or you can buy the software from microsoft or take the dangerous road and illegally download it. Which one sounds better to do? In terms of safety, legability, effiency, and price, Linux is definitly a very good alterniative to the Microsoft Windows Operating System.

Operating Systems and the Importance of Interrupts

An operating system is the interface between the software of the computer and the actual hardware. It handles the operation of the hardwarwe which makes it easier for a person to write an application program. Examples of the most common operating systems that are used are Microsoft windows, Mac OS, Linux, and Solaris. The busiest part of an operating system is the kernel, which is always running at all times. The kernel loads a program code into memory and then executes the program.

Kernels also handle a computers interrupt which is very important in creating the code for operating systems. If an important method comes up that must be run at a certain time, such as a plane's engine goes down, that code can interrupt whatever is running so that the most important things get run first. Interrupts can save a computer system from failing, as well as saving a car from hitting something else. If a part of code gets interrupted that is called priorty pre-emptive scheduling. If a higher priority function comes into a waiting queue, then it can pre-empt whatever is running at the time in order to maintain safety and effiency.

Sunday, March 15, 2009

Languages of Web Programming: HTML vs. Java

With the way the world is and almost everyone having access to the internet, I decided to look into the different languages of web programming and what theyre advantages are. One of the most known programming languages is HTML. It has limited power, and is only definied as computational power which means that certain tasks will be performed poorly. These tasks include if the server gets overwhelmed with tasks or if it is i highly interactive website. Safety is the biggest issue in HTML, as viruses can arrise from downloading binary source code from conventional programming languages.

An alternate language that you can use other than HTML is Java, which I described as before, is derived from C++ and is constant being upgraded in terms of performance and safety by Sun. There is also the JavaScript language which is netscapes language to interpret HTML. It is very similar to Java but differs because it interprets information instead of compiles code, and also extends HTML while keeping it easy to use.

Thursday, March 12, 2009

Multiprogramming? Pretty good

While searching through peoples blogs today, I found one named Innovashun which describes different technological positives and negatives. I came across one of his posts which the author Rob talks about multiprogramming and how you need it. After thinking about it I can do nothing but agree with his posts. He talks about how many programmers think that C is the only programming language that they need to know and that they are wrong. Every programmer should be able to work in a Linux/Unix enviroment with mulithreaded programming. This is because each process holds its own seperate address which allows different processes not to interrupt each other and therefore you can get the correct data the whole time. Although C is a very good programming language, the way to get the best possible results is by multiprogramming with multiple threads. It is definitly time for as Rob says for people to "start waking up" to multiprogramming and not only focus on programming in C for all their needs such as object orientated programming.

Wednesday, February 25, 2009

Programming with a Plan

Hello everyone,
In order to be able to program various things, it is importat to know how to set up a program and go into a project with a plan. There are three important parts of a program: the outputs that are required, the inputs that you will recieve, and finally the alorithm to order to get the desired outputs from the recieved inputs. To make things easier upon yourself, take out a seperate piece of paper and write what you want to do before you actually try to code it. After you finish coding the program and run it you can determine if it does what you want by checking out what the outputs were.
If you do not get the outputs that you want then the best thing that you can do is take a small break and get out a sheet of paper and follow the different sections to determine a variable's value at that given point. One of the good things that you can do is draw a picture or diagram, especially when you get to the more complex codes. When you use these steps, then you can make a good program without having a lot of stress

Wednesday, February 18, 2009

Job loss?

With the economy of the ways that the economy is going, I thought I would start a rant of how computer programmers are being affected by it. A couple weeks ago, I was getting bored while sitting in my dorm room, and decided to look at the news. What I saw was a story about how Microsoft will be laying off 5,000 of their workers over the next 18 months. The lead maker of microchips, Intel, had to lay off another 5,000 to 6,000 workers in order to accommodate for its 23 percent revenue loss according to the NY Times. Also, while sitting in class, our professor stated that IBM was one company that would no longer hiring people for their internship program. As a computer science major, and just in general trying to find a job is becoming to get very stressful since getting an internship is mandatory. It is getting hard to find a job willing to pay for you to work for them as an intern, which is pretty scary. Hopefully the economy gets better soon.

Thursday, February 12, 2009

Intro language: C++ or Java

Hello all. Today I would like to talk about the 2 different languages that most schools use in their introduction to programming courses: C++ or Java. I was looking up earlier which one would be more beneficial to use and determined that it all depends what the students want to do in the future. In fact, the syntax of the two different languages are very similar to each other which may be because Java was derived from C++, but there are many differences. One of the most important differences is the speed, where C++ programming is significantly faster than Java programming . The advantage to Java programming though is its use in object oriented programming with their use of the GUI,or graphical user interface. A person, or school that is trying to learn and teach the art of making games online might want to use Java because of its graphics and also because some experts see C++ as being outdated. However, a person having to solve company based issues with tough or long algorithms may choose to write the program in C++, due to its simplicity and its speed. Schools may never agree which programming language to teach first, due to the advantages of each, but both are used in the business world effectively.

Sunday, February 8, 2009

Under it all: All the bits and bytes

While thinking about making games and making big programs on the high level programming languages I was thinking about how it all started and what is underneath all of the complex code. In order to understand what goes on with the high level computer languages you need to understand what goes on underneath it all. Computers are full of 1's and 0's which are called binary numbers. These numbers all group together to make different letters, numbers, and characters. In order for you to convert a number into binary you have to follow a series of steps.

1. Divide the number you are trying to convert by 2
2. The remainder gets written down as a 0 or a 1.
3. Repeat steps 1 and 2. The remainder will be written to the left of the number written before it until you can not divide the number any longer.

So why is all of this important? A computer bit can hold 1 binary number. A byte consists of a group of 8 bits grouped together and can hold any kind of character or number depending on what order the binary numbers are in. For example, the letter 'A' is 01000001 and 'a' is 01100001. It can get frustrating for computer programmers because if a 0 or a 1 is in the wrong spot, a program can do something completely different then what you want it to do.

Monday, February 2, 2009

Introduction

Hello all and welcome to Popping Programming! This blog will cover all the basics of programming you need to know such as proper syntax, form and different languages. It will start off talking about the basic languages that many programmers know such as Java and C++ and will then continue on to the languages not as well known such as Pascal, Dylan, and Ada. All programming languages consist of a compiler which converts the source code written by a programmer into machine language. After you write the code, you want to compile it and then you will know if the program has any errors or if it is error free. If it is error free, you are able to run your program to make sure that it does what you want it to do. If there is an error int your source code however, you have to correct it in order to make a working program!