Hacker News new | past | comments | ask | show | jobs | submit login
A guide for people who want to self-study the basics of computer science (github.com/lesabotsy)
262 points by tsingy on June 18, 2023 | hide | past | favorite | 79 comments



> High School Mathematics

Whenever I try to catch up with maths (in Khan Academy and elsewhere), I always end up in an awkward state where I keep recursively researching less and less advanced subjects because of gaps of various sizes in my fundamental knowledge. It's incredibly demotivating.


Maybe 5 years ago, I was in a similar place. I had a particularly embarrassing moment at work when it clicked that I just... didn't know the basics. I was, to use an overused term, "mathematically immature".

So I made a commitment: I decided I would work through Khan Academy math for 1-hour a day for 1 year. I started with pre-K [1] (specifically counting) and watched every video and did every single exercise in order. I focused on mastery. I didn't rush myself, and I did not continue until I felt completely confident in the material. I just did this for a year. I think I go through roughly algebra 2. In my mind, it is critical to combine explicit knowledge (watch videos) with tactic knowledge [2] (do exercises). For example, you need to understand what a logarithm is conceptually but you also just need to do problems to get a feel for it. So this is fundamentally different than learning-by-grazing or just reading a book.

I could go on and on, but let me just say that it changed my relationship to math in a deep way.

[1] https://www.khanacademy.org/math/k-8-grades [2] https://commoncog.com/tacit-knowledge-is-a-real-thing/


I loved reading your comment. Your story is very similar to my own! A little over 8 years ago, I also started at the beginning of Khan Academy. Due to reasons related to my childhood, I had essentially no education growing up. When I was in my early twenties, I had only an elementary education. The highest level of math I knew was basic fraction arithmetic. I had never written an essay and I did not have a scientific understanding.

Having no education, I only did menial work for money. Yet in my early twenties, I was contemplating my lack of scholarship and realized I wanted to fill the holes in my education. I went to Khan Academy and, as you did, started with pre-K and worked my way linearly through up to pre-college math. Thankfully, I was soon laid off from my job, which was an opportunity to start attending community college.

I then transferred to a state school and double majored in applied math and computer science. Now I’m doing theoretical research as a PhD student in computer science.

The 8-year path from pre-K math to graduate-level math classes and now being published has been a journey. And I’m deeply grateful for resources like Khan Academy.

Deciding to commit to a daily study of math transformed my life.


