Monday, December 27, 2010

BSD Philosophy



BSD Unix started at Berkeley University shortly after a very turbulent and rebellious time at Berkeley in the late 60's.
During that time there were several major movements happening all at once. The Free Speech, Anti-War, Hippies, Free City, think for yourself, Acid test, civil rights, and a tornado of other forces that lead to several all out riots on campus.
Other influences at Berkeley are a large Asian Population and the study of eastern cultures (Chinese, Japanese and India) and Philosophy.

Many of these memes later incorporated themselves into the BSD Unix culture and Philosophy.

Respect for elders, New isn't always better


Unix and BSD Unix are old operating systems by our modern perception. But, if you were to think this was a bad thing you'd be totally wrong.


At the root of most Modern Operating Systems are design concepts first pioneered in Unix and BSD. Many way DOS, Windows NT,2000,XP, Mac OS X, NeXT OS, operate are based on UNIX concepts.

Change isn't the same as improvement

"The Great Wall of China wasn't built by swapping any bricks in and out" - John Sokol.

"The devil you know is better than the one you don't"

Unix development started more than three decades ago, and the versions of operating system available today is the product of thousands upon thousands of developers hard work and constant improvements. Along the way, Unix has pioneered some very powerful design concepts and some elgant solutions to hard problems common in computing.

"If I had more time, I would have written a shorter letter." - Mark Twain


"I have made this letter longer than usual, because I lack the time to make it short" (Je n'ai fait celle-ci plus longue parceque je n'ai pas eu le loisir de la faire plus courte) - Blaise Pascal, Lettres Provinciales (1656-1657), no. 16.

"Anyone can make something complex, but it takes a genius to make it simple" - Albert Einstein

Elimination of unnecessary complexity is a Key part of the BSD Philosophy

Much of the "Unix way" is based on the idea of abstracting interfaces into the simplest possible terms, BSD trys to take this to it's limits.

Initially, this was simply because the OS was considered experimental, and the simplest possible interface, one that wouldn't change later, .was the most easiest to construct.
This spend time upfront to think of how to "do it the easy way" methodology has evolved into a many of the most powerful design concepts in OS design. Abstraction that started in Unix is the core of many parts of a modern OS. From Files, Devices, Sockets, Modules, Processes, Memory Management, File Systems, directories, and Pipes.

Even the Internet is based on BSD technology and concepts. The BSD 4.2 OS was the first to Implement TCP/IP and part of that was the concept of network Sockets and Ports. Many other more complex network technology had been around for a while, but BSD Sockets allow for two computers to communicate in a way that uses the exact same commands as file access. Open, Read, Write, Close. It also uses another concept, Streams.


Simplicity and elegance though consistent software interfaces

Where:

elegant : adj. [common; from mathematical usage] Combining simplicity, power, and a certain ineffable grace of design. Higher praise than `clever', `winning', or even cuspy.

"The challenge is keeping it simple while providing the people with functions. This is harder to do. Anyone can make something complex." Dauphin A German Chair company

Try to understand the intent of the original authors' style and intent, and make changes consistent with this


This means not just going in slashing and hacking changes into the Kernel or User space code without researching and thinking them through first. Find a clean way to do what ever your trying to do. Spaghetti code is not tolerated.


All too often a quick and dirty little hack that was meant to be temporary become permanent and hard to fix later.

KISS, Keep It Simple, Stupid or maybe Keep it Short and Simple, I like the first one.

Working on BSD code is basically working on other people code for the most part. Most likely what ever you do, someone else will have to work on after you.

Working on someone else code is something many application programmers realy suck at. Also they think using the latest cool tricks that just came out in the latest language spec or the new compiler supports it so it's really Cool.
F*ck them! These guys need to be slapped up side the head a few times.
I see time and time again the Linux guys keep making a mess for those who need to update there code and drivers over to the latest OS version. Often is is almost as bad as a cross platform port, nothing works out the box everything is broken and it becomes a major undertaking!

The Mac OS-X darwin they are mixing C++ and Objective C into the kernel source tree! It's full of broken locks and is nearly impossible to understand anymore. Leaving some messy and hard kernel hacking to the customers having to make there code work on a pig of an OS. I hope that doesn't sound like I'm venting too much, does it?


"A program with a colorful GUI is like a woman with too much makeup. Shiny on the outside - awful on the inside."


Quote from the NET



Are you going to run a gui or from the command line etc... over SSH?
If you want a gui I would go Linux maybe Fedora, for SSH use FreeBSD...I used to be against it but I am now a convert to the Church of BSD.

Why would I ever want a GUI? It may sound odd but I have never ran X on any of the 100's of FreeBSD systems I have worked on. Command line Interfaces Rull, and for most of the stuff I do is much faster. Even this web page is edited in "VI".


