Key Moments

James Gosling: Java, JVM, Emacs, and the Early Days of Computing | Lex Fridman Podcast #126

Lex FridmanLex Fridman
Science & Technology6 min read112 min video
Sep 24, 2020|485,615 views|11,652|729
Save to Pod
TL;DR

James Gosling on Java, JVM, early computing, leadership, and software development.

Key Insights

1

Gosling emphasizes the beauty of mathematics and its parallels with programming's logical structures.

2

He advocates for writing dense code for better visual comprehension and minimizing whitespace.

3

Early computing vividly illustrates Moore's Law and the accessibility of building complex systems.

4

Gosling criticizes the 'jerk' leadership style prevalent in Silicon Valley and advocates for humane approaches.

5

He believes working hard is essential for significant accomplishments, refuting the 'work smart, not hard' adage.

6

Java's creation stemmed from identifying fundamental flaws in C/C++ like pointer manipulation and the need for safety and developer velocity.

7

The JVM was designed as an abstraction layer to overcome hardware vendor lock-in and provide portability.

8

Gosling advocates for taking calculated risks and learning from failures, preferring Star Trek's optimistic future over Blade Runner's dystopia.

THE ALLURE OF MATHEMATICS AND PROGRAMMING'S LOGICAL FOUNDATION

James Gosling draws a parallel between the beauty found in mathematics and the logical structures inherent in programming. He recalls early fascination with numbers and their properties, likening the process of finding optimal solutions in programming to navigating a graph of possibilities. This appreciation for order and elegance in abstract systems directly informed his approach to creating robust and understandable software, viewing both fields as deeply rooted in pattern recognition and logical deduction.

AESTHETICS IN CODE AND VISUAL THINKING

Gosling expresses a preference for a dense coding style, minimizing whitespace to see more code at once. He describes himself as a visual thinker, perceiving programs as intricate machinery with interconnected parts rather than just lexical structures. This visual mapping allows for a holistic understanding of a program's inputs, outputs, and functionality, enabling him to grasp complex systems more intuitively and efficiently, a contrast to more verbally-oriented thinking processes.

EARLY COMPUTING: FROM RELAYS TO MINI-COMPUTERS

His early programming experiences began on a PDP-8, a mini-computer with limited memory and speed. Gosling highlights the accessibility of programming as a powerful, material-free way to build things, contrasting it with his childhood spent dumpster-diving for electronics parts. He built a tic-tac-toe machine from relays, encountered power supply challenges, and survived early tech experiments, underscoring a hands-on, resource-constrained approach to innovation that characterized his formative years.

THE SEMINAL ROLE OF SIMULA AND OBJECT-ORIENTED PROGRAMMING

Gosling discusses Simula as a groundbreaking language, being the first object-oriented language and introducing coroutines. While not strictly functional, its concepts of state and concurrent execution influenced programming paradigms. He notes its early introduction of ideas akin to multi-threading, allowing for a distinct mental model of parallel processing, even if it lacked true concurrency. This foundational work laid the groundwork for future advancements in managing complex software systems.

CRAFTING EMAX: ADDRESSING EDITING NEEDS ON UNIX

Driven by the lack of a capable text editor on Unix systems in the 1980s, Gosling developed an implementation of Emacs in C. He recounts the clunky nature of early editors like ED and TECO, and how Emacs brought visual clarity to text editing through its macro system and programmability. His version, initially developed for personal use, quickly gained traction within the university and spread, becoming a foundational piece for what is now widely known as GNU Emacs.

THE 1990S: THE INTERNET'S SOCIAL FABRIC AND CORPORATE RESISTANCE

Gosling observed the internet's precursor, ARPANET, fostering social interactions and communication as early as the 1980s, predating widespread adoption of modern social media. He notes the resistance from established industries like cable and phone companies, who viewed the internet as a threat to their advertising-driven business models. These companies, focused on distributing content to capture 'eyeballs,' failed to adapt to the internet's decentralized nature, missing opportunities for innovation.

THE CHALLENGE OF INNOVATION: KODAK AND THE PUSH TO ADAPT

The cautionary tale of Kodak, which possessed early digital camera technology but failed to transition effectively, illustrates a broader business phenomenon. Gosling explains that companies making substantial profits from existing models often struggle to embrace disruptive technologies. The financial calculus of quarterly reports discourages the significant investment and potential short-term losses associated with pioneering new paradigms, creating a chasm many established entities are reluctant to cross.

LEADERSHIP AND THE DICHOTOMY OF 'JERK' EXECUTIVES

Gosling reflects on leaders like Steve Jobs and Elon Musk, acknowledging their vision and impact. However, he critiques the 'jerk' persona adopted by some successful executives, questioning whether their harshness is a necessary catalyst or a destructive trait. While acknowledging that such individuals can push teams to achieve extraordinary results, Gosling argues that achieving greatness does not inherently require being unpleasant, pointing to less ostentatious but equally successful leaders as evidence.

THE WORK-HARD PHILOSOPHY VERSUS 'WORK SMART'

He pushes back against the popular adage 'work smart, not hard,' arguing that significant accomplishments often require immense effort. Gosling believes 'work smart' can sometimes be a guise for laziness, failing to recognize that discovering efficiency itself demands hard work. He posits that a combination of hard work and smart strategies is crucial, and that a relentless pursuit of efficiency without genuine effort often leads to failure, citing Google as an example of a culture balancing hard work with positive leadership.

OPEN SOURCE: COMMUNITY BUILDING AND THE ETHICS OF MONETIZATION

Gosling is generally a proponent of open source for its community and collaborative benefits. However, he expresses skepticism towards the dogmatic 'all things must be open source' mentality, which he believes can equate to a 'vow of poverty' for engineers and devalue the creation of valuable software. He sees a nuanced balance between open access and ethical monetization, criticizing exploitative practices while acknowledging the necessity of financial sustainability for software development.

