Thread: Maths knowledge

  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    10

    Maths knowledge

    What level of maths do you need to know before programming?

    A friend said programming requires too much maths knowledge-I said that you just need to know the basics (addition, subtraction, division, multiplication). He also reckons HTML is a programming language ;-)

    In the majority of cases the Maths is quite basic(working on general programs). In some cases(e.g. if you work in engineering, CAD) the Maths may be more complex.

    What do you think? What level is your maths knowledge?

  2. #2
    Registered User
    Join Date
    Mar 2009
    Location
    england
    Posts
    209
    HTML being catagorised as a programming language is subjective, I suppose. Personally I split development languages into 3 groups:

    1. Markup Languages (HTML, XML).
    2. Scripting Languages (JS, PHP).
    3. Programming Languages (anything that produces a self contained .exe).

    Either way, markup languages require no knowledge of Math.

    As a C# programmer with nothing more significant than a highschool level understanding of Math I find this to be more than adequate. Things like understanding (and enjoying!!) forumulae and equasions is a must.

  3. #3
    Registered User
    Join Date
    Jul 2007
    Posts
    131
    Quote Originally Posted by theoobe View Post
    HTML being catagorised as a programming language is subjective, I suppose. Personally I split development languages into 3 groups:

    1. Markup Languages (HTML, XML).
    2. Scripting Languages (JS, PHP).
    3. Programming Languages (anything that produces a self contained .exe).
    Programming language is a language which specifies some computation for a computer to execute. Markup languages don't express computation so they aren't programming languages. Scripting languages may also produce object/executable code, scripting language is a language used to control or extend another program, but most often they are interpreted.

    Code:
                         |
    Markup languages ----*--- Programming languages
                                    |
                                    *---- Compiled languages
                                    |
                                    *---- Interpreted languages
    Back on topic: I think highschool level mathematics is enough for most fields.

  4. #4
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    Markup languages do program the browser to render the page the way you want it to.

  5. #5
    Registered User
    Join Date
    Jul 2010
    Posts
    10
    Good comments.

    Oh I do like that diagram-lets have it again ;-) It looks like its fresh off a UNIX machine!


    Quote Originally Posted by fronty View Post
    Programming language is a language which specifies some computation for a computer to execute. Markup languages don't express computation so they aren't programming languages. Scripting languages may also produce object/executable code, scripting language is a language used to control or extend another program, but most often they are interpreted.

    Code:
                         |
    Markup languages ----*--- Programming languages
                                    |
                                    *---- Compiled languages
                                    |
                                    *---- Interpreted languages
    Back on topic: I think highschool level mathematics is enough for most fields.

  6. #6
    Registered User
    Join Date
    Sep 2008
    Location
    Toronto, Canada
    Posts
    1,834
    It greatly depends on which fields the program is expected to operate in.

    If someone asks you to write a program that creates a polygon on a map based on thousands of coordinates, then you're also expected to know something about geometry, trigonometry, etc. None of these were ever in the job description for writing quickie tools, but that background helps when your boss wants to use the skills you claimed to have as a tool writer. He's not going to be interested in excuses.

    If you are working on some microcontroller that takes input from sensors, you may be asked to apply a low-pass filter. Again, programming is the "easy" part... it all boils down to adds and subtracts, and maybe logarithms. But it would be nice if you had a feel for calculus, various transforms, etc.

    If you know in which field you will be programming for, then look around those engineers and see what they know. Most of the time you will find helpful colleagues that can explain enough very narrow details so that you don't have to have the more rounded knowledge they do. If they can spare the time to guide you. It may take multiple dinners
    Last edited by nonoob; 07-30-2010 at 05:00 PM.

  7. #7
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    HTML is a programming language, necessarily. Have you tried using it for anything meaningful without running it through an interpreter? As hard as it may be to some minds, so is CSS a programming language. These express computation... despite what you may have read on this thread.

    What defines computation isn't the text, but the existence of a program or method that gives that text meaning in computational terms. As an example, one day we may be able to code computer programs in nothing more than natural language (or ideally a mixture of natural and mathematical language), finally putting and end to our archaic programming languages of today. Would these not be programming languages? Of course they would. They express computation because an interpreter will read them and operate according to their instructions. English may one day be also a programming language. But because there's currently no such interpreter, English isn't today a programming language.

    As for maths knowledge requirements to program, depends on the programming language and on the task. C++ doesn't force you to use anything more than simple algebra. But you will benefit greatly from more advanced mathematical concepts because these often express the solutions to problems in real life in a way that C++ can understand.
    Last edited by Mario F.; 07-30-2010 at 05:57 PM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  8. #8
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    I'd put it this way. The Web is so important now that it's its own platform so you're definitely programming on it. It's just a question of with what, if you care. (Some people do not legitimately care what HTML "is" and I am pointing many fingers at myself.) The Web uses a lot of things that do proper programming: e.g. javascript, PHP, and perl, which is by no means all the available tools.

    But I would be surprised if anyone thought now that web sites circa 1995 were examples of programming. Think more in terms of the present.
    Last edited by whiteflags; 07-30-2010 at 06:09 PM.

  9. #9
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by whiteflags View Post
    Some people do not legitimately care what HTML "is"
    This too. But unfortunately I must confess that's not the case with me.
    I don't have an agenda on the matter however. It just felt deeply wrong to me the idea that HTML doesn't express computation and had to say something about it.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  10. #10
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by Mario F.
    They express computation because an interpreter will read them and operate according to their instructions.
    Therefore, all languages are programming languages, since anything in which information is expressed can be converted into a "programming language", even if the language only has a single "word". Frankly, I can agree that this argument, when applied to natural languages (in which one can indeed describe algorithms with sufficient detail for execution, in a way that naturally makes sense to speakers of the language), makes sense, but when applied to a language like HTML, it does not make sense, because accepting the argument renders the concept of a "programming language" useless... you're basically re-interpreting the language to suit your purposes.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  11. #11
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Mario F. View Post
    HTML is a programming language, necessarily. Have you tried using it for anything meaningful without running it through an interpreter? As hard as it may be to some minds, so is CSS a programming language. These express computation... despite what you may have read on this thread.

    What defines computation isn't the text, but the existence of a program or method that gives that text meaning in computational terms. As an example, one day we may be able to code computer programs in nothing more than natural language (or ideally a mixture of natural and mathematical language), finally putting and end to our archaic programming languages of today. Would these not be programming languages? Of course they would. They express computation because an interpreter will read them and operate according to their instructions. English may one day be also a programming language. But because there's currently no such interpreter, English isn't today a programming language.
    That seems just... wrong.
    HTML, CSS, XML and all are something that describe information. That is, they tell how something should look like. Programming languages OTOH are something that describes instructions. That is, they tell the computer to do something.
    In fact, the HTML standard seems to agree with me. They call HTML a markup language and not a programming language. Furthermore, the definition of markup is different from that of programming.
    Source: Programs vs. markup
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  12. #12
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Nice link Elysia. Thanks.

    I think it's precisely on the author section entitled But doesn't markup mean instructions to computers? that is his central but also weakest argument. Especially his attempt at reducing to the absurd the concept of HTML being considered an interpreted language as a means to disprove it: I could do the same exercise to C++ and therefore conclude this is no programming language. Because after all, if I attempted to match him with a similar strategy, I could for instance say that hello world programs like printf("hello world") prove C++ isn't a programming language. All it does is print something to the screen.

    It's his attempt at drawing a line between data structures, as he calls it, and programming languages that inevitably doesn't give him the chance to be precise and definitive. Especially the ability for programming languages for sequentiality, conditionality, and repetition.

    Again, I can step in and question him on the value HTML syntax and semantics in the presence of an interpreter. Isn't it true that I must follow a rigid set of syntactic and semantic rules that define the sequence of operations of the HTML "program"? Defining a DIV block can have surprising different results whether I do it at the top, at the bottom, in the middle or even inside another DIV block, or I don't define it at all. For the purposes of data presentation, HTML acts as a programming language. Do I have conditions or loops? Not officially (although conditionals do exist). But saying we need those to define a programming language is like saying a car must have an engine or it stops being a car.

    This quote, seen at the end of his text, is illustrative of the general tone of his argumentation:

    Write down a hundred times:
    HTML is a data format, not a programming language.
    You are allowed to use any programming language to write a loop that writes that text 100 times. You are also allowed to try to do that in HTML.
    No one ever defined programming languages as being things that can do loops and conditions. So this quote can't be valid. This is in the same vein of his argument that HTML is nowhere define in the Standard as being a "programming language". Instead, and this much I fully agree, HTML is a markup language. The debate of whether it isn't also a programming language apparently is still alive. You know my opinion.
    Last edited by Mario F.; 07-31-2010 at 07:50 AM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  13. #13
    Registered User
    Join Date
    May 2003
    Posts
    1,619
    I'm also of the camp that wouldn't call markup languages programming languages.

    At its heart, an HTML page is merely the input for a program -- a web browser. Yes, the input may affect how the program runs -- but then, that's true for all input.

    At the most basic, a program is a data engine -- it takes some kind of input (from a user, from a file, from a network device, from a remote sensor, etc), it makes decisions based on that input, and then it performs some actions based on those decisions. HTML isn't accepting input, it IS the input for another program (and sometimes also the output from another program).
    You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.

  14. #14
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    Isn't it true that I must follow a rigid set of syntactic and semantic rules that define the sequence of operations of the HTML "program"?
    Nope.

    You can throw complete garbage at most browsers and they will do their very best to display garbage.

    You don't describe a sequence of operations. The language doesn't allow you to describe any operations. You describe an idealized presentation of some content which an application is free to process in any order it chooses to display the associated content in any way it chooses.

    The closest relationship HTML has to programming is with domain specific declarative languages. (Prolog comes to my mind because of your descriptions of the browser/HTML relationship.) Even then, the inability to "instruct" (expect) the application interpreting the HTML to "display" the result of a computation/query leads me to say that HTML isn't a programming language.



    Even though I don't agree that HTML is also a programming language, I have to agree that that article is complete garbage. He seems to be confusing himself as readily as he confuses the issue. And the continued implication that a system must be procedural to be a programming language? Insanity!

    Soma

  15. #15
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by phantomotap View Post
    You can throw complete garbage at most browsers and they will do their very best to display garbage.
    I've seen plenty of garbage being thrown at C++ compiler at it's still compilable. Likewise, a C++ unit of code that doesn't compile still involved the act of programming.

    In any case, the way a HTML interpreter works is by design. The decision to allow rendering of content regardless of the quality, or even the validity, of the code was a conscious decision. Not a a consequence of HTML not being a programming language. It seems the perfectly adequate approach for a browser.

    Other types of user agents, on the other hand, are free to implement their own interpreters. And the argument could be made that it's perfectly possible to build an interpreter that refuses to render or does not ignore invalid HTML code. The HTML specification explicitly makes no mention on how user agents should handle errors.
    Last edited by Mario F.; 07-31-2010 at 01:27 PM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to deepen knowledge about computing
    By pc2-brazil in forum General Discussions
    Replies: 2
    Last Post: 07-24-2010, 02:33 PM
  2. maths???
    By nerdyneo in forum C++ Programming
    Replies: 4
    Last Post: 11-09-2003, 01:04 PM
  3. C++ Knowledge Needed For Making Graphic Games?
    By Krak in forum C++ Programming
    Replies: 14
    Last Post: 07-11-2003, 09:11 PM
  4. knowledge corrupts
    By Sentaku senshi in forum A Brief History of Cprogramming.com
    Replies: 63
    Last Post: 06-07-2002, 11:12 AM
  5. maths in a program
    By anthonye in forum C Programming
    Replies: 2
    Last Post: 05-24-2002, 09:08 AM