Sunday, February 20, 2022

Title Generator Improvements and a Writing Exercise - 2022 February 20

I did another upgrade to my random title generator and posted another writing exercise.

Random Title Generator Improvements

People have asked me to change my random title generator so you can see all the titles you've generated so far. It was only showing the last one generated. I tried several times to implement that, but without success. This week I tried again, and I got it to work.

The main problem was that the webpage uses JavaScript, and I'd never bothered to learn the JavaScript language. I just did things by trial and error as I needed them. This time I was a bit more systematic about it. The main issue was that I didn't understand how you output the results from a function to the webpage. I had copied the code to do that from an example and since it worked, I never bothered to find out how it worked. Once I found out how to do that, it came together quickly.

The method I used to create the list of titles was to concatenate each new title followed by a line break code to the front of a text string. The webpage then displays the text string. I talked to a friend of mine, who has a bit more computer programming savvy than me. He wasn’t familiar with JavaScript but did have some useful questions. He asked if there was a limit to how long a string could be in JavaScript. Some languages have a fairly small limit. I investigated to see if that could be a problem.

It turns out there is a limit to string length, which differs from one browser to another. In Firefox it is 1,073,741,822 characters and in Chrome it is 536,870,888 characters. In a sample of titles I generated, the average title length was 44 characters. That means that Firefox can have 24,403,223 titles before you hit the limit and Chrome could handle 12,201,611 titles. I estimated that if you generated a new title every 10 seconds and worked 8 hours a day with no breaks, it would take 23 years to reach the limit in Firefox and 11 ½ years to hit the limit in Chrome. I concluded that string length wasn’t likely to be an issue.

We talked about a few other potential problems that could come up with the generator when other people use it. He suggested that there wasn't much to gain by trying to fix every possible problem. He thought working on the word lists would be a better use of my time. I agree. My goal is to get up to a billion possible titles. I think I can do that.

“The Desperation of the Wretched Senator”

At our script writer’s group, we did a writing exercise based on the title “The Desperation of the Wretched Senator”. I’m wary about dealing with conspiracy theories and politics in my writing, but with a title like this, there isn’t a lot of other options. I recorded and posted the exercise on-line.

·         https://soundcloud.com/dynamiclethargy/the-desperation-of-the-wretched-senator 

 Blender and Computer Issues

They have released version 3 of Blender, so I wanted to upgrade to it. I got it installed OK, but it turned out that it doesn't support my graphics card. If I want to use it, I'll need to get a new graphics card. My computer doesn't work with Windows 11 either, so it may be time to get a new computer anyway. I'm not looking forward to doing that. I've spent a long time getting this one the way I want it.

I did find a post where some guy found a software work around for Blender and unsupported graphics card. I may try that.



This post is a mirror from my main blog http://www.dynamiclethargyfilms.ca/blog

No comments:

Post a Comment