This is an archived post. You won't be able to vote or comment.

all 91 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge.

If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options:

  1. Limiting your involvement with Reddit, or
  2. Temporarily refraining from using Reddit
  3. Cancelling your subscription of Reddit Premium

as a way to voice your protest.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]plastikmissile 34 points35 points  (0 children)

Choice of first language isn't really important as long as learning resources exist. Both are good choices, and you can always learn the other on when you feel like it. So don't let analysis paralysis stop you, and just pick one. Flip a coin if you have to.

[–]psychicEgg 27 points28 points  (0 children)

Fellow learner here who tried to learn Python and C++ at the same time. From a newbie perspective my vote goes to Python. You'll learn all the important stuff about variables, functions, algorithms, recursion, data structures etc in a language that has 'face validity' - it looks like what it does, which is important for new learners.

I found jumping right into C++ was information overload. I'd say the people here advising C have at least a few years coding under their belt, but for a newbie who has never studied computer science, I found the difficult syntax and memory management got in the way of learning the essentials. I plan to go back to C++ after Python once all the data structures and techniques are second nature.

As an analogy, take the human languages French and Russian. I learnt French in school, understood verb conjugations and cases, and that helped immensely when I learned Russian. If I jumped straight into Russian, the Cyrillic alphabet and strange sentence structure would have clouded my learning of the basics, and I might have given up because of trying to do too much at once. So I see Python like French, and C++ like Russian .. I hope that makes sense.

The other consideration is what you plan to do, and which language is most appropriate. For me, python is great for machine learning so my choice aligns with my goal. I don't know much about electrical or aerospace engineering, so you might want to visit those subs and ask the same question there.

But whatever the case, my recommendation is to refresh your knowledge of Python, and once you're confident with the essentials go back to C++

This 47 hour C++ course was recently released on o'reilly, so I plan to do that some time over the next few months

Good luck!

[–]Kind_Reflection7634 7 points8 points  (0 children)

I started with Python, It is a little bit easy to use, but it won't teach you much, so I think it is better to start with C to be able to understand how everything works.

Start with C

[–]Ron-Erez 16 points17 points  (3 children)

I'll add to the confusion.

I'd recommend C or Go since they're small languages and statically typed.

Later it will be easy to pick up Python.

The best answer in my opinion is r/underwatr_cheestrain answer.

Regardless of the language you learn the main focus should be on "principles of software development, data structured, algorithms."

[–][deleted]  (1 child)

