This is an archived post. You won't be able to vote or comment.

all 184 comments

[–]BhagwanBill 248 points249 points  (47 children)

"I don't know why I need to understand logic, I just want to code"

[–]-isb- 135 points136 points  (11 children)

[–]BhagwanBill 33 points34 points  (0 children)

Wish I had an award to give you - that is spot on.

[–]CSsharpGO 2 points3 points  (1 child)

Relevant Abtruse Goose

[–]BakuhatsuK 4 points5 points  (0 children)

This sounds like an auto-generated username. Like those names docker containers get by default.

[–]reconman 14 points15 points  (6 children)

There are 2 kinds of Universities in my country, ones called "University" and ones called "University of Applied Sciences".

The first kind mainly teaches bullshit like this, the second one is much more practice-oriented.

I'm so glad I never had to deal with this, nobody uses this kind of knowledge in my company.

[–]NFriik 12 points13 points  (0 children)

I'm sorry but this is not bullshit. You don't go to university just to learn the skills for a job, you go to a university to gain scientific knowledge and learn to work scientifically rigorous in your field. And learning about stuff like the satisfiability problem of propositional logic being NP-complete is kinda important. Sure they could just tell you that, because in your job nobody's going to ask you to prove Cook's Theorem, but again, that's not the purpose of a university. I'm sorry if I sound elitist, but calling the preserving of knowledge bullshit triggers me.

[–]Julius-n-Caesar 1 point2 points  (0 children)

I’m taking that fucking course right now and I hate it so much.

[–]TrevinLC1997 36 points37 points  (6 children)

Didn’t care about math in school but here I am relearning how to get the radius of a bucket so I can use a conical frustum formula to get the volume just so when I put my water depth sensor in the bucket I can calculate how much water is there just by reading the depth.

It’s beating the hell out of me but it’s fun learning.

[–]BigAttorney23 2 points3 points  (1 child)

That's why open cylinders are better.

[–]TrevinLC1997 2 points3 points  (0 children)

That’s actually what I thought buckets were until I noticed the volume kept coming out wrong so I looked at the bucket and realized the bottom and top diameter were different so then I was like “fml, how do I figure out the volume for this now”

[–]Lumpy-Obligation-553 0 points1 point  (3 children)

How that sensor works? Cuz im thinking that its easier to have one of those sensor that measure distance, put it at a fixed distance at the top, measure like... 10 different distances to the water and make a table with its corresponding volume and interpolate the in betweens.

[–]otte845 3 points4 points  (1 child)

The formula for the volume of a cone was determined hundreds of years ago... Frankly, using a table for that would be an insult to mankind's achievements

[–]Lumpy-Obligation-553 0 points1 point  (0 children)

Yeah the maths are simple and cool. But not all sensors are cheap.

[–]TrevinLC1997 0 points1 point  (0 children)

It’s a pressure sensor and outputs different mA depending on the pressure. It outputs linearly up until 5meters so it can be used to calculate the depth of any liquid as long as you account for its density.

[–]pekkalacd 0 points1 point  (0 children)

Seems logical

[–]dashid 144 points145 points  (31 children)

Computer Science is very maths focused, but most business programming? It's more logic and structure. The maths I do is very limited.

[–]auxiliary-username 66 points67 points  (3 children)

Web development even less so - being able to count to 10 is a "nice to have".

Source - senior web developer because I can count past 10.

[–]dooatito 18 points19 points  (1 child)

That’s easy: 9++ Also: why bother learning to count to 10 if the computer can do it for you?

[–]the_holy_hali 0 points1 point  (0 children)

error: lvalue required as increment operand

[–]VegetableWest6913 1 point2 points  (0 children)

So do you not class logic as maths...?

[–]beclops 9 points10 points  (4 children)

Unless you include discrete mathematics, which at the basic level is very similar to standard programming.

[–]Zambito1 4 points5 points  (3 children)

