Saturday, January 21, 2017

My current struggles with programming

So, as I wrote previously, I want this blog to be more about trying to get the people who teach programming to understand what might be some issues and hang-ups with students by attempting to articulate the issues I, myself, am facing with programming and trying to understand the concepts and why things are done a certain way.

One of the biggest issues I'm currently deal with has to do with program structure and the added complexities of trying to do any sort of programming outside of the command-line. It is perhaps a failure on my part that I haven't really had a hell of a lot of experience writing a variety of different types of programs. My current plan is to simply remain on the command-line and write as many different programs as I can think of, with little regard as to complexity or anything. Honestly, I want to start writing programs that I can just fucking use. I want to make programs that feel useful, not programs that just spit out some pre-determined exercise-defined output.

Currently, this means that I want to make a text editor. I figure this would be a good starting point, since I can then use this text editor to write code, which will push me to add features that would be useful in writing code, like some level of syntax highlighting and maybe integrating it into my somewhat minimal build system. I think it would be a good place to start, though this may very well be far beyond my means as a programmer. I don't really know what I'm doing at all.

This all comes after a long spurt where I become increasingly frustrated at the difficulties of getting off the command-line and into programming with a user-interface in mind. My initial attempt to write a simple text editor was with the Win32 API. I essentially followed a tutorial and started changing things. This felt very hollow. I didn't enjoy it at all. I didn't feel like I was writing a text editor. Using the Win32 API feels like the programming equivalent of filling out tax forms. It's just a slog of monotonous shit that does't allow for any sort of experimentation or interesting things to happen. It's just filling out structs and handing them over to Windows.

I dunno. The bottom line is that I am just not ready for that. Frankly, it's killed my enthusiasm for programming, having bumped into it. I know now that my future lies in filling out monotonous forms and being locked into fucking boring and static and shitty UIs and procedures. It makes me want to just quit now or never make another attempt. I know that I can get around it with Open GL or Direct3d, but both of them have their own shitty drawbacks that are frustrating. D3D is frustrating and bullshit because it's essentially just an extension of the Win32 API, so getting things set up and running and working is the same boring slog of filling out forms, drawing things is a boring slog of filling out forms, etc. Everything is filling out some pre-defined struct and doing everything the MS way of boring form structs.

OpenGL's issue is that I kept finding new libraries that I had to add to my shit to get anything to work properly. It very honestly makes me want to just avoid all of this shit and write my own context and code for everything myself so I know exactly what's happening and exactly what the code is doing and how it's doing it, because I simply do not understand some of the shit going on. Like, I have access to the latest versions of OpenGL, but I can only use OpenGL 2.0 unless I get a library that has the magical ability to find the correct version of OpenGL, and this functionality is apparently not available in ANY of the fucking 'let's make this a little easier' libraries that are out there, like Glut or GLFW or whatever. It's just not in them automatically. FOR SOME REASON. Like, the library can't have it's own system where it will figure out what version to use when creating a context. You have to supply one. WHY? Will this work on other people's machines, if it has to be configured on my machine BEFORE I compile it? Like...  how the fuck does that work, and how would that even work one someone else's machine if I have to do this shit to get it to work on MINE!? How do people ship games like this?!

Shit like that just blows my mind, and because I'm some dumb-ass learner person, no one will explain how to set things up properly because it will apparently scare me away or will be too much for me to understand. I just want my fears assuaged that, yes, you can do these things somehow. Again, why this isn't integrated into these libraries is fucking beyond me, but there must be some fucking fantastic reason, because otherwise SOMEONE would have done it. Right?

Shit like this, tho, is just fucking insane to me. All I want is a fucking window where I can paint pixels to an area by having some "putPixel()" function. I could do that shit in DOS, but it's apparently not allowed in any GUI system, because you have to go through either their shitty UI bullshit or you have to go through the graphics hardware. It fucking blows for learning how to do things, because you have this massive cliff of difficulty and like ten thousand new concepts and things you have to learn just to get a window to open and draw shit to it. It makes me want to just fucking quit.

And the fucked up bullshit part of all of this is that 30 years ago, I wouldn't have had to deal with any of this shit. I would have been able to just write putPixel(). Thanks modern API developers, for making everything so fucking horribly complicated that it can take so fucking long and be so fucking difficult to just draw a single pixel to a screen.

Anyway, there are libs that deal with this, like SDL and SFML, but I don't really like either of them. SDL is better, I suppose, but ... I dunno... I'm just not really in the mood to fucking start learning all of this shit from scratch again. I guess it's the only way to do shit, tho. The only way I'LL ever manage to do this shit, at least.

I kinda feel like killing myself.

No comments:

Post a Comment