Get a Grip With Object-Oriented Programming

•August 10, 2009 • Leave a Comment

Last semester I also took Object Oriented Programming with C++. Neither Object Oriented Programming (OOP) nor C++ that I have experience before. So, this subject was really a challenging subject for me.

Of course the subject started with C++ first. In a so called “Normal Programming” C++ is a similar concept of programming with other programming languages. I have experienced in Visual Basic 6, so I can understand the concept of C++ quite fast. I can finished the first assignment with a good mark. One thing that I have to understand from C++ is its functions. Some C++ functions are very useful, and Visual Basic doesn’t have them, such as vector, map, and list. Three of them are a kind of array functions, that have their own purposes.

After the first assignment the course started taught the OOP. From that time, my though time in this course has been started as well. hehehe… It was really not easy to understand the concept of OOP, in addition it must be applied in C++. The most difficult part in C++ programming is the implementation of pointer, with the concept of OOP.

With very early understanding of OOP and C++ I have to solve my next assignment. In this assignment I need to develop a game that control a hero in order to reach a princess in a maze, of course with the implementation of the OOP. The game, screen, hero, and princess should be define as an object, and every object has their own properties and connection to another object. I can say that the assignment is the most frustating assignment for me. Luckily, the second assignment was the peak of my trouble. A few week after the submission of assignment 2 the course lecturer provided the “answer” for the second assignment, which made me clear how to program in OOP. I could solve the rest of the assignments better.

Object Oriented Programming is a very good concept of programming. When doing programming with OOP, everything are objects. Even the bigger object could be splitted up into several objects, and all similar objects could have the same parent object. I think OOP can make the development software process much easier, including the debugging of the program.

It’s really too bad that Visual Basic 6 doesn’t support OOP. I guess I have to switch my programming language, such as C++ or Visual Basic.Net, and hopefully I can do it soon enough. I have my finger crossed. :)

Learning Database Systems

•August 9, 2009 • Leave a Comment

Last semester I studied Database Systems from USQ as an external student. As a application programmer, I thought Database Systems will not give so much difficulty to me. The first few sessions I could understand the concept of Database Systems easily. But, come the new part to me.

I thought quering a database only can be done through SQL statements, but then I found out that there are another two quering methods. There are Relational Algebra and Relational Calculus. Hoooo, this two surely are confusing. Generally SQL, Relational Algebra, and Relational Calculus are the same, but the implementation of those are different. I have an example for those from one of my assignments.

Consider a Relational Schema:

Contest(starter, ender, pointsStarter, pointsEnder, debatedate)
Debater(name, club, age)

Question

Give all contest details of contests where the starting debater is a member of the “Plato” club and prevented his opponent from scoring any points.

Relational Algebra

(Πstarter, ender, pointsStarter, pointsEnder, debatedate(σpointsStarter>=pointsEnder(Contest))) |>
Contest.starter=Debater.name (σclub=’Plato’(Debater))

Relational Calculus

{st, en, ps, pe, dd | (∃nm, cl, ag) (Contest(st, en, ps, pe, dd) /\ Debater(nm, cl, ag) /\ (st=nm) /\ (ps>=pe) /\ (cl=’Plato’)}

SQL Statement

SELECT Contest.*
FROM Debater
JOIN Contest ON Debater.name = Contest.starter
WHERE Debater.club = ‘Plato’
AND Contest.pointsStarter >= Contest.pointsEnder;

Can you understand the Relational Algebra and Relational Calculus above? For me, it’s quite confusing for the first time. After several times trying to understand, at last I understand what they meant. But, one thing still hang on my mind, what are Relational Algebra and Relational Calculus for? Because, in these years I only use SQL statement. So, anyone know?

Second Encounter with PHP

•November 9, 2008 • Leave a Comment

My other assignment in this semester was to develop a website (web application) using PHP. I’ve ever used PHP before when I had been asked to amend my office website. That time I only needed to amend the registration form, but I felt excited, even though I only depended on the internet.

This time before I started the assignment I prepared myself by reading book about developing web application using PHP. The book title is “Aplikasi WEB dengan PHP dan MySQL” by Kasiman Peranginangin. As you see, the book is written in Bahasa Indonesia, but it’s a good book, even though I felt some of the definitions are wrong. It also has sample to develop about 3 complex applications, from the easiest to the hardest.

Based on the book, I proposed to develop a web application called “Movie Info”. The purpose of the web application is to show information of movies and let the registered users to give reviews to any movies. The book was really help me to develop the web application. I developed it roughly in 2 days, day and night. The web application is simple in appearance, but not bad in features (simple features, of course).

Movie Info

I think PHP is a good programming language. It has many useful function, and has native functions for accessing MySQL. But, compare to desktop programming languages, such as Visual Basic, PHP has a bit different way of programming structure. One thing that I notice is PHP can call the same PHP page but showing a different interface! I don’t know how ASP works, but maybe all of web (server script) programming languages has the same characteristic.

Other thing that I surprise is WordPress is also built by PHP! Oh, my God, how can they do that? I’m really amazed and excited. I guess in the same time I fell in love with PHP. :)

