For my undergraduate senior project, a professor asked me and my partner to design an algorithm to determine true resolution in the browser, unaffected by zooming, multiple screens, viewport size, etc. (tl;dr our implementation was okay, it usually did the job correctly.)It's super pedantic, but I've been thinking about the terminology of calling it an algorithm. It really doesn't seem like an algorithm, because it's very dependent on JavaScript and the state of the browser at a given time. Particularly, our script has a lot of if-statements to determine what what variables and data to work with depending on the browser and configuration. I certainly don't think I could write it out in a language-agnostic pseudocode.Is there a better word to describe what we wrote? Does it count as an algorithm per say? If I had to think of alternate words, they'd be:implementation (but of what, just our general idea/design?)script/programAre there better words that are more general than simply script or program?
Better word to describe JavaScript algorithm?
algorithms;terminology
You can certainly describe the inner workings of your project as an algorithm. It takes an input (whatever information it obtains from the browser) and produces an output, as a result of some scheme of calculations. Perhaps it needs to read inputs during the course of its calculations (depending on the first inputs, it might make different queries of the browser), so it might be some sort of interactive or adaptive algorithm.