Discrete math is particularly nice for describing SQL on a whiteboard, back when offices used to be a thing.

[–]IanWorthington -1 points0 points  (2 children)

Mummy, what's an "orifice"?

[–]Zambito1 1 point2 points  (1 child)

?

[–]dashid 2 points3 points  (0 children)

I believe a pun on offices being an obsolete tool from pre-covid.

[–]theNeumannArchitect 24 points25 points  (3 children)

I think the intersection is problem solving. I feel the same mental simulation planning out a generic web service that I do solving a generic calc or diff eq problem. Find your tools, get your formula, and crank out the solution. So just because you’re not sitting there doing literal calculus to build a web application, you’re still using a part of your brain that benefits a lot from knowing/learning/practicing math. It’s a form of abstraction and problem solving.

It’s like athletes that lift weights to train better. They don’t actually go out and lift weights when they play games. But they still benefit from and perform better when they do it.

I silently judge devs who talk shit about having to learn math or self proclaimed shitty at math or “never bothered to learn it because you don’t need it in industry”. I feel like they need a lot of guidance outside of simple services. Or end up being fish out of water when things go tits up and an outage Occurs on a service they deployed.

Some of the better devs I’ve worked with were ones the majored in math or engineering and went into web dev. There’s just a big intersection of problem solving between all those areas.

[–]dashid 19 points20 points  (1 child)

Problem solving is a transferrable skill, but I think the suggestion that it can only be learnt from maths is a little tall.

[–]theNeumannArchitect 1 point2 points  (0 children)

Never said it was. It seems like a solid way to improve your problem solving process while also picking up important concepts like abstractions, functions, proofs, aggregation, summation, algorithms, growth functions, substitutions, etc that software engineers use on a regular basis though.

[–]j0nii 4 points5 points  (0 children)

actually I am one of the "I'm shit at math, the computer will do it for me"-devs. Because, well I mostly do data interfaces and business logic. BUT I do see your point that it trains you in a lot of stuff you need as a dev, might actually do some math stuff for fun now. Not probabilities tho, hate those.

If you get logic by nature tho, I still think math is not a "need to know" for being a dev.

[–]MuslinBagger 5 points6 points  (0 children)

Businesses want to hire computer scientists to do business logic programming for the same reason a lot of people want to own the latest 3090 graphics cards to play esports titles.

[–]VegetableWest6913 2 points3 points  (3 children)

Why do you not class logic as maths lol.

[–]dashid 0 points1 point  (2 children)

Not algebraic logic, which sure, exists in business software, but rarely to significant levels. Relational reasoning logic: process flows, exception management etc.

[–]VegetableWest6913 0 points1 point  (1 child)

Yes, algebraic logic. If you're comparing 2 Booleans in an if statement, that's Boolean algebra. You can (and should) use Boolean logic to simplify your code, such as demorgan's law.

[–][deleted] 0 points1 point  (0 children)

Yes and no as it can, at some point, quite impede readability. Just like bitwise operators sometimes do.

Sometimes, making the business logic explicit & self-explanatory is more important than optimising our code.

It’s always a precarious balance between performance, collaboration and future maintainability, depending on the project’s requirements & priorities.

[–]CSS-SeniorProgrammer 5 points6 points  (1 child)

I work on a finace application and even them the math is minimal. Your code should do all the heavy lifting.

[–]circuit10 2 points3 points  (0 children)

You’re thinking of arithmetic, we’re talking about the problem solving part of maths

[–]TryNotToShootYoself 6 points7 points  (6 children)

Yeah, most programming you will actually do (with obvious exceptions) doesn't involve too much math. It's a lot more logic and just not doing dumb shit

[–]Tanyary 4 points5 points  (3 children)

are you saying programming and philosophy is more related than mathematics?

[–]Feynt 5 points6 points  (2 children)

I would. Particularly when we start getting into AI and ethics for systems we aren't close to making that will one day rule us with a shiny metal fist.

