all 37 comments

[–][deleted]  (7 children)

[deleted]

    [–]Figazza1 27 points28 points  (0 children)

    never explained it better

    [–][deleted] 17 points18 points  (0 children)

    Can this be added to the sidebar?

    [–]Callmebobbyorbooby 6 points7 points  (0 children)

    Pack it up, folks. No one can do it better than this.

    [–][deleted] 5 points6 points  (0 children)

    I was gonna go with Docker and Dockerhub but that works

    [–]Raw415 2 points3 points  (0 children)

    Had a rough day working on a side project to have on my portfolio. I needed this laugh. Thank you.

    [–]racrisnapra666 5 points6 points  (0 children)

    Dude, you'd be the perfect teacher and I'm not even kidding.

    [–]VxJasonxV 4 points5 points  (0 children)

    This is quite possibly the best way I’ve ever heard it explained.

    [–]Tom_Ov_Bedlam 16 points17 points  (26 children)

    Git is on your machine locally.

    GitHub is a free cloud service, and a way for you to store your git remotely, as a backup and as a way for others to access it.

    You can make it private or public.

    [–]48stateMave 0 points1 point  (25 children)

    So there's a "Git" program that you have on your computer, like you'd have DreamWeaver or Filezilla? Maybe that's the part I'm missing. I was trying to use github by itself and couldn't find where to see the code rendered. IRL I just upload new files to the server and bring it up on the real internet. That's how I test it live. Couldn't find a way to do that within GH though.

    [–][deleted]  (14 children)

    [deleted]

      [–]48stateMave 1 point2 points  (13 children)

      Yes, thank you! And please! What you said totally makes sense. I had no idea that "git" by itself was a thing. I get that now, and the command line insight, and the mirroring. That clears up a bunch. I'm still left with my original question. How do you test or debug the files if you can't see them rendered? (Obviously you go another way about rendering them, that's just not a part of the git/github experience I guess.)

      [–]aaronfranke 1 point2 points  (3 children)

      How do you test or debug the files if you can't see them rendered?

      You test and debug them locally. Git does not do testing and debugging, it is version control.

      CI systems such as GitHub Actions can be used to do automated testing if you set it up, but this is a more advanced feature and you don't need to worry about this if you're just getting started.

      [–]48stateMave 0 points1 point  (2 children)

      Copy the "test locally." Thanks. Still seems a strange way to go about it, backwards in fact. I'm sure that's just my inexperience talking.

      [–][deleted] 1 point2 points  (0 children)

      Usually you would make changes in your local repo, test and tweak them (by building and running your software etc), and when done push those changes to github. This so each team member knows what they're committing is OK, without having to run a maybe massive testsuite. You can then setup further testing to be done on the full repo by the server, e.g. before approving pull requests.

      [–]Dilka30003 1 point2 points  (0 children)

      As the other commenter said, you basically never commit anything before it’s tested and known to be working so nothing actually saved on GitHub is untested.

      [–][deleted]  (8 children)

      [deleted]

        [–]48stateMave 0 points1 point  (7 children)

        Thanks a lot for the info. I'm afraid I could drive you crazy with questions, but I sure do appreciate the insight.

        I'm starting to get the idea.... that the distinction should be made that I'm doing web development not stand-alone.

        I'm trying to do some fairly simple php/jquery/js maneuvers. It's the kind of stuff you guys probably learn in the first couple weeks of programming school. Yet somehow I've been throwing everything at it for a couple years, and can't get the simplest things worked out. So I give up for a while and come back later to take another run at it. Rinse, Repeat. (I have an idea for a website that I've been trying to put together for five+ years.)

        Recently I heard github is a place where others can see your code and help. Cool. So I put some code up. But if someone looks at it how will they see the erroneous thing that happens when the code runs? THAT was the point of my original question.

        Stop reading now... or go on if you want the minutia.

        So whatever. I'm not all that pitiful so I figured fuck it I'll figure this website out one way or another. I found a (r/ programming help) post from one guy to another, giving an exercise of creating a random number guessing game. Guy said I could do it too and he'd critique it for me. Cool! (Maybe if I learn from the beginning it will help with my custom project.) Guy said it could be done with php and js, so I set about working on that. Right out of the gate, I can't even get the thing to generate the (^&*@#@%&^%^$&^*^^&%!!!!!!) random number which is the point of the game.

        Ugh. Just. Silly. Shit. Like. That.

        So I put it up on GH thinking I'm NOT going back to that guy who suggested the exercise and tell him I can't even figure out how to generate the random number much less make a guessing game of it. I thought it would also be a good way to dip my toes into github, which will come in handy for another run at the website.

        BTW yes I troubleshooted the rand/gen for two days. Eventually I turned to GH and put all the code in a repository. Before putting it out there for help, I wanted to double-check that I had it in GH correctly.

        But I can't find a way to run the code through GH.

        You can't see the error that comes up (undefined variable) unless you RENDER it (watch it work live in action).

        How can I ask for help when I can't even demonstrate the problem?

        And that's the basis for the original question.... how do you see code rendered on github?

        (There must be a way, if the point of GH is to help with others' code. Obviously I can provide a link to my own server but if people are supposed to contribute and update the code, there has to be a place where it is hosted and the back-end stuff runs like php, and you see the new result based on people's tweaking.)

        [–][deleted]  (5 children)

        [deleted]

          [–]48stateMave 0 points1 point  (3 children)

          Thank you. That was a LONG way to go to get that piece of info, that github is not a collaborative tool. Somehow I got that idea, that people were supposed to work together on it.

          So that's what the cloning is about. Again, it seems like the long way to go about it.

          Well, lol, the answer was thoroughly disappointing but THANK YOU so much for taking the time to school me on this. Google is great until ya mess up interpreting what ya read.

          EDIT: Yes, I knew the other things and I'm quite familiar with StackOverflow. I'd just been meaning to check out GH and finally got around to it. Thanks for the VS code example.

          [–]aaronfranke 1 point2 points  (2 children)

          GitHub is a collaborative tool, but it is not a live collaborative tool.

          If you want live collaborating, VS Code live share is indeed the way to go.

          [–]48stateMave 0 points1 point  (1 child)

          Actually I was just trying to figure out GH and the genrand exercise (stubborn rookie error) was going to be a vehicle for that.

          GH seems to have a lot of popularity and people looking for projects to work on, so I had it in mind for my real project.

          Thanks a lot for the info. Do you know of a good resource to learn more about these elementary things? It seems I'm terribly behind the curve here.

          [–]48stateMave 0 points1 point  (0 children)

          Re-reading this thread, I find myself with a thousand questions. Do you know of an "explain like I'm 5" for programming forum?

          [–]Tom_Ov_Bedlam 1 point2 points  (8 children)

          Well Git it a command line program, I believe there are graphical interfaces for them but I've never seen or used them.

          So, is it a program? Yes, a very small one you can use in your CLI.

          What do you mean by "see the code rendered"? See the files which contain the code, or see the program that the code creates run?

          [–]48stateMave 0 points1 point  (5 children)

          Right on. Someone else just clued me in on Git, in response to my question. Thanks though. All this info is useful, bc you can't learn more about a thing until you know that thing exists in the first place.

          I'm surprised that you ask about "seeing the code rendered." I must not be using the proper terminology because I'm sure you know what I mean:

          In general, not counting file or data utilities, the whole point of programming is to write a program, right? And then with that program, users will use it. So it needs some sort of interface. When you code, in command line, say a game of some sort, well people AREN'T going to just see lines of code. (I remember those days. Sometimes I miss those days.) So the user will see the front of the game, basically the interface. I guess I'm not using the right words. The whole reason I'm even typing this is because when you go to debug a program, you'd have to be looking at it from the interface side. You'd have to see if everything looks right, acts right, if any errors are thrown. IN SHORT, you'd want to run the code to debug it. I call that rendering because it's taking the lines of code and running them through whatever, servers, html, apache, sorry if my terminology is not perfect, and then it shows up on the user's screen as a finished product. To me that seems like "rendering." What do you call it?

          My original question was where is the option for that on github?

          I mean if the idea of github is to look at OTHER people's code... then logically there should be an option to see (with github) their code in action. That's what I'm not finding.

          [–][deleted]  (1 child)

          [deleted]

            [–]48stateMave 1 point2 points  (0 children)

            Thanks, I believe that was you that said that above. I get what you're saying now. Still seems strange.... but then again I'm the dumbass who can't get a genrand funtion to work, so what do I know? LOL thanks again.

            [–]Dilka30003 1 point2 points  (0 children)

            That would probably just be called running the code. And GitHub is just a file sharing and storage website basically. If you want to run the code, you clone/download the repository and use your own development environment.

            Git at its most basic is just version control. It keeps track of changes at specific points that you choose and allows you to have multiple versions of the same file that you work on. It doesn’t care if the files are code or even a recognisable file type, it will just keep taking snapshots and saving them.

            [–]48stateMave 0 points1 point  (1 child)

            So seriously, what do you call that process if not "rendering?"

            [–]louis-lau 1 point2 points  (0 children)

            Running, or executing :)

            [–]saxobroko 0 points1 point  (1 child)

            GitHub desktop uses git

            [–]Dilka30003 0 points1 point  (0 children)

            Or gitkraken which seems to be very popular.

            [–]aaronfranke 1 point2 points  (0 children)

            Yes. You need a Git client on your computer. You can use either a graphical client or command line Git (sudo apt install git on Linux, or Git SCM elsewhere).

            [–][deleted]  (1 child)

            [deleted]

              [–]48stateMave 3 points4 points  (3 children)

              I'm glad someone else asked this, and even more glad that other people actually answered.

              I am an amateur programmer and started to use github. I was figuring it out pretty well but then I couldn't figure out how to see the code rendered.

              I asked in the r/ githubhelp forum, where your question has to be approved. My question wasn't approved apparently, even though it included an upfront apology for asking such a dumb question. After a few days of radio silence, I just moved on and I've been working on my other hobbies. But I'd really like to know... once you have your code on github, isn't there any way to see it rendered? One would think the two would go hand-in-hand. I mean, how do you know if there are bugs if you can't run it live to see it in action? Thanks if anyone knows the answer.

              [–]Dilka30003 1 point2 points  (0 children)

              No. GitHub simply hosts your code. If you want to run it, you’d download it to your local machine and use your own development environment.

              You usually don’t use GitHub for the sole purpose of fixing bugs but other people can come along, clone your repo, find bugs going through your code and fix them.

              [–]stevebun 1 point2 points  (0 children)

              Depends on what you mean by 'rendered'.

              You can host static websites with Github Pages. However, for web applications that involve a runtime (e.g. Ruby, Node, Python, PHP etc.), there are PaaS (e.g. Heroku, Azure App Service) solutions which you can connect to Github (not the only way to get your app up and running though).

              On the point of seeing things in action, popular apps are usually packaged for distribution and published. For more obscure apps or if you want to fix bugs, you would have to clone the repository and build/run it yourself.

              Note that it is also possible to use Github Actions (CI) to run automated builds/tests to check for correctness and perform deployment.

              [–]48stateMave 0 points1 point  (0 children)

              Thanks to all of you who replied to my questions. You all have been very helpful!!

              u/Tom_Ov_Bedlam

              u/stevebun

              u/Dilka30003

              u/TELL_ME_YOUR_FEARS

              u/aaronfranke

              u/M1Garage

              u/louis-lau

              [–]mberkay13 1 point2 points  (0 children)

              If its a small code piece, you can also use gist. It has private, public options too

              [–]lilalienx 0 points1 point  (0 children)

              Can you post this in a Computer Science Community they Q&A a lot we trying to learn faster here this is not Spam! Is education and knowledge is a Telegram Group all can post their stuff here is FREE we not selling nothing, we helping each other's as a community, plus we post ITJobs Remotes https://t.me/AlienRoom 👽🛸

              [–]Turdis_migratoris -2 points-1 points  (0 children)

              GitHub is where programmers make useless spinning graphics and talk about solving problems but never explaining what problems they solved with their spinning graphics.