Viewing 20 posts - 1 through 20 (of 134 total)
  • Author
    Posts
  • #26641
    TipponTippon
    Participant
      @tippon
      Forumite Points: 0

      I’m thinking of learning to program, first to try to convert a WordPress website to an app, then seeing how I go. Python and Java seem to be the languages I’d need, and I’m wondering if anyone thinks these books would be any good:

      https://www.humblebundle.com/books/head-first-books

      It would also be nice to learn HTML and CSS properly, and that’s about where I get stuck.

      I like the idea of being able to program, and eventually teaching my daughter, or learning with her, but at the moment I have no idea what I’d want to actually write other than the example above. Would these books give me a general base to learn other languages from, or would they just help with the languages in the selected books?

      Thanks in advance 🙂

       

      #26656
      Ed PEd P
      Participant
        @edps
        Forumite Points: 39

        My advice would be that your ideas are good but too ambitious. Learn  the basics using one of the many free resources. e.g. CodeAcademy, or this one.

        I personally prefer to write simple games to start out as this gives me the most gratification.

        #26657
        RichardRichard
        Participant
          @sawboman
          Forumite Points: 16

          I suspect that Ed’s suggestions are very good. I started back in the early 1980s so my experience of any detail is irrelevant though the basics are vital and those two suggestions did appear to lay them out very clearly. Think clearly, plan logically and break the task into small manageable parts. The first thing I ever did was reprogram a multi position training simulator at work, we only had it set up for 6 trainees plus and instructor but it had the capability of dealing with 32 trainees. I guess it was a bit similar to a game in some ways. It was written in assembler and we only had a 6byte window through which to access the programming code, so write it out long hand, enter 6 up to bytes, save and if you though that was the right point, then test the steps. Boy did I learn to save little and very often! Along the way I had to write some test routines to map out previously unused functions – we had changed the main machine’s method of use during contract negotiations. The simulator was delivered RFS to start training staff in advance of the new system going live and that was before the changes were made. We did not have the budget to pay for new training programs…

          Do chose an achievable target for your first steps and something that will give you good payback, or ‘early gratification’. I still get a buzz from my early efforts, I am sure ED does from memories of his successes and overcoming the failures through bugs. One routine was called 39 times but on the 40th it fell over, it took a while to find the error – a variable was longer than the space allocated. Easily corrected but initially the devil to find. For me that was the ‘game’ element. Remember, my tools were very crude with no programmer’s access just a 6 contiguous byte window to poke data into – though I even taught the manufacturer’s staff some short cuts when finally synchronising the programs to the audio visuals.

          #26666
          Wheels-Of-FireWheels-Of-Fire
          Participant
            @grahamdearsley
            Forumite Points: 4

            I am still learning how to write my first Windows game in C++. I know enough C for the program logic but I still mess up when it comes to making Windows User and GDI calls to setup and write to a window.

            The game is going to be a version of snake. I already wrote the game in Atari BASIC some years ago and it uses a string as a shift register to keep track of the tail so the end of it can be deleted as the snake moves forward. I can use an int array in C to do the same thing.

            #26684
            TipponTippon
            Participant
              @tippon
              Forumite Points: 0

              Thanks for the replies guys 🙂

              I should clarify – I’m not expecting to pick up a book and then write an app in a few days 😀 I’m ideally hoping to get an app running by this time next year, but that’s the ‘ideal’ goal if everything goes perfectly. I know that there’s a good chance it will take a lot longer than that. The REST API apparently makes it comparatively very easy, and even I understand some of the words in the documentation 😉

              Those links look great Ed, thanks 🙂 I’ve read a few threads in the Codecademy forum, and they recommend HTML and CSS for beginners first. Would you say the same, or is Python different enough that it would confuse matters? I eventually want to learn all three, so does it matter which order I learn them in?

              Thanks again 🙂

              #26698
              Ed PEd P
              Participant
                @edps
                Forumite Points: 39

                A lot of Python applications are based on using on-line information. In order to do this efficiently you need some knowledge of html/css. For example I use a Python library program called Beautiful Soup to strip out web site data fields, I could not do this without knowing some html, other apps go for sql based data but again you need to have an entry point.

                However if you wanted to write a ‘pretty interface then you would use the tkinter library. Python can be dauntingly huge, and some of the on-line help is nit-picking in its approach to noobs.  Stackoverflow can be really pissy and unhelpful. The wiki however is pretty good.

                #26713
                Wheels-Of-FireWheels-Of-Fire
                Participant
                  @grahamdearsley
                  Forumite Points: 4

                  Do you have any programming experience Tippon ? Anything will do but if you don’t you should get to grips with Variables, Loops and conditional branches like the If then do stuff. You can’t write an app without them.

                  #26715
                  TipponTippon
                  Participant
                    @tippon
                    Forumite Points: 0

                    Thanks again guys 🙂

                    A lot of Python applications are based on using on-line information. In order to do this efficiently you need some knowledge of html/css.

                    I may get those books then. I manage a WordPress site for a music festival, so the html / css would be helpful anyway.

                    Stackoverflow can be really pissy and unhelpful

                    Oh yes! I’ve learned that just from random web searches for help. Probably 90%+ of the questions I’ve seen asked there have been closed by a mod essentially saying that they shouldn’t be asking for help with something basic ?

                    Do you have any programming experience Tippon ? Anything will do but if you don’t you should get to grips with Variables, Loops and conditional branches like the If then do stuff. You can’t write an app without them.

                    Not for about 20 years, and that was first year college. I vaguely remember some of the very basics, but that’s about it. Just to check, a variable is something that can change, rather than a constant like Pi, a loop loops 😉 , and a conditional branch checks the state of something (a variable?) and performs an action based on the result? If I wrote something like

                    If total 5
                    Then finish
                    Else add 1
                    Goto start

                    total would be the variable, if, then, else would be the conditional branch, and returning to the start makes it a loop? Apologies to those of you who I made cry with the butchered attempt at remembering scraps of languages and stitching them together 😛

                     

                    #26716
                    TipponTippon
                    Participant
                      @tippon
                      Forumite Points: 0

                      Apologies for the double post, but I didn’t want to confuse my replies above.

                      I’ve just remembered that I’ve got some of the Robin Nixon ebooks from a few years ago (2011>). I think it was Ed who found them over on MM. They’re the HTML5, CSS, Javascript, and PHP crash courses. I’ve also got a Dummies book (2013?). It’s a 7 in 1 book on Web technologies, html and css, Javascript, PHP, MySQL, Web applications, PHP and templates.

                      Are they likely to still be in date, or are they too old now?

                      #26730
                      Wheels-Of-FireWheels-Of-Fire
                      Participant
                        @grahamdearsley
                        Forumite Points: 4

                        Yep is more or less the way things work but if you use a goto some perfectionist idealist will tell you off ?

                        #26731
                        Wheels-Of-FireWheels-Of-Fire
                        Participant
                          @grahamdearsley
                          Forumite Points: 4

                          I think i will post the Atari BASIC code for Snake if I can find it. It has comments so see if you can pick the logic out of it ?

                          Old style BASIC but I know it like the back of my hand so I still use it to prototype my ideas.

                          #26744
                          TipponTippon
                          Participant
                            @tippon
                            Forumite Points: 0

                            Goto was the bane of our teacher’s lives in school. We were all using BBC Micros and Acorns, and they ran Basic. Within the first few weeks of form one (year 7 for the youngsters 😉 ) we’d all learned

                            10 print (naughty word here)
                            20 goto 10
                            run

                            😀

                            #26758
                            Dave RiceDave Rice
                            Participant
                              @ricedg
                              Forumite Points: 7

                              Goto = spaghetti code, never stopped me though ?

                              I did all my stuff in Atari Basic with some assembly code that ran in Page 6 – W-o-F will know what I mean. You could do stuff with Atari Basic, especially with strings, that you couldn’t with others. IIRC it was written by Microsoft.

                              #26800
                              Wheels-Of-FireWheels-Of-Fire
                              Participant
                                @grahamdearsley
                                Forumite Points: 4

                                Well Atari asked Microsoft to wright a version of BASIC for them but they couldn’t make it fit on an 8k cartridge in time for the 1979 launch. So they went to the people who wrote Atari DOS. Open Systems Software i think. Atari were the second largest company in the US at the time so Microsoft didnt give up. You could buy Microsoft BASIC 1 and 2 later.

                                 

                                #26801
                                Wheels-Of-FireWheels-Of-Fire
                                Participant
                                  @grahamdearsley
                                  Forumite Points: 4

                                  Oh yes page 6 ! 256 Bytes of memory you could  put your USR code in. Neither BASIC or the OS would touch it. I put my display list interupts there too.

                                  #26802
                                  Wheels-Of-FireWheels-Of-Fire
                                  Participant
                                    @grahamdearsley
                                    Forumite Points: 4

                                    And talking of Atari BASIC strings. I still cant find my snake program but the trick bit is A$=A$(2). It shifts the whole string left 2 places at near machine code speed.

                                    #26803
                                    Wheels-Of-FireWheels-Of-Fire
                                    Participant
                                      @grahamdearsley
                                      Forumite Points: 4

                                      Two place’s because it holds the x and y position of the snakes tail ?

                                      #26804
                                      Wheels-Of-FireWheels-Of-Fire
                                      Participant
                                        @grahamdearsley
                                        Forumite Points: 4

                                        I found a good use for GOTO to make an ELSE.

                                        10 if A=1 then B=2:goto 30

                                        20 B=1

                                        30 dont do the goto if A isnt 1

                                         

                                        #26818
                                        Ed PEd P
                                        Participant
                                          @edps
                                          Forumite Points: 39

                                          At machine code level you are pretty much forced to use a pseudo-goto for a lot of your code as branch instructions need somewhere to go. The purist approach to removing goto in higher level languages can be done but subroutines etc are a lot harder to program and require stack manipulation. Assembler just conceals all these compilation level nasties!

                                          When you are using peeks/pokes/push/pop etc in Basic you are actually very close to machine code level.

                                          #26923
                                          Wheels-Of-FireWheels-Of-Fire
                                          Participant
                                            @grahamdearsley
                                            Forumite Points: 4

                                            Its been years since I did this but when I first started writing machine code routines I had to compile them by hand as I didn’t have an assembler. I used the tables in the back of the book “Programming The 6502” by Rodney Zacks to look up the opcodes. The biggest pain was the different instruction addressing modes such as Absolute, Relative or indexed as they all had different opcodes. When I finally got hold of an assembler, branching or jumping to a label was sheer luxury !

                                          Viewing 20 posts - 1 through 20 (of 134 total)
                                          • You must be logged in to reply to this topic.