Ask HN: I'm an incoming freshman to college for a CS major, what should I know?
Programming in high school is quite different than the work you will be doing in a CS program. CS is a hard, but not impossible, major. Depending upon the school it will be perhaps easier than a Physics degree and maybe a bit more work but easier than a Math degree.<p>There is too much CS to learn in four years so every program leaves something out. For example, some schools will require a class in Artificial Intelligence while others may not but will instead require a course in Data Science. So it&#x27;s hard to know exactly what you will be studying, but I can make a few suggestions that should be helpful for someone heading off to college and planning to study CS.<p>Generally, there is a lot of useful math that you may be required to learn. Usually one year of calculus, one semester of differential equations, one semester of linear algebra (matrices, etc.), one semester of statistics or probability, and one or two semesters of discrete math. It&#x27;s easy to end up with a math minor on your way to a CS degree, and I recommend getting one if you are reasonably good at math. The good thing about this selection of math subjects is that they are all in different areas and are consequently to some degree &quot;introductory&quot; or lower division. The trick at this level for doing well in math classes is simply to put in the time to do all the homework, attend all the lectures, and prepare for tests by doing every problem (even the ones not assigned as homework) from the text book sections covered in your class. If there are problems (even unsigned ones) that you can&#x27;t do, meet with the professor and get help. This is a pretty simple formula for getting A&#x27;s in math classes. This really works I&#x27;ve done it myself; I was always good at math in High School, but it took me a while to understand that doing just the assigned homework was going to result in B&#x27;s not A&#x27;s. Doing extra practice by taking a couple of Saturdays to solve every problem in the book resulted in getting the highest grades in the class. No matter where you start out, extra practice will make you better. Great athletes achieve success the same way, through more practice than others.<p>CS homework often involves programming. In your web-design class, you will write programs that implement web-sites; in your data structures class you will write programs that implement different data structures. This kind of homework has a special property unlike history homework or chemistry homework. One can be short on time and do a crappy job on a history paper or maybe get only four out of five of the chemistry homework problems done, and this might get you an 80 on the history paper or chemistry homework. In CS, the programming assignments, sometimes called labs, are different. Doing 80% of the work required to finish a program generally means a program that isn&#x27;t finished and a program that isn&#x27;t finished often doesn&#x27;t run at all or runs and produces the wrong answer. This could result in a 0 or maybe a 25 on the homework, not an 80. This means that you have to adopt a different approach to tackling labs. To avoid a disastrous grade, <i>start early</i>. If you finish your program a couple of days early you can go out and party, but I predict that you will almost always feel a lot of pressure as the deadline approaches because these labs will take more time than you think they will, so <i>start early</i>. Start on the first day, and put some time in on these projects every day.<p>Some of your classmates won&#x27;t start projects early, there are two possible consequences. They won&#x27;t be able to finish and will get a bad grade or they will realize that they aren&#x27;t going to finish and will cheat by seeking the solution on the internet. There are only so many suitable labs for the subjects you will be studying so the programs can mostly be found on the internet. You will be making a grave mistake if you take the route of starting late and then making up for it by copying someone else&#x27;s work. You have to practice programming on your own to develop your abilities and prepare yourself for a career in CS, so <i>start early</i>. By the time you are in your third or forth year, you will know which of your classmates have been doing it by themselves and which have been taking the easy way. By starting early and doing it yourself you will gradually become one of the best, and your professors and even your classmates will know it.<p>When I taught undergraduate CS classes while in grad school, I noticed two categories of students. Students that never came to see me during office hours for help and students that did come by for help. I was always happy to see someone that had obviously tried to solve a problem but was stuck or didn&#x27;t understand. Go see your professors outside of class, they will be far less scary after you get to know them. Eventually, you should get to know two or three of your professors well enough that they can be of help when applying to grad school or when looking for a job. They may be able to help you get an internship or real job during the summer. If you have a question about something that comes up in lecture, sometimes you can get a quick clarification by just walking with your professor after class on the way back to another part of campus.<p>Sadly, books are very expensive. I&#x27;ve frequently used my text books after the course is over, so I don&#x27;t recommend renting books. Used books are often almost new so I recommend keeping your books and saving money finding used books in good condition (make sure they are up to date). I have found few CS books that are as good online as the hardcopy books, so I recommend hardcopy books.<p>Team projects will come up in every CS program I&#x27;ve heard of. I hate these. (1) don&#x27;t trust your teammates to get their work done on time. (2) don&#x27;t trust them to turn the project in on time, (3) don&#x27;t trust them to do their part correctly. So, start early! Give yourself time to straighten things out if you or your teammate doesn&#x27;t get their part straight. If you have given yourself time, you can recover.<p>You are probably one of the best programmers amongst your peers if you are planning on going into CS. I was like that. There will be a great temptation to produce a fancy, faster, better, more feature-full solution in your programming assignments. That&#x27;s a great goal, but remember, when programming, things will take longer than you anticipate. So in addition to starting early, make your goal the simplest program that will satisfy the requirements of the assignment. If you&#x27;d like to do more, add it at the end if you finish early. Don&#x27;t add optional features at the beginning. Get the assignment done in time to add additional features at the end. For example, if the assignment is to write a program that will play legal chess moves, make your first goal a program that plays legal chess moves. Once that works perfectly, you can think about it making good moves.<p>If you can swing it, get yourself a second monitor in addition to the laptop you are likely planning on using for college. Having your work spread out on one screen and the assignment or java or python library documentation open on the other screen really helps. Don&#x27;t program with social media open. Don&#x27;t have your laptop open for lectures. So many students do it that it is widely accepted, but studies clearly show that hand written notes during lectures results in better retention and better grades.<p>Something you can do this summer is if you don&#x27;t touch-type yet, get one of the touch typing games and learn touch typing. Just learn the standard US keyboard layout--don&#x27;t bother with alternative layouts like Dvorak you will have to use other people&#x27;s keyboards or keyboard in the library or in the computer labs and they will all be the standard US keyboard layout.<p>In college you will have to write some papers, for CS you may have to use LaTeX. This is a very old, but very good program for writing academic papers. Almost every serious paper in CS or Math or Physics is written using LaTeX instead of MS Word. Unfortunately, LaTeX is hard to learn. So, if you want to, try learning LaTeX. There are lots of free resources on the internet. Because it produces professional results, lots of the information is very technical and applies more to people writing math books. However there are simple tutorials and you can get by with a moderate set of features to write college papers. If you look at LaTeX and it looks like something you would rather not learn this summer, try a tool called markdown. There are free markdown programs available and you can write nice papers using markdown as long as they aren&#x27;t too complex.<p>In addition to LaTeX or markdown you will need to get comfortable with a text editor of some kind. Emacs is free, old, has hundreds of built in commands, uses weird keys for things, and can do absolutely anything. Vim is also free, old and weird, but more programmers use it and it is very powerful. More modern alternatives, that you will be able to pick up faster because they do less and are not weird are Atom and Sublime Text. Each of these has it&#x27;s advantages, I like Emacs. Pick one and start using it for your programming. You will eventually have to start using a professional text editor, one of these four will be fine. See [1] for a professor&#x27;s Emacs lessons for his students, but there are many other YouTube tutorials on Emacs and these other editors.<p>[1] <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=49kBWM3RQQ8&amp;list=PL9KxKa8NpFxIcNQa9js7dQQIHc81b0-Xg" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=49kBWM3RQQ8&amp;list=PL9KxKa8NpF...</a>