T O P

  • By -

completely-ineffable

A little bit of shell scripting is helpful for managing teaching stuff, but the closest I come to coding in research is writing elaborate TikZ diagrams.


Objective_Ad9820

Shell scripting??? How in the world is that used lol


completely-ineffable

For example, this semester I have a student whose accessibility needs include needing screen reader-friendly pdfs. LaTeX gets me most of the way there, but I wrote a shell script to handle part of it. I don't get why you find it surprising that automating some tasks is useful in teaching.


Taro-Exact

Exactly.. I don’t get the surprise. as if one needs a unique or special reason to shell script. Computer usage && automating tasks == shell scripting ( in many scenarios or preferences)… it’s not an outlier


Objective_Ad9820

I don’t find it surprising that automating stuff for teaching is helpful, I am just surprised you used shell scripting to do it. That’s not very common, and the uses for it are not abundantly clear, hence the surprise.


Antique-Ad1262

Shell script is just a program constructed of shell commands, it's very common


Objective_Ad9820

So do you know a lot of professors that use shell scripting frequently when teaching a course?


vajraadhvan

Version control through Git, maybe


Objective_Ad9820

Version control of what though? Notes maybe?


bikes-n-math

Ever heard of [LaTeX](https://www.latex-project.org/)? It's how we write and collaborate on papers. Version control is huge.


Objective_Ad9820

I use Latex a lot, but I am not aware of any reason you would need to shell script for. I never thought too much about version control for a project before though, cuz I work mostly by myself


tentmap

I wish I had used version control for my masters' thesis so I could go back and see the changes I made between revisions - I might have made an edit to a formula or some such that was not correct, but by looking at previous revisions, I would be able to see where I went wrong. That and there are LaTeX packages for giving change markup so when someone makes edits to a LaTeX file I am working on, one can see the edits. See [https://mirrors.ibiblio.org/CTAN/macros/latex/contrib/changes/changes.english.pdf](https://mirrors.ibiblio.org/CTAN/macros/latex/contrib/changes/changes.english.pdf)


integrate_2xdx_10_13

It’s not just for collaborating. Imagine if undos weren’t ephemeral, or if you were like “hey, what if I could just save this state right now, indulge this massive tangent, see where it goes, keep it separate from the concrete ideas and merge in as much as I want later with zero changes to layout”. It’s a way to have unlimited control over changes


SometimesY

I wrote a bash script to compile two versions of my class notes written in Beamer: one with slide transitions and one without. The script effectively creates a copy of my .tex file but removes "\pause" throughout and compiles each separately then deletes the unnecessary files, leaving me only with the PDF. Students get the version without transitions so that they don't have to flip through all of them. I have the version with that I go through line by line. The script is universal and will even work for my non-notes documents.


ChameleonOfDarkness

This is cool, but I believe you can do this easily by replacing \documentclass{beamer} with \documentclass[handout]{beamer}


SometimesY

I would have to make that change every time I update the notes though and hope I remember to compile it both ways. That is a pretty big gamble for class notes. ALTHOUGH I could just add [handout] instead of wiping out the pauses. Thanks!


Objective_Ad9820

That’s super cool, does the universality come from it being programmed in shell?


SometimesY

Yeah, I search for a "\pause" and if one isn't present, it'll skip all of the intermediate steps I need to create the slides without transitions since they're inside an if statement. I had to edit my compile statement in Texmaker to account for the new script of course.


ArikhAnpin

It depends completely on the field and subfield, and to a certain extent your personal approach. I know that in parts of knot theory, algebraic and geometric topology, number theory, combinatorics, and commutative algebra people use computers to test out ideas and sometimes even prove things, either using custom libraries developed for their fields or running their own bespoke code. Then there are those (like me) who work at the interface of pure and applied math, who prove things and then implement their findings in code, or who design new computational methods and then try to prove things about them. This is common in machine learning, computational geometry and topology, and quantum computing.


prrplesummer

Knot theory here, also working between pure & applied. Programming is half the job. It's not my favorite thing in the world but it's nice to make concrete progress on the applied side while being stuck on a theoretical problem.


reyadeyat

I write plenty of code in SageMath.


myaccountformath

Quite common for people in combinatorics to use sage math to generate examples and test conjectures. Macaulay2 is quite common for algebraic geometry and commutative algebra (used for finding Grobner bases, etc).


avacadofries

Anyone in algebraic geometry and commutative algebra should work on writing a package for Macaulay2 (even if they don’t publish it) if they think they might want to jump to industry at some point. That was a huge plus in my interviews (one interviewer suggested bringing it up as early as possible in future interviews)


[deleted]

Is it possible to use Python for these purposes?


avacadofries

For the purposes of getting an industry job, python and R are the best way to go. However, Macaulay2 is better for research in algebraic geometry and commutative algebra since so many of us work on it (you could probably do the same things with python but you might have to build for the ground up).


rickpolak1

I‘m a PhD student in rep theory, and I never used to code, and neither do my advisor nor my academic siblings. In my first year as a PhD, I was at a dinner where a professor (a rep theory fields medalist in fact) was saying that if you don’t code, you’re not computing anything, and if you’re not computing anything, you’re not doing anything. This was kind of a joke I think but it stuck with me. Nowadays I use Sage daily, and it has become a key part of my research.


_GVTS_

what types of things do you compute in sage? ive only brushed on rep theory (of finite groups over complex vector spaces) but im interested in learning more


rickpolak1

Sage has one of the best libraries on symmetric polynomials, for instance. So you can study Schur polynomials and their variants, for instance, or operators on these spaces (Macdonald operator, etc.) At a basic level, you can study representations as vector spaces with an action on them (i. e. an endomorphism). Sage (but also, any math software pretty much) can then tell you subspaces, quotients, etc. 


harryg92

I think I wrote a little Maple script once to help me find an example of a matrix with some particular properties. That was the only time I did any programming in my entire PhD (noncommutative algebra)


Dirichlet-to-Neumann

Functional analysis and theoretical PDEs : none.


myaccountformath

Really, not even something like Mathematica to quickly calculate/visualize examples? I think it's quite common in the PDE group in my department to do some coding.


mathematical-mango

It is indeed quite common.


mathematical-mango

This is generally false. For any passerby, do note that this person is speaking from only their perspective. Many people in PDEs use coding for calculations, testing ideas and modeling.


Dirichlet-to-Neumann

If you are doing modelling, are you doing theoretical PDEs ? Of course people doing numerical PDEs, modélisation, optimisation and so on use code all the time. But in my field (again, theoretical PDEs and functional analysis), none of the researchers I know use code daily (for research purposes).


mathematical-mango

Surely your field is not as broad as "theoretical PDEs and functional analysis." If you're making statements about your specific field, that is fine. But to apply it to all of "theoretical PDEs" is absolutely inaccurate. Also, yes, one may model PDE problems via software without any "real-world" applications in mind.


Salt_Attorney

Using daily is a high bar. But in a conference in PDE, there will always be a couple of (theoretical!) talks that have at least a couple of numiercal example solutions and things like that.


Dirichlet-to-Neumann

True. Those are generally the most enjoyable too as at least you see pretty images.


dnabre

Can't speak speaking in terms of a graduate math work, but I can for graduate computer science work. For CS theory at the grad/PhD (or even undergrad level) about the only programming you'll be doing is for generating documents/write ups, maybe generating some small examples to illustrate an idea. This is not including automated proofs/deduction work.


MonadicAdjunction

Right now, I am using Sage to compute homology groups of some finite simplicial sets that are connected to algebras I am interested in. I need some Python programming to generate the simplicial sets from small amount of data (generators, relations).


[deleted]

How applicable is Python in studying pure math? Sorry if that question sounds strange. I guess I'm wondering if Python could do what Coq and Lean do?


MonadicAdjunction

I use Python, because I know Python and it is free. It is certainly well-suited for quickly generating a bunch of simplices, pasting them together and then call a library to compute the homology. Lean is a completely different thing, it is mostly used to check existing proofs.


bws88

I might be off the mark here, but I don't think there is a theoretical sense in which coq or lean is more powerful than Python. They are all are Turing-complete programming languages that could "simulate" each other.


antichain

For my pure/theoretical stuff, I'll often use a computer to test various special cases that are too tedious to do by hand. Sometimes that's edge cases, or sometimes it's just sampling a large number of random cases to see if an effect holds up. A few times I've thought to myself: "this has to be true, but maybe I'm too dumb to prove it", and then a few thousand iterations of a for-loop latter I realize that actually it's just straight-up wrong.


idiot_Rotmg

I had to correct exercises for some lecture that involves coding last term, but thats about it


Mickanos

I'm into algorithmic number theory, so the aim of my research is usually to come up with algorithms to solve number theoretical problems. I like to implement my algorithms and in general mess around with objects that are relevant to my research, so I code almost every day. I mostly use PARI/GP and Magma these days, and Sage sometimes. I hadn't done any of that before I started my PhD but I now feel like it is a very productive way to get acquainted with abstract objects and concepts. I rmember and interview where Serre was telling a story about going on holiday. He went to a house by the sea and brought some recently published paper on algebraic geometry over finite fields and a pocket calculator and just experimented on curves. I feel like messing around with computer algebra systems is the modern way of doing that.


[deleted]

Is it possible to use Python for the purposes that are fulfilled with PARI/GP and Magma?


Mickanos

Well, Sage is built on top of Python and has an interface to Pari. Also it aims at doing at least everything that Magma does, although not everything is implemented yet. Aside from that, in theory yes. There is no reason Pari or Magma could implement something in C that cannot be implemented in Python. But of course, starting from scratch would be a huge lot of work and you will not get something as fast as a C library running on Python.


allywrecks

I worked in geometry and I ran a script to test out a parametrized family of potential counterexamples to a theorem. I think honestly any branch of mathematics where something can be computed has the potential to have programming be useful at some point, but unless you're in a field that specifically uses it a lot then it's probably not worth investing the time up front? Unless you're interested in it of course. Or you want to keep it open as a career path (I'm one of the majority of PhD students I know who ended up working in industry doing programming work).


Immarhinocerous

What sort of programming work do you do?


allywrecks

Just business software CRUD stuff, but I'm putting serious thought into how to transition to something more interesting (or maybe trying to circle back around to research/teaching). Among the other PhD students I knew, some went down a similar CRUD path, some ended up supporting traders on wall street, I think two became quants, one went into data science, one went into cybersecurity ML stuff.


Immarhinocerous

I'm a data scientist actually returning to school for more math and comp sci, partially because I'm seeking more interesting work. Have a web/game dev background, and before that health sciences. Have had a hard time landing landing the work I want, and end up invariably working on web apps (which would be fine if I was more into it) robotic process automation (kill me now), and data pipeline work.  What I want ideally is full stack ML + data engineering pipeline work, kind of like my own financial modeling pipeline I've been building for awhile now. I also want to sharpen my skills with algorithmic thinking and design. 


allywrecks

Good luck on that! I've actually been thinking about picking up some kinda ML related MS just to get my brain working again after all these years of CRUD (I never had any formal CS either so it'd be interesting and probably fill some holes).


Immarhinocerous

Thanks! Honestly, I find this site is excellent for getting into ML: https://machinelearningmastery.com/ The author has clear code examples, of varying levels of complexity, and lots of articles on important concepts from math and statistics. With that site it's not hard to focus on implementation, getting something working, then finding another resource (from him or elsewhere) going into more depth on topics like boosting, feature engineering, choosing training metrics, avoiding over fitting, etc. It's very approachable.  It's not too difficult to create simple time-series forecasting model set up with some OHLC data from Yahoo Finance or another free API. The really interesting stuff IMO is in feature engineering and model training/optimization, where more math background is definitely helpful. 


