CSC161 2011S Imperative Problem Solving

Reading: Linux (1)

Reading: Raymond, Chapter 1: Philosophy. Available at http://www.faqs.org/docs/artu/philosophychapter.html.

Please submit a question by 9 p.m. on Tuesday, 25 January 2011.


No questions. The reading was fairly clear.

It was clear.

Given the many qustions I saw from your classmates, I find this hard to believe.

What exactly are Linux and Unix and what is the difference?

What is the difference between Linux and Unix?

This chapter described the Unix philosophy. I always knew that Linux and Unix were related but I am curious to know how much they are related. Does the Unix philosophy, as described here, completely apply to Linux? In what ways does Linux depart from the Unix philosophy?

At most levels, there is no observable difference between Linux and Unix. And Unix is used to mean many different things, from the underlying operating system API, to the standard suite of applications, to the overall philosophy. Linux (or GNU/Linux, as many think it should be called) is intended to distinguish itself from the commercial Unices. Linux provides the same API, the same suite of applications, and mostly the same philsophy.

How does Unix compare to Mac OS X?

In many ways, Mac OS X is Unix with a really nice front end and lots of complex applications. So, OS X diverges from the Lego philosophy. (However, you can still get at the base Unix implementation.)

How relevant do you think Raymond's philosophy is in this class, where all our projects are so small that it is hard to get an extremely complicated problem? Personally, I feel like I believe this philosophy, but never haven't had enough big problems to teach me through experience that this is the right way to do things.

We will be writing some Unix-style tools, including a version of cat and maybe even sort. We will also be using the tools, so it's important for you to start to understand the overarching principle of the tools.

If Unix is so durable and efficient, then why is it that Microsoft is dominating?

I thought Raymond answered that question ... Unix is durable and efficient, but it is primarily designed for programmers, not normal users. Let's see ... In the short term, Unix's laissez-faire approach may lose it a good many nontechnical users. There are also many examples of technically inferior products winning in the marketplace because of non-technical issues, most frequently better marketing.

Does the rule Prototype, then polish, mean that people should not worry about making the code concise until the code is written and the program works? That would go against what I learned in CSC 151, when we first thought of a smart way to write code and then wrote it.

As someone above mentioned, you were mostly working with small programs. This rule applies a bit less to such situations. Consider your project. In my experience, most students follow this Prototype, then polish rule ... first they make sure that the code generates the kinds of images they want, then they think about making the code more efficient and more elegant. It's also how you are taught to write ... first get your ideas down on paper, then look more closely at how you organize them and phrase them.

What does the term Unix Pipes refer to?

Pipes are a way to connect programs. In the second Linux lab, you learned a bit about standard input and standard output. Pipes let you connect the output of one program to the input of another. You'll learn about them in the third lab on Linux.

What operating systems are Unix based?

All the Linuxes out there. (MathLAN runs Debian. I find Ubuntu the easiest.) Android phones. Macs running OS X. (Note that OS X does a good job of putting a nice UI on the complexity of Unix.)

No questions, but I find it a little .. ironic that all the rules say never do this and never do that unless it's absolutely unavoidable, yet one of the rules is Distrust all claims for one true way.

Yup. I'm pretty sure that the rule is designed to be ironic. (It's also designed to trump the other rules.)

An acronym that I was trying to search for throughout the text to find at least what it stood for and failed was IBM's VM/CMS For me, it's distracting when I can't instantly make out what it means in my head.

That's what Google and Wikipedia are for. (Yes, I know you've been told not to trust Wikipedia. But for the majority of computing issues, it's pretty good.) Also, realize that not all acronyms mean anything - sometimes people come up with them just for fun.

Are other programming languages apart from C available in Unix?

Almost every major programming language is available on most Unices. I think we're looking at eight or nine of them in my other class.

What is the difference between an interpreted language and C?

We'll get to this on Friday, when we start to look at C.

At the beginning of the reading, Raymond lists a few avatars of Unix, including Linux and MacOS X. If not Unix, what is the foundation of Windows-based computers and how does this system compare with Unix (Besides being obviously horrible)?

Like Unix, Windows/DOS were written more or less from scratch, taking some ideas from other OS's, but not basing itself on any partiuclar one. The original design of Windows/DOS made some bad assumptions about the design of the computer, such as how much disk space might be available. The DLL system also leaves much to be desired.

What are some differences between Unix and other operating systems (like Windows, for example)?

Different ways to organize the file system (under the hood, as it were). Different rules (or lack thereof) on how programs communicate with each other. Different file security mechanisms and assumptions. Different feature sets (e.g., ways for prioritizing or de-prioritizing running programs). Different coupling between tools or between services.

How is Grinnell able to send students to work at Microsoft if they use different methods than those we learn in class?

In the end, the important thing is that you can think well about algorithms and data structures - design them, analyze them, implement them, analyze the implementation, etc. The OS you use is somewhat less important. But Linux encourages a form of thought that seems particularly productive.

