Tutorials?

For other topics related to the FreeBASIC project or its community.
BasicCoder2
Posts: 3348
Joined: Jan 01, 2009 7:03

Tutorials?

Postby BasicCoder2 » Jun 23, 2018 23:59

ecxjoe wrote:I agree with lizard that it should be updated to support more relevant formats like png and ogg. Keep it simple, but relevant. Remove barriers to entry for newcomers, like complexity and lack of support for commonly used formats.


A barrier for a newcomer is, I would suggest, a lack of FreeBASIC tutorials beyond the basics of the language itself.

There used to be lots of tutorials for QBASIC and the early versions of FreeBASIC but that has all died out.

Maybe tutorials using SDL2 to replace the FreeBasic commands for handling bitmaps?

Maybe a tutorial to write a complete game like a simple version of Toad on Fire using SDL2?

Even if you don't write games I think a game tutorial is a simple way to show how to use libraries for graphics, sound and user input in a program.
lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Tutorials?

Postby lizard » Jun 24, 2018 2:49

BasicCoder2 wrote:A barrier for a newcomer is, I would suggest, a lack of FreeBASIC tutorials beyond the basics of the language itself.

In german language there are lot of tutorials, examples and projects here:

https://www.freebasic-portal.de/tutorials/

I suppose most already know.
BasicCoder2
Posts: 3348
Joined: Jan 01, 2009 7:03

Re: Tutorials?

Postby BasicCoder2 » Jun 24, 2018 6:26

Sadly I can only read and understand English.

I would not say there was a lot of tutorials there beyond teaching the basics. Code examples are not what I call a tutorial. When I google for code tutorials on some subject I get plenty written for C++, Python, Java and so on but they have to be translated to FreeBASIC code and thus require some expertise in those languages.

I could write some tutorials myself on some subjects that interest me although the code would be very basic. Problem is the subject may not interest anyone else and it would be a wasted effort. Also I would have to create a web page as the QBASIC magazine no longer exists.

Anyway it was just a passing thought based probably more on my own wish list rather than any beginner requirements so forget I posted anything.
Tourist Trap
Posts: 2674
Joined: Jun 02, 2015 16:24

Re: Tutorials?

Postby Tourist Trap » Jun 24, 2018 6:55

BasicCoder2 wrote:
I could write some tutorials myself on some subjects that interest me although the code would be very basic. Problem is the subject may not interest anyone else and it would be a wasted effort. Also I would have to create a web page as the QBASIC magazine no longer exists.


Hi,

I already tried to summarise one ore two ideas I though useful and posted them. That it didn't interest a lot of people wasn't something I took into consideration. It had the advantage to force me put into order my thinking, and also to give a chance to the topic to come into the light (or not). The other capital point of posting is that you could certainly be ignored if you said something right, but not if you are wrong. Take this stuff for example:
viewtopic.php?f=7&t=25182&p=226123&hilit=alias%2A#p226123

I also remember we discussed of a simple way to program a scrolling game, and so on. You helped well. This kind of thing needs always a refresher.
viewtopic.php?f=15&t=24054&hilit=scrolling%2A
If you want to write the refresher please go on, everybody like scrolling.

You could also write 《tooltorials》(very general code examples), like this:
viewtopic.php?f=7&t=25049&p=228919&hilit=array%2A#p228919

In one word, there is no unique form of contribution, and this would be interesting to have advices around fb from anyone who have some to give in its favourite field.
lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Tutorials?

Postby lizard » Jun 24, 2018 8:31

Tourist Trap wrote:In one word, there is no unique form of contribution, and this would be interesting to have advices around fb from anyone who have some to give in its favourite field.

Maybe the best form of contribution are examples. We all know the situation, we want to quickly program a .pdf output with cairo for example. "Wait, there was a demo in the example files that came with fbc..." Then you can load this example, change few things and your pogram part is ready, without reading tons of sites and long explanations. Thats programmer style.
Tourist Trap
Posts: 2674
Joined: Jun 02, 2015 16:24

Re: Tutorials?

Postby Tourist Trap » Jun 24, 2018 10:13

