299

Beej's Guide to Learning Computer Science

I see people argue “But other people hate their jobs in other industries, just push through and grind, money is money”

Sure, but I want to point out that software development is kind of unique. I can’t think of too many other professional jobs where the line between hobby and work blends, for so many of its workers.

Let us be honest with ourselves, many of the toxic things in this industry are caused by a strong culture and “It’s my hobby, and I’m extremely passionate about it” mentality.

So people are willing to learn new skills in their spare time, unpaid of course. They’re willing to pull OT and weekend work, for the mission.

And those that don’t, are deemed lazy or fakes, not passionate enough.

You don’t see investment bankers / lawyers / management consultants / etc. go on about side projects, leveling up their skills during the weekend, and other things that are considered completely normal in this industry.

My point is - those are the types of people you’re up against. Those are the type of people many employers love.

If you have zero interest for the craft, and just plan on grinding for the money, there are other similarly lucrative ventures, which might align with your own interests, and where it is accepted to be in it for the money.

4 hours agoTrackerFF

I have so many disagreements with this post.

I know plenty of people in the food industry that are constantly trying new things at home and while staying late/early at work. I even know bartenders that are playing around with things at home. How many grease monkeys work at a shop on other people's cars yet go home and continue to turn a wrench on their own project car? My grandfather was a custom cabinet maker, and was always trying new things as a hobby project to be able to offer something different to his clients that other builders did not offer. There a plenty of people in non-software professions that like to push themselves outside of work. Just because you don't know any does not mean they do not exist.

Every industry has a group of employees that are essentially just there for a paycheck. This is not a unique thing to the software industry. The flip side of your deeming people lazy/not passionate for not wanting to work for free is that perspective is just off. Just because someone has other commitments does not mean they are lazy. Having a family tends to cut into free time during nights and weekends. Being lazy would mean doing nothing during that time, and I can assure you people busy with family would also love to have time for doing nothing.

This just boils down to people really not understanding personal/work life balance. It just so happens that young people that seem "hungry and passionate" because they spend so much time at work are also people that tend to not have family which affords them a lot of this "passion time" for growing. It's a very simple and normal situation in people's growth. Not being able to recognize that for what it is to me is the thing that should be really questioned.

2 hours agodylan604

There is also a huge difference between “hey I am leaving at 5 because I have life outside of the job” and “hey I just collect paychecks here”.

12 minutes agoozim

> "You don’t see investment bankers / lawyers / management consultants / etc. go on about side projects, leveling up their skills during the weekend, and other things that are considered completely normal in this industry."

Lawyers pay up front with an extra three years of law school and a bar exam that only 79% pass on the first try according to https://www.reuters.com/legal/government/first-time-bar-exam... .

40 minutes agoThrowawayR2

> You don’t see investment bankers / lawyers / management consultants / etc. go on about side projects, leveling up their skills during the weekend, and other things that are considered completely normal in this industry.

Maybe not side projects, but their work schedules can be insane when compared to the typical SW engineer.

an hour agoBeetleB

Programming is pretty lucky that there is also large demand for programmers, and the product is high grossing, because the salaries are good. Most other fields with a passion component are low paying. Almost all of the arts Film, Music, Writing, Art pay very low if you are not the absolute top of the field. Millions of people are out there writing short stories, drawing manga, shooting student films, etc for free to land jobs for salaries that the average CS grad would laugh at.

3 hours agoecshafer

We're in that position because the work is both hard and appears hard. The kneejerk response most people have to a wall of source code is to run in terror. We know that "being able to read the moon runes" is not the valuable part of our profession, but it has served as a convenient first line of defense. People are more willing to pay ridiculous sums of money to people doing things "I could never", as opposed to "I could, if I wanted to". Art mostly is in the "is hard, looks easy" category. Just look at the average person's response to Barnett Newman's paintings, for example.

IMO, this is the most imminent risk with vibecoding. Not that it'll reduce the demand for software developers, but that it'll damage the perceived difficulty of our work.

2 hours agoOkayPhysicist

I agree with the last part, but in many ways that had already been done or at least accelerated in the era of bootcamps.

I had the displeasure of working with more than a few folks who got into it for the money and claimed it was easy, who thought it was a job of mainly Googling and copy pasting. The sad thing is that these people often survive fine in a big enough org.

Yeah, maybe I'm gatekeeping a bit, but it felt like it really cheapened the image of the job.

But you're right, vibecoding is likely going to accelerate such diminishing further.

an hour agosilisili
[deleted]
27 minutes ago

> I can’t think of too many other professional jobs where the line between hobby and work blends, for so many of its workers.

I would argue that the majority of rank and file programmers are not coding outside of work.

3 hours agobluedino

Anecdotally, this is my perception as well- I'd say maybe 5% of the people I've worked with are the "finish software dev workday, then go home and jump right back on the computer" type. Personally, when I'm done my workday, the last thing I want to do is sit back down at a computer (with rare exceptions for inspiration spikes).

