What are some computer tricks that a CS student must know? by Joshua Gross
Answer by Joshua Gross:
Thanks for the multiple A2A!
- Many successful CS students, software developers, and computer science researchers and educators are not white or Asian men. And no, it’s not just Grace Hopper. Margot Lee Shetterly’s book, about the Black women who were critical in getting men into orbit and to the moon and back, is being made into a movie. This is important to know even (or especially) for white and Asian men; don’t make assumptions about other people (for example, when picking partners for team work).
- Success in CS depends on hard work. I’ve had brilliant students fail out, and I’ve had not-so-brilliant students graduate. They maybe didn’t have the highest GPA, but they finished and have the credential and professional careers and better futures. To me this is completely just: you don’t choose how intelligent you are, but you do choose how you employ your intelligence.
- CS is not “about programming” any more than history is “about writing”, and many CS students are not good programmers. They don’t (obviously) become software developers, but most CS graduates do not go into software development programming roles. Others go into business analysis, QA, system/database/network admins, devops, or support. Some go in other directions; in the US, a CS degree qualifies you to take the patent bar and become a patent agent (which is a form of intellectual property law that doesn’t require law school), and they’re often supported through this process by employers who have unofficial roles for them to play until they become patent agents. How do these students get through all of the programming? See #2.
- CS is not about math or a form of math. There are some computer scientists who believe that the only true field of study in CS is the theory of computation and/or algorithms. They’re a tiny minority. Many CS majors don’t think they’re “good at math.” How do they get through math? See #2, and realize that not all CS programs require the same math (we only offer a BA and only require Calc I and discrete).
- Your professional career is often limited (especially in the long term) by your so-called “soft skills”. Communicating, working in collaboration, leading and following, persuading, and adaptability are crucial to success. I recommend students minor in either a social science or one of the humanities. No one has ever come back and told me I was wrong (because I’m not). Even research computer scientists need good writing skills. We require our students to take an additional writing course beyond freshman comp.
- There’s a reason that multiple generations of computer scientists swear by Unix/Unix-like operating systems, command-line interfaces, and text editors (vi and emacs). Most of us love developing software in that environment, and many have turned their Unix skills into careers in system administration.
- You don’t need a fast computer. It’s doubtful you’re going to do anything that requires a powerful computer. If you have an Intel-based ChromeBook (not ARM-based, and you might have to do some hunting to find which is which), you can have full access to Linux and most Linux tools. Some of these cost $200 and are decent laptops for many purposes, and since they don’t have lots of power and discrete graphics, you can’t play the most absorbing video games. It’s fine to play video games, but I’ve seen students fail out of college largely as a result of obsessively playing. Avoid temptation. Recovering cocaine addicts aren’t usually encouraged to sit a room full of cocaine.
- You can learn about X without having a class on it. Right now the most popular X that doesn’t take multiple semesters to learn the basics of is cloud computing. Google is opening up free credits for their cloud services next month. Amazon Web Services (AWS) offers credit for students (although your department needs to support this and you still need a credit card) and I’m told Microsoft Azure is largely free for students, although I haven’t used it. All of these allow you to configure and use Linux servers running web servers and database servers and anything else you can imagine. You can also do massive distributed computation projects.
- Programming is not like riding a bike. Late every fall I tell my students to do some kind of programming, even just redoing a homework assignment they already did in the semester, over the break. Every time they come back, those who did are far less stressed and do better in the first couple of weeks. Now magnify this several times, and see what happens if you do no programming over the summer. Not even a lot. I make my students tell me about the project that they’re going to do over the summer; I don’t make them do it, but I make them at least think about it.
- It’s easy to write and release open-source code, and more and more employers like to see Github pages with publicly visible projects. It doesn’t matter if they aren’t the greatest programs on the planet. You also get experience using version control, which (sadly) is not taught to many students, despite it being fairly easy and absolutely critical to software development in the large.
- Yes, you have a laptop. Don’t use it to take notes. Take them by hand. You think you have bad handwriting? Ask my students about mine (writing on a board is hard). You’ll take better notes and be able to draw and move around. The tendency with typed notes is to write the professor’s lecture as verbatim as possible, but writing is slower, so you have to process what your prof is saying.
- You don’t have to go to MIT, Stanford, or CMU to do well. I know many successful people at top companies who went to good (but not “top”) liberal arts colleges and/or public universities. Yeah, there are some millionaires in there. If there’s an internship or job you want, apply for it. You won’t hear back from most people, and most you hear back from will reject you. It sucks. It’s frustrating. It’s the way things are. It may happen less to Stanford students, but it still happens. Also, Larry Page and Sergey Brin met at Stanford as PhD students, but both did their undergrad degrees at public schools, and only Brin ever finished a degree at Stanford (an MS).
- It’s not natural to listen to criticism and be able to take it in without feeling hurt. Getting good takes patience and practice.
- Go talk to your professors and TAs in office hours. Ask questions about your reading. Ask about anything that you’re struggling with or you find interesting. Good things happen. Some profs will be annoyed if you come in to ask something that shows you didn’t show up to class or do the reading, but most will respond eagerly if you are struggling with the material. When I was an undergrad, I had to read a book about publicani, but I had been sick for week and had missed all of the lectures, and the book didn’t actually say what the publicani were (they were tax collectors), and my dictionary didn’t describe them, either. Two minutes with the TA solved the problem.
- Similarly, use tutors. I tell my students: here are the tutoring hours, the tutors work in the programming lab, you know you need to spend several hours each week programming, so go while the tutors are there. That way, if you need help, it’s there. If you don’t, no harm, right? Also, it will give you a schedule.
- Your professors aren’t trained on the latest advances in software development. We have to do many things, and we’re not professional software developers. We therefore may not know the easiest way to do something particular with a language (although we’ll know a way). It doesn’t hurt to, ya know, Google.
- Not everything on Stack Overflow is accurate or current. A lot is.
- Google. Got a weird error? Google it. Have an infinite recursion in Haskell and you can’t find it? Google “haskell infinite recursion common problems” or something like that.
- If you don’t find what you want on a Google search, there’s a magic trick: scroll down to the bottom and you’ll see there are additional pages you can look at! Shocking, I know. Similarly, there are suggested alternative searches.
- Don’t reinvent the wheel. In your intro classes and in algorithms and data structures, we (your profs) make you build stuff by hand, despite the fact that it’s been implemented. However, you should never ever ever actually do this in real programming. Use built-in libraries or find libraries. My second semester students make audio players, despite not knowing the math or decompression algorithms.
- If something seems absurdly hard, take a step back every once in a while and see if you are heading down the right path. I had a student spend about four weeks working on a problem, and I typed in precisely the words they used, and instantly found 4 methods to do what they wanted, all of which would have worked. Complex computer vision algorithms didn’t solve the problem, but some simple math did. See “Don’t reinvent the wheel”.
- Most CS textbooks are terrible. We know this. They’re always compromises. If there was a good one, trust us, we would use it. Don’t feel like you have to rely on the textbook. You have Google. I wish I had Google when I took my first CS class (just as my predecessors wish they had 486 processors and multiple megabytes of RAM).
- Don’t start work last minute. You end up stressed, and you get a lower grade.
- There are three reasons why people work all night. The number one cause (especially with frosh/sophomores) is that they left the work until the last minute. The second is that “I’m just gonna fix one more bug,” or “As soon as I get this test to pass,” this is OK as long as you are getting regular sleep. The third reason is that many of us are night owls; again, you still need regular sleep and you need to attend classes. When I was in the startup world, if I was at work at 8am, I hadn’t arrived that day; I was still there. I could do this until maybe age 30. I never pulled an all-nighter in my MS or PhD, and it’s not because I’m a genius.
- When I was paid large amounts of money to write software, I always wrote unit tests before doing anything else. In basically all of my MS coursework, I wrote unit tests. When I was working on the code that would make or break my dissertation, I wrote unit tests. You can do as you wish, but you can see what I consider the most efficient way of writing good code.
- Don’t call it “coding”, call it “programming”. This will help you and others remember that it’s not cryptic. Code is complicated, but it’s not cryptic. It’s far, far more readily decipherable than Shakespeare (not to mention Derrida).
- If you assume all majors are hard, you won’t be as frustrated when your major is hard. You also won’t be a jerk to other people. The world doesn’t need many jerks. I think we currently have our quota of jerks, along with some extra. If you need a more venal reason, realize that these people may help you get a job in the future or something.
- Programming is not a linear task, but it does require some linear effort. You can’t just wait for inspiration to strike; go work for a couple of hours, then go get something to eat, or go for a walk. Let you subconscious do the hard work.
- Avoid the holy wars. Do you like Windows? OK, but don’t tell people with Macs that they’re stupid or bought something just for the brand name. Love Linux? Fine, but that person using Windows may just not be interested in the things that interest you. Think Macs are awesome? You… you’re correct. However, still be nice. 😉 Vi vs. emacs, LaTeX vs. MS Word vs. Google Docs, how to pronounce LaTeX, Java vs. C++… I’ve used just about everything, and everything has its merits and drawbacks in specific contexts.
- You don’t have to ask for permission. I had a student ask “Can I make a video game?” I responded (somewhat snidely, but correctly and with a point), “How could I stop you?”
- Many PhDs didn’t have stellar grades as undergrads and did work on something of interest to them, sometimes to the exclusion of work they needed to do well on for a good grade. However, every PhD ultimately passed all of the required classes and most had undergrad GPAs above 3.0.
No, this isn’t as slick as customizing your Linux desktop. However, these are the keys to short- and long-term success. Students who generally follow these things tend to be happier, be less stressed, have higher grades, and have far more free time than those who don’t. It’s all about efficiency. When you take your architecture/OS, you’ll learn about the cost of context switching and the benefit of scheduling; just because that’s stuff that happens in microseconds doesn’t mean it doesn’t apply to larger time frames.
Oh, OK, one cool trick. In Google:
will give you sites similar to the one that of Coca-Cola, so you’ll see Pepsi and RC Cola. Want to find schools similar to yours? Try related:yourschoolname.edu (you may need the www.). There are other keywords: site:[domain name] limits results to URLs in that domain, info:[URL] will give you info about a URL (including links to pages that link to that URL), and cache:[URL] will show you what Google has cached for that URL, which may not be what’s there.