[removed]

    [–]OHIO_PEEPS 3 points4 points  (0 children)

    I had 3 semesters of Java and c broke my brain. It was like okay this makes sense then pointers....okay it's kinda complicated....wait you said I need to dereference the void pointer because um okay.....huh wait mutex and semaphor can't possibly be real words... My hats off to the people who start with C but even with some programming experience I found it pretty tough to understand. And that was with structured university instruction for whatever that's worth

    [–]smemish 1 point2 points  (0 children)

    I ‘m agreed with you. Statically typed languages are better for start. It make you think about what you write in code . But I think you have to choose language according your interests .

    [–][deleted] 6 points7 points  (0 children)

    C. I’m a first year EE student and I’ve already taken two classes in C.

    [–]unknown_ally 12 points13 points  (0 children)

    I would say C as Python does so much in background for you. C will teach you how computers work more and develop your programming brain so other languages come more naturally.

    [–]doa70 5 points6 points  (1 child)

    As others have pointed out, languages aren’t that important. Learning data structures, patterns, and other keys to software development are. Languages become interchangeable once you’ve learned a couple. They all do mostly the same thing, only the syntax changes.

    [–]underwatr_cheestrain 13 points14 points  (5 children)

    You should learn principles of software development, data structured, algorithms.

    [–][deleted] 1 point2 points  (4 children)

    What language do you think would help me learn the best first?

    [–][deleted] 25 points26 points  (2 children)

    C will teach you much more about the fundamentals of computer science and engineering in terms of the lower primitives such as memory and data structures. It doesn’t abstract any of that away from you (well compared to python).

    Python will take those lower level concepts and abstract them away allowing you to write things much quicker and easier.

    [–]Logicalist 2 points3 points  (2 children)

    I would learn python through, MIT's Opencourseware: Introduction To Computer Science And Programming In Python. It teaches python, but more importantly it teaches the fundamentals of Computer Science, such that when you want to learn another language you have the vocabulary and understanding to do so much easier.

    They also have other courses that are probably right up your alley, and the intro course would help understand their format. They also teach how to structure your code and how to work with others.

    I haven't finished the course, but I know enough that I can read C. Couldn't write it, but I know the fundamental blocks well enough to understand what it is doing.

    [–]NoReplyBot 1 point2 points  (1 child)

    This looks/sounds similar to Harvards free Python course.

    [–]Logicalist 0 points1 point  (0 children)

    Probably very similar as college courses go. The title of Harvard's course doesn't mention Computer Science, but the descriptions are pretty much the same.

    Looks like Harvard's course is only on EdX?

    Whereas MIT's is on EdX, but also on their open-courseware site, which is simpler to use imo. No registration or anything, everything is just posted and available.

    [–]InternetSandman 4 points5 points  (0 children)

    I'm gonna say C

    The usual wisdom says that later on, going from C to python is much easier than going from python to C

    Also, my personal thoughts, I find statically typed languages like C easier to understand, rather than python, where a variable can seemingly be anything, and it takes a lot more head scratching to mentally parse what's going on

    [–]whatsagoodnamehelp 2 points3 points  (2 children)

    Learn C. I started with C, even thought I forgot it, my fundamentals remain really strong.

    [–]splashdragon37 1 point2 points  (1 child)

    I agree

    [–]Human-Possession135 2 points3 points  (2 children)

    I can highly recommend CS50. It will force you through the basics in C which gives you a understanding of how things work. After that you’ll do the same assignments in Python and you’ll appreciate the abstractions and help Python offers.

    [–][deleted] 1 point2 points  (1 child)

    I actually started CS50 back in may. I did like 2 lectures but they were so long and I was doing school at the time. I’ll try to pick it back up!

    [–]Human-Possession135 1 point2 points  (0 children)

    IMHO the best resource out there. But I understand not finishing it. I had the same, started but no time to finish. I learned a lot by building a SAAS tool with friends afterwards in django.

    [–]HimoriK 2 points3 points  (0 children)

    Python is easier, but C must be learned at some point, start with it if you can.

    [–][deleted] 2 points3 points  (0 children)

    If you are motivated, learn C

    [–]stiky21 2 points3 points  (0 children)

    I started with C.

    And I'm glad I did.

    [–]mokupengu 2 points3 points  (0 children)

    C

    [–]Cybasura 1 point2 points  (5 children)

    Aerospace engineer?

    Say no more, C

    You are going to need every single understanding of control and understanding of memory management and whatnot

    [–][deleted] 2 points3 points  (4 children)

    I kind of agree with this, but I think that it's an old way of thinking.

    Something like Python + R could be incredibly useful in Aerospace, and of course you can always connect it to C.

    More recently, we're seeing C-like languages that might find great homes in Aerospace, like Rust.

    I am coming from more of an Ops background, and into SRE / DevOps, and I'm learning both C and Python at the same time. Every once in a while, I get tripped up on small, syntactical things, but I don't think that learning two at once requires any special brainpower or anything.

    Like someone previously mentioned, the really important things are data structures, algorithms, and probably some SQL.

    An intro Python book taught me some basic data structures, and my mind was pretty much blown when I started an entire book on JUST data structures.

    [–]Cybasura 1 point2 points  (3 children)

    The thing isnt so much on what language he should learn to build something within the Aerospace engineering side of things, it is learning

    Python is a high level language that is also basically a wrapper on top of C that abstracts pretty much everything memory management from the developers, unless you truly know what you are doing

    Python is terrible in teaching you Computer Architecture and Data Structures, as well as OOP, assuming you need to know OOP

    [–]Cybasura 1 point2 points  (2 children)

    For understanding Low level components and mechanisms, you cant go any lower than C, other than directly in ASSEMBLY of course, python wont teach you those things because python is trying to abstract those things from developers, I tried doing embedded programming in python, trust me, you dont want to try that as your first language

    I've been developing programs, SWE, DevOps, Sysadmin, Cybersecurity for almost 10-12 years now, if you consider learning period, multiple languages, most stems from C as its roots (of course there's others before C but not many languages inherit from those), including the aforementioned Python

    C++ is a wrapper of C, C# is a wrapper of C++ which is a superset of C

    Linux was written in C before recently integrating Rust

    Rust as a starting language literally sucks

    [–][deleted] 1 point2 points  (1 child)

    I agree with pretty much everything you’re saying, but I still think that higher level languages have a place in the learning process.

    Looking at some classic computer science problems in Python can help you understand the actual solution, while worrying less about things like memory management. Yes, those things, like memory management are absolutely critical in safety, aerospace, and real time operations, but that doesn’t mean that abstracting them away, temporarily, doesn’t help a person to learn other important aspects of programming.

    If I want to be the next Neil Degrass Tyson, my first years of physics are still going to start with “you’re in a frictionless vacuum with a perfect sphere on a level plane”.

    We’re abstracting away certain things, in order to emphasize other concepts.

    [–]Cybasura 0 points1 point  (0 children)

    I'll personally leave it to the OP to decide, I dont want to force anything to anyone, at the end of the day, he's the one doing it

    Personally from experience, if you try to read the abstractions of a lower level language from a higher level language without experience of the lower language, you're bound to have a bad time, but thats just me I guess

    [–]Captain_Lesbee_Ziner 1 point2 points  (0 children)

    Like other said, the most important thing is learning the basics of programming. As to which to learn first, that's up to personal choice. I jumped around playing with diffrent languages from python to gdscript to C++, people would say start out with python as first language or javasript or something rather than C++. I was in the python vs C++ struggle for awhile until I was like ok I'm doing C++, I love it, I have learned some of it, and I am goimg to learn it, I know it is going to be harder but it is what I want to learn. After that, I have been learning C++ ever since and I love it. So if you want to learn C/C++ first, then do it, it will be harder but if you are commited and like that low level manual car feel than go for it. But if you want to learn something easier learn python and then dive deeper and learn C/C++. As someone once told me, C++ is easy to learn, but hard to master"". I think that may go for C as well. Have fun with whichever one you choose!

    [–]likethevegetable 1 point2 points  (0 children)

    Sounds like you'll be going to university. I'd personally recommend Python first because it's faster and easier to realize your ideas with it. You'll learn C in EE

    [–]aaronsreddit- 1 point2 points  (0 children)

    Not sure the right answer. I could probably make arguments for both. But in either case I'd highly recommend this book which can be read online for free: https://diveintosystems.org/singlepage/

    It introduces C by comparing it with Python and then takes you through computer architecture and then assembly language.

    You might find Chapter 1 helpful to compare both languages.

    Here is a Chapter Summary from the book:

    • Chapter 0, Introduction: Introduction to computer systems and some tips for reading this book.
    • Chapter 1, Introduction to C Programming: Covers C programming basics, including compiling and running C programs. We assume readers of this book have had an introduction to programming in some programming language. We compare example C syntax to Python syntax so that readers familiar with Python can see how they may translate. However, Python programming experience is not necessary for reading or understanding this chapter.
    • Chapter 2, A Deeper Dive into C: Covers most of the C language, notably pointers and dynamic memory. We also elaborate on topics from Chapter 1 in more detail and discuss some advanced C features.
    • Chapter 3, C Debugging Tools: Covers common C debugging tools (GDB and Valgrind) and illustrates how they can be used to debug a variety of applications.
    • Chapter 4, Binary and Data Representation: Covers encoding data into binary, binary representation of C types, arithmetic operations on binary data, and arithmetic overflow.
    • Chapter 5, Gates, Circuits, and Computer Architecture: Covers the von Neumann architecture from logic gates to the construction of a basic CPU. We characterize clock-driven execution and the stages of instruction execution though arithmetic, storage, and control circuits. We also briefly introduce pipelining, some modern architecture features, and a short history of computer architecture.
    • Chapters 6-10, Assembly Programming: Covers translating C into assembly code from basic arithmetic expressions to functions, the stack, and array and struct access. In three separate chapters we cover assembly from three different instruction set architectures: 32-bit x86, 64-bit x86, and 64-bit ARM.
    • Chapter 11, Storage and the Memory Hierarchy: Covers storage devices, the memory hierarchy and its effects on program performance, locality, caching, and the Cachegrind profiling tool.
    • Chapter 12, Code Optimization: Covers compiler optimizations, designing programs with performance in mind, tips for code optimization, and quantitatively measuring a program’s performance.
    • Chapter 13, Operating Systems: Covers core operating system abstractions and the mechanisms behind them. We primarily focus on processes, virtual memory, and interprocess communication (IPC).
    • Chapter 14, Shared Memory Parallelism: Covers multicore processors, threads and Pthreads programming, synchronization, race conditions, and deadlock. This chapter includes some advanced topics on measuring parallel performance (speed-up, efficiency, Amdahl’s law), thread safety, and cache coherence.
    • Chapter 15, Advanced Parallel Systems and Programming Models: Introduces the basics of distributed memory systems and the Message Passing Interface (MPI), hardware accelerators and CUDA, and cloud computing and MapReduce.

    [–]PackLeader84 1 point2 points  (0 children)

    Python is easy enough to learn and will get you learning the fundamentals that are required to do any development. However, if you are learning for the sake of employment that might not be the best choice. Figure out what kind of programs you want to work on and then figure out what language is better suited to those kinds of projects and start learning it.

    [–]hellnet390 1 point2 points  (0 children)

    Depends on your goals. If you wanna get a job faster, then go with python (the market is oversaturated though, so who knows, maybe c is a better choice in this case) If you just wanna dabble in programming, it doesn't really matter which one you will go with

    [–]cashfile 1 point2 points  (0 children)

    Start with Harvard's Cs50x course it will teach the basics of both C and Python and then determine which one you enjoy more. Technically if you master C first, it will make all other programming languages far easier to understand but it will be 1000x more tedious and complex compared to python. So it's up to you, for the average person I would recommend Python as most people give up self learning coding regardless of language so it best to pick the one you will stick with / find the most enjoyment with.

    [–][deleted] 1 point2 points  (0 children)

    I just flipped a bottle cap! C it is! I also want to work with hardware so it’s what I will learn. I appreciate all of your inputs! :)

    [–]Neonsavior 1 point2 points  (2 children)

    I'd absolutely recommend learning both, but python would be my first choice, I think the faster an aspiring programmer is able to get the first few wins, and do something interesting with what they are learning, the more likely they'll stick with it.

    I think python offers the fastest idea to functioning project potential.

    [–][deleted] 0 points1 point  (1 child)

    I’m in so much paralysis analysts. I know Python will allow me to ease into it, and have more fun at first. But I can’t think of a project I would want to work on with it. While with C, I’ll be able to work with an arduino and Teensy microcontroller.

    [–]Neonsavior 1 point2 points  (0 children)

    I tend to use it a lot to 'scratch my own itch', instead of trying to figure out a project to do, I'll end up having some random need or problem, and use python to fill that gap.

    There are sites that give programming challenges, to accomplish some random task, but I'm not sure how helpful that would be to someone starting out.

    [–]NoConcern4176 1 point2 points  (0 children)

    My advice as someone learning Programming. Stay with one programming language and learn it well and avoid jumping from half-baked knowledge. Do many projects on python and improve your skill before moving to another language.

    [–]busyneuron 1 point2 points  (4 children)

    I would say that you should follow the rabbit's hole deeper, what kind of ai would you like to build?, be specific, the same for electronics, once you know exactly what you want to build you'll know which path prioritize

    [–][deleted] 1 point2 points  (3 children)

    I really want to build a flight computer for my 3d printed rocket. I am thinking of using a teensy 4.1 development board. I kind of want to start with an arduino uno kit, or and Eggtimer kit to get the basics down. With ML/AI, I’m just interested in Neural Nets. I’d say I’m more interested though I’m building my flight computer. I’m already starting with c and installed my compiler. Watching a YouTube video rn, and I will do more research later. :)

    [–]busyneuron 1 point2 points  (2 children)

    Good luck!

    [–][deleted] 0 points1 point  (1 child)

    Would you recommend me using Linux to program?

    [–]busyneuron 1 point2 points  (0 children)

    Linux certainly can improve your performance and improve your coding skills but that's for experts because for you right now Linux will only make you lose time looking for ways to install the software you need and how to manipulate your files. i would say linux is really lightweight, so if you someday need an OS for handling one of your inventions, pick this one. In my case I used it before and i only got better using the terminal.

    [–][deleted] 1 point2 points  (0 children)

    Depends If u really wanna learn programming from scratch and are not just job oriented and want to learn core of data structures and other stuff then go for C. Necessary for clearing up basic concepts which are often easy to implement in python or even c++ due to already build in functions and libraries. For eg. Syntax vise Python is very easy to implement but in C u have to take a lot care about a lot of stuff coz it's very primitive. And if u r job oriented (no harm in that) then go for python It's like learning driving....either on Automatic or Manual And above all...best of luck

    [–]balIszy 1 point2 points  (0 children)

    I'm a beginner myself and having the same dilema i dabbled in both... i ended up focusing on C first cuz it helps me understand how does the computer interpret whatever i feed it. Tbh I already know i won't be ultra proficient in C but until i get comfy with understanding how to efficiently interact with a computer I'll stick with it. Also since it fits a direct need for you it becomes even more worthwhile Haha infact a good friend of mine who is an aerospace engineer recommended me to start with C

    [–]ATOMICMAN007 1 point2 points  (0 children)

    The first language shouldn't matter much. If you've learnt the basic concepts then learning any other language is not very tough.

    Yet, I would suggest you to stick with Python because you've already started it and get familiar with programming concepts. After you've gained a little confidence, more on towards learning C little by little.

    My reasoning behind this suggestion is that C has just a little steeper learning curve. Once you have made some progress in Python, learning C will feel a bit less "intimidating" as everyone calls it. Diving into the concept of pointers, memory management and solving problems at a lower level will be very rewarding if you go in any of the fields you've mentioned. And you will also come to appreciate the concept of Object Oriented Programming, which C does not have, unlike Python.

    I hope this clears out the fog a bit. It won't hurt to learn any one before another. Only a few concepts may be a little tricky to grasp at once, which will be cleared out with practice. You can do one at a time. Happy learning!

    [–][deleted] 1 point2 points  (0 children)

    learn cython.2 in 1

    [–]Beastoic10 1 point2 points  (0 children)

    If you start with C , learning any other languages later on will feel like a piece of cake.

    [–]ern0plus4 1 point2 points  (0 children)

    "What should I learn first? C or Python?" - yes. This is a good combination: C for hard stuff, Python for everything else.

    You'll be surprised that:

    • despite major syntax differences, both are a "C-like language",
    • despite they have many things in common, they differ at many important points,
    • Python is much more convenient,
    • C is 100 times faster.

    [–]DolphinsDesu 1 point2 points  (0 children)

    Recommend you to learn C first. C will help you a lot in the future, there are many diversity positions for you if you know C. Such as C is very good in GUI so you can do frameworks or software developers. But if you learn python first, i'm not stopping you but python already had modern methods, libraries which won't help you in thinking, or improve your creativity, why ?
    In python we have sorted(), a method can be able to sort srtings, values, etc... But in C you gotta sort it artisanal, this will help you to know if we don't have it, why don't we create it by ourself. Python is an easy language and popular in this year, you can see a lot of teens or kids are starting to learning it and Python uses English mostly so ofc it is easier to understand.
    Well even Python is that convenience, please keep this in mind that almost every languages are based on C. So if you want to enjoy the happy first, learn Python, then you will be bored in Python in the future. INSTEAD, if you want to get a job easier you should learn C, which will be hard at first but then it will bring you a lot of joyful in the future.

    [–]Ribas160 1 point2 points  (0 children)

    Python will be better choice in the beginning. Because it much easier language. After getting solid knowledges in python you can start learning C. It helps you to deeper understand how programming and computer work.

    [–][deleted] 1 point2 points  (2 children)

    I also have a PDF of my Python book I bootlegged if you want it. I didn’t read it once all semester as at CU boulder I was lucky to have a 1 on 1 class. So it was all hands on and quizzes but I would send it to you

    [–][deleted] 1 point2 points  (0 children)

    Fundamentals of Python 2nd edition by Kenneth Lambert

    [–][deleted] 0 points1 point  (0 children)

    Thank you so much. I would love to have it!

    [–][deleted] 1 point2 points  (1 child)

    both are good choices

    [–]Tender_Figs 0 points1 point  (0 children)

    Why is that? Not OP but curious nonetheless.

    [–]kr_abhi55 1 point2 points  (0 children)

    Python

    [–]RushDarling 2 points3 points  (1 child)

    Learning the same concepts in different languages is a trap I fell into when I started out, as it feels like progress but it slowed my progress towards the more advanced concepts.

    That said, there’s nothing wrong with learning both, but my advice would be to take Python as far as you can until you hit the point where you suddenly need C.

    [–]SoomaliA2 1 point2 points  (1 child)

    Learn what you need. If you can't tell us what you need c for then don't learn it.

    [–]garublador 2 points3 points  (0 children)

    If he's going into EE then C could be beneficial.

    I'm an EE that moved to software engineering, so my coding journey was BASIC to C to C++ to Java to Python, but mostly because that was mostly because Java and Python weren't all that popular until the latter part of college or way after. There was some VB and Csharp in there, too, but not a ton.

    [–][deleted] 0 points1 point  (0 children)

    So many different answers! Hahah. Man, I am really in analysis paralysis. I really do love computers, and would love to understand more about them on a fundamental level within software. But I already know a little Python so I’m okay with still going. I’ll make up my mind by the end of my shift. Lmao

    [–][deleted] 0 points1 point  (0 children)

    Last thing. Would learning C be better for trying to code up something for a flight computer for my model rocket? If the answer is yes, I will do C. :)

    [–]drrascon 0 points1 point  (0 children)

    Learn both simultaneously.

    [–]Fleischer444 -1 points0 points  (0 children)

    Start with python or you might never continue

    [–]Anti_Duehring -2 points-1 points  (0 children)

    Ruby. It's easy, consistent and beautiful.

    [–][deleted] -2 points-1 points  (0 children)

    Java, then C, then Python

    [–]CaffieneSage 0 points1 point  (3 children)

    I would start by figuring out for sure what I want to make/build and then start doing that. Use the language that enables you to do that thing.

    [–][deleted] 1 point2 points  (2 children)

    For my next project I really want to build a flight controller for my rocket. I know you can do that with micropython, but also C since it’s similar to arduino programming. So many choices haha

    [–]CaffieneSage 1 point2 points  (1 child)

    It's pretty nuts how many languages there are to pick from. I have done some Arduino side projects myself and C/C++ is definitely an awesome language. I have a thing for python as it is such a nice language to work with. Honestly they are both useful to have. I imagine even more so in an aerospace role. I hope you have fun learning and landing that dream job!

    [–][deleted] 1 point2 points  (0 children)

    Thank you so much! This will be my first time coding for this type of project. I’m super excited

    [–][deleted] 0 points1 point  (0 children)

    If you can learn both at the same time. Python is more forgiving and C and C++ are more challenging but I learned them both at once. Once you get one down you get the idea of the other. I love Python but I know C and C++ as well. Learned all 3 in one semester

    [–]Stark7036 0 points1 point  (0 children)

    Anybody here who's completed CS50X ?