3 hours agoRankingMember

>You don’t see investment bankers / lawyers / management consultants / etc. go on about side projects, leveling up their skills during the weekend, and other things that are considered completely normal in this industry.

It is absolutely the case in industries like law and consulting that you are expected to put in time after hours to network with clients/partners, and get certifications.

3 hours agoJambalayaJimbo

Pro bono cases are basically "hobbyist" projects for lawyers - they get to practice their skills, and maybe do some good, but they don't get paid for them.

2 hours agojhbadger
[deleted]
an hour ago
[deleted]
4 hours ago

> So, while it’s clearly possible to have a career in a lucrative field you dislike, it’s (a) going to be harder for you than for people who like it and (b) maybe you should consider a field that you do like?

> You gotta want it. Do you want it enough to go through the tremendous amount of effort it takes to learn it? Maybe you hate programming, but you want the money enough. Maybe you don’t care about the money, but you want to program every second of the day.

> Just make sure you have the drive to make it happen.

Man this is so true

13 hours agoalexchantavy

There's also a huge difference between liking to program and liking to work as a programmer. I despise the latter as business programming takes the joy out of everything. Trying to educate management about the current boundaries of the product or having to work extra hard because a product manager promised features that dont yet exist is exhausting. Not being allowed to work on fixing tech debt while having to build on top of it is pain. Doesn't help being a solo dev in a start up either so maybe that's the issue.

12 hours agozwnow

> current boundaries of the product

I like pushing the boundaries and making seemingly hard visions come to life. Sadly, I'm often working on CRUD applications where most things are possible and boring. At home I work on obscure side projects to see what is possible with either existing open-source projects, or non-existing projects (things I want that I can't find).

23 minutes agogiancarlostoro

> I'm often working on CRUD applications where most things are possible and boring.

Gotta disagree, a lot of things aren't possible as soon as you have a data scheme set which was running in prod for a while. Introduces a lot of complexity when data structures suddenly have to change.

4 minutes agozwnow

I think this is just the nature of paid work, though. Academics are generally in love with their topic, and very much not in love with the kind of admin busywork that they have to spend much of their working hours doing.

7 hours agoSchiphol

I know dance instructors, cabinet makers and surgeons who all love their work as a hobby but hate it as a job.

5 hours agobryanlarsen

I think it's just they do not have the financial freedom to say No to many of the tasks. Once I have the FU money I'd definitely quit.

But what is a hobbyist surgeon?

4 hours agomarkus_zhang

> But what is a hobbyist surgeon?

Serial killer

8 minutes agotuveson

A taxidermist.

an hour agodangets

body modders? folks who like to hang from hooks? i wonder how many folks in those communities have advanced medical degrees.

2 hours agoGuinansEyebrows

On the face of it recreational surgery seems like a risky hobby.

5 hours agocess11

I meant it as a shorthand for the standard gripe of "love my job, hate the paper work.". Many surgeons will also admit that they hate clinic work too, it's so much nicer once the patient is sedated and they can drop their bedside manner.

However there are jobs close to "recreational surgery".

One is surgical assisting. The pay is poor compared to being the primary surgeon, but has none of the patient or bureaucratic responsibility. Retired surgeons often do this, and not because they need the money.

Another is volunteering in the third world. Little bureaucracy and no long term patient contact.

4 hours agobryanlarsen
[deleted]
4 hours ago

Have you found any strategies that help maintain joy while dealing with business constraints? What boundaries work best?

9 hours agobadmonster

As long as:

(1) The technical staff understand the business constraints AND (2) management understands the technical constraints AND (3) both constraints "match" you are in heaven. I've seen that. Is possible. Is nice.

More often than not, one of the 3 conditions is not met. In case of 1 and 2, if they are good professionals, talk can (and typically will) help. In case of 3, you business case sucks, that is a big problem, change company. Run.

9 hours agof1shy

I am the worst example to ask this. I regularly go rogue or work on private shit during work. As long as there isn't any pressing work to do I force the balance I need. Perks of working alone I guess.

6 hours agozwnow

As a solo dev in a start up, man is this true. I have a lot of control over the product, but nobody else understands or cares how features are achieved. I feel your pain.

4 hours agoshackleton1894

There's a lot you can legitimately blame PMs for, but promising features that don't yet exist is essentially their job definition. A good PM will allow for uncertainty and flexibility, but at the end of the day, to have some sort of product roadmap, even in the most agile of environments, they have to say things like "at that stage we'll have functionality x, so our product will enable users to y, so that we'll better compete across z"

9 hours agofalcor84

>> promising features that don't yet exist is essentially their job definition

Agree. I think he meant (at least my reality) they promise features that does not exist (ok) AND are impossible to implement in the promised time (or at all).

9 hours agof1shy

