ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Dipping Toes Into Programming

    Developer Discussion
    16
    142
    18.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller @Obsolesce
      last edited by

      @tim_g said in Dipping Toes Into Programming:

      @scottalanmiller said in Dipping Toes Into Programming:

      Then things like Erlang or Java might have small numbers of deployments, but they tend to be things like big financial transaction systems or whatever. Things that aren't deployed very often, but are really significant on a "per deployment" model.

      Yeah, I don't ever plan on doing anything with those in regards to programming.

      I'm going to stick to what I can see myself using or what will be the most useful to me.

      It's a short list:

      • PHP
        • This will teach me how to program, the concepts, etc... Basically, my gateway language.
        • will also be useful on the side for personal use, and some professional use
      • Python
        • This is the big one that will be the most useful professionally, to my career, plus some personal use.
      • JavaScript
        • This goes hand in hand with the web development side of things.

      Basically, Python is the main one I want to learn, but I am starting with PHP because it's much easier than Python to use as a gateway programming language. I can get further faster with learning how to program with PHP than with Python. But I also want to learn PHP anyways, which will immediately be useful for a bunch of things personally and professionally... so I see it as a win anyways, followed by Python. Then JavaScript, because that can do great things in the browser as well as on the server. It works well with the others and shouldn't be passed by in this day and age.

      Although others in those lists like Go and RoR (others too, just picking on those) are probably "better" languages in some important areas, I just won't really use them with anything I have... so I don't see a point. Nothing I currently have uses those, and nothing I plan on doing uses those either. If I could find uses for them, I'd just rather use Python anyways.

      Just in case it’s not clear.... RoR is actually Ruby as the language and Rails as the framework (like Django). They are so often used together that it’s often thought that they are one thing.

      1 Reply Last reply Reply Quote 0
      • ObsolesceO
        Obsolesce
        last edited by

        I was playing around with the concept of using PHP and forms to do things with PowerShell (given a Windows Server is running a web server with PHP such as XAMPP).

        Lots of potential there.

        I can get form data processed by powershell and outputted to a web page.

        I didn't do much last night, but I was able to output PING results to the web page, and when I was finished for the night, I put in code so when I refreshed the web page, it shut down my computer.

        I'm thinking I could potentially create an internal web app to control anything via PowerShell by use of forms... such as adding a user to AD to running reports. (of course secured and login required)

        scottalanmillerS 1 Reply Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller @Obsolesce
          last edited by

          @tim_g said in Dipping Toes Into Programming:

          I was playing around with the concept of using PHP and forms to do things with PowerShell (given a Windows Server is running a web server with PHP such as XAMPP).

          Lots of potential there.

          I can get form data processed by powershell and outputted to a web page.

          I didn't do much last night, but I was able to output PING results to the web page, and when I was finished for the night, I put in code so when I refreshed the web page, it shut down my computer.

          I'm thinking I could potentially create an internal web app to control anything via PowerShell by use of forms... such as adding a user to AD to running reports. (of course secured and login required)

          So basically recreating Honolulu?

          ObsolesceO 1 Reply Last reply Reply Quote 0
          • ObsolesceO
            Obsolesce @scottalanmiller
            last edited by

            @scottalanmiller said in Dipping Toes Into Programming:

            @tim_g said in Dipping Toes Into Programming:

            I was playing around with the concept of using PHP and forms to do things with PowerShell (given a Windows Server is running a web server with PHP such as XAMPP).

            Lots of potential there.

            I can get form data processed by powershell and outputted to a web page.

            I didn't do much last night, but I was able to output PING results to the web page, and when I was finished for the night, I put in code so when I refreshed the web page, it shut down my computer.

            I'm thinking I could potentially create an internal web app to control anything via PowerShell by use of forms... such as adding a user to AD to running reports. (of course secured and login required)

            So basically recreating Honolulu?

            If that's how it work, I haven't looked... then yes.

            Except this would be a learning tool for me as I'm going through my PHP book, where I implement things as I learn them.
            That's what I'm doing now with this other PHP web application.

            F 1 Reply Last reply Reply Quote 2
            • F
              flaxking @Obsolesce
              last edited by

              @tim_g said in Dipping Toes Into Programming:

              @scottalanmiller said in Dipping Toes Into Programming:

              @tim_g said in Dipping Toes Into Programming:

              I was playing around with the concept of using PHP and forms to do things with PowerShell (given a Windows Server is running a web server with PHP such as XAMPP).

              Lots of potential there.

              I can get form data processed by powershell and outputted to a web page.

              I didn't do much last night, but I was able to output PING results to the web page, and when I was finished for the night, I put in code so when I refreshed the web page, it shut down my computer.

              I'm thinking I could potentially create an internal web app to control anything via PowerShell by use of forms... such as adding a user to AD to running reports. (of course secured and login required)

              So basically recreating Honolulu?

              If that's how it work, I haven't looked... then yes.

              Except this would be a learning tool for me as I'm going through my PHP book, where I implement things as I learn them.
              That's what I'm doing now with this other PHP web application.

              Applying what you're learning to something you already know - it's a good learning strategy

              1 Reply Last reply Reply Quote 0
              • D
                dave_c
                last edited by

                I am not sure I would recommend PHP as a first language; perhaps PHP 7 leveraging Laravel or something structured. Mainstream PHP programmers used to have many bad habits. PHP 7 has good object support and I do not dislike it that much.
                Python is very good for a first language.
                I am more of a backend programmer and for that I like Go; it is a small language with very good concurrency.
                For front end I like https://vuejs.org/ more than React

                By the way, the python paradox is a good read: http://www.paulgraham.com/pypar.html

                scottalanmillerS 1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller @dave_c
                  last edited by

                  @dave_c said in Dipping Toes Into Programming:

                  Mainstream PHP programmers used to have many bad habits.

                  That won't affect the learner, though. Learn from a good source, and PHP won't be in the way at all. PHP itself doesn't encourage bad habits, that was just a culture of people using it as non-programmers.

                  D 1 Reply Last reply Reply Quote 1
                  • D
                    dave_c @scottalanmiller
                    last edited by

                    @scottalanmiller
                    Oh, yes: Learn from a good source.
                    PHP "was" badly designed. PHP 7 has more sanity. Quoting someone on the internet: "Languages like Python or Ruby were designed, PHP just happened"

                    ObsolesceO 1 Reply Last reply Reply Quote 1
                    • ObsolesceO
                      Obsolesce @dave_c
                      last edited by

                      @dave_c said in Dipping Toes Into Programming:

                      @scottalanmiller
                      Oh, yes: Learn from a good source.
                      PHP "was" badly designed. PHP 7 has more sanity. Quoting someone on the internet: "Languages like Python or Ruby were designed, PHP just happened"

                      PHP is reminds me a lot of Powershell scripting. I'm running into so many similarities.

                      dafyreD scottalanmillerS 2 Replies Last reply Reply Quote 0
                      • ObsolesceO
                        Obsolesce
                        last edited by

                        I do plan on learning Python as well, but PHP is easier for me to learn programming.

                        1 Reply Last reply Reply Quote 0
                        • dafyreD
                          dafyre @Obsolesce
                          last edited by

                          @tim_g said in Dipping Toes Into Programming:

                          @dave_c said in Dipping Toes Into Programming:

                          @scottalanmiller
                          Oh, yes: Learn from a good source.
                          PHP "was" badly designed. PHP 7 has more sanity. Quoting someone on the internet: "Languages like Python or Ruby were designed, PHP just happened"

                          PHP is reminds me a lot of Powershell scripting. I'm running into so many similarities.

                          No kidding. It has been a while since I've done anything in PHP and I had an idea to tinker with tonight... I keep shooting myself in the foot trying to use PowerShell syntax for stuff.

                          F 1 Reply Last reply Reply Quote 1
                          • scottalanmillerS
                            scottalanmiller @Obsolesce
                            last edited by

                            @tim_g said in Dipping Toes Into Programming:

                            @dave_c said in Dipping Toes Into Programming:

                            @scottalanmiller
                            Oh, yes: Learn from a good source.
                            PHP "was" badly designed. PHP 7 has more sanity. Quoting someone on the internet: "Languages like Python or Ruby were designed, PHP just happened"

                            PHP is reminds me a lot of Powershell scripting. I'm running into so many similarities.

                            Oh gosh I hope not.

                            ObsolesceO 1 Reply Last reply Reply Quote 0
                            • F
                              flaxking @dafyre
                              last edited by

                              @dafyre said in Dipping Toes Into Programming:

                              I keep shooting myself in the foot trying to use PowerShell syntax for stuff.

                              I feel like that problem just gets worse before it gets better (does it ever get better?)

                              1 Reply Last reply Reply Quote 0
                              • ObsolesceO
                                Obsolesce @scottalanmiller
                                last edited by

                                @scottalanmiller said in Dipping Toes Into Programming:

                                @tim_g said in Dipping Toes Into Programming:

                                @dave_c said in Dipping Toes Into Programming:

                                @scottalanmiller
                                Oh, yes: Learn from a good source.
                                PHP "was" badly designed. PHP 7 has more sanity. Quoting someone on the internet: "Languages like Python or Ruby were designed, PHP just happened"

                                PHP is reminds me a lot of Powershell scripting. I'm running into so many similarities.

                                Oh gosh I hope not.

                                I'm not talking about the cmdlets and stuff. I mean the scripting parts... programming logic, loops, arrays and such... those areas.

                                1 Reply Last reply Reply Quote 0
                                • scottalanmillerS
                                  scottalanmiller
                                  last edited by

                                  You're probably just seeing the underlying paradigm of procedural programming.

                                  ObsolesceO 1 Reply Last reply Reply Quote 5
                                  • ObsolesceO
                                    Obsolesce @scottalanmiller
                                    last edited by

                                    @scottalanmiller said in Dipping Toes Into Programming:

                                    You're probably just seeing the underlying paradigm of procedural programming.

                                    Yeah hats probably the case.

                                    1 Reply Last reply Reply Quote 0
                                    • scottalanmillerS
                                      scottalanmiller
                                      last edited by

                                      https://medium.freecodecamp.org/every-time-you-build-a-to-do-list-app-a-puppy-dies-505b54637a5d

                                      ObsolesceO 1 Reply Last reply Reply Quote 0
                                      • ObsolesceO
                                        Obsolesce @scottalanmiller
                                        last edited by

                                        @scottalanmiller said in Dipping Toes Into Programming:

                                        https://medium.freecodecamp.org/every-time-you-build-a-to-do-list-app-a-puppy-dies-505b54637a5d

                                        My first project that I'm almost finished with is a nutrition calculator for my protein bar recipe.

                                        That basically covers the first two chapters and a little into 3.

                                        Though, there's about 65 form fields to handle, so it's quite big without me knowing how to handle all those fields, especially due to them initially being generated automatically by like 4 lines of PHP.

                                        I'll link it after it's finished, it's quite nice for it's purpose.

                                        1 Reply Last reply Reply Quote 1
                                        • scottalanmillerS
                                          scottalanmiller
                                          last edited by

                                          Cool

                                          ObsolesceO 1 Reply Last reply Reply Quote 0
                                          • ObsolesceO
                                            Obsolesce @scottalanmiller
                                            last edited by Obsolesce

                                            @scottalanmiller said in Dipping Toes Into Programming:

                                            Cool

                                            I'm pretty close to being done with my first project to drive home chapters 1 and 2 of the book (plus what I learned on SoloLearn).

                                            Edit: It takes advantage of HTML5 and PHP7+ only features 🙂

                                            Here's the results so far:

                                            First Screenshot:
                                            This is the default page, and all of this is automatically generated and filled in with just a few lines of PHP, and allows you to adjust as needed before submitting how much one bar weighs.
                                            0_1521777918836_1a32ad09-6e8c-4607-ab94-64bc999ea572-image.png

                                            Second Screenshot:
                                            This shows the results of everything from the first screenshot.
                                            0_1521778015722_6b1eb8c1-e107-4714-896e-f4990f62f279-image.png

                                            I know I need to work on formatting and prettyness a bit, but my main goal was first functionality.

                                            I also have error handling, and defaulting to ZERO:
                                            0_1521778124030_82deadb9-3fa6-4640-b366-c82ccfbdb8a4-image.png

                                            As well as injection prevention, null setting before any handling, and strict checking:
                                            0_1521778245010_da8aa7b1-7d55-45d0-a3cd-f0f6e394682d-image.png

                                            A snippet of just the $grams variable (but applies to everything):
                                            0_1521778343606_419b4e5a-e65b-401b-97aa-b80a3aaa397a-image.png
                                            (that's an old comment to myself that I haven't removed yet)

                                            JaredBuschJ 1 Reply Last reply Reply Quote 3
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 8
                                            • 6 / 8
                                            • First post
                                              Last post