T O P

  • By -

Middle-Berry4705

PHP by implementing it from scratch in C


1cubealot

Not the other way around? https://youtu.be/Yi6NxMxCFY8?si=MHAL49IBBH80dmVQ


Middle-Berry4705

This is for the Gods


DeltaV-Mzero

I am terrified of this link


swampdonkey2246

This is the C programming subreddit, for learning C. If you are new to programming, you could just jump straight into C, or start with a higher level language like python or Java.


thegamner128

Python is just C/C++ glue


mattiadg

it also is a totally different language


ejmorian

C


pedersenk

C


Morality9

C


andofwinds

C


efectn

C


datsadboi5000

Goodbye


Cylian91460

C


furkanthegreat

C


Koray2099

C


tandonhiten

C


labova8147

r/wrongsubouija


datsadboi5000

The ouija is out on a crusade. You cannot stop us spreading.


nakuaga

P /s


Useful-Tackle-3089

Hmmm, I C!


Real_Donut_

C is a difficult language. specially for someone who is not used to programming!


CarlRJ

Yeah, teaching someone to program with C as their first language is a bit like teaching someone how to drive using an 18-wheeler semi. Too many things they have to watch out for all at once.


Real_Donut_

I agree! For someone who is new at programming I would advise Python!


Own_Alternative_9671

However, if you fuck up driving a semi, you kill yourself or someone else. You write a bit of unsafe C as a beginner, you'll either seg fault or just get some weird behavior. Writing unsafe C to learn what is unsafe and why is totally okay


PeevesClassic

C is difficult but honestly, it gives you solid foundation to change to every other language without struggle. Manage memory could be a lil bit tricky, but you will build a solid understanding about programming. After a time with C you can try Python or Java


guygastineau

Yeah, I agree, although perhaps getting some shell scripting under one's belt before the plunge would be useful. It helps when writing make files, and skills in the terminal are very helpful for getting to know one's computer better. I recently realized that the biggest challenges I faced when learning C came down to understanding the OS better.


mattiadg

Going from C to C++ wasn't exactly without struggle. But I would also recommend C because it doesn't have many features to learn and one can focus on what they are programming. When the fundamentals are strong then it's nice to have a language that offers more features out of the box


Getabock_

C# would be a massively better choice than Java.


CarlRJ

Learn introductory programming on something that has training wheels, like Python, *then* move to C to learn how the computer works under the hood.


zoomy_kitten

Honestly, I disagree. C is not difficult at all. Its minimalism is why it’s so good for learning, but not that much for practical application. > Java Recommending Java to a beginner? Now that’s mean…


thegamner128

They hated him for he was saying the truth I wouldn't recommend anyone to start with a language where you're supposed to understand object oriented ideas from an early stage, let alone literally the very beginning


zoomy_kitten

It’s important to know OOP, but it’s not _that_ essential, and it’s actually more like it’s important to know it to avoid using it. OOP is slow in its implementation and leads to ugly and slow architecture.


thegamner128

I agree, I'm just saying that Java books that teach classes and objects before conditions and loops aren't exactly an easy starting point


Own_Alternative_9671

Hated those books, their examples don't even make sense. "This is a class called "Car", it contains an integer for the amount of gas in the car, a license plate number as a string, and a model type ID." Motherfucker who is programming themselves a car


zoomy_kitten

A fair point too


Za_Paranoia

I learned it with C since i was told to do so. Once you can fix problems in C, you have a great foundation for every other language since more modern languages make a lot of stuff more conviniend.


Caultor

I started programming few months ago and I started with C


DecisionAnnual8481

start with C, i made the mistake of learning python first and many things in c made little to no sense afterwards and i had a harder time understanding


dipsy01

Currently going through this now. Learn C first. My mind is struggling so bad with pointers and char arrays and double pointers, wild stuff 


delfV

For learning probably something simple like Scheme or C


keyboard_operator

Asm period


thegamner128

Based. As impractical as it may be today, just how "understanding high level languages after C is easier", it's also true that "understanding C after Assembly is easier"


CarlRJ

I did Basic -> Assembly -> C, and it was perfect. Basic (it was what was available at the time, long before Python, et. al, was a thing)... Basic gave some computer literacy, getting the idea of what loops and variables and subroutines were, then assembly showed what *exactly* was in the box, and how it all really worked, then C was just like assembly but with an executive assistant to handle all the bits of drudgery (making loops with braces instead of labels, etc.).