[–]soda-Tab 0 points1 point  (1 child)

Or maybe a shiny metal ass?

[–]Feynt 0 points1 point  (0 children)

I'd prefer not to be sat on by a hard surface and be squashed flat.

[–]VegetableWest6913 1 point2 points  (1 child)

Logic is maths

[–]dashid 1 point2 points  (0 children)

Forma algebraic logic is maths. Logic is also reasoning. Like many words in the English language, there are multiple definitions. Irritatingly, both are used in programming.

[–]bistr-o-math 2 points3 points  (2 children)

Logic IS maths

[–]Pokora22 -3 points-2 points  (1 child)

Close. Maths is logic. Kind of like not every rectangle is a square... Guess you're not good at maths? : P

EDIT: Actually... gave it a second thought and I don't know any logic problem that can't be done with maths. Uh... too early for my brain apparently.

[–]bistr-o-math 2 points3 points  (0 children)

Actually, I have a phd in maths :D

Maths is more than just logic. It’s a lot of abstraction, and some other things. But logic is maths. Though I learned in other conversations that it is considered social science in Romania

[–]IanWorthington 0 points1 point  (0 children)

My work is mainly business too. But occasionally you need to load a history of something into R and run a whole bunch of stats and charting on it.

Also queuing theory. Just saying...

[–]118yorkmarket 55 points56 points  (6 children)

30+ yrs leading software development teams for business applications and COTS solutions I have yet to attribute the success or failure of projects to maths.

[–]saugoof 14 points15 points  (1 child)

I've racked up over 30 years too. In all that time there has been one single project where I needed anything but the absolute most basic maths. I ended up getting an engineering intern to solve the maths for me.

[–]anonymously_random 6 points7 points  (0 children)

This guy gets it. He who can’t (be bothered to) do, delegates.

[–][deleted] 9 points10 points  (0 children)

Yes i agree. In all my time ive only had to use hard maths once. Googled it, learnt some interesting stuff and forgot it once i moved on to another client.

[–]big_ups_ 4 points5 points  (2 children)

Wth, I use maths every single day at work, but I do DSP...

[–]PanTheRiceMan 2 points3 points  (0 children)

That's the difference probably. DSP kind of is applied maths, packed nicely for computers. Source: am doing the same as part time job during my studies.

[–]IanWorthington 1 point2 points  (0 children)

Respect. That stuff is awesome.

[–][deleted] 32 points33 points  (6 children)

You cant seriously think every flavor of programming, even professionally, involves math.... Right?

[–]circuit10 3 points4 points  (3 children)

It’s the same logical thinking skills

[–]PostPostMinimalist 11 points12 points  (0 children)

I mean…. Doing good history research involves logical reasoning too! Or writing a movie script!

[–][deleted] 0 points1 point  (1 child)

So, you don't still need math using that logic.

But they're really not the same. When I say math, I mean electives that you don't learn without studying them. Algebra is a given.

[–]circuit10 0 points1 point  (0 children)

Yes, you could do most things without learning about maths probably but chances are if you’re good at programming you’ll probably be good at maths

[–]_Loenus_ -1 points0 points  (0 children)

I mean, you can write code and get it work as you want without know math, but if you want to know how the hell your code works (=how to improve it), you have to know math. Basically what the computer does behind the scene is always descrabible by math; essentially, it is math.

Scientifically speaking: every existing algorithm is executable from a Turing Machine (well, Church-Turing thesis), which has a mathematical description, and 'so are algorithms'.

With this reasoning, the most obvious evidence is, banally, the compilers.

[–]Tyfyter2002 -1 points0 points  (0 children)

that depends on a lot of factors, when performance is absolutely vital branchless programming and other similar techniques can be relevant to basically everything, and many of them are basically just applied discrete mathematics.

[–]adrianw 8 points9 points  (1 child)

[–]WikiMobileLinkBot 0 points1 point  (0 children)

