Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

i'm afraid i'll never get the hang of programming

Discussion in 'General Discussion' started by isanvel, Aug 2, 2019.

  1. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    While I generally agree with you, especially about the writing code part, you might be underestimating the importance this kind of visual fluff can have for some people to basically keep them awake and focussed. That old classic K&R book on C programming is my number one most reliable way to fall asleep, when I would be lying awake between 20 and 60 minutes otherwise. I get through one page at most before I doze off.
    When my math teacher in school tried to explain stuff, I just couldn't keep focused and often zoned out right before the important part, because the pace and presentation was completely wrong for me. I just couldn't listen to the guy for long enough. Videos with this kind of idle animation stuff would probably have been ideal for me. I'll see when I start watching his math videos to catch up on some of the stuff I've forgotten over time.
    The teacher I learned coding from had a much better style and pacing for my needs. Though he probably didn't spend so much time writing code out either, and focused on the basic concepts, supporting your point once again.
     
    Ony, MadeFromPolygons and Antypodish like this.
  2. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,992
    This is another point, and a really major one. You get so much more from a single source that covers every topic. Each new topic and example can be based on what you already know. This is huge for so many reasons.

    Little things, like variable naming style, or snippet style (print the result, or just put it in a variable). Debug.Log vs. print and "x=%f3.5",x vs. "x="+x. Which shortcuts like +=, ++, :?, x=y=0 have they seen? Have they seen floats and doubles, or long ints yet? Having lots of unfamiliar little things adds up, and can make simple code difficult to read.

    Bigger, you can use things you know they know to make better examples. If you covered strings and indexing, you can use that to make good for-loop examples. Knowing that they already learned simple functions is great -- examples can be much shorter using made-up functions like "int v=numberOfVowels(w);". The List chapter can say "remember how indexes worked with strings? Lists are the same." The array chapter can cover only the difference and limitations from Lists. Or, the List chapter can say "remember all those practice functions we wrote to insert, remove and grow arrays? Lists have them built-in".

    A single source can emphasize topics. Isolated, you can find pages and hours about do-while loops. A single source is more likely to spend more time on while loops, then a short section on do-while showing the 1 difference. Call-By-Ref is a trickier topic. a single source will save it until you've gotten good at normal functions. Looking up on your own won't tell you that.

    Likewise a single source can be sure to cover all the basics. At some point it will have a short section on declaring bools, flag use, and so on. Just searching often misses these little things.

    Any medium can do this, but coordinating is a lot of work and revising, and text is easier to change. For example, someone in the Teaching forum complained that the subclass example in Unity Learn uses Fruit and Apples. Then the Override example lists Fruit and Apples down below (growing it from the previous), but the video uses Monsters and Orcs. Re-recording that video would be a pain.
     
    frosted and Martin_H like this.
  3. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,010
    Totally agree that a good single source of information is much better than getting fragmented stuff all over the internet. That's the main reason I did CGCookie tutorials for learning art, because they are thorough and I wouldn't need to go around trawling for bits and pieces of information embedded in half an hour of blah on some youtube video.

    Sure, having all this information is good, but how is it introduced? Does the teaching resource start with the brilliant idea of describing what bits and bytes are, or does it give you some high-level steps to get a cool result that you can use as a starting point to dig deeper?

    For a tutorial creator, this has got to be the worst part of video tutorials. API can change, workflows can change, editors can change. However, it's still irrelevant to the question of what is better to learn from. And I would argue that the very things that make videos become quickly redundant are the same things that make them easier to start off with, because they are much more precise about what you are supposed to do.
     
  4. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,617
    Is this still about helping the OP, or have we moved on to character assassination of videos as a medium? ;) I jest, but the underlying point is genuine.

    Does anyone know of good introductory programming courses or books we can point them towards? Stuff that'll give a well-grounded introduction to programming rather than just focusing on how to write code, preferably using C#.

    I've just spent a little while looking. Two things immediately pop up:
    1. Most of the stuff I'm finding focuses on how rather than when and why to use something.
    2. Surprisingly, most of it is in video format even though I'm not specifically looking for videos.

    The second point there is a bit of a pain, because I can't skim read a series of videos to get any detail on what's covered to better inform a recommendation.

    From my search, here's some stuff I turned up. I can't vouch for its quality, but they're worth checking out to see if they work for you @isanvel.
    1. C# Station's C# Tutorial. At a glance this looks similar to the books I started learning programming from many years ago. It's text based, so it lines up with my own preferred style quite nicely. It's got lots of code examples and quite a lot of text explaining them.
    2. Channel 9's C# Fundamentals for Absolute Beginners. It looks like there's good coverage, and from a short random watch it sounds like they're presented well and reasonably thought out. Also, based purely on the length of the videos for each topic, there's certainly time there for each to be explored and explained in quite reasonable depth.
    3. Channel 9's Programming in C# Jump Start. Also from Channel 9, a much shorter course. I'm mostly listing this one because unlike #2, this one has lots of ratings and seems well regarded. Personally I think it seems more like a demo/taster series, since it jumps to stuff you really don't need to worry about to begin with.
    4. Ray Wenderlich's Beginning Programming with C#. This seems very much like a super-light version of the intro programming lectures I did back at university. It covers all the same sort of stuff, but instead of an hour per topic each is just a few minutes, so it clearly doesn't get the same level of detail as a uni course or items 1 and 2 above. Not sure if it's finished, as he mentions it being 3 parts, but there's only 2 parts at the moment.

    From my brief skims, each of these just gives you a bunch of information and/or sets a few challenges along the way. What I suggest you do is, each time you've gone through the introduction to a new thing, is ask yourself "what kind of problems could I solve with this?" and then try doing it a couple of times yourself. For instance, when you're introduced to branching with "if" statements, come up with a couple of simple things you could do with them and write programs that do that. Ideally, combine this with previous things you've learned so that you're not just using new tools, but also slowly increasing the complexity of the problems you're solving.

    Also think about how you might use it within the Unity environment and try something there. The fundamentals you're learning are directly applicable, it's mostly only the environment that changes.

    Finally, come to places like this and ask questions. Here the scripting section is the correct place to ask code specific questions. In any case, interacting with others while you learn can make it more fun, and can help you when you're stuck and/or frustrated.
     
    Last edited: Aug 9, 2019
  5. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    Fragmented sources is better than single source imo. What you trade for convenience you make up with diversity and thoroughness. You learn the same thing from 10 people you are gonna do better than all of them.
     
  6. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,992
    I couldn't tell the order to watch them in. Left-to-right, top-to-bottom seemed the most obvious, but that way covers IF's before the video on variables. The IF video, 23 minutes long, had one example(*) which is roughly:

    Code (CSharp):
    1. if(w=="1") { string a="A"; print(a); }
    2. else if(w=="2") { string a="B"; print(a); }
    3. else if(w=="3") { string a="C"; print(a); }
    I didn't see an advanced IF video. Although the while loop section must cover n<10. I thought declaring a block-scope variable was an odd choice -- especially before we're seen variables -- but he actually mentions block scope.

    (*)I clicked every 5 minutes along the length, and it seemed to be just this one example, growing. As you noted (in something I cut), you can't quickly check a video like you can text.
     
  7. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,617
    Yeah, I too was wondering about the order.
     
  8. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    I implemented roslyn c# compiling support yesterday for my rest service mocking tool.

    First I Googled and found alot of fragmented info every one doing something different, then I remembered why I keep to the official API reference manuals.

    Its always better to stick to them than get biased code from some random place
     
  9. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,992
    Looked at that Channel-9 "using variable" video. Code was (roughly): int x=6; int y=x+3; string w=Console.ReadLine();. And that's it. Then some examples of errors, and a long digression about how to use the debugger.

    The Ray Wenderlich one was crazy. The IF one was actually 20+ minutes. Ray talks for about 5, but then someone else writes code for 15 minutes more. They both blast you with if, else, <=, && and || (they don't even say what they mean -- he just says you can write 2 ampersands or 2 vertical bars inside of an IF). Previous video's in the series cover enumerated types (and nullable types !!??), so the longer IF example uses enums. It's got if-else-else with more nested if's and compound statements. Remember this is the first example of IF's. The presenter doesn't quite say what problem they are solving, but it's what kind of car engine with how many passengers can get up how steep(?) a hill.

    I think the way to look at these: suppose someone asks a Q about checking inputs, and they clearly have tangled-up IF's and don't know how to trace or fix them. Judge a video by whether you'd direct that person to it.
     
  10. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,617
    My intent was to start suggesting positive steps, rather than just continuing the trend of complaining about stuff. I definitely see value in critiquing learning resources, but I'm not sure how doing so helps the OP here... if they're still around to be helped.

    I fully agree that if you're sticking to free materials it's a minefield out there, which is why I think a formal education in these things is a great option... if it's available to you. Short of that, I learned from published, physical books when I got into this stuff as a teenager - "Sam's Teach Yourself" series was one. They were still a bit hit and miss, but much less so than online materials are today, presumably because authors had to convince someone to publish their stuff.

    Can anyone else have a go at recommending resources?
     
    Last edited: Aug 11, 2019
    AndersMalmgren, Martin_H and Ony like this.
  11. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    My advice is to really learn the language, maybe even outside the scope of Unity. So you learn things like generics etc, stuff that seldom Unity tutorials cover. Sadly I dont have good resources to share, since I dont pickup information like that myself.
     
    frosted and angrypenguin like this.
  12. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    Well look at you, staying on topic and actually trying to help someone - crazy how that makes you stick out around here...


    The one book I always seem to fall back on is this:



    For example right now I'm writing a tiny python script and I never did a big project in python that would get me to "feel like I know python", so basically anything I want to do I type into google and depending on the scope of the question I look for a tutorial or a stack overflow post. E.g. I googled "python txt file example" and picked this from the links that I clicked:
    https://realpython.com/read-write-files-python/
    because it had a sensible table of contents from which I deduced that some thought was put into structuring it in a sensible way.

    And just now I googled "python string to list" and thought I don't need more than the answer for this, so I went straight to the stack overflow search result and read the top reply:
    https://stackoverflow.com/questions/5453026/string-to-list-in-python

    Obviously I would only recommend that method if you already know programming basics in any language and are just trying to accomplish very specific things without really familiarizing yourself with the language. If I was trying to make a game in Python, I would approach it quite differently and try to find some more foundational info first.
    For a big project with many unknown unknows like making a Unity game, I got tremendous value from skimming over the API reference for many of the classes that I worked with and discovered many super useful things that I would never have thought to look for, like this:
    https://docs.unity3d.com/ScriptReference/Vector3.SmoothDamp.html
    I think it's quite a difference between searching for specific answers and investing time to discover answers for questions you wouldn't even know to ask. It helps that my memory is good at making contextual connections. When I encounter a problem and some years ago I once saw something that seemed related, I often will remember that and have an idea what to search for to get the answer.


    I can't say for sure, because I never checked how deep that rabbithole goes, but I think there's a fair chance this approach will hopelessly overwhelm and discourage a non-programmer. You can make a lot of gameplay with very little of the features any language offers, without it necessarily resulting in bad or hard to maintain design, imho.
     
  13. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    The thing is, a non programmer must become a programmer before even consider doing a game
     
  14. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    With "become a programmer", do you mean understand at least half of all that fancy stuff that you use in your game or do you mean "learn to be 100% precise in language and thought?". If the latter, then yeah, probably. If the former, I couldn't disagree more!
     
    angrypenguin and Ony like this.
  15. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    You can never get 100 procent precise
     
  16. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,992
    The OP described a plan which involved watching various videos, which is common. I wanted to suggest, with details, that videos aren't the answer. Not even if you think you learn better from videos. Even Billy###, who appears to be the strongest proponent, merely praises how good they are at demonstrating how to use a visual editor.

    For books, I saw Sam's forever ago, seemed fine -- about as good as the "Yellow Book". I slightly preferred the Head First series (I saw the Java one, but I see they have a C# version). Public libraries often have a few dog-eared coding books in some old language, which are great at the basics. Look for lots of material on: variables, if's, functions, loops, then arrays or lists, and basic class/struct use. There should be plenty of small examples explaining a problem, then solving it. Avoid books that feel like they're just listing every rule.
     
    Martin_H likes this.
  17. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,010
    That's only part of what I said. At the risk of repeating myself one too many times, I think the great benefit of videos is for procedural learning, which incidentally often involves "do XYZ in the editor", rather than "in the beginning there were eight bits ... ", so videos lend themselves well to it.
     
    Antypodish likes this.
  18. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,992
    Procedural Learning is another word for "copying what the teacher does". Obviously videos are better for watching and copying than books. But it seems like you're saying that people learn to program computers that way.

    Plus, other people, not you, sometimes use a technical-sounding phrase hoping no one will challenge it. A sort of Argument from Authority. An Emperor's clothes deal: "if you don't understand how I'm using this word, you aren't smart enough". By repeating that phrase, someone could get a false impression about your motives.
     
  19. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,010
    Well that's exactly what I said. The best thing for an absolute beginner is to copy steps and get a result. There's an incredible amount that can be learned this way that would be very difficult to teach otherwise. As I said many times in the thread, it's after that that focused theoretical learning is at its most effective.

    This is 10x more true for self-motivated learning, too.

    Well I don't know who has been doing this, but I hope to be pretty clear about my own rationale.
     
  20. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,992
    I think Video Tutorial advocates are doing that thing where you ignore play-testers because they don't share the team's vision. When you make a game, or video, it's great to think about high concept stuff. Research Procedural Learning if it might give you ideas, have a goal to help beginners who aren't helped by anything else, decide to make a level where you learn more and more as you repeat it. Great stuff for a design document. But once you have a build and play-testers, that's all done. It is what it is at that point.

    There's article after article explaining what not to do when playtesters don't get it: invent reasons they're bad play-testers, or coach them until they say what you want to hear. Do anything but look at your actual game and fix it. Real video tutorials are at the done stage. They are what they are. They're 20-minutes of a single if-else-if-else with print statements. They don't create enthusiasm, you don't learn anything by following the steps (which is just typing them out). Those goals didn't make it into the finished product.

    If you think video tutorials have great potential, fine. But thinking current ones are any good is like screaming at your play-testers for not seeing the game you wanted to make.
     
  21. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    For me programming is about Stack overflow, youtube, the official documentation, and tonnes of testing.
     
  22. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,616
    I want a t-shirt of that book cover. :D
     
    Ony, angrypenguin and Martin_H like this.
  23. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,617
    I think you're doing that thing where you conflate content and medium. Your evidence is that a bunch of individual materials are flawed, which is true, but your conclusion is that "there are no good video tutorials to learn basic programming". Those two things don't go together. And that's coming from someone else who also doesn't like video tutes!

    Also, what's the benefit of dragging the discussion back to the same points repeatedly?
     
    Ryiah, Martin_H and Antypodish like this.
  24. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    I like videos as fast way to get overview and get started. Reading is slow and I don't like to do that till I have good sense where to focus my efforts.

    Also keep in mind, learning for total beginner is different than someone who knows syntax and basics of coding structure.

    Thats Speaking as a coding noob who is working on tutorials now. About original premise, I felt same way about 3d a year ago as OP and feel same way about coding now, but whatever just keep going and you get there. Once you learn how to learn there is nothing in your way but time.
     
    Martin_H likes this.
  25. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,967
    Besides, what really is the difference between a university lecture on programming and a video? Other than a video you can pause and go at your own pace?

    They both talk through points using visual graphics on a screen.

    They both have a teacher that can be contacted.

    They both teach programming.

    I just dont follow the whole "cant learn programming from videos", and I have been through a BSc and MSc in programming and still find that I had to learn some stuff from videos along the way.

    Imo, there is no single medium that is good or bad. Good learning comes from using a variety of mediums.

    Anyone who thinks that getting taught by a lecturer at uni is different from a video is kidding themselves, at least with a video you dont have distraction of other people in lecture.

    In my CS classes during my BSc there was like 150+ students in a lecture theatre sometimes, and no way to pause the lecture.

    Compare that to the same topic in a video that you watch in comfort of your home or wheverer you want that you can also pause and has no other people to distract, and I just fail to see how one is better than the other.
     
    Martin_H likes this.
  26. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    Probably a big difference between just recording a 2 hour university lecture and a youtube channel aimed at making a living from making tutorial videos and building a community, dragging out the same content over several videos, each padded out to a length that is friendly to the algorithm, to the retention graph and to the number of ads that can be shown on it. Making the content delivery "efficient" can become an after thought if you apply enough other constraints.

    I've had that discussion with a content creater who really makes good stuff, but it's all "recipies" instead of "building blocks". I much prefer small focused tutorials like "here's how this part of the software works and what can be done with it" over "today, we model a gun in zBrush". I find the former both better for "looking stuff up" and easier to "remember for future reference". I can figure out on my own what I can do with those "building blocks", I don't need to see the very specific application towards a completed end product every time.
    But the creator said that his viewers prefer the "recipe" kind of content/tutorials, so that's what he's making.

    The avenues of discovery probably also greatly favor content that is called "how to make a plattformer" over "introduction to rigid body manipulation" or "building your first movement controller" or whatever.
     
    frosted, Ony and MadeFromPolygons like this.
  27. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,992
    Ah, sorry I didn't explain. So, for this thread you found some tutorials which looked fine at first but turned out to be not so great. Imagine you did that 5 years ago, got interested, and checked out most recommendations since. Then were like "great ceaser's ghost -- it's the same barely-there stuff in every one". That's where I am now, except I started out evaluating Com Sci textbooks, as part of my job, which got me interested in seeing how tutorials compared.
     
  28. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,992
    Not to put words in your mouth, but teaching 3D is especially well-suited for video. For most topics, pictures would be just as good as a video, but in 3D there's so much action -- view rotation and zoom, extrude, change the tool and scale that face ... you'd need 20 hard-to-read pictures to show what 10 seconds of video can. But programming's not like that. If you see lines of code, there's no mystery how they were typed in. There isn't any visual screen-based process to show for coding.

    Syntax and basics are one of the things I'm complaining that current video's are terrible at. Because they give one example, and that's it. Not even a page showing the syntax (with the required symbols hi-lit and stuff like "true/false expression" in italics) like even not-so-good books do.

    And for an overview, sure, read whatever. There are lots of overviews. Someone decides based on one they want to learn basic coding ... and the question is, then what's best?
     
    Martin_H likes this.
  29. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    I havent found much good coding instruction anywhere tbh. Nobody takes the time to explain theory without the jargon. They just start writing code and expect you too follow, it seems.

    So most of my learning has been pretty slow trial and error so far.

    Most of how I learned 3d so far has been the same though. That's why I recommend just devouring everything you can find. If you watch three people do same thing, it's easier to understand the fundamental decision making process at play. Also, people tend to find one way of doing something and never change. By learning from diverse sources, you pick and choose and amalgamate the best.

    I think most beginners get stymied because they wanna learn fast. But focusing on learning thoroughly is faster.
     
  30. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    @Owen-Reynolds
    There is more into coding, than just tutting about few lines of codes and their functionality. Often taken for granted, but may be important how was written. If you use however notepad, or power points slides, it may be no difference, since how much you can fit in hour, or two of lecture. But if you use more advance IDE, lets say VS, now video for beginners starts making sense. Why? Since once you use tool, you show steps. Intellisense, navigating between files, classes, , formatting, debugging, work flow, thoughts, and when people comment their steps. Few images stays for much longer in the brain than long talks. Again, few minutes of vid, can show tons of capabilities, options, techniques, which may require much longer talk otherwise. And then you got people sitting in the back playing / sleeping :)

    I finding that people get engaged and learn more by using workshops / labs. Sure, not everybody got that comfort unfortunately.

    Either way, no video, nor talk will substitute hours of practice.
     
  31. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,010
    But there is a result to show. Don't forget, this is game development. Everything - including the code - is in the service of audio and visual feedback to the player. Teaching game coding without showing the results is just missing a golden opportunity to escape from theory and into practice.
     
  32. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,617
    Your conclusion which I quoted was from several posts before that happened.

    Moving on...

    Yeah, looking for genuinely good resources has turned out to be harder than I expected.

    Genuinely good stuff is both a) hard to make and b) valuable, so it tends not to be free. But even within the paid stuff, there's a lot of stuff that I think is flawed in concept and/or not up to what I would consider professional quality. The major thing there, I think, is that to teach something well you need two different skills: the thing you're teaching, and act of teaching itself. Having both of those is rare. Having both of those plus the time, resources and inclination to make resources for free... even rarer.

    When you talk about "jargon" that's pretty telling. Jargon exists because it is helpful to people working in the relevant field. If teaching materials are allowing jargon to be a barrier then they're poorly designed, to say the least.

    Seems that way to me, too.
     
    Martin_H likes this.
  33. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,992
    You do realize there's a way to pause a live lecture, which is strongly encouraged? I think most people would say live lectures are vastly better since you can ask Q's in class, after class, office hours, TA's Help Room hours, the person next to you during class... .

    But to answer the first Q, a university lecture on a video isn't meant for standalone viewing. They'll tell you to read the slides and the chapters from the book before class. The class also often fits within the school. I took a look at MIT's 6001 intro to programming (free, I think). It's practical use of a bit of everything, but not enough to write a program from scratch. For example it uses only ints and strings, since that's good enough for their examples. You quickly see a loop to check whether a number is a cube, write your own like it, then move on to using indexes with strings. It's also in Python.

    I think the idea is it's enough for a technical manager -- you won't be able to program, but will be a lot better at managing programmers. It's also fine for Majors since the next class can start with "we know the basics of loops, arrays, functions, classes; now we'll show how to use them to do anything."

    If you just want to be good with IFs, you'd go through the entire first class, then finally learn the tricks in the next class, but at an MIT pace. That's a lot for someone who just wanted to learn scripting.
     
    Martin_H likes this.
  34. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    I fully agree, especially with learning programming for the first time. I did a quick search for anything similar to how I learned it in school and I found this article that had the promising subtitle: "This article is part of the sequence The Basics You Won’t Learn in the Basics aimed at eager people striving to gain a deeper understanding of programming and computer science."

    https://pmihaylov.com/how-does-binary-affect-data-types/

    It's using C# too, so maybe you'll get something out of it? If you like it, might be worth checking out other entries in the series too. I found one that seems to explain the thing well, where I always gave up in confusion back when I tried following C++ tutorials, so I'm gonna read that one now.


    P.S.: my search strategy for finding the very specific kind of tutorial I was looking for was throwing many search words into the query that I thought would be used in an article that explains the thing I was looking for thoroughly, so I googled: "programming introduction c binary numbers data types memory". I've found that sometimes overly specific search queries give me better results than generic searches like "programming introduction".

    P.P.S.: I think I found an error in the article about bitwise operations that I was reading (writing OR instead of AND in the text, while the code example says AND). Don't think that one would have been in a book that has been proofread before printing. Otherwise I thought it was pretty good and cleared some things up for me.
     
    Last edited: Aug 15, 2019
    BIGTIMEMASTER likes this.
  35. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    Awesome. I'm gonna check that out. Thanks @Martin_H
     
    Martin_H likes this.
  36. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    I love youtube videos for learning stuff in general.

    But man, for code? I really think you're better off buying a book and doing it the old fashioned way - at least as a very first starter thing.

    "what is a function"
    "what is a class"
    "what are common data types?"
    etc.

    I could see supplementing later with youtubes or whatever, but I think the old fashioned way: buying a book and going step by step, is gonna be easier, faster and better.

    There are just a bunch of really fundamental things you gotta understand before you can really start to understand what you're writing in code and having one source that covers all those basics is gonna make your life easier.
     
    angrypenguin likes this.
  37. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    Dude, this is not something a beginner is going to be able to get anything out of. Lol.

    Like start small. Whats a loop. How do you use flow control. Whats a bool. What are operators? What's an associative array? Whats a class. What's an instance. Whats the relationship between an instance and a class. How does static work. Whats a generic.

    Going into the lower level details can be informative, but for straight up newbies, thats going to be way over head.
     
  38. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    I think finding good introductions book can be equally hard, as looking for right keywords using search in browser, for someone who don't know what to search for. At least these days we can look up for people comments, next to book product (online store).

    Python seams nice starting point for practical learning.
    Only that it may be a bit intimidating for beginners, to setup.
    https://docs.python.org/3/tutorial/index.html

    Lua has also nicely structured documentation
    https://www.lua.org/manual/5.3/

    Some games use lua as tool to expand its functionality.
    For example minecraft mod computercraft
    http://www.computercraft.info/
    which comes with many mod packs.
    So you can program simple block (turtle) behaviors directly in game.

    One of my first contacts with programming was Delphi. But book was too intimidating for me at that time. Maybe I was also too young. I was coming back to programming multiple times, with different results. Using different Game Makers and tools. Web designing was for me practical introduction to that world with early HTML then some JavaScript, PhP. I also learned practical way Adobe ActionScript via flash. Then assembly and so forth ...

    I would love to have ability to play Scratch https://scratch.mit.edu/ back days.

    However, I don't remember how, or when I learned about loops, or variables principles.

    Surely we are now in different times, where wide range of tools for learning are much more accessible and abundant.

    Anyway, I think of any skills, searching skill is more important, as it will allow to find relevant resources to study.
     
  39. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    Honestly I think just about any intro book will cover all the fundamentals adequately. I'm not talking about tutorials, I'm talking about just raw intro to terminology, concepts and syntax.

    https://csharp-station.com/6-best-books-to-learn-c/

    Like, just pick any of those.
     
  40. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    Maybe.

    But I picked up randomly title of your list.
    Happened to be PDF file avaialbale online.
    Beginning C# ObjectOriented Programming
    https://www.redbrick.dcu.ie/~r_dogg/fff/Beginning C# Object-Oriented Programming [2011].pdf

    Maybe is me, but somehow I don't feel like this book is aimed to complete newbie in programming.

    Edit:
    And here you can see the preview content of the book
    C# in Depth, Fourth Edition
    https://www.manning.com/books/c-sharp-in-depth-fourth-edition
    And available source codes to learn
    https://csharpindepth.com/downloads
     
    Last edited: Aug 15, 2019
  41. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,992
    The 3rd(?) one on that list is the one Penguin already recommended, the "Yellow Book". I replied that I already read it (Unity recommended it way back) and it was so-so, and Penguin replied that it could use more examples.

    I feel like you're catching up on the thread. It seems like it should be easy to find good books/videos. Google makes it look that way. But once you start checking them out, they're not so great. You realize the person who made the page probably didn't read them -- they just did their own Google search and collated the results.
     
  42. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    Yeah, the OO book is targeted more at OO, which makes sense - but probably isn't best for a Unity focused newb.

    Yellow book otoh looks really good with a solid intro and simple breakdown.

    The question is - do people have the patience for actual books anymore?
     
    Martin_H likes this.
  43. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    I mean - it depends on your expectations. I, like many others from back in the day learned from books that were probably awful compared to what's available today. Back in those days youtube didn't exist, and if you wanted to self learn you bought a book or two and sat down and learned.

    The job of the book isn't to teach you, the job of the book is to enable you to learn.

    ... damn entitled kids these days. Demanding to be taught everything! ...Get off my lawn you darned whipper snappers!
     
    angrypenguin and Martin_H like this.
  44. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,992
    The most common scripting Q's are from people who have trouble using variables and IF's to keep track of things. Read the Yellow Book's chapter on variables and if's. Variables has perimeter=2*(width+height). It doesn't cover count=count+1; or total=total+n;. The IF chapter has 3 examples: if(width<min) width=min;, another for max, and if(width>=min && width<=max).

    That's better than almost every video tutorial, but can you think of anyone in the scripting forum it would help?
     
  45. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,965
    Absolutely no one if they only focused on those lines and completely ignored the content surrounding them. How much content are we talking about here? Counting the index, table of contents, empty pages, etc the book has a total of 212 pages and 30 of them are dedicated to breaking down and understanding that one program.

    The most common problems in my experience are when someone accidentally mixes up their parentheses, when someone mixes up when to place semicolons, and when someone accidentally uses "=" instead of "==". Very seldom is it anything more than that.

    By the way the first example of an if-statement is the following on page 37. He shows a pseudocode form of them earlier which can help assist you to understand the following code, and he does show little bits in the discussion of operators, but this is the first real example. He explains it and even points out the problem with mismatched parentheses.

    Code (csharp):
    1. if (width > 5.0)
    2. {
    3.     Console.WriteLine("Width too big, using maximum.\n);
    4.     width = 5.0;
    5. }
     
    Last edited: Aug 16, 2019
    Martin_H and angrypenguin like this.
  46. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    I'm both assuming he has seen a couple of beginner lessons already that cover some of what you mention, and I also don't agree that this isn't "starting small". In fact, you can't really go smaller than 1 bit. Understanding what my data means on a bits and bytes level has always been a huge help for me. And not only with programming, with image editing and audio too. For me it's the solid ground upon which further knowledge stands, the key to unlock some things from being purely abstract concepts that are merely memorized, to cause-and-effect chains rooted in the reality of what the numbers mean on the lowest level. Maybe I'm a different learner type than some or even most, but to me it was always reassuring to know that on the lowest level it's just 1s and 0s and have that actually mean something to me instead of thinking it's some arcane magic that I can't hope to ever understand.
    I'm not saying do this as the very first thing before doing some simple int math and control structures, but I see absolutely nothing wrong with going over this once before touching OOP concepts at all.

    I've read the first pages of the yellow book and on page 3, before touching a single line of code, it had this:

    upload_2019-8-16_1-12-26.png


    I quite liked that the author is establishing some solid groundwork first before jumping into code. OOP comes much later.

    I got the impression the book is intended to be read start to finish. Maybe something was explained earlier that you're missing in the explantion of the example that you mention.

    I can't tell for sure, I only have read the first dozen or so pages.

    @BIGTIMEMASTER: If you haven't read that book yet, maybe give it a go and report back how well it worked for you:
    https://www.robmiles.com/s/CSharp-Book-2016-Rob-Miles-82.pdf
     
    BIGTIMEMASTER likes this.
  47. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,965
    I half-read/half-skimmed through the book a few years back when starting Unity to re-familiarize myself with C#, and my impression of the book was that it was designed to go from front to back. The examples of using if-statements that were mentioned earlier, for example, are on page 37 but the explanation of how it all works starts on page 6.

    It's not just an example with an explanation either. It starts by describing the problem, breaking the problem down into individual steps, and then solving each of them. Basically it goes through the process an actual programmer would go through to develop a program.
     
    frosted, Martin_H and angrypenguin like this.
  48. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,617
    I believe I also pointed out that in the context it is designed for (a classroom) those examples wouldn't be expected to come from the book itself. The book isn't "so-so", it's designed as the reference part of a larger learning program.

    No one example is going to magically enlighten all who set eyes upon it. What exactly is your expectation for a "good" resource, here? As far as I can tell literally nothing is good enough for you.

    Please do keep in context that we're mostly looking at free or cheap online resources here.

    Also... I really feel the need to point out... even when I learned this stuff at university the materials and delivery weren't perfect. Nor were the books I learned from before that. While quality of resources certainly is a factor, it's not as big a factor as persistence and attitude. Discarding any resource with a flaw shows a lack of persistence and an attitude which... well, I'll just say it isn't ideal for working in this field.

    Which is in fact what caught my attention when I skimmed it years ago, too. It's not a "how to write code", it's a "how to solve problems using code".

    Code is a tool. Knowledge of tools is only useful insofar as you understand the work being done with those tools.
     
  49. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,992
    You should include that when you recommend the book: "it only has 1 example of assignment statements and if's, a very simple one, and takes 30 pages to explain it." Break it down? That example is _pulversized_.
     
  50. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,617
    Perhaps we should start a dedicated thread for criticizing learning resources so this one can get back to suggesting potentially useful ones?
     
    Billy4184 and Antypodish like this.