I think there's also an element here of... when you work a long time on something, you tend to become emotionally attached to it, and you want it to be good and work well. Time to fix technical debt and work on making the product good is often implicitly waved as a carrot ahead of people who care about that sort of thing. "We can prioritize that after we ship $FEATURE."

This then feels like a betrayal on an emotional level when instead of a nice block of time to fix technical debt, instead the priority becomes $NEXT_FEATURE (the "features that don't exist yet.")

Management that can successfully keep the treadmill running ships features faster, so it keeps happening, and can contribute to burnout as (what felt like) implicit promises are repeatedly broken for the good of the business at the expense of the product.

3 hours agogryfft

You can just remember that in many cases you're not replaceable, and can just insist to management. They love it really.

18 minutes agoHPsquared

There is a difference in promising features without talking to the devs or promising features after having talked to the devs.

6 hours agozwnow

Of course. Obviously a PM who isn't talking to the devs isn't doing their job.

But having said that, a PM is the person who owns the roadmap, and after talking to the devs, they may at times choose a course of action that goes against the devs' preferences (assuming the devs even have a consensus), because the PM has a lot of additional considerations. There are for example situations when the choice is either to crunch, take on massive technical debt, and still arrive at a feature with a somewhat lower quality than we'd like, or to lose a big business opportunity and possibly to have to let people go.

Most PMs that I've worked with are actually not that good at their job, and some were definitely detrimental to the org, but the good ones, who have an extensive understanding of the business domain and the technical situation, and have a clear vision (and strong opinions held loosely), are worth their weight in gold. And seeing how I did a short stint in a product role and don't want to go back to that sort of responsibility, I am grateful for the ones who are willing to take this on, and to take ownership when things don't go according to plan (and they usually don't, even in the best orgs).

4 hours agofalcor84

PMs are an invention of PHBs that sat in too many introductions to agile from management consulting firms.

Actual agile gets rid of them along with all the other cruft. PM as a title is fundamentally a jobs program for people who couldn’t hack it as programmers, or are nepo hires. You could argue a North Star like a product manager performs useful business alignment. But in 12 years across several companies I haven’t met a single project manager that is more than a professional problem manufacturer with selective hearing that miraculously ignores expert engineering opinion.

9 hours agostuffn

> it’s (a) going to be harder for you than for people who like it and (b) maybe you should consider a field that you do like?

This shit is so infantile. It's like people have never heard of grinding. Do you think big law attorneys "love" their jobs? How about public accountants? How about dentists (famously known for having high suicide rates).

> Maybe you hate programming, but you want the money enough.

Yes welcome to the grand epiphany that drives 99% of people. There's nothing special about programmers.

6 hours agoalmostgotcaught

Interestingly, the three careers you listed are protected by strict professional credentialing systems that do not exists for programmers, and professionals in law and medicine enjoy a social prestige that is certainly attractive to a group of people who might not innately enjoy the work itself.

5 hours agoMr-Frog

I can’t speak for others, but I’ve never met anyone really successful in the industry that hate their job, or were purely driven by the grind.

Every single one have been deeply passionate about their craft.

Not saying that you can’t grind your way to success - earning enough to retire at FAANG firms is possible, just by grinding. But the vast majority, even those with a grind mindset, will not be able to do that.

5 hours agoTrackerFF

Many people love their job in the beginning but hate it towards the end though. The book "Showstoppers" shows some examples.

4 hours agomarkus_zhang

ice overview. A personal struggle of mine as someone who is self taught (with a degree in statistics) and has a full time job that does not constantly require programming, I struggle with learning fundamentals alongside doing actual projects. If someone has any advice in this regard, it would be much welcome.

14 minutes agoidkwhatiamdoing

Im a student right now and have a background in a non-CS field so struggle with the impostor-syndrome/fundamentals double whammy. The advice I’ve found most valuable is to basically cosplay as someone who’s a complete pro. What would that person read for news? How do they practice their craft? What books do they read on their free time?

Cosplay that role long enough and you become it. I’m still learning but it has been a great signpost for me over the last couple years.

Cheers and keep crushing it!

6 minutes agocalepayson

I don't have any advice on self learning, but I have been getting a MS in CS for similar reasons. I also have a stats degree, work full time, and struggle with self learning. For me, being in a structured program makes it easier for me to manage. Certainly not a requirement, but it is the way I learn best. Maybe look for classes you can take at a local university or online and see if anything grabs your attention.

10 minutes agojairuhme

On a side note, has anyone noticed the disparity of attitude and level of intensity of dialogue when it comes to AI in different HN posts?

Given that there are many threads where 80% act as if AI would cause second coming I suspected that main topic of discussion here would be "is it worth learning CS at all in 2026?". To my (pleasant) surprise the discussion here is much more "normal". Does anyone suspect that some HN posts have a lot of astroturfing from AI-adjacent organisations?

8 hours agomaciejzj

> I suspected that main topic of discussion here would be "is it worth learning CS at all in 2026?"

