Wednesday, October 31, 2012

What is the good thing of Ruby?

This is the first time to learn Ruby for me. However, as compared with other programming language, which are Java, PHP, and so on. Ruby is much understandable programming language. Programming language of Ruby makes us simplify programming. There are many advantages of Using Ruby because it based on object-oriented. What are the advantages of Ruby?

Simple Example:

Output of each method shows the same result. As you see, method 3 in Java is the easiest one. However, Ruby’s one is much easier than Java’s ones to write. Ruby does not require semicolon and “System.out.println.” Of course, Ruby makes other situation of methods easier.

Simple looping Example 2:

In case of looping examples, both Java and Ruby show the same result. As you see, Ruby is simpler than Java. Ruby can cut unneeded part of programming language and give us extra time to work other things.

Object-oriented makes us create a data field and a method together. It means that we do not need to work them separately. The concept of object-oriented programming is “object.” We need to consider about object first, then what things should be around “object”. There is a list of benefits of object-oriented:

  •        The concept of a data class makes it possible to define subclasses of data objects that share some or all of the main class characteristics. Called inheritance, this property of OOP forces a more thorough data analysis, reduces development time, and ensures more accurate coding.

  •        Since a class defines only the data it needs to be concerned with, when an instance of that class (an object) is run, the code will not be able to accidentally access other program data. This characteristic of data hiding provides greater system security and avoids unintended data corruption.

  •        The definition of a class is reuseable not only by the program for which it is initially created but also by other object-oriented programs (and, for this reason, can be more easily distributed for use in networks).

  •        The concept of data classes allows a programmer to create any new data type that is not already defined in the language itself.

Those lists made by Margaret Rouse. She talks what is benefit of object-oriented programming easily. Here is entire article:

In case of this post, I just compare Ruby with Java. However, I found interesting article about Ruby. Its article compares Ruby with Perl and Python. I have never used and learned Python and Perl, but it shows how simple Ruby is. It shows the same program by Perl, Python, and Ruby. Unfortunately, It is in Japanese, but you can see code of them Here is article.

Thursday, October 25, 2012

How Can We Support Solving Your Problem?

I think that everyone has at least once the experience that faced a problem that is impossible to solve by oneself. Of course, there are many categories of problems such as study, project, relationship between friends, money and so on. In my case, I have so many projects which are graphic design stuff, web design stuff programming stuff, and movie stuff. Those stuffs can be made by oneself, but it is not good idea for making a nice product because an idea of product come from only oneself. According to Code Complete, it stats that “two head is often better than one.”(Chapter five of code Complete)

Feedback of product and sharing experience makes us absolutely create better product than creating product by oneself. Of course, I have experienced that feedback from friends and sharing experience made me create better product than creating product by myself. The reason why they can make us create better products is that each audience has their own experience that you have not experienced. Knowledge and experience that you have not known can tell new things and give a chance to reconsider about the product.

How to Share Experience

There are many way to share our experience. Just listen comment from audience who saw your product. There is absolutely easy way to obtain one’s experience. Nowsays, communication tool has developed. It allows us to get experience on online. LDS TECH is nice web site to get help and experience of others because so many professionals attend to this community. We can see so many discussions about technology that they holds. If you have question about technical things, they reply your question with detailed information. In addition, so many sites support your project such as Facebook, Twitter, any other social communication site as well. there is not only way to discuss about your project around table.

In case of programming, pair programming is good way to share because pair can check their code each other. In my case, I write a pseudocode or diagram on a paper as a design of entire programming and other code on computer. Then, we check each other and try to solve a problem or make it better.

Nice article: Benefits of collaborative web design
its article talks about how to share experience and why cooperating is important.

Tuesday, October 23, 2012

Relationship between Visual Basic and SQL

Chapter 4 of Code complete!
It shows many computer languages and each computer language how relate to each other. I have learned some of them which are Java, SQL, C, and Visual Basic. In my case, SQL and Visual Basic are the most interesting languages for me because they are easy to design. Especially, SQL cooperates with Visual Basic like a picture.  

In case of Visual Basic, Visual basic connects to SQL, and Microsoft Access. In case of picture, I made movie’s database in SQL developer, transformed it to Microsoft Access and transformed it again to Visual basic. Finally, contents of database that I made were shown up on Visual Basic. The pictures do not show entire system. Each movie shows one’s information from database. SQL and Visual Basic are totally different languages, but they can cooperate. It is so interesting for me. I think that Visual basic is a little familiar with language of Flash because those applications require an object to name something. I mean that objects controls and commands system to do.
For example, name of button is btnCalculate


btnCalculate commands like:
Private Sub btnClaculateCharges_Click(sender As System.Object, e As System.EventArgs) Handles btnClaculateCharges.Click
        NumNight = txtNight.Text
        NumNightly = txtNightlyCharges.Text
        txtRoomService.Text = 10.5
        txtTelephone.Text = 5.25
        txtMisc.Text = 3.0
        NumRoomCharges = (NumNight * NumNightly)
        txtRoomCharges.Text = NumRoomCharges
        NumAddCharges = (NumRoomService + NumTelephone + NumMisc)
        txtAdditionalCharges.Text = NumAddCharges
        NumSubtotal = (NumRoomCharges + NumAddCharges)
        txtSubtotal.Text = NumSubtotal
        NumTax = NumSubtotal * 0.04
        txtTax.Text = NumTax
        NumTotal = NumSubtotal + NumTax
        txtTotalCharges.Text = NumTotal
    End Sub

Then, after the press the button, system will follow the command and show result like the picture.
Language of flash also requires an object to name because the object also commands system to do. There is no image for that.I just know one familiar thing between Visual Basic and Flash.
I think that learning different computer languages at the same time is so difficult because each computer language has different instruction and different word. In my case, I always confused about that.