lizard wrote:Maybe the best form of contribution are examples. We all know the situation, we want to quickly program a .pdf output with cairo for example. "Wait, there was a demo in the example files that came with fbc..." Then you can load this example, change few things and your pogram part is ready, without reading tons of sites and long explanations. Thats programmer style.

I agree 100% with this. In fact we don't know by advance when we'll need this or this information on what matter.
We have examples coming with the fb distribution of course but they can't be exhaustive unless someone decided to grab everything valuable everywhere (coded in fb), then sorted it, and maintained the information on the prerequisite (a missing dll for any reason with time passing would break the code ..etc.).
This is not how I would do then. For me there is a need for some automated referencement of the published stuff. I started this for testing the concept and it should work. May someone end it, or me if I find the precious time! and we would have something. Of course referencing the past content is not enough, it supplements the distributed examples, but new stuff should always feed the base.
In case someone wants to know how I project in an unknown future to reference the things, here the proof of concept (yet quite in disguise at the time):
viewtopic.php?f=8&t=24884&p=222463#p222463
This things sort the text by frequency, so if well used you may sort any topic by content (if cairo is cited 12 times as well as pdf in the same topic, chances are that you found your grail). This is more the kind of job for the admins, but we can certainly make a well illustrated proposal first.
Ok this is just an idea among others. I know that it's not obvious how it differs from the search function of the forum, but in my mind it does by a real ability to know all the context.
deltarho[1859]
Posts: 1723
Joined: Jan 02, 2017 0:34
Location: UK

Re: Tutorials?

Postby deltarho[1859] » Jun 24, 2018 11:52

BasicCoder2 wrote:Sadly I can only read and understand English.

I accepted Google's offer to translate. Some of the tutorials are very good. Interestingly, PowerBASIC's German site is also an excellent resource.
Tourist Trap wrote:In case someone wants to know how I project in an unknown future to reference the things, here the proof of concept (yet quite in disguise at the time):

5040 views and no response. Been there and got the tee shirt, so to speak.

Sadly, this thread will result in nothing - as has done with all the others in a similar vein.
BasicCoder2
Posts: 3348
Joined: Jan 01, 2009 7:03

Re: Tutorials?

Postby BasicCoder2 » Jun 24, 2018 12:04

lizard wrote:Maybe the best form of contribution are examples. We all know the situation, we want to quickly program a .pdf output with cairo for example. "Wait, there was a demo in the example files that came with fbc..." Then you can load this example, change few things and your pogram part is ready, without reading tons of sites and long explanations. Thats programmer style.


Well that explains a lot. I clearly don't have the programmer style.

I like and need to understand the concepts and methods explained at a high level first. After that I can translate it down into any language that I am familiar with. I understand the Bresenham line drawing algorithm but it did not come from looking at coded examples. I would never try and explain it by providing the code first. Another example on the forum was how I finally understood the A* path finding algorithm. I didn't magically "get it" from looking at code examples of the algorithm. I also belong to the group of people who find it easier to understand visual explanations.
viewtopic.php?f=7&t=24737&hilit

So I do need to read tons of sites and long but clear step by step explanations. I am also self taught in electronics. I bought lots of books that explained the same things differently until I finally understood the concepts involved. Those with a V8 brain and a degree in maths and physics would probably get it straight away. Thankfully books were written by some of these experts who were able to simplify the concepts and maths in plain English to the layman.
Last edited by BasicCoder2 on Jun 24, 2018 18:18, edited 1 time in total.
BasicCoder2
Posts: 3348
Joined: Jan 01, 2009 7:03

Re: Tutorials?

Postby BasicCoder2 » Jun 24, 2018 12:11

deltarho[1859] wrote:Sadly, this thread will result in nothing - as has done with all the others in a similar vein.

Yes I think you are right. I have to accept I am an outlier on the bell curve of what makes a good programmer and keep my thoughts to myself.
deltarho[1859]
Posts: 1723
Joined: Jan 02, 2017 0:34
Location: UK

Re: Tutorials?

Postby deltarho[1859] » Jun 24, 2018 13:24

