Programmig Newbie....where to start?

Discussion in 'C Programming' started by Kohtro, May 30, 2014.

  1. Kohtro

    Kohtro Guest

    My first post.

    Im currently a healthcare provider looking to learn programming. Why?

    1. I trade the financial markets. Close to 70% of all trading that takes place daily is done via algorithms. Also, having programming abilities will allow me to remove the human factor (psychology: greed and fear) from my trading decisions.

    2. I have ideas for medical equipment and would like to use programming to bring these ideas to fruition.

    3. And the most important reason is I have a creative side. (No...its not a god complex) Its just I can't think of any other field of study that removes some many boundaries to creative input. Hope that makes since.

    4. Lastly, I wont to do this for me. I have no desire to work for anyone/company.

    I realize this will take time. Perhaps 2-3 three yrs before I program anything of value that I/the world can use. And maybe 10-15yrs more before I truly understand programming. But I am willing to work hard.

    What I ask from the group is, considering my objectives above, where should I start? C,python, college course, private tutor, online, books????

    Your advice is greatly appreciated.



    PS. Anyone here offering tutoring via online?
    Kohtro, May 30, 2014
    1. Advertisements

  2. Kohtro

    Stefan Ram Guest

    If you have Microsoft® Office, VBA is a good place to start
    programming fast and even be able to create GUIs soon, and
    it has a nice debugger. However, programs will only run
    under Microsoft® Office. It might be a good place to start
    programming for some weeks. Possibly, you already can do
    everything with it, and, then, there is no need to change
    the language at all. Otherwise,

    Java has a garbage collector and a huge standard library and
    user base. So, you can get things done, albeit not as easy
    as in VBA, but it runs on many platforms. It might be the
    best choice as a second language after some weeks with VBA,
    when VBA should not be sufficient.

    C does not have a garbage collector, so writing code with
    dynamic memory allocation for in-memory graphs can become
    much harder. The standard library will not allow you to
    portably read directories or web pages (both was possible in
    either VBA or Java using standard libraries). So you often
    have to choose and become dependent on third-party libraries
    or do non-portable direct OS calls. C does not check array
    bounds (as VBA and Java), so C programs often have buffer
    overruns. This is a language for hardcore programmers only
    who are really willing to pay a price to write GUI programs
    which run a little bit faster than Java or do system-level
    Stefan Ram, May 30, 2014
    1. Advertisements

  3. Kohtro


    C is the best starting point if you want a really good foundation and are willing to wait to be productive. Python is the best starting point if you want to be able to make genuinely useful programs within a few months of learning it.

    As a health-care provider (assuming that this means that you have a good
    foundation in biology) you might want to check out the book "BioinformaticsProgramming using Python" by Mitchell Model to get a good feel for how a language like Python can be used in the life sciences. contains links to numerous tutorials.

    I would recommend learning both Python and C, alternating between the two (say a month on each before switching, long enough to get immersed in one language but not so long that you forget the other in the meantime). To connect the two courses of study -- strive to learn what the C-Python interpreter is doing under the hood (but only once you get a certain facility in both). In addition to giving you a broad perspective it is a genuinely useful pairing of skills. For one thing, good Python programmers sometimes need to write functions in C which can be called from Python since sometimes this is the only way to make the Python code fast enough. For another, it is often nice to be able to write a quick prototype of an algorithm in Python before you invest the time needed to write it in C (which often takes substantially longer to program in).
    , May 30, 2014
  4. Pretty much any language will express your financial algorithms (if a
    stock falls below a certain value, buy, if you're holding more than
    a certain proportion of the portfolio any any one sector, diversify,
    etc). The question is how you're going to get the data into the
    program, and, possibly, if you need to trade automatically, as opposed
    to simply outputting text instructions, how you're going to
    execute trades.
    Depends how much you know or are willing to learn about electronics.
    For most medical-type equipment, the software is just one component,
    the device also has to be designed and built. Some applications are
    highly processor-intensive, e.g. signals-processing type work for
    hearing aids, with others it's just a case of switching a few LEDS
    on and off when sensors go above or below certain values.

    You can't go wrong with C for this general area, however.
    Some programs are basically artistic expressions, other are "functional
    devices", and there's plenty of room for creativity in both the
    technical and the artistic sense. However you need to be aware that
    a lot of commercial programs have massive resources invested in them,
    which as an individual you will be unable to match.
    Malcolm McLean, May 31, 2014
  5. That may be true of financial algorithms (I don't know enough about such
    things) but as a general remark it hides a common misconception. Pretty
    much any language can be used to calculate the same results, but an
    algorithm is a method of getting a result, and not all methods can be
    expressed in all languages, at least not without stretching the meaning
    of the words beyond reason.

    Ben Bacarisse, May 31, 2014
  6. I was assuming relatively straight forwards trading logic which can be
    expressed in terms of rules and basic statistical operations.

    If you mean high-end machine learning, mathematical modelling, and so
    on, then yes, you'd need to think in terms of specialised packages.
    Malcolm McLean, May 31, 2014
  7. Kohtro

    Noob Guest

    The statement "not all methods can be expressed in all languages" is
    ambiguous (to me).

    Do you mean

    1) there are some methods that cannot be expressed in any language

    2) there are some methods that can be expressed in (at least) one language,
    but not in (at least) another language

    3) perhaps both

    4) something else

    Noob, Jun 2, 2014
  8. No, I was not thinking about such boundary cases. For a method
    (algorithm) to be know at all, I would argue that it must be expressed
    in some sort of semi-formal language, even that's just pseudo-code. But
    if by language you mean a properly implemented programming language,
    then yes.
    Yes. This is what I meant.
    Depends on the details in 1, but I really only intended to mean 2.
    Ben Bacarisse, Jun 2, 2014
  9. Kohtro

    Noob Guest

    Sorry, I meant "programming language".

    Do you have an example (or several) of an algorithm that can be expressed
    semi-formally in a "human" language (say, English) but that cannot be
    expressed in any programming language?

    Can you give an example (or several) of an algorithm that cannot be
    implemented in C or in assembly language?

    On a somewhat related tangent, I remember reading about the computer-assisted
    proof for the four color theorem.

    Noob, Jun 2, 2014
  10. Kohtro

    Stefan Ram Guest

    The traversal of a file system can be expressed in Java SE,
    but not in C.
    Stefan Ram, Jun 2, 2014
  11. Kohtro

    Noob Guest

    You would argue that the following program is not written in C?
    What language is it written in? POSIX C?

    #include <dirent.h>
    int main(void)
    DIR *dir = opendir(".");
    return 0;
    Noob, Jun 2, 2014
  12. Absoluately not C.

    In the religion of CLC, that stuff you wrote above is not C.

    I'm not making this up; I'm not crazy. I'm just telling you the truth
    about what the mavens of CLC have been saying, consistently, for over 2
    decades now.

    As Kiki is fond of saying, just because a language uses curly braces,
    doesn't mean it is C.


    There are many self-professed Christians who seem to think that because
    they believe in Jesus' sacrifice they can reject Jesus' teachings about
    how we should treat others. In this country, they show that they reject
    Jesus' teachings by voting for Republicans.
    Kenny McCormack, Jun 2, 2014
  13. But there is a sensible distinction between functions which can be written in pure C,
    and functions which can't be.

    I've been trying to get people to understand it for the past week.
    Malcolm McLean, Jun 2, 2014
  14. I may be behind the curve here, but Peter Shor's quantum integer
    factorisation algorithm can't, I think, be expressed in any current
    programming language.

    To get more abstract, algorithms written for an oracle machine, can't
    usually be written in real programming languages. The classic being a
    TM halting decider.
    Is your change of wording deliberate? I was talking about expressing an
    algorithm, not implementing it. For example, here is one way to express
    an algorithm whose value is the Fibonacci sequence (all of it!) in

    fib = 1 : 1 : map (uncurry (+)) (zip fib (tail fib))

    Now, this works on my machine, so it's implementable using just the
    instructions my CPU executes, but it can't, I contend, be expressed in C
    without totally distorting the meaning of the word "express".

    Ben Bacarisse, Jun 2, 2014
  15. Kohtro

    James Kuyper Guest

    I can see your point, but I also see Stefan's. All that opendir(".")
    implements is a function call, not the traversal of a file system. The
    function opendir() itself might or might not be written in C, but if it
    is written in C, it must, indirectly or indirectly, execute something
    that is NOT portable C code, in order to implement the actual opening of
    the directory. There is no C language construct that has, as it's
    standard-defined behavior, the opening of a directory.
    James Kuyper, Jun 2, 2014
  16. Is that what you've been saying?

    Of course that's true. What makes you think anyone doesn't
    understand it?
    Keith Thompson, Jun 2, 2014
  17. Kohtro

    Kaz Kylheku Guest

    Such an example would be a *counterexample* to Ben's claim; why should
    he be asked to produce it himself?

    Every algorithm is essentially written in a programming language
    that could, in theory, be directly executed.

    If not, then it's not formal enough to be called an algorithm.
    You are changing the topic from "express" to "implement" which
    are completely different.
    Kaz Kylheku, Jun 2, 2014
  18. As you can see, I answered (1) with both no and yes, depending on what
    was meant by "language" so I took this request to be asking for an
    example of where I'd said yes.

    Ben Bacarisse, Jun 2, 2014
  19. What he's asking for is a description of a program or function, which "you can't
    write in C". That's literally impossible, of course, because of the theorem of
    Turing equivalence :) But maybe someone can come up with something that
    can't reasonably be written in C.
    Malcolm McLean, Jun 2, 2014
  20. Hmm.

    I can imagine something like this:

    struct lazy_evaluated_list {
    /* blah blah */

    along with a bunch of auxiliary declarations that let you build and
    manipulate these lists.

    You clearly can't translate that Haskell code to C code with anything
    like the same simplicity, but I think you can write C code that
    corresponds to it fairly closely.

    (At worst, you can just write a Haskell implemention in C; perhaps
    that's cheating.)
    Keith Thompson, Jun 2, 2014
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.