Trying to help noobs is SOOOO FRUSTRATING!

I often wonder if I’d like to teach. It’s certainly fun to teach when the students are easy to teach ? But where’s the challenge in that?

I wrote webglfundamentals.org (and webgl2fundamentals.org) and I answer tons of WebGL questions on stackoverflow but sometimes it’s sooooooooooooooo frustrating.

I’m trying to take those frustrations as an opportunity to learn better how to teach, how to present things, how to be patient, etc but still… As one example all the examples on the 2 webgl sites use a few external scripts. One is called webgl-utils.js and for 95% of the samples only 2 functions are used. One is the boilerplate code to compile and link GLSL shaders. I point this out after the 1st sample (the only sample that doesn’t use that function). The function has a hopefully easy to understand name webglUtils.createProgramFromScripts so I’m hoping users have read the initial page and read the description and followed the links that explain these things.

The other function is one that resizes a canvas’s drawingBuffer to its CSS display size. This is also pointed out in the initial page with a link to what it does and how to implement it.

And yet I get questions about it quite often as in: “Your samples don’t run without webgl-utils.js so I couldn’t get it to run.” ?

This brings up the next problem. WebGL is arguably a semi-advanced programming activity but lots of people with very little programming experience come to learn and so now they need to be handheld through all things unrelated to WebGL but related to basic programming with HTML and browsers. Things like:

  • You can right click to save a page
  • You can download any script by typing it’s URL in the URL bar
  • You can find errors in your script using the JavaScript console
  • What script tags do
  • and many more basic JavaScript usage

To try to help with that I added a setup page that’s also linked to at the top of the first lesson. It tells you how to download the entire site, how to setup a simple point and click web server, how to open the JavaScript console to see errors.

And yet I get more questions. It’s like offering a class on pizza making. Bringing dough, tomato paste, salt, and cheese and then having the students ask how do you make the cheese? Or going to a drawing class and getting asked how to make pencils. It’s not a pencil making class. It’s a drawing class. I don’t know if those are good analogies or not.

The other included library in all the samples is called webgl-lessons-helper. It’s there solely to do some things on the site itself and can be removed. For example it can display “your browser doesn’t support WebGL”

It also detects if you’re running inside the online editor and if so captures errors and displays them on the page (because so many noobs didn’t know to open the JavaScript console to see the errors).

This is the code you see. I guess I hoped it would be clear you can remove it.

    webglLessonsHelper.setupLesson(canvas);
    var gl = canvas.getContext("webgl");
    if (!gl) {
      webglLessonsHelper.showNeedWebGL(canvas);

Maybe I should change it to this

    webglLessonsHelper.setupLesson(canvas);   // you can delete this line
    var gl = canvas.getContext("webgl");
    if (!gl) {
      webglLessonsHelper.showNeedWebGL(canvas);   // you can delete this line

But I’m sure I’d still get complaints because if you didn’t delete those lines and you didn’t include the script then it won’t work.

I could change it to this

    webglLessonsHelper && webglLessonsHelper.setupLesson(canvas);   // you can delete this line
    var gl = canvas.getContext("webgl");
    if (!gl) {
      webglLessonsHelper && webglLessonsHelper.showNeedWebGL(canvas);   // you can delete this line

In which case it would work but now I’d get questions about what those magic lines do.

I suppose I can work on making it invisible but that’s not the end of it. Later in the lessons I add 2d and 3d math. At some point instead of including those functions in every sample I just start including them from 2d-math.js and 3d-math.js. But now I’m back to the same problem.

I could change the site to insert all JavaScript inline. Basically I’d take every <script> tag and copy its contents into the html file. No more script tags. But, that would be horrible. A 50 line or 100 line sample suddenly becomes a 2000 or 4000 line sample.

It doesn’t help that every “I couldn’t get this to work” appears as a downvote (real or not). Of course I want to make it work for all users but I have no idea how to get there. Maybe it’s just impossible and I just have to accept that every user only has the knowledge they have so far and that I have to provide whatever they’re missing. It’s still super frustrating for some reason.

  • Would it be possible to add something at the top of every page to say “if you have any problems, please work through lesson 1 before asking for help”?

  • Yea that’s a possibility. Can you imagine a cookbook where at the top of every recipe it said “If you don’t know a certain cooking technique please refer to Chapter 1”? ?

    Maybe they aren’t comparable because books have several hundred years of history and websites don’t.

    I’ll consider it. Unfortunately I don’t think the same people that ask the questions would even notice. Kind of like watching my aunt try to use a computer and when it doesn’t do exactly what she expects she gets lost even if the program is telling her exactly what to do.

    Aunt: “I can’t print. I get an error”

    Me: “What does it say?”

    Aunt: “Printer is not turned on”

    Me: “Did you turn the printer on”

    Aunt: “Oh”

    ?

  • I call those the “magic box” users. They know that if they perform the ritual in the correct order, the magic box will do magic and a thing will happen. If they cast the ritual wrong, or the magic box doesn’t do the thing, they assume that the ritual to fix it is so oblique that they could never work it out on their own, so they call in the warlock.

  • Ángel Luis

    I think you make a mistake. when you link to webgl2fundamentals.org it go to webglfundamentals.org

  • doh ? thank you

  • Andrea Di Stefano

    Maybe making a small video about the basics would make it easier? It sounds like a hassle but it can be less intimidating than reading for some.
    Then you start enjoying making videos, having a following, setting up a patreon and voilà, you’re a youtuber!