Wednesday, November 21, 2012

What is More Important Thing Than Coding?


 Considering appropriate name is important for programming. When I read Chapter 7 of Code Complete which talks about High Quality Routines, I strongly agreed with idea of Good Routine name. It gives us few key points for naming routine and it is divided into eight:

  • Everything describe the routine does
  • Avoid meaningless, vague, or wishy-washy verbs
  • Don’t differentiate routine names solely by number
  • Make names of routines as long as necessary
  • To name a function, use description of return value
  • To name a procedure, use a strong verb followed by an object
  • Use opposites precisely


It talks about that appropriate name helps us to understand what routine does. Conversely, improper name routines could make us confused. For example, short name of routines could be easy to write, but it will be highly possible that name of routine might be weak name. However, too long name of routine is improper as well. The book says that “Research shows that the optimum average length for a variable name is 9 to 15 characters.”(171) I think that too much described names can be too long name. In addition, Avoiding wishy-washy verbs is important to name routine because some term of words has several meanings and covers huge meaning such as calculate, call or so on. Those wishy-washy words will not be appropriate name for routine.

Of course, appropriate name is good not only routines but also other objects. As I mentioned above, Weak naming variable makes program harder to understand. If we use weak name for other, it makes us confused as well. In my case, I used to write too short names because it was easy to write. Of course, it did not describe what object does. I just described number or string. We can use any term of words for them such as num1, DailyPay, or etc. So, this is why I used to write short name for them. However, if we use any term of words for variables, program can run. However, it can make our brain confused. One day, I wrote a little long program with short variable names. Finally, I got confused. So, nice described variable name is important for programming.

Example:

1:Answer = number1 + number2

2:TotalSalary = NumberDayWorked + NumberHoursWorked

As you see, second example is absolutely better than first one. First one can run, but we do not know and expect what number1 and 2 do. On the other hand, we can expect what Number DayWorked and NumberHourWorked somehow.

Friday, November 9, 2012

The World's first RDBMS!



Nowadays, most people have heard term of database and some of them have known function of database. In my case, I had learned basic things of database. However, I do not have enough knowledge of it. According to Chapter 2 of Engineering Long-Lasting Software, "Database have historically provided high durability for stored information." I am very interested in history of relational database because I know how to code for relational database, but I do not have a history of it.

Recently, Oracle, IBM, and Microsoft are famous for Relational Database. those three companies mostly keep 90% of the market share of database. However, question came up.
Which company did develop it and start servicing it?




Edger F. Codd who worked at IBM wrote a essay titled "Derivability, Redundancy, and Consistency of Relational Store in Large Data Banks" in 1969. Database is based on contents of that essay. It talks about definition of relational algebra and calculus, and using predicate logic for controlling database. this is the origin of Relational Database.






in 1973, IBM launched project "System R." at the same time, Michael Stonebraker who was in University of California, Berkeley launched original project INGRES(Interactive Graphics Retrieval System), inspired by essay of project System R.

INGRES by Stonebraker had developed gradually and it had supported to create  other RDBMS such as Sybase, SQL server, Informix, and so on.



Larry Ellison who was in Ampex cooperated with his bosses to establish a company Software Development Laboratories in 1977. it had changed name of company to "Relational Software Inc." in 1979 and it had changed its name again to "Oracle Corp." in 1983. They made the world's first relational database management system(RDBMS) on UNIX in 1979. IBM made RDBMS which ran only on VSE in 1981 and another type of RDBNS which ran on only MVS in 1983. As diffusion of UNIX in 1980s, Oracle's RDBMS became popular because its RDBMS is based on C which is highly portable language. on the other hand, IBM's RDBMS could run on only IBM's OP.

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:
Java:

Ruby:
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:
Java:
Ruby:

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






ANOTHER EXAMPLE

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.