How to Study Computer Science

How to Study Computer Science

If you're an aspiring computer science student or someone who wants to switch fields into CS, you're in luck; there's a lot of information available on the Internet. CS is a large and rapidly-expanding field; once you've become confident in your abilities to program moderate-sized projects, a lot of topics open up to you. But what do you really need to learn about, and what don't you?

A lot of it depends on what you want to get out of your study. If you want to become a researcher, you'll most likely need to know more of the theory of computer science than if you want to become a programmer. There are, however, some basic skills that will help nearly everyone in the field.

Learn Multiple Programming Languages

No matter what you want to do in computer science, you'll likely do some of it by writing computer programs. Not all languages are created equal, but most of them have some strength. You'll want to learn a systems language like C or C++. This will give you several advantages: first, you'll understand memory allocation; second, you'll understand more about how the system is designed; and finally, you'll be able to communicate with other programmers more easily. You can see this article for more details on the advantage of learning C .

But you want to learn a more flexible language for daily chores--for instance, a scripting language like Perl or Ruby will help you quickly create interesting programs and test ideas.

Finally, once you've mastered a language or two, expand your horizons with a functional language like Scheme, ML, or Haskell. This will improve your understanding of programming languages and broaden your horizons about the possibilities.

A key thing to remember when learning new languages is that all languages offer the same power--you can do anything in one language that you can in another--but some languages make it easier to do certain things. For instance, if you want to read data from a text file, Perl is a great language. If you want to write an AI engine, then you might be better off with Scheme.

Learn to Design

Whether you want to work as a software engineer or as an academic, you're going to have to design programs in some form or another. Learning good design principles early will make your life easier. The key thing to remember about design is that the goal is to catch the problems before you've committed to a solution that won't let you fix them. You don't have to do all of your design up front, but if you don't, then you'll want to leave more flexibility later.

Of course, some amount of design is absolutely crucial or you'll simply have no idea what should be flexible and what can be hard coded. Overly modular designs can be as deadly and difficult to maintain as extremely inflexible designs. One way of looking at the issue is that modularity is powerful because it makes it easier to replace a bad idea with a good one. But if you know what the good idea is going to be anyway, then modularity doesn't help you, and because it takes more effort, it can hurt you.

A good way to learn design is to practice on well-known systems projects, like writing an interpreter or web server. These kinds of projects have the advantage of having well-known implementation that you can look at once you realize that there are problems with your original design. Whatever you do design, you definitely want to implement at least parts of your designs or you'll never really come to understand the drawbacks in your ideas. It's running into these drawbacks that will teach you the most.

Learn Basic Algorithms and Data Structures

There are a variety of important algorithms and data structures that are the lingua franca of computer science. Everyone needs to know what a or binary tree is because they get used all the time. Perhaps just as important are fundamental algorithms like binary search, graph searching algorithms, sorting algorithms, and tree-based searches such as minimax. These algorithms and their variants show up a lot, and people will generally expect that any computer scientist will understand how they work.

Learn Basic Theory

There are a couple of things you should definitely be aware of: you should understand how to represent numbers in different bases and how to manipulate boolean expressions using boolean logic. Both of these tools will come in handy in a variety of circumstances, especially when reading other people's code or trying to clarify your own. (Boolean logic is especially useful for formulating clear conditional statements.)

Even more important, you should have a good sense of the limits of current computers. In particular, it really helps to understand the ideas in algorithmic efficiency and Big-O notation. Knowing these topics makes it clearer why certain programs and algorithms will take a very long time to run, and how to spot them. It also makes it signifcantly easier to optimize your program when you know which algorithms to choose.

Finally, it's useful to have a sense of the absolute limits of what computers can do; it turns out that there are just some things that are not possible for a computer to do. Sometimes it can be tempting to try to write a program that does just that!

你可能感兴趣的:(Scheme,haskell,perl,Ruby,idea)