39
submitted 1 month ago by amldvk@lemmy.world to c/asklemmy@lemmy.world

How do I go about this? Are there any free resources that’ll help me get started?

I see people advising to start with a small project, but you need to get some basics down right? What language? How to develop it and stuff?

My only experience is some very basic C programming classes I took during school.

top 33 comments
sorted by: hot top controversial new old
[-] slazer2au@lemmy.world 14 points 1 month ago

Harvard CS50 on YouTube might be a good start. Teaches python and you can then pivot to another language from there.

[-] amldvk@lemmy.world 4 points 1 month ago

Looks interesting, I’ll check it out!

[-] Passerby6497@lemmy.world 12 points 1 month ago

Realistically, you should still find a project that you want to do and use that as the basis of your learning, as that will influence your language of choice,. I'd start with either python or powershell stuff to get going, as both are general purpose, multiplatform languages that can do a lot and are moderately forgiving with syntax and stuff.

Past that, find a project that interests you, break down what needs done, and learn those steps individually. It's not as cohesive as a hand holding hello world style tutorial, but I found I learned so much better if I had a need for the knowledge instead of just learning for it's own sake.

In my case, I picked powershell as I'm a windows admin. Since I'm a data hoarder as well, I chose a video conversion pipeline to convert all of my movies into a consistent file format. Part of the requirements are to find all files with an extension that isn't my standard (concepts: file listing, filtering, working with objects) and then execute an external program to convert the files (concepts: command line execution, state management, error handling, looping), validate the conversion completed successfully (concepts: reading file content, filtering/regex), moving the files to a new location or replacing the file with the new one and backing up the original (concepts: file management), and log file retention and cleanup. As I developed my script, I also began learning to properly "function-ize" my code to make things more readable/usable, and eventually started moving functions into a module to better modularize my code.

A decade later and I'm currently in the middle of a couple of projects using powershell to make and call API functions to automate business services at work.

[-] Geometrinen_Gepardi@sopuli.xyz 2 points 1 month ago

As I developed my script, I also began learning to properly "function-ize" my code to make things more readable/usable

I also started with Powershell, and not by reading guides/books. I got pretty good with using the pipeline, loops, etc. but my code was terrible soup with no re-usability. Later I learned JavaScript and realized how important it is to think about functions first when writing scripts. Makes everything easier and smoother.

[-] Passerby6497@lemmy.world 1 points 1 month ago

Yeah, it definitely helps to plan things out ahead of time, but I've had decent luck with refactoring a code block into a function to reuse code or cleanup sections. But I definitely try to make it into a function first when I can since it's less work than going back and fixing stuff, but sometimes a simple code block blows up or you need to reuse it later.

[-] amldvk@lemmy.world 2 points 1 month ago

Wow, thank you for the detailed response. I do have ideas for what kind of stuff to work on, especially after your great example. Thank you again!

[-] Passerby6497@lemmy.world 3 points 1 month ago

You're welcome! Coding has been my passion since I was in high school, and I understand how hard it can be to wrap your head around the concepts, even with formal schooling on the topic. To the point that I've learned so much more on my own than I did in school just because my passion allowed me to internalize the knowledge instead of just learning it.

Best of luck on your adventure!

[-] amldvk@lemmy.world 2 points 1 month ago

I remember a time in my life, back when I was trying to learn C. Every time I saw a problem my brain directly started breaking it down in to steps. How to solve this consistently, think about edge cases, etc.

I want to get that back!

[-] nightwatch_admin@feddit.nl 6 points 1 month ago

https://scratch.mit.edu/
Also, before starting writing code: learn to break down things small things.

[-] technomad@slrpnk.net 2 points 1 month ago

Could you elaborate please?

[-] nichtburningturtle@feddit.org 2 points 1 month ago

The visual coding style might help with learning the basic approach to problem-solving.

[-] nightwatch_admin@feddit.nl 1 points 1 month ago

Scratch is a coding tool and system that is primarily targeted at children, and relies strongly on a visual way of working. It is easy, can be switched feom visual to text, and ultimately switched to python.

