作为Java语言创始人之一的James Gosling(詹姆斯·高斯林),被称为Java之父,对于学习Java的开发者而言,我们有必要对他有一定的了解,本篇文章帮你全面的认识Java之父——James Gosling。

 

 

James Gosling

1955年5月19日,在加拿大的一个村庄里,Gosling家的第一个男孩哇哇落地了。家人给他起了名字,叫James。谁也没有想到的是,长大之后,他成为了一个改变计算机语言的天才。

James Gosling从小就喜欢技术,爱鼓捣东西。12岁的时候,他用报废的电话机和电视机中的部件做了一台电子游戏机。附近农民的联合收割机出了问题也常常找他修理。14岁的时候,中学组织到附近大学参观,他记住了大学计算中心的门锁密码,从此开始偷偷地溜进计算中心,学习计算机编程。一年后,大学的天文系招他当了一名临时编程员,编写计算机程序来分析卫星天文数据。

1977年获得了加拿大卡尔加里大学计算机科学学士学位,1983年获得了美国卡内基梅隆大学计算机科学博士学位,博士论文的题目是:"The Algebraic Manipulation of Constraints"。

1983年到IBM工作,设计IBM第一代工作站NeWS系统,但不被看好; 1984 年加入Sun公司,并一直服务于Sun公司,直至Sun被收购。80年代初,James Gosling获得博士学位后到IBM工作,设计IBM第一代工作站。当时,IBM的领导层并不看重工作站项目。失望之余,James Gosling跳槽到了Sun公司。他花了五年功夫领导开发的和OS2很类似的Sun NeWs窗口系统,尽管得到技术界的好评,却未能变成流行的产品。当时他还第一个用C实现了EMACS的所见即所得文本编辑器COSMACS。

1990年,在Sun公司,与Patrick Naughton和Mike Sheridan等人合作“绿色计划”,并发展一套语言叫做“Oak”,后改名为Java。

2010年,随着Sun被Oracle并购而加入Oracle,担任客户端软件集团的首席技术官。

2010年4月从Oracle离职。

2011年3月29日加盟google, James Gosling因不满甲骨文收购太阳微系统公司而加盟google。

2011年8月30日,仅仅加入Google数月之后的高斯林就在个人博客上宣布离开Google,加盟一家从事海洋机器人研究的创业公司Liquid Robotics,担任首席软件架构师。

在2011年5月建立的Scala公司Typesafe Inc., 高斯林被聘请为公司顾问。


计算机编程艺术

在编程的过程中,难免要在程序多加入一些代码,这势必将让程序复杂性增加。

但是你没有多写入一些代码,用户体验程序就会很复杂。

高斯林曾谈论过计算机编程艺术,他认为和精力守恒定理一样:你投入到程序中的精力越多,用户使用时遇到的麻烦和折腾的精力就会越少,程序员要做的,正是在开发端和用户端之间尽量平衡开发和用户的复杂度。

Go结合Java gosling java_计算机编程

祖师爷这一段代码你看懂了吗?

近日,有程序员网友曝光了Java之父写的一段代码,祖师爷这段代码你看懂了吗,有没有很牛逼呢?

[Listing One]

PingPong class PingPong extends Thread {
String word; // what word to print
int delay; // how long to pause
PingPong(String whatToSay, int delayTime) {
word = whatToSay;
delay = delayTime;
}
public void run() {
try {
for (;;) {
System.out.print(word + " ");
sleep(delay); // wait until next time
}
} catch (InterruptedException e) {
return; // end this thread
}
}
public static void main(String[] args) {
new PingPong("ping", 33).start(); // 1/30 second
new PingPong("PONG", 100).start(); // 1/10 second
}
}
[Listing Two]
Account class Account {
private double balance;
public Account(double initialDeposit) {
balance = initialDeposit;
}
public synchronized double getBalance() {
return balance;
}
public synchronized void deposit(double amount) {
balance += amount;
}
}
[Listing Three]
synchronized_abs /* make all elements in the array nonnegative /
public static void abs(int[] values) {
synchronized (values) {
for (int i = 0; i < values.length; i++) {
if (values[i] < 0)
values[i] = -values[i];
}
}
}
[Listing Four]
class Queue {
// The first and last elements in the queue
Element head, tail;
public synchronized void append(Element p) {
if (tail == null)
head = p;
else
tail.next = p;
p.next = null;
tail = p;
notify(); // Let waiters know something arrived
}
public synchronized Element get() {
try {
while(head == null)
wait(); // Wait for an element
} catch (InterruptedException e) {
return null;
}
Element p = head; // Remember first element
head = head.next; // Remove it from the queue
if (head == null) // Check for an empty queue
tail = null;
return p;
}
}
[Listing Five]
Thread spinner; // the thread doing the processing
public void userHitCancel() {
spinner.suspend(); // whoa!
if (askYesNo("Really Cancel?"))
spinner.stop(); // stop it
else
spinner.resume(); // giddyap!
}
[Listing Six]
class CalcThread extends Thread {
private double Result;
public void run() {
Result = calculate();
}
public double result() {
return Result;
}
public double calculate() {
// ...
}
}
class Join {
public static void main(String[] args) {
CalcThread calc = new CalcThread();
calc.start();
doSomethingElse();
try {
calc.join();
System.out.println("result is "
+ calc.result());
} catch (InterruptedException e) {
System.out.println("No answer: interrupted");
}
}
}