azurelunatic: Vivid pink Alaskan wild rose. (Default)
Azure Jane Lunatic (Azz) 🌺 ([personal profile] azurelunatic) wrote2001-12-18 02:36 pm

Programming....

So we're doing a tic-tac-toe board for our final in C++; yesterday we worked on displaying the board and the element numbers for each square.

I worked out an alternate way of calling the vertical and horizontal line functions than the teacher showed us. The VB teacher taught us that we ought to feel badly when rewriting code over and over, that we should do things differently -- so I worked out a bit of code that I think I could work into a reusable code, the function that I will work up as "Alternate" -- very very simple.

Using Alternate, I did some for-loop indicator black magic and got the element numbers to display without use of static variables that get reset each pass through.

Ron's way works too, of course, but mine is slightly less comprehensible, and more elegant -- mine does it automatically.

Of course, there's probably a reason his needs to work, but I'll still keep that one line in there that's my original thought, and test it each run through to see where it fails.

[identity profile] spacemummy.livejournal.com 2001-12-18 04:11 pm (UTC)(link)
I like the way you are into magic and programming. You are very balanced. Magic can be very systemic, so it also makes heaps of practical sense.

Re: Practical Sense

[identity profile] spacemummy.livejournal.com 2001-12-19 11:28 am (UTC)(link)
I have read that magic is self-programming.

Magical IDE

[identity profile] spacemummy.livejournal.com 2001-12-19 08:04 pm (UTC)(link)
I guess I just really need a good API, it doesn't have to get all GUI.

Re: Magical IDE

[identity profile] spacemummy.livejournal.com 2001-12-19 09:35 pm (UTC)(link)
Acronyms suck-- I'm being a dork.

don't even start in on garbage collection

[identity profile] spacemummy.livejournal.com 2001-12-19 08:09 pm (UTC)(link)
I can see that if you are not explicit with the aim of your meta-programming, many little unforseen buggies crawl into the picture. This is exactly the subject of a script I would like to write. It has to do with space travel and the way that people create their own references in an environment where their only input is each other. I imagine that the basis for such interaction is magical and the symbol set that is used would be very elemental, having the metaphors that are archetypically wired into our brains regardless of where we choose to travel.