-
MagicManICT
- Posts: 18435
- Joined: Tue Aug 17, 2010 1:47 am
Re: Learn You Some Code on Humble Bundle
There are some development tools where you don't need to learn any procedural code to start. It's drag and drop of objects and actions. (Game Maker comes to mind.) I'll gladly concede that these things are very limited in how much you can do with them without writing any actual code.
Opinions expressed in this statement are the authors alone and in no way reflect on the game development values of the actual developers.
-
Glorthan
- Posts: 1099
- Joined: Tue Jun 11, 2013 4:33 pm
Re: Learn You Some Code on Humble Bundle
They still tend to be procedural, how else do you enforce any kind of order of execution? Unless you go the prolog et al route which is extremely hard to reason about.MagicManICT wrote:There are some development tools where you don't need to learn any procedural code to start. It's drag and drop of objects and actions. (Game Maker comes to mind.) I'll gladly concede that these things are very limited in how much you can do with them without writing any actual code.
Most of the GUI dsls I've seen have a procedural flow like a flowchart with some builtins for arrays, external interaction, contionals, etc. Basically like a (very) wrapped C library but with pictures instead of words and no build setup to worry about.
-
TurtleHermit
- Posts: 88
- Joined: Mon Sep 16, 2013 1:37 am
Re: Learn You Some Code on Humble Bundle
After somewhat 50 or 60 hours, I seem to be able to write simple enough programs like advanced calculator or something similar, but pointers and mallocs are such black magic to me still. Wonder if I should spent a bit more time with C or move over to C++ or try python/java to see how different it is from C.
-
shubla
- Posts: 13041
- Joined: Sun Nov 03, 2013 11:26 am
- Location: Finland
Re: Learn You Some Code on Humble Bundle
you should not have started with c to begin withTurtleHermit wrote:After somewhat 50 or 60 hours, I seem to be able to write simple enough programs like advanced calculator or something similar, but pointers and mallocs are such black magic to me still. Wonder if I should spent a bit more time with C or move over to C++ or try python/java to see how different it is from C.

I'm not sure that I have a strong argument against sketch colors - Jorb, November 2019
http://i.imgur.com/CRrirds.png?1
Join the moderated unofficial discord for the game! https://discord.gg/2TAbGj2
Purus Pasta, The Best Client
-
loftar
- Posts: 9096
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: Learn You Some Code on Humble Bundle
I am curious why that is so. Looking out from the inside, it's difficult for me to see why pointers are even mysterious, yet it seems to be common to anyone trying to learn C. Pointers are just memory addresses; nothing more, nothing less.TurtleHermit wrote:pointers and mallocs are such black magic to me still.
I would very definitely not recommend learning C++ before understanding C somewhat properly. If you don't understand pointers, C++ is just going to be worse. Python and Java are least different in that regard, though I'd still consider it very sound to understand pointers to do any sort of programming.TurtleHermit wrote:Wonder if I should spent a bit more time with C or move over to C++ or try python/java to see how different it is from C.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
pppp
- Posts: 403
- Joined: Sun Jun 20, 2010 7:30 pm
Re: Learn You Some Code on Humble Bundle
Pointers are part of language while malloc is part of standard library. That makes a difference.
Perhaps tinkering with static tables and in particular character tables could be a way to get used to pointers without dealing with memory allocation at the same time.
Perhaps tinkering with static tables and in particular character tables could be a way to get used to pointers without dealing with memory allocation at the same time.
-
shubla
- Posts: 13041
- Joined: Sun Nov 03, 2013 11:26 am
- Location: Finland
Re: Learn You Some Code on Humble Bundle
I think that the issue is in how they are handled in code, lots of & and *, sometimes on left side, sometimes on right side ( at least in c++), it may be quite confusing for a beginner.loftar wrote:I am curious why that is so. Looking out from the inside, it's difficult for me to see why pointers are even mysterious, yet it seems to be common to anyone trying to learn C. Pointers are just memory addresses; nothing more, nothing less.TurtleHermit wrote:pointers and mallocs are such black magic to me still.
I dont think that the concept of pointers is difficult to understand to anyone.

I'm not sure that I have a strong argument against sketch colors - Jorb, November 2019
http://i.imgur.com/CRrirds.png?1
Join the moderated unofficial discord for the game! https://discord.gg/2TAbGj2
Purus Pasta, The Best Client
-
loftar
- Posts: 9096
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: Learn You Some Code on Humble Bundle
I could perhaps see how it might be confusing how the same operators are used in two different ways, in type declarations versus in expressions. But that seems like a fairly small hurdle, still.shubla wrote:lots of & and *
Really? I can't think of any examples where they aren't on the left side, in either C or C++.shubla wrote:sometimes on left side, sometimes on right side ( at least in c++)
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
shubla
- Posts: 13041
- Joined: Sun Nov 03, 2013 11:26 am
- Location: Finland
Re: Learn You Some Code on Humble Bundle
You can use both sides, which may add the confusion.loftar wrote:Really? I can't think of any examples where they aren't on the left side, in either C or C++.shubla wrote:sometimes on left side, sometimes on right side ( at least in c++)
Code: Select all
Foo* foo
Foo *foo
I'm not sure that I have a strong argument against sketch colors - Jorb, November 2019
http://i.imgur.com/CRrirds.png?1
Join the moderated unofficial discord for the game! https://discord.gg/2TAbGj2
Purus Pasta, The Best Client
-
loftar
- Posts: 9096
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: Learn You Some Code on Humble Bundle
That's objectively wrong, though. Yes, you can write that, but it's just confusing, since the * syntactically belongs to the identifier. To demonstrate, writing char* a, b; would imply that you're declaring two pointers a and b, which is not the case, while char *a, b;, or arguably preferably char b, *a; more decisively demonstrates the fact that only a is a pointer.shubla wrote:Foo* foo
"Object-oriented design is the roman numerals of computing." -- Rob Pike