Loading ...
Sorry, an error occurred while loading the content.

Which programming language should I try to learn?

Expand Messages
  • Steve Hayes
    A few weeks ago I bought a book called Beginning programming for dummies . As I explain here:
    Message 1 of 7 , Jun 3, 2013
    • 0 Attachment
      A few weeks ago I bought a book called "Beginning programming for dummies".

      As I explain here:

      http://ondermynende.wordpress.com/2013/05/11/books-and-worms-and-things/

      It must be about 20 years since I last bought a computer programming book.
      When GUIs (Graphical User Interfaces) became all the rage, I gave up. As I
      get older I still find the old text interfaces much easier to read. But I
      thought that if nobody is going to write the kind of program I really, really
      want — an event-based database program for family history, biography, and
      historical research — then I’ll have to write it myself. So I hope this book
      will help me to do a quick catch-up on some of the developments in
      programming in the last 20 years.

      But I'd also like some suggestions about the best language to use for such an
      event-based database program (and before anyone mentions it yet again, no TMG
      does NOT do what I want!)

      What I want to do has been explained here:

      http://tinyurl.com/dycmfxz

      and has been discussed on this forum before.

      The problem is that most people writing genealogy software seem to be intent
      on writing yet another lineage-linked program, and there are more than enough
      of them already.

      So if no one is going to write the kind of program I want, I'll have to do it
      myself.

      But which is the best language to learn to do it?

      It needs to be one that is not too complicated to learn, and good for
      manipulating databases.

      Would anyone be interested in joining in with such a thing as an open-source
      project?


      --
      Steve Hayes
      E-mail: shayes@...
      Blog: http://khanya.wordpress.com
      Phone: 083-342-3563 or 012-333-6727
      Fax: 086-548-2525
    • Thomas Wetmore
      Steve, I m an oldtimer, ancient by programming standards. I wrote my first program in 1967 in Fortran and an assembly language. Since then I ve been a
      Message 2 of 7 , Jun 3, 2013
      • 0 Attachment
        Steve,

        I'm an oldtimer, ancient by programming standards. I wrote my first program in 1967 in Fortran and an assembly language. Since then I've been a professional programmers almost full time. Now I'm retired but still programming.

        One of my goals is to write a genealogical program that handles conclusions and evidence with equal facility. For me evidence includes personas and event records, so matches up with many of your requirements.

        When I started out there was very little choice for event-based user interfaces. Back in the late 80's and early 90's I wrote my first substantial genealogical application, LifeLines, in the C language, on UNIX, using the curses (later ncurses) package for event-based and window-based interaction. LifeLines is still my main genealogical program and it has a loyal following around the world. I would not suggest anyone new picking it up and trying to use it, however.

        Today your options are wide open. Five years ago I would have suggested you use Java, since it provides a complete GUI approach and has the advantage of being architecture agnostic.

        Today people want to develop fast with interpreted languages. I can't help there. I'm just too old for python and ruby and so on. I still believe firmly in using real programming languages (C, C++, Java, Objective-C). Interpreted languages might be great now, but I simply don't use them.

        And today you don't even have to choose to write for a particular architecture. You can choose to make your application a web application, and the GUI packages in that area are mind bogglingly numerous.

        What I am personally doing now is writing everything in Objective-C using the NeXtStep (called Cocoa and Foundation on Apple) user interface. The easiest way to do this is to develop using Cocoa on the Mac, developing with the Xcode development environment, which is wonderfully powerful and easy to use. However, there are a number of ports of this interface to Windows and LINUX (GNUStep, Cocotron), so you can develop on a Mac, and then port the results to the other major architectures.

        So my direct recommendation is to take a look at Objective-C and the GNUStep/NeXtStep/Cocoa GUI. Objective-C is based on C and is very easy to learn. It is object-oriented in the extreme, and has many features (that you don't have to use!) that make it as powerful as the old Smalltalk language, which is beyond what is available in C++, C# and Java. With the ascendency of the iPhone and iPad, where Objective-C and Cocoa is essentially the native languages, the number of ways you can learn about Objective-C and the accompanying GUI has increased dramatically.

        Your options for databases are wide open as well. If you want to go with a relational database you can get free versions of sqlite and mysql (to name just two). If you want to go a little more "modern", which I would strongly recommend, you could use mongodb or a number of others. My plans are centered around mongodb. For LifeLines I wrote my own internal database, and though it has stood the test of time for 25 years, I would never roll my own again.

        Good luck,

        Tom Wetmore

        On Jun 3, 2013, at 12:46 PM, Steve Hayes <hayesstw@...> wrote:

        > A few weeks ago I bought a book called "Beginning programming for dummies".
        >
        > As I explain here:
        >
        > http://ondermynende.wordpress.com/2013/05/11/books-and-worms-and-things/
        >
        > It must be about 20 years since I last bought a computer programming book.
        > When GUIs (Graphical User Interfaces) became all the rage, I gave up. As I
        > get older I still find the old text interfaces much easier to read. But I
        > thought that if nobody is going to write the kind of program I really, really
        > want — an event-based database program for family history, biography, and
        > historical research — then I’ll have to write it myself. So I hope this book
        > will help me to do a quick catch-up on some of the developments in
        > programming in the last 20 years.
        >
        > But I'd also like some suggestions about the best language to use for such an
        > event-based database program (and before anyone mentions it yet again, no TMG
        > does NOT do what I want!)
        >
        > What I want to do has been explained here:
        >
        > http://tinyurl.com/dycmfxz
        >
        > and has been discussed on this forum before.
        >
        > The problem is that most people writing genealogy software seem to be intent
        > on writing yet another lineage-linked program, and there are more than enough
        > of them already.
        >
        > So if no one is going to write the kind of program I want, I'll have to do it
        > myself.
        >
        > But which is the best language to learn to do it?
        >
        > It needs to be one that is not too complicated to learn, and good for
        > manipulating databases.
        >
        > Would anyone be interested in joining in with such a thing as an open-source
        > project?
        >
        > --
        > Steve Hayes
        > E-mail: shayes@...
        > Blog: http://khanya.wordpress.com
        > Phone: 083-342-3563 or 012-333-6727
        > Fax: 086-548-2525
        >
        >
      • Steve Hayes
        ... Thanks very much for the reply, Tom. ... I too have a distrust of interpreted languages, though I learnt most of what little I know about programming
        Message 3 of 7 , Jun 3, 2013
        • 0 Attachment
          On 3 Jun 2013 at 13:40, Thomas Wetmore wrote:

          > I'm an oldtimer, ancient by programming standards. I wrote my first program in
          > 1967 in Fortran and an assembly language. Since then I've been a professional
          > programmers almost full time. Now I'm retired but still programming.

          Thanks very much for the reply, Tom.

          > Today your options are wide open. Five years ago I would have suggested you
          > use Java, since it provides a complete GUI approach and has the advantage of
          > being architecture agnostic.
          >
          > Today people want to develop fast with interpreted languages. I can't help
          > there. I'm just too old for python and ruby and so on. I still believe firmly
          > in using real programming languages (C, C++, Java, Objective-C). Interpreted
          > languages might be great now, but I simply don't use them.

          I too have a distrust of interpreted languages, though I learnt most of what
          little I know about programming through using BASIC interpreters, programs
          like Turbo Basic could compile them eventually. I still use a genealogy
          program, Family History System, that was written that way (though not by me)
          and even have the source code somewhere.

          I've read a little about Python, Perl etc, but I'm not sure if they are the
          way to go.

          > So my direct recommendation is to take a look at Objective-C and the
          > GNUStep/NeXtStep/Cocoa GUI. Objective-C is based on C and is very easy to
          > learn. It is object-oriented in the extreme, and has many features (that you
          > don't have to use!) that make it as powerful as the old Smalltalk language,
          > which is beyond what is available in C++, C# and Java. With the ascendency of
          > the iPhone and iPad, where Objective-C and Cocoa is essentially the native
          > languages, the number of ways you can learn about Objective-C and the
          > accompanying GUI has increased dramatically.

          I've downloaded something called DevC, and also Visual Basic 2010 Express
          (180 Mb!). I gather that the latter works with the Microsoft SQL engine, but
          I haven't looked at it yet, so I'm not sure how it works.Perhaps it means
          having to learn both Visial Basic and SQL.

          > Your options for databases are wide open as well. If you want to go with a
          > relational database you can get free versions of sqlite and mysql (to name
          > just two). If you want to go a little more "modern", which I would strongly
          > recommend, you could use mongodb or a number of others. My plans are centered
          > around mongodb. For LifeLines I wrote my own internal database, and though it
          > has stood the test of time for 25 years, I would never roll my own again.

          I think what I have in mind needs to be relational as the next step. I'd done
          what I can along that line with flat-file databases (askSam and Inmagic), but
          though they are very useful, there's just too much retyping involved. If I
          enter an event, then I have to retype the names of all the people involved in
          the event, when in a relational database you could just link them to a
          "persons" table.

          I wondered about the Base thing that comes with Open Office. If I do manage
          to learn enough to do this, I'd like it to be an open source thing, so that
          others can join in, and Open Office seems to be free, but it is difficult to
          find documentation for it.

          It also seems to have strange (to me) limitations -- it asks you to
          "register" a project, which then seems to limit it to one computer, and will
          not allow you to copy or move it anywhere else, or even access it from
          anywhere else on a network.




          --
          Steve Hayes
          E-mail: shayes@...
          Blog: http://khanya.wordpress.com
          Phone: 083-342-3563 or 012-333-6727
          Fax: 086-548-2525
        • Tom
          Steve, Just picking up on this thread a bit. Here s an interesting web page that rates popularity of programming languages:
          Message 4 of 7 , Jun 24, 2013
          • 0 Attachment
            Steve,

            Just picking up on this thread a bit. Here's an interesting web page that rates
            popularity of programming languages:

            http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html

            Note C is at the top followed by Java, Objective-C, and C++. Objective-C and C++
            have recently swapped places. This is explained by the many developers who are moving to the more lucrative Apple platforms (iPhone, iPad, Mac) where Objective-C is effectively
            the native programming language. Number 4 is an interpreted language, and number 5,
            C#, was Microsoft's attempt to usurp Java.

            A major characteristic of genealogical software is the need to have persistence of objects
            in the programs. That is, you need to be able to create a software object to represent
            some genealogical concept (e.g., person, family) and you need that object to continue
            being alive within your program. It has to have a lifetime beyond the individual software
            modules that create them, or display them or compute with them. Objects like these
            are called heap objects, meaning they exist in a largish, originally unstructured area of
            computer memory. The heap is carved up into smaller units of memory, to hold your
            objects, as the program proceeds. Because of this you need to use a programming
            language that helps you manage the heap. The popular "object-oriented" languages
            provide you with the support you need. These languages are Java, Objective-C, C++ and
            C#. All four of them actually manage to hide almost all issues of heap use and heap
            management from you. Note that C is not on the list. C is not object-oriented, and C does
            has only a very
            simple interface to the heap. C can be used in an object-oriented manner by how you
            structure your code, and the heap interface of C (the malloc and free system calls) can be
            encapsulated in a higher layer abstraction in C, but using C in this manner is not for the
            beginner.

            Your realistic options are Java, Objective-C and C++. A major advantage that Java
            and Objective-C have over C++ is complete, built-in support for the Unicode character
            set, especially important for genealogical applications. C++ provides Unicode support
            in fairly ugly, add-on manner, so you can get Unicode in C++ but it takes a little work.
            I don't know enough about C# to know if Unicode is the native character format, but I
            would expect that it is.

            Though Java is theoretically an interpreted language, practically speaking this is not
            important. Java source code is translated into a virtual assembly language, which is then
            interpreted when the program runs. However, all modern Java runtimes will translate the
            virtual assembly language into the native machine code of the host computer before
            actually running the code. One of the more colorful terms in computing, JIT compilers
            grew out of this practice, JIT meaning "just in time".

            The issues of which programming language to use versus which database to use are
            orthogonal issues. Every major database system will provide software libraries that
            allow access to their databases from all major languages. Because Java and C are so
            popular basically all
            databases have Java and C interface libraries. And here's a little secret. Objective-C and
            C++ are supersets of C -- they both started their lives as simple front-ends to C that
            were first translated into pure C by a very simple macro-expansion process, and then
            compiled by the C compiler. Therefore it is easy to use C libraries that access databases
            from Objective-C and C++ programs. The point is, you don't have to make your
            programming language decision based on your database decision or vice versa.

            Your database decision comes down to, more or less, whether you are going to use one
            of the relational databases (free ones being mySQL and sqlite), or one of the more
            modern "no-SQL" databases like MongoDB.

            Relational databases are best when the data is very, very regular. Personally I do not think
            of genealogical data as being regular enough. However all major genealogical programs
            force their data into relational form. You have seen some of the effects of this when
            trying to express names, dates and places in non-conventional formats. It is hard if not
            impossible to do this reasonably. Because of this I have never used a relational database
            in the systems I write. My LifeLines program, written almost 25 years ago used a custom
            database that I wrote in which each record was, wait for it, wait for it, a GEDCOM syntax
            record. My database was an early example of the types of databases that are today
            called no-SQL databases. I think MongoDB is the best example of one of those today,
            and my future genealogical software will use MongoDB. The MongoDB people support
            a C library, which I use from Objective-C.

            The arguments for a relational database boil down to arguments about speed of querying
            and power of the querying language. Speed involves indexing, and powerful querying
            involves richness of the querying language. SQL is the query language invented for
            relational databases. One of the arguments for relational databases is that they allow for
            very powerful indexing and use of SQL. However these are not really as issue anymore. All
            of the no-SQL languages provide indexing just as powerful as that in relational databases,
            and they all provide querying that is as effective or even better than SQL style queries.

            Tom
          • Steve Hayes
            ... The way I understood it is that C and C++ allow (require) the programmer to manage memory, whereas in most of the others this is handled automatically by
            Message 5 of 7 , Jun 25, 2013
            • 0 Attachment
              On 24 Jun 2013 at 12:00, Tom wrote:

              > Just picking up on this thread a bit. Here's an interesting web page that
              > rates popularity of programming languages:
              >
              > http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
              >
              > Note C is at the top followed by Java, Objective-C, and C++. Objective-C and
              > C++ have recently swapped places. This is explained by the many developers who
              > are moving to the more lucrative Apple platforms (iPhone, iPad, Mac) where
              > Objective-C is effectively the native programming language. Number 4 is an
              > interpreted language, and number 5, C#, was Microsoft's attempt to usurp Java.
              >
              > A major characteristic of genealogical software is the need to have
              > persistence of objects in the programs. That is, you need to be able to create
              > a software object to represent some genealogical concept (e.g., person,
              > family) and you need that object to continue being alive within your program.
              > It has to have a lifetime beyond the individual software modules that create
              > them, or display them or compute with them. Objects like these are called heap
              > objects, meaning they exist in a largish, originally unstructured area of
              > computer memory. The heap is carved up into smaller units of memory, to hold
              > your objects, as the program proceeds. Because of this you need to use a
              > programming language that helps you manage the heap. The popular
              > "object-oriented" languages provide you with the support you need. These
              > languages are Java, Objective-C, C++ and C#. All four of them actually manage
              > to hide almost all issues of heap use and heap management from you. Note that
              > C is not on the list. C is not object-oriented, and C does has only a very
              > simple interface to the heap. C can be used in an object-oriented manner by
              > how you structure your code, and the heap interface of C (the malloc and free
              > system calls) can be encapsulated in a higher layer abstraction in C, but
              > using C in this manner is not for the beginner.

              The way I understood it is that C and C++ allow (require) the programmer to
              manage memory, whereas in most of the others this is handled automatically by
              the compiler.

              And isn't the kind of information you refer to as objects ultimately stird on
              disk in a database, called from there and stored there again once it has been
              interrogated or manipulated?

              > Your database decision comes down to, more or less, whether you are going to
              > use one of the relational databases (free ones being mySQL and sqlite), or one
              > of the more modern "no-SQL" databases like MongoDB.

              I've been using non-relational databases up till now for this purpose.

              > Relational databases are best when the data is very, very regular. Personally
              > I do not think of genealogical data as being regular enough. However all major
              > genealogical programs force their data into relational form. You have seen
              > some of the effects of this when trying to express names, dates and places in
              > non-conventional formats. It is hard if not impossible to do this reasonably.
              > Because of this I have never used a relational database in the systems I
              > write. My LifeLines program, written almost 25 years ago used a custom
              > database that I wrote in which each record was, wait for it, wait for it, a
              > GEDCOM syntax record. My database was an early example of the types of
              > databases that are today called no-SQL databases. I think MongoDB is the best
              > example of one of those today, and my future genealogical software will use
              > MongoDB. The MongoDB people support a C library, which I use from Objective-C.
              >
              > The arguments for a relational database boil down to arguments about speed of
              > querying and power of the querying language. Speed involves indexing, and
              > powerful querying involves richness of the querying language. SQL is the query
              > language invented for relational databases. One of the arguments for
              > relational databases is that they allow for very powerful indexing and use of
              > SQL. However these are not really as issue anymore. All of the no-SQL
              > languages provide indexing just as powerful as that in relational databases,
              > and they all provide querying that is as effective or even better than SQL
              > style queries.

              I find that the non-relational database I use now (InMagic) works fine for
              speed. The disadvantage, vis-a-vis relational databases, is redundant data.


              --
              Steve Hayes
              E-mail: shayes@...
              Blog: http://khanya.wordpress.com
              Phone: 083-342-3563 or 012-333-6727
              Fax: 086-548-2525
            • Tom
              ... You are right about C and C++. Java has always been a language where the compiler managed the heap for you (see note below). Objective-C has evolved. In
              Message 6 of 7 , Jun 25, 2013
              • 0 Attachment
                --- In gensoft@yahoogroups.com, "Steve Hayes" <hayesstw@...> wrote:
                >
                > On 24 Jun 2013 at 12:00, Tom wrote:
                > >
                > > A major characteristic of genealogical software is the need to have
                > > persistence of objects in the programs. That is, you need to be able to create
                > > a software object to represent some genealogical concept (e.g., person,
                > > family) and you need that object to continue being alive within your program.
                > > It has to have a lifetime beyond the individual software modules that create
                > > them, or display them or compute with them. Objects like these are called heap
                > > objects, meaning they exist in a largish, originally unstructured area of
                > > computer memory. The heap is carved up into smaller units of memory, to hold
                > > your objects, as the program proceeds. Because of this you need to use a
                > > programming language that helps you manage the heap. The popular
                > > "object-oriented" languages provide you with the support you need. These
                > > languages are Java, Objective-C, C++ and C#. All four of them actually manage
                > > to hide almost all issues of heap use and heap management from you. Note that
                > > C is not on the list. C is not object-oriented, and C does has only a very
                > > simple interface to the heap. C can be used in an object-oriented manner by
                > > how you structure your code, and the heap interface of C (the malloc and free
                > > system calls) can be encapsulated in a higher layer abstraction in C, but
                > > using C in this manner is not for the beginner.
                >
                > The way I understood it is that C and C++ allow (require) the programmer to
                > manage memory, whereas in most of the others this is handled automatically by
                > the compiler.
                >
                > And isn't the kind of information you refer to as objects ultimately stird on
                > disk in a database, called from there and stored there again once it has been
                > interrogated or manipulated?

                You are right about C and C++. Java has always been a language where the compiler
                managed the heap for you (see note below). Objective-C has evolved. In Objective-C
                you used to manage the heap using reference counting that you did by making
                calls to retain, release and autorelease. The latest version of Objective-C has a feature
                called ARC (automatic reference counting) which essentially makes Objective-C
                equivalent to Java in terms of heap management. Basically the compiler inserts all
                the right heap management calls at the right places. I have shifted over to using ARC
                in all my development and it is wonderful.

                The proviso (the note below) is that programmers can still be stupid and the
                compilers can't help that. Heap management means creating new objects when
                needed and returning objects when no longer needed. Smart compilers are smart by
                figuring out when an object will never be referred to again and then getting rid of it
                automatically. The compiler does this by inserting code that keeps track of how many
                times a heap object is referred to. When this drops to zero the object is removed.
                But, programmers can (and often do) write code in which objects are still referred to but
                will never be used. A classic situation occurs when one object refers to another, and
                that other object refers back to the first object, but no other references to either
                object exists. Most compilers are not smart enough to recognize this case and the
                two objects persist for the life of the program, essentially as leaked memory. There
                are "garbage collection" algorithms that can find these leaks, but they are expensive
                to run and usually cause your programs to suddenly pause. Good monitoring tools
                used during development can find these problems for you.

                Tom
              • Tom
                ... Forgot to respond to the above. Yes, most objects of interest in a genealogical program will be stored in a database. Issues boil down to the format of the
                Message 7 of 7 , Jun 25, 2013
                • 0 Attachment
                  > And isn't the kind of information you refer to as objects ultimately stird on
                  > disk in a database, called from there and stored there again once it has been
                  > interrogated or manipulated?

                  Forgot to respond to the above. Yes, most objects of interest in a genealogical program
                  will be stored in a database. Issues boil down to the format of the data in a persistent
                  database versus the format of an object in a running computer program. When going
                  in either direction a transformation must occur. In a relational database, the on-disk
                  format are all in "tables" and there may be many tables involved in storing the information
                  about a single person (the names will be in one table, the birth info in another, the source
                  references
                  in another, and so on and so on and so on). To bring a person into a program's memory
                  so it can be computed with, database access code must be written to read all those
                  tables and to construct an internal objects out of the information found in all those tables.

                  In most non-sql databases, the objects are not stored in tables but in structures that
                  can exactly mimic the structure that the objects should have when being processed
                  in a program. Moving objects to and from one of these databases is trivial as no
                  transformations are required. This is definitely the trend into the future.

                  Tom
                Your message has been successfully submitted and would be delivered to recipients shortly.