Total Pageviews

Thursday, February 24, 2011

Object-oriented Programming Languages

In today’s programming world, there are numerous object-oriented programming languages in use. While many of these programming languages share similar characteristics, the each has unique differences that set them aside from each other. Some of the more popular object-oriented programming languages are JAVA, C++, Python, Objective-C, Delphi, and Ruby, which are languages that we will also focus on for the purpose of this commentary. As a starting point, let us focus on the most popular programming language today, JAVA.

The Java programming language is a high-level programming language, also a computing platform, that was introduced to the programming world in 1995 by Sun Microsystems. Programmers normally compile Java applications to bytecode that can function on any Java Virtual Machine. The JAVA language syntax is very similar to the C++ programming language, except the syntax offers a more straightforward object model and less low-level facilities. Sun Microsystems design goals for Java were “Object Oriented, and familiar, robust and secure, architecture neutral and portable, and high performance, interpreted, threaded, and dynamic”.

Bjarne Stroustrup introduced the middle-level programming language C++ in 1979 as an improvement to the C programming language. The “middle-level” classification is a result of the language’s low and high-level language attributes. C++ is an all-purpose programming language that is statically typed, free-form, multi-paradigm, compiled, and utilized in a variety of applications like operating system software, application software, firmware, server and client applications, and gaming software.

The Python programming language is a high-level, interpreted, programming language that was introduced in 1989.The focus of the Python design is on the code reading simplicity and it supports a variety of programming concepts like object oriented, imperative and, to a smaller degree, functional programming styles. Python also shares a comparable dynamic type system and automatic memory management with the Ruby programming language.

The Ruby programming language is also an object-oriented programming language that was introduced in 1993. Ruby was created with the intent to create a programming language that was “more powerful than Perl, and more object-oriented than Python”. Similar to Python, Ruby supports a variety of programming concepts like functional, object oriented, imperative and reflective.

The Objective-C programming language is an object-oriented and reflective programming language that was originated in the 1980s by Brad Cox and Tom Love. Objective-C takes traditional C programming and incorporates Smalltalk-style messaging. In today’s programming world, Objective-C is utilized in Apple operating systems.

The Delphi programming language, originally named Object Pascal, originated from Clascal, a previous version of Pascal, was established in 1986 to support the expandable Macintosh application framework called MacApp. In addition, an Object Pascal extension was incorporated in the Think Pascal IDE. The IDE consists of the “compiler and an editor with Syntax highlighting and checking, a powerful debugger and a class library”.

In conclusion, the aforementioned programming languages are all unique in their own way; but they are all, in some way, shape, or form, associated with one another. Each one of these languages is a mid to high-level programming language, a few have a similar syntax, and others use similar programming concepts. In the end, each of these languages is designed to fulfill objectives that the other languages do not.

Tuesday, February 15, 2011

Interpreters and Compilers


In the computer programming world, there are a number of tools available that can facilitate computer programming. In this commentary, we shall focus on two of these programming tools. These programming tools are applications called compilers and interpreters. Compilers and interpreters are applications that take high-level language applications and convert them into the 1s and 0s that computers comprehend, enabling the computers to execute the applications.

So then, one might ask what the difference is. A compiler application will interpret a full source application into machine code. The compiler then compiles the entire source and generates a finished and compiled version of the file. The programmer can then save the new version of the application on a storage medium. In addition, only after the application is completely converted can a computer execute the application. If the programmer modifies the source code, the programmer will need to recompile.

Conversely, an interpreter application furnishes the CPU the techniques to understand and execute an application formulated in source language line by line. As the initial line is converted and executed as it is encounters the interpreter. The interpreter then moves to the second string of source code and replicates the procedure. In addition, the interpreter is an application that is loaded into memory in conjunction with the source program. Furthermore, the application retrieves and executes the statements from the source application in sequence. Lastly, copies of the translation exist; therefore, the interpreter application must interpret the source application if it is to be re-executed.

Even though both applications make programming easier, programmers should also consider a couple other facts before choosing between an interpreter and a compiler. These facts are:
  • Since the interpreter loads into memory, a reduced amount of space is available during execution. On the other hand, a compiler only loads into memory during the compilation phase; therefore, only the machine code inhabits in memory during execution.
  • Re-executing compiled files do require the use of the compiler on every occasion; whereas interpreted language requires interpreting any time the application executes.
  • Machine code applications run quicker than interpreted programs.
  • Modifications are faster and unproblematic interpreted application than a compiled one.
Once the programmer chooses between a compiler and an interpreter, the programmer must then choose an interpreter application or compiler application to utilize. Utilizing the internet can simplify a programmer’s efforts to finding a compiler or an interpreter. The internet provides a variety of websites, like CNet, that provide access to compilers and interpreters that are free or that are available for purchase.  CNet provides a variety of compilers and interpreters for languages such as BASIC, Pascal, C, and C++. Some of the more popular compilers and interpreters are:

  • Dev-C++
  • Bat To Exe Converter
  • Silverfrost FTN95
  • ActivePerl (Windows)
  • Intel Visual Fortran Composer XE
  • Advanced BAT to EXE Converter
  • Digital Mars C/C++ Compiler
  • Net Express with .NET
A key fact a programmer must keep in mind when searching for an interpreter or compiler is that the compiler or interpreter must be compatible with the language that the programmer is developing the application source code.

