this post was submitted on 25 Jun 2023
22 points (100.0% liked)

Programming

13376 readers
1 users here now

All things programming and coding related. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 1 year ago
MODERATORS
 

Hello friends, the title is mostly self explanatory. I would like to start programming but I also feel like I am not very smart, so I would like a programming language that is easier to grasp than others. That considered I don't hope to be able to learn something "powerful" but it would be nice to still be able to do some useful things. Something I would love to do is make games, I know those are usually made in C, which is a very difficult one, but maybe some simpler games can be made with other languages.

top 36 comments
sorted by: hot top controversial new old
[–] heschlie@lemmy.schlunker.com 18 points 1 year ago (1 children)

Python is pretty easy to pickup and super popular so there are tons of guides and libraries to help get the job done. It does have a library called PyGame but honestly it is not super powerful, however there is a FOSS engine called Godot that uses what they call gdscript, which is very similar to Python.

[–] raccoon@lemmy.ml 3 points 1 year ago

I heard about pygame, I was hopeful but oh well. I also heard about godot but I didn't know if it was similar to something else.

[–] WhelmedInEurope 12 points 1 year ago (1 children)

If you decide to look at Python, I really enjoyed going through the "Automate the Boring Stuff with Python" lessons/book. It breaks it down really well in non technical terms and I thought the work was pretty fun. It may be a good way to get a feel for it. I think once you learn one language it's a bit easier to pick up your next one (at least that how it went for me).

[–] raccoon@lemmy.ml 4 points 1 year ago (1 children)

I heard that about learning a second one from other people too, and I think I heard this applies to languages in general, not just programming, but "people languages" too if that makes sense. Thank you for the suggestion mate, I'll definitely consider the book.

[–] alanine96 2 points 1 year ago* (last edited 1 year ago)

I used this book to teach a course. It definitely encourages you to think of programming as a means to an end, and not a skill in and of itself. That is completely fine IF that is what you want, and from your post, it sounds like it is.

If you find you'd like to dive a little deeper, I enjoy the Think Python book as a more "mathematical" and "rigorous" introduction. That doesn't mean it's harder. It just means it has a different approach and end goal!

[–] TwilightKiddy@programming.dev 6 points 1 year ago (1 children)

Another C# gang comment here.

I'll try not to repeat what others said.

C# has one of the best debuggers in the industry. Debugger is a thing that lets you stop your program at a set state and investigate values of variables in that state. Very useful for education. The thing is incredibly easy to set up in Visual Studio right out of the box and is a matter of installing another extention in VS Code.

C# is in C syntax family, which includes C, C++ and Java. While you'll have to learn some syntax quirks to switch languages, they are not as drastically different as Python, for example. If your intention is getting into game development, setting a base for C++ is a nice bonus.

C# is strictly-typed. Unlike Python, Lua or JS that I saw in this thread, C# requires you to specify types of your variables. While it may sound as a disadvantage at first, it is actually extremely useful catching silly mistakes. Like if you make a string and pass it to a method that expects integer, C# simply won't compile, you'll have to explicitly convert your string to integer. JS is notorious for it's ('b' + 'a' + + 'a' + 'a').toLowerCase() > "banana", which is extremely hard to follow if you're learning the language IMO.

If you're trying to build games with big game engines like Unity or Unreal Engine, C# is a no-brainer, as they support it natively. Godot has it's own language, but it has an option to switch to C#, so, you can cover all of them with one language.

Windows Forms. It's a package for developing GUI applications on Windows. Visual Studio comes with it and has a designer for it. If you want to learn how to make a simple GUI application, that's one of the easiest routes. Worth noting, if you're not on Windows, that thing is not that easy to use.

Here is an official "get started" guide: link.

[–] Klajan 2 points 1 year ago

Another great point about C# is the Documentation Microsoft provides. It covers concepts, most functions and types, is detailed and has mostly good example code. There are also a lot of good tutorials around.

The dependency management is a bit less intuitive than it is for python, but still less work that for C++.

[–] AbelianGrape 6 points 1 year ago* (last edited 1 year ago) (1 children)

