Ask HN: What advice do you have for new CS student?
I am 20 year old CS student from Europe who has just finished his first two semesters on university.
I know some Python, Haskell, C, JavaScript, Java, Assembly. Had courses on basics of Databases, Networks, Alghoritms and Data Structures, Non-imperative programming, Low-level programming, Operating systems...
What general advice do you have for me? What should I do and what should I avoid? What topics should focus on? Which domains of computer science do you think are best to study right now?
10 comments
[ 2.9 ms ] story [ 30.2 ms ] threadTechnologies will change rapidly. Foundation knowledge is what will help you maintain your technical chops. I think understanding multi-core, like 100+ CPUs on a single chip are going to be useful in the near-term, data storage and management is another area.
Depending on your other interests and your university's approach to elective subjects, study broadly outside of CS. For example, biology, medicine, law, commerce, etc. Domain knowledge rather than CS knowledge is the key to a successful career.
If GitHub statistics are to be believed, there are over 100 million programmers in the world. To avoid becoming just a fungible resource competing with AI and low-wage countries, you really need to understand some area of commerce that makes profits instead of being just a cost center.
I got a small part of knowledge from studying and a large parts in a laboratory with peers or by just dabbling in topics of interest. At that time I leaned heavily in low level systems programming. But that was probably because we had so many toys to play with at our university (which often received presents from large companies to draw students toward their tech).
On the theoretical side I wouldn't pay any attention to the latest IT buzz, but looking into tensor algebra, number systems like quaternions and numerics in general have a very broad application in modern computing and I think university is a good place to take the time to lean into such topics. Not becoming an expert, but perhaps forming an understanding why and where such tools are applied.
- look at your professors who are running successful companies or working on research of interest to you. reach out to them early, ask to do your bachelors or masters with them, be serious, hardworking and show potential.
- cultivate relationships with other smart people in your class, maybe you or them have an idea for a business or a project, work on it together, experiment, fail a lot see what works and what does not, you are young in fact you should be doing as many mistakes as possible to learn from them
- go on an exchange program abroad for a year or so
For example: When you start, you know what a compiler is: "It turns code into programs". Then you learn the actual nuts and bolts of using a compiler to do things. But you're still a long way from building one from scratch. Of course, building a toy compiler from scratch would be a very good project to work on as part of your studies.
This can apply to everything you're studying. As you learn more, you will learn the names of many many concepts, libraries, languages, techniques. Sometimes knowing the name and a 2 line summary will be enough, but don't confuse it with the other deeper knowledge. Make a conscious effort to pick up deeper knowledge in the areas that interest you.
Rendering: how to turn a virtual 3D scene into a (2D) image? Answer: (affine and perspective) geometry, usually in the form of vectors and points and some physics. (Matrices, multivectors, are structures for convenience.)
The core concepts you need are:
1. Perspective projection (perspective geometry):
X* = H * (X / Z)
Y* = H * (Y / Z)
2. Coordinate mapping (affine geometry):
MapRange(Value, Source, Target) := Value' = Scale * (Value - Source.Min) + Target.Min
Scale := (Target.Max - Target.Min) / (Source.Max - Source.Min)
Where Source is your "old" 2D coordinate system interval (e.g., [-1; 1] x [-1; 1]) and Target is your new coordinate system interval (e.g., [0; Width] x [0; Height]).
Although, we usually have to deal with flipped y-coordinates, so:
[0; Width] x [Height; 0] or for rasterization:
X' = MapRange(X, Source=(-1, 1), Target=(0, Width))
Y' = MapRange(X, Source=(-1, 1), Target=(Height, 0))
... and ray tracing:
X' = MapRange(X, Source=(0, Width), Target=(-1, 1))
Y' = MapRange(Y, Source=(Height, 0), Target=(-1, 1))
3. Containment (affine; rasterization):
w := (1 - u - v), A, B, C from R2.
OP = uAB + vAC + OA <=> AP = uAB + vAC <=> OP = uOB + vOC + (1 - u - v)OA <=> P = uB + vC + (1 - u - v)A = uB + vC + wA
If you solve AP = uAB + vAC for u and v via Cramer's rule or by hand, you may get:
A := Det(AB, AC)
u := Det(AB, AP) / A
v := Det(BC, BP) / A
w := 1 - u - v = Det(CA, CP) / A
P is inside triangle ABC, if u, v, w >= 0 and u + v + w = 1.
4. Intersection + Containment (affine):
<.,.> - the dot product.
t = <PlanePoint - RayOrigin, PlaneNormal> / <RayDirection, PlaneNormal>
If t > 0, the line or ray intersects with the triangle's plane.
X = Ray(t) = RayOrigin + t RayDirection
Now, you can reuse the 2D point containment check (3), to see whether the ray intersects also the triangle (lying on that plane).
---
Filtering the "noise" (overhead/information overload), getting to the "gist", for me, is not easy, but you can get there, if you care enough.
Look into the history and people who made significant changes. Not just as trivia, but make them living breathing ghosts in your mind.
Don't forget to develop other interests outside of computer science. You are more than your major. When you do computer science 40 hours a week, you will need other outlets.
Technology is the means to an end. Sometimes digital duct tape provides more value than a digital masterpiece.
A few 15 minute conversations have more impact on your income than mastering a programming language. Learn to negotiate. Kalzumeus.com has two excellent articles about that.
A metaphor from what I personally like: If you can make fast websites, you’re a good software engineer. If you can make fast websites with great copy and a subsequent positive effect on SEO, you could be a company.