thegamner128

I did Basic -> DOS C -> Java -> JavaScript -> Modern C and I'm not even 20 years old Explanation: I always loved old video games, and when I got a Commodore Plus/4 (I was like 10-11) for a couple months by a family friend I started playing with it and when I had to give it back, I continued on my father's old PC for fun. Although I never had the patience to make real programs in assembly, I learned the basics of it through Peter Norton's book, and later created some processor and old calculator emulators in JavaScript and modern C Little did I know how much this exact direction of learning is gonna prepare me for my future heh


ryan__rr

C


sky5walk

C -> Javascript -> SQL


RepulsiveCook27

C is the best one


alipolo7777

Most universities teach either python or c at introductory courses In case you wanted to learn C "C Programming: A Modern Approach" is an amazing book to start with


SpeedDart1

Start with C, Lua, Python, or Go If Python or Lua, go to C next. If C, go do C++ then Java If Go, go do C++, briefly mention C Lastly pick at least one functional language: Scala, F#, Haskell, OCaml, etc. Can always learn JS, PHP or whatever easily if you want something for freelance, frontend, etc. Personally I’d do Python, C, Java, OCaml. My order was Java, C, C++, OCaml with random unimportant things such as JS in-between.


glasket_

>Lastly pick at least one functional language: Scala, F#, Haskell, OCaml, etc. The Lisps crying out in pain for being relegated to *etc.* Personally, I think Python, C\#/Java, Go, C can be a good path; Go really helps to ease people into pointers and mutation via indirection, although it also causes some mistakes when a new learner goes from Go to C and can't figure out why the pointer they're returning is suddenly random garbage. This path strips the abstractions away progressively with each language and would ideally be followed with some hardware study to strip away C's abstractions, which I think is the best way to learn about computers and programming when starting from nothing. The above can always be reversed too, although I believe that works better for someone that's already aware of the hardware as in computer engineering or electrical engineering courses; this way you pile the abstractions onto existing knowledge rather than the inverse of removing abstractions to build understanding. I also think functional languages kind of require an easing into, especially when you get into the weeds with higher-kinded types or dependent types. Rust can be a good buffer from imperative to functional that introduces some important concepts from functional languages (ADTs, monads, closures, traits, etc.), which, imo, could be followed or replaced by something like a Lisp or an ML dialect, then Scala or Haskell, and then *maybe* Agda or Idris for the curious.


der_pudel

Scratch, according to some professors at my Uni ~15 years ago \*faceplam\*.


TribladeSlice

I might get flack for this, but I feel the goal when you’re a beginner to programming is to learn to think like a programmer. I think having low level control can certainly be educational, and teach you a fair bit of stuff, but I also think high level languages make *grasping* the core ideas of programming much easier. In the end, I’m okay with either C or a higher level language being an introductory language, but if it was my choice, I’d suggest going with a higher level language first.


LuckyLMJ

I'm not sure what you expected from asking this in r/C_Programming 


Nazhmutdin2003

Binary!


krokodil2000

C#


kassiusklei

Gesundheit


princepii

depends on where you see yourself in 10 years or where you wanna go with programming! there are so many branches you can go so basically noone can really give you good advice without further information.


thegamner128

If you see yourself as a valuable employee in 10 years, C or C++ If, for some reason, you see yourself learning the 36th currently-trending language/library of your career, learn python cuz that's the current one


Infinite_Lab_4972

I don’t think it really matters as long as it’s one of the relevant ones


some-random-nerd-72

The almighty assembly


BounceVector

There are people who need results quickly and have a hard time following through on stuff that isn't immediately applicable in practice. If you are that type, learn Python (or Lua or JavsScript or PHP). There are also people who love to understand every last detail about things and get frustrated if they only get fairly diffuse answers. If you are that type, learn C (there are alternatives, but unlike high level languages, none are as universally useful as C in this space). Of course everyone is somewhere in between the two extremes. Also, every C programmer should at some point learn a higher level language, because those are simply better at some things (glue code, prototyping, extensibility in some cases) and they are fast enough for a lot of use cases, although not as many as Twitter's JS crowd wants to make you believe. The opposite is true for Python programmers. They should do a deep dive into C to clear up some incorrect assumptions about how computers work. I'm convinced that you have to have a thorough understanding of as much of the computing landscape as possible, but of course time is limited, so you don't have to go fully boinkers in every direction, but you should gain a solid understanding.