We are not Linux, We were here before them; and well be here after them

So what's the difference, much of the same code get's passed between BSD and Linux Right? That's only partly true. The Licenses are incompatable between the two for starters.


"I must say the linux community is a lot nicer than the unix
community. a negative comment on unix would warrant death
threats. With linux, it is like stirring up a nest of butterflies."
             -- Ken Thompson author of C Language. 1999 
 
BSD vs. Linux, Any questions?

FreeBSD, OpenBSD and SuSE 6.2 Eval Review by Keith Rankin:
"The differences between FreeBSD and Linux used to be much more obvious than they are now.
Now it comes down to theology. The BSD world is still the 'high church' or Druid Unix. Blood will be spilled on a stone altar at midnite when star systems are in a certain alignment to learn the ways of this tribe. Linux is a happier world. The spirits of Captain Kirk, Peter Pan and good beer come to mind."


Hackers and the bushido code

For much of the early life of BSD Unix was spent running campus MiniComputers. PDP/11, Vax 11/750 and the like.

One way to attain elite status (enlightenment or become the master or Guru) was to "break root", break in or even just be able to crash the server.

This was not viewed as a federal offense, or even as something inappropriate but as an exciting challenge and testing the limits of the box.

For the many years it was an arms race between the OS developers and students to see if the box could be crashed by malicoius code or commands, the end result is something rock solid.

Now crashing a windows box usualy requires little more then power it up, but most BSD systems can go for years without rebooting, crashing or having it security compromised. Even on my own servers, like the one that ran the LeonardoDicaprio.com site, despite countless attempts to take out the box, it had little effect.

Part of Hacker Philosophy directly stems from these early BSD days, although not all of it. One of the thing was to not damage or sabotage, but to report and inform people of the bug or security hole. Maybe a little Kilroy was here on the administrators console ;)

Reboots, re-compiles and Re/Installations are EVIL and to be avoided at all costs.


One important thing about BSD is the belief that you should be able to stress the system in any number of ways, like open up and infinite number of files, sockets, programs, memory, or any other resource and have the system respond gracefully. But this I mean not to have a Blue Screen of Death, or Kernel Panic.


Linux groups have installfests, while BSD groups have installathons. Clearly an installfests sounds festive and much happier then an installathons that is more like a Marathon to try to race through it.

We are the one true Path, all non-believers (can go to hell) are damned to hell

This is in the tradition of all great religions.

From: Nick Moffitt nick@zork.net , With some paraphrasing.


Tue, 22 Aug 2000 14:02:47
Basically, user groups nowadays are either:

 Lame talking-heads lecture series.

 Cowtow to the windows users installathons.


  I say that's bullsh*t, and we all know it. F*CK the newbies.

We'll hold installfests, sure, but we'll be perfectly justified in telling people to take their 386s with 15 year-old RLL drives and GO HOME. This will be a meeting of COOL PEOPLE to show off COOL STUFF!

We'll not be limited to a particular OS, either. We'll have Linux weenies, FreeBSD weenies, and cypherpunk weenies clutching their precious OpenBSD! We'll have the AMAZING GEORGE PERRY and his BEARDFUL OF FORTH!
I think that expresses the attitude fairly well...

BSD License

Do what is right and be hated by those around you. Do what is popular and be hated by history.
The BSD License allows anyone to use the code for any reason and any way with no restrictions other then credit is given to the Authors
Transparency Begets Trust - Expertise in niches, transparency in motives and thought process and owning up to mistakes publicly create a trust relationship" - Will Pate



In General people in the BSD world view people and Individuals who do not share code and improvements as pompous idiots. There are a ton of smart people in the BSD world and no one individual or company (M$) not sharing code is really going to make any difference, the reality is we probably wouldn't want there code anyhow.

Trust builds Confidence

They will loose the benefits of having 1000's of eyes screening the code for holes and bugs as well as tightening things up and making improvements.

This is very much same philosophy as the Private vs. Public research in almost any scientific field. If you keep your research to your self, then you don't get credited for it. Also your work never gets confirmed, there is a good chance of deluding yourself about how secure and bug free your code is. (take Microsoft for an example)

The BSD approach is consider by most people to be better for businesses, companies such as Apple and Microsoft benefited their users by incorporating BSD-licensed code without having to share there code or changes to this code.

When questioned, most GPL programmers did not want the work they released to be used in a manner they did not support.


The BSD philosophy seems to hold that creating and giving away code, then seeing it used by others, is victory and reward enough.


But most of the GPL supporters disapproved of allowing "others" to close off source code and hide enhancements.

No comments: