Author Topic: solution question  (Read 5143 times)

0 Members and 1 Guest are viewing this topic.

Offline Kiara87

  • Forum Regular
  • Posts: 164
    • View Profile
solution question
« on: July 18, 2020, 04:09:52 pm »
hello everyone from kiara
sorry for my English
but I use google translator to converse with you
this is a wonderful forum with kind people
and very helpful
thank you so much
bplus
tempodibasic
SMcNeill
for helping me in my project (they are really good)

I wanted to ask some questions for all users of this forum
there aren't many QB64 tutorials in Italian
and in this forum I only knew Italian tempodibasic
but I think this doesn't really matter
my questions are .    an opinion of each of you
of how he learned to program
you are not obliged to answer but if someone can answer maybe many people like me help
who want to learn to program
1) how quickly you learn to program in QB64
2) what materials you followed in the beginning to learn
3) It is important to copy an exercise by hand by reading and copying
4) or is it important to first see a tutorial and then without copying it try to run the tutorial when it is finished?
5)trying to modify the code is to see what changes by changing the values of the code or something else
can you learn by changing someone else's code?
6)this question is a bit impetuous but my curiosity  --> how quickly did you learn programming logic and how to start programming
7)programming logic is acquired by programming or must logic first be acquired and then everything goes accordingly? 

I hope the translator has done a good job
to make you understand what I meant in my questions

I would like to ask you more questions but I don't know how to express myself in the translator
maybe I will continue later in this post
hi by kiara87
se avessi solo un'ora per salvare il mondo, passerei 55 minuti per definire bene il problema e 5 a trovare la soluzione

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: solution question
« Reply #1 on: July 18, 2020, 08:32:27 pm »
As I am sure you know, programing is very different from person to person. I learn a lot from trial and error. I do a lot of research and development programs when I am working on a game. I have been programing since 1990. Started with Apple BASIC then to GW-BASIC.
Picked up QuickBASIC 4.5 (QB45) around 1996 and found the library DirectQB in 98 that really allowed me to try more things. Stuck with QB45 until about 2008 when My last Windows 98 computer finally smoked its CPU. I did attempt to use DOSBOX and QB45 for a short time but the speed limitations were just too hard to over come.
Found QB64 around 2011 and messed around with it for a while learning its ins and outs. Spent a lot of time browsing the WIKI, there is a lot of good information there. Joined the [abandoned, outdated and now likely malicious qb64 dot net website - don’t go there] forum in 2012, was with it until its demise in 2017-2018 upon which I joined .ORG here.
From what I have learned I think I may be one of the few here with actual schooling(primary[grade school] and secondary[college]) in programing. A lot of people just picked it up from playing with early BASIC languages and went from there.

Since I was already programing in QB45 for several years, I picked up QB64 fairly quickly.

I would Highly recommend making good friends with the WIKI, it is a really good way to pick up QB64.

I would recommend trying any exercises or examples you can find to help you pick up on how certain commands work. Now these could just be simple programs forum members post or even from tutorials.

Depending on when you downloaded your copy of QB64 there may or may not be a samples folder anymore as it was recently removed I believe. If you still have it, you could look through the code in there an play around with it.

Programming logic will tend to come as you learn more programing skills. If your just starting out do not worry too much about it starting out.

In italiano (I hope :) )
Code: [Select]
Come sono sicuro che sapete, la programmazione è molto diversa da persona a persona. Imparo molto da tentativi ed errori. Faccio un sacco di programmi di ricerca e sviluppo quando sto lavorando su un gioco. Ho programmato dal 1990. Iniziato con Apple BASIC poi a GW-BASIC.
Ho preso QuickBASIC 4.5 (QB45) intorno al 1996 e ho trovato la libreria DirectQB nel 98 che mi ha davvero permesso di provare più cose. Bloccato con QB45 fino a circa 2008 quando il mio ultimo computer Windows 98 finalmente fumato la sua CPU. Ho provato a usare DOSBOX e QB45 per un breve periodo, ma i limiti di velocità erano semplicemente troppo difficili da superare.
Abbiamo trovato QB64 intorno 2011 e pasticciato con esso per un po 'di apprendimento i suoi pro ei fuori. Abbiamo trascorso un sacco di tempo a navigare il WIKI, c'è un sacco di buone informazioni lì. Entrato nel forum [abandoned, outdated and now likely malicious qb64 dot net website - don’t go there] nel 2012, è stato con esso fino alla sua scomparsa nel 2017-2018 su cui ho aderito .ORG qui.

Da quello che ho imparato penso di poter essere uno dei pochi qui con la scuola effettiva (scuola primaria[scuola elementare] e secondaria[college]) in programmazione. Un sacco di gente ha appena preso dal giocare con le prime lingue BASIC e siamo andati da lì.
Dal momento che stavo già programmando in QB45 per diversi anni, ho preso QB64 abbastanza rapidamente.

Consiglierei vivamente di fare buoni amici con il WIKI, è davvero un buon modo per raccogliere QB64.

Consiglierei di provare qualsiasi esercizio o esempio che si può trovare per aiutarvi a capire come funzionano alcuni comandi. Ora questi potrebbero essere solo semplici programmi membri del forum postare o anche da tutorial.

A seconda di quando hai scaricato la tua copia di QB64 ci può o non può essere una cartella di campioni più come è stato recentemente rimosso credo. Se lo avete ancora, si potrebbe guardare attraverso il codice in là un gioco in giro con esso.

La logica di programmazione tenderà a venire man mano che impari più abilità di programmazione. Se il vostro appena agli inizi non preoccupatevi troppo di esso a partire.

Not sure how well that translated but hope there is nothing obscene hidden in there!
« Last Edit: July 18, 2020, 08:33:30 pm by Cobalt »
Granted after becoming radioactive I only have a half-life!

Offline Bert22306

  • Forum Regular
  • Posts: 206
    • View Profile
Re: solution question
« Reply #2 on: July 18, 2020, 09:40:18 pm »
there aren't many QB64 tutorials in Italian
and in this forum I only knew Italian tempodibasic

Anch'io!

Quote
1) how quickly you learn to program in QB64
2) what materials you followed in the beginning to learn

Having used MS QuickBasic before, it took no time at all to learn!

Quote
3) It is important to copy an exercise by hand by reading and copying

Credo di no, ma tutto dipende da te. Different people learn best in different ways.

Quote
4) or is it important to first see a tutorial and then without copying it try to run the tutorial when it is finished?
5)trying to modify the code is to see what changes by changing the values of the code or something else
can you learn by changing someone else's code?

Yes, of course, run it, modify it, this helps me, anyway.

Quote
6)this question is a bit impetuous but my curiosity  --> how quickly did you learn programming logic and how to start programming
7)programming logic is acquired by programming or must logic first be acquired and then everything goes accordingly? 

I learned programming as part of an electrical engineering course, just by doing it. I'm very sure that there are infinitely more expert and clever programmers than me, especially when it comes to fancy game-like outputs.

Quote
I hope the translator has done a good job
to make you understand what I meant in my questions

You are doing perfectly well, as far as I'm concerned. I always like to figure out where people are from. This forum is wonderful, with people from all over the world. Even, how far can you get, from Australia! Ammappate.

Offline Dimster

  • Forum Resident
  • Posts: 500
    • View Profile
Re: solution question
« Reply #3 on: July 19, 2020, 09:43:14 am »
Hello Kiara87
From your question(s) it sounds like you are interested in HOW FAST or  HOW EASY can a person learn programming and then programming in the QB64 language. I have only dabbled in BASIC, so I can't really speak to other programming languages, but I did find the BASIC language easy to understand. The words of the BASIC language (or commands if you like) have grown over the years not only in terms of number of things you can do but also more complex and powerful control over things you want to do with a program. QB64 is the best I have come across for easy of learning and wealth of options of things you want to do.

To your specific questions:

1) - I think Cobalt's "programing is very different from person to person" is correct. While I have been messing with BASIC for many years, I still consider myself a weak programmer. While I love the words and power of the language, it's the logic of the computer's order in processing these words, and the unforgiving nature of the accuracy of spelling or the order of a calculation. I see some of the programmers on this site do see the BIG PICTURE order and flow of how a computer with Basic should be laid out - like an artist who imagined painting comes easily to life on the canvas they are creating. For me it's - well I need a tree here, a cloud up here and a stream there - I stand back and realize the tree is in the wrong spot and too big - constant erasing and re-doing. So I very much buy into that theme of "The joy is in the journey not the destination". They won't be works of art like I see on this forum but I do feel very accomplished when the damn algorythm actually works.
2) - I think there is/are thread(s) on this forum with a lot of references - for me it was "QBasic Programming for Dummies" by Douglas Hergert, "Running QBasic" by Michael Halvorson & David Rygmyr and our own Terry Ritchie, check out his "QB64 Game Programming". Cobalt's suggestion to use the WIKI is also a constant guide for me.
3) & 4) Copy an exercise??? Not sure if you are asking if it's important to hand write out on a piece of paper ( ie sometimes writing it out will help clarify the problem and see the solutions if you write it out in your own words) or if your question is more focussed on the IMPORTANCE of the difference between writing out the solution to the exercise  or just reading the exercise and work directly in a program without benefit of written copy of the exercise. I very much like the way Terry Ritchie provides all the tools with examples of how those tools work and then gives an exercise. I don't really write that exercise out but I do have is a White Board and felt pen. And on the white board I will write out the flow of the solution or the steps, and then plug in the difference commands or functions - even the math formula I may need. Then I will sit at my computer, try to follow my plan (which brings us back to my trees being in the wrong place or too small in Q1).
  But I suppose which method is more IMPORTANT than another is more about which gives you a better insight to understanding the problem and seeing the solution(s)
5) Learning by changing code and Learning by changing some else's code - ya, definitely mess around with changing the coding in your program and if you watch the artistis on this forum there is an energy and enlightenment when someone posts code and another someone adds/changes it. You realize there is usually always another way of doing something
6) & 7) I don't think humans can be as logical as a computer. I think that is my biggest failing and why I will never make any money at programming. Over the years I think programming has taught me to think more logical in my personal life but right now I'm trying to learn Artifical Intelligence, whew, talk about getting the logic of a computer to think more human like..it's an up hill battle. But the computer's limitations will force you (one successful line of code at a time) to understand it's logic and order of processing. You will learn quickly at first and then more slowly as the things you need the computer to do become more complex.

I hope this long winded answer doesn't deter you from exploring QB64.

Offline JohnUKresults

  • Newbie
  • Posts: 40
    • View Profile
Re: solution question
« Reply #4 on: July 19, 2020, 11:59:34 am »
Hi.

I started my programming life on a Sinclair ZX81 many years ago, and learnt the basics by laboriously typing up long program listings from magazines, finding things that worked for me and then getting some books and progress through a Spectrum, then Basic on an Amstrad PCW and finally through to pcs via QuickBasic 4.5 and now QB64, modifying my program requirements to suit my needs over the years.

In the early days, it was all game-based, but now more utilitarian.

My philosophy has always been to try to get a core set of subroutines which do specific jobs and then build around those. I suppose I'm fortunate that I have a specific requirement in my world, so I can devote time to that (timing running races and writing software to handle the data and timings) and that's what I've been developing since I started out in 1987.

As a result I only ever need a fairly minimal understanding, which is good for me as QB64 has developed into a mindblowing array (excuse the pun) of keywords, most of which I don't understand or will probably never use.

I know that I have not developed the best programming practices over the years and have probably got sloppy code and bad habits, but what I have does the job I need, so that's always been my work method - have a specific goal, understand what I need to do and work out how to do it (then tidy it up!).

Porting my program from QB4/5 to QB64 took a day or two - the hardest part was getting my head round how the printing side of things now doesn't work with the methods I've used for 20 years!

There are many people on this forum who will be happy to help you out if you get stuck, but the knowledge base here and any books you can get your hands on (even if not specific to this version of Basic) will be helpful to you as a lot of things can be transferred from one variety to another with only relatively small changes.

It tends to be the graphical side of things which is more complex (in my view) so my programs tend to be keypress-based rather than mouse orientated.

Best of luck - you'll have hours of fun and frustration, in equal measure!!

John

Offline OldMoses

  • Seasoned Forum Regular
  • Posts: 469
    • View Profile
Re: solution question
« Reply #5 on: July 19, 2020, 01:18:51 pm »
I'll take your questions as numbered...

1) I have been working with QB64 for the past couple of years. I'm still learning, and always will be.

2) First, I learned Applesoft Basic on an Apple ][+ computer back in the 1980's. Then when I went to the PC computer, I learned Qbasic, with "Qbasic for Dummies" being my first reference to learn procedural programming. It's still the only "book" I own on the subject. I get everything else from QB64.org forum, wiki or its users. Terry Ritchie's qb64sourcecode is a wonderful tutorial btw, which I highly recommend.

3) I'm sure it's helpful to retype tutorial code, but I've not done so myself. I cut and paste and study later.

4) I generally try to read over tutorial code, understand what it's doing and then write my own version.

5) That's generally what I do. Take a bit of code and tweak and twist it to see how it changes.

6)I'm not sure I've learned it well yet, in fact I'm sure I haven't. I often spend large amounts of time staring cluelessly at the computer screen, wondering how to proceed with some algorithm...

7)My biggest hurdle is getting the logic right. I tend to throw stuff at, and rearrange, a section of code until it works.

Don't apologize for your language skills to me, I only know American English and I hope I've written clear enough to help you.

Offline Kiara87

  • Forum Regular
  • Posts: 164
    • View Profile
Re: solution question
« Reply #6 on: July 19, 2020, 05:56:26 pm »
thanks to all of you and it is interesting to know how you learned in the programming path, this makes you understand the path to take
maybe each of us has a different story

However, I would also like to understand many things about programming, for example a programmer does not know all the instructions how does he know which instruction is needed to create his piece of code? Try all the pieces of code that are on the wiki?
se avessi solo un'ora per salvare il mondo, passerei 55 minuti per definire bene il problema e 5 a trovare la soluzione

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: solution question
« Reply #7 on: July 19, 2020, 05:57:54 pm »
about BASIC and QB64
I have learnt Qbasic by myself when I got my first PC notebook! The inline help was enought to me to let grow interest into programming world. While many friends of mine deprecated Qbasic I continued with this language of programming writing some simple programs. Mixing text with graphics. So i was able to build programs while my friends were stucked by Pascal and  by C.
Turning towards QB45 to make an .EXE and some .OBJ libraries I have gone deeper in the world of programming until to manage mouse by interrupt, make TSR programs, build a clone of PcTools for DOS using the SHELL tip. QB64 is for me the renaissence of BASIC (more QB45) into the windows world and in the other operative systems.
It is harder to learn by solo than into a community where you can talk and share your experience, your dubts, your goals.
As italian language sources for starting to learn programming with BASIC I suggest you this PDF training  Qbasic pdf[/url ] and this WEB training [url=http://scuole.provincia.so.it/DeSimoni/HYX1/as978/iii/Basic/Tutoriale%20di%20Microsoft%20Quick%20Basic.htm]tutoriale QuickBasic online  .... for the excellent training you must learn English language, and the most part of these tutorials has been stressed by the other members of this wonderful community!
If you continue with your concentration on the goal you can make giant steps.


Italian version by Google Translator

su BASIC e QB64
Ho imparato Qbasic da solo quando ho ottenuto il mio primo notebook per PC! L'aiuto in linea mi è bastato per far crescere l'interesse per il mondo della programmazione. Mentre molti miei amici hanno deprecato Qbasic, ho continuato con questo linguaggio di programmazione scrivendo alcuni semplici programmi. Mescolare il testo con la grafica. Così sono stato in grado di costruire programmi mentre i miei amici erano bloccati da Pascal e da C.
Passando al QB45 per creare un .EXE e alcune librerie .OBJ Sono andato più a fondo nel mondo della programmazione fino a gestire il mouse di interruzione, creare programmi TSR, creare un clone di PcTools per DOS usando il suggerimento SHELL. QB64 è per me la rinascita di BASIC (più QB45) nel mondo Windows e negli altri sistemi operativi.
È più difficile imparare da soli che in una comunità in cui puoi parlare e condividere la tua esperienza, i tuoi dubbi, i tuoi obiettivi.
Come fonti di lingua italiana per iniziare a imparare a programmare con BASIC ti suggerisco questo corso di formazione PDF Qbasic pdf [/ url] e questo corso di formazione WEB [url=http://http: //scuole.provincia.so.it/DeSimoni/HYX1/as978/iii/Basic/Tutoriale%20di%20Microsoft%20Quick%20Basic.htm] Tutoriale online] http: //scuole.provincia.so.it/DeSimoni/HYX1/as978/iii/Basic/Tutoriale%20di%20Microsoft%20Quick%20Basic.htm] Tutoriale online .... per l'eccellente formazione devi imparare l'inglese e la maggior parte di questi eccellenti tutorial è stata sottolineata dagli altri membri di questa meravigliosa community!
Se continui a concentrarti sull'obiettivo, puoi fare passi da gigante.
« Last Edit: July 19, 2020, 06:15:13 pm by TempodiBasic »
Programming isn't difficult, only it's  consuming time and coffee

Offline Kiara87

  • Forum Regular
  • Posts: 164
    • View Profile
Re: solution question
« Reply #8 on: July 19, 2020, 06:48:27 pm »
about BASIC and QB64
I have learnt Qbasic by myself when I got my first PC notebook! The inline help was enought to me to let grow interest into programming world. While many friends of mine deprecated Qbasic I continued with this language of programming writing some simple programs. Mixing text with graphics. So i was able to build programs while my friends were stucked by Pascal and  by C.
Turning towards QB45 to make an .EXE and some .OBJ libraries I have gone deeper in the world of programming until to manage mouse by interrupt, make TSR programs, build a clone of PcTools for DOS using the SHELL tip. QB64 is for me the renaissence of BASIC (more QB45) into the windows world and in the other operative systems.
It is harder to learn by solo than into a community where you can talk and share your experience, your dubts, your goals.
As italian language sources for starting to learn programming with BASIC I suggest you this PDF training  Qbasic pdf[/url ] and this WEB training [url=http://scuole.provincia.so.it/DeSimoni/HYX1/as978/iii/Basic/Tutoriale%20di%20Microsoft%20Quick%20Basic.htm]tutoriale QuickBasic online  .... for the excellent training you must learn English language, and the most part of these tutorials has been stressed by the other members of this wonderful community!
If you continue with your concentration on the goal you can make giant steps.


Italian version by Google Translator

su BASIC e QB64
Ho imparato Qbasic da solo quando ho ottenuto il mio primo notebook per PC! L'aiuto in linea mi è bastato per far crescere l'interesse per il mondo della programmazione. Mentre molti miei amici hanno deprecato Qbasic, ho continuato con questo linguaggio di programmazione scrivendo alcuni semplici programmi. Mescolare il testo con la grafica. Così sono stato in grado di costruire programmi mentre i miei amici erano bloccati da Pascal e da C.
Passando al QB45 per creare un .EXE e alcune librerie .OBJ Sono andato più a fondo nel mondo della programmazione fino a gestire il mouse di interruzione, creare programmi TSR, creare un clone di PcTools per DOS usando il suggerimento SHELL. QB64 è per me la rinascita di BASIC (più QB45) nel mondo Windows e negli altri sistemi operativi.
È più difficile imparare da soli che in una comunità in cui puoi parlare e condividere la tua esperienza, i tuoi dubbi, i tuoi obiettivi.
Come fonti di lingua italiana per iniziare a imparare a programmare con BASIC ti suggerisco questo corso di formazione PDF Qbasic pdf [/ url] e questo corso di formazione WEB [url=http://http: //scuole.provincia.so.it/DeSimoni/HYX1/as978/iii/Basic/Tutoriale%20di%20Microsoft%20Quick%20Basic.htm] Tutoriale online] http: //scuole.provincia.so.it/DeSimoni/HYX1/as978/iii/Basic/Tutoriale%20di%20Microsoft%20Quick%20Basic.htm] Tutoriale online .... per l'eccellente formazione devi imparare l'inglese e la maggior parte di questi eccellenti tutorial è stata sottolineata dagli altri membri di questa meravigliosa community!
Se continui a concentrarti sull'obiettivo, puoi fare passi da gigante.

posso dirti che prima di trovare questo forum mi sono iscritto su altri forum è quando parlavo di QBASIC oppure di QB64 era tutto un criticarmi
dicendomi sono linguaggi vecchi sono limitati non servono questi tipi di linguaggi e io cambiavo forum
ho comprato anche dei libri in QBASIC e sempre nei forum magari qualcuno diceva che copiando il codice non si impara
ecco perche ho creato questo post volevo anche sapere alcuni dettagli
però se io non so programmare è non devo copiare il codice come faccio a scrivere il codice mio
io leggendo qualche libro che ho acquistato so alcune istruzioni ma non so come aggiungerli tutti per creare un programma
so che la funzione se è una condizione se accade qualcosa oppure left$ sinista right$ destra so alcune istruzioni il problema è combinarle tra loro e formare un programma ritornando alla domanda di prima devo copiare il codice e poi magari cercare di modificarlo aggingendo qualcosa cambiando qualcosa? come posso sfruttare al meglio i libri da me acquistati?
ovviamente sono libri di QBASIC perchè di QB64 credo ancora non esistono almeno per la versione italiana
se avessi solo un'ora per salvare il mondo, passerei 55 minuti per definire bene il problema e 5 a trovare la soluzione

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: solution question
« Reply #9 on: July 19, 2020, 08:20:44 pm »
La programmazione IMHO la devi guardare nella prospettiva dell'arte creativa e del problem solving. Quindi nella mia esperienza la prima cosa da fare è definire l'obiettivo che si vuole avere. Più è dettagliato e più informazioni avrai per tradurlo in un algoritmo funzionante e poi potrai tradurre l'algoritmo in codice. Come vedi qui in fondo entra in gioco il linguaggio di programmazione che stai usando o imparando ad usare. Vero è che se sei abituato ad usare un linguaggio di programmazione tendi a sviluppare soluzioni più compatibili con quel linguaggio di programmazione.
Quindi nel tuo caso del lotto vedi la differenza di impatto sul programma queste diverse definizioni:
definizione A) cercare la distanza di 30 unità tra gli estratti di una singola estrazione del lotto
definizione B) cercare le triplette con distanza 30 nelle direzioni verticale, orizzontale e diagonale. Nel caso la tripletta sia incompleta cercare l'elemento mancante nella successiva estrazione del lotto.
definizione C) individuare l'elemento mancante (qualora presente) delle triplette con distanza sequenziale di 30 unità tra gli estratti di una intera estrazione cercando le sequenze colonnari, di riga e diagonali.

--- English
IMHO you must look at programming art like to a creative art and to problem solving. So in my experience you must define the goal to get. More details you put in this definition more informations you'll get to translate the goal into algorythm working well and then to translate the algorythm to code.So as you can see only here at bottom of this process you meet the language of programming that you use or that you are learning. Also it is true that if you are used to a programming language  you'll be inclined to develope solutions more compatible with language of programming.
So in your case of Lotto program you can see the difference of impact on the program developing these three differents definitions:
definition A) find the distance of 30 unities between 2 numbers of a single extraction of lotto
definition B)find the triples with distance 30 along vertical, horizontal and diagonal directions. If the triple is uncomplete you must search the missing item in the next extraction of lotto
definition C)you must find the missing item (if it is there) of triples with sequential distance 30 unities in a whole single extraction of lotto searching into sequences of item along column, row and diagonal directions.

Programming isn't difficult, only it's  consuming time and coffee

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: solution question
« Reply #10 on: July 19, 2020, 10:45:27 pm »
Well I say just practice, like counting the words in the above reply :)

Do you think the Integer Type will be big enough? ;-))

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: solution question
« Reply #11 on: July 20, 2020, 10:06:44 pm »
Do you think the Integer Type will be big enough? ;-))

Its not the size that matters its how you use it!!  XD

Bits and Bytes and Integers, OH MY!

ANY HOW,

However, I would also like to understand many things about programming, for example a programmer does not know all the instructions how does he know which instruction is needed to create his piece of code? Try all the pieces of code that are on the wiki?

If you know what you want, but not how to accomplish it, then best thing to do is ask somebody who does. And this is a pretty good place to ask questions.
Granted after becoming radioactive I only have a half-life!