THE JACOBS EMACS LEGACY AND GRAD SCHOOL TRADE-OFFS

Gosling recounts the decision to transition his Emacs implementation to others, choosing graduation over becoming synonymous with the editor. He sought collaborators, ultimately finding a group willing to maintain and commercialize Emacs, with the condition of maintaining free access for educational institutions. This choice, while financially suboptimal, reflected a desire to pursue broader academic and technical interests beyond a single, albeit influential, project.

THE ORIGIN STORY OF JAVA: ADDRESSING GAPS IN C AND C++

The genesis of Java at Sun Microsystems in the early 1990s stemmed from recognizing that the burgeoning world of consumer electronics and embedded systems was underserved by existing languages like C and C++. Gosling identified critical flaws such as pointer manipulation, lack of safety, and poor memory management as significant hindrances. The project aimed to create a language prioritizing safety, reliability, and developer velocity for these diverse computing platforms.

JAVA VIRTUAL MACHINE: ABSTRACTION AND PORTABILITY

The Java Virtual Machine (JVM) was conceived to address the issue of hardware vendor lock-in and the challenges of cross-platform compatibility. By providing an intermediate bytecode layer, the JVM allowed software to run on any machine with a compatible implementation, liberating developers from proprietary chip architectures. This abstraction layer also offered benefits like interpretation for ease of development and potential for compilation for performance.

JAVA ON ANDROID: IMPACT AND UNMET EXPECTATIONS

While proud of Java's widespread adoption, particularly on Android devices, Gosling expresses mixed feelings. He acknowledges the success but highlights instances where contracts were allegedly breached and lines were crossed during its integration. This led to protracted legal battles, suggesting that a more collaborative and ethical approach could have yielded similar results with fewer complications and a smoother path forward.

LIFE'S LEGACY: EMBRACING RISK AND CHOOSING THE STAR TREK FUTURE

Looking back, Gosling hopes his legacy will inspire others to embrace risk and not fear failure, recognizing that many of his most interesting endeavors involved unconventional approaches. He advises young professionals to consider the ethical implications of their technical decisions, framing them through the lens of sci-fi futures like Star Trek versus Blade Runner. His preference for the optimistic, collaborative world of Star Trek underscores a belief in humanity's potential for positive advancement.

Common Questions

Gosling found parallels between the logical structure of mathematics, especially in finding efficient paths (like n log n algorithms), and programming. He values provable code and prioritizes understanding a whole function visually, similar to seeing patterns in math.

Topics

Mentioned in this video

Companies
Kodak

A former big customer of Sun, used as an example of a company that failed to adapt to a new business model (digital cameras) due to its highly profitable existing model (film).

Oracle

Used as an example of a 'rapacious' company in contrast to open-source database producers regarding charges for support contracts.

Google

Presented as a good example of corporate leadership that fosters hard work and success without resorting to a 'jerk' management style, with examples like Larry Page, Sergey Brin, and Sundar Pichai.

Three Rivers Computer Company

A company that built early workstations whose instruction set was UCSD Pascal's P-code, inspiring Gosling's idea for machine-agnostic software translation.

Intel

A CPU manufacturer that had significant 'fights' with James Gosling over its non-compliant implementation of IEEE 754 floating-point arithmetic, especially regarding rounding and transcendental functions.

Control Data Corporation

Mentioned as a company that built machines with one's complement arithmetic, which differed from the prevailing two's complement and created variability in how arithmetic worked.

IBM

Mentioned as a company whose machines, like CDC and DEC machines, exhibited variability in floating-point behavior before IEEE 754 standardization.

Sun Microsystems

The company where James Gosling initiated the project that would become Java, driven by a concern that the computing industry was missing out on embedded and consumer electronics.

Tesla

Cited as an example of a company with patient money and strong visionary leadership that was able to take significant risks and operate with a long-term view rather than focusing solely on quarterly reports.

Software & Apps
C++

A programming language that, along with C, dominated the industry in the early 90s, but still shows issues with pointer-related security vulnerabilities in modern software like Chrome.

Simula

The first object-oriented programming language, which introduced concepts like co-routines, influencing multi-threaded programming styles.

Emacs

A powerful text editor, originally a collection of macros for TECO, which James Gosling reimplemented in C at CMU for UNIX.

Chrome

Google's web browser, a large piece of C++ code, cited as an example where 60-70% of security vulnerabilities are still due to pointer-related bugs, highlighting a persistent problem.

Unix

The operating system that James Gosling worked with extensively, particularly relevant as the platform for his Emacs implementation.

Java Virtual Machine

Presented as a radical and brilliant idea, an abstract machine instruction set that solved the problem of CPU vendor lock-in by providing a portable execution environment for Java code.

Android

A mobile operating system that widely adopted Java, becoming one of the many platforms where Java has billions of user-devices, though its implementation involved 'crossed lines' by its lead, Andy Rubin.

Lisp

A programming language that James Gosling considers one of the greatest, despite its numerous parentheses, for its interesting language structure.

Smalltalk

An object-oriented programming language that also utilized bytecode, influencing James Gosling's design of the Java Virtual Machine.

Java

Lex Fridman's first object-oriented programming language, praised for its role in concurrent programming and software engineering.

UCSD Pascal P-code

The bytecode for UCSD Pascal, which served as the instruction set for Three Rivers Computer Company's machines and was the subject of James Gosling's early translator project, directly inspiring the JVM.

More from Lex Fridman

View all 505 summaries

Found this useful? Build your knowledge library

Get AI-powered summaries of any YouTube video, podcast, or article in seconds. Save them to your personal pods and access them anytime.

Try Summify free