How do people use examples?

Indeed. I learnt OTJ too. Arrays and subscripts are a big thing in scientific programming.

4 Likes

How many of us were taught flowcharts for programming (diamond boxes for yes no questions, speach bubbles) or system flow (paper tape input)

For 2 years I taught this to students with jacksons structured programming technique (jsp named after Michael jackson, Scottish guy not the singer)

The went out to work as a programmer analyst and I was the only one who documented in the team, only did 6 months before going back to teaching.

4 Likes

Yep. That is how Fortran was taught, and that is how I went about planning a program .Dont do it much today… Modern languages like R get rid of some of the complicated looping and we dont use 'go to ’ or 3 branch if statements.

5 Likes

I wanted to learn

But my teacher could not understand or follow it. Ended up doing it myself much later in life but don’t remember it now

3 Likes

Yes, sir. It was a requirement both for the classes in college and later at work.
The one I used looked like the one below.

7 Likes

We are literally learning that Right now!!
Having exam based in that day after tmrw!
What a timing!

6 Likes

I still have mine in my workshop, wondered what to do with it, should I throw it away, but every time it goes back in the box with things to consider later, like my sliderule … someday after I have gone the bins will be full of the crap I have kept just in case.

Did not know they still taught this stuff, thought it was for us old timers to discuss over dominos at the bar… those were the days.

5 Likes

You cant skip over history when learning any topic.
Each generation of humans is condemned to relearn everything that has been learnt in the past.
There are shortcuts, but you lose something .
Can you imagine a programmer who had never heard of flowcharting? That is like a mathematician who never heard of algebra.
We might not use it explicitely today, but it is in our head every time we code.

6 Likes

In case you need a FOSS tool to draw such thing:

I found it extremely useful, while it was originally designed to draw flowcharts, I used also it for drawing very simple basic schenatics, and even floorplan!

It’s most probably in the repos of your distro, at least Debian has it.

5 Likes

Thanks for mentioning the app!

2 Likes

I was 2 times.
First, I was approx. 12…13 years old, and I got a book about BASIC, would you believe I still remember it? It was a yellowish book, the title was like “Get to know the BASIC language” - was in hungarian of course.
It was a very funny interesting book, richly illustrated, printed with letters which seemed like handwriting, I don’t remember the authors name. The author wasn’t hungarian, so it was a translated book.
But I clearly remember there were flowcharts discussed.

Then later in my life I learnt about it on the college again.

I do. In fact, if there’s an example, that makes me understand it (better, if not at all).
For me that was always the case, for example (hehe! :smiley: EXAMPLE!!! :rofl: ) if we have a new type of boardgame and first play it in the company of friends: I barely can understand the rules without providing an example case for me :slight_smile:

Maybe that depends on how clever a person is: more clevers don’t need examples, less clevers do. I’m definitely the latter.

Oh yes that works for programming!

As you said it later in the topic about flowcharting:

I also have it in my head.

For example ( again :rofl: ): when I write a shellscript for doing something, I know exactly what kind of result I expect.
To reach that goal I have some “programming models”, kind of previously learnt steps, which are needed to find out the algorythmical steps to reach the goal. For example (I’m addicted to examples, sorry :smiley: ) first I did not know how to make a loop in bash, that counts down from 10 to 1 and do something in every step with the decreased variable: but I knew exactly, there must be a way to create such a loop, I could say I have “flowchart thing” in my head.

I just had to look up how a loop can be constructed in bash.
Same goes for functions.

I think the best approach is to start with simple easy things, and gradually get into deep. That’ approach proved to work for me in more areas, the way to learn dancing (well, I didn’t become a Fred Astair anyway :smiley: ), to learn a spoken/written language, but also to learn to use Linux after I spent half of my life with Windows…

4 Likes

I have used dia to draw path diagrams… they are like flowcharts but represent causal links between traits in biology.
It is simple to use and quite visual.

5 Likes

I with you pal. I need examples. That is the way I learn Basic and when I have a problem with CLI or Bash, I look for examples on the internet. I find the Man pages for the CLI commands just about useless. The Man page throws (shows) every option in detail (which it should to be well documented), but I don’t need to know 6 ways to Sunday (every option). I need to see how the basic command works.

I need to learn something then build upon it. Knowing every option at the beginning is just too much information for me at one time.

6 Likes


Doing the flow charts!

4 Likes

Thanks for sharing the booklet would love to see the exams … wonder if now we would pass ?

1 Like

5 Likes

Will you move onto this next ?

Jackson structured programming - Wikipedia.

Perhaps you can ask your teachers or if there is a new method since this

2 Likes

I’m wondering, anyone at Microsoft is aware of those pricniples?
:smiley:

3 Likes

Yes man pages give you all options. I dont think they are meant for getting a start.
In R, if you write a package, every user-visible function has to have a help page ( R equivalent of a man page) and every help page has to have an Example section.

There is a project … add an Example section to all the man pages.
Some of them do have examples, they are usually right at the end,. … but most do not. We need to fix that. They do not even force developers to provide a man page… that is the first step. Then they need to set some rules for the content, including mandatory examples.

In R, if I submit a package which breaks the rules, it is rejected. Linux and BSD need to be managed like that.

If you want to see some really bad documentation that lacks examples, read the
Grub Manual. GNU are famous for poor documentation… they even tried to replace man pages with info, but it is even worse because there is no set format and you dont know where to find things.

3 Likes

Donald Knuth " The Art of Computer Programming"
it is about algorithms

" Programs are meant to be read by humans and only incidentally for computers to execute. " Donald Knuth

Your Jackson link seems to be mostly about I/O and data structures

Also Nicklaus Wirth… he was the force behind structured programming
https://en.m.wikipedia.org/wiki/Algorithms_%2B_Data_Structures_%3D_Programsb

2 Likes