Considering the current state of the job market I don't think it is good idea to go into CS in 2026 expecting a lucrative career. People who just love to program will find a job eventually, of course.

> Does anyone suspect that some HN posts have a lot of astroturfing from AI-adjacent organisations?

Why does it have to be AI? I don't work for OpenAI/Anthropic/etc. and am an "AI-skeptic" overall. I don't believe that the current job market conditions are caused by AI. I think the issue is that the field has become saturated with all your regular "fullstack web ninjas" while higher education institutions are still pumping hordes of CS(-adjacent) grads. Things will get worse (people that went into CS before the downturn are still graduating) before they get better (smaller number of people who are truly interested are choosing the field these days which will result less people of higher average quality graduating in a few years).

4 hours agolII1lIlI11ll

My perception of AI discussions in HN is that it's typically negative to very cautiously optimistic, I have no clue what the possible astroturfing would be.

2 hours agosome_random

Talking to meat-space people in the industry, I find that there's a pretty well represented population across the board from "AI is no big deal, and we're going to crash the entire economy when the bubble bursts" to "AI is the most important technology since the dawn of computing, and we're going to reshape the world for the better". IMO, the most amusing people are the people who think that AGI is both possible, likely, and will be disastrous, but still are actively working towards building it. I think there's something humorously absurd about "machine-god cultists" being a real population that I can interact with on a regular basis.

an hour agoOkayPhysicist

I actually feel like the discussion here has trended relatively negative on AI for the most part.

Things change quickly though, and it makes sense for opinions to, too.

8 hours agonpinsker

I'm sure there are bots on here as much as astroturfing.

Partly is seems to be how quickly an article has comments leaning to one side or another. Once a few of these comments get off the ground, it's hard for voting on HN to reflect the discussion these days.

It does appear that more users from Reddit etc. are not just using HN these days, but commenting. The quality of posts and comments has definitely decreased, in line with the quality of content on blog posts decreasing.

6 hours agopardon_me

> The quality of posts and comments has definitely decreased, in line with the quality of content on blog posts decreasing.

I fondly remember the first time I read this comment. I think it was August of 2008.

4 hours agorfrey

Another aspect is using HN as an early seed for wider advertising.

Company blog/announcement -> developer blog -> HN front page -> Twitter -> small tech blogs -> YT niche videos -> Reddit -> PR newswire -> bigger (paid content) blogs -> YT general/news videos -> Facebook -> local news -> national news.

Meanwhile, newer developers who think they're early on groundbreaking tech news are spreading this to their friends via Discord and Whatsapp etc.

Yet all of this media is controlled, just to generate buzz and boost stock prices.

6 hours agopardon_me

My impression is that there is definitely astroturfing around AI, yes

7 hours ago63stack

HN has become per-thread view-enforced. It's pretty obvious now what the "correct" views are for any given thread, any dissenting comments are downvoted to death. When the next thread comes along, the opposite view might be the "allowed one". There's a particularly egregious amount of veiled partisanship behind a lot of posting too.

This could be a group think phenomenon, or it could be botting. Hard to say. I'd say in at least a few cases, it's someone with access and interest into bot downvotes landing on a thread and using that to suppress dissenting views.

7 hours agomjburgess

I think the title or the author of the posting tends to draw a certain crowd.

For example, I recognised the name because the author also has a famous guide on network programming. Thanks to his reputation, I was curious what he has to say about learning CS.

5 hours agoelbear

I agree. Thank you for pointing out a skeptical view.

It's unfortunate that considering supposedly only "seasoned" participators of HN can downvote, it runs deeper than a surface issue. You will be downvoted without comments replying with the counterarguments.

Scientific viewpoints often make way to hope and cope engineering here. This will only work as long as the people involved are insulated from the direct effects of their actions.

It's a shame. HN felt like one of the last bastions of the old internet where techies came to discuss tech, science, and occasionally important worldwide news, in a technical and objective way.

5 hours agopardon_me

to combat this, turn on showdead in your profile and [vouch] for dead comments that aren't trash when you find them

5 hours agofragmede

Everyone can upvote though. Upvote unfairly downvoted comments even if you disagree with them.

5 hours agograemep

Beej taught me networking in c in the early 00s. He will now teach my son computer science in the 20s. The circle of life.

13 hours agomatt3210

Looking at the article headings these don't feel like computer science, and rather how to approach coding problems. This is useful, but not Computer Science. I think that we should refer to this as Programming Engineering or Software Engineering.

It is important to call these distinctions out in my mind because the Computer Science is often the concepts or foundations, whereas the Software Engineering is about how to convert those concepts and use them in a situation such that the concepts are well implemented, tested, and will stand the tests of time (including changing it). They're different skills and concepts.

11 hours agoegwor

I think that's a valid point. The naming came from the fact that the (my) students reading this are in a degree program called "Computer Science". But I do thing that's worth a mention in the guide. Cheers!

2 hours agobeej71