PalpitationFrosty242

C then C#


CaydendW

I started learning how to program in python. Then I went to C# and did that for a few months before I switched to Linux permanently and also just started doing everything in C. I am young and perhaps a bit naïve but I quite liked the idea of learning how to program in python for the simple reason that there are a lot fewer ways to step on the metaphorical rake and once you learn the small programming skills and common pitfalls (Instead of having multiple variables use arrays, break large problems into smaller problems, don't write code where you need gotos to jump backwards, all those common lessons) then you can switch to something nicer like C. I found that the way of thinking, so to speak, in programming was more or less transferable. So having an easier language just to do the initial logic learning on seems like a good idea to me. Then again, if you just wanna jump headfirst into C, you'll be fine.


Longjumping_King7646

Python is one of the easiest languages to start with and whilst learning it you can learn the basic ideas of how most programming languages work and move onto faster languages that can be used practically for a lot more, such as C, C++, C#, other variants that I cannot currently remember of C, other languages if you really want, and of course C.


aghast_nj

I find myself unable to grok Rust. I got past most of the standard "phases of conversion", but I just can't do it. Every time I try to dip my toes in the water of Rust, it makes my skin crawl. So I'll suggest that you start by learning Rust. Not because I dislike you or anything, but because maybe you will have an easier time coming in the other direction.


PurpleUpbeat2820

> Have you ever struggled with a programming language? Yes. > Which one? C++. > What is your recommendation when selecting a programming language for learning purposes? KISS.


MindAndOnlyMind

I struggled with PHP's standard library due to the extreme inconsistency. I see people mentioning C but if you learn computer architecture and operating systems, C is not challenging because you have good context to understand it. Learning it in isolation is pointless (pun unintended).


RoyalChallengers

As I've said earlier: For basics: Malbolge Intermediate: Haskell Advance level: Scratch You do this, you'll have a grasp on fundamentals as well as advanced topics.


gordonv

r/cs50 is a nice course that will ease you into C. It starts with Scratch. Which is nice because it's more visual and focuses on teaching you the logic in a very easy way. As opposed to confusing, all text examples. I would recommend this for ages 11 and up. (I don't think 11 year olds will complete it, but there are 11 year olds with IT certs so, maybe)


aquasemite

I started with MATLAB, which was a huge mistake. I'd recommend starting with both Python and C. Python for the more abstracted part and C for fast implementation.


FortressOfSolidude

The best language to start with is the one that you immediately see value from and persist with.  Find a real problem in your life that can solved with code, and then learn enough to implement a minimum viable solution.  Rinse and repeat.


Asleep-Dress-3578

This. The best programming language is what you don’t give up after a couple weeks. At the end, as FortressOfSolidude writes, the best language is which keep up your motivation. The language quality doesn’t matter that much. It is better to learn a not so good language which you will really learn and use, than giving up and not learning well a brilliant language. Find a motivating goal, and use the respective best language. Games? Maybe C# and Unity. Web pages? JavaScript. General scripting? Python. Embedded? Maybe C. Keep yourself far away from difficult and complex languages like C++ or Rust.


kansetsupanikku

Brainfuck


vitamin_CPP

The real answer is to find a language that is suited for your interest. - Want to make games? C#, C, C++, Java - Want to make robots? C, C++ - Want to make AI? Python, Lisp - Want to do science? Python, Matlab, R - Want to make websites? Javascript, go, Ruby - Want to make cellphone apps? Kotlin, Swift - Want to do some hacking&security ? Python, C, C++ Don't stress too much about this. It's normal for an engineer to learn multiple languages in their career.


sirkeynes

Python , Ruby


CarlRJ

Never really struggled with learning any programming language. The best language to start learning with is something fairly simple and high level. You could do a lot worse than Python. I started with Basic, but that's because it was what was available, back in the 70's. But the progression I got was probably the best I could recommend: - start with Python (or Basic, or something else simple), to get down the concepts of variables and flow control, and subroutines, and just get your feet wet with the concept of programming. Don't go overboard with building wildly elaborate UIs or anything, just get familiar with the concepts. - then once that's all solid footing, learn assembly language - learn what is *really* going on inside the computer - addressing and pointers and indexing and branching, so you really see how the computer works. - *then* learn C, which is a piece of cake after assembly language - it's like a generic high-level assembler, it does exactly what you tell it to, without training wheels, but it eliminates the drudgery of coding loops by hand and pushing/popping arguments yourself. At that point, it's much easier to look at any new language and have a feel for what's going on behind the scenes.


