I’ve tried learning programming on and off for years

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

quite an extreme
Veteran
Veteran

User avatar

Joined: 20 Aug 2018
Age: 323
Gender: Male
Posts: 1,921
Location: Germany

08 Jan 2023, 4:22 am

I don't get the problem. I'm working as a programmer a very long time now. You have to know every language that you are using pretty well but with exception to the rare graphical programming tools you have to solve the problems in any language that you are using anyway and it's just depending on the language a bit more or less work to do.
I prefer to write in C because it's easy to use and just fun to me. C code can be written very portable to most of the common platforms and you are spending less time for bug fixing or extending programs if you are writing solid code. I like the really nice pointer arithmetic of it. No customer pays for type safety or programming paradigms but stable, fast, portable and easy to use software. As long that I have to work anyway I'm preferring to do it in a language that just fun to use for me. :wink:


_________________
I am as I am. :skull: :sunny: :wink: :sunny: :skull: Life has to be an adventure!


Mikah
Veteran
Veteran

User avatar

Joined: 23 Oct 2015
Age: 35
Posts: 3,003
Location: England

08 Jan 2023, 4:41 pm

^ brought this back to mind:


_________________
Behold! we are not bound for ever to the circles of the world, and beyond them is more than memory, Farewell!


quite an extreme
Veteran
Veteran

User avatar

Joined: 20 Aug 2018
Age: 323
Gender: Male
Posts: 1,921
Location: Germany

08 Jan 2023, 6:21 pm

Most people prefer their own hell ... :wink:


_________________
I am as I am. :skull: :sunny: :wink: :sunny: :skull: Life has to be an adventure!


Mona Pereth
Veteran
Veteran

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

08 Jan 2023, 9:34 pm

quite an extreme wrote:
I prefer to write in C because it's easy to use and just fun to me. C code can be written very portable to most of the common platforms and you are spending less time for bug fixing or extending programs if you are writing solid code. I like the really nice pointer arithmetic of it.

Hmm, I've always thought of pointer arithmetic, and C-style pointers in general, as one of the most notoriously error-prone features of C. They ARE necessary in some kinds of programming, though.

What kinds of programs do you write? Mostly stuff that's simple and short? Mostly firmware, device drivers, or other things involving specific memory addresses, or otherwise requiring direct interaction with hardware?

quite an extreme wrote:
No customer pays for type safety or programming paradigms but stable, fast, portable and easy to use software.

For large, high-level programs, type safety and programming paradigms like OOP make it one heck of a lot easier to deliver stable, portable, and easy to use software.

As for speed, Java can be reasonably fast if done right, but I'll admit that no popular high-level programming language beats C for speed.

As for portable, I was under the impression that C is very platform-dependent?


_________________
- 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 (new as of 2021)


usagibryan
Toucan
Toucan

User avatar

Joined: 13 Jul 2020
Age: 35
Gender: Male
Posts: 270
Location: Florida

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"


quite an extreme
Veteran
Veteran

User avatar

Joined: 20 Aug 2018
Age: 323
Gender: Male
Posts: 1,921
Location: Germany

09 Jan 2023, 7:14 pm

Mona Pereth wrote:
quite an extreme wrote:
I prefer to write in C because it's easy to use and just fun to me. C code can be written very portable to most of the common platforms and you are spending less time for bug fixing or extending programs if you are writing solid code. I like the really nice pointer arithmetic of it.

Hmm, I've always thought of pointer arithmetic, and C-style pointers in general, as one of the most notoriously error-prone features of C. They ARE necessary in some kinds of programming, though.

What kinds of programs do you write? Mostly stuff that's simple and short? Mostly firmware, device drivers, or other things involving specific memory addresses, or otherwise requiring direct interaction with hardware?