Beej has been a stable reference for me for decades, also. By applying the knowledge gained in his networking guide, I've won many contracts for work that others considered too difficult (or "impossible" in the budget constraints) .. but which I managed to deliver, on time and under budget, because Beej had led the way.

Easily one of my top 5 favourite people on the Internet, alongside Linus Torvalds and so on.. I would say Beejs' impact on technology has been understated but definitely an order of magnitude or two greater than most.

6 hours agoaa-jv

Not my kids, but I also passed my Networking course thanks to his guide (early 10s), and I used it as reference material for teaching about sockets in an Operating Systems course this year.

Sometimes I just love the Internet, man.

8 hours agolou1306

Used his book to learn networking in the late 10s! It's a timeless book at this point. Using the C/Unix socket APIs as the foundation is fantastic. He dives into code and actual network function so well for such a quick read.

2 hours agojjice

Most reputable CS courses will have one or two math subjects (often called "Discrete Mathematics" or some variation).

Does anyone have any advice on tackling subjects like these for someone who hasn't done any math since high school more than a decade ago (and has forgotten it)?

14 hours agopygar

Math Academy is a good option, but I wrote about the issues I had with it here.

Recently, I've been going through Introduction to Graph Theory by Richard J Trudeau. It's from the 70s, and I'm doing all the exercises. It really is an intro, and teaches some set theory and proof stuff. Doing Math Academy at least taught me that doing exercises is incredibly important for mathematics learning.

https://news.ycombinator.com/item?id=46124247

13 minutes agoRendello

https://www.mathacademy.com/ is a great combination of structured learning across an incremental skill tree with practise problems to prove to yourself that you understand. It’s a big commitment but helped me go from “hasn’t done any math for a while and probably missed some basics” to much more comfortable. You can do the self-test to pick a starting level and work up from there.

As with many things you basically have to sit down and do the work, though, you’re not going to get better just by inhaling books and videos. MA isn’t a fun/gamified learning platform like Duolingo, the ‘fun’ comes from putting the work in and seeing yourself improve. For me it went from a grind initially to something I enjoyed doing.

https://www.geogebra.org/ is also worth exploring for its novel visual approach, but is much more rudimentary, less challenging, and less deep than MA.

11 hours agomodernerd

I third MathAcademy. I graduated high school >25 years ago with almost no math skills and had a major struggle with the math prerequisites for my CS degree ~15 years ago. I've been wanting to get into higher math recently, so a few months back I started hitting MathAcademy heavily. Its structure and modularity is exactly what I needed.

5 hours agonathan_douglas

> Its structure and modularity is exactly what I needed.

Through great effort, I completed Mathematical Foundations I & II. I talked about it a bit here [1][2]. If you read through MathAcademy's methodology and reasoning, it's incredibly strong [3], but in practice I never felt confident in my understanding or execution, everything felt quite discrete and I didn't understand the relationships or purposes of what I was doing. I kept going because I was getting better, and because people online who were quite good at math said not to try too hard to understand things fully at first, since the abstraction level of math is so high.

The weeks before finishing MFII, my motivation was higher than ever. The day I finished, I felt nothing, and in the following weeks I decided that it was time to let it go for now.

I think MA is good. I've never done so many exercises in my life, and although I wasn't super confident, I was far better at math than I'd ever been. But I think MA probably needs a lot more multi-part exercises so you understand what you're doing and where to use things. I feel like I learned "Discrete Math", but in the sense that all the lessons were discrete and I couldn't draw connections between them.

https://news.ycombinator.com/item?id=42519882

https://news.ycombinator.com/item?id=43275665

https://www.justinmath.com/files/the-math-academy-way.pdf

17 minutes agoRendello

I second this. Mathacademy is great and there is no way OP would be able to just jump into university-level math courser without re-learning prerequisites, considering they said that they forgot most of the school-level math.

9 hours agolII1lIlI11ll

I'd recommend going on Thriftbooks and ordering a textbook. I can't remember the exact copy I had years ago when I was self-learning CS, but it was like $4.00 for a really incredible textbook.

Now, I don't have a degree, so take my advice with a grain of salt, but the book was really really good, and honestly, if you've been programming for awhile, I think most of the concepts didn't require a heavy math background (of course, it would probably help). The chapters were like: Symbolic Logic, Set Theory, Proofs, Algorithms, Cryptography, and other things which I can't remember.

Edit: The book is free to read online

EDIT EDIT: Removed link as I don't know if that was a "legal" link.

It's out of stock on Thriftbooks, but looks to go for $6-8 on there.

4 hours agowhatamidoingyo

What's the name of the book?

3 hours agoink_13

It's called "Discrete Mathematics and its Applications" by Kenneth H. Rosen. A google search reveals a PDF as the first result.

3 hours agowhatamidoingyo
[deleted]
7 hours ago

