PHP5.3 RC3 released

By daniel.enman - Last updated: Friday, June 12, 2009

The lastest and greatest PHP release candidate is officially out. You can download this at http://qa.php.net/.

PHP5.3 includes lots of major changes. Namespaces are finally supported in PHP (even after some debate over the namespace seperatetor), it also includes lambda functions, closures, and the new MySQL native driver.

There is lots new in PHP5.3. It’s a major update to the PHP language. Once I get a good feel for it, I’ll post a more comprehensive review of what’s new in PHP5.3 :-)

Filed in Computer Science, PHP, School, Technology • Tags: , ,

A New Framework (Cerenkov v2?)

By daniel.enman - Last updated: Sunday, May 17, 2009

Hi all,

It’s been ages since my last update, I know, but I’ve started (in December actually) working on a new web framework (in PHP of course). I’ll let post another update when I’m not so tired, and when I’m done some updates and got a little more work done.

Filed in Life

I didn’t…

By daniel.enman - Last updated: Saturday, April 25, 2009

Well… I didn’t write anything, maybe tomorrow

Filed in Life

I should…

By daniel.enman - Last updated: Saturday, February 28, 2009

Well, I should write something here, as a place holder. Maybe I’ll write an article tomorrow

Filed in Life

Object Oriented Programming Paradigm I

By daniel.enman - Last updated: Wednesday, September 17, 2008

This post relates to my CSCI383 course at Saint Francis Xavier University in Antigonish, NS. This post is mainly intended as post a study guide for myself, and to express to some concepts of OOP design and programming. Should you absolutely wish, you can get yourself a copy of “Introduction to Object-Oriented Programming, An (3rd Edition)” (ISBN: 0-201-76031-2). Note to my professor, Dr. Hao Wang, should he read this: This blog post was created to help me with my assignment (and the course in general), and I may answer some of the assignment questions in this post.

The fundamentals of Object Oriented Programming came about in the 1960s as part of a language called Simula, created at the Norwegian Computing Center, introduced a great deal of the major concepts that are now attributed to object oriented programming, such as objects and inheritance. In the late 70s, Alan Kay organised a group of researchers at Xerox PARC, where he predicted the rise in personal computers, and suggested that a simple programming language that would be understandable to non-computer professionals. Around that same time, Bjarne Stroupstrup was working on what would eventually become C++. This, along with a few other projects caused researched into Object Oriented Programming design begin.

Over the past two decades, object oriented programming has become very popular, with a great number of programming languages either supporting or requiring the OOP paradigm. The paradigm itself scales very well, and provides forms of abstraction that relate a great deal to objects in people’s normal, every day life.

With OOP becoming popular among many people, and being required (as in Java), or supported (as in C++), the language itself (as in non-computer languages) forces one to look at the problem (or the world) in a different way. One of the most popular examples of this is the Eskimo and the snow. Eskimos have numerous word to describe the different types of snow that falls. While you may think of snow as snow (and be able to tell the minor difference between snow types), it would appear to a non-Eskimo that they have different eyes to be able to tell the difference. But that is not the case! The language they speak forces them to look at snow in a different way, where as in English snow is snow.

In linguistics this is a part of a hypothesis called the Sapir-Whorf hypothesis (the actual hypothesis goes much deeper and is greatly controversial). This thesis suggests that it is possible for a person (Person A) that speaks one language can imagine a thought, or speak certian ideas that cannot be translated in anyway to another language, or even understood by a person (Person B) who speaks another language (and not the language Person A speaks). This is in complete contrast to the Church Conjecture, which states:

Church’s Conjecture: Any computation for which there is an effective procedure can be realised by a Turing Machine

Although this conjecture cannot be proved, it remains accepted among academics. The conjecture itself is in direct opposition of the Sapir-Whorf hypothesis. The basis of the Church Conjecture, is that fundamentally, all programming languages are the same. Any process in one language can be created in another. Many linguists now accept a more “Turing-equivalence” for languages, in a similar idea as the Church Conjecture for programming languages. Linguists now believe that, with enough work, an idea in Language A can be translated to Languages B.

So, with the background and history of OOP down, it’s now time to talk about some of the theory behind it. There is a good example in the book of a real-world model for an OOP design, which I won’t lay out (you can probably find one online, or think of one yourself). We first need to think of a method of transport, so objects can tell each other what they need to do (or better what they should do). In an action is required of an object, another object can send a message to the object responsible for the required action. The message has along with it the request for the action, and any arguments that is needed in order to follow out the request. The object that receives the message, can choose to accept or deny the message. Should it accept, it agrees to carry the required action, via a method. Of course, some objects will have to perform some actions to avoid an infinite regression.

There is a difference between procedure (or function calls) and messages. With a message, there is a sender and a receiver, however, with a procedure call, there is neither. There may also be different interpretations of the message. Depending on the receiver, there could be different ways the object handles the message. This leads to the responsibilities of objects. Within the object-oriented paradigm, there is a great deal of abstraction. When the sender of a message sends that message to a receiver, the receiver can choose to handle that message how ever it deems fit.

You may be wondering when I say object, what I mean. An object is simply an initialization of a class. You now may be wondering what I mean by class. A class is the definition of what an object should do. When you program with OOP, what you write is the class, which is then initiated into an object for use with other objects.

That’s all for now, as it’s nearing 1AM, and I’ve written nearly 1000 words. If you want to continue reading on OOP, the next bit in the book is on Class Inheritance, and Method Binding… I’ll leave you to Wikipedia it.

Until next time, stay safe.

Filed in Computer Science • Tags: , , , , , ,