First Encounter with LaTeX

•November 1, 2008 • Leave a Comment

A few days ago I have finished my assignment for one of my course, Advanced Web Data Management. The assignment was to create a research report (literature review) about a topic that related to the course. So, I chose AJAX as my topic.

One of the assignment requirement was the report has to be written using LaTeX. LaTeX? At first, I puzzled what LaTeX is. After a few research in the internet I found that LaTeX is some kind a method or format that has been developed specifically for creating technical report. For further information it can be found here. So, LaTeX is only a format and in order to use it we need a software. There are a lot of software that can type in LaTeX format. I used LyX in Linux environment. Actually the original format of LyX is not LaTeX, but it can read and export to LaTeX format, and it has interface like a normal word processing software. The other LaTeX software that I found show the document tags in the interface like writing a HTML file, so they are a bit confusing, especially for me, which new to LaTeX.

LyX Interface

LyX Interface

In the beginning using LyX is a bit confusing, because it restricted and formatted my writing automatically depend on the style for the paragraph or line, such as “paragraph” style will treat the line of words as a normal paragraph, and “section” style will treat the line of words as a section head and LyX is automatically set a section number in front of the line. A good thing with LaTeX is that it allows the software to create PDF or DVI file directly. So, we can see the result file.

There is another confusion that I found when using LaTeX, it needs the writer to create a list of references in another file with “bib” extention, such as “refs.bib”, and then create a link to the reference file in the main document. But, somehow I could not manage to integrate the reference file and the main document into the PDF file, even though I tried using several LaTeX software. Until the time I submitted the report, I still faced this problem. :(

Overall I like LaTeX because it helps me set the format of the document automatically. The only problem that I faced with LaTeX is only integrating the reference file with the main document. I think I need to have some research to solve this problem for future assignments.

My Linux Blog Site

•September 21, 2008 • Leave a Comment

In order to prevent my current blog site being swarmed by linux and open source topics, I created a new blog site. This blog site will contain my experiences in Linux and my open source articles collection. The blogsite name is Dako-Tux.

I hope the blog is useful for everyone…

GBU

Movie Website

•June 1, 2008 • Leave a Comment

Last month I and my friend just created a website for movies. This website is intended to show the actors, synopsis, trailers, wallpapers, and reviews. If you are a movie-goers or just find an information or wallpaper about a movie, just visit our website at http://layarlebar.blogspot.com. I hope the website provide the information that you need.

If you has any suggestions or critics about our website just email to rdbiz.moviesforever AT gmail DOT com.

Enjoy !

Denzel on Fire

•June 1, 2008 • Leave a Comment

Last month when I watched TV, one of the TV program showed “Man on Fire” starred by Denzel Washington and Dakota Fanning.

The story was about a desperate man that just got a job as a bodyguard of a rich family’s little girl. He didn’t care about anything, just finished the job and got back to his room and frowning. He did this daily.

Until one day the parent of the little girl were out-of-town, so just left him, the little girl, and maids. Within these days they were getting closer and closer, until he loved the little girl like his own child. He taught the little girl how to swim faster and guided her in her homework.

One day when the little girl just finished her piano course, a group of men and corrupt policemen ambushed them, injured the man critically, and kidnapped the little girl. While the man was hospitalized, the kidnappers asked for ransom. Somehow the ransom hand over disrupted by some corrupt policemen, whom stole the ransom. Then, the kidnappers denied to have another ransom, and announced that they killed the little girl.

The man, who just barely healed his wound, vowed to investigate and revenge to the kidnappers and the corrupt policemen. He, who was helped by a journalist, investigated brutally and heartlessly. He killed almost all bad guys who involved in the kidnapping and stealing the ransom. In the end he found out that the little girl still alive. But, he has to exchange the little girl with himself. After the exchange, he died soon enough.

I think Denzel Washington played very good in this movie. He really can act fiercely, desperately, and fun. I like this movie, even though felt that the brutality in the movie. He is one of some actors that acted a lot of good movies in their career.

Protected: MoM – 06 Mar 2008

•March 9, 2008 • Enter your password to view comments

This post is password protected. To view it please enter your password below:


Adventure with Linux

•January 10, 2008 • Leave a Comment

The content has been moved to here (dakotux.wordpress.com).

I’m sorry for inconvenience caused.

Hello world!

•January 9, 2008 • Leave a Comment

Hello World…

This is my first blog. I have many things in my mind to share, but I have a problem how to share.
In this blog I will try to share about movies, songs, socials, technologies, computing, politics, and many more.

With my limited english and writing skills, I hope readers can give me some comments and critics, so I can improve my skills.

Best Regards,

David