Jan. 17th, 2019

> Recent Entries
> Archive
> Reading
> Network
> Tags
> Memories
> Profile
> My Website

Links
interrobang studios
melannen@journalfen
melannen@deviantart
melannen@librarything
network
January 17th, 2019 11:10 pm - More Joy: Itchy Coding Fingers Edition
I don't have anything super joyful for more joy day, but I do still have itchy coding fingers. I forget that the reason I don't code very much anymore is that I haven't really learned how to stop coding yet.

So: [personal profile] sara has declared February Dreamwidth is for Shitposting month (sorry, too late to take it back):

DREAMWIDTH IS FOR SHITPOSTING: AN EXERCISE IN FEBRUARY

Since I have suggested it twice in comments and people seem to like the idea, I now propose it formally, a solution to two experiences we might like not to have: one, February, when it rains, or is excessively hot, or is in some other way invariably unsatisfactory! a month from which we would like to be distracted until circumstances improve! and two, this illusion that DREAMWIDTH IS FOR SERIOUS, which...no, I am here to assure you that we have been entirely full of shit on this website since the dawn of same. BUT! you say, Sara, everyone here is OLD and also ERUDITE AS FUCK and sometimes it is ALL A BIT MUCH.


I don't know if I will participate because I am shit at shitposting (it either becomes srs longform meta or homestuck references with me, no middle ground) but I look forward to seeing everyone else shitposting like crackerjack that month.

She included an AMAZING list of suggested topics, but she made the mistake of saying "or there could be a randomizer; or there could be any number of things. But there aren't." and the thing is, I had this randomizer just sitting around, so... now there is a randomizer for it?

shiptoast topic generator

I had that code just lying around because it is basically the code from the les miserables random pairing generator

(there is also one that is just injokes from miseres chat. Ah, sweet shitposting nostalgia.)

I was going to offer to make random pairing generators with that code for anybody who has a list of things they would like to randomly pair, but actually, it's REALLY SIMPLE code, so instead, I am going to tell you how to do it YOURSELF, even if you think you can't write code.

And I am going to do that merely by giving you the entire text of the random pairing generator, complete with comments in it that tell you exactly what to do to change stuff. I encourage anyone who would like to make their own javascript program to make a random shit generator of their own!

Here's how to do it: either copy + paste the code in the box below into a TEXT EDITOR (notepad is the basic choice, if you're on windows, or something equally stripped down - no microsoft word or any of that nonsense!) or download the file http://melannen.katycat.net/shiptoast.html , and then open that in your TEXT EDITOR (It will want to open in your browser, but don't let it.)

If you don't have a text editor at home, you can also edit the code right in the text box on this page, but there will be no way to save it except to copy + paste it somewhere else.

The only things you should need to know about javascript going in:
1. if it starts with // or <!-- , that's comments for humans. Computers will ignore it. You can do literally anything you want there.
2. Punctuation is very important, don't mess with it. Linebreaks and whitespace are mostly decorative, you can mess with them.

the point of this is to prove that anybody can write code, even if they have absolutely no idea what they are doing. that means you! Unless you do know what you're doing in which case pls don't look. )

Read the contents! Follow the instructions! Change whatever you want to change! Then, save the file with whatever filename you want, and a .html file extension. Open the file you just saved in a web browser, and you should be able to test your new computer program that you forked yourself! If it doesn't do anything, that means you messed up the javascript syntax somehow. (You probably deleted a bit of punctuation you shouldn't have). If it does something but doesn't do what you wanted it to do, you probably accidentally told it to do something else (look more carefully at what you actually want it to do.)

If you try this and it doesn't work and you can't figure out why, or if you need me to break something down more simply or I missed a step, feel free to ask in a comment! (You will probably need to put any bits of code in <textarea> tags or dw will try to read them as html.)

Now, to actually share it with other people, you need to be able to upload it somewhere that will let you run javascript, which does not include dreamwidth. If you have your own website, you can definitely upload it there. If you don't, I am going to be home for the long weekend, and I will offer to host any basic forks from this code on my website that I am leeching from my sister shhhh if you get them to me by next Tuesday. Email me your .html file (my @dreamwidth.org address should still work if you don't have my main one) and I will test it and then upload it and send you the new web address!

The next step - once you are a real coder, who has made a real javascript program - is to learn how to do it right. That's harder. (It's still mostly just messing around with shit in other people's code, though.)

(37 comments | Reply)


Previous Day [Archive] Next Day

> Go to Top
Dreamwidth Studios