Saturday, January 21, 2017

Decision:

I don't think I want to program anymore. The more I think about it, the less enthusiastic I am. I wanted to make things. I used ot get excited about making programs, but the way you are forced to use shitty APIs and shitty libraries and jump though dozens and dozens of hoops to accomplish even the most basic of tasks in any sort of "GUI" based system has destroyed my fucking will to keep going.

Once upon a time, apparently, there was a 'graphics.h' and libbgim (or something similar), that allowed you to pop up a window and draw shit to it simply. This is exactly what I want. It's also something that they apparently use in colleges (!?) to ween students into GUI systems and graphics shit, apparently? So, you know, of course it's broken and ancient and no one uses it and no one updates it and it requires some extra hoops that need jumping through. The usage seems easy enough. It seems like it would be a good bridge between using the console and using the full-blown Win32 API. So, you know, OF COURSE no one give a shit about it.

Honestly, tho, I've gotten to a point wher eI just don't even want to think about programming anymore. Maybe C and C++ were the mistake. Maybe I should have learned something extremely high-level like Python as a first language. I wanted to use something that would yeild some decent results for games and apps. Python has the same fucking limitations as C and C++. I want to just be able to draw shit into a fucking window and make it clickable, and get text rendered and be able to fucking program shit.

I'm thinking maybe I should just format and install DOS. It seems that when they introduced GUI-based operating systems, programmers all caught some kind of retard disease that has made them forget that the best element of C is it's elegant simplicity, so they decided that the best course of action was the bloat the ever-loving fuck out of their APIs and libraries to the point that it can take hours of digging through documentation to even fucking FIND the shit you're looking for. I just went to Microsoft's MSDN for DirectX 9 and it took me like a half hour to just find fucking code to initialize it. Every page was just a sales pitch on how great D3D is, how great it is to use the windows store, etc.

It's depressing and I hate living.

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.

Tuesday, January 17, 2017

Hello, World!

Actually, that's Hello, World!

See, I was frustrated one day and reformatted everything, reinstalled everything and was in the process of setting up my development environment. I made a very simple 'Hello, World' program to test a compile and make sure I had everything set up properly. I normally leave out the comma in any Hello World program.

In this instance, I also accidentally omitted the 'o' in Hello, so upon running the program, I was greeted with a command prompt that read "Hell World!"

I was mildly amused by that, and thought it might be interesting to start a blog with that title. The purpose of this blog would be to chronicle my various struggles with programming, and maybe do some tutorials or something. I have some weird-o ideas about programming in general, and some weird-o ideas about how to learn it and how to teach it. As someone trying to learn, I've found a lot of the resources out there to be very good at teaching people the absolute basics of any language and the very basic concepts of programming, but then there's this gap. The next level of readily available material aimed at programmers is very high-level, advanced shit. I've only begun to start scratching the surface of these things, and most of it has been a very frustrating process.

I feel like this is true largely because there are very few resources that tell you what you should be looking for to learn. I've been teaching myself on and off for the last couple of years, and trying to take it more seriously for the last 6 months or so, and only a few days ago did I stumble upon the concept of linked lists, hash tables and binary trees. I stumbled upon this information totally by accident, and now it is something that I've been absorbing as much of as possible.

And this has been fairly typical of my experience with programming. I often don't know what I don't know, and it makes learning difficult.

So the goal here is to sorta back way the fuck up and write some programs in what I feel is a much more useful sort of order, introducing concepts as they become useful, and to actually make useful and interesting programs with these concepts. I don't want to make limited programs where I catalogue student grades and library books or do fake POS systems for fake stores with fake inventories of fake items. I want to write software that I, personally, might actually find useful and might actually use.

Which means that certain things will have to be introduced far earlier than they typically are. I think this is very feasible, tho, as I feel that the main reason so many programmers in the learning phase tend to be unable to understand concepts or find certain things boring or monotonous is because the context these concepts are learned in is very boring and monotonous or, in my opinion, poorly demonstrate the actual use of the concept in a practical way.

Pointers were something that I had really no clue how to use properly at first, and I frankly didn't understand the point of them. This is purely because the way they were introduced was in such a very basic way where they were not actually very useful or practical to use. They were basically just replacing standard variables with pointers to those variables in the program, and I didn't see the point of it. This made them seem like some kind of weird, alien part of the language that I sorta understood, but felt like I was not really grasping them at some basic level, because I could just rewrite all of the programs in my literature that used them WITHOUT using them, and the programs still ran fine.

So I rarely used them for anything. it wasn't until much later that I started to see them in use in places where, suddenly, the point of them actually made sense. I finally 'got' pointers by randomly stumbling around others' code. I do not think I am special in this sense, and I'm certain there are others who are currently facing a similar situation, where they sorta get the concept of something, but fail to realize the practical application because they are not truly shown what can be done. once I understood pointers, I realized that they made a ton of awesome shit possible and I got really excited about it. Somehow, I think that feeling of excitement would have better served me if I had been feeling it as I had learned about them in the first place, instead of the awkward uncertainty of why they even existed as a thing.

Anyway, I'm going to work on some concepts. This isn't really going to be a 'tutorial' blog where I show people how to program. I'm not nearly at a level where learning anything at all from wme would be a good idea. Instead, I hope that maybe this might be of interest to people who DO teach others how to program. I feel like there's a weird thing where the people teaching programming are actually making it more difficult to learn by trying to hold back information they think might be confusing or overwhelming, when the reality is the opposite. That the potentially overwhelming stuff is the stuff that makes these concepts truly 'click' with students and gets them more excited and interested in programming and can keep their enthusiasm up.

So yeah, this is going to be interesting...