What's stopping you from actually learning programming?

Posted By: WretchedSid

What's stopping you from actually learning programming? - 04/07/15 14:28

So, I'm curious, why is that there is pretty much no interest by most users to ever really learn programming and instead either copy and paste or move things around until they work?

I don't mean to be arrogant, I just really don't understand how many senior users with years of Gamestudio experience have no idea about some of the very core fundamentals of programming. Is it because it just works without and the pain is not high enough to actually get around and figure out how the puzzle pieces truly fit together? Just not enough time? No idea where to start?

Maybe it's just because this is not a hobby at all for me but my day job, but it seems just in general the people who make games are pretty clueless most of the time. Not just Gstudio, but also wildly successful indie developer out there (hey Notch!)
Posted By: Saschaw04

Re: What's stopping you from actually learning programming? - 04/07/15 14:55

I personally believe it is maybe, because you don`t have to learn it for develop amazing games, because there are a lot of helps like templates etc.

These Person are pragmatists, in my opinion which are not interested in programming, but are interested in a good result.

(but I dont Count myself to These People)
Posted By: Reconnoiter

Re: What's stopping you from actually learning programming? - 04/07/15 18:57

Quote:
So, I'm curious, why is that there is pretty much no interest by most users to ever really learn programming and instead either copy and paste or move things around until they work?
, depends on what you mean 'learn programming'. Do you mean how to program good games? Or maybe a step futher how programming and computers really work?

For me personally, I am mostly interested in making fun & good games/simulations. The programming is for me is the means and not the goal. Though sometimes I have fun with programming too, like with messing around with AI or such.

In general though I try to force myself to sometimes read something about a game design topic or more about programming. But that is to train myself in making better and more fun creations, so here too it is for me not the goal but the means. And my interests lies more in learning through doing (but not as a headless chicken just changing stuff till it works tongue , I do want to understand why something works and why something else does not work) and reading through other people's questions and solutions (like on a forum).
Posted By: EpsiloN

Re: What's stopping you from actually learning programming? - 04/07/15 22:11

I don't want to speak for other devs, especially mobile devs or Unity users grin because I'd be accused of being a 'hater', but for my personal experience, I've always wanted to be a game designer, not a programmer.

But...to be a game designer, you must have a game behind you, and if you're all alone...you don't have a choice except learn how to program, model, animate, skin, draw and compose...Don't forget the marketing stuff, writing, video editing, fund raising and all the paperwork and legal stuff for a company.

I do try to learn new things, as we discussed a few years ago (you and me), but in the whole picture...its just a drop in a lake...

But, generally, people are lazy and they prefer just to point out what they want the game to do. And they end up with the same kind of games, featuring the same kind of gameplay and graphics, and nothing new for the user.

I'm sick of generic RPGs, shooters that just shoot at people and the ton of driving games that cant catch my eye quite easily as NFS did in the old days...

Programming requires careful planning, forethought, good knowledge not only on the syntax, but on methods and work-arounds to accomplish something that hasn't been done yet. But, very few people experiment, and thanks to them we have Battlefield 4, Occulus and World of Warcraft (old, but still the biggest...can you imagine?).

Lol, don't get me started grin I have a lot of anger in me on that subject...
Posted By: Anonymous

Re: What's stopping you from actually learning programming? - 04/07/15 22:47

I'm not even sure where I fit in the programmer/hobby divide. You along with 3 other people I PM with, have fielded many of my questions beyond the cut/copy/paste method I begin learning with.

I know I have a large gap in my programming langue and computer science knowledge. And I know I enjoy the try-test-repeat of learning the way I do. I am learning through simulation. But I have learned much about langues and logic design by now. Because at some point I changed to wanting to know what things did and why they do, instead of what code snips achieve what effect.

A quote is most likely my best explanation.
Quote:
Just not enough time? No idea where to start?
Posted By: WretchedSid

Re: What's stopping you from actually learning programming? - 04/10/15 13:09

Originally Posted By: Saschaw04
I personally believe it is maybe, because you don`t have to learn it for develop amazing games, because there are a lot of helps like templates etc.