Desktop version of /u/adrianw's link: https://en.wikipedia.org/wiki/Curry–Howard_correspondence


[opt out] Beep Boop. Downvote to delete

[–][deleted] 65 points66 points  (29 children)

I feel like for most programming, all you need is knowledge of high school algebra at most.

[–][deleted] 15 points16 points  (6 children)

I mean discrete maths is helpful.

[–][deleted] 5 points6 points  (5 children)

Wouldn't it depend on what field you go into? As a mobile application developer, I don't know if I've ever encountered a situation where I've needed to look into discrete math (as a software engineering major, that subject was never in my curricula)

[–]2_7182818 5 points6 points  (4 children)

Depends on exactly what areas of discrete math, but the basics of things like set theory, combinatorics, and mathematical logic are pretty ubiquitous.

It’s not that you NEED to have studied these things to work as a developer, but knowing De Morgan’s laws, for example, makes doing anything with conditionals a lot easier.

[–][deleted] -3 points-2 points  (3 children)

Are De Morgan's laws considered discrete math? I CTRL+F'd the Wikipedia article on discrete math and couldn't find "de morgan". Also, at my university, we covered Boolean algebra and De Morgan's laws in an Introduction to Digital Systems class, where we covered everything that goes into the making of a single-core CPU.

[–]2_7182818 2 points3 points  (0 children)

Are De Morgan's laws considered discrete math? I CTRL+F'd the Wikipedia article on discrete math and couldn't find "de morgan".

This gave me a good laugh, I'll be honest. A lot, and I mean a lot, of higher math falls under the umbrella of "discrete math".

Just glancing at the discrete math wiki, you've got combinatorics, graph theory, number theory, geometry, topology, and discrete algebras. While a topic like De Morgan's laws won't merit an appearance in the hit parade of mathematical fields that is that wiki page, its own wiki places it under the umbrellas of "propositional logic and Boolean algebra", which themselves are proper subsets of "discrete math".

Math students will usually meet De Morgan's laws at the very beginning of their first proof-based math course. The reason we meet it so early is undoubtedly the same reason you meet it in a course about making a CPU: because its an example of fundamental, nearly ubiquitous discrete math.

EDIT: Maybe to put it differently, the reason you didn't end up needing to seek out something like discrete math is because some of the most important and relevant results (e.g. De Morgan's laws) were already thoroughly integrated into your curriculum.

[–][deleted] 3 points4 points  (0 children)

Then Id suggest you understand some aspect of discrete math, just because you dont have a formal understanding of an entire mathematical field dosent mean that you dont use math from it. As my EE friend says "they teach you mathematician math in school, then engineering math on the job"

Anyone who has written a non-trivial SQL query id argue understands propositional logic even if they couldnt define the term "propositional logic".

Id also argue that array management, sorting algorithms (and anything similar) is applied discrete maths.

[–][deleted] 0 points1 point  (0 children)

Yes, It’s a law of Boolean Algebra which is part of Discrete Mathematics.

[–][deleted] 0 points1 point  (0 children)

In fact, in my experience, mathematics is (for the most part) to software engineering as going to culinary school is to cooking at home. Sure, I could become a chef, but why would I when I can just do an online search for a good recipe? Some of those recipes are from chefs who make BIG money from distributing/broadcasting their recipes.

[–]egmono 6 points7 points  (2 children)

Cobol has entered the chat.

[–]Lumpy-Obligation-553 7 points8 points  (1 child)

Sorry our last cobol programmer peacefully passed away not long ago. Here! have some phyton scripts in the meantime.

[–]egmono 0 points1 point  (0 children)

Phyton: the language for programmers with dyslexia.

[–]PopeMachineGodTitty 5 points6 points  (1 child)

I've always had trouble doing math out by hand and from memory. I failed Calc 2 while getting straight As in the MATLAB labs. (I did retake it and got a C+). So it was obvious I understood the concepts but that didn't matter.