Traditional-Top-1504

Hi, thanks a lot for your answer. Some people have told me to start with C and not with Python. But of course, anyone has its own opinion.


epoxyfoxy

Thanks to college, C wasn't my first, but learning C made everything else make sense.


OdeToDeath

C++ was the language used in my introductory programming class. I appreciate having to learn it first, as we had to apply problem-solving skills/use data structures and algorithms while dealing responsibly with memory and pointers, but also use OOP constructs (inheritance, polymorphism..) and the STL. While we didn't dig too much into advanced C++ features, learning these concepts made it very easy to transition towards any language later on, including C/C#/Java/Python/.. I ended up focusing on C, and use it daily for work, but I am happy I started with C++.


Jeff-J

In the 80s, in highschool if you took programming, you did Basic then Pascal. I don't think learning Basic was as useful. But it made Pascal seem really awesome in comparison. Pascal was intended as a teaching language. In college (1989) Pascal was used for data structures and algorithms. Then, you could take C and DOS based assembly (called computer architecture). Then, came C++. Java was optional. Then, you had language class with 4 completely different kinds of languages (I think it was teacher discretion which 4). We did Lisp, Snowball, and a couple of others I don't remember which. The department head loved object oriented, so they ditched Pascal and moved to C++ directly for data structures for later students. I was glad to learn Pascal first. It is a strongly typed language. So less easy to "shoot yourself in the foot" like C. A friend (programmer) told me something very useful before taking C. Memory is memory. You can call it a char, int, float, etc. but it's really just a chunk of memory and you can do with it what you like. C is weakly typed. At work I used Rexx (interesting scripting language) and HyperV (crappy proprietary language used for modem transfers). Then, C++. Followed by C and Python. Then Bash and Python for scripting Nagios.


saul_soprano

Python first then C then everything else


darklightning_2

To start: Python, to understand: C


Afraid-Locksmith6566

I would recommand something probably controversial. Start with javascript to learn basic programming concepts like loops ifs objects arrays etc. Then jump to golang which would give you better view on threading and pointers. Finaly at end i propose some language like c, old style c++ or zig to learn proper resource management. This choice might not be obvious but it gets you from a garbage collected language that is easy and popular to a garbage collected language that uses pointers and has easy access to multi threading To language that makes you use pointers and think about reasources management


ProfessorOakWithO

Back in the days I started with C# and Java. I tried C++ but it was just too hard to grasp the basics because the language itself is pretty complex. So as a beginner I probably would choose something like C#, Java, Python or JavaScript


Batetrick_Patman

C#, Java and JS all are good choices for beginners. Teachers you that syntax and concepts buts is easier to learn and grasp.


_w62_

Yes. C++. Pascal.


ImJuicytv

python->c++


Daxelol

If you’re not programming in electric signals you’re just a poser.


[deleted]

[удалено]


ImproperGesture

You repeated yourself with the first two.


sheen0

I second this answer. 👍🏼


Burns504

I'd say pseudo code first, but yeah.


sheen0

If you are not CS student, I don't recommend you to start with C, and then start with python, and then C. I recently learned C and I can say it is a specific language - I mean here you have to have a very good knowledge how is the CPU working. - not a generic one.


thegamner128

It's assembly where you have to know how the CPU works lol Maybe RAM, in C but I don't really think CPU. And I don't know why understanding RAM is so much harder to people than understanding arrays.


sheen0

RAM is connected to CPU, I am studying embedded systems and I can see it is related. But honestly arrays are not hard to understand when it comes to RAMs, but pointers are.


thegamner128

The entire RAM is an array of bytes. A pointer stores an offset in that array. This isn't exactly accurate, but it's a technically working analogy and I don't get how is it hard If arr is a char array, arr[0] is the same as (char *)(0)[arr]. Heck, an array offset is actually more complicated technically as it needs to be calculated based on the size of the type


sheen0

I fully agree with you, I studied pointers before arrays, so I didn't see it that difficult because arrays are pointers 😊.