• N_Crow
    link
    fedilink
    English
    arrow-up
    37
    ·
    9 months ago

    Alright, smart guys. I know how to code. How do I make these variables into a an app?

    Honestly I’ve been trying to learn coding for a while, and there’s a huge chasm between knowing a language and doing something with it that I can’t go over. I want to make an app to create ttrpg character sheets… Alright how do I make my code into something with an UI? How do I turn it into an executable? How do I turn these lines into SOMETHING?

    • AggressivelyPassive@feddit.de
      link
      fedilink
      arrow-up
      39
      ·
      9 months ago

      As stupid as it sounds, you build small blocks and put them together.

      In your case, build a console app, that (for example) creates basic sheets. Then you build a small text only interface to plug actual values into the file, then you can think about a GUI.

      Many beginners (myself included) want to go from 1 to 100 immediately, but that’s almost impossible. You tackle small problems first and then step by step go further.

      You may have heard of startups building MVPs, minimum viable products. The basic core of what functionality you want to have. That’s where you start.

    • Asafum@feddit.nl
      link
      fedilink
      arrow-up
      21
      ·
      edit-2
      9 months ago

      This has always been my issue with programming. I can visualize how to build a chair, I know what I need to build it and I know what it needs to do. I know how screws work, and I understand when glue is applied.

      But with programming it’s like i know what the word wood is and I know what the word fabric is, but I haven’t the slightest idea how I use any of it to make anything useful. I can’t even start to build a plan because I don’t even know what’s needed for any specific thing.

      At least you have an example of what you want to make, I don’t even know what I want to make so it makes “figure it out” even harder lol

    • JPAKx4@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      9
      ·
      9 months ago

      That is a really good point, and there isn’t a one answer first all. If you’re looking for a mobile app, then you could do Android studio or Swift for IOS. If you only want to develop one app for both, then maybe you should just do an electron app that is essentially just a website.

      These tools will either have a visual interface editor, markdown language (like html), or a way to define visual components in code. After programming an app you can build, which will give you the appropriate executables for the different platforms.

      If you’re looking to start simple, then use something like pygame to learn the basics of using a visual interface.

    • locuester@lemmy.zip
      link
      fedilink
      English
      arrow-up
      7
      ·
      9 months ago

      What OS do you run? Are you planning on sharing this app with others? Should it be a web app?

      Happy to help!

    • thedeadwalking4242@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      9 months ago

      Look for some UI libraries. They provide functions and classes that you can call that will draw things to the screen. As for the executable part that varies per Language. If you want help dm me and maybe we can do a discord call!

    • Dudewitbow@lemmy.zip
      link
      fedilink
      arrow-up
      5
      ·
      edit-2
      9 months ago

      this is where branches of coding splitoff, as learning the fundamentals of coding doesn’t stop there, its a field where you have to pick up new skills on the go because not everyone needs it.

      some people never touch apps because they might work backend or engineering, some people might not touh databases because they arent the ones dealing with CSV files. some people never touch web development (because its not engineering in some jurisdictions /s)

      If i have to make a crude comparison, think of it like driving. basic driving knowlege is knowing how to drive a car. Knowing how to drive a car doesnt imply they know how to drive a boat, formula vehicle, big truck, forklift and such, so you need to go into further training for those, but you never should expect someone to cover all usecases.

      • nonfuinoncuro@lemm.ee
        link
        fedilink
        arrow-up
        3
        ·
        9 months ago

        Then what’s the class C passenger vehicle license of coding that everyone needs to survive in the modern world from teenagers to grandparents? I just want to drive a sedan from point A to point B, maybe pick up a piece of furniture from Costco or a litter from soccer practice in an SUV once in a while.

        • Dudewitbow@lemmy.zip
          link
          fedilink
          arrow-up
          4
          ·
          edit-2
          9 months ago

          the basics of coding is less the language, but more the algorithms and pracices.

          knowing concepts like object oriented programming is language agnostic. how you learn OOP can be done with several languages, usually most commonly with Java or Python, but it fundamentally doesnt matter for the common languages for the most part.

          • nonfuinoncuro@lemm.ee
            link
            fedilink
            arrow-up
            1
            ·
            9 months ago

            OK but that still doesn’t help me go from “I know the difference between integers and floating point variables and how to make loops” to “Hey Mom here’s a new house I bought with my stock options from my startup”

            • Dudewitbow@lemmy.zip
              link
              fedilink
              arrow-up
              2
              ·
              edit-2
              9 months ago

              hemce, in your case, you trained for a job which is something you do to get money.

              if you want to write an app, go lool up guides or classes on the type of app you want to write. not everyone takes said class because it may be irrelevant to their field of programming.

              the only thing they will typically all share is basic understanding of variables and object oriented programming.

        • GroundPlane@iusearchlinux.fyi
          link
          fedilink
          arrow-up
          2
          ·
          9 months ago

          Literally C/C++. Most used out there. Now if you want to do everything with it, you’re in for a long ride. You can do everything on every platform with C. But learning the language is the easy part. The hard part is learning good coding pratices, which library to use and how. Only guides and practice will help you there

    • whoelectroplateuntil@sh.itjust.works
      link
      fedilink
      arrow-up
      3
      ·
      9 months ago

      Libraries. If you had to write everything from scratch, nothing would ever get done. You pick a UI library/framework that meets your needs and is supported in the language you’re using, and go from there.

      You can use a Web interface, it’s absolutely hideous but it gets the job done. I hear QT is pretty easy to develop for and it’s cross-platform.

    • Kogasa@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      9 months ago

      What platforms would you like your app to run on? Then, which UI framework supporting those platforms would you like to use? Then, look at the framework’s documentation to find a sample starter project that you can run as an app, and modify it from there

    • GroundPlane@iusearchlinux.fyi
      link
      fedilink
      arrow-up
      2
      ·
      9 months ago
      1. Turning into an executable is compiling as far as C goes. For Python, there probably is something somewhere to wrap a script into a .exe.

      2. For the UI: what matters is the data you generate, not the fluff around it. As the other commenter said, start with a CLI program. You can easily nest several levels of menus if that’s your thing. This allows you to have user input. Then for outputs you can do it to a .txt or .md file. Use simple text-based formats. Then once you’ve got that down you could build a GUI? But tbh I have never built a GUI and I’ve been programming for 10 years at this point so I can’t help you out. There are simple cross-platform libraries you can use out there

    • Commiunism@lemmy.wtf
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      9 months ago

      There’s pretty much only two ways you can go about it in my experience:

      1. Fail forwards and try cobbling something together, constantly using search engines to fix errors or finding libraries or getting help with those libraries. One thing you’d have to figure out is an order of operations - what do you code and in what order, which might be tough for someone new but I’d say it’s well worth it.

      2. Find some tutorial to a project and try following it (those that have step by step guide on what you should do without letting you copy paste code), then using the knowledge you gain to do the way #1 above to hopefully have an easier time figuring out the order of operations, plan out your program and what you’re gonna be coding.

      Don’t think you can avoid getting hands-on and coding something up by yourself. General coding tutorials can only get you so far and are often harmful if abused too much (aka being stuck in tutorial hell).

    • Potatos_are_not_friends@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      9 months ago

      Alright how do I make my code into something with an UI? How do I turn it into an executable? How do I turn these lines into SOMETHING?

      Great questions!

      Ui: you want to explore web development. Learn about how to build forms. Understand html, css, and JavaScript. Probably Jr level work, depending on if you don’t care how ugly it is.

      If you were asking me to do it, I’d use a js framework like react or vue, use a form library, and have the output generate into a PDF. Probably mid-level skillset, mostly because of all the abstractions Ive added. But I have that experience and it would be faster (for me).

      Executable: if you did go the web dev route, you’re now looking into using electron.

      If you were asking me to do it, I’d ask why? Is a web app not functional? With a few short lines, you can make it offline.

      My immediate thinking before you said UI was to build it in Python or Node, and just have it be some command line app. Have it generate the foundation, and then output a basic template writeable PDF. It’s quick and dirty, but good enough for my tastes.

      How to turn lines into something: if you’re going web dev, look into free code camp. I like web dev for beginners because you don’t need to think about setting up a coding environment. There’s codepen, repl.it, various code sandboxes where you literally can just start writing.

      But at the next level, you’ll then go into a IDE. All the cool kids use VSCode, and in companies, you might use something else like jetbrains. The old dudes will flex on you with vim or say something ridiculous like “Oh I only use notepad” but who gives af. Getting code to work is more important imo.

      Happy coding!

    • Daxtron2@startrek.website
      cake
      link
      fedilink
      arrow-up
      1
      ·
      9 months ago

      Depends a lot on what language, platform, and type of app you want to make. Pretty much every language has some form of GUI library you can use.

    • flubba86@lemmy.world
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      edit-2
      9 months ago

      Actually this is the biggest hurdle in leaning how to code. You can blame the huge numbers of “learn to code in 24 hours” articles and videos online and the the influx of “5 day bootcamp” courses. Its like teaching someone the basics of how to drive a car but never teaching them the road rules and never taking them on the road.

      A better analogy might be learning a foreign language. It’s like teaching someone all the words in Spanish, but never putting them together in a conversation.

      I’d argue that if you say “I know how to code, I know what variables are and how to print text to the console, how do I make an app?” Then actually you don’t know how to code. You might know the basics of a programming language, and that is the first step in learning coding, but there are many steps after that.

      I identified this gap a few years ago after seeing a couple of my friends (one finished a boot camp, and one finished a software development major at Uni) both were in this same situation. I determined there is a big gap between “knowing a programming language” and “knowing how to make software”. It’s like going from “I know how to write words” to “I know how to write a novel”. It’s not something that comes easy. It’s something that can take time (often years) to get good at. This is the reason you see requirements like “3 years software development experience” on entry level programmer jobs. The number of people in your situation is incredibly high. The coding bootcamps churn them out by the hundreds every month.

      A couple of years ago when I was between jobs, I created a Gumtree ad advertising “post-bootcamp” courses, that aimed at bridging this gap. It was a series of private 1on1 lessons aimed at teaching someone to go from “knowing how to code” to being “software developer” job ready. Lots of people have many different learning styles and different paths they took to this point. The key is focussing not on the giving them the missing information, but teaching the person how to identify what steps are missing and how to find resources to learn them (because that’s the real missing knowledge wink).

      Unfortunately I found some people didn’t want to learn how to learn for themselves, and just wanted me to hand them the “secret missing parts” on a platter.

      • PriorityMotif@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        9 months ago

        When I learned python it was bugging the crap out of me when I was learning the basics in the terminal they give you. Other tutorials were worse, telling you to use Spyder or the other one I can’t remember. It wasn’t until I wrote standalone scripts that would actually do things on the computer that I started to understand the concepts. I seems like there’s a camp of people using scripting languages inside of a segregated black box environment, which is super annoying to me since everything is obfuscated.

    • duffman@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      9 months ago

      Harvards cs50 I believe has"the missing lecture" that talks about deployments and other activities surrounding programming.

      If you want to learn how to make web apps you want to make sure the course includes deployments. Or get a specific course on the cloud platform you want to learn.

    • peak_dunning_krueger@feddit.de
      link
      fedilink
      English
      arrow-up
      6
      arrow-down
      6
      ·
      edit-2
      9 months ago

      If this is not a meme…

      You know how you have to look up… errors when you don’t know what they mean?

      That.

      Figuring out how to do something specific, like UI, works just like that. All the time. It’s “looking up how it works”, then “messing around with it until it does” all the way down.

      If you are just starting out, coding something in HTML and javascript might be intuitive, because you can see and run it right away. Otherwise you will have to figure out how to use some kind of UI framework in the language you’re using. Because they’re all different. Yeeeaaah…

      I think it’s harder for compiled languages and easier for interpreted ones.