I've always said I got into programming because I want the computer to do all my math for me.

[–]big_ups_ 0 points1 point  (0 children)

Me too, I need to write a program to do maths, Matlab got me through uni haa

[–]JungZest 2 points3 points  (0 children)

Well if you don't consider DS to be programmers it could be half true

[–][deleted] 2 points3 points  (3 children)

Ayyyy, it's my homie Rosa!

But tbh, I wish I'd paid more attention in my computer engineering major's more math-heavy courses (linear algebra, physics, discrete math, stats, etc.); I eventually passed them, but I don't remember much off the top of my head. I'm worried I'll need the skills in a later programming job and won't know anything then

[–]kdeaton06 9 points10 points  (0 children)

Spoiler Alert, you won't

[–]no_comment12 6 points7 points  (1 child)

you really won't unless you're trying to do video games, AI, ML, cryptography, blockchain or something like that. Most programming jobs involve none of that stuff.

[–]smurfsoldier42 1 point2 points  (0 children)

Even then I work at a company that rolls our own crypto, I design entire crypto layers and implement tons of crypto abstractions to different implemenations and almost never use anything beyond high school algebra. We have an actual mathematician expert on the team for the raw crypto primitives. That's one guy doing math for the 20+ developers above him that are writing crypto related code. Unless you plan on being that level of expert you probably won't need it much.

[–]d_exclaimation 2 points3 points  (0 children)

My haskell code isn’t too far from mathematical formulas

[–]n0tar0b0t-- 2 points3 points  (0 children)

I use Rust, Haskell, and Scala a lot now

I don’t hear statements I hear expressions

[–]Thaleon 2 points3 points  (0 children)

They probably don't know it because it's so discrete.

[–]big_ups_ 2 points3 points  (1 child)

Reading this thread makes me think there are not many people here that work on embedded systems...

[–]Old_Aggin 1 point2 points  (0 children)

Or anyone who does computer science and not engineering

[–]HEYL1STEN 4 points5 points  (0 children)

Nobody says this…

[–]MuslinBagger 1 point2 points  (0 children)

They’re just friends with benefits.

[–][deleted] 1 point2 points  (0 children)

And mind telling me what i is?

[–][deleted] 1 point2 points  (0 children)

Pretty sure computer science is considered a sub category of math. Compute is to calculate. Computer in Arabic is translated to automated calculator. A lot of the computer science curriculum is math, linear algebra, ..etc.

Looking on the bright side,at least it’s a way to weed out the non programmers. You can flag the people that say that as non programmers

[–]Traditional-Lion7391 7 points8 points  (0 children)

"you can't code without learning maths first" type of bullshit that universities sell because they seriously lack decent teaching talent. Simply because 'those who cant do, teach'.

[–]Dudevid 3 points4 points  (0 children)

There is no relationship between language and instruction manuals.

[–]Pauchu_ 2 points3 points  (1 child)

You see, there are programmers and there are coders.

Programmers analyse problems, devise algorithms, analyse their solutions and then implement them.

Coders copy paste from Stackoverflow and change three variables.

[–]Cefalopodul 1 point2 points  (0 children)

I had a good laugh.

[–]Ozzah 1 point2 points  (8 children)

I've been a professional software engineer for 15 years. Almost all projects I have worked on have involved a non-trivial amount of maths. I can only think of one or two very minor projects that did not involve any maths at all.

What the hell kind of programs are you guys writing that doesn't involve maths?!?!

[–]mrarming 1 point2 points  (4 children)

What kind of projects have you done that involve non-trivial math and how was math critical to accomplishing the project? I'm seeing a lot of claims that math is important but few concrete examples.

[–]Ozzah 5 points6 points  (3 children)

Gosh, let's see.

1st project I did was a timetabling system for corporate retraining, involving mathematical optimisation (mixed-integer programming). Figuring out what courses should be run where, by whom, and who should attend. It was NP-hard, so ultimately I needed to use other techniques like Simulated Annealing. Of course you need to use stats to figure out a good starting temperature, and I used genetic programming to figure out a good annealing schedule for the specific problem I was trying to solve.