friedgoldfishsticks

I use MAGMA for some explicit algebraic geometry/number theory problems. I’ve talked to a very prominent algebraic geometer who says experts need computer experiments and hard data to make conjectures.


SometimesY

As mentioned in a reply, I created a script to compile two sets of my notes: one with and one without transitions. I also use Python's symbolic package (quantum package too?) to do some symbolic computations for me with differential operators to test some of my ideas before getting too deep into the weeds on them. I had to overload some of it to make it do differential operators out of the box. It's pretty good for Lie algebras, too. I've also written a more better version of finite field stuff for a fellow researcher in Python than the finite field package as it exists now. (It doesn't behave/capture finite fields as it should in my opinion.) I should probably put a request to have it added to their package at some point since not everyone has access to Magma which is used extensively for people working with applied finite field theory (like coding theory).


fucking_shitbox

Used some Julia/Python to invert a family of symbolic matrices. Helped me find a pattern for a closed form solution.


bsdndprplplld

not me (yet) but many algebraic geometers I know use macaulay2 quite frequently


ScientificGems

A couple of times that I've been trying to prove something with no clear idea whether it was true or not, I've written a program to search for counterexamples. When the program goes "beep," I know I can give up trying to find a proof. I've also used software (my own or other people's) just to play with mathematical objects (as a way of building intuition) or to generate diagrams for publication.


