Jump to content

Hello all I'm starting a new journey into code, I have no experience with this type of coding, only ever wrote G-code for CNC, anyway I was in a bookstore that's closing in my area (everything on clearance) and I picked up a book that is an introduction to JAVA(says its basically 8 getting started books compiled into 1), I've read before that if interested in coding its a good language to start with as its widely used and supposedly fairly easy and compatible across platforms and other languages, anyway I purchased it and it has quite a lot of resources on what to download, I'm just wondering from the experienced in this community what would be some good starting tips and or resources to look into, things like you wish you knew or had access to when you first started. my interests are mainly possible side career and amusing myself being able to write and edit apps, anything helps, I'm purely a beginner so no advanced user advice please, not yet at least 🙂 thanks

 

                          Ryzen 5800X3D(Because who doesn't like a phat stack of cache?) GPU - 7700Xt

                                                           X470 Strix f gaming, 32GB Corsair vengeance, WD Blue 500GB NVME-WD Blue2TB HDD, 700watts EVGA Br

 ~Extra L3 cache is exciting, every time you load up a new game or program you never know what your going to get, will it perform like a 5700x or are we beating the 14900k today? 😅~

Link to comment
https://linustechtips.com/topic/1494265-no-programming-experience/
Share on other sites

Link to post
Share on other sites

My start in programming was a year of Java programming in high school. The advantage of that was, of course, the guided instruction, but I don't think that it's necessary if you are able to keep motivated. I learn pretty well as long as I have some sort of a project in front of me to keep my attention. If that works for you, then I'd try to think of something simple that you could work on.

 

I'd start with some basic command-line only stuff, before transitioning into building and using graphical interfaces. A pretty basic first program would be something that takes an input and gives you the same thing as an output - it just echos what you say.

 

Here's that code:
 

import java.util.Scanner;

public class Echoer {

    public static void main(String[] args) {
        Scanner scans = new Scanner(System.in);
        System.out.println("What do you want me to say?");
        
        String echo = scans.nextLine();
        System.out.println(echo);
    }

}

 

If you can understand the pieces of that, then you're on your way to figuring out how to program in Java.

 

Now, if I were your teacher, and this was lesson 1, your "assignment" would be to modify this to make it add something to the output. This could be as simple as having it say "Why do you want me to say "Linus Tech Tips"?"

 

A more advanced thing would be have it take that input and output it in the opposite order. So if I input "Linus Tech Tips" it outputs "spiT hceT suniL"

 

Once you have something like this going, you can then build on it into a bigger project, like making a Mad Libs game or Tic-Tac-Toe - whatever interests you. Input and output are some of the most basic building blocks for any programming - it just gets more advanced from there.

Link to post
Share on other sites

4 hours ago, Ripred said:

Hello all I'm starting a new journey into code,

And what is your goal? Why you want to learn to code and what you would like doing with that knowledge/skill?

 

Based on your expectations/plans there are better and worse picks for a programming language. Java is quite popular, strong commercially but if like you want to make websites it's not the best pick usually.

Link to post
Share on other sites

Having an idea for a project you want to build that you'd actually want to use yourself is important. Learning to code without something like that is pretty difficult in my experience, as the real learning comes when you apply what you learned from the book to something in the real world that isn't an guided exercise. Ideally, pick something that could be very simple, but also could grow.

 

Without getting too in the weeds with advanced stuff, there is an idea of an MVP (minimum viable product). This might be a simple little command line tool that does 1 little useful thing. That's your MVP. Then you can build upon that to make it do more things at the command line, then build a GUI, add features, pretty it up, then think about it from the perspective of users as if you were going to release it... that's when you really start getting into error handling, bug fixing, etc. I find this evolution really good for the learning process, as your knowledge grows and your desire to expand your app grows.

 

While you are following some of the book stuff, I also find it helpful to do my own stretch assignments. For example, a BMI calculator was something I had to write in a class. It's a pretty basic idea, you give it a weight and height, do a little math, and it spits out a BMI number. I also wanted to know given a particular weight, how many pounds would one need to gain/lose to get into the "normal" range. So I took the time to figure that out and implemented it, then carried on with the course. How much you can stretch will grow as you learn more and get more confident. Don't be afraid to search online for answers. My day job is as a software engineer and I'm searching all day long. Don't think you need to remember everything. If you use something enough, it will stick. For everything else, you just need to know it exists and how to find it when you need it.

Link to post
Share on other sites

8 hours ago, Ripred said:

Things like you wish you knew or had access to when you first started. My interests are mainly possible side career and amusing myself being able to write and edit apps, anything helps, I'm purely a beginner so no advanced user advice please, not yet at least 🙂 thanks

 

Things I wish I knew:

  1. You just can't go wrong with your first language, literally pick any, didn't like it? Then jump to another after learning its basics!
  2. Upon watching a few language-specific courses (I suggest Udemy), go watch some courses on: Data Structures and Algorithms, don't wait too long
  3. Books are much better than video courses, buy an e-reader
  4. Aside from job interviews, Leetcode is actually helpful and you can begin with easy questions
Link to post
Share on other sites

17 hours ago, Hi P said:

You just can't go wrong with your first language

 

APL would be a weird start though, and I strongly advise against starting with an "unsafe" language unless you have understood basic memory management, to be honest.

Write in C.

Link to post
Share on other sites

On 3/15/2023 at 6:40 PM, riklaunim said:

And what is your goal? Why you want to learn to code and what you would like doing with that knowledge/skill?

 

Based on your expectations/plans there are better and worse picks for a programming language. Java is quite popular, strong commercially but if like you want to make websites it's not the best pick usually.

At the moment, using the knowledge to amusing myself being able to write and edit codes, for long term more of a secondary skill if my current career path doesn't carry me to retirement (gets taken out by automation or similar), I'm not particularly interested making website's, I more chose this language as a start because those who are experienced with this type of thing say its widely used, compatible with a wide range of other languages and relatively easy to learn 

                          Ryzen 5800X3D(Because who doesn't like a phat stack of cache?) GPU - 7700Xt

                                                           X470 Strix f gaming, 32GB Corsair vengeance, WD Blue 500GB NVME-WD Blue2TB HDD, 700watts EVGA Br

 ~Extra L3 cache is exciting, every time you load up a new game or program you never know what your going to get, will it perform like a 5700x or are we beating the 14900k today? 😅~

Link to post
Share on other sites

On 3/15/2023 at 2:13 PM, YoungBlade said:

My start in programming was a year of Java programming in high school. The advantage of that was, of course, the guided instruction, but I don't think that it's necessary if you are able to keep motivated. I learn pretty well as long as I have some sort of a project in front of me to keep my attention. If that works for you, then I'd try to think of something simple that you could work on.

 

I'd start with some basic command-line only stuff, before transitioning into building and using graphical interfaces. A pretty basic first program would be something that takes an input and gives you the same thing as an output - it just echos what you say.

 

Here's that code:
 

import java.util.Scanner;

public class Echoer {

    public static void main(String[] args) {
        Scanner scans = new Scanner(System.in);
        System.out.println("What do you want me to say?");
        
        String echo = scans.nextLine();
        System.out.println(echo);
    }

}

 

If you can understand the pieces of that, then you're on your way to figuring out how to program in Java.

 

Now, if I were your teacher, and this was lesson 1, your "assignment" would be to modify this to make it add something to the output. This could be as simple as having it say "Why do you want me to say "Linus Tech Tips"?"

 

A more advanced thing would be have it take that input and output it in the opposite order. So if I input "Linus Tech Tips" it outputs "spiT hceT suniL"

 

Once you have something like this going, you can then build on it into a bigger project, like making a Mad Libs game or Tic-Tac-Toe - whatever interests you. Input and output are some of the most basic building blocks for any programming - it just gets more advanced from there.

This is basically where I'm at now just getting used to basic commands, understanding class and objects, ATM I'm debating about text editor, the book I have recommended Textpad, which I've downloaded and got working (with a healthy amount of aggravation) but I'm wondering if it would be faster to learn with a different one that can highlight errors and give me basic lines of code as suggestions, or do you think it would be better to write it all out and identify errors myself for the moment ?

                          Ryzen 5800X3D(Because who doesn't like a phat stack of cache?) GPU - 7700Xt

                                                           X470 Strix f gaming, 32GB Corsair vengeance, WD Blue 500GB NVME-WD Blue2TB HDD, 700watts EVGA Br

 ~Extra L3 cache is exciting, every time you load up a new game or program you never know what your going to get, will it perform like a 5700x or are we beating the 14900k today? 😅~

Link to post
Share on other sites

22 minutes ago, Ripred said:

This is basically where I'm at now just getting used to basic commands, understanding class and objects, ATM I'm debating about text editor, the book I have recommended Textpad, which I've downloaded and got working (with a healthy amount of aggravation) but I'm wondering if it would be faster to learn with a different one that can highlight errors and give me basic lines of code as suggestions, or do you think it would be better to write it all out and identify errors myself for the moment ?

I think an IDE (integrated development environment) that can highlight errors is good. One that offers automatic suggestions could potentially lead you astray - I knew a guy in college who, following what his IDE suggested, made all of his variables and methods "static." The result was very bizarre behavior in his program, as all examples of a given variable referenced the same one. I didn't even know where to begin with fixing that issue.

 

My preferred IDE for Java is Eclipse. It's an old IDE, but it checks out.

 

It can offer you suggestions, but unlike some more modern ones it doesn't automatically generate code as you type beyond really basic things like brackets and finishing initialization statements. You can still access suggestions by clicking on text that is underlined in yellow or red, and my recommendation there would be to only use the suggestions if you understand what they mean.

 

That isn't just advice for noobs, you really should always only use code suggestions if you know what it's doing. The exception would be if you want to just see what happens with it - that's part of the learning process - but don't just blindly follow the suggestions thinking that they're fixing your mistakes, because they might not be.

 

The other advantages of a full IDE are that it offers you the ability to see your whole project as it fits together, compile and run your code without needing a command prompt, and has debug tools like breakpoints that let you pause your code as its running and then step through it one line at a time. These tools are more valuable once you have more experience in the language, but it's why the vast majority of professionals use an IDE rather than a basic editor.

 

If you want a basic editor for now, my suggestion there would be Notepad++. It won't offer suggestions, but it does have syntax highlighting, which can be helpful for finding mistakes. You just pick Java from the long list of languages that it supports and it'll highlight everything.

Link to post
Share on other sites

6 minutes ago, YoungBlade said:

I think an IDE (integrated development environment) that can highlight errors is good.

 

A good text editor can do that as well, especially those which support LSP:

https://microsoft.github.io/language-server-protocol/

 

There is no reason to use an IDE unless you absolutely require certain frameworks which won't work well with a text-only interface.

Write in C.

Link to post
Share on other sites

16 minutes ago, Dat Guy said:

A good text editor can do that as well, especially those which support LSP:

https://microsoft.github.io/language-server-protocol/

 

There is no reason to use an IDE unless you absolutely require certain frameworks which won't work well with a text-only interface.

Except for the reasons I listed for using an IDE. Plus the fact that the vast majority of developers use IDEs, so learning one is a good idea in general. Also, this just feels like pointless semantics.

Link to post
Share on other sites

1 hour ago, YoungBlade said:

I think an IDE (integrated development environment) that can highlight errors is good. One that offers automatic suggestions could potentially lead you astray - I knew a guy in college who, following what his IDE suggested, made all of his variables and methods "static." The result was very bizarre behavior in his program, as all examples of a given variable referenced the same one. I didn't even know where to begin with fixing that issue.

 

My preferred IDE for Java is Eclipse. It's an old IDE, but it checks out.

 

It can offer you suggestions, but unlike some more modern ones it doesn't automatically generate code as you type beyond really basic things like brackets and finishing initialization statements. You can still access suggestions by clicking on text that is underlined in yellow or red, and my recommendation there would be to only use the suggestions if you understand what they mean.

 

That isn't just advice for noobs, you really should always only use code suggestions if you know what it's doing. The exception would be if you want to just see what happens with it - that's part of the learning process - but don't just blindly follow the suggestions thinking that they're fixing your mistakes, because they might not be.

 

The other advantages of a full IDE are that it offers you the ability to see your whole project as it fits together, compile and run your code without needing a command prompt, and has debug tools like breakpoints that let you pause your code as its running and then step through it one line at a time. These tools are more valuable once you have more experience in the language, but it's why the vast majority of professionals use an IDE rather than a basic editor.

 

If you want a basic editor for now, my suggestion there would be Notepad++. It won't offer suggestions, but it does have syntax highlighting, which can be helpful for finding mistakes. You just pick Java from the long list of languages that it supports and it'll highlight everything.

Hmm Eclipse might be what I'm looking for, something that can highlight errors as I learn but wont get ahead of me and confuse me by generating code before I actually understand it but still be useful when I get more advanced

                          Ryzen 5800X3D(Because who doesn't like a phat stack of cache?) GPU - 7700Xt

                                                           X470 Strix f gaming, 32GB Corsair vengeance, WD Blue 500GB NVME-WD Blue2TB HDD, 700watts EVGA Br

 ~Extra L3 cache is exciting, every time you load up a new game or program you never know what your going to get, will it perform like a 5700x or are we beating the 14900k today? 😅~

Link to post
Share on other sites

2 minutes ago, Dat Guy said:

 

Most of them: for no good reason. "Everyone does it, so it must be a good thing" was never true.

Are there any disadvantages to using IDE? Maybe it better to keep both a IDE and a good text editor, use one or the other depending on project, what would be the advantages/disadvantages between these, and what would be the best use case for each? I'm still very beginner, just managed to get Hello world! to output over the weekend through textpad

                          Ryzen 5800X3D(Because who doesn't like a phat stack of cache?) GPU - 7700Xt

                                                           X470 Strix f gaming, 32GB Corsair vengeance, WD Blue 500GB NVME-WD Blue2TB HDD, 700watts EVGA Br

 ~Extra L3 cache is exciting, every time you load up a new game or program you never know what your going to get, will it perform like a 5700x or are we beating the 14900k today? 😅~

Link to post
Share on other sites

4 minutes ago, Dat Guy said:

Most of them: for no good reason. "Everyone does it, so it must be a good thing" was never true.

Cursing the state of the world isn't going to change it. If you want to get a coding job, good luck telling your prospective boss that the IDE they're asking you to use is useless and that the whole company is doing it wrong.

 

When I code in PHP for work, I use Sublime Text, in no small part because it gets out of my way as much as possible. However, my boss has hinted that he might force me and my other coworker who prefers Sublime to swtich to PHP Storm, because he thinks Sublime is hurting our productivity.

 

And often, for doing my own PHP projects, I'll just code with Nano, because I am doing it all via CLI and I have never wanted to be bothered with learning VIM and, frankly, I like the simplicity. So I get where you're coming from, but you have to be realistic with the way the world is today.

 

IDEs are here to stay and they are the future of programming - especially once AI coding becomes the standard, as it inevitably will. Using a text editor will look like using punch cards in comparison to what the next few decades will bring. And that's not a value judgement - I like feeling like I'm the one writing the code and not like it's being written for me - but that's not going to change what's happening. I'm just 32, and to the group of coders I know, I'm perceived as the crotchety old man because I like simple IDEs that don't generate huge amounts of code on the fly. The rest of the group is moving forward into the future as quickly as possible, whether I like it or not...

 

1 minute ago, Ripred said:

Are there any disadvantages to using IDE? Maybe it better to keep both a IDE and a good text editor, use one or the other depending on project, what would be the advantages/disadvantages between these, and what would be the best use case for each? I'm still very beginner, just managed to get Hello world! to output over the weekend through textpad

To me, the biggest disadvantage is the setup time. To properly use an IDE, you need to import your project into it. If you're going to be building something big across many files, that's no big deal, but if you're just going to code a quick program, the amount of overhead there can feel excessive. Having a text editor around to just make quick changes to individual files, or to code a quick, single class project, is definitely a good idea.

Link to post
Share on other sites

3 minutes ago, Ripred said:

Are there any disadvantages to using IDE?

 

Wasting CPU cycles and RAM. Yes, I know, we all have "too much free RAM" anyway, but there is no reason to fill it with your development environment.

 

Like I said, good text editors can replace IDEs, unless you need RAD* tools, e.g. for visually creating a GUI for your software.

 

https://en.wikipedia.org/wiki/Rapid_application_development

Write in C.

Link to post
Share on other sites

On 3/15/2023 at 1:44 PM, Ripred said:

Hello all I'm starting a new journey into code, I have no experience with this type of coding, only ever wrote G-code for CNC, anyway I was in a bookstore that's closing in my area (everything on clearance) and I picked up a book that is an introduction to JAVA(says its basically 8 getting started books compiled into 1), I've read before that if interested in coding its a good language to start with as its widely used and supposedly fairly easy and compatible across platforms and other languages, anyway I purchased it and it has quite a lot of resources on what to download, I'm just wondering from the experienced in this community what would be some good starting tips and or resources to look into, things like you wish you knew or had access to when you first started. my interests are mainly possible side career and amusing myself being able to write and edit apps, anything helps, I'm purely a beginner so no advanced user advice please, not yet at least 🙂 thanks

 

Learning to program without a goal in mind is harder to navigate.  It's easier to learn to use a hammer if you want to build a chair, than it is to just try to learn about hammers and how they are used in theory and then testing out some small ways hammers are used.  

Have something that you want to develop and learn the skills to create it.

If you are interested in a side career programming, what sort of apps would you develop?  Would JAVA be the best language to use for that purpose?

As someone that learned JAVA in high school in the early 2000s, I don't think many people are learning it early these days and there are probably some good reasons for that.

Link to post
Share on other sites

5 minutes ago, ToboRobot said:

Learning to program without a goal in mind is harder to navigate.  It's easier to learn to use a hammer if you want to build a chair, than it is to just try to learn about hammers and how they are used in theory and then testing out some small ways hammers are used.  

Have something that you want to develop and learn the skills to create it.

If you are interested in a side career programming, what sort of apps would you develop?  Would JAVA be the best language to use for that purpose?

As someone that learned JAVA in high school in the early 2000s, I don't think many people are learning it early these days and there are probably some good reasons for that.

Partly choose JAVA because from what I heard its widely used, fairly easy and supposedly a good foundation to jump off from if or when I decide to branch out into other languages, also it was the first book in the CS section of the store that stood out 😝 ("JAVA  all in one", in big friendly letters) From what I've gathered its a solid middle ground language, not overly complicated that makes a chore out of the simplest things but also not overly easy that I might miss out on some core ideas for more complicated languages, I have some ideas for projects, just trying to get basic's atm, therefore not to concerned if it'll be the best for what Id like to do, more that It can do it

                          Ryzen 5800X3D(Because who doesn't like a phat stack of cache?) GPU - 7700Xt

                                                           X470 Strix f gaming, 32GB Corsair vengeance, WD Blue 500GB NVME-WD Blue2TB HDD, 700watts EVGA Br

 ~Extra L3 cache is exciting, every time you load up a new game or program you never know what your going to get, will it perform like a 5700x or are we beating the 14900k today? 😅~

Link to post
Share on other sites

19 minutes ago, Ripred said:

Partly choose JAVA because from what I heard its widely used, fairly easy and supposedly a good foundation to jump off from if or when I decide to branch out into other languages, also it was the first book in the CS section of the store that stood out 😝 ("JAVA  all in one", in big friendly letters) From what I've gathered its a solid middle ground language, not overly complicated that makes a chore out of the simplest things but also not overly easy that I might miss out on some core ideas for more complicated languages, I have some ideas for projects, just trying to get basic's atm, therefore not to concerned if it'll be the best for what Id like to do, more that It can do it

Are you trying to justify your investment to strangers online, or do you want to find the best path to learning?

 

Link to post
Share on other sites

1 hour ago, ToboRobot said:

Are you trying to justify your investment to strangers online, or do you want to find the best path to learning?

 

  If I want justification ill ask for it, I'm straight to the point type for things like that, I only reiterated myself for clarification(I wont do it again)

I am looking for the best path to learning and as I go ill ask about things as I understand them and need clarification, I understand enough that a prog language are tools each with strength and weakness suited to one task or another, as with your hammer analogy A framing hammer would be better suited driving a nail than an engineer hammer sure but atm I'm searching for what nail to use and good placement, once I can write something that can perform some basic functions without to much error then ill ask about the hammer, because ill atleast have some basic knowledge to understand the reasoning and be able to have follow up questions, rightnow id only be taking the word of others, which varies, as I'm sure if I were to state a specific goal here and now id get several languages and methods there within that each individual swears by for the task.

   all I ask for today is opinions for good editing environments particularly for beginners, that doesn't auto generate code for me but possibly give suggestions so I can look through and research each option

                          Ryzen 5800X3D(Because who doesn't like a phat stack of cache?) GPU - 7700Xt

                                                           X470 Strix f gaming, 32GB Corsair vengeance, WD Blue 500GB NVME-WD Blue2TB HDD, 700watts EVGA Br

 ~Extra L3 cache is exciting, every time you load up a new game or program you never know what your going to get, will it perform like a 5700x or are we beating the 14900k today? 😅~

Link to post
Share on other sites

-Thread Cleaned-

 

Please keep comments on-topic and respectful

Quote or tag me( @Crunchy Dragon) if you want me to see your reply

If a post solved your problem/answered your question, please consider marking it as "solved"

Community Standards // Join Floatplane!

Link to post
Share on other sites

I'm a software engineer and i'm a Java senior developer with 10+ years of experience (started to work during the first 3-yrs of university).

Java is the most used programming language for high-end service (cloud service, app, backend) because it implements the "write once, run anywhere" principle.

 

The first hint that i can give you is that you have to understand that different languages have different purposes.

For example, python is really good for PoC (proof of concept) because it is a "fast-writing code" but it is not good for "product" because pretty slow.

Another example, C is really good if you need to control some peripherals or if you need fast computing. 

All the above are just examples....

 

I don't think that starting with Java is a good option unless you want to do something that only java can do, for example, write one code for all OS* (*not always true but pretty easy to do, of course, if the OS support the JVM - Java Virtual Machine).

I disagree that starting with java lets you "jump off" easily. Absolutely NOT TRUE, Java does things for you that others don't (Garbage collector for example, or "virtualize the OS controls" with the JVM)!!!

 

My best suggestions to learn to code are:

1) start with C or C++ to understand what coding means. Learn to manage memory, learn to understand what structures are and so on.

2) start with C# or Java to understand what object-oriented programming means. Learn what is a class, what is an interface, inheritance and so on.

3) Choose a little project (eg: a private film library that lets you manage films. vote it, create playlists etc etc) 

4) code code code

5) code code code

 

PS: i always say that anyone can write code, but not all can program (in italian is more soft that in english). If you want to be a developer just for the hobby is a great thing and it is super fun (you can create your own energy management system for your home or some media library) but becoming a ""real"" developer is not just "learn a programming language", there are lots more in the wood. Protocols, thread and concurrency, network, peripherals and so much more!!!

Link to post
Share on other sites

  • 1 month later...

Java IDE to use imo: IntelliJ IDEA

 

Practice coding, This means researching what you don't know and repeating what you already do know. Create projects and complete them starting from easy and get harder as you go. Hard as in doing things you just learned or don't know yet.

 

Join a community or make friends with people who have experience to pick their brains.

Link to post
Share on other sites

On 3/16/2023 at 4:20 PM, Dat Guy said:

 

APL would be a weird start though, and I strongly advise against starting with an "unsafe" language unless you have understood basic memory management, to be honest.

WHAT!!!!

 

What happened to start with C?!?!

 

 

Post up here when you have questions. 

It helped me a lot.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×