andrewducker: (calvin dancing)
andrewducker ([personal profile] andrewducker) wrote2011-09-19 09:39 pm

How I learn things

I learn by doing.

Give me something _simple_ that works, and let me play with it.

Then add another simple thing to it, and let me play with that.

Slowly build up the different levels, until I have something that is functional, and useful.

I mention this, because I'm grappling with the Velocity template tool* at the moment. And the documentation is shit, and in a particularly strange way.

Firstly, the documentation isn't on the actual website. Which means that you can't have a three minute scan before you decide if it's what you want, you have to actually download it, unzip it, and then look in the docs folder. This is not a great start.

Then, when I start looking at the User Guide it works in _exactly_ the way I want - if you're the person writing the web pages. It does exactly what I want - start off with a simple "Hello World" example, and then build up from there into something useful.

It wasn't until I'd read that all the way through that I realised that it hadn't provided anything useful for setting it up in the first place. So I skip to the Developer Guide, and the first part is "The Fundamental Pattern". Except that that doesn't start me off with a "Hello World" example, but instead starts telling me what abstract steps I need to carry out, and then hits me with the choice of whether to use the Singleton Model or Seperate Instance.

And if you're baffled by that, then you're not alone. The people writing the documentation clearly think that the best way to learn is to feed you all of the abstract information about the design of the system up front, and then once you understand it all perfectly you'll be able to write whatever you want. And I just don't learn that way.

What frustrates me is that the way I learn is clearly not unusual. Every single computer game follows the model I laid out at the top. Learn a simple move/technique, use it to solve a problem. Learn a second technique, use it to solve another problem. Solve a problem that combines technique one and two at the same time. Learn a third technique, and so on.

I really don't understand why more people don't get it.

*Take some HTML, mix in some data, throw it at the browser. I didn't like JSP very much, because it has the code in the middle of the html, and I'd rather keep them separate if I can.

[identity profile] steer.livejournal.com 2011-09-20 10:16 am (UTC)(link)
I remember the first time I worked with a model-view-controller architecture the whole damned thing seemed like magic for a long time and I'd got a lot of examples working but just couldn't figure it out. I needed to read up on that abstract framework before I could stop fighting the paradigm and trying to bend example code to do the wrong thing. I think it's because I'm used to fairly straightforward coding in various languages. Having "code" (or code-like things) in three seemingly unrelated places, well, I just did not click with it until I got a firm grip on the paradigm.

[identity profile] steer.livejournal.com 2011-09-20 10:24 am (UTC)(link)
Perhaps the key is finding the exact moment where the abstract view is useful. In the case of MVC I bogged down too long in examples and trying to curve those examples to do "the right thing" without understanding the bigger picture. It's really horrible to see programmers who get stuck in that mode of operation because you end up with "programming by google" where they desperately scrape around trying to find the example which does the nearest thing to what they want without a larger understanding. (I remember one guy I was loosely supervising and I solved a problem by making a variable static so it could count class instances... a week later when I came back to look at his progress *every* variable was static and nothing worked because he didn't understand what "static" was but just that I could solve problems using it).

It also depends on your existing set of concepts I suppose. Someone with a firmer grounding in databases would likely have "got" MVC frameworks faster than I did.