[-] MentalEdge@sopuli.xyz 6 points 1 month ago

I learned using python.

I've yet to find anything that would have been a better place to start, and the concepts you pick up coding almost anything are extremely transferable.

A small project is good because it doesn't just teach you the basics, it makes you apply what you learn to actually do stuff.

I write little python scripts to do various things all the time. Most recently I made one that automatically posts the next comic strip to !moomin@sopuli.xyz.

My recommendation would be to come up with something like that, then start figuring out how to do each step of accomplishing the task you want the code to do, then putting it all together. Look things up a lot, use print() often, and trial and error your way to the goal.

You could also read guides or watch videos, but personally I learn WAY faster by just doing.

Reading the code, making changes based on how I think something should work, then being proven right/wrong also seems to give me a better understanding than just following instructions.

[-] kambusha@sh.itjust.works 4 points 1 month ago* (last edited 1 month ago)
[-] TheBananaKing@lemmy.world 4 points 1 month ago

I know you've heard it, but seriously, the biggedst hurdle to learning programming is having a solution looking for a problem. You can learn all kinds of stuff in the abstract, but your brain will either handwave over it or bounce off, if it can't contextualise the knowledge into a problem-solving tool.

A source of small but genuine needs is the scarcest resource.

I know the world has moved on to big cosy high-level languages that let you think semantically about everything but honestly I'm still a big fan of starting with C; it is something of an austere discipline, but it gives you a boots-on-the-ground view of the problems you're working with, and I think that really helps shape your understanding of what you're dealing with.

(you could do a fair bit worse than the game 'human resource machine' for a slightly gentler introduction, then pick up some exercises in C, then move to python or similar - it will let you appreciate the cosy high-level stuff, and have a better feel for why you're doing stuff)

[-] amldvk@lemmy.world 1 points 1 month ago

My only real exposure to coding is C in Turbo C++ it was not a nice surprise when I later looked at other IDEs and was not sure where to begin. Maybe I’ll just get started with Turbo again lol.

[-] SpicyTaint@lemmy.world 3 points 1 month ago

I've been going through The Odin Project for full stack web development. It's been great and is completely free.

I would advise against using Chat GPT or any other LLM; they "hallucinate" and can give you wrong information.

[-] python@programming.dev 3 points 1 month ago

I personally really liked https://learnjavascript.online/ when I was just getting started with JS. I use the knowledge from that course like every day at work now. The same guy also made a general programming course for beginners, I bet it's good as well: https://learnprogramming.online

What I especially liked about the course was that you got little assignments between each lesson, that you could just solve in their web IDE. So there's no fiddling around to set up an external IDE. Big big plus for me, I hate setting up stuff like that

[-] vin@lemmynsfw.com 2 points 1 month ago

I too would recommend that you start with something small that you want to build and google the best language for it and a guide.

[-] mrnarwall@lemmy.world 2 points 1 month ago

I always recommend https://automatetheboringstuff.com/ as it helps teach you python basics, as well as learning some coding fundamentals. Its free at the website, while offering a book version you can purchase. I have been coding in python professionally for 5 years, but I started with these tutorials (after doing a non-python coding bootcamp that focused on full stack web development)

[-] Eheran@lemmy.world 2 points 1 month ago

Not sure why nobody mentioned it, but use GPT or whatever you like to create code for you and explain everything. It is like talking to someone with some experience. Not everything is perfectly correct etc. if you get into more complicated stuff but you will certainly learn a lot and fast. The learning curve got a lot flatter with these tools.

[-] GBU_28@lemm.ee 2 points 1 month ago

What type of idea do you have? You can "generally" use any of the popular languages, but some are better suited to rapid/beginner use for certain applications

[-] amldvk@lemmy.world 1 points 1 month ago

Some linux iso management, some CAD software steps that I want to automate. My very general target is to get comfortable with trying to look up documentation, scripting and make my own code bashes for local use cases.

[-] GBU_28@lemm.ee 3 points 1 month ago* (last edited 1 month ago)

Interesting. One avenue of research I've found is to start with the target system and learn what interface they offer. Is it an API, a custom socket, etc. Then work back... you'll have some clues to make a language selection

[-] zout@fedia.io 2 points 1 month ago

Dr Chuck has some courses for free. They consist of youtube tutorials, books an slideshows.

[-] intensely_human@lemm.ee 1 points 1 month ago

Just search for tutorials, and then follow the steps in them.

[-] gofsckyourself@lemmy.world 1 points 1 month ago

One thing that has not been mentioned that will make a big difference: join an online community.

When you get stuck or you're confused and need to ask a question, you need to have a place you can reliably go to for that. You will also be able to see others go through their learning journey which will encourage you to keep going.

Someone mentioned The Odin Project already, but they have a very big and wholesome community.

My specialty is web development, but the concepts of programming is pretty universal. Feel free to DM me personally if you want some help.

[-] insomniac_lemon@lemmy.cafe 1 points 1 month ago* (last edited 1 month ago)

I have a similar issue... I have done slightly more than nothing, I really struggle trying to think of small projects that actually work for me.

The few things I've done I stop at a certain point because I have no motivation for the actual content* or there are platform* issues. One thing I made was maybe usable but was likely too much** of a time sink for me.

Though I keep trying other things hoping enough pieces fit that I can think of something.

EDIT: I don't know if it is any help but what I've mentioned were text formats+loaders.

spoiler

*=An adventure book (...if you go right, turn to page 100) reader (via declarative GTK framework). Using text files per page, allows linking to other pages (4 option IIRC, custom button name+description). Text was too small on buttons (no dynamic scaling), especially as I wanted to maybe use unicode 🔍

**= Polygon reader for Raylib (via bindings). Using text files, some data lines at top then an ASCII grid with manually-ordered points (1-9, A-F etc, mostly blank space for simple shapes) to create a seq[Vector2]. Unsure on usage (what users would use+understand more) of polygons that need different vertex order, trianglestrips vs trianglefan. For usability, I was thinking of making an editor for it.

I'm using Godot now and leaning more toward 3D (because vertex colors) and all I can really think of is maybe something like archery. Maybe a wizard boomer shooter, if that wasn't such a high goal.

[-] 1984@lemmy.today 1 points 1 month ago* (last edited 1 month ago)

Just start with python or node.js and do some tutorial. :) If you want to get good, you should read a book though. There are many details about a language that online tutorials don't cover.