I just picked up a few things that I was wondering about while skimming it... Throughout the reading there are quite a few acronyms referring to particular...things. An example of such is ""This was originally said of the IBM MVS TSO facility by Stephen C. Johnson, perhaps better known as the author of yacc."" at the bottom of the ""What Unix Gets Right"" page. Truthfully, it kind of bugs me when I look over it and find myself at a loss that I can't connect it to anything. It could be that I'm just lacking in the acronyms though. What I was wondering was if there's a page, folder, file, anything really, that would perhaps contain all of these in one place for reference? Especially if it would provide at least a short description of what it meant after it mentioned what it stood for. The multiple acronyms that were put out throughout the entire reading was rather confusing for me, as sometimes it did tell what the acronym stood for, but it's hard for me to memorize it when going over so many other ones.

You won't need to know most of the acronyms (at least I hope you won't). I'll try to work on a page summarizing the Linux commands you've learned. However, you'll soon find that they become second nature.

Can I ask my real question after the State of the Union is over, and use this to be counted as asking on time?

Sure. Next time, please ask during class.


Under the Apply the Unix Philosophy section, it is stated that, Mixing languages is better than writing everything in one, if and only if using only that one is likely to overcomplicate the program. I have never heard of mixing languages before, and I don't really understand quite what he means by that. Does such a situation happen often?

The philosophy chapter talks about the mechanism vs. policy debate and what it means to the end user. Have there been any successful commercial attempts to combine the two approaches? i.e. market a computer with a Unix operating system and a basic GUI and a package of programs built in, so that non-technical end users are not overwhelmed but more advanced users can still have the freedom to create the tools they need?"

The author supports the Unix Programming Philosophy because of its simplicity, transparency, and constant potential for and ease of future development and interdependence of existing programs. However, if a program is needed for transient or temporary use, or for a singular, immutable purpose, and a more complicated or harder to understand solution is more efficient than the simplified version, then which is preferred?

...the core of that infrastructure will be Unix machines running on the Internet. on 1.5.4. Does this mean that the operating system will be on the Internet, and so your computer can run only when there is Internet?

How (in a broad sense) are code generators implemented (in regards to the Rule of Generation)? How widespread is their use in UNIX and other development? How do you write programs to write programs? And when will we learn that?

Much of the problem with Unix seems to be in its lack of security. Is it possible to have both security and allow for the user to manipulate every aspect of the language, or are these two mutually exclusive?

Another problem that seems to arise is the interface. Some users don't seem to appreciate the complexity of it. Why is there not a set user interface for simple users and a more complex, multi-shell system for advanced users?"

What is the exact relationship historically between the internet and UNIX? Are we to assume browsers like Firefox and Chrome are UNIX based? What about Internet Explorer? How does this apply to web design?

In the section about problems with Unix, the text says that Unix files have no structure above byte level. what does this mean? How do Unix files differ in structure from files in other operating systems? In that same section, it's said that Job control [in Unix] is botched; what is job control?

What processes does prototyping and optimizing include? From the reading, I understand that prototyping is related to making the program work and optimizing helps it to run faster, is that right?

What does specification mean in the sentence it is much easier to judge whether a prototype does what you want than it is to read a long specification?

In the beginning it says that UNIX is an OS that is used in Mac and Linux. What does that mean? An OS used in an OS? Also what do you mean by hacking it is simple? Is it something like editing the OS, how does that work? Everything made sense. No questions.

Can you earn a profit using Unix? For example, is it possible to sell it?

Although Unix is easy to hack, can it be more prone to viruses?

Rule 14. Pretty much completely over my head. Would you be so kind as to spend some time in class expounding upon this? If it helps, pretend you are explaining it to a 12 year old.

Rule 17. I think that I get the general thrust, but could you discuss in more detail, preferably with a concrete example the statement:

When you design protocols or file formats, make them sufficiently self-describing to be extensible. Always, always either include a version number, or compose the format from self-contained, self-describing clauses in such a way that new clauses can be readily added and old ones dropped without confusing format-reading code. Unix experience tells us that the marginal extra overhead of making data layouts self-describing is paid back a thousandfold by the ability to evolve them forward without breaking things.

Anyhow, what is the difference really between the Rule of Modularity and the Rule of Simplicity. Is it just an overall notion of just keeping things simple?

Disclaimer: I usually create these pages on the fly, which means that I rarely proofread them and they may contain bad grammar and incorrect details. It also means that I tend to update them regularly (see the history for more details). Feel free to contact me with any suggestions for changes.

This document was generated by Siteweaver on Fri Feb 25 19:30:12 2011.
The source to the document was last modified on Fri Feb 25 19:30:05 2011.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CSC161/2011S/Readings/linux-1.html.

Samuel A. Rebelsky, rebelsky@grinnell.edu