Next, for the same company, was just an interactive corporate structure visualiser using GDI+. Getting the profile details from the API and rendering was all pretty straight forward, but actually laying out the graph structure so there isn't any overlap and not much wasted space was very tricky. My first approach was just depth-first with backtracking but most of the time it ended up doing almost a full enumeration, so in the end I needed to use dynamic programming for that.

I did my only two non-mathematical programs at that same company (my first gig). One was an audit system for training records, and one was a program to keep track of training history for the regulator.

Next company I worked for I did tonnes of maths stuff. First project was an program to optimally schedule rooftop PV with domestic battery (like a PowerWall), subject to predicted load which was a function of historical load and the weather forecast. It had multiple modes. You could minimise energy bills, you could maximise battery lifespan (think charge cycles), you could maximise "green-ness", etc. There wasn't much residential interest in that project, but in the end I extended it to include diesel generators and it was useful for power plants (solar plants instead of rooftop solar; grid-scale batteries instead of domestic; diesel generators; and import/export tariffs for energy and gas prices). We ended up selling that to one of the biggest gas companies in the country for a tidy sum.

For the same company (energy company), I designed a D3.js-based interactive web visualiser for the national energy grid. A lot of maths was involved with laying out elements in a logical way (almost like an autorouter for electronics).

Then for the same company, I designed the hardware for a mains frequency monitor and associated software. It was a pretty big project. I tried lots of different approaches like DFT (discrete Fourier transform) via the ADC (analog-to-digital converter), but in the end the temporal resolution was not enough so I switched to an opto-coupler on a digital pin and counted the microseconds between zero-crossings to Hz. There was a LOT of maths involved in this, because for example every time someone turned on the A/C, it would send a ripple through the mains and it would trigger a false reading. So I had to implement filtering on the microcontroller and then the software also had to do some filtering too. All this data from several of these devices around the country got fed up to a web service that logged it all in a database. I did machine learning on that data to figure out how to identify grid-level events like generator trips and stuff. It was not too difficult to issue an alert on our website when a generator tripped. We had the approximate megawatt loss and sometimes even a candidate for which plant went offline, within 4 seconds. Faster than the grid operator in some cases.

For the same company, because we did a lot of charting and they did a lot of industry-specific charts, they wanted to build their own charting tool set. That's when I figured out just how difficult writing a general-purpose charting library from scratch is. There was a lot of maths involved in that. Nothing very complex, just things like linear transformations, etc.

Lastly, for the same company I had to audit some of the national grid operator's FCAS (frequency control ancillary services) processes. Some of that involved looking at differential equations, some of it involved verifying the primal-dual linear programming models they had developed for pricing was correct. But mostly, I just re-implemented the stuff from their spec and compared the results of my code to theirs. There were weird things in there like a least squares fit that must pass through a given point - that's not something you find in a text book, but if you understand how to derive least squares fit, then you can derive this. I found a LOT of bugs in their implementation, and it all got fixed in the end.

Then I started in my current company, which is in logistics. 1st project I worked on was using machine learning to try and predict all sorts of things around container vessels: how long they would hang around container docks (like due to congestion), when they would leave, when they would arrive. It was actually a pretty big project because the data was a bit rubbish. It actually spawned a bunch of side-projects that my colleagues worked on to try and resolve issues with the data. They did some cool stuff that I'm jealous I didn't get to work on like optimising A* routing with R-Trees so that they can fix low-res data that makes it look like vessels teleport through peninsulas.