And a blind person might tell you that vision is totally overrated because they never had it, doesn't mean that's technically correct. These people that want to do more than just playing around but refuse to learn are not pragmatic in my opinion but stupid and shoot only themselves in the foot.

Originally Posted By: Reconnoiter
For me personally, I am mostly interested in making fun & good games/simulations. The programming is for me is the means and not the goal. Though sometimes I have fun with programming too, like with messing around with AI or such.

That's fair, I guess. I'm not saying people aren't allowed to have different interests or specialize in different things. It's just weird to see people who are set out on making games but then refuse to put the required effort in. It's like someone who wants to cook some great meals and then ends up ordering a Pizza and calls it a successful day.
But yeah, it doesn't sound like you fall into that category.

Originally Posted By: EpsiloN
Programming requires careful planning, forethought, good knowledge not only on the syntax, but on methods and work-arounds to accomplish something that hasn't been done yet. But, very few people experiment, and thanks to them we have Battlefield 4, Occulus and World of Warcraft (old, but still the biggest...can you imagine?).

Sorry, I can't follow you here. Are you saying that these products (of which one is a hardware product) are the result of programmers not being able to experiment?

Originally Posted By: EpsiloN
I've always wanted to be a game designer, not a programmer.

I'll leave my opinion out on that one, but you may want to look into what an actual game designer at a big company does. If you are lucky to ever get that job, it'll not be a fun one and you won't have the freedom you are hinting on wanting. Also lot's of meetings with guys in suites.

Originally Posted By: Malice
I'm not even sure where I fit in the programmer/hobby divide. You along with 3 other people I PM with, have fielded many of my questions beyond the cut/copy/paste method I begin learning with.

Eh, to be fair, everyone has to start somewhere. Everyone starts with copy and pasting at some point, the real question I'm wondering is what is stopping some people from wanting to step further and being able to actually leverage the tools at hand. You don't fall into the category of people not wanting to learn, after all your questions are "Why are things that way" versus "What's the code to do X?"
Posted By: EpsiloN

Re: What's stopping you from actually learning programming? - 04/11/15 23:44

Quote:
Sorry, I can't follow you here. Are you saying that these products (of which one is a hardware product) are the result of programmers not being able to experiment?

I'm saying that programming is hard, and even if there are 100 000's programmers working at once worldwide, only a handfull actually try to go beyond what they've learned, and I'm saying I'm grateful such people exist. Most people only know the syntax and thats it.
You probably dont find it that hard, me neighter. But to a newbie, or someone who hasnt even seen it yet, programming looks like egyptian symbols...you see what it is, but you dont know what it means.
You know exactly what I mean, but you choose mock me laugh
And btw, the hardware product that I mentioned has a lot of programming in it. Just like your washing machine...

As for the game designer job, I know very well what it means. I dont play designer... Dont think I'm one of your newbies grin

You seriously have forgotten me! Unbelievable laugh
Posted By: sivan

Re: What's stopping you from actually learning programming? - 04/13/15 14:27

"What's stopping you from actually learning programming?"

maybe some of them could be true:
- laziness,
- the false dream of easy success in game development,
- low amount of time spent on this hobby,
- thought to be not needed, wrongly,
- low motivation for learning hard,
- no braveness to design a complex game requiring complex programming (start small, and remain small...),
- getting stuck at visual design,
- with 3dgs/lite-c it is very easy to create basic stuff that just works, resulting in instant happiness, but a bit hard to manage more complex systems, which is difficult as we can see the lack of advanced lite-c tutorials (but you can find pieces of gold by searching the forum),
- going crazy because what is true for C or C++ might not be similarly true for Lite-C, and sometimes no information why,
- the new visual programming system grin
Posted By: Anonymous

Re: What's stopping you from actually learning programming? - 04/13/15 16:48

^+1