This is really inspiring, thanks for sharing. I should do likewise. I wound up dropping out of school (had kids too early, don't ask), which was... not a good decision. I do work as a developer but I need more domain knowledge in mathematics. Never too late to start, I guess.


This is inline with a Zen practice called "beginner's mind", and is so useful in many areas, thank you for this inspiration.


if you would have to do it again, would you change something on your methodology? I assume there were some unnecessary time sinks here & there


I don't think so. My problem was that I had a weak grasp of many basics concepts, and more critically I did not know in which areas I was weak. So while it's easy ex post to say "I could skip such and such section", it would have been impossible to make this judgment ex ante.

And in fact, I think a failure mode many people make is trying to predict which things they already know and then skipping those. This allows for blind spots to persist.

I suppose the one way to skip things correctly would be to have a coach. But that comes at a new cost ($), but maybe that works for some people.


I have been seeing more and more usage of 'ex post' and 'ex ante' lately. What do they convey that isn't conveyed by 'after' and 'before'?


"Before" and "after" are generic terms. A car might stop before the crosswalk (space). You might eat dinner after work (time). But "ex ante" and "ex post" specify a relationship to an (random) event or to specific information. For example, a data scientist might compute a quantity "ex ante". This means that the quantity was estimated using only forecast data. No historical data was used. It would not make sense, however, to say that a car stops ex ante the crosswalk.

I could have easily said "afterwards" and "beforehand", but I like "ex post" and "ex ante" when referring to before/after having access to specific information.


Got it. I will try to leverage the synergies between Latin and English ex post.


it conveys that you know what ex post and ex ante mean


Or, quite often, conveys that you don’t know what they mean.


If you, or someone else is seriously considering learning math from the basic at a high level, I’d recommend picking up “art of problem solving, pre-algebra” book, and walking up from there.

These sets of books are universally considered to be among the best math education resources by mathematicians and others, and they start from the very basic (such as the number line and basic operations), but without the need of practicing elementary school material like counting.


I think the TAOPS curriculum would be incredibly challenging for somebody who has actively incorrect intuitions about math.


I think if you've literally never seen the material before, you might be right.

But for anyone who's graduated high school, a lot of it would be at least a second encounter so you'll be reviving forgotten knowledge which is much easier while also diving deeper in your second pass.


What did you do after you completed the K-8?


I worked from the top of this page [1] downwards and ended after algebra 2.

[1] https://www.khanacademy.org/math


Paradoxically, self-teaching is most difficult at the "101" and "pre-101" level. Once you have the basics, self-teaching becomes much easier.

Teaching yourself Calculus I and Calculus II after obtaining High School mathematical literacy is not too bad. Teaching yourself Differential Equations or even Functional Analysis after obtaining the pre-reqs is actually quite easy. But teaching yourself high school or especially middle school mathematics requires a TON of dedication.

It's not impossible, of course, but "The Basics" are where you really benefit from the help of a professional educator.

For this reason, I recommend eschewing self-directed resources and enrolling in an "Applied Math" or "College Algebra" course at your local community college. These courses are basically "high school mathematics for people who never learned or forgot high school mathematics". Depending on where you live, the "College Algebra" course at your local Community College is probably very cheap or free and available as an evening and/or online course. You usually do not need to enroll in a degree program to take the course.

Once you make it through "College Algebra" you can return to self-directed learning.

Community Colleges are a vastly under-utilized resource, particularly for these "very fundamental knowledge gaps" where self-directed learning is much more difficult.


At Math Academy, we've created a sequence of math courses called Mathematical Foundations I, II, & III that cover everything from 5th Grade Math up through Calculus I & II and will allow anyone to get up to speed on the skills required for university-level mathematics in the most efficient way possible. Our adaptive diagnostic exams will create a custom fit course no matter where you are mathematically and our algorithms will continually adapt to your individual strengths, weaknesses and learning curve.

https://mathacademy.com/courses/mathematical-foundations-i https://mathacademy.com/courses/mathematical-foundations-ii https://mathacademy.com/courses/mathematical-foundations-iii

In addition, we have courses on Linear Algebra and Mathematics for Machine Learning, with more coming soon:

https://mathacademy.com/courses/linear-algebra https://mathacademy.com/courses/mathematics-for-machine-lear...

The system is mastery based, lightly gamified, and completely automated. Our algorithms intelligently apply spaced-repetition to a hierarchical knowledge graph of over 3,000 mathematical concepts to make it substantially more efficient than a traditional course (typically on the order of 4X or more).

I'm a founder and would be happy to answer any questions.


I guess first consider that you might have math trauma -- read about it, own it (if it applies, of course), and recognize what it feels like when it rears its head. Lots of people -- mainly in the US, but it's a thing in other countries too -- were taught math in a pretty shitty way, often by people who don't want to be teaching it in the first place because they themselves have math trauma.

Then build up fluency in the basic manipulations: do lots and lots and lots of exercises until those manipulations become second nature. You might need to start with fractions[2], and that's fine. One of the nice things about math at the elementary level is that you nearly always are guaranteed to get better with practice. This absolutely isn't the case for proof-based math, where you really need to be intentional about truly digesting the material and thinking careful about the ideas. But if you're shaky on absolute fundamentals, you can get incredibly far with grinding.

At some point you'll need to engage with the ideas, but I think that's easier once you've built up some pattern recognition. But others will (surely) disagree

[1] https://www.edweek.org/teaching-learning/opinion-how-to-help...

[2] https://www.edweek.org/teaching-learning/fraction-phobia-the...


My 13 year old is a very good student, currently taking high school math classes while in middle school... one of the things that the public school system hasn't figured out is how to make any of it relevant. So sure, she's brilliant and flies through the material, but she'd be the first to tell you it's just puzzles, it has no actual meaning to her. I was the opposite - because it had no meaning to me, I couldn't understand it and was a terrible math student. But, once I could view it through the lens of computer science, suddenly it had meaning and I did fine.

My oldest daughter was a terrible student. But she would say to me "If they taught history class the way you explain historical events around the dinner table, I would have been a lot more interested in studying."

So point being - it's probably not you, a lot of it really is the way we approach k-12 education. In hindsight, I'm not sure college is any better and may be worse what with the approach of hazing and weeding out.


The Khanmigo chatbot that KA is rolling out supposedly helps with this problem of relevance.


Too many false starts too lead to doing the same fundamentals all over again, making one feels like they are not progressing at all.

I remember reading somewhere, do the implementation of it along side fundamentals. The reason you are studying fundamentals to progress ahead, do that course along side too. This helps one grasp the fundamentals quickly and more importantly to know which fundamentals you really need than to try to do everything and forget aspects of it later.

That being said, I am yet to implement that concept and get over false starts


That happens to me all the time the solution is I need a push or some deadline. For high school it was a strict (we thought) teacher who brought me from an average of 70% to 95%. For computer programming it was going back to school as an adult and timed in class tests. For music is was paying for lessons at a certain time.

If I don't get motivated from some external push I never get past a certain level. Every single thing I do in my life is like that even laundry. I must be chronic or maybe permanent procrastinator.


> Whenever I try to catch up with maths (in Khan Academy and elsewhere), I always end up in an awkward state where I keep recursively researching less and less advanced subjects because of gaps of various sizes in my fundamental knowledge. It's incredibly demotivating.

Try this course: https://www.edx.org/course/college-algebra-and-problem-solvi...

It uses the ALEKS system which identifies your weak points and brings you up to speed. Take notes during the process so you have something to reference in the future and won’t forget what you learned.

After you knock out the algebra course you’ll be ready for the precalculus course: https://www.edx.org/course/precalculus

The ALEKS system in the Precalculus course will also remediate anything you forgot from the Algebra course.

Hopefully this will help give you the confidence to go after more advanced maths once you finish both courses. Be kind to yourself, math, like anything, is a skill, it takes time and practice.


Why not start from the beginning, ie pre-K on up, as the other commenter mentioned? I've done something similar for teaching myself web development (since it's not taught often in CS degree programs), starting from bare HTML, adding CSS, adding Javascript, adding TypeScript, adding React, and so on. Now I have a good foundation from which to build anything I want. So too with mathematics or really any subject.


