I’ve tried learning programming on and off for years

Page 2 of 2 [ 26 posts ]  Go to page Previous  1, 2

usagibryan
Toucan
Toucan

User avatar

Joined: 13 Jul 2020
Gender: Male
Posts: 273

09 Jan 2023, 8:49 am

Update: Well, I did the platformer intro and understood everything, even tweaked it and added a bunch of stuff to it. I did Pong and understood everything except how the timer/ball reset mechanic worked (understood the theory but couldn't follow the code there for some reason). Then I did Snake, understood everything technically even if it was a bit mind bending at parts (hard for me to follow for loops and lists sometimes). I used the platformer logic to start working on a scrolling shooter type game, instead of making enemies come from the right they'd fall, let the player move in all directions. Started animating Galaga sprites and planning to do a scrolling star field once I learn that.

I was excited to do Space Invaders because I could do the shooting mechanic and learn how collision works with multiple instances of the same type of enemy (as of now my enemies were in a list and didn't know how to "kill" individual ones without emptying the list). I got to the obstacles portion and was completely lost, figured I didn't care since I wouldn't do obstacles, then started on enemies and was still lost. Tried using the logic of having separate classes/files in my code but wasn't working for some reason.

For the second time in my life I have failed at Space Invaders. I seem to be struggling with OOPs, for loops and maybe just math and logic in general, I'm going back to the basics I guess. I had fun while it lasted though.


_________________
"The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents. We live on a placid island of ignorance in the midst of black seas of infinity, and it was not meant that we should voyage far. The sciences, each straining in its own direction, have hitherto harmed us little; but some day the piecing together of dissociated knowledge will open up such terrifying vistas of reality, and of our frightful position therein, that we shall either go mad from the revelation or flee from the deadly light into the peace and safety of a new dark age"


Fenn
Veteran
Veteran

User avatar

Joined: 1 Sep 2014
Gender: Male
Posts: 2,404
Location: Pennsylvania

10 Jan 2023, 9:19 am

Java is easier to learn and harder to create buffer-overflow vulnerabilities. Some really common ways to shoot yourself in the foot in c and c++ were systematically avoided when java was created (immutable strings, operator overloading). Java was also created in a time where computing power was increasing so much the overhead of an interpreted bytecode language was small in comparison to costs related to programmer time. Statistics show that new programmers can ramp up on java from scratch much faster than c++. c/c++ is good for embedded, and robotics. C and C++ were falling in popularity for years, but by some measures c is not ahead of java. I think this must be because if embedded and the "internet of things" (iot).

https://statisticsanddata.org/data/the- ... ew-update/


_________________
ADHD-I(diagnosed) ASD-HF(diagnosed)
RDOS scores - Aspie score 131/200 - neurotypical score 69/200 - very likely Aspie


Fenn
Veteran
Veteran

User avatar

Joined: 1 Sep 2014
Gender: Male
Posts: 2,404
Location: Pennsylvania

10 Jan 2023, 10:35 am

FYI

gotw.ca - Languages: Interview with Dennis Ritchie, Bjarne Stroustrup, and James Gosling


_________________
ADHD-I(diagnosed) ASD-HF(diagnosed)
RDOS scores - Aspie score 131/200 - neurotypical score 69/200 - very likely Aspie


Fenn
Veteran
Veteran

User avatar

Joined: 1 Sep 2014
Gender: Male
Posts: 2,404
Location: Pennsylvania

23 Jan 2023, 9:51 am

In case anyone is interested:

amazon.com - Microsoft Python Certification Exam 98 281
amazon.com - PCEP certified Entry Level Python Programmer Exam Prep


_________________
ADHD-I(diagnosed) ASD-HF(diagnosed)
RDOS scores - Aspie score 131/200 - neurotypical score 69/200 - very likely Aspie


Mona Pereth
Veteran
Veteran

Joined: 11 Sep 2018
Gender: Female
Posts: 7,810
Location: New York City (Queens)

07 Feb 2023, 11:16 pm

What kinds of experiences has anyone here had with the following, as places to learn programming?

- brilliant.org
- udemy
- codewars

(These sites were mentioned in a recent online support group meeting, and I am wondering whether they should be recommended to people new to programming.)


_________________
- Autistic in NYC - Resources and new ideas for the autistic adult community in the New York City metro area.
- Autistic peer-led groups (via text-based chat, currently) led or facilitated by members of the Autistic Peer Leadership Group.
- My Twitter / "X" (new as of 2021)


Hambil
Emu Egg
Emu Egg

Joined: 15 Feb 2023
Gender: Male
Posts: 6
Location: Seattle

16 Feb 2023, 6:35 am

I would consider looking into a free 3d program like Unity, Unreal Engine, or Blender. They do use code, (C#, C++ and Python respectively), but the main focus is more visual and you may find it easier to learn. You will also find a lot of video tutorials.

These are not easier programs to learn, and 3d art/game design is not easier to learn than programming. However, having done both, you do not need traditional art skills and the visual focus of these 3d tools (placing and manipulating objects in real time) may give you instant feedback and structure that helps you learn in an iterative way.

To me, it sounds like you have the basics of programming understood. What you need is an enviroment to practice in that you find rewarding and digestible.

You don't learn advanced skills by reading, you learn them by doing.



lm8
Butterfly
Butterfly

Joined: 17 Aug 2022
Age: 58
Gender: Female
Posts: 13
Location: Florida

25 Mar 2023, 11:52 am

Sounds like you already know more about computers than most people especially since you're in the IT field. When I learned, I started by writing something and then went to the books to look up how to do things. Maybe if you started with a purpose (like writing a video game or app for a phone) instead of just reading examples, you'd feel like you've accomplished more. If you're enjoying a command line interface, then why not see what you can accomplish with a bash script. I've seen people use dialog or yad or similar programs with bash or another scripting language and write utilities or games. Java's not the only language that will let you write apps. I've seen web languages/markup used for creating mobile apps (as well as programs for various operating systems). I use C/C++ and NDK to create mobile apps for Android. I've also seen people use tools like MIT app inventor to create mobile apps. Hopefully it's okay to share a link. This is a C tutorial on how to write an adventure game:
https://helderman.github.io/htpataic/htpataic01.html Maybe you can start with something like that and modify the code until you make your own variation. Doesn't matter which language you code in. Just pick something you want to create, find a language you have access to and give it a try. If writing an entire program is too much at first, you could start with someone else's program and add a feature you want. As to using just CLI from the computer, I have references/links for that sort of thing too. Let me know if you'd like me to share any. Since you're already using WSL, you should be able to use it to explore what you can accomplish from the command line. Maybe you can put together your own collection of CLI apps similar to distributions like INX. INX was an interesting niche command line distribution. Some people liked it but no one volunteered to keep it going and maintain it. It's not as common but there are definitely people who are more interested in doing things through the command line rather than a GUI interface. A few distributions are geared toward that, but you can use practically any Linux distribution and just pick and choose the programs you want to work with.



lm8
Butterfly
Butterfly

Joined: 17 Aug 2022
Age: 58
Gender: Female
Posts: 13
Location: Florida

25 Mar 2023, 12:12 pm

usagibryan wrote:
Making music is also a hobby of mine so I want to make my own music and insert it into the games.


There are several ways to create music with the computer. The one I like to use most is to write the music in ABC notation (with a standard text editor). I can convert it to midi using abc2midi. I can then save it as a wav file or similar format using Timidity++. Timidity++ lets you pick what sounds fonts you want to use for instruments. The Freepats project offers some interesting and free options. If you prefer playing your own instruments, you could just record the music straight to wav or a suitable format. If you need to convert audio file formats, programs like sox or audacity might be helpful. Libraries like SDL are very popular for games. PyGame actually uses SDL. There are a few libraries that work with SDL such as SDL2_mixer that let you load music files and play them in the background or use them as sound effects. From some of the documentation online, looks like you can access some of that functionality through PyGame.



MatchboxVagabond
Veteran
Veteran

Joined: 26 Mar 2023
Age: 43
Gender: Male
Posts: 1,182

04 Apr 2023, 4:50 pm

Mona Pereth wrote:
renaeden wrote:
Boy was I wrong. I learnt Java first.

Not a good first language, IMO.

Even in very short programs, Java has an awful lot of required boilerplate (class, main method, etc.) that does absolutely nothing for you in a short program of the kind that a beginner would write. To a beginner, all this stuff is likely just intimidating and confusing.

Python is a much better first language. IMO, Java should wait until you are writing big enough programs that classes, methods, etc. actually become useful.

In Python, it's possible to write a simple short program with no boilerplate. Python also has the advantage (for beginners, and for teachers thereof) of forcing the programmer to indent properly. This requirement may be annoying, but it can help you get a better feel for program structure early on, and it also gets you in the habit of writing programs that are easy for humans to read.

But, for very large programs, Java is the best language, IMO. Java is the easiest of the popular programming languages in which to do good software engineering.

Java is the programming language I use most of the time.

I disagree, it's hard to find a worse language to start with than python. It's got syntactical white space and dynamic typing, it looks nice and friendly, but it has more or less useless error messages.

Last I checked, it wasn't even possible to print out a portion of a line without engaging in hackery. Pretty much every other language I've encountered either has a separate way of printing whole lines and partial lines or prints single lines with some method of adding a new line to that.

Python definitely can be used for useful things, but it's a terrible place for a beginning programmer to start.

Java has it's issues, but it's really not that bad as a beginning language. I probably wouldn't go with it as a first language, but at least the syntax is something that is comparable to other programming languages and it does typically work fairly well for various uses.



bigbadbarry84
Butterfly
Butterfly

Joined: 23 Mar 2023
Age: 39
Gender: Male
Posts: 11
Location: Suffolk, UK

06 Apr 2023, 5:53 am

I completely relate. I have studied some modules in Java as part of my online degree, and also studied Python on the side, because I heard this was a good starting point. I put hours and hours into it, learning about loops, classes, etc etc and might have even made very, very basic programs, but I just cannot really remember anything and feel I would not know where to start if I now got a job as even a junior programmer.

I was always seen as being the family member who was "good with computers" and people assumed that programming is encapsulated by that and will be a natural thing for me, but nope.

I now work as an IT technician in a school and am quite experienced with networks and servers and the like. But programming... I just cannot do it. Even powershell scripts frighten me and I prefer to do things the visual GUI kind of ways whenever possible, instead of CMD line.