Thursday, February 10, 2011

Programming Languages: Advantages and Disadvantages

In today’s programming world, a computer programmer has a variety of computer languages to choose from, so one might ask how a programmer chooses what language to use or what the advantages and disadvantages of these computer languages are. In order to answer these questions, let us start by identifying a few of the types of programming languages that are available in today’s society. They are:

Object-Oriented Languages (http://www.oop.esmartkid.com/seventhOOP.htm)
Advantages
Modifiability - small changes are uncomplicated in the data representation or the procedures in an Object-oriented program.
Maintainability - objects can be maintained separately, making locating and fixing problems easier
Reusability - objects can be reused in different programs
Disadvantages
Must be well managed
Instance (or shared class) variables of an object can be accessed by class-specialized functions, and called the same way as any other function
Not as effective on simple programs

Procedural Languages (http://javaboutique.internet.com/articles/ITJ/part02/page03.html)
Advantages
Easy to read program code
Easy maintainable program code as various procedures can be debugged in isolation
Code is more flexible as you can change a specific procedure that gets implemented across the program
Disadvantages
Modifying one part of the code requires modification of the entire code
As code grows, it gets harder to understand and modify
Hard to apply code from one program to another

Functional Languages (http://www.defmacro.org/ramblings/fp.html)
Advantages
Functions cannot cause side effects
Easy debugging
Concurrency ready
Disadvantages
No guarantee first line of code will be executed before second
Unable to do IO
Unable to interact with outside world

Now that we have gone over the types of programming languages, let us turn our attention to the specific programming languages available today. The programming world today offers a variety of different programming languages, but in the essence of time, we shall concentrate on the “TIOBE Programming Community Index for February 2011” top 10 programming languages. These languages are:


Java
C
C++
Python
PHP
C#
(Visual) Basic
Objective-C
JavaScript
Perl

These programming languages may be the most popular at this point in time, but what about the past and which one will be the most popular in the future. In order to make a better prediction of the future, let us look at the past; but, let us keep in mind that out of these top 10 popular programming languages, only the C programming language and the Perl programming languages are not object-oriented programming languages; they are Procedural programming languages.

Now, as far as the past goes, the TIOBE Software website indicates that the Java programming language has been the preferred or most popular programming language over the past 10 years, with the C programming language being a consistent second best. An exception to Java’s popularity reign was the time period between the middle of 2004 and 2005, when the C programming language surpassed Java as the most popular programming language. Just on this information alone, one can assume that Java will continue to be the most popular programming language; but, for the sake of being thorough, let us look at some more historical data. Over the past 5 years, the object-oriented programming language has been the most popular programming language and, as mentioned earlier, eight of the ten current most popular programming languages are object-oriented. Taking into consideration all of the past and present data, which indicates a continued preference in statically typed object-oriented programming languages, I am inclined to believe that the Java programming language will continue to be the most popular programming language.

Thursday, February 3, 2011

Securing Wireless Networks


Over the years, wireless networks have expanded exponentially in our society. Almost everywhere you turn, you can find a fast food restaurant, coffee shop, grocery store, or other businesses with a “Free Wi-Fi” sign; but wireless networks do not stop there. Homes all over have also jumped on the wireless network band-wagon; and why wouldn’t they. Wireless networks grant us the ability to abandon the wired connection and embrace the freedom to roam around. With the rise in wireless networks, we must not only focus on the freedom that wireless networks offer, but also the vulnerabilities. Two good articles that focus on securing wireless networks are “10 Tips for Wireless Home Network Security” by Bradley Mitchell and “Exploiting and Protecting 802.11b Wireless Networks” by Craig Ellison. These two articles focus a number of similar approaches to securing a wireless networks, but they also have different approaches. 

Let us begin by focusing on the similarities of the articles. Both articles recommend changing the default usernames and passwords on access points or wireless router because default usernames and passwords are very well-known by hackers. Another common recommendation in both articles is the recommendation to change the default SSID on the access point/wireless router because it signifies an improperly configured network to hackers. In addition to changing the SSID, both articles also recommend disabling “broadcast SSID” because it increases the possibility someone will try to log in to the network. Moreover, both articles make the recommendation to position wireless routers/access points near the center of the home rather than by the window because the closer the device is to the window, the stronger the signal will be reach outside the home. Last but not least, both articles also suggest turning off DHCP on the router or access point and setting up a fixed IP address range instead. This sums up the similarities of the articles, so let us move our focus to the differences.

These articles have a number of differences, but the one that is the most obvious is that the article by Bradley focuses more on wireless home networks, while the article by Craig Ellison focuses more business wireless networks. Other differences in the articles are the WPA Encryption, improper SSID naming, surveying for “rogue” access points, Radius authentication, disabling auto-connect to open Wi-fi Networks, enabling Firewalls on computers and router, turning and turning off network during extended periods of non-use. As you can see, even though the articles had a lot of similarities, they also consisted of several differences. In the end, they both offer a lot of good advice on how to secure a wireless network.
In addition to the similarities and differences between the articles, I also learned a term that I was unfamiliar with. The term I am referring to is SSID or Service Set Identifier, which uniquely identifies a wireless network. As mentioned earlier, the SSID is important because it can attract unwanted attention from hackers who are looking for easy to access networks, especially those that have the default SSID because they likely have the default username and passwords.