If you want to make simpler games, you could start with scratch or stencyl. These tools aren't really programming languages per se but they let you build programs out of blocks that are much easier to visualize and play around with. There's some research that suggests they are good entry languages and some research that suggests they aren't, so ymmv. I've used both, but I knew how to program already.

For the record you shouldn't let "usually made with" drive your decisions. Java is still popular for some games. Slay the spire, a very popular deck building game, was written in Java, which is a decently popular choice if you want to support modding. But C++ and C# are more popular simply because that's what you use if you're using engines like unity or unreal.

side note: C, C++, and C# are all different languages.

[–] raccoon@lemmy.ml 1 points 1 year ago (1 children)

I knew they are different but I also assumed they're at least similar, is that a wrong assumption? Will learn one make little difference if I learn another after?

[–] AbelianGrape 1 points 1 year ago* (last edited 1 year ago)

Learning how to program in any language will make it easier to pick up any other language, because the main burden for a beginner is how to think programmatically. However once you're enough past that wall, being an expert on one language will mostly only help pick up languages that are similar. So if you knew C++, you could pick up the syntax and probably most of the semantics of the others very quickly, because they are similar in that regard. But you'd still probably struggle to actually program in C, because C is lower level (has way fewer features) than C++.

Technically speaking, C is a subset of C++. But that doesn't mean being a good C++ programmer automatically makes you a good C programmer.

C# is similar to the other two in syntax as well, but it's much more like Java than either of them.

[–] rei 6 points 1 year ago (1 children)

I think C# was easiest for me to learn. I'll go a bit against the grain and say python was more challenging for me in particular. Setting up interpreters and using pip and venvs wasn't my thing, but you may have no issue.

[–] raccoon@lemmy.ml 1 points 1 year ago

That's interesting how for some people the same languages can be the opposite. Maybe I'll start with one and if it goes poorly I'll try the opposite side.

[–] kittenroar 6 points 1 year ago

Check out exercism.org - it has sequences of projects in increasing difficulty level in 66 languages. It is very user friendly and provides nice structure for getting started, without the pressure and stress that a classroom environment might introduce. As for the language, pick whichever one interests you.

[–] Jummit@lemmy.one 5 points 1 year ago* (last edited 1 year ago) (1 children)

I can recommend Python, Lua or JavaScript. All are interpreted languages so you don't have to worry about setting up a build step, and the languages are solid and should be possible to learn without prior experience.

If you want to make games, don't worry about learning a specific programming language at first. You can transfer your skills pretty well when it comes to programming.

And if you are stuck you could try visual languages like MakeCode or Scratch.

[–] raccoon@lemmy.ml 1 points 1 year ago

Thank you, it's pretty encouraging to consider that skills transfer relatively easy if I do decide to move onto something else, it's not something I considered.

[–] 601error@lemmy.ca 5 points 1 year ago (1 children)

Python is easy to learn and marketable. I personally prefer Ruby to Python, but Python is a good place to start. For most AAA games, it’s C++, and yes it’s horrendously complex. I vastly prefer Rust to C++. Good old C is actually a fairly small language, and only moderately difficult.

[–] raccoon@lemmy.ml 3 points 1 year ago (2 children)