Have you seen "An Infinitely Large Napkin"? I saw it posted here a couple years ago. It is Evan Chen's project "aimed at making higher math accessible to high school students."

https://web.evanchen.cc/napkin.html


It would probably be helpful to start at a level above where you left off and look up specific gaps in your knowledge as you find them. It’s always good to come to a topic with the understanding of every previous topic, but often those deeper understandings come from moving into more advanced subjects anyway. It might be more slow and frustrating at times, but it will give you a better understanding of where your specific gaps in knowledge actually lie and you’ll be able to address them as you go.


Weirdly enough, mathematics is a very emotional subject for me. I never understood how it was taught in school, and had serious difficulty understanding it. As a result I just ignored it, believing that I didn't have the right brain for it.

Even though I taught myself how to code, I never went back and learned math, so my level of knowledge is at a basic high school level. It can be embarrassing at times, and every now and then I think about trying to learn it.


I honestly think this is one of the bigger problems with people who "can't do math", probably most people can learn quite a bit of (at least basic) mathematics. But oftentimes when you did not understand the subject well previously, like in high school because of different interests at the time or a bad teacher or something. And then because of this whenever you see an equation or hear the word 'mathematics' you just shut off your brain. I know some people who can understand me when I explain some physics or mathematics concept without explicit mathematics, but they would be scared off at the first equation.


It might not be the same for you. But this is what I enjoy when I study anything. Filling up the gaps in my knowledge and learning about new ways to think or understand about a concept. Maybe you shouldn't dive so deep into the concepts. Just write all the topics/concepts you didn't understand while learning something and watch one video about each of them.


I have the same problem and have still not found a workable solution.

Only one there seems to be is to basically rerun 12 years of math, which is really unpleasant because I know 80% of the work making it unrewarding and slow. I don’t know what I don’t know that is super demotivating, indeed.