My advice is to (re-)learn elementary algebra to a proficient level before attempting any other branch of math. That is a core prerequisite for absolutely everything. By elementary algebra I mean roughly everything in classes called “Algebra” or “pre-calculus” that you learn in an American high school before calculus. Geometry and trigonometry can’t hurt either but algebra is more central.

14 hours agoumanwizard

For as much as I've learned in the last 10 years of being a software engineer, I've frankly forgotten at least half of the maths I once knew.

Of course, I could take the time to re-learn it all if need be, but I'm definitely thankful to have went straight from high school into college. Having to re-learn everything just to be at baseline would make the whole experience far less enjoyable. Kudos to those that have done so.

12 hours agotresdots

> one or two math subjects

Only one or two? :)

It's not easy as an adult but it's definitely doable, don't get discouraged. The main hurdle isn't knowledge of specific topics, most undergraduate courses assume little to no previous baggage, i'd say it's more the lack of "mathematical maturity"[0], or the ability to "bridge" between the formal language of math and the intuitive "what we're doing here".

When you're writing code, you probably don't stop to think "I need to do this operation for each element of this vector, a for loop is what I need", you instead have a high level idea of what you're trying to accomplish and "make the code happen", filling in the formalities as needed. Trying to go line by line is how beginners operate, and that's why they never get anything done. I'd never get anything done either if I had to work like that!

The reason why many people get stuck in math is similar. You read a definition that goes "for all ε>0 there exists δ such that for all ..." and you immediately get confused, trying to keep the entire "abstract syntax tree" of what you just read in memory. Like in the code example, the "mature" way to see it is that we're trying to capture an idea, and the formalism is instrumental in that. What are the variables "morally" doing? (At a certain point you'll realize the formalism is actually working for you rather than against you, but that's a rant for another time...)

The conceptually easier but more time-consuming thing to do is to practice symbol pushing if you lost that since high school. For example: is it immediately obvious to you what (a+b)^n is if you expand it? Do you remember how to factor (a^3 + b^3)? Do not despair if you don't. Many more people than you think can't do that off the top of their heads, but it's the kind of "mechanical" skills that's probably blocking you at this point.

Another important aspect to learn is a bit of notation, the "standard library" of math, as it were. Understand "for all" and "exists" as quantifiers, and how they interact with negation and logical operators. It should be eventually obvious to you that negation "inverts" quantifiers. Learn at least a little bit how to work with naive set theory: union, intersection, etc. Look up what the "common" sets (integers, rationals, reals, complex) are and how they relate with each other.

And finally, try to get a feel for how proofs work. That's going to be important, even for the type of math you need for computer science.

Good luck!

--- [0] https://en.wikipedia.org/wiki/Mathematical_maturity

11 hours agoqsort

My university offered the math classes in either CS or Math departments. I always chose the math department. Better teachers and far more interesting professors (as people)

11 hours agomonero-xmr

I have a degree in CS and I got a lot from it, so I'm absolutely not going to bad mouth CS, but I have the feeling that it's possible to just get a piece of paper having learned little to nothing in a way that couldn't happen with Math or Physics.

Obviously lots of great people have CS backgrounds, but it also feels like "how did this idiot get a degree" happens far more frequently for CS than Math. It's not like everyone coming out of a Math degree is automatically a genius, but they set the bar higher and as a result math classes "feel" better.

11 hours agoqsort

Psychology and business administration is even worse.

I studied CS, psychology and business administration (I dropped out of BA, it was useless info)

11 hours agomettamage

I still have trouble getting used to the fact that “computer science” is often used to just mean “programming” in the US. This is a guide to learning how to program.

3 hours agolayer8

You're absolutely correct, of course. And part of that is because the degree that you get when you want to be a programmer is a "Computer Science" degree in the US.

I've added a clarification to the first chapter about the naming and rationale.

2 hours agobeej71

Thanks for that.

25 minutes agolayer8

I did Beej's Guide to Network Programming and it was fantastic, I learnt a lot, and it was easy enough that I was able to do it in Rust. I'm sure this one is as good as all the others.

Point 7.5 of this guide reminds me of the Einstellung effect, I built my own "pomodoro" timer with notifications saying "go stretch" or "go drink water" (https://github.com/reciperium/temporis in case someone is interested)

11 hours agowoile

Must have been nearly 25 years ago now, this was one of my first dips into network programming after very briefly dabbling in systems programming based on nothing but random man page exploration and K&R. Think I still have it printed somewhere.

Beej has really done the world a solid, it's also making me happy that they're still around and being kept up to date (as much as these things change).

9 hours agomarginalia_nu

Appreciate it!

This response turned into more of an essay in general, and not specifically a response to your post, marginalia_nu. :)

Sharing information, to me, was what made things so great in the hacker culture of the 80s and 90s. Just people helping people explore and no expectation of anything in return. What could you possibly want for? There was tons of great information[1] all around everywhere you turned.