Thank you for your post, before this thread I thought that all the C named languages (c, c++ and c#) were at least similar but it looks like it's not the case.

They share a genealogy, but as programs are created and maintained in different languages, developers come to wish for different syntaxes that would (1) reduce how much code must be written to accomplish a common logical task, (2) make the code that's written easier to read/understand, (3) reduce concerns about variable types until runtime, and/or (4) overly restrict not just the variable types but also if/when variables can be modified. This list is not exhaustive.

There is a partial programming language family tree here, showing which languages influenced other languages: https://www.researchgate.net/figure/Genealogy-of-Programming-Languages_fig36_260447599

[–] 601error@lemmy.ca 1 points 1 year ago

C derivatives are similar in terms of things like imperative control flow, lower-case keywords like if, mostly insignificant whitespace, { }-delimited blocks, etc., but they can be vastly different in terms of features, semantics, idioms, and typical use cases.

It's like how non-programming languages can use the same Latin alphabet but be vastly different in terms of grammar and culture.

[–] yardy_sardley@lemmy.ca 5 points 1 year ago* (last edited 1 year ago) (1 children)

I would highly recommend python. It's fairly simple syntactically, which makes it less overwhelming someone who's just looking at code for the first time. It doesn't force you to learn about functions and classes right away, like other languages would, so you can focus on the real basics until you're ready to tackle the more abstract stuff.

The fact that it's on the 'simpler' side doesn't make it any less powerful, either. It's one of the top languages used for neural net AI and data science. It's also really great for throwing together a spur of the moment script when inspiration strikes, to automate a really boring task, for example. And yes, you can also make games with it.

Plus, the fundamental concepts that you use to solve problems with python are mostly the same in every language, so once you get proficient in one language, you'll be able to pick up other languages much easier.

Whichever language you do end up choosing, good luck on your journey!

[–] raccoon@lemmy.ml 1 points 1 year ago

Thank you very much for the post and the good luck :) Python does seem to be the most recommended language in the thread so it's likely I'll go for that, I'll take a loot.

[–] kool_newt 4 points 1 year ago (1 children)

I suggest learning Ruby, it's a lot nicer and easier to learn than many others in my opinion. You can learn Crystal at the same time, it's got very similar syntax but it's a compiled language so super fast.

[–] raccoon@lemmy.ml 2 points 1 year ago (2 children)

Thanks, ruby was another language I saw in the thread popping a few times, the first one being python. I I was told a few things python can be good for, can you give me a few examples of good uses for ruby just to have a vague idea?

[–] kool_newt 3 points 1 year ago

Ruby and Python are applicable in most of the same areas. I'm currently working on a realy simple Ruby project and using a web framework called Sinatra (kinda like a lightweight Ruby on Rails if you've heard of that) that makes it super easy to build web apps and APIs. My ruby app basically queries an API, sorts some data and presents it to my companies management as they need it.

Python is great too and more popular, thought I'm not really a fan as I don't like when languages enforce white space. Python also tends to have an "attitude" like there is only one way to do a task, whereas Ruby is more flexible in this respect. Also, Ruby is fundamentally "object oriented" , Python has some object orientation but it was added on as an afterthought so Python can be a bit mixed depending on which libraries you choose to use.

If you don't know what object orientation is, it means "everything is an object". In functional languages you'd count the letters, in Ruby you ask the object for it's length property.

This is Ruby, using the IRB command line interpreter (shell)

irb(main):001:0> word = 'bicycle' => "bicycle" irb(main):002:0> puts word.length 7 => nil irb(main):003:0>

[–] Kache@lemmy.one 2 points 1 year ago* (last edited 1 year ago)

Ruby has carved space for itself in web application development, but has limited popularity in in other domains. In comparison with Python, Ruby has fewer "old warts" and feels more internally consistent. In a similar manner, both the community and newcomer experience are more cohesive and are considered more friendly, compared to Python.

[–] variouslegumes@reddthat.com 3 points 1 year ago

Try out Godot. It uses a really simple language (gdscript), has excellent learning material, and you can make games!

[–] Kache@lemmy.one 3 points 1 year ago* (last edited 1 year ago)

If you're coming into programming from zero, try Hedy.

It's a gradual progression textual programming language specifically designed for teaching and learning. At the last level of progression, it's just Python. The link above lets you get started right away in the browser with no setup, in your native language (English or otherwise).

If you're not coming from zero, you might want to jump in a little deeper into C# (even though it has a higher "low bar" of strictness and structure, which can stumble "from zero" learners) and beeline towards your goal of making games, considering the ecosystem of Godot and Unity.

[–] GraceGH 3 points 1 year ago (1 children)

If your intention is to make games, I reccomend Gamemaker Studio 2. If the pricing model is something you're not willing to work around (and trust me im still kinda salty about the change so i get it) Godot seems to be the move for 2d development.

GMS2 works on its own scripting language called Gamemaker Language, or GML. I'm told its similar to JS kinda. I used to redirect people to the r/gamemaker discord, but if you're in the fediverse that might not be something you care to do. The community there rules though and is always happy to help people learn.