I personal have(had) changed in my evolution of coding. Three larger changers came in commenting, creating call out functions and building organized libraries to include in projects.

These changes are(were) my signs of a movement to programming design and not game result designs.
I can ask how to make a panel slide right from left to center of the screen. This might be a few lines of code. Next time I need this code, I could look it up in my project code. However, these days if there is a base function that can be applied over and over, I would take this code and build a call-out function.

Anyway, that isn't making sense. First you create game results, next you change to creating functions that can be used in any game, finally you start to bundle functions into libraries for all your projects. That is a evolution of making a game to designing programming with the engine. What the next step in learning to be a programmer is, I have no clue. And that is what stops me from moving on to it. (Aside from the fact that I had a long vacation from programming and need to reacquire my before mentioned skills.)

@Sid I had ask when you where working on the other engine, if you would every create a course that was "Learn to Program in c/c++ through video games." If you notice the tutorials here are aimed at teaching results focused goals. We learn that we can us pointer to achieve a selected result and that further it can possible be used in similar result focused tasks. Questions of programming are not really spoken of here. I get asked often in pm's "How to animate a player model." and I am not a programmer like you, however, the question should be "how do I design an animation machine that can animate any character." Furthermore I should be able to answer in design langue and not code lines.

I'm rambling ... Sorry
Mal
Posted By: Feindbild

Re: What's stopping you from actually learning programming? - 04/13/15 23:05

The more I learned about programming and professionally working, the less productive I became in developing games (for fun). I remember years ago when I hacked together fun little games in a weekend, not possible today.
Posted By: Slin

Re: What's stopping you from actually learning programming? - 04/22/15 11:38

@Feindbild: Try participating in some local gamejam, it is fun and you'll see how much you suddenly get done in the last night before deadline, just hacking things together, even though it all started out really nice and clean and professional.

On the topic:
From my experience most people are or want to be designers and while they try to find explanations for why a code snippet works the way it does, they are usually just wrong, due to some very different thinking. And I think it is this wrong understanding and totally different thinking that kinda blocks them from actually learning programming. Not saying they couldn't, but that would mean throwing everything they think they know away and starting from scratch which can be very hard.
Posted By: Anonymous

Re: What's stopping you from actually learning programming? - 04/22/15 15:39

Quote:
Not saying they couldn't, but that would mean throwing everything they think they know away and starting from scratch which can be very hard.


Yes, because my way of thinking I had to create as much as the games I made. There was no instructions. Kingdom Hearts introduced me to State Mechanics. And that stuck, but a lot of the understanding of thing is just as made up as the code written with my way of thinking. Blame the "figure it out" message of 3dgs.
Posted By: Redeemer

Re: What's stopping you from actually learning programming? - 04/24/15 17:54

I'm pretty sure the whole crux of the issue is simply that game development still relies heavily on programming for the implementation aspect, but the design aspect is what drives most newbs into game development. So all of these guys who have no chops for programming end up getting into game design and spend years twiddling around with designs they can never really realize properly just because they don't know anything about programming and have no interest in learning.

So, why don't many of these newbs ever actually have the drive or chops for programming? For me the answer is simple: because everybody's different, duh. It doesn't matter that programming is "easy". They'll never learn it, just like I will probably never learn painting even though Bob Ross tells me painting is the easiest thing in the world every time he comes on television. And because I consider myself an artistic type I grant to him that it's beautiful and I'm sure I'd enjoy doing it if I knew how, but ultimately it's just not my thing and that's all there is to it.

Some people believe that game design might become wholly separate from programming someday, so that no matter how elaborate the design is, you can rely on not having to program and still end up with a great, unique project at the end, but I'm very skeptical about that. The very fact that games run on computers means that programmers will always be involved in their development in some way, even if software like Unity and Unreal marginalizes their involvement for indies somewhat.