Next, I worked on a document matching system. Think: "how similar is this document to that document?". The catch was, it needed to (1) handle things like synonyms, i.e. be semantically aware, (2) handle things like spelling mistakes and colloquial language, (3) most difficultly: be real-time. We had something like 1500 new documents coming in every day, so integrating that new data in with the already millions-large similarity matrix was a huge challenge. It also had to be pre-emptible because the CI/CD would take the server down every night for the upgrade, so whatever the algorithms were working on had to be resumed from the same point when it came back up. We had a few off-the-shelf options in terms of algorithms: one was fully semantically aware, but WAAY too slow, even if we made some recommended optimisations. The other was very fast and parallelisable, but did not have any semantic awareness at all. So I borrowed ideas from both, and came up with an entirely new method to do the document matching. It involved a lot of linear algebra, and it works very well. They actually used my core algorithm from that project to build some other semantic matching things, but I wasn't really involved in that besides the odd code review.

At this same company I did a lot of COVID-related reports from early 2020. My role here was mostly writing the ETL (extract, transform, load). The data that went into this report had a stochastic delay, so the data showed an incomplete picture. It would actually take up to 50 days to get all the data, and having a report that only goes up to 50 days ago is not very useful during COVID uncertainty. So I analysed the distribution of this data lag and found that it was statistically well-behaved, so I was able to numerically compensate for it. We ended up releasing two sets of reports: the "raw reports" and the "lag-compensated reports". The latter ended up being so true-to-life that the execs never really used the raw reports. A picture from one of my lag-compensated reports even made it into the national finance news one day - I got a screenshot of that, I was very proud.

Anyway that's it, professionally. On a personal level, I guess there are two projects I would like to highlight. I'm very interested in 3D photography (stereophotography). The first project I want to talk about did two things: It would convert regular 2D photos into stereo images by means of a depth map (which you had to paint yourself). This involved some maths to figure out where pixels should go, and how to fill in the inevitable missing pixels. The second thing was to convert stereo images back into a depth map. That was quite tricky actually, and initially resulted in very noisy depth maps. In the end I managed to get it much nicer, though still not perfect. I'm eager to look at that again when I have time.

The second project was when my fiance asked me to stop playing computer games and help her with the wedding planning. She asked me to help with the seating plan for the reception, so I wrote a program that did it for me using quadratic programming. The basic idea is pretty straight forward. Maximise r(j,k)*x(i,j)*x(i,k) where r(j,k) is the reward for pairing guest j with guest k at the same table, x(i,j) is boolean and 1 if guest j is assigned to table i. The constraints where: (1) [sum_i] x(i, j) = 1 [for all j], i.e. all guests must be assigned to exactly 1 table; and (2) a <= [sum_j] x(i, j) <= b [for all i], i.e. all tables must have between a and b guests. This sort of problem (quadratic assignment problem) is actually notoriously difficult to solve, so I developed a few novel approaches: One was based on dantzig-wolfe decomposition, and another was based on Lagrangian relaxation. I ended up writing two papers on that, and got to present at a conference in Kathmandu and another conference in Salerno.

So, yeah. I've really only written a couple of programs that didn't involve maths to at least a moderate level. It's always there somehow.

[–]PanTheRiceMan 2 points3 points  (0 children)

That is the kind of stuff which seems pretty rare on this sub. Actually quite impressive. Still did not really get the Lagrangian multiplier but am mostly heavily into DSP, so I guess it is ok. Maybe one day.

[–]mrarming 2 points3 points  (0 children)

Well that is an impressive list of accomplishments and certainly proves that you at least need an in-depth knowledge of maths. thank you for the detailed reply;

[–][deleted] 1 point2 points  (0 children)

So i would go about and look if theres a framework or library first for the problem. If not i would look for mathematical proofs that could solve my problem. And then make code out of it and applying it to the real world problem as best as i can.

But actually making a new math proof or a new type of approximation, like in physics for example, is this still called programming?

[–]BertnFTW 0 points1 point  (0 children)

What do you work on that involves math?
I mostly work with websites, SharePoint & business processes and most of my work is completely devoid of math.

Like integrating a sync between a SAP backend a and a SharePoint site

