Improve the performance of a useless program
This is not about giving sense to a useless project. Just about improving it ...
Good afternoon. I will elaborate the question further below. Have a little patience. First.., when I log-in to LQ, I use to check at first the list of new and latest articles to see, if I can contribute to a discussion. Quite often I cannot, more often I do not want to. Being uninterested by too many topics, finding just those which I like to spend time on, takes too much effort and recently, I wonder if it would not make more sense to just abstain completely from reading LQ. LQ has become mainly a place where I can get answers, sometimes. If “faint” can be used in this context, it describes completely how this improves my situation..; I grow vegetables and insulate a house with hemp and lime. ---------- Real post begins here ------------- Okay, then. If you still deem this worth an effort, here is the project. I have mentioned it once in a different context: My little program creates/invents English or German proverbs by combining beginnings and endings of existing proverbs. The result is completely senseless rubbish. It sometimes is funny and you can (e.g.) call the program from .bashrc as a replacement for fortunes. To comprehend the issue that I try to address, you must know that my main inspiration is a parlor game, where, holding 6 cards, you can choose between the beginnings and endings of three proverbs and choose a combination which is likely to win you points, as your creations are evaluated after each round of the game. My program cannot do this right, as the random generator cannot “choose” anything. In consequence the output of the program is either hilarious or completely dull and I have to live with it. My latest idea is to “qualify” random proverbs, i.e. to give the user 5 seconds or so to hit the '+' key, if she/he considers the proverb ... meaningful, funny... worth keeping in a list or whatever. I implemented this and now I have a possibly growing list of randomly constructed proverbs. The Question (at last): What would you do with it? Can there be a purpose to have this list around? Modifying the program to give a bigger chance to proverbs already qualified to be displayed, will reduce the choices considerably and thus reproduce the same proverbs quite often... Oh please. Take your time by all means... I do not even know when I will get back to this post or thread to see your answers... Edit: https://rubygems.org/gems/Sprichwoerter |
Whenever I have an open-ended, freely defined project I may think about enhancements, which is exactly what you're doing here.
If I feel that an enhancement is "do-able", I do it. If I feel it may be complicated, I divide and conquer. An example involving divide and conquer would be:
|
A few ideas for improving the performance:
|
Another idea for your consideration: Build your proverb generator into a fully-automated (unattended) Twitter account which creates and refines proverbs according to likes and retweets.
This article tells how one programmer did something not exactly like this on Instagram: https://medium.com/@chrisbuetti/how-...m-a5ed8a1e2a10 |
It is raining. This is Normandy, but I mention it anyway... 25mm since yesterday, all storage tanks are full and I have even compiled a few programs in the meantime, GnuPG 230-beta from git and stuff like that. Now it is clear that I will not use the cement-mixer today. Wait... make that hail. Need some hail?
Cool thread! :) “Thank YOUHoouu” (Mark Knopfler). Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
TY for now. |
Yes, I understand why you wouldn't want to turn this into a social media project. The article I cited shows how you can exploit other people online, which in my opinion is immoral/unethical if done without their informed consent. Even with their consent, there are other problems.
|
Quote:
Quote:
Meanwhile you also wrote in your first post about a card game. Either way, my intentions were to give some perspective towards how to continue development on a project you seemed so indifferent about as opposed to give you input towards specific features. |
I've written a couple of "random generation" programs. One chooses cards and displays interpretations from a Tarot-like card deck. The card images and related readings were stored in a database. The trickiest part was to insure that a card was never drawn twice during the processing of a reading layout (the application allowed several different layouts with varying numbers of cards).
The second was called the Story Component Generator -- it also used a database consisting of Characters, Conflicts, Genres, Events, Minor characters, and Settings. It randomly selected and plugged together these components to provide an outline for the user to write a story. It was a feature of a site that was designed to encourage people wanting to learn and write fiction. As the OP implied, random "choosing" requires something to choose from. My programs used database entries, but one could as well choose a random line or lines from a text file or files. Both programs required building lists of things to draw/choose from. |
I looked at it, and I like it (german version).
The randomness of it especially. And, looking at the database, the simplicity. And the option to add new proverbs. I wouldn't make this into a parlor game but indeed leave it as a fortune cookie type of parody. |
Quote:
PSE ALL take note of the fact that I am unable and without hope to ever foresee the allusions which my choice of words and expressions causes to native English speakers. I have never spent more than a few minutes among native English speakers (10 days in Florida count as nothing nowhere with nobody around) and the conversations had never been as sincere as they are on LQ. Just try to imagine that I cannot create ambience in my postings and that what you sense is probably not there. Quote:
Quote:
|
Quote:
I thought about adding quotes like “This bear is a problem-bear” or “She is destroying my Europe”. It needs more testing though, as the results had been disappointing for the time. Maybe the fun was in the way that an unnecessary ... erm. In the way that an “Unnecessary” thought to convey meaning while she/he just delivered bull. Combining the beginning of bull with the end of some rubbish bereaves the phrase of the context and ends just as bull. I will look up some Blaise Pascal and Seneca instead... Edit: “Power corrupts and absolute power is business.” Darn. I like that one. |
Quote:
Quote:
Quote:
nice! edit: sometimes one seems to get new, almost meaningful phrases: "Kleine Geschenke beißen nicht." "Ein voller Bauch zieht Arbeit nach sich." |
Quote:
Edmund Stoiber, then „Ministerpräsident des Freistaates Bayern” about the first lonely bear which had missed a turnoff somewhere and got lost in the Bavarian forests. The other one was just Helmut Kohl on Angie. Here is a new Gem, version 1.4. Now this is even (quite dumbly) multi-threading: http://www.uplawski.eu/Sprichwoerter...oerter-1.4.gem Man-page: German - http://www.uplawski.eu/Sprichwoerter/sprichwoerter.html English - http://www.uplawski.eu/Sprichwoerter/proverbs.html |
To reduce the amount of work, keep track of '+' and also '-', then run through AI to try to determine what makes a good one, continuously learning and self-rating. Once a trend emerges (if ever), the ratio of good to bad (or better to worse if rating on a fractional scale), you will have created an amusing and possibly insightful proverb machine!
|
not having done anything with cards, the basic concept for me would be to have 2 arrays, 1st one is holding the beginning of a set of proverbs, the 2nd to have the endings to them. set a random on each then put the two together, print to screen, what is so hard about that?
the only check maybe to make sure the proper endings do not end up with the proper beginnings so the real proverb does not get displayed. If that match is had then call for one of them to redo the return value. |
All times are GMT -5. The time now is 03:16 AM. |