Also, this is a totally minor note, but as incompetent as notch is, he's still WAY more competent than many other successful indie devs out there. Take the guy who made that Five Nights at Freddy's series: every one of those games was made using some software called Multimedia Fusion, which is like Gamemaker except it doesn't even give you the option of using a scripting language (ergo it is ALL visual). But this kind of thing has been the case forever. Surely some of you remember the original Myst? That game was the best-selling PC game of all time until the Sims in the late 90s, and it was built using Hypercard, which was literally a no-code solution for creating interactive slideshows on the Apple Macintosh. Crazy, but it worked. And it meant that they didn't have to program anything.
Posted By: Reconnoiter

Re: What's stopping you from actually learning programming? - 04/24/15 18:43

Quote:
Some people believe that game design might become wholly separate from programming someday,
,
I think it is not practical to have such a huge tool/editor that can do everything. You will get a shitload of buttons or such, might as well learn a program language than instead of memorizing them all. Though something like the warcraft 3 world editor would be very powerfull I think, still large but focussing on some genres to not go overkill. Not the easiest thing to get right though...

Quote:
Surely some of you remember the original Myst? That game was the best-selling PC game of all time until the Sims in the late 90s, and it was built using Hypercard, which was literally a no-code solution for creating interactive slideshows on the Apple Macintosh. Crazy, but it worked.
, when I first read this part I was thinking of Myth , and was like huh?? grin
Posted By: Superku

Re: What's stopping you from actually learning programming? - 04/27/15 02:17

Originally Posted By: Redeemer
just like I will probably never learn painting even though Bob Ross tells me painting is the easiest thing in the world every time he comes on television.

Haha... good old Bob Ross, time to watch some episodes again (my HDD is full of them!).

My take on this thread's question and topic:
Quote:
What's stopping you from actually learning programming?

Because you don't have to. Sure, it is undoubtedly helpful to know as much as possible about a single language and esp. programming in general but learning such stuff is hard work for years (depending on your free time).
When game dev is a hobby for you it's likely you come home from school or university or work and just want to have a good time, you want to be creative and maybe put something playable together, an idea which you came up with while working. Most people just don't want to spend even more time "working" then, i.e. learn programming, and that is time (precious free time!) where you cannot work on what great game idea you had earlier that day.
Posted By: 3run

Re: What's stopping you from actually learning programming? - 06/11/15 12:05

Guys, I wanted to ask for an advice. I want to go deeper into programming (and I want to learn actually, instead of toying with lite-c). So where do I better start from? Maybe some basics to fulfil all knowledge gaps that I have? Maybe you can share your experience, so I could follow you by your footsteps?

Best regards
Posted By: sivan

Re: What's stopping you from actually learning programming? - 06/11/15 20:29