[-] Anticorp@lemmy.world 1 points 1 month ago

CodeAcademy.com used to have great free classes, but idk if they're free now. The language you choose depends on what you want to do. Share more details about what sort of stuff you want to code. You develop your coding skills through use, and practice. Pick a project slightly above your skill level and do it. You'll learn a lot during that project and retain the information much more than if you were just going through a tutorial. Then pick another project slightly above your new skill level and do that too. Repeat for 20 years.

[-] JoeKrogan@lemmy.world 0 points 1 month ago* (last edited 1 month ago)

I'd say install linux first as it will make things easier as python is built in and ts just a better OS all around.

As for getting started you can use youtube Or some free books such as

https://automatetheboringstuff.com/ https://inventwithpython.com/

And more here https://pythonbooks.org/free-books/

After a few videos and a book you will get the hang of it and get more confident in your abilities. Then do a project of your own

There are other languages but python will allow you to make progress fast and you can branch out to a different language later of if you like.

[-] amldvk@lemmy.world 1 points 1 month ago

I really wish I could run Linux but almost all of the software I use for work is only on Windows.

But I will say I am decent in following instructions and using the cli. My mum’s system runs linux and that has been a learning experience.

[-] JoeKrogan@lemmy.world 1 points 1 month ago

Fair enough, you can always do it on windows too or use a virtual machine

this post was submitted on 04 Dec 2024
39 points (97.6% liked)

Ask Lemmy

27723 readers
684 users here now

A Fediverse community for open-ended, thought provoking questions


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.


6) No US Politics.
Please don't post about current US Politics. If you need to do this, try !politicaldiscussion@lemmy.world or !askusa@discuss.online


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 2 years ago
MODERATORS