The book that made things click for me was Maths: A Student's Survival Guide by Jenny Olive. Give it a shot, use a calculator for everything. IMO in the age of computers let computers do the calculations and just learn to have intuitions.


I'd have to be convinced that you can develop those intuitions without basic arithmetic. Mind you, I'm not saying spend a lot of time mastering long division or whatever. (I'd probably have to look up the technique myself.) But I think some level of numeric fluency is probably necessary.


“I'd probably have to look up the technique myself.”

No offense but I am pretty sure that was the point. If it’s math you forget, it’s not math worth learning. Learn what you want or need to know. The rest is dross.


For what it's worth, if you want to go bottom-up and give yourself a super-solid foundation, go through the videos I recorded several years ago specifically for this purpose. They are for children as well as adults: https://www.youtube.com/@thinkingmathematically

Please let me know if they were helpful!


Another resource I wanted to mention here is OpenStax. Specifically, their Prealgebra book: https://openstax.org/details/books/prealgebra-2e it's a fully online-native book format with exercises, etc.


Same for me, let me know if you find the solution! I think it's extremely hard to get into this kind of stuff when you basically have to start from 0 meanwhile everyone else has a better foundation than you


I had a student who was basically performing at a 6th grade math level despite being in 11th grade. I told that student to go through Khan Academy starting from Pre-K all the way to 12th grade and don't continue unless they achieved mastery. That student went from the C math student, to ultimately scoring a perfect score on the SAT II Math. So I highly recommend everyone start for the absolute basics, even if it feels like a blow to the ego


For understanding higher math I have found this primer course extremely useful:

Introduction to Mathematical Thinking by Keith Devlin (Stanford) https://www.coursera.org/learn/mathematical-thinking


I read this book which helped me understand what it finally meant to think mathematically. Highly recommended, Keith is a fantastic lecturer.


That’s just the usual memes. Is this about « computer science » ? Then why isn’t there anything logic, algorithms, Turing machines, etc.. Is this « dev »? Then what’s the point of discrete maths?


> Is this « dev »? Then what’s the point of discrete maths?

You can probably retire on a 6% coupon if you save a lot, but you'll have a much more comfortable retirement if you can clip a 15% coupon on those same savings.

Discrete Mathematics is usually some mish-mash of formal logic, induction, combinatorics, number theory, and baby probability. You can get away without knowing these things, but studying them doesn't take very long (14 weeks, part time?!) and pays a very handsome dividend. A foundation in this sort of knowledge, and practice operationalizing it, is often the difference between $60K/yr and $100K+/yr for junior developers. The size of the dividend payment generally increases as one's career progresses, assuming you stay on the IC track.

Induction and formal logic are useful for reasoning about programs that contain loops. Often you can get away with intuitive understanding, and many people program for years before encountering problems where formal and structured reasoning becomes necessary (myself included!). But most well-paid developers will encounter a problem or two each year where reasoning about non-trivial loops is required and where the basics of induction and formal logic are tremendously helpful.

Exposure to basic thinking techniques in combinatorics is essential for reasoning even informally about time and resource complexity. Writing code that relies on non-trivial time and resource complexity analyses is occasionally necessary in most well-paying developer positions.

The very basics of number theory is useful for understanding, conceptually, how cryptography works. This isn't essential for most dev positions. But it is helpful knowledge.

Baby probability is increasingly required knowledge for many dev positions, and not just because of the explosion of AI/ML/DS.

Again, you don't need this material often. You can probably go an entire career avoiding the brutal pain of spending 14 weeks, 1-2 hours per work day, studying simple mathematics. But the ability to pull these skills out when they're needed is the difference between commodity "keep him around if we have billable hours" bootcamp labor and in-demand "smart and we really need to keep him around and eventually promote him to principal" labor.


year 1 CS in my university is

:intro to CS (simple JAVA and simple coding) :linear algebra 1 :introduction to logic (simple set theory(though the course got comparatively deep and proved induction as well as defined relations rather throughouly. most students failed.) :Digital systems (basic digital logic)

semester 2 is: :data structures :linear algebra 2 :infitisimal math 1 :practical course on usages of math :combinatorics\basic discrete math (No generator functions or the like. Basic counting, basic graph theory, basic discrete probability)

This is for a university that has a technical approach to CS. It's not considered very mathematical, so view it as a sign that calc1/2 and linear algebra 1/2 is needed. they are fun courses! Go learn the math courses with the mathematicians if you've felt a connection to math, there is a definite change in the feelings of the class. It's the "same" material but in one class you will think like a mathematician and in the other like an engineer.


I've found Teach Yourself CS a better resource, albeit more advanced: https://teachyourselfcs.com


I am looking for a bottle of computer science motivation for my 16 year old. I do an hour a week coding with him. It is not enough, he does no coding in between times. There are other things he prioritises ahead of coding. (School, music, YouTube videos, and chess.)


Pushing him to do something weekly that he doesn't sound interested in at the moment will only push him away from it in the longer term. Maybe try programming something that overlaps with his other interests that deepens his understanding of both subjects.


Then stop focusing on trying to get him to code, and focus on his music, his chess, his YouTube videos (especially if he has aspiration to be a content creator rather than a passive consumer), and his academics. Maybe related to one of those things, you could gently try to build a bridge between them and coding. However, don't force it. If you force it, you're essentially going to be raising someone who hates programming because "it's that shit my mom/dad forced me to do when I had no interest in doing it, I really wanted to be developing my chess game instead".


This is good advice if you live in a Hollywood movie fantasy, or are insanely rich. Otherwise this is bad advice.

A parents job is to steer their kids not into superficial happiness found through whatever interested them at 16, but to actual long term happiness achieved through fulfillment, accomplishment, stability, and belonging.

If I ignored CS pushed by my father to focus on whatever interested me at 16 (pot, girls, metal music, wow), I’m not sure where id be, but I imagine it would be worse off.


I believe you interpreted their comment as a sort of let them drown in hedonism moment, but from what I'm getting it's really just encouraging giving your kid space to find the joy themselves. You can encourage new forms or methods to see if it'll stick but you still have to let them be their own person. Forcing anything will just make your kid resent that entirely, and for a lot of parents they don't even realize this resentment of [subject/task/etc] also turned into a resentment of the parent.

Also I think you're too pessimistic about your past potential. You could have made a great musician, esports pro, hell there are even some successful marijuana companies now! I don't say this to stoke the flames of what ifs, but instead to highlight that it wasn't exactly your father's push for CS that is the only reason for your success. You should absolutely take some responsibility for committing and be proud of that, of course you can definitely attribute your understanding of why commitment is important to your father if that holds true!

Now that's good advice, teach your kids the importance of integral foundations like commitment, don't obsess over which specific field it is.


It's neither good nor bad advice. It will depend on the kid. Some will respond like you, while some will respond like the commenter above you explains.


I was treating the OP's list as a list of things their son was interested in doing or creating, not just idle timewasting. That's why I mentioned "especially if they have aspirations to be a content creator" in relation to YouTube.

There's a lot of difference between your scenario, and the scenario put forth by OP, in just tone of description alone. You seem to be assuming that I suggested that the OP not be encouraging their son to do anything, and that's not what I said. I said that if their son has no interest in coding except when the OP makes them do it, then maybe programming is not their interest, and if OP ends up causing resentment while still pushing them into that career, then they're potentially setting their son up for a miserable life, and possibly estrangement (depending on all the other parts of their childhood that we here are not privy to).


Maybe your son is not into coding and that’s okay. This is not a great profession to be in if you don’t enjoy it.


Let him find his passion. Don’t force him into programming. There’s plenty in the tech space that needs doing. And there’s even more in life that he can do to earn a living that’s not tech related.


Imagine doing science, engineering, or mathematics. Might as well be getting an English degree.


Huh? How are those equivalent to getting and English degree?


The pay isn't as much compared to a hyperfocused CS to FAANG/startup track. It's not bad though.


But if the child isn’t passionate about comp sci/programming/etc their life is gonna be hell. Better to let them be happy than be miserable.


Only with work. If they are destitute but don't have to program, it's also quite possible they'll be hungry and cold and thus still also miserable.


The fuck? There are other well paying jobs. Shit electricians and plumbers and other blue collar work can pay 100k plus or more. Skilled labor in the trades is in desperate need at least here in the US.


1) Make him come up with the projects to do. Use brainstorming techniques. Only help by guiding, not by telling him to do specific things

2) Build your similar own projects as well

