Yes, all the time.
Any recommendations for someone considering learning it?
There's no good replacement for mentoring when it comes to coding. It's by far the best way to get to the point where you are bending space, time, and information to your will to create art, predictions, or automations.
A very significant factor in getting confidence is: a balance between learning enough formalities and syntax that you can express yourself, and having a genuine enthusiasm for implementing something you care about and knowledge about. You can learn all sorts of lists of rules, but that won't do much if you aren't inspired, because coding can be kind of annoying from time to time.
Since you are already obviously and truly inspired about a project, you have the hardest part behind you. Now comes "how do I describe what I want to a computer".
A sharp memory I have of early web was the original http://word.com.
This was one of very few times that HTML was truly used in anger, the way early internet enablers envisioned and intended.
Yes, you can use frameworks intended for interactive fiction. Yes, you can go with the flow and use their recipes and accept their axioms and follow their frameworks. This way offers you the least amount of discomfort and gives the maximum return on investment of time.
It limits the upside and puts a box around things. This is not bad and is probably what you should do.
But I will indulge in some interpretative dance with apologies to Prince.
Electric words, alive.
Start from TADS, Adrift, Inform and save a lotta time.
But I'm here to tell you that there's something else.
Invent it new.
Start from TADS, Adrift, Inform and save a lotta time.
But I'm here to tell you that there's something else.
Invent it new.
If you use Python, then it's worth using it in an object oriented way. What does this mean?
When you think of interactive fiction - the artwork that people encounter - then what does it look like? What do readers see/manipulate/use, big picture? What are the *nouns* involved? Those are your Python classes (at least the ones that you start out with - you are going to add others, divide classes up, combine classes over time). Your list of classes - which are the things you are bossing around - will change over time the more you play with and challenge the ideas of interactive fiction.
When you think of interactive fiction, what does it do? What moves, what unfolds, what happens? In other words, what are the *verbs*? Those are your class methods (functions).
When you think of interactive fiction, what are the *things that keep track of things*? That hold a *state*? Do page numbers matter? Maybe, maybe not, but "where am I" is probably useful. Bookmarks? Number of times something has happened? Preferences of the reader? Those are variables (or constants) and these are called class members.
Class members and class methods belong to a class. The sets of classes make your model, or program. Figuring out what classes you have, and what members and methods at a minimum are needed to model your reality, is the living and breathing soul of coding up in Python.
The more time you spend drawing it out, doodling it up, and playing with how things are cut up into classes, the easier the coding will go. This is absolutely the more important thing about writing code that works. Design, document, code, test. Do not code, design, test, and then blow off documenting. It will be crappy code and harder than it has to be.
Again, you can dive right in to TADS and get something working in days or weeks. You will never have to lift up the hood and go wow what the hell is all of that stuff under there.
These two paths are not mutually exclusive. You can try out the off-the-shelf stuff, and also step back and ask yourself what art *you* want to achieve with your model of reality. Something different, better, more innovative. This will be harder.
Asking an LLM to help you might be good or might not be good. LLMs work really well when you already know how to code, because the answers you get can and often are horrifically wrong, yet are confidently asserted to be correct to you. LLMs are sycophantic by design, so it's totally easy to feel that they're just trying to help. They're a great tool for shortcutting some of the tedious work and Python is a language that most LLMs are pretty good at, because of how much open source Python code has been stolen to train their pattern matchers. LLMs are good for getting tutorials. If you are a beginner, ignore attempts to cut you entirely out of the writing process until and unless you can write a class without really thinking much about it.
Smooth seas never a good sailor made. LLMs are not on your side unless you keep them there.
No comments:
Post a Comment