maybe you should decide to learn what language (e.g. C# or C++), and what for, game development with an existing engine (e.g. Unity or UE4), or something else. it could help our great programmers to help laugh (please select C++ and UE4 then I could utilize the answers you get laugh )
Posted By: 3run

Re: What's stopping you from actually learning programming? - 06/11/15 23:01

Now it makes me feel bad to tell you that I've already started learning unity.. frown

I want to learn c#, java and javaScript, so I could look for a job (probably related to gamedev). And I've already went through the basics (big thanks to 3dgs_snake), and it seems that c# is actually easier that lite-c grin
Posted By: sivan

Re: What's stopping you from actually learning programming? - 06/12/15 07:03

don't feel bad, imo only jcl should feel bad as he can see his - originally not bad - product falling. you simply need a proper modern tool to achieve your aims, and you found a better one on the market, what offers safer future for you.
Posted By: Slin

Re: What's stopping you from actually learning programming? - 06/12/15 12:23

After Lite-C I would totally recommend to continue with C++. Once you understand most of its basic concepts you should be able to handle any other imperative language without any effort.
You could for example take SDL as base and create a basic 3D game engine with OpenGL in C++ with just some basic features. It is a lot easier than you'd think and you will learn a lot.
Posted By: Wjbender

Re: What's stopping you from actually learning programming? - 06/12/15 12:29

yes in my opinion , take the time to find a source on the internet to study up a bit on OOP and as in the wise words of mortal combat "choose your destiny!!"

edit: I cannot say how good or what not this article is ,but here's a link for you ,there may be better out there or worse ,I haven't read it so :

http://www.codeproject.com/Articles/22769/Introduction-to-Object-Oriented-Programming-Concep

OOP is the missing link from your lite-c experience ,towards almost any other languages you want to take on , you may already have a good grasp on it so I believe you wil catch on quickly with a basic OOP understanding .
Posted By: 3run

Re: What's stopping you from actually learning programming? - 06/12/15 13:49

Originally Posted By: sivan
don't feel bad, imo only jcl should feel bad as he can see his - originally not bad - product falling.
that is true, but he doesn't seems to be worrying much and some 'jokes' about updates won't fix the situation for me grin

Originally Posted By: Slin
After Lite-C I would totally recommend to continue with C++. Once you understand most of its basic concepts you should be able to handle any other imperative language without any effort.
You could for example take SDL as base and create a basic 3D game engine with OpenGL in C++ with just some basic features. It is a lot easier than you'd think and you will learn a lot.
I've read somewhere on the web exactly the same advice, to start over with C++, cause after it all other languages will go on fly (very easy to learn). So if it's going to give me a good base, probably I'll start with it (anyway, thanks to lite-c (hopefully) it's not going to be that hard). Thank you for your advice Slin!

Originally Posted By: Wjbender
edit: I cannot say how good or what not this article is ,but here's a link for you ,there may be better out there or worse ,I haven't read it so :

http://www.codeproject.com/Articles/22769/Introduction-to-Object-Oriented-Programming-Concep

OOP is the missing link from your lite-c experience ,towards almost any other languages you want to take on , you may already have a good grasp on it so I believe you wil catch on quickly with a basic OOP understanding .
Thank you very much for the link, I'll take a look on that. I've already read some small articles about the basics, and I have to say, I was amazed how simple things are.. I've always thought that using lite-c and acknex is the easiest thing on the planet and that 'real' programming is million times harder. Well, when I started learning, it seems quite opposite.

Thank you for your great advices, little by little I'm getting an idea where to start and where to move on.

Originally Posted By: Wjbender
yes in my opinion , take the time to find a source on the internet to study up a bit on OOP and as in the wise words of mortal combat "choose your destiny!!"
grin


My best regards!
Posted By: Wjbender

Re: What's stopping you from actually learning programming? - 06/12/15 14:18

your destiny awaits : https://en.m.wikipedia.org/wiki/List_of_object-oriented_programming_languages

and haters can hate , but I browsed through that oop link I gave you and I have to say in my opinion ,don't read that piece of garbage first ,find something simpler for beginners and work your way up from there onward ,that article may help but I think it would truly cause you mass confusion accompanied by kick-myself-in-the-nuts syndrome
Posted By: Slin

Re: What's stopping you from actually learning programming? - 06/12/15 14:57

OOP isn't really hard to understand and I am sure you'll be able to pick it up as you work on something. More important and harder to understand are pointers and references and how to setup a project to use external libraries. If you handle that stuff in c++, it will be a lot easier everywhere else. Also while pointers may not seem that important anymore, they are just one of those basics that provide you a more indepth understand of how things work which will even help you in languages that don't have this concept.
I am sure there are a couple more things like that, just can't think of any at the moment... But if you get started on something with C++ I am sure you will encounter most of the important things.

Lite-C isn't exactly harder or easier than Unity C# for example, just different and in my opinion a better start for the basics.
When I learned C++ with only C-Script and Lite-C experience I could just start on a project and most things just made sense and some concepts were new, but I was able to just learn new things as I was using it.
I read a couple of C++ books before that though and had a not very satisfying history of command line calculators wink
Posted By: 3run

Re: What's stopping you from actually learning programming? - 06/12/15 15:37

Originally Posted By: Wjbender
your destiny awaits : https://en.m.wikipedia.org/wiki/List_of_object-oriented_programming_languages