I'm disappointed by how so much of the web has become commercialized. Not that I'm against capitalism or advertising (on principle) or making money; I've done all those, myself. But while great information used to be a high percentage of the information available, now it's a tiny slice of signal in the chaff--when people care more about making money on content than sharing content, the results are subpar.

So I love the small internet movement. I love hanging out on a few Usenet groups (now that Google has fucked off). I love neocities. And I LOVE just having my own webpage where I can do my part and share some information that people find entertaining or helpful.

There's that gap from being clueless to having the light bulb turn on. (I've been learning Rust on and off and, believe me, I've opened plenty of doors to dark rooms, and in most of those I have not yet found the light switch.) And I love the challenge of finding helpful ways to bridge that gap. "If only they'd said X to begin with!" marks what I'm looking for.

I'm not always correct (I challenge anyone to write 5000 words on computing with no errors, let alone 750,000) or as clear as I could be, but I think that's OK. Anyone aspiring to write helpful information and put it online should just go for it! People will correct you if you're wrong[2] :) and you'll learn a *ton*. And your readers will learn something. And you'll have made the small web a slightly larger place, giving us more freedom to ignore the large web.

[1] When I say "great information", I don't necessarily mean "high quality". But the intention was there, and I feel that makes the difference.

[2] It can be really embarrassing to put bad information out there (for me, anyway). I don't want people to find out I don't know something and think less of me. But that's really illogical--I don't even personally know my critics! And here's the thing: when the critics are right (and they're often right!), you can go fix your material. And then it becomes more correct. After a short time of fixing mistakes critics point out, you get on the long tail of errors, and these are things that people are a lot less judgmental about. The short of it is, do the best you can, put your writing out there, correct errors as they are reported or as you find them, and repeat. I cannot stress how grateful I am to everyone who has helped me improve my guides, whether mean-spirited or not, because it's helped me and so many others learn the right thing.

an hour agobeej71

I’ve had Beej’s Guide to C and Beej’s Guide to networking bookmarked for an embarrassing amount of time.

But this is the first guide that I know the material! I have “learned computer science” (somewhat). And I have to say it has propelled Beej’s other guides to the top of my reading list. The subchapters I skimmed and their content are just so relevant and I know many new and experienced devs (myself included) who would still benefit greatly from reading this. Just exceptionally well done.

14 hours agohahahacorn

I recently read his networking guide as part of a class and it was invaluable. It gets you up to speed without overwhelming you with detail. It's a lightweight read.

14 hours agobencornia

That sounds like HPBN (High-Performance Browser Networking), an awesome and accessible resource everyone doing anything w the web should read. https://hpbn.co (not .com)

13 hours agochrisweekly

> And because the problems aren’t real, AI can solve them all really easily. There’s tons of training material out there for them to learn from.

> But don’t be fooled. Just because AI can solve your school problems doesn’t mean it can solve the real-world problems you’re going to face in your work. (As of now, it can’t.)

This is a good point. And it’s unfortunate we can’t see how much these things are tuned for demos like solving classic HW problems.

3 hours agogroundzeros2015

I feel stupid saying this over and over each time one of his guides pop up, and I know he lurks here, but thanks Beej.

All of his material is absolutely top notch. His guide to network programming was instrumental to both my understanding and career. It often feels like thanks isn't quite enough.

13 hours agosilisili

I was lucky to work with him for a while. He’s a great guy IRL too.

11 hours agoarmadsen

Yea agree, free educational content is worth so much. Especially in a world where everyone wants to make a quick coin by selling courses or whatever. Would never have looked into C if it wasn't for beejs guide, as that other book that's often recommended is as dry as math books...

12 hours agozwnow

I have used the guide when at college and it was an extremely good read at the time. Learnt so much. I should probably buy a printed copy.

Being that said, at the moment I'm trying to implement a simple non-blocking TLS server in Python with a custom protocol (no external deps, only built-ins) and couldn't find a single guide online that treats the topic. Having read the Python documentation it appears that there are a lot of nuances and pitfalls to correctly implement it. This was my impression after reading the docs, though I could be wrong.

I haven't checked if current Beej's guide covers the topic, in case it doesn't, did anyone embarked in doing this with success?

The Python docs on the topic: https://docs.python.org/3/library/ssl.html#ssl-nonblocking

6 hours agoliendolucas

I am currently enrolled in a operating systems course where Beej's guide to network programming was invaluable. Highly recommend!

2 days agobencornia

Beej's guide to network programming is an all-time classic, and I suspect this is the same (even before I've read it thoroughly).

14 hours agoelseweather

I've had Beej's Guide to C, and I would say it's the best C learning material for myself ever.

14 hours agozeeqeeng
[deleted]
10 hours ago

I started skimming this but it seemed to be more of a learning how to learn CS book. I'm a fan of his other works. This one, I'm not so sure the right folks are going to find it when they need it/ should use it.

2 days agostonecharioteer

Thanks for this !

14 hours agoimvetri

