Best Beginner Programming Books?


  • Banned

    @c62 said:

    Call me old school, but I would recommend the K & R C Programming book(2nd edition), it's one of the holy bible of programming.

    In the sense it's just as comprehensible to children as the Holy Bible? I agree.


  • Grade A Premium Asshole

    @c62 said:

    Call me old school, but I would recommend the K & R C Programming book(2nd edition), it's one of the holy bible of programming. If you master that, nothing is outside your realm.

    You are beyond old school. You are a sadist trying actively to keep kids from learning to program while simultaneously increasing the likelihood that this middle schooler would self-harm.


  • Grade A Premium Asshole

    @Gaska said:

    In the sense it's just as comprehensible to children as the Holy Bible in the original Ancient Hebrew? I agree.

    CTFY



  • @anonymous234 said:

    @Bort said:
    Screw OOPimperative programmingthat girl in particular

    (no :giggity:, you sick fucks).

    If she's really a beginner, why not WinForms? It's really easy to get stuff like a simple window working, no need to screw around with a console which can be intimidating at the start. Preferably C# over VB, but you know that.

    Or any of the wide-ass suite of "educational" languages - Scratch, SmallBasic, etc. She can always change the language later on, but it's always more attractive to see your three-line program do something fun and shiny, instead of printing "Hello World" ten times on an ugly console.

    Python is quite okay in that regard too, I guess, but might be a bit of an overkill depending on how serious she is about the whole programming thing.



  • @Captain said:

    The first one that clicked was Schwarz's "Learning Perl."

    I ... I have that book ... does that date me? 😄

    No functional languages for absolute beginners. NO! Just no! There is a REASON they hide that shizz until upper division courses in uni. They want you fully committed, and too late to back out, before they spring that on you =___=



  • @blakeyrat said:

    The bigger risk, IMO, is that the student gets into the whole Rails philosophy, which is awful and sucks. If they start building Rails apps as a beginner, you've lost them forever.

    ROFL



  • No LISP, no Racket. No functional languages for her, no recursion, just no. At least, not recommended from me. I am not going to be the one to chase her away from the industry. I want her to take her rightful place in the industry. THEN, if she wants to hang out with you functional language weirdos unique-individuals, then she is welcome to it 😛


  • FoxDev

    @Vaire said:

    no recursion

    Recursion is a pretty important and very potent tool in a programmer's toolkit; she should learn it at some point.



  • @Gaska said:

    You sound like one of those guys who think "beginners should start learning C++ at the beginning; let's teach those kids about raw pointers and dynamically allocated arrays".

    A.) What makes you think I am a guy? 😛
    B.) I would never in a million years tell an absolute beginner to start with C or C++. There is a reason why more "C-derivative" languages exist dated after those 2, and the industry didn't stop and decide those languages could do anything we wanted. 😦

    My objection to pointing her to the Unity engine is not language based (I am not even sure what language would be used with it), it is that I KNOW her school won't have her doing anything like that, and I don't want to distract/derail her.

    IF she expresses to me a desire to make games that are more complex than Atari-type games, or tic-tac-toe, THEN I would recommend Unity to her.

    Fair enough?



  • @Gaska said:

    if she can do C# on its own, she can do C# with Unity as well.

    duly noted ;)



  • @dkf said:

    The other important thing is that she doesn't try to just learn everything from reading. Programming is a practical pursuit; putting the techniques that you learn to use is essential when it comes to converting stuff into a useful skill. If she reads something interesting, she should try it out for herself.

    Agreed. That is why she is also getting her own computer decked out with everything she would ever need to program ;)



  • @c62 said:

    Call me old school, but I would recommend the K & R C Programming book(2nd edition), it's one of the holy bible of programming. If you master that, nothing is outside your realm.

    Well, Old School, I can agree with you that if a young student mastered C, they would be able to pick up C-derivative languages without much problem. However, I will save C for her Uni to give her nightmares. I am still trying to get over my own from when I was in uni, and the few times I had to use it back in my LAMP days when a BASH or Perl script just wouldn't do the job [shudders]



  • @Maciejasjmj said:

    If she's really a beginner, why not WinForms? It's really easy to get stuff like a simple window working, no need to screw around with a console which can be intimidating at the start. Preferably C# over VB, but you know that.

    Or any of the wide-ass suite of "educational" languages - Scratch, SmallBasic, etc. She can always change the language later on, but it's always more attractive to see your three-line program do something fun and shiny, instead of printing "Hello World" ten times on an ugly console.

    Python is quite okay in that regard too, I guess, but might be a bit of an overkill depending on how serious she is about the whole programming thing.

    Agreed. Which is why she is being given access to Eclipse for Java and Visual Studio for C#. Once I find out what they are teaching her in school, I will nudge her towards one of those "fun and shiny" ways to see neat stuff happening as she codes ;)

    And she is very serious about the whole programming thing. The school describes her as "having a fire lit under her" since she started with the Girls Who Code curriculum.



  • @RaceProUK said:

    Recursion is a pretty important and very potent tool in a programmer's toolkit; she should learn it at some point.

    Oh, you are absolutely correct. But, at the same time, I remember in uni, GROWN-ASS-ADULTS failing tests because recursion was on it. I wasn't among those who failed, but I remember the number of people who struggled with it. I think recursion can wait until she is at least in High School or Uni ;)

    But, I mean, listen, if she shows that she is a freaking savant, or that functional languages really speak to her, then I will nudge her in that direction earlier. This aint my first time to the rodeo, I have mentored before. I am capable of nudging a student towards what is best for them, despite my personal biases 😄



  • Paging @accalia this is your next-day poke reminder you requested 😃


  • Banned

    @RaceProUK said:

    Recursion is a pretty important and very potent tool in a programmer's toolkit

    And usually the worst solution for any given problem too. I mean, tail call optimization makes it quite okay performance-wise, but let's be honest - tail-recurring functions are loops in disguise.


  • Banned

    @Vaire said:

    A.) What makes you think I am a guy? 😛

    You're a programmer. 🚎

    @Vaire said:

    B.) I would never in a million years tell an absolute beginner to start with C or C++.

    I didn't say you ARE one of those guys. I said you are LIKE those guys in that you seemed to not understand that "basic" doesn't mean "easy", or vice versa. In OP you said you want to get her some books so she can study C# in vacuum, and you were initially (still are?) very skeptic of making her study C# together with something actually useful and cool and fun.

    @Vaire said:

    My objection to pointing her to the Unity engine is not language based (I am not even sure what language would be used with it), it is that I KNOW her school won't have her doing anything like that, and I don't want to distract/derail her.

    Oh, so it's not about just learning programming, but also about passing some school exams? Well, that's different.



  • The bigger risk, IMO, is that the student gets into the whole Rails philosophy, which is awful and sucks. If they start building Rails apps as a beginner, you've lost them forever.

    True, but it's all connected. Ruby is slow because the class hierarchy is dynamically calculated at each method call. This leads to "powerful" techniques like monkey patching, but is just crazy for things like type safety and learning and leads to pointless "conventions" instead of configuration. (Agreed, it is awful and sucks).



  • No functional languages for absolute beginners. NO! Just no! There is a REASON they hide that shizz until upper division courses in uni. They want you fully committed, and too late to back out, before they spring that on you =___=

    There's a reason they teach Logo in elementary schools. It's because LISP is easy, and drawing stuff is fun.



  • For teaching, I am a proponent of the build-upon-what-you've-learned method. When I teach directly, I eventually guide the student to doing something cool like making a phone app, or building a little game, or something like that, but I wait and see where their interests and aptitude lean first. Not every programmer can or wants to be a game developer, and conversely not every programmer wants to do business applications. It all just depends.

    What DOESN'T depend on their interests and aptitude are the basics of programming. What happens in memory when an assignment on a variable happens? What is scope? What is a loop actually doing in memory? What are the operational precedents? All of that shizz can be taught in any language (yes even functional languages, no I won't use them to teach her that), so once I find out what her school is teaching her (I literally got the mentorship yesterday), then I will encourage her in whatever language they are teaching her. And then, slowly, I will nudge her towards what her aptitude and interests tell me she would do best at.

    It isn't about holy wars, it is about what is best for her ;)



  • @Gaska said:

    A.) What makes you think I am a guy? 😛

    You're a programmer. 🚎

    Paging @RaceProUK , Hedgy, do you have a hammer handy? :facepalm:



  • She'll never hear about it from me.



  • Her loss. 😦



  • She'll be forced to deal with it in college. If she loves it, she will have plenty of time to jump on the trolly. 😉


  • Garbage Person

    This is the first content page of K&R.

    It lost me.



  • I followed it fine, but I have my degree, and I have been doing this shizz for nigh on 2 decades now.;)

    I would NEVER put that book in front of a middle schooler, though. o_O


  • Grade A Premium Asshole

    I followed the book relatively fine. Yeah, it lost me in several parts, I admit it. But never to the point that I could not recover, and re-reading a chapter after moving on usually made things more apparent in retrospect.

    The main problem I had with the book is that it was eye-bleedingly boring. I tried to work my way through it, but it could not hold my attention. Staring at a computer monitor with my eyes out of focus was more fun than reading that book.

    It has been on my shelf for years, as a reminder of how dull language books can be.


  • Garbage Person

    Oh, I didn't mean it lost me as a professional programmer. It lost me as a reader.



  • I knew what you meant ;)


  • Grade A Premium Asshole

    Now that I think about it, I can say that the K&R book as a first read suggestion is definitely a bad idea. I believe it was one of the first books I read about programming because it was the programmer's bible, or so it seemed.

    I remember many times thinking to myself that if I needed to know all of this, there was no way I would ever even be able to learn how to program. I felt dejected. Also, I was not even a middle schooler at the time. I was in my 20's.

    Don't ever give a noob that book. It will kill their hopes and dreams. You have to crawl before you walk, and you have to walk before you can understand the intricacies of pointers and memory allocation.


  • Garbage Person

    I'd argue that, at the first year educational level, understanding what a pointer IS is a bit much. With math, we start with counting, which is just addition. But we don't mention the word "add" until later. And when we do, we also introduce subtraction, which is just adding negative numbers under the hood. But negative numbers don't come up for YEARS.

    Pointers are the calculus of programming. Hugely important and central to a whole lot of shit, but they need not be mentioned until a very high level, and 99.9995 percent of the time, you can go a lifetime without ever once needing it directly.

    Memory allocation is more like basic single variable algebra. It should come as a "by the way, you've been doing this all along" topic after all the foundation is in. And then preferably only done as an automagic thing, never explicitly once learned.



  • @Weng said:

    It should come as a "by the way, you've been doing this all along" topic after all the foundation is in.

    Eh... I dunno about that. The concept of pointers and pointer arithmetic is actually quite simple to grasp (just use a PO box analogy or something), and personally I'd say it's simpler if you haven't already been dealing with Java-style references too much.

    It just needs to be explained well - a lot of trouble people have with comprehending pointers comes from them being presented as some spooky advanced material. Compare arrays, which aren't really all that different, but people seem to get them intuitively much easier.


  • Garbage Person

    They aren't hard, but if you're doing it explicitly you are either doing it wrong or into systems programming, which is an advanced topic for all sorts of reasons. Sure, mention it and give the 10 minute overview pretty early on. Situational awareness and all. But the details need not worry anyone near the beginning of the journey. Or the middle. Or even towards the end. The only people who need the details are the ones who will take the side trip of their own initiative.



  • I still feel like your stance on LISP is a bit much, since at least the way it's taught in those MIT lectures I was watching and in Land of Lisp wasn't bad. Not the usual 'everything upside down' functional stuff things normally seem to go for.

    But still, C# is a pretty great starting point, since you can set up a simple crossplatform mobile/desktop app shell even, and use that as a starting point to let her play around with graphics and such.



  • @Magus said:

    Not the usual 'everything upside down' functional stuff things normally seem to go for.

    Fuck Prolog.

    not related to the discussion at hand, but I had to



  • Oh no, I wholeheartedly agree.


  • Banned

    @Maciejasjmj said:

    The concept of pointers and pointer arithmetic is actually quite simple to grasp

    It's simple to understand what they are. It's a whole another world to understand how to use them. Especially if you add arrays into the mix.

    Also, if you teach people pointer arithmetic, you're :doing_it_wrong:.

    @Maciejasjmj said:

    Compare arrays, which aren't really all that different, but people seem to get them intuitively much easier.

    Shortest explanation of an array possible: "several things". 2 words.
    Shortest explanation of a pointer possible: "something that tells you where's another something". 7 words.

    This is a pretty good way to approximate relative difficulty of subjects. Pointers are objectively much harder than arrays because they need more words to explain, so they have bigger cognitive load (I hope I made up the right words here).



  • @Gaska said:

    Also, if you teach people pointer arithmetic, you're :doing_it_wrong:.

    ...huh? How else do you step through/offset into a dynamic array if not by adding offsets to pointers?

    @Gaska said:

    This is a pretty good way to approximate relative difficulty of subjects.

    Here, you missed your 🚎. The error bars on your method are an order of magnitude bigger than your values.

    Besides, if you actually understand arrays (more specifically, array indexing), you can understand pointers, since one's conceptually reducible to the other - you can think of virtual memory as an array of bytes.

    The only novel concepts are a) that the array isn't just yours, so you have to ask someone to reserve a part of it for you and give you the index, and b) that you can grab a bunch of bytes at once and together they make an int or a double, and consequently adding 1 to a pointer doesn't necessarily move you one byte. There.

    and yes, yes, anyone who's read the C standard is probably writhing in pain by now, whatever



  • So this is kinda related to the topic: my sister just moved to a new job, and they're having her do dumb repetitive tasks to build reports and silly things like that. Read data from one excel sheet to another, basically. She's fairly computer savvy (comes with being a gamer). She can install a custom ROM on an android phone on her own, to give an idea of her tech skillz. And she had on occasion mentioned a desire to learn some easy programming language (she is aware that Python exists).

    So I suggested she could use the opportunity to learn programming and make her job easier. I'd even help her along, prepare a course for her (I don't mind, I think it'd be fun). My question is, what would a good language for her to learn and be productive with be? I immediately thought of Python, and I just wanted to make sure that would be right for her, as I'd need to familiarize myself with it as well and I don't want to waste both our time.

    Some limitations: she doesn't have admin rights on the machine, so whatever language it is it would need to have a portable environment she won't need to install.


  • ♿ (Parody)

    @Kian said:

    My question is, what would a good language for her to learn and be productive with be?

    Does python have good libraries for working with Excel? Given that her productivity boost will likely hinge on that, I'd think that VBA would be the most bang for the buck (Excel still uses that, right?). Alternatively, I'm assuming there are decent libraries for C# to do that.

    This seems like the same challenge with a kid, where seeing cool graphics or whatever motivates them, except here the carrot is reducing the monotonous drudgery of spreadsheet work.



  • Pros: best beginner's programming book ever written:

    Cons: Fortran.


  • Banned

    @Maciejasjmj said:

    ...huh? How else do you step through/offset into a dynamic array if not by adding offsets to pointers?

    Indices.

    @Maciejasjmj said:

    Here, you missed your 🚎. The error bars on your method are an order of magnitude bigger than your values.

    There's always statistical data, which apparently is in my favor...

    @Maciejasjmj said:

    Besides, if you actually understand implementation details of C arrays (more specifically, array indexing), you can understand pointers, since one's conceptually reducible to the other - you can think of virtual memory as an array of bytes.

    FTFY


  • Discourse touched me in a no-no place

    @Vaire said:

    It isn't about holy wars, it is about what is best for her 😉

    QFAbsoluteT


  • Discourse touched me in a no-no place

    @Maciejasjmj said:

    The concept of pointers and pointer arithmetic is actually quite simple to grasp (just use a PO box analogy or something)

    That's how you handle arrays. References can be done by just drawing out boxes with arrows between them. Pointers are where you peel back the abstractions and dive into the level beneath, and that is why they are significantly harder to learn. Operating at multiple levels of abstraction at once is a key ability of a good programmer, but it's definitely something that lots of people find extremely challenging.


  • Grade A Premium Asshole

    @boomzilla said:

    This seems like the same challenge with a kid, where seeing cool graphics or whatever motivates them, except here the carrot is reducing the monotonous drudgery of spreadsheet work.

    I read this thinking we were still talking about the middle schooler and immediately wondering what middle schooler works with spreadsheets.

    I. Need. Coffee.


  • Garbage Person

    @boomzilla said:

    Alternatively, I'm assuming there are decent libraries for C# to do that.

    Negative.


  • ♿ (Parody)

    Whelp...VBA it is, then! I know you can do all of that via normal COM, but if you're not dealing with a library that hides that stuff from you, that'd be a nightmare for a beginner. The nice thing about VBA (from a beginner's standpoint) is that you can definitely get that feeling that you're doing something useful / cool very quickly.


  • I survived the hour long Uno hand

    Not a book, but Human Resource Machine is a great game on Steam for practicing logic and low-level algorithms.



  • @boomzilla said:

    Whelp...VBA it is, then!

    Yeah, I'll suggest that, since it also solves the issue with installing the dev environment. It's already installed in Excel itself.


  • 🚽 Regular

    When I was her age, I think the toughest thing to wrap my head around was OOP in general. Like, I understood the concept of having, say, a Car class which might contain Dashboard, Engine, Wheel, etc. objects. And I understood the idea of having a Truck class, and having those each derive from an abstract Vehicle class.

    But it was difficult for me to transfer that concept into a language like Java or C# where effectively everything is represented as an object. I'd think to myself, "Okay, I get that there's a Car and a Truck, which represent things I can visualize in my head. But I'm lost when I think of intangible objects like SocketConnection.

    When you're a child who hasn't really done much programming beyond maybe tinkering with a simple scripting language that isn't OO, the concepts we have long since mastered and now have a firm understanding of were daunting lessons when we started learning them.

    And I think things have since matured enough for us to try to start with some decent concepts like dependency injection and IoC (I'd analogize it to be something like "Okay, you have a car, and it knows it needs wheels, but it doesn't make the wheels itself, you need someone to screw them on.") and MVC-like concepts ("The car's got a steering wheel, but your turning it is not directly turning the wheels; there's a whole bunch of mechanics in between the steering wheel and the front wheels to translate your input to actual turns") and maybe single-responsibility ("Yeah, it's great that you think the radio should activate the windshield wipers, but in reality that isn't a good design").


Log in to reply