I did start with Windows graphics card drivers 26 years ago. nVidia, 3dlabs, S3 aso. Afterwards I changed the employer and started to develop tools for vehicle manufacturers and car diagnostics for lots of customers all over the planet. The complexity of the stuff varies. Most of it are a bunch of user mode tools, libraries and programs and lots of networking stuff for IPv6 and IPv4 (DoIP) that needs to be very portable and stable because some of that is also for the electronic control units of several new cars and trucks.

Mona Pereth wrote:
quite an extreme wrote:
No customer pays for type safety or programming paradigms but stable, fast, portable and easy to use software.

For large, high-level programs, type safety and programming paradigms like OOP make it one heck of a lot easier to deliver stable, portable, and easy to use software.

As for speed, Java can be reasonably fast if done right, but I'll admit that no popular high-level programming language beats C for speed.

But how do you port Java to platforms that have just 64 MB memory where the half of that is used for different daemon processes already? And how do you deal with real time programming in Java? You can hardly control the long lasting interrupts of the garbage collector that may last even to long if any of the control units need a life sign every second. And once there isn't even a JVM for a platform than good luck with porting such a thing to it. I did it once a long time ago for some colleagues but that is not fun. Has Java even working time functions today? I need system wide timestamps in microseconds for my logging otherwise it's hard to tell whats going on in the systems which are far away in other countries all over the world. But there are several Java applications that are using my libraries for communication today. One problem of Java are the pretty nice working decompilers. It's not always a good idea to share your sources together with your programs.

quite an extreme wrote:
As for portable, I was under the impression that C is very platform-dependent?

There are standards for C and for UNIX as well and most platform do support them. Only the Microsoft compilers do not yet support C99 or a recent Posix standard. You need sometimes some system dependent wrapper functions but it's usually not a real big problem.
There are X86, Amd64, ARM, AARCH64, PowerPC processors that I have to support and there are Microsoft Windows 32 and 64 bit, many Linux distributions, a bunch of Android targets and QNX that I need to build my stuff for. There were also MAC OS and iOS once but the customer did skip them. My recent builds happen for about 25 different target platforms now. But the number is still growing.


_________________
I am as I am. :skull: :sunny: :wink: :sunny: :skull: Life has to be an adventure!


Mona Pereth
Veteran
Veteran

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

10 Jan 2023, 3:00 am

quite an extreme wrote:
I did start with Windows graphics card drivers 26 years ago. nVidia, 3dlabs, S3 aso. Afterwards I changed the employer and started to develop tools for vehicle manufacturers and car diagnostics for lots of customers all over the planet. The complexity of the stuff varies. Most of it are a bunch of user mode tools, libraries and programs and lots of networking stuff for IPv6 and IPv4 (DoIP) that needs to be very portable and stable because some of that is also for the electronic control units of several new cars and trucks.

[...]

But how do you port Java to platforms that have just 64 MB memory where the half of that is used for different daemon processes already? And how do you deal with real time programming in Java? You can hardly control the long lasting interrupts of the garbage collector that may last even to long if any of the control units need a life sign every second. And once there isn't even a JVM for a platform than good luck with porting such a thing to it.

Agreed that Java isn't good for electromechanical control systems, for all the reasons you mentioned above. Agreed that C is much better for that sort of thing.

Java is good for secure web apps, especially big and complex ones, and for distributed applications where precise timing isn't critical.


_________________
- 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 (new as of 2021)


Fenn
Veteran
Veteran

User avatar

Joined: 1 Sep 2014
Gender: Male
Posts: 2,060
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(undiagnosed - maybe)
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,060
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(undiagnosed - maybe)
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,060
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(undiagnosed - maybe)
RDOS scores - Aspie score 131/200 - neurotypical score 69/200 - very likely Aspie


Mona Pereth
Veteran
Veteran

Joined: 11 Sep 2018
Gender: Female
Posts: 6,506
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 (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
Emu Egg
Emu Egg

Joined: 17 Aug 2022
Age: 57
Gender: Female
Posts: 7
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
Emu Egg
Emu Egg

Joined: 17 Aug 2022
Age: 57
Gender: Female
Posts: 7
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.