What does this matter now? It seems like economic collapse and the destruction of value coming out of programming is basically imminent

12 hours agoMadmallard

> 7.3 No Copy-Paste Coding

> [...] But nowadays they tend to punt to some AI. Beginning developers should not do this.

I don't know how I feel about this. I get the sentiment, I really do. But it almost reads like a chess Grandmaster in the 90s telling up-and-coming players to not practice against Deep Blue because it will teach you bad habits.

10 hours agojhatemyjob

It's not so much that, although I'd argue that LLMs can certainly teach you some bad habits from time to time, much more so than Deep Blue ever would.

Rather, it's because early on, when beginners are learning the basics, they need to do the hard work of figuring stuff out so they develop problem-solving skills. It's not the code-writing skills they need to develop--that's easy. It's the problem-solving skills.

If I could figure out a way to grade on effort rather than correctness, I'd do that every time. Bust your ass and get a program 80% working and learn a ton doing it? You get an A. Spend 2 minutes copying ChatGPT output of a perfectly-working solution? F.

The effort is where you build the skill. And the skill is critical problem-solving. Having someone (or something) else do that work does not improve your skill.

Now, eventually, when you get to be better than the AI (and it's not hard to do that), stuff that you find easy is not longer beneficial to your learning. I've implemented linked lists a hundred times by now; I no longer learn anything from doing it. When you're that experienced with a subtopic, then sure, get ChatGPT to write it, and you verify it.

Going back to the weight lifting analogy, once you've been lifting the 2 kg weights for a while, you're not going to get much out of it. At that point, if the 2 kg weight must be lifted because it's part of your job description, have your robot do it. Meanwhile, you go on to the 4 kg weights and build muscle.

an hour agobeej71

Especially if your job will be to let Deep Blue play against others so you should know how to control it well. That maybe doesn't satisfy the purists around here but it makes Juniors way more competitive in the short term, hence they are well-advised to use it.

9 hours agoaswegs8

terrible analogy. It's more like a chess grandmaster telling you not to let Stockfish play for you. Which would be a very obvious thing to not do anyway, just like for a learning programmer.

9 hours agocheikhcheikh

> But it almost reads like a chess Grandmaster in the 90s telling up-and-coming players to not practice against Deep Blue because it will teach you bad habits.

No idea if chess grandmasters did do that in the 90s, but frankly it would have been good advice. Just as it is good advice today for up-and-coming players not to practice against stockfish, leela or whatever. Unless you are already very proficient in chess, practicing against those engines will teach you very little .

10 hours agotraxler

Gukesh, the current world champion, did not use engines for analysis until very late. I think until after he became a GM.

8 hours agorandoglando
[deleted]
11 hours ago

Takes drastically less effort to get good at programming than other disciplines

Want to be a professional accompanist? Good luck. You better have been taught since you were a child and quickly picked up sight-reading and were good at it for the last 20 years.

5 hours agoMadmallard

I'm sure that's true, but there are different kinds of "difficult" that rely on different kinds of effort.

an hour agobeej71

Well done but is this a guide to Computer Science or to Software Engineering? In a Guide to CS I expected to find information theory, computability, complexity, finite state automa, language grammars etc.

Anyway, the audience is

> Undergrad students just getting into programming

so it's naturally biased toward the engineering part of the subject.

13 hours agopmontra

What about operating systems, architecture, compilers, networking, and the like? I have seen people argue that computer science is the more theoretical side of things, but many university CS programs cover both systems and theory (or sometimes skew to one side).

13 hours agokaladin-jasnah

Yes, my CS program of 40 years ago had 4 parts. Sorted by decreasing abstraction level:

Math, physics, statistics

Theoretical CS, the one in my original comment

OS, compilers, networking, computer vision, transmission codes

Computer languages and having to write actual programs, how transistors work up to logical gates, adders, CPUs and machine language

Of course the separations are not clear cut: we had relational algebra and SQL commands in the same course.

8 hours agopmontra
[deleted]
13 hours ago

> 1 Foreword

> Are you getting into Computer Science, or thinking about it? Or maybe you’re in it already. This super-high-level guide is for you!

> I’m not going to talk about how to write code (much). I’ll I’m going to talk about in these roughly 40 pages is more about how to learn when you’re a nascent software developer.

Page 1

12 hours agohahahacorn

So the answer is "it's not a guide to computer science". It's like a guide talking about how to get better at mental calculation being titled "guide to learning mathematics", or a guide to language learning being titled "guide to learning linguistics".

10 hours agoAntibabelic

Yes, this is a guide on how to be a software developer, not a computer scientist. Poor name aside it isn't terrible advice for what it is.

10 hours agonoosphr

I see it as "learning how to learn", not directly learning itself like a curriculum. It's more for those who want to build proper study habits.

Reading the chapter of AI seems to support that feeling. It was about tips on where to use it, where to not use it as a shortcut, how to be critical of any output, and some personal speculation.