I think Godot is on c#? I haven't used it yet, but it's open source so if that's important to you go for it.

Personally, I use Unity3d now, but I wouldn't reccomend jumping right into that. C# can be kind of challenging (but highly rewarding once you know what you're doing. serialized variables ftw)

[–] raccoon@lemmy.ml 1 points 1 year ago

My main focus is to learn a programming language, I tend to work better when I know I can do something fun and making games seemed like as good a goal as any other since I do play games a lot. I feel like the satisfaction of being able to see my sprites move would be an incentive, but it's definitely not my main end goal, just a nice side effect.

[–] livingcoder@lemmy.austinwadeheller.com 2 points 1 year ago* (last edited 1 year ago)

My first programming language was QBasic, then Visual Basic, then Java, then C# (most experience with), then C++, then Python, and now Rust. Only when I learned C++ in college did I truly grasp the power of memory management. I think it's important for new programmers to have some understanding of and experience with pointers, but it doesn't need to be your first language. I think it's okay to start with Python or C#, but you'll want to go back and learn the hard stuff at some point (C++ and then Rust). Python will be super easy to learn the basics (data structures, algorithms, etc.). C# is also a good choice, but has you learning a few more things at the same time you're trying to learn the basics.

[–] shakesbeare 1 points 1 year ago

I would 100% recommend anyone who is serious about programming to learn C first. The syntax is very simple and the language is pretty easy to use. It also gives you a peak under the hood at how all programming languages work because it exposes a lot of control to you.

If you are intimidated by the difficulty of C (which I don’t think you should be — the hard one is C++), start with whichever language matches your interest:

Web dev: JavaScript Game dev: C# AI: Python

But also, remember that a programming language is just that. A language you use to express your ideas. A skilled, highly employable developer will know many languages even if they only use one at their job. Always seek new information and try and advance your learning. The syntax of a language is a pretty minor part of the journey overall and the least important part for a beginner. It’s all about learning how to think and how to express complex processes in a way the computer understands. The language just tells you what words to use once you can already do that.

[–] furrowsofar 1 points 1 year ago

Consider what platform you want to target too. Windows, Linux, Android, Web, OSX, iOS, etc. They all have different best platforms. Generally best to use preferred development tools for that platform.

First language highly recommend Python. You could play with the standard Turtle Graphics, and then the Tkinter GUI kit that is part of the standard kit. Kind of primitive but a good start. Depends on how fast things need to be too. Not fast enough for say 3D stuff. Maybe simple 2D or text game.

For high end games, you want one of the faster solutions and also consider the game kits your going to use. This is not exactly easy stuff and quite technical. Java, C#, C++, and maybe Rust are good things to look at depending on platform. One can also extend Python with C and get good speed to. So some choices. Interestingly too Javascript can be quite fast these days too but that is more web based development, but there are ways to do desktop and mobile aps with web tech. So a lot depends on your goals and kind of tools you want to use.

[–] nyan@lemmy.cafe 1 points 1 year ago

Games can be written in literally anything—if that's your primary interest, you might want to look into Lua and Love2D, or Python and pygame (as has already been suggested). Both Lua and Python are good beginner's languages—Lua because it's small but versatile, Python because it's popular for that purpose and has good tutorials.

C# . . . isn't a bad language, but it's a bit bloated, so I wouldn't choose it for a beginner—save it for when you're proficient and looking for a second or third language. Other languages I would not start with would include Javascript and PHP (because both have hidden inconsistencies that can trip you up), Perl (I love it, but it looks like line noise half the time), and C and C++ (manual memory management, which makes a lot more work for you with no real benefits unless you're writing an OS kernel or something).

What you need to do is learn to think like a programmer, regardless of language. Anyone who's been programming for ten years or so will have gone through several languages as their needs change.

[–] Coldpot8oes@lemm.ee 1 points 1 year ago

I feel like that all the time! I like Python, I find it fun and easy to dip your toe into. Hope you find something!

load more comments
view more: next ›