Azure Jane Lunatic (Azz) 🌺 (
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.
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.

no subject
Chicken or ggek?
Oddly enough, most of my magical friends are also computer friends...
Practical Sense
hmm. Looks like a post in the making.
Re: Practical Sense
Re: Practical Sense
When you accept the automatic and intuitive Visual Basic-like aspects of the Art, you also accept all the assumptions and programs built into it by those programmers before you. Sometimes this gives you results you weren't anticipating.
When you take on the power of the C++-like aspects of the Art, you have to know damn well what you're doing -- because often the Universe will accept your input and manipulations, even if erroneous, and then happily does Bad Things with them -- results you weren't anticipating.
For the most part, it is self-programming -- there are many different libraries out there, different magical systems that you may use, different programming languages, different predefined functions that just need user input, the structure is already there.
I haven't gotten down to the machine language of the universe yet. That'll be interesting.
Magical IDE
Re: Magical IDE
Guess you lost me with all the abbreviations. I'm just a baby programmer yet...
Re: Magical IDE
don't even start in on garbage collection
Re: don't even start in on garbage collection
Many of my viewpoints on the structure of mind and magic are based on these books, especially Cyteen.