3) Try with electronics. For that age group I have had good succes with MicroPython on ESP32’s + various sensors/actuators. The first thing I do is connect an LED strip with RGB LED’s and let them play with that.

4) Find him peers with the same interest. In that age peers are better partners. You can still help facilitate a bit, but the best would be to find a Coding club.


> Make him come up with the projects to do. Use brainstorming techniques. Only help by guiding, not by telling him to do specific things

I found it difficult to do with a person who did not get how to use control flow and can not mentally combine multiple control flow constructs.


Try finding something that he likes, that could be enhanced with programming to start with. Mine was fantasy basketball, doing it with the help of computers is so much better than by hand.


And keep it approachable! There is nothing wrong with writing that fantasy basketball calculator as a spreadsheet.

Spreadsheets have many advantages that get overlooked by pushing for a "real language" while jump into a programming language involves learning a lot of new concepts at once.

For example, spreadsheets make all the memory visible at once. It makes sense like a piece of paper. You also have intuitive understanding of your algorithms memory consumption. Computing something for N by N obviously uses N^2 cells. Many problems will be solved in 2^n which will mean dragging down that cell for a short while at low values and suddenly a very long while.


Appeal to his music interests. This book looks pretty good and uses free tools:

https://www.routledge.com/Introduction-to-Digital-Music-with...


