Advice On Teaching Linux To CS Freshmen?
copb.phoenix writes "I'm a sophomore Computer Science student teaching computing labs to a freshman class, getting ready to go over the major ins and outs of the Linux terminal and GUI. While I have my own ideas and the professor over this class to lean on, I've found it difficult to get the few students that I've tried to teach in the past to connect the dots and understand how it relates to what they already know about computers. Does anybody out there have any advice on how to engage and inspire our upcoming class? (Perhaps important: Our machines are running Ubuntu Hardy.)"
You've given us rather little in regards to guidance. Is this class part of a larger arc focusing on security? Programming?
Have them set up a basic LAMP server. That's how I learned Linux. Or for something somewhat more practical for them, how about a seedbox or a mythtv-box. Frankly, the best way to learn linux is to just get your hands dirty.
Charming man. I wish I had a daughter so I could forbid her to marry one. -Arthur Dent
as a basement dweller i seriously needed an anime hookup. i spent 4 days straight learning how to compile programs, then mplayer, then what a codec was, via system libraries, the gui, how to compile E16, how torrents and other p2p worked.
figure out something that drives today's youth with the same vigor, from the subdomain of scholastics. figure that out and you're a rich, rich person.
slashdot: where everyone yells sarcastic metaphors to themselves to understand the issue
Many GUI applications can be controlled via GUI commands. Showing this helps students understand the link between the magic that goes on under the hood, and the actual action that takes place to make that happen.
Sure, not everything is a GUI shell over a CLI program, but the concept of typing a command isn't that different from one of making an API call to Qt or GTK+.
Computer Science is no more about computers than astronomy is about telescopes. --E. W. Dijkstra
If you want them to actually learn anything, I'd get rid of Ubuntu and use Slackware.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Friends don't let friends enable ecmascript.
I'd start with a two-pronged approach.
1. GUI. Using something like Ubuntu, although I'm generally a CentOS bigot, teach them how to do all the things they know how to do in Windows: download and install software (using apt, for instance) and how to add an icon to the desktop. Teach 'em where to find applications of interest.
2. Start teaching the command line. There are times when a GUI... anyone's GUI... is too cumbersome/restrictive to do things quick and dirty.
2a. introduce them to 'script' and the concept of shell (batch) scripting.
2b. as an addendum to 2a, above, give 'em an overview of the major shells and explain why Tom Christiansen thinks csh is totally unsuited for scripting.
Don't preach about how much better Linux is than Windows... If they continue, they'll understand themselves. If they fall by the wayside, they never would have understood, anyway.
Never ascribe to malice that which can adequately be explained by tenure.
Really, if they are going to be any good, they will most likely ALREADY know what Linux is and how it works.
If they don't, really, don't bother them with it. It'll just confuse them.
Really, if they are going to be any good, they will most likely ALREADY know what Linux is and how it works.
That's exactly the approach that makes most people who try Linux give up after a very short time. I personally tried it twice and found any problems I encountered making things work had no simple step by step instructions on how to fix.
This is a joke, i hope. It sounds elitist and exclusionary. A lot of great hackers are self taught. But, there a many people who learn by seeking the help of of others. There is nothing wrong with that. Who is to say they don't already know what Linux is? Do *you* know what Linux is and how it works? I've been using it for over 12 years, and I sure as heck don't! I still rely on the knowledge of other people to make the best use of the tools I have available. Some might argue that this is what it takes to be "any good".
Whether or not they have used Linux in the past, it seems like the kind of thing that a CS student (even a first year) should be more than capable of handling for themselves. Sure, teach them about the architecture, or give them tasks that will require them to learn more advanced features of the OS, but I'd worry if the submitter really needs to teach the "major ins and outs of the Linux terminal and GUI" to a bunch of prospective computer scientists.
I'd say about 80% of the CS students at my college have never touched Linux, and program only Java and C#. Granted, they also seem to be there only to get the CS degree and get a steady job at a code mill, but they really don't seem to be interested in computer science. I'd expect this is almost universally true.
I am become
You won't get any sound advice if you don't tell us the background of your students. It is the most important thing in any tutoring class. If they have no idea what an OS is, perhaps you should start there. If they know how to use Windows (and understand what an operating system is actually doing), perhaps you could start by making a comparison of the two systems. Oh, and please, do not start with the "on UNIX everything is a file" thing. This has never, ever, helped anyone at that stage. Perhaps you could make a historical review to show, e.g. that in the before time, DOS was the OS and Windows was a GUI. Then tell them that Linux is the OS and Gnome is the GUI. If they get that, then jumping from DOS to Bash will be easy. And some general advice: If possible, do not guide them through a trivial task as a tutorial to show them how "things are done". I have always found such tutorials boring and uninspiring. Instead, give them a book, a manual, an online link or whatever where they can search for stuff and an easy task to perform. Make it like a competition: "let's see who can figure it out fiiiiiirst!" kind of thing. Also, remember that it has to be something that they can accomplish by looking in the material you gave them. The exercise is not for pumping up your own ego when you come to them after two hours with an answer that they could have never found.
What can you do in Slackware that is impossible in Ubuntu?
Feeling leet.
I am TheRaven on Soylent News
Teach one half of the class vi, and the other half emacs. Then join the class back together for a discussion seminar.
I am TheRaven on Soylent News
I'm assuming that this is your first time teaching anything (at least officially... we all teach often in our lives) and so my advice will dwell more on that then the technical aspects.
As a teacher, your responsibility is to help them learn. Remember that learning takes place inside the student's head; you can present the information, but if it they don't learn it, it is not a success.
1) Some people have indicated that the students "should" know certain things. I'm assuming that the class has no pre-requisites, so you shouldn't be assuming that they know anything. Many people who do things like that do so to make themselves feel better; these students are the ultimate newbs, and treat them like you'd like to be treated. Remember that they are not stupid, just uneducated, and they are in your class to correct that.
2) When you give an assignment, make sure you have done it yourself, on a box that has nothing more installed on it than what they will have installed on theirs. Nothing is so frustrating for students and embarrassing for instructors as an assignment that can't be done because something silly wasn't set on their boxes, such as path variables.
3) Remember that things that don't take you very long will take them many times longer, probably 3-5x as long. So if the assignment you give them takes you an hour to do,... You may want to give them that much work, but make sure it's because you planned it, not because you didn't think it would take that long. I would also recommend giving an estimated time, which should be for the average student it class, and tell them that if it is taking them longer, they need to get help somewhere.
4) Read through the assignments carefully, making sure that they are unambiguous. Not just to you, with your great wealth of knowledge, but to someone of the students' level.
5) Plan to spend significantly more time than expected on all this. This includes time in class explaining things that you expected them to know or thought were obvious and outside the class preparing your lectures, labs, etc. Until you've taught a class 2-3 times, there are always time sinks that you didn't anticipate.
Good luck!!!
If you consider vi simple as opposed to a complex tool, then Linux is pretty much beyond me, also.
There are metallurgists and steel workers, and you're right, seems a lot of people go into cs now to be steel workers. I noticed this even at a school known for cs, many years ago (hmm, and steel too). I'm sure a core of metallurgists will remain though.
4096R/EF7BAFA6 79E1 DF98 D09D 898F 9A11 F6F0 DDDC 23FA EF7B AFA6
I'm biased.. But I think that the concept of pipes can really be impressive.. so
ps aux | grep username | grep -v grep | awk '{print "kill -9 "$3}' | bash
is awesome to understand.
Have them do a dpkg -l on a box and make an install script for hundreds of packages. Have them hunt for credit cards #'s using regular expressions, then pipe those through a cc# validator script (yes how to use a computer for evil-- a nice weeklong break of doing bad things).
Teach them how to use Wget to stalk on facebook... heck that will keep them engaged the most, though it does rack up their dark side force points a little too quickly.
What good first year students should have difficulty handling is handling their time well enough while they obsessively dig into the computer systems around them. You shouldn't have to teach them about Linux, you should have to teach them about how to lay off the obsessive installing, poking, modifying, developing, etc.
If you have to push them /towards/ computing, they're not going to be any good at computing. They should get into something else quickly.
[...] Teaching Linux [...]
Best thing is to not "teach Linux," but to "teach on Linux."
All hope abandon ye who enter here.
You make a good point. It's not the knowing which is required. It's the wanting to know.
If the student is poking and asking questions, he or she will be good.
If the student is just asking question, without poking, that's a warning sign of a lack of self-confidence. And at 18, that's possibly not going to change that much throughout life, and may indicate a person who's not going to succeed.
If the student expects you to tell him or her everything, and is annoyed at the instructor/materials when things go differently, that's a very bad sign.
If the student only really wants to know what's going to be on the test, that's deadly.
Ten years down the road, you want to work with the first, might put up working with the second, and probably will avoid the third and fourth.
Certainly all this can start at 18, but it's odd, in today's society, where computing information is all around and computers are very cheap, that the exploration process didn't happen earlier. If you have an 18 year old who wants to be in CS and isn't excitedly exploring computing already, unless he or she comes from a family which is dirt-poor or believes that computers are a tool of the devil or ascribes to a strictly no-screens great books sort of education (none of which should necessarily be crippling -- in fact the last /could/ give the 18 year a big leg up), then the student is probably going to fit into one of the latter three categories.
I have been professionally teaching IT people since 1998. That's a really long time. It's not exactly the same as freshmen. Though I learned some things over the years:
;-D
Don't forget to talk about the history and the philosophy; while it might seem less important than getting everything in their heads; motivation is key. Because it's hard. Really hard; for them in the beginning. Motivation is everything. Don't waste your time with complicated stuff which can be easier (such as trying to fill their head with vim as joe is there too - if they like Linux, later they'll come back to vim).
Talk about the hippy-like Richard Stallman who got everything started and what the Free Software Foundation is all about; freedom in a digital future and such. And about the 'other side' within the community with the 'OpenSource' people who just think it's very convenient to be able to work together, but not morally wrong to write proprietary software. Whichever you prefer; 'welcome to the opensource community'.
Involve them.
If you can come up with something which can help them to accomplish something; go for it. Whether it's a LAMP box with Dyndns or something completely different. If they think something is 'stupid', point out that it's OpenSource, so they have the freedom to change it and fix it according to their wishes.
And don't forget: 'Have Fun!'
Good luck!
Jasper
If this is a trade school then start right away teaching them how to set up a LAMP system as others have suggested. However if this is a university then do not teach Linux. Teach concepts. Linux is just one of various places to implement or try out these concepts. The LAMP system is something a university student should be figuring out on his/her own time.
... So in a compilers class the professor taught the concepts and theories behind parsing, code generation and optimization and the TA taught you how to use lex and yacc under BSD to implement a compiler for your class assignments. Similarly in a graphics class the professor taught the math and theory of 3D graphics, transformations, perspective, hidden line/object removal, etc and the TA taught you how to use dedicated graphics workstations (today this would just be OpenGL). Now if you wanted to use a different environment and tools you were free to do so but you were on your own.
My undergrad CS was in a unix-based environment(*). Professors in class taught concepts that could be applied in a variety of different environments. Teaching assistants (TA) in study/discussion sessions taught implementation detail like editors, compilers and other tools for the environment provided by the school - which in this case was BSD, vi, cc, lex, yacc,
So if you are a university and your labs are Linux based, great. Your TA's should help students with all the implementation details of getting their assignment going under Linux. However Linux should not appear in the classroom that much, it is just the tool of the day, more of an implementation detail than a core concept. The university classroom should spend most of its time on concepts that transcend the tools of day, regardless of whether that tool of the day is MS Windows, Mac OS X or Linux; or Direct 3D or OpenGL.
(*) FWIW this was a DEC VAX based environment. I would have loved to have had a Linux or FreeBSD running on my PC rather than having to dial in over a modem from home when not on campus.
What can you do in Slackware that is impossible in Ubuntu?
In Slackware, you learn how to do things on any Linux distro. In Ubuntu, you only learn how to do things in Ubuntu, Debian, and Debian derivatives. I owe to Slackware the fact that I can sit down and work with any Linux distro out there. It doesn't include its own special tools for anything, so you are forced to do everything the "standard Linux way," which is the way that works on every distro (with some special exceptions, like DSL).
This isn't flamebait. I teach community college IT courses, and I would agree that if someone's a CS major and has to be dragged into checking out Linux, that person would probably ultimately be happier switching majors.
Space game using normal deck of cards: http://BattleCards.org
Don't spend a lot of time in the start teaching them about Gnome or KDE. That will just give them the impression that Linux is fundamentally the same as Windows or OSX (Yes, I know OSX is BSD based but one of it's prime selling points is that the user doesn't have to think about what's under the hood). The danger in starting with the GUI is that they'll get the impression that the GUI is the OS and all the /etc, /bin and /var stuff exists to support the GUI when the opposite is more true.
/home/cs101/assignments/ . Replace {username} with you username on this machine. (introduce `tar czf`, introduce cp)
Give them all a user account with shell only (no X) on some headless machine somewhere and make them do their work there. Have it be a different distro than what their desktop machines are; in your case I'd recommend CentOS as being different enough to understand that there can and will be some variation between two different "Linux" machines in the real world. Teach them to actually do work on a machine that they have no physical access to and make sure they "understand" (rather than simply "know") that physical access to a machine is not required to do real work on that machine. Make them do their work in vim or emacs and turn it in by dropping tarballs into a shared directory.
Somewhere about 3/4 into the semester, bring them over to the GUI and show them a IDE like netbeans (free, easy to use and supports a decent variety of languages). Spend your GUI time teaching them that on *nix the GUI exists primarily to support tools that exist in the CLI.
On the last week that isn't review, give them access to a Solaris and a HP-UX machine and give them an assignment to do on both machines that is similar (but not quite identical) to something you gave them just before the GUI switch.
Possible first assignment: (notes in parenthesis are for you and not to be included in the actual assignment)
1. Create a directory named "assignment-01" in your home folder. (introduce mkdir)
2. Within "assignment-01" create the following sub-directories "pets", "color", "os" (introduce cd)
3. In the os directory create a text file named "home" with one line naming the OS you use at home. ex. "Windows 7", "OSX Snow Leopard", "Amiga OS", etc. (introduce vim)
4. In the color directory create a small HTML web page named "color.html" complete with well formed <html>,<head> and <body> tags. In the body of this page name your favorite color and make it display in that color. If your favorite color is white or too light to read on a white background, change the background color to black or lie about you favorite color and pick a new one. (multi line editing, interpreting requirements, that warm fuzzy feeling of making something "real"; check for opening and closing tags on html elements, mention in class bonus points if they include a DOCTYPE and/or a page title but do not list in the written assignment)
5. In the pets directory create a Comma Separated Value, CSV, file with one line per pet in your home. The column should be as follows {Pets name, type of pet [cat, dog, goldfish, etc.], latin name for species}. All columns should be wrapped in double quotes. If you have less than 3 pets, create imaginary pets until you have at least 3. (create machine readable text files)
6. In the assignment-01 directory, create a text file named "hello" with one line reading "Hello, World" (necessary for a later step)
7. create a tar zip file with the name cs101-{username}-01.tar.gz of the assignment-01 directory and copy the resulting file to
8. Move hello from your assignment directory to your home directory. (introduce mv)
9. Since you're on Linux now you need to let go of your old OS. Delete the os subdirectory and it's contents. ( introduce `rm -r` )
10. Make sure your instructor can review your work by making the assignment-01 directory readable but not writable to the cs101 group. (chmod, ls -l and maybe chgrp)
My God! It's full of eval()'s.
Give them a box of computer parts and a printed copy of linuxfromscratch.org and tell them their grade for the class is going to be the one displayed on a web page served by apache under Linux installed on the machine they assemble from those parts by the end of the semester. Best class they'll ever take on Linux.
These are CS students. Discounting the ones who will be quickly switching majors or dropping out, sed, awk and regex are going to convert Windows/Mac users to command line Linux.
Really, it's just plain mean to wait until senior year for the weed out class. Freshman year is the time to ditch people who think that a love of playing computer games means that they will get to enjoy a well-paid career as a game designer.
This is flamebait. Computer Science has nothing to do with computers and nothing to with operating systems, Linux included. Computer Science is a subset of Mathematics, and like Mathematics, predates computers and operating systems by about 6 thousand years or so. There is no such thing as software engineering in the same sense that there is no such thing as mathematics engineering. Programmers are not computer scientists, and neither are systems operators or administrators. If any of these occupations are your goal, perhaps you should consider other more pragmatic disciplines and avoid the strictly academic ones, such as Computer Science.
The Admin and the Engineer
If they haven't already looked at linux, it's because they lack the innate curiosity to find out more about their chosen profession.
These are the types who will mostly not graduate beyond "I can admin a server because I know where to point and click" anyways.
Even the simplest of tools, like vi or ssh, are pretty much beyond them.
Wow, what an arrogant, asinine point of view. These are college freshmen that we're talking about here. Yes, there's a good chance that many of them have had no exposure to Linux, since statistically speaking, most college freshmen probably come from households which have only used Windows or Apple PCs. They're majoring in computer science because they want to learn about computers, not because they already know about them, duh.
I'm glad that I didn't have teachers, parents, or friends with this attitude. When I started out as a computer science major, I knew my Commodore 64 in and out, but I had maybe touched an Intel-based PC a handful of times. I was dumb as dirt too, and I didn't know a damn thing about various Unix- or PC-based editors. I was motivated, though, so I came up to speed. Believe it or not, you were dumb as dirt at one point, too. Back when vi and ssh were beyond you (and I'm 100% sure that at one point, they were), how would you have liked it had someone told you that those simple tools were pretty much beyond you, and that you probably would never graduate beyond "I can admin a server because I know where to point and click"? Such comments are completely non-productive, and irrelevant to the submitter's question.
Maybe some of them will drop out of CS. Maybe some of them really don't understand what they're in for and will leave. But then again, I'll bet that there are quite a few who are going to college to learn about stuff they want to know, not more about stuff they already knew. Some will undoubtedly be part of the next generation of people who will make fun of you someday as one of those old fogies who can't keep up with the stuff they're working on.
Correct. You don't have to like linux, or want to use it as a computer scientist, but you should have some basic familiarity with what it is and how it works. I'm a PhD student in computer science and my actual work doesn't take me anywhere near linux, but I need to know what it *could* do for me (or more accurately for my workflow) in case that helps.
The problem as I see it is this: "Back in the day" (hah!) when I installed Mandrake for the first time, then Red Hat, then Slackware on my store-bought "first PC" at university, of my own volition, it was an absolute pain in the fucking neck to get it working. There seem to be a lot of people who are saying "the best way to learn is by installing it yourself" or "if they haven't already tried it they are n00bs and should quit CS and take up needlework". But the fact of the matter is that when most people try "Linux" these days, it's Ubuntu, which, I hear, is a piece of piss to install. Hell, the last time I installed Slackware (aside from the clunky-looking installer) it was incredibly straightforward.
My point is, there's actually value in teaching the inner workings of Linux because there's no guarantee anymore that you'll encounter sed, awk, vi or even a command line just because you're using "Linux".
Linux is one of the potential components of your workflow as a computer scientist, and one of the major potential platforms for any work you may want to do. A mathematician who spends their life working in set theory still needs to know what differential equations are, and what they mean.
Software engineering is a critical component of computer science, because computer science isn't mathematics, they are deeply related and intertwined, but not exactly the same. Computer science is about what you can do with information, that includes how you organize it. Computer science is both more and less than pure math, and different schools emphasize comp sci very differently, some are right on the metal focusing on building from hardware up, others work from pure math down, (and if you're in the area, waterloo starts at pure math and works down, Laurier which is basically in the same place starts with hardware and works up). You cannot actually implement the vast majority of ideas in computer science without some basic skills in software engineering, nor can you communicate effectively with other computer scientists about what ideas they have, or what ideas you have. Computer scientists and physicists aren't engineers, (and I count myself as both a physicist by training and work and a computer scientist by training now), but you need to know some of their tools to do your job. True, a purely theoretical physicist doesn't use a whole lot of electrical engineering. But a experimental physicist uses a lot of engineering materials regularly. A purely theoretical computer scientist, may use relatively little software eng, but a experimental computer scientist may use quite a lot. In that sense computer science is as much math as physics is, but it's something else too, since experimental computer science is concerned very heavily with how you actually store the information everything that comes with that.
There's also a lot of very real research in software engineering processes as done by computer scientists, the big area at my school that I'm aware of (University of Western Ontario) is in automated software testing and performance analysis. Software engineering is a very real field, but until you try and build software involving dozens of people (not all of whom are programmers), and then try and keep it updated and maintained over many years, it's hard to appreciate how there's science there, but there can be quite a lot.
Computer scientists *can* be programmers, they *can* be system operators or administrators, or something else, and or all practical purposes they have to be minimally skilled in programming and system operation. Please don't confuse job training with academic training. We aim to empower students to learn effectively and give them the skills and knowledge they need to be prepared for a general area (computing), what they choose to do with that is up to them. Some, well, the vast majority, will end up programming or
Actually... :)
My girlfriend has a Mac. Right now, I have a Windows machine beside hers, because I'm gaming on it a good bit. I make up for this by having a Linux server farm, so I do "real" work on those machines.
She's seen where I've had issues on my Windows machine. I get frustrated. She watched me work through a mystery blue-screen problem that turned out to be a particular version of the video driver was causing. It was very difficult to diagnose, and using the Microsoft provided driver, or the manufacturers most recent driver was not the fix. {sigh}
On her machine, she was running into some issues also. She plays a few full-screen games. One of the games was performing horribly. To diagnose it, I ssh'd to her machine while she was gaming. Using standard tools (like top, ps, and kill), I was able to help her out. For example, from the desktop, she knew she had closed an application. From top, I could see that it not only wasn't dead, but it was taking up half the memory in the machine. While she was playing the game, I could see the system was using over 80% of the memory (2Gb), and and when it started swapping, that's when the performance went to hell. I helped keep the machine performing ok by killing unwanted applications while she was playing. You can't do that on a Windows machine without a bit of 3rd party magic and virgin sacrifices.
Then there was parsing some information. She has a book cataloging program. She wanted to import the information from one application to another one. She pointed & clicked around for a while, and was making very slow progress. She was to the point where she had a file with almost 2000 records, that she needed to clean up to import. It would have taken her quite a while, so I shelled in and did "cat file.txt | cut -f 2 -d , | sort > import_me.txt" Voila, one line, and it was done. Again, standard tools for *nix, Linux, and OSX, that are not standard for Windows (adding 3rd party apps doesn't count).
I've been trying to encourage her to get familiar with working in the shell. She understands what to do.
We're to the point of wanting to set her up with a hackintosh. I have spare hardware that would build her a very nice fast machine with more memory than hers has. Even the 2GB upgrade was expensive for the Mac. It's outrageously priced from Apple, and still overly expensive from 3rd parties. We ordered it from Crucial, who had the best price for the required full buffered RAM. She likes the idea of my spare 6GB RAM, and faster CPU, than spending thousands on a new Mac. Her only consideration now is how pretty the case is going to be. There's an alienware-like case on CompUSA's site that I'm considering for her. :)
Serious? Seriousness is well above my pay grade.
....why am I paying $20,000 a year (on the low end) for my kid to go to school and study Computer Science just to have a freakin sophomore teach him?
Major WTF?
When Fascism comes to America, it will call itself Anti-Fascism, and tell you to give up your guns.
Right on. Most CS students are unaware that they have signed on for math, set theory, relational algebra, etc. They mostly think that they're going to learn how to program games and become rich.
There's also the other subset of CS students who are forced to take beginning CS classes due to their major. Bioinformatics for instance. They really don't have the head to figure this stuff out.
I would say that 95% of the CS students I have taught in lab or tutoring were in above their heads and 60% either switched majors or failed. Some of them failed the CS intro to programming 3-4 times before they figured it out.
You may not realize it, but the 90/9/1 principle applies to CS as well. 90% won't get it, 9% will get through it, and 1% will go on to Masters or PhD.
So, the best way to teach CS students about Linux is to wrap it up in a series of lectures that include different OSes such as Windows, Linux, Mac OS, DOS, etc. That's probably the only way to get them interested (most will gravitate towards the pretty ones).
Enjoy! -Excalibur