You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

C programing on the TI-84 plus CE. by: Alvajoy123

b/[Inactive] Hero Core (TI-83+/84+) Started by Alvajoy123, June 16, 2017, 05:22:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

u/kotu June 16, 2017, 09:14:02 PM
No, technically C is a subset of C++.

Also several points:
C++ is not categorically/absolutely better than BASIC/Java etc. The different languages serve different purposes. In fact, C++ is more dangerous than those languages.

Also
OOP, classes, pointers, are not required learning, in general. BASIC has none of these, for example.

But please feel free to discuss
u/mazhat June 16, 2017, 09:36:49 PM
Concerning C++ being a subset of C, I agree with you.
I just see a lot of arguments on the interwebzz.
Programmers love to argue with each other on trivial things for some reason.

On my points I try to make generalisation's to be efficient in typing.
I was actually planning to leave out the word "better" in my post because it's simply wrong.
->Assembly was made with the limitations of days gone by.
->Java was made with security in mind (e.g. to prevent things like buffer overflow exploitation with pointers)
->Basic is meant to be quick to program in, and easy to learn.
And I respect those design choices.

Oh yes, I understand your last point, but
I will say that learning those concepts are very convenient in the long term, for C++ specifically.
In general just stick with the basics like variables, conditionals and loops and you'll be fine.
u/kotu June 16, 2017, 09:38:55 PM
BASIC is not necessarily meant to be quick to program in

:p
u/mazhat June 16, 2017, 09:42:49 PM
You want me to be honest with you?

I've only used BASIC and TI-BASIC a few times.
I'm a fraud who tries to sound knowledgeable.

00 PRINT "This is pretty much the extent of my knowledge"
10 GOTO 00
u/kotu June 16, 2017, 09:52:24 PM
At least you know why goto is bad
u/mazhat June 16, 2017, 11:08:57 PM
In my book the only place goto is welcome is in Assembly (jumps) and nested loops.
Otherwise don't you dare spill that spaghetti on my computer.

Irrelevant: I personally prefer to use C++ and Assembly for programming.
I would learn C, but I feel it'd be redundant.

Also I realised how strange Alvajoy's first post is:
*Include is spelled wrong
*Nothing comes after
WHO IS THIS MAN?
u/kotu June 16, 2017, 11:10:03 PM
I enjoyed it
u/c4ooo June 17, 2017, 04:25:58 AM
Quote from: kotu on June 16, 2017, 09:52:24 PM
At least you know why goto is bad
All loops (for, while, etc) in c/c++/whatever are implemented using goto (aka jump aka branch) instructions. How do you feel about that? :V
u/kotu June 17, 2017, 06:20:28 AM
Well, I already knew that






:p
u/Dream of Omnimaga June 17, 2017, 02:10:04 PM
Quote from: mazhat on June 16, 2017, 11:08:57 PM
In my book the only place goto is welcome is in Assembly (jumps) and nested loops.
Otherwise don't you dare spill that spaghetti on my computer.

Irrelevant: I personally prefer to use C++ and Assembly for programming.
I would learn C, but I feel it'd be redundant.

Also I realised how strange Alvajoy's first post is:
*Include is spelled wrong
*Nothing comes after
WHO IS THIS MAN?

Or the TI-81, where the only loop instruction is goto
u/_iPhoenix_ June 17, 2017, 07:44:22 PM
My list of problems with this thread:
[spoiler]
1: It's off topic.
2: it's in a freaking inactive subforum, which is for a completely different calculator, and purpose. ([Inactive] Hero Core (TI-83+/84+), which is one of Keoni29's projects)
3: Not technically a problem, but a better thread name would be "Alvajoy123's C learning thread"
[/spoiler]

Ok, with that done, I completely agree with mazhat, that learning the programming language is not as important as learning the concepts.

Pro tip: Learn normal C before you attempt Calculator C.

Here's how a programmer (me) approaches a new language (in this case, C, as I am learning it myself)

0: Read up on the language, major concepts in that language, and especially a refresher on the basics of OOP (Which I find I forget quickly)
1: Find a good tutorial. I sincerely recommend learn-c.com, as it is still a huge resource to me.
1b: DON'T SKIP THE BASICS IN FAVOR OF MORE ADVANCED PROJECTS, ONLY DO 1-4 LESSONS A DAY, AND AFTER THAT, WRITE A SMALL PROGRAM DEMONSTRATING THOSE LESSONS AND WHAT YOU LEARNED. I find I cannot stress this enough.
2: Attempt a *simple, small* project. It should be challenging enough that you need to think about it for more than 30 seconds, but not as complicated such that it takes you a few days.
3: Repeat steps 1-2 with a few different simple tutorials, to make sure that you have the basics down.
5: Now, you should be fluent in this new language enough so that you can learn C for the CE, following the tutorial given on the github.

u/kotu June 17, 2017, 07:48:29 PM
I would say fair enough, but these points...

1) what environment/compiler would you recommend to develop C programs on PC??

2) C doesn't really have OOP, it has structs.

EDIT
to clarify, C is a structured programming language, not an OOP one.
Last Edit: June 17, 2017, 08:13:03 PM by kotu
u/_iPhoenix_ June 17, 2017, 08:18:13 PM
1) I have a mac, and use Terminal and Sublime Text.
2) Yes, but having an understanding of OOP helps one understand structs.
u/kotu June 17, 2017, 08:26:17 PM
I wouldn't really agree, structs are just data structures

OOP really entails a lot more ie. having both private and public data members, and function methods - code is contained within the class (as opposed to just having functions which act upon data structures, as in C)

ie. you have a class Car
Car->DriveFast()

etc
u/c4ooo June 17, 2017, 08:45:41 PM
Questions aside, what is this doing in the HeroCore subforum ???
Same for the https://codewalr.us/index.php?topic=2111.0 thread.
Website statistics


MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators
Powered by EzPortal