Posts: 2020
Threads: 133
Joined: July 26, 2017
Reputation:
5
RE: Help me with my new website!
May 8, 2018 at 5:21 am
What do you guys think, why do people say that programming requires mathematics and physics?
To me it seems exactly the opposite. Applying the knowledge of mathematics and physics appears to be a way to get away with not knowing how to do something the right way.
For instance, you can make conical gradients using trigonometry and JavaScript, but if you know how to use Photoshop and advanced CSS, you are going to get better results. If you know the physical formulas, you can make a pendulum move perceptively correctly in your analog clock, but you will get better results if you use a physics framework.
What do you think about that?
Posts: 5466
Threads: 36
Joined: November 10, 2014
Reputation:
53
RE: Help me with my new website!
May 8, 2018 at 10:12 am
At the university I went to, physics was a requirement for a computer science degree. Not for programming’s sake, but because the degree was a science degree. I actually found the required electrical engineering classes far more interesting and relevant.
In any event, like always, use the right tool for the job at hand. JavaScript is really good at manipulating the DOM (of course it is... that’s why it exists), but styling the DOM should be done with CSS (which is why it exists), preferably in external files in order to separate concerns and make writing/debugging/editing/extending far easier. Same goes for JavaScript.
Posts: 5466
Threads: 36
Joined: November 10, 2014
Reputation:
53
RE: Help me with my new website!
May 9, 2018 at 3:37 pm
Windows XP is dead. Outside of governments who are still stuck using old machines, Microsoft doesn't even support it any more. I'd say that the minimum Windows OS you should target is Windows 7. Even though it's near or at EOL, lots of people who didn't like what 8/10 became still use it.
Never heard of Emscripten until now. Looks pretty cool, but it's outside my wheelhouse.
Regarding using the right tool for the job, well, first you need to define the job. Every language will allow you to implement algorithms and data structures, and manipulate strings to a certain extent, and with a certain amount of ease. The question, really, is what do you need? Like, PHP doesn't have pointers, and the way it handles references is kinda half-assed. So, you wouldn't be able to implement your own dynamically linked list (as an example) in it. That said, there are built-in structures/functions that may do what you want. C# is more liberal with direct memory access, but requires such code be marked as unsafe (which does somethings with the intermediary language it gets compiled down into).
And, yeah, part of it is knowing what the strengths and weaknesses of any particular language are. For whatever reason, programming languages are a lot like video game consoles - everyone has their favorite, and there's lots of vocal fans/critics out there saying that this one is great and the other one is terrible, so it's hard to get a clear idea of what each language is like. Branching out and trying different languages for yourself is one of the best ways to learn those things.
Posts: 36099
Threads: 212
Joined: August 13, 2012
Reputation:
146
RE: Help me with my new website!
May 9, 2018 at 5:53 pm
I think this now qualifies as re creating the internet...
Playing Cluedo with my mum while I was at Uni:
"You did WHAT? With WHO? WHERE???"
Posts: 5466
Threads: 36
Joined: November 10, 2014
Reputation:
53
RE: Help me with my new website!
May 9, 2018 at 8:48 pm
(This post was last modified: May 9, 2018 at 8:49 pm by KevinM1.)
Ah, I didn’t realize that you attached show() and hide() to different elements’ click events.