3

Hello, I am currently taking BS Computer Science and for this semester we are required to take a subject on Discrete Mathematics (logic).
My question is, how can I apply this knowledge in programming?
thanksss

Comments
  • 6
    Well for a start, you can apply graph theory to various aspects of programming, with networking bring a field very much reliant on graphs; but I've also used graphs to detect and debug deadlocks by building dependency graphs through my own mutex library.

    Although compression gets less and less place under the spotlight nowadays, it's simply an application of information theory.

    And object oriented type systems tend to use set theory to prove the validity of programs that use templating and polymorphism.

    Discrete mathematics class will give you tools to get a deeper understanding of most of what computer science does, as well as too better express both requirements and implementation when working in a team (assuming they have received similar training, possibly even by you if necessary).
  • 2
    I love how CS bachelors teach stuff like every student there is going to create a programming language from scratch, but none of the real world stuff. Then people get surprised that bootcamp students get promotions twice as fast.
  • 3
    That class was hard, miserable and yet my favorite math class I've taken lmao
  • 7
    @bartmr just to make sure, you do realize there is way more to development than web building and shit right? That is the purpose why they teach those subjects.

    And I have yet to meet a bootcamp dev(the term itself sounds funnt) that can pass a programming interview with actual theory.
  • 6
    @bartmr "then people get surprised that bootcamp students get promotions twice as fast" I do believe this statement doesn't have much statistical backing, and it's definitely not true in embedded/control systems, AI/ML, high performance computing and simulation, finance and trading, robotics, systems dev, core networking, security, enterprise application development, etc.

    To be clear I'm not saying a bootcamp dev can't do anything but CS is a huuge field with lots and lots of applications and the university curriculum has to address that, not just web and app dev.
  • 1
    DM teaches although the basics of crypto, very basic datastructures, Boolean algebra and all the other basics needed for later subjects like theoretical informatics or datastructures & algorithms
  • 4
    "Will I use this later in life to make money?" is a horrible rubric for the value of a topic in higher education.
  • 0
    @bahua Why? If I like something and at the same time I can make enough money to not have to worry and apply even more hours doing it, why shouldn't I think about the profit?
  • 1
    In many cases, there's not much math in applications, but, as always, it depends on the industry. Formal logic is a thing you will encounter very often, just a single condition in an if-statement is formal logic. However, advanced/more complex cases with many conditions are not found that often. Recently I was able to create a UI-component made up of several parts that needed to be shown/hidden depending on other component values. Approaching it mathematically solved all the issues we had with that component.

    The most useful thing I got out of discrete mathematics is that it trained my abstraction abilities. I define better abstractions, easier than before and it also gave me a lot of different perspectives. As an example, consider a case where you need to validate a Dutch zipcode. One could use a regex, one could use string manipulations, and then some more but you could also create a very simple finite automaton that only accepts a valid zipcode.
  • 0
    @bartmr

    Because the purpose of higher education is enriching the mind. Not everyone goes for that reason, I know, but most will be very disappointed when they view it as vocational training. Also, choosing a career vocation as a teenager is absolute madness, as teenagers are still children, devoid of the experience that would inform their decision-making process for such colossal matters. A broad base of study helps inform this process-- even courses that the child considers to have dubious value. Some teenagers make a career choice, and it works out. But the vast majority do not wind up in a career they chose as children, and derive great fulfillment from it.
  • 0
    @RememberMe most bootcamps I’ve seen are more for web dev, which discrete maths aren’t involved compared to the fields you’ve mentioned.
  • 0
    Example: Learn recurrence relation, solve Fibonacci sequence equation to get a closed form.
Add Comment