BasicCode2 wrote:I have to accept I am an outlier on the bell curve of what makes a good programmer and keep my thoughts to myself.

I don't accept that - you have been knocking out some interesting stuff at the Machine Learning thread.
Tourist Trap
Posts: 2674
Joined: Jun 02, 2015 16:24

Re: Tutorials?

Postby Tourist Trap » Jun 24, 2018 14:34

deltarho[1859] wrote:5040 views and no response. Been there and got the tee shirt, so to speak.

Sadly, this thread will result in nothing - as has done with all the others in a similar vein.

I wouldn't be so pessimistic. When I posted a question about a part of the language, I always received the right good answer, or at least some clue of it. For the projects or snippets, I understand that this is different. I myself don't find the time to post a feedback for all the cool stuff I grab around this place. So I can only accept that feedback may or may not come, and sometimes it comes too early, or too late. Too early yes possibly, I have many times corrected a code that I posted too fast, because nobody answered to it too fast also! (leading to useless polemics)

Tutorials are never totally lost. They train the author in good exposition of ideas (always appreciated in society), and it is a life saver for this unknown that reads the forum but wouldn't subscribe to it by fear, shame, or modesty.

Here let's have a thought for Chung, that looks always as enthusiastic as at first day to post very cool stuff. And so many others that would desserve a price for this.
Josep Roca
Posts: 414
Joined: Sep 27, 2016 18:20
Location: Valencia, Spain

Re: Tutorials?

Postby Josep Roca » Jun 24, 2018 14:43

> Thats programmer style.

That is not programmer style, it is code hunter style. A programmer can use examples to help him to get started, but must study the code to understand not only what he does but also how it does it and why. If everybody did that (to modify an existing example) there won't be examples to start with.
coderJeff
Site Admin
Posts: 2825
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: Tutorials?

Postby coderJeff » Jun 24, 2018 17:19

Super smart guy in my opinion, worked on making VBScript https://blogs.msdn.microsoft.com/ericli ... ogrammers/
deltarho[1859]
Posts: 1723
Joined: Jan 02, 2017 0:34
Location: UK

Re: Tutorials?

Postby deltarho[1859] » Jun 24, 2018 18:56

[Richard Feynman] truly believed that if you couldn't explain something simply, you didn't understand it. Leonard Susskind.

I read a book by Feymann on Quantum electrodynamics (QED) and managed to understand it. I wondered at the time what the mathematics looked like. In 1965 he and two others received the Nobel Prize in Physics for his contributions to the development of QED.

One of the most accurate Physics is relativity but even more accurate is Quantum Physics but the most accurate Physics is QED.
BasicCoder2
Posts: 3348
Joined: Jan 01, 2009 7:03

Re: Tutorials?

Postby BasicCoder2 » Jun 24, 2018 19:46

@coderJeff,
Essentially Eric Lippert's reference to semantics of a language is what I meant when I wrote "a high level understanding". Because I knew how the line drawing algorithm worked I could always translate it down to any computer programming language I was learning. I was also able to modify it to accept different parameters as in my ray tracing dungeons program.

Code: Select all

''============================================================
'' This shoots ray from observer drawing the floor and ceiling
'' until it reaches a wall block.
''============================================================
sub shootRay(x1 As Integer,y1 As Integer,angle As Double)


Although D.J.Peters has given an example of a back propagating artificial neural net I cannot follow the code or math. It will take a while as it did with the A* algorithm to get how it works. You could use an ANN as a black box if someone shows you how to use it but I really wanted a deeper understanding than that.

Although abstraction is the key to high level thought it needs to happen in steps. You need to understand arithmetic before you tackle algebra and you need to understand algebra before you tackle calculus. Some can take those steps very quickly others like myself struggle with each step. I like writing simple programs because I find it fun or maybe its some kind of pathological compulsion.

The bottom line here is that I see a tutorial as the high level explanation and the code as just an example of how to apply it.

@deltarho[1859],
Well its nice that you think some of the posts on machine learning are of some interest. However I would really like to be able to write a working demo of an ANN net.
I thought no one actually understands quantum mechanics they just accept it as true because it works?

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest