Tax man for the Commodore PET

Other Computers and Game Systems

Moderator: Moderators

Post Reply
20questions
Vic 20 Hobbyist
Posts: 114
Joined: Sun Mar 10, 2019 7:39 pm
Location: lodi california
Occupation: student

Tax man for the Commodore PET

Post by 20questions »

Apologies if this infringes on the 2600 game, but what else can I call it.

Created using Basic and Def FN statements. If we have a crap game competition, would this be a valid entry? :lol:

wrong link sorry :oops:

https://1drv.ms/u/s!AjhScqO7wC6kh5sqgjP ... A?e=wvI95c

someone comment :o
Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start 8)
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Tax man for the Commodore PET

Post by Mike »

20questions wrote:someone comment :o
You want a honest opinion? O.K. - this program is just a collection of INPUTs, PRINTs, IFs and DEF FN's that don't serve any conceivable purpose, and which neither would qualify as game.

Boy, if you really want to become a programmer - regardless whether on current systems or on old hardware - ask someone in your family or neighborhood who you know works in that field. Take a good read on an introductory book for programming. You really know so few things about programming that at the moment all hope is lost on you trying to teach you the basics, given the low-bandwidth information exchange only possible in forums.

The advice above is given under the proviso, that you really don't know any better. Many people could likewise mistake your low learning curve over the last year(s ?) for just trolling around.
20questions
Vic 20 Hobbyist
Posts: 114
Joined: Sun Mar 10, 2019 7:39 pm
Location: lodi california
Occupation: student

Re: Tax man for the Commodore PET

Post by 20questions »

Mike wrote: Sat Feb 22, 2020 12:38 pm
20questions wrote:someone comment :o
You want a honest opinion? O.K. - this program is just a collection of INPUTs, PRINTs, IFs and DEF FN's that don't serve any conceivable purpose, and which neither would qualify as game.

Boy, if you really want to become a programmer - regardless whether on current systems or on old hardware - ask someone in your family or neighborhood who you know works in that field. Take a good read on an introductory book for programming. You really know so few things about programming that at the moment all hope is lost on you trying to teach you the basics, given the low-bandwidth information exchange only possible in forums.

The advice above is given under the proviso, that you really don't know any better. Many people could likewise mistake your low learning curve over the last year(s ?) for just trolling around.
it was just something i cooked up in my spare time. Still learning Commodore Basic. things that take people days to master take months for me, programming is no exception. besides, i wanted to make something to impress my mom. neither of us are in engineering or programming. so, i can't really ask for help that way. Any books you might recommend?

also your comment "You really know so few things about programming that at the moment all hope is lost on you trying to teach you the basics" makes me think that you are jumping the gun. i may be inexperienced but i am not a lost cause. regardless, i will read up on the PET and Vic. People back then had more time on their hands, that's the issue. I was born in the wrong era. also it's hard to judge a persons mood in a forum. am i pissing someone off? am i in the wrong age group? I honestly prefer face to face but i'm not about to travel to fresno just for that, so you can see my frustration when someone tells me that my effort is half baked. nice chat :D
Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start 8)
TMR
Vic 20 Amateur
Posts: 65
Joined: Fri Jul 01, 2005 3:00 am

Re: Tax man for the Commodore PET

Post by TMR »

20questions wrote: Sat Feb 22, 2020 11:40 pmPeople back then had more time on their hands, that's the issue. I was born in the wrong era.
We didn't have more time available, I taught myself BASIC and then assembly language whilst at school so learning was slotted between school work, homework, family life and so on. And don't forget that you have all the resources of the internet - both in the form of people to ask on forums or social media and pretty much every book worth reading on the subject - and what is a pretty much uncrashable emulation of the hardware with the option of doing belt-and-braces programming through Windows-based tools so crashing the "machine" isn't fatal to the program.

We were usually working alone or occasionally in small groups if lucky, perhaps with access to a couple of reference books and some of us couldn't even afford a disk drive so were saving and loading our work to tape!
20questions wrote: Sat Feb 22, 2020 11:40 pmso you can see my frustration when someone tells me that my effort is half baked. nice chat :D
Looking quickly at the code... you've gone completely around the houses with the DEF FN (that could all be done with regular variables), there's a random GOTO at a point where the program would fall through to that line anyway and a lot of the rest of the program just seems disjointed, like two smaller programs have been slammed together and the first one has no bearing on the second.

(mod: mismatched BBCode repaired)
Last edited by TMR on Tue Feb 25, 2020 2:11 am, edited 1 time in total.
English Invader
Vic 20 Scientist
Posts: 1193
Joined: Tue Apr 28, 2009 3:51 pm

Re: Tax man for the Commodore PET

Post by English Invader »

You probably shouldn't be posting "Hello World" type programs here. It's a bit like posting a video of you playing Three Blind Mice on a recorder in a forum full of grade 8 musicians.

These are basic training programs that you should be doing in your own time. Post for advice if you need help to understand the material but the learning process is yours and yours alone. And don't expect things to happen overnight; it may take a very long time for you to be able to produce programs that will be of interest to other users (months or years depending on your level of commitment).
User avatar
Victragic
Frogger '07
Posts: 605
Joined: Tue Nov 14, 2006 5:56 pm
Location: South Australia

Re: Tax man for the Commodore PET

Post by Victragic »

I haven't looked at the program, but some general advice - all it really takes is a clear understanding of something you want to achieve, and a will to make it happen. You then break down the program into smaller subparts, and work through these until you get them working.

There are plenty of Basic tutorials, I learned Basic from Introduction to Basic parts 1 and 2 from Commodore (not that I use Basic much). They are old school and suggest planning the program on paper first, and using flowcharts to map out how the program will function. This can save you time, rather than launching straight into writing code. Coding straight on a Commodore is tedious, and quickly can become a mess.

FWIW, you don't have to be the best programmer to get decent results. The first game I wrote was Frogger '07, and I did not understand much about programming when I started. By the end, I still didn't know that much. But people here were helpful, I think because they saw I was giving it everything I had, even if I didn't know much.

Just trying to encourage you to not give up, and keep raising the bar in your efforts.
3^4 is 81.0000001
Vic20-Ian
Vic 20 Scientist
Posts: 1214
Joined: Sun Aug 24, 2008 1:58 pm

Re: Tax man for the Commodore PET

Post by Vic20-Ian »

I don't think there is any excuse for the supersilious comments above on this forum for the Friendly Computer.

Everyone learns to program somewhere.

Keep going, look into things that interest you.

Sounds like you were trying some kind of simulation of Tax (I could not see the code).

I remember playing some interesting economic / harvest simulation type text games like this on Pet and Vic 20, possibly type ins.

Think about the modules your program may need, it helps to break it down into pieces or subroutines. e.g. you might need to Display instructions,Collect inputs, Generate random numbers and variable to start the simulation, Print something, React to user input with a calculation, display something in response.

e.g. Guessing game might need some bits of code to do these steps

Display instructions
Make Random Number and store it in a variable
Get user guess and store in another variable
Compare user input to stored number
Display higher or lower or correct
Loop for another guess or end game if correct

Once you have this you could try and limit the number of guesses and modify the code to loop.

This would form the basis of a simple defuse the bomb type game in so many tries game as found in something like Nightmare Park on the Pet and other systems - random mini games triggered by walking through a maze.

Above all enjoy your time coding and learning and growing and ignore the negative comments above from people who should know better.
Vic20-Ian

The best things in life are Vic-20

Upgrade all new gadgets and mobiles to 3583 Bytes Free today! Ready
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: Tax man for the Commodore PET

Post by chysn »

20questions wrote: Sat Feb 22, 2020 11:40 pmAny books you might recommend?
Do you have the book that came with the VIC-20 originally? That's Personal Computing on the VIC-20. It's probably about as good an introduction to BASIC as you'll get, even if you're using a PET. I'd say that your focus, now that you've got PRINT down, should be understanding the use of variables and how to have a program do different things based on the information in variables. That's the next step!
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5

WIP: MIDIcast BASIC extension

he/him/his
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Tax man for the Commodore PET

Post by Mike »

Vic20-Ian wrote:I don't think there is any excuse for the supersilious comments above on this forum for the Friendly Computer.

[...]

Sounds like you were trying some kind of simulation of Tax (I could not see the code).
There is nothing, I repeat, NOTHING which would me make withdraw or excuse for the reply I first made in this thread!

Feel free to post your own opinion, but do not think you can speak for other people.

If you actually would have taken a look at the program, I can guarantee you surely would have come to the same conclusions as I did.
chysn wrote:Do you have the book that came with the VIC-20 originally? That's Personal Computing on the VIC-20. [...]
20questions has been given links to this and other books a dozen times already here in the forum. It is his task however to actually read them and learn from them.
20questions
Vic 20 Hobbyist
Posts: 114
Joined: Sun Mar 10, 2019 7:39 pm
Location: lodi california
Occupation: student

Re: Tax man for the Commodore PET

Post by 20questions »

I can speak for myself. look carefully at your reply:

"You want a honest opinion? O.K. - this program is just a collection of INPUTs, PRINTs, IFs and DEF FN's that don't serve any conceivable purpose, and which neither would qualify as game.

Boy, if you really want to become a programmer - regardless whether on current systems or on old hardware - ask someone in your family or neighborhood who you know works in that field. Take a good read on an introductory book for programming. You really know so few things about programming that at the moment all hope is lost on you trying to teach you the basics, given the low-bandwidth information exchange only possible in forums.

The advice above is given under the proviso, that you really don't know any better. Many people could likewise mistake your low learning curve over the last year(s ?) for just trolling around."

Do you think i want to see this after a month's Hiatus? Do you think i want to be reminded of a comment that made me lose hope and doubt myself?

Why are you even here if your first action is to berate a novice? What Purpose does that even serve? I'm with the guy above me, at least he gave some

decent advice, you just assumed i didn't know anything and instead of giving a proper example, continued to disparage my lack of skill and genuine

inability to work around the Commodore Basic limitations. I gave you what i believed to be appropriate for my skill level and you belittled me instead of helping. How is that acceptable to some people? I will never understand your logic nor way of thinking.

1. help the new guy
2. give a helpful response
3. if possible give examples

Is that so hard?

Pillar of the community people! :x
Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start 8)
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Tax man for the Commodore PET

Post by Mike »

O.K. - this doesn't relate much anymore to the original question in the thread, but I will reply nonetheless since you addressed this directly at me:
20questions wrote:Do you think i want to see this after a month's Hiatus? Do you think i want to be reminded of a comment that made me lose hope and doubt myself?
First, you wanted a comment. Second, I gave a comment that made clear how I assess what the program code looks like and what could inferred from it regarding your skill level.

At that skill level, help from a public forum is limited. You really can't expect that I or maybe someone else will engage in a task that is roughly comparable to hands-on training. This is the reason I explicitly told you to ask for help in your family or neighborhood. I don't know you in person, but neither don't you have or need to tell me about your private life. That being said just in case you would want to explain what personal issues might be involved that probably hinder you in progressing further.

What is necessary to write functioning programs can be learned in relatively short time. You need a computer, books about programming, and you must be determined to work through the examples. Not just by typing them in, starting them and just looking what happens, but by looking at the code and trying to understand how it works.

What I could assess from the lot of programs you published thus far:

Programs in an imperative programming language (like BASIC is one) consist of three different types of programming constructs, these are:

1. Sequence
2. Selection
3. Iteration


So, what you use in your programs in full is just the first one of those constructs, Sequence. You write lots of PRINT statements for output. You do not seem to understand what selection statements do. If you seem to use them, they do not have any conceivable effect. Likewise, you do not use iteration constructs to any extent.

That means you are missing out on about two-thirds of those things necessary to write even the simplest, non-trivial programs!

There could be several reasons for this. One is these could be that you mistake programming for just scripting text or actions. But BASIC is not HTML. What a non-trivial program does, is not fixed. It depends on the input data, what output data is produced. This is another principle in computer science, you have:

Input -> Processing/Memory -> Output

This principle is so simple, it is often overlooked. Unless you only want static output (and then you can write just a text or HTML file that contains it!), you will need the selection and iteration statements to change the output depending on input.


So, this is your task: take a computer (like the VIC-20), take a book (like the User's Guide of the VIC-20), work through the examples in there, and try to infer how the examples there relate to the Sequence/Selection/Iteration constructs I mentioned here and how the programs process their input to produce their output.

And then, try to write your own programs. Line out a task they have to do and then pour it into form.

This level of understanding is about the minimum you should have at hands, and which you really should be able to reach in short time. Becoming an expert then just needs - a lot more time.
Post Reply