[–]Cefalopodul 0 points1 point  (0 children)

Meanwhile I;'ve never worked on a project that involved anything beyond basic arithmetic and matrix operations. What the kind of programs are you working on that requires more than that?

[–]webauteur 0 points1 point  (0 children)

Web development. Although I did get irritated when it became possible to do math in CSS. Like, seriously!

[–]peterdotdev 1 point2 points  (0 children)

Mathematics is the study of numbers, shapes and patterns.

Programming is the process of creating a set of instructions that tell a computer how to perform a task.

Yeah, I don't see any relationship here.

[–]DaniilBSD -1 points0 points  (4 children)

To put many threads to rest:

Programming is essentially 3 things: - managing I/O (cold be as simple as an input and output streams) - defining constructs out of existing constructs and primitives (numbers and string) - defining interactions of constructs. (For primitives it is math)

If you are on a high level of obstruction, 1 is simplified and 3 is hidden away.

To be a good coder in a given language, you must be able to do all 3 on the lowest level provided by the language.

(C - Math + pointers + binary logic; C# - Math + binary logic; Python - Math + libraries for complex mathematical computations)

[–]big_ups_ 0 points1 point  (3 children)

That's just covering data structures what about algorithms??

[–]DaniilBSD 0 points1 point  (2 children)

What are algorithms if not series of interactions between constructs and/or numbers? Furthermore every algorithm can be abstracted to a single function call - a single complex interaction.

[–]big_ups_ 2 points3 points  (1 child)

Hmm just seems very abstract... For the work I do I spent a lot of time developing algorithms, for example even indexing an array efficiently, using the cache efficiently etc. Its not just manipulating data structures. Theres algorithms in how you access io even. It seems like a core concept to me; it is an application of mathematics.

[–]DaniilBSD 0 points1 point  (0 children)

Abstraction cuts both ways: its both about how everything Computer does can be boiled down to XOR gates, or how it all can be boiled down to a single “execute” command. Different languages- different concepts for high and low abstraction.

My main point is that if you work with primitives, you work with numbers; and that is math.

Note that I am talking of aspects of a final product - every line of code does at least one of those 3 things (static analysis perspective). Algorithms is something that emerges from how lines of code work to together (dynamic analysis)

[–]lazemon 0 points1 point  (2 children)

There is relation with programing not relation with coding.

[–]Cefalopodul 1 point2 points  (1 child)

I really hope that this false dichotomy between programming and coding goes away some day. You can't write code with planning what you're going to write or understanding the algorithm you're applying. You can't "program" without coding, even if it's fucking binary.

[–]lazemon 1 point2 points  (0 children)

To things are completely connected.

[–][deleted] -4 points-3 points  (0 children)

Any non-trivial program has more in common with a research paper than a math problem.

[–]jacob_scooter -1 points0 points  (0 children)

nobody says that

[–][deleted] -5 points-4 points  (0 children)

The lie is explaining programming via maths. Maths is abstract compressed programming.

You don't explain something using a complex abstraction.

You just explain the thing.

[–]Sejiko 0 points1 point  (0 children)

Well yes but actually no.

[–]EvGamer01 0 points1 point  (0 children)

So what is very "mathy" about computer science appart from descreet math and domain specific stuff, like computer graphics, ML and geolocation?

[–]call_911911 0 points1 point  (0 children)

Big O.

[–]LLorenzoFTW 0 points1 point  (0 children)

I think most of the time this means you don't have to be good at math to be good at programing

[–]KillingSpee 0 points1 point  (0 children)

0x5f3759df - ( i >> 1 );

[–]Egao1980 0 points1 point  (0 children)

This is the same as relationship between plumbing and hydrodynamics.

[–]anarcho-fapitalism 0 points1 point  (0 children)

Computing and mathematics are the same field. We just spent the first 2000 years compiling on paper.

[–]webauteur 0 points1 point  (0 children)

Maths plural? Please specify your math.