Chess-related chatbot? Something his friends/chat room/twitch can interact with, that has some kind of chess functionality.

Look up "aol chat coms" for inspiration from the 90s.

There used to be bots that played a scrambler game in AOL chat, you could make a chess-related one.


Leave him alone? School, music, and chess are more than enough for him to invest himself in without you pushing your failed hopes and dreams on a little clone. YouTube videos are also fine, we all like entertainment.


Lots of ideas two days ago:

Two years of teaching high school CS

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


create a music or YouTube bot together


Not sure on the prerequisites. I have absolutely no discipline and still managed to get my compsci degree!


That probably because you were in a degree program. Discipline is definitely an issue if you just decide to complete a couple dozen courses making up a curriculum from OCW or whatever. Even if you take out elective stuff, especially that not connected to the major, you're almost certainly talking many hundreds of hours to plow through a college major.


I think the elective stuff might also be a reason to be able to successfully finish the degree. University degree for many comes down to studying strategically than understanding everything they are studying. So the elective stuff might be considered a break from other stuff, which means the brain does get time to take a break from a certain topic to retain that information while you study something else.

Self-study is a road with very little guidance to understand which part is more important to study, and which just needs to be understood so the pressure to make sure one knows everything makes it difficult to progress at a consistent pace.


>Self-study is a road with very little guidance to understand which part is more important to study, and which just needs to be understood so the pressure to make sure one knows everything makes it difficult to progress at a consistent pace.

Part of it is that there's also the question of what your goal is.

If you down an MIT CS+EE degree curriculum in OCW, you're actually not going to have a huge amount of programming except as a byproduct. If your actual objective is to learn front-end development, I'm guessing you won't actually have learned that by the time you're done. I'm guessing most people looking for a self-directed CS bootcamp don't actually want a "CS" bootcamp.


Jokes aside, I agree. University programs do/can provide an almost overbearing amount of structure, and that worked well for me.


The CMU database course is fire

I want to make a non C++ workbook for that course to write an s3-based relational database (for fun), but I don’t have time for other projects because of poor time management


Might interest some people looking to learn some Computer Science basics. It's a small aggregation of openly auditable university courses.


If someone is interested I highly recommend Tech Yourself CS website, it is much more concise and complete set of resources.

https://teachyourselfcs.com/


As someone who could never afford to get a degree at university, I love this kind of stuff!

I have gaps in my own knowledge, so I keep going through stuff, to find what I'm missing and fill it in. Eg I'm not great on O(x) calculations.


Is this like Poor Richard's Almanac?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: