February 9, 2010 at 5:25 pm
· Filed under Software Development
George Westinghouse bir teorisyen değildi fakat 1800′lerin en büyük mucitlerindendi. En büyük icadı raylı sistemlerde kullanılan havalı frendir.
Bu yazıda Westinghouse’ın fikirleri ve bilgisayar bilimlerine yapmış olabileceği katkılar üzerinde duracağız.
Tren Frenleri
Atlar tarafından çekilen Wagonways isimli ilk tren 1550′lerde Almanlar tarafından kullanıldı. 1804 yılında Richard Trevithick buharlı tren ile 9 mil boyunca 10 ton demir ve 70 adam taşıdı. Bu kısa yolculuk modern trenlerin başlangıcıydı.
Read the rest of this entry »
Permalink
February 6, 2010 at 8:30 pm
· Filed under Java
Encapsulation
Do not expose class variables, instead of doing this, use setter and getter methods and keep class variables private.
public class Car {
private int price;
private int maxSpeed;
public int getPrice() {
return price;
}
public void setPrice(int price) {
this.price = price;
}
public int getMaxSpeed() {
return maxSpeed;
}
public void setMaxSpeed(int maxSpeed) {
this.maxSpeed = maxSpeed;
}
}
What is the advantage of previous usage, first of all flexibility. For example you have changed your mind, decide to keep max speed read only. So we can just remove setMaxSpeed method or change it to private for internal use.
Another advantage is validation, if user want to set negative value for car price, so you can add a validation in setPrice that is it.
Is-A and Has-A Relationship
So, Ferrari is a Car, Cow is an animal lets codify these statements.
Read the rest of this entry »
Permalink
July 23, 2009 at 6:04 am
· Filed under Java
An introduction to Java programming languages. This post is intended to people who already know Java language but not sure about limits of what they can do and they cant such as which identifiers are valid which are not valid. An array can be defined in how many different ways ? Variables in interfaces. Enum definitions. Naming rules.
Read the rest of this entry »
Permalink
July 13, 2009 at 2:03 am
· Filed under Java
A thread allow us to run task simultaneously. In this post you will learn how to initialize a thread, what is Runnable interface and Thread class, when we use Runnable or Thread classes, running multiple threads, thread synchronization.
Read the rest of this entry »
Permalink
June 24, 2009 at 6:58 am
· Filed under Software Development
Bir çok proje takımında aşağıdaki kuralları uyguladım. Bu kuralların iyi dizaynı, hızlı geri bildirimi teşvik ettiğini ve proje takımlarını sorunlardan mümkün olduğunca uzak tuttuğunu gördüm.
Bir test aşağıdakilerden herhangi birini yapıyor ise unit test değildir.
Read the rest of this entry »
Permalink