5 ms·
When I was 16 (2001), I bought "Teach Yourself C" by Herbert Schildt, a video card and a Sony Trinitron with my summer job savings. I got to the end of chapter
by twodave 3y ago
When I was 16 (2001), I bought "Teach Yourself C" by Herbert Schildt, a video card and a Sony Trinitron with my summer job savings. I got to the end of chapter 5 where Herb starts talking crazy about multi-dimensional arrays, saw the next chapter was literal witchcraft and gibberish (pointers), got overwhelmed and decided I was on to plan B: become a rock star. Programming was just too hard. I used what I learned to program my TI-82 and cheat on math exams.
Fast forward a couple years, and I'm in my first semester in college. I had some advisor (no recollection whatsoever who it was) recommend that I avoid declaring a major for a semester and just take a few courses in a variety of my interests. What a life saver.
I bought my first Java book and started digging into it. It was a lot more approachable than the C book (sorry Herb!). I attended the first class and realized I'd already read past the end of what the class covered. That started a 15+ year journey (so far) on a path I thought I'd turned away from.
I still play and enjoy the guitar. But I know I'll never be better as a musician than I am as a technologist.
- gyomu 3y agoPointers were a turning point in triggering my love of learning and improving myself. I remember learning C as a teenager, and all the resources warning me that once it got to pointers it’d get weird and hard. I was mystified at first, but it was winter break and I decided I’d stick to it until made sense. I don’t remember if it took a few hours or a few days or the whole week, but when it clicked I felt so satisfied, and like I could take on anything from there. It was a really transformative moment. I remember reading an interview with Hidetaka Miyazaki, the director of the notoriously hard Dark Souls series, where he mentions having a similar experience with playing guitar and learning bar chords - and infusing that notion of satisfaction from overcoming big difficulty humps in his games. It’s a really powerful feeling.
- lowbloodsugar 3y agoIt's funny. I learned 32bit RISC assembly before I learned C, and so I thought C was terribly hard or maybe tediously hard. Actually more like tediously hard to generate anything but (to my assembler eyes) goddamned terrible output. Pointers, tho, pointers are just addresses in a register!
- epiccoleman 3y agoBarre chords being an inspiration for Dark Souls really resonates. I never connected that similarity between the satisfaction of learning a game and an instrument, but I love that feeling of overcoming a real challenge so much, it feels like it should have been obvious.
- andyjohnson0 3y ago> saw the next chapter was literal witchcraft and gibberish (pointers), got overwhelmed I remember being very confused for a time by C pointers as an undergrad in the late 80s - a situation that none of my teachers really helped with. Eventually I realised that they were just memory addresses, and a whole lot of confusion collapsed into a simple concept. I still remember what that felt like in my head. Turned out that many of my peers had a similar experience, and not all of them got through it. So I'm wondering yet again: why do people find C pointers so difficult to grok? Is it conceptual (indirection), notational (& and *, arrays as pointers, etc), or something else? (Pre-uni I'd devoted a lot of effort to getting VIC and SID chips to do stuff with peek and poke commands, and writing some assembly language, which I reckon did me no harm when I first encountered C - even though I probably didn't immediately recognise the connections. I do wonder what the contemporary equivalent is.)
- alfanick 3y ago> So I'm wondering yet again: why do people find C pointers so difficult to grok? Is it conceptual (indirection), notational (& and *, arrays as pointers, etc), or something else? I think people need some background of computer architecture and operating systems before working with pointers, then instead of "what the heck are these addresses?" you get "oh that's how I can use all of these addresses, finally, yay, pointers" moment. If you just learn C/Cpp and related without the background, it's some magical and cumbersome feature.
- wadd1e 3y ago>So I'm wondering yet again: why do people find C pointers so difficult to grok? For me, understanding pointers to data types was not the hard bit(int* or some_struct*), but wrapping my head around *array being a pointer to the first part of a contiguous segment of memory took a lot of time. Once that idea(and what ++array_pointer really did) settled in my head, pointers felt fairly normal to deal with.
- chmod600 3y agoThe concept of memory address needs to make sense, first. The idea that memory is a big array of typeless bytes, and that all data exists in there somewhere. That an address is just an array index into memory, and you can use it to point to the first byte of an integer or struct or string or whatever. I mean, it kind of makes sense but it's not obvious.
- zh3 3y agoHaving started my programming entering programs in raw hex (Z80) and Octal (PDP11), understanding memory indirection was second nature by the time I got to C - so there's something to be said for understanding how a CPU works from the ground up (though arguable whether that's necessary for most programming these days).
- trashburger 3y agoI remember crawling Freenode as a teenager with nobody to talk to about programming, and discovering ##C. At the time I had a basic idea of programming languages but was still pretty much a beginner. I started asking why my argument printer in C was printing a (null) and then unrelated stuff (envp :P), and some very helpful person in the channel patiently guided me to an initial understanding of pointers. This was about 16 years ago. I don't remember his name anymore but whoever you are, thanks for helping me out all that time ago.
- maerF0x0 3y agoi asked the highschool computers teacher if I could learn C as part of the program, they said no. So i never took it an an elective. It still strikes me how fkd it is for a professional teacher to say no like that to a budding student... Ended up learning it in college anyways.
- justinclift 3y agoMaybe it's not a language they knew themselves?
- maerF0x0 3y agoyes, maybe. A good teach can teach someone how to learn something they themselves do not know.
- justinclift 3y agoPossibly a rare (but not impossible) skill in a high school teacher though. ;)
- bossyTeacher 3y ago> I bought my first Java book and started digging into i Herb also has a Java book ;) And it's fairly well written. Hope you give him another chance. Herbie is a nice fella
- twodave 3y agoYeah, I agree over all. I credit his C# 3.0 reference in giving me a huge head start after I graduated from college.
- SoftTalker 3y agoDo you understand multidimensional arrays and pointers now?
- twodave 3y agoYeah, it ended up being one of those things you look at a second time and wonder why it seemed so hard the first time. It was a good lesson for me, though. Now when I hit something particularly dense I have a lot more patience with it.
- wharvle 3y agoI must have bounced off a half-dozen books for OOP and OO languages that were all like “Cat inherits from Animal…” before finally realizing (while reading OO code, not looking at a book) it’s just goddamn structs with some sugar and automagic for inheritance and auto-passing “self” and such (conceptually, at least) and a method is just a function with a different name for no good reason, et c et c. If my intro had just been that one Pascal book appendix that describes OO by how it actually works (lookup vtables and such) it would have been so much easier. Instead this easy thing was “hard” for me because every book couldn’t stop introing it with stupid, abstract toy examples.
- taneq 3y agoYeah, that was the ‘aha’ moment for me, realising that “objects” were just a struct and a bunch of functions that work with that struct.
- SoftTalker 3y agoI still mostly just do the struct and functions approach. OO is so much harder conceptually for my brain.
- justinclift 3y agoIf you're ever interested in Go (the language), that's pretty much how it does stuff. Define a structure, and then add some functions for that structure. Works pretty well.
- zabzonk 3y agoschildt's are widely recognised as being some of the very worst. perhaps if you had chosen better (anyone could have informed you at the time) you might have made a better start.
- twodave 3y agoI wish that were true. As the only teenager in my rural school even remotely interested in programming, the closest thing I had to advice came from my dad, who didn’t finish college and liked to build computers as a hobby, but who didn’t know the first thing about programming. I spent a long time trying to find a good C or C++ book at the time, and the C++ book I ended up buying was so much worse than Schildt as to be unmentionable.
- dekhn 3y agoI got stuck in K&R as a high school student around the part where they implement malloc (I persisted through understanding pointers because they were necessary for me to understand linked lists, a data structure I used once in the 1980s and never since).
- icedchai 3y agoI learned C in the late 80's from K&R 2nd edition and an Amiga-specific book I no longer remember exactly, back in middle school. I learned sooo much from books back then and just playing around on my own. There's so much more to learn now, but it's also so much easier to find information...
- icedchai 3y agoI found the other book: https://www.amazon.com/Amiga-Advanced-Programmers-Abacus-Books/dp/1557550468 https://www.amazon.com/Amiga-Advanced-Programmers-Abacus-Boo...
- dekhn 3y agomy college roommate freshman year (1991) had an amiga and we argued about whether amigas were better than PCs. At the time, his amiga definitely was better than my PC. IIRC I bought a $25 C compiler, http://www.mixsoftware.com/product/powerc.htm http://www.mixsoftware.com/product/powerc.htm but it only had a stack size of 6 function calls(!)
- icedchai 3y ago1991 was basically peak Amiga! Soon after that, 386's with SVGA and Sound Blaster cards started to become pretty cheap. I gave up on the Amiga around 1994, got a 486, and ran Slackware Linux.
- wyclif 3y agoAlmost the same trajectory for me, except BASIC first then C and K&R on an Amiga. Also switched to PCs in 1994 and installed Linux.