and haters can hate , but I browsed through that oop link I gave you and I have to say in my opinion ,don't read that piece of garbage first ,find something simpler for beginners and work your way up from there onward ,that article may help but I think it would truly cause you mass confusion accompanied by kick-myself-in-the-nuts syndrome

Yes, I have to say when I just opened up that link, I was a bit confused, but anyway, as you said my destiny awaits and nothing can stop me grin

Originally Posted By: Slin
OOP isn't really hard to understand and I am sure you'll be able to pick it up as you work on something. More important and harder to understand are pointers and references and how to setup a project to use external libraries. If you handle that stuff in c++, it will be a lot easier everywhere else. Also while pointers may not seem that important anymore, they are just one of those basics that provide you a more indepth understand of how things work which will even help you in languages that don't have this concept.
I am sure there are a couple more things like that, just can't think of any at the moment... But if you get started on something with C++ I am sure you will encounter most of the important things.
Thank you Slin! I've already found some video tutorials with practical taskcs, and the best part is, that it's all on Russian, cause learning from English articles yet hard for me (it's like firstly imporoving my English, and then after a second read my knowledge). I also found C++ and OpenGL tutorials (made out with 26 videos), so it's going to be very intance and hopefully interesting! laugh

Originally Posted By: Slin
Lite-C isn't exactly harder or easier than Unity C# for example, just different and in my opinion a better start for the basics.
When I learned C++ with only C-Script and Lite-C experience I could just start on a project and most things just made sense and some concepts were new, but I was able to just learn new things as I was using it.
I read a couple of C++ books before that though and had a not very satisfying history of command line calculators wink
By saying easier I meant that it's easier to organize your project, mainly cause of OOP (comparing to procedural), that's what I've found at least for myself. And after having some basic knowledge in Acknex and generaly in lite-c, it's really easier to start off with unity and especially with their tutorials. laugh


Thank you guys! My best regards!
Posted By: sivan

Re: What's stopping you from actually learning programming? - 06/13/15 05:34

about language difficulties: I personally prefer to read about programming in English, sometimes it is harder for me to understand the Hungarian terminology despite the fact my English is much worse, and there are a lot of great books for programmers available here. so I set my programming mind (and my musician mind too) to think in English, that also helps to understand more easily English-only documentations.
Posted By: Wjbender

Re: What's stopping you from actually learning programming? - 06/13/15 10:26

@3run , I can easily see why you say it's easier than lite-c , simple fact is in c++ or c# you have a lot of pre coded libraries and packages and sdks ready and available to you at any given time ,you have an arsenal on your side ,you have a professional development environment and debugger , professional compilers , its world's apart from the difficulties of sed and lite(c) , in lite (c) you would have to do extensive amount of extra coding etc to make that arsenal available for you , you have great user friendly features out of the box like intellisense , you also have a world of samples and help and info available under your finger tips almost instantly ,compared to lite-c which only reaches as far as its user base (I know it doesnt sound like I am fair) but I mean c itself is something barely even used ever today ,well not the kind of c way back and especially not litec .

in those regards ,yes easier than litec .

you don't really need to dig in to opengl ,I am sure the moral was that ,if you were to get into c++ and learned it ,you could easily grab and use something low level like opengl or directx or direct3d or a rendering-engine or even pure c++ and hack up a game without using any game engine ,with the skills you have learned .

but not taking anything away from c# you could also do it on c# , for example there's many easily worked with wrappers and stuff in c# like sharpdx,the upside of c# for such things is small and non complicated wrappers are easily available ,they dont require a complicated project setup and build .

to be honest ,I am a big c++ fan , but I love what c# brings to the table , I have great difficulty with litec because my whole manner of thinking is accustomed to c++ , I also know more of what is ready and available to me in c++ .

I jumped in to c# just a while back , the transition was mostly easy , then theres some differences to also learn and get used to , but from c++ to c# ,the transition is acceptably easy , I don't know how others find c# if they do not come from a c++ background ?
Posted By: txesmi

Re: What's stopping you from actually learning programming? - 06/13/15 10:40

There is a huge programming books repository on GitHub.

https://github.com/vhf/free-programming-...nal-development

Salud!
Posted By: 3run

Re: What's stopping you from actually learning programming? - 06/14/15 10:36

Originally Posted By: sivan
about language difficulties: I personally prefer to read about programming in English, sometimes it is harder for me to understand the Hungarian terminology despite the fact my English is much worse, and there are a lot of great books for programmers available here. so I set my programming mind (and my musician mind too) to think in English, that also helps to understand more easily English-only documentations.
Well, maybe after learning some of the basic stuff, I'll continue on English, so it will be much easier to understand everything (after having a little base of knowledge behind).

Originally Posted By: Wjbender
@3run , I can easily see why you say it's easier than lite-c , simple fact is in c++ or c# you have a lot of pre coded libraries and packages and sdks ready and available to you at any given time ,you have an arsenal on your side ,you have a professional development environment and debugger , professional compilers , its world's apart from the difficulties of sed and lite(c) , in lite (c) you would have to do extensive amount of extra coding etc to make that arsenal available for you , you have great user friendly features out of the box like intellisense , you also have a world of samples and help and info available under your finger tips almost instantly ,compared to lite-c which only reaches as far as its user base (I know it doesnt sound like I am fair) but I mean c itself is something barely even used ever today ,well not the kind of c way back and especially not litec .

in those regards ,yes easier than litec .

you don't really need to dig in to opengl ,I am sure the moral was that ,if you were to get into c++ and learned it ,you could easily grab and use something low level like opengl or directx or direct3d or a rendering-engine or even pure c++ and hack up a game without using any game engine ,with the skills you have learned .

but not taking anything away from c# you could also do it on c# , for example there's many easily worked with wrappers and stuff in c# like sharpdx,the upside of c# for such things is small and non complicated wrappers are easily available ,they dont require a complicated project setup and build .

to be honest ,I am a big c++ fan , but I love what c# brings to the table , I have great difficulty with litec because my whole manner of thinking is accustomed to c++ , I also know more of what is ready and available to me in c++ .

I jumped in to c# just a while back , the transition was mostly easy , then theres some differences to also learn and get used to , but from c++ to c# ,the transition is acceptably easy , I don't know how others find c# if they do not come from a c++ background ?
I've already went through about 10 video tutorials (and created a very simple console calculator grin ), and I have to say it's very easy so far. I've also fulfilled some small gasps that I had about very basic stuff and all-in-all everything feels great. laugh

Originally Posted By: txesmi
There is a huge programming books repository on GitHub.

https://github.com/vhf/free-programming-...nal-development

Salud!
Thank you very much txesmi! I'll take a look at them, but latter when I'll finish my video tutorials. Salud! laugh

Thank you all for helping me out guys! My best regards!
Posted By: 3run

Re: What's stopping you from actually learning programming? - 06/28/15 21:20

Guys, I have a question related pointer, to be to be more precise about "address-of" and "dereference" operators. I went through C++ tutorial, and it seems to be very clear an easy, but when I try something with Lite-C, it all goes wrong... Why?

Example:
Code:
#define PRAGMA_POINTER

void main()
{
	int s=7, t;
	
	int *p=&s, *p2, *p3=&t;
	
	p2=&s;
	
	*p3=8;
	
	while(1){
		
		DEBUG_VAR(*p, 10);
		DEBUG_VAR(*p2, 30);
		DEBUG_VAR(*p3, 50);
		
		wait(1);
	}
}

I expect to see 7, 7, 8 on screen, but it seems that it doesn't 'dereference' a shit. In Visual Studio it worked well..

Greets
Posted By: Wjbender

Re: What's stopping you from actually learning programming? - 06/29/15 14:03

http://boredzo.org/pointers/

"bzzzt"

not able to check on my laptop now , but assuming differences between c and c++ ,are also something you might want to look at.

wil check out your example later.

Posted By: Wjbender

Re: What's stopping you from actually learning programming? - 06/29/15 14:56

okay so heres what's up .

throw away the debug_var

and

try

printf("%d %d %d",(long)*p,(long)*p2,(long)*p3);
Posted By: 3run

Re: What's stopping you from actually learning programming? - 06/29/15 15:40

Thank you for pointing this out! laugh

So I guess we've found just another bug? grin BTW, it works without typecasting, I mean without (long), while manual says that's it important to typecast var to double or long.. Anyway why it's needed?

Best regards
Posted By: Wjbender

Re: What's stopping you from actually learning programming? - 06/29/15 16:18

I think it would be beneficial to mention or ask Jcl about debug_var , I have no idea how it works (formatting and types/pointers/adresses) , I tried applying type casting inside of debug_var to no avail so I am guessing it casts or something in thw function itself (no idea)

I guess some formatting parameter support for debug_var would be cool ,since it outputs in text anyway !!
Posted By: Wjbender

Re: What's stopping you from actually learning programming? - 06/29/15 22:15

Originally Posted By: 3run
Thank you for pointing this out! laugh

BTW, it works without typecasting, I mean without (long), while manual says that's it important to typecast var to double or long.. Anyway why it's needed?

Best regards


well , gamestudio automatically converts most variables of type var , to most of the correct needed types , however the var type itself is different as you know , the "var" type is almost an all rounder in litec , it can be a number a handle a pointer , as a number it could become an int or whatever automatically done by gamestudio where it knows the type it has to be casted/converted to , however this particular case i took it as ,implicitly instructing /controlling the type , because functions like printf can support multiple types it wouldn't be obvious to the engine what type I need , I have to tell it exactly what I want.

in this case there were no actual "var" instead there were purely "int" types used , but "int" and "long" are also much the same thing , but printf accepts char* , int , and double no var or float support for arguments (according to manual) so therefore you need to typecast "var" to long for integers and double for non-integers explicitly .

I really did not need to cast , just a habbit which I dragged along with me ,because of the var type I had to get used to , and it stuck ,that plus to me %I make sense more than %d..
Posted By: 3run

Re: What's stopping you from actually learning programming? - 06/30/15 10:05

Thank you very much for such a clear explanation laugh Now it's time to continue my journey with c#

My best regards!
Posted By: Wjbender

Re: What's stopping you from actually learning programming? - 06/30/15 12:55

I see if you did this

int a=*p;

debug_var (a.....

that the str_for_num (NULL,vv) which is debug_var , would work no problem .

sooo , I don't know why string functions do not work with dereference , could it be because its a dereference to different types ?

no idea , but yeah
Posted By: MasterQ32

Re: What's stopping you from actually learning programming? - 06/30/15 13:34

lite-c does auto-pointer-casting, it's fucked up tongue
Posted By: 3run

Re: What's stopping you from actually learning programming? - 06/30/15 13:52

Originally Posted By: Wjbender
sooo , I don't know why string functions do not work with dereference , could it be because its a dereference to different types ?
yeah, I would like to know why too laugh

Originally Posted By: MasterQ32
lite-c does auto-pointer-casting, it's fucked up tongue
doesn't it get turned off with pragmatic_pointer?
Posted By: MasterQ32

Re: What's stopping you from actually learning programming? - 06/30/15 13:54

no, PRAGMA_POINTER only enforces -> instead of ., the manual states some other things as well, but i never noticed this stuff.

also lite-c messes up var/int/long when you cast them implicitly
Posted By: 3run

Re: What's stopping you from actually learning programming? - 06/30/15 16:54

okey, then no more lite-c to test my c++ knowledge grin thank you man
Posted By: FBL

Re: What's stopping you from actually learning programming? - 07/01/15 16:00

it also messes up local pointers pointing to local variables after wait().
© 2024 lite-C Forums