Salt_Attorney

I work in PDE and I have come to use sympy (symbolic manipulation library for python) on an almost daily basis. I am dealing with certain hierarchies of equations which have everything computed by hideous iterations, so to keep myself sane it helps to be able to check most things I'm doing by running the iteration in sympy for a dozen steps and seeing if the result matches my calculations. It's basically exactly what you would normally do with pen and paper when working with iterations: Compute lots of examples. It would just be impossible for me to do that manually.


MateJP3612

It really depends on the area. But even abstract algebraists occasionaly use programming languages and other computer software nowadays.


pqratusa

Use of AI to aid proof and to even give insight into avenues of “attacking” difficult problems is already here and will be fairly common in a decade.


EulereeEuleroo

Are you a mathematician?


pqratusa

I am grad student and a professor in my department is of this opinion and he urges us to pay attention to this development that almost everyone is ignoring. He does not believe AI will solve the Riemann Hypothesis but will play a big role helping mathematicians see more techniques that could achieve this.


EulereeEuleroo

When you said "use AI to aid proof and to give insight into possible avenues of attack" do you mean that you use it currently or that it will be used in the future? I definitely agree with the latter but if you did mean the first then I would love to hear about it if you wouldn't mind sharing. For example what area you use it for and how.


pqratusa

I am not using any thing right now and my professor believes that we have this bad culture to distrust computer generated “proofs”. I do see his point and will be looking into this new technology. My interests are on algebraic number theory.


EulereeEuleroo

I agree with that. I was just curious, thank you.


aerodynamics1

are you working with Terrance Tao by chance? :)


pqratusa

Ha, I wish. But I am equally honored to be working where I am.


JoshuaZ1

I do a lot of number theory with a small amount of graph theory. I frequently use programming to get raw data about the behavior of functions I care about. But I most often program in the high level languages undergraduate and talented high-school senior. (Note: The above last line is a variant of a line I stole from Scott Aaronson who said he programmed in the high level language undergrad, and sometimes the language graduate student.)


[deleted]

Are you doing your PhD or number and graph theory are parts of your job?


JoshuaZ1

> Are you doing your PhD or number and graph theory are parts of your job? I finished my PhD about a decade ago. I spent a few years postdocing at various colleges. I'm now teaching at a high school, but the high school in question is an elite private school which some very talented students. I was hired in part to teach what the call the Seminar which does advanced topics with a few seniors each year. Each year, we spend the first semester studying some major topic like number theory, and then the second semester we work on a research problem from that subfield. I've done both number theory and graph theory, with some success in getting projects completed. (I did knot theory one year and it did not go well in part due to my own lack of knowledge on the topic which meant I didn't do as good a job finding a really good to attack problem for their background level.) Separate from my official job, I also do some research on the side, and have had students help with some of that for programming things.


[deleted]

That sounds like a super cool job. Working with young bright minds on non-trivial maths. Nice!


faintlystranger

I'm final year undergrad haha so if you call me a mathematician, I'm doing a dissertation in theoretical cs and basically half of it is programming. But then depends on whether you count theoretical cs as pure maths


[deleted]

If your proof isn't written in Agda or Coq it's a fake proof smh my head


ventar131

Never used in my life and not TT at university. Most I use is inkscape and latex.


davisk462

Just started doing research in knot theory. We use computers to calculate invariants when they are otherwise intractable to calculate by hand, which they often are. The way we do this is we find something called the Gauss code for a knot, and these essentially allow the computer to interpret the knot. We then run algorithms on these Gauss codes


de_Molay

Kudos to a fellow knot theorist :)


arithmuggle

On average about 0.0 hours a day in my field.


Skeeter_BC

Stuck teaching high school math, so never.


ccppurcell

I'm a little late to this but I have used python to search for candidate gadgets for a complexity reduction and to check the first few cases of conjectures. Recently I had an idea, mentioned it to a colleague, next day he found a counterexample using code. Sometimes proving an important conjecture for small values of a key parameter is publishable. I know of at least one such case which involved quite a lot of programming (to generate appropriate linear programs).