I’ve been wanting to start blogging for a long time now, but my life is pretty busy with school work and other things. I decided that I’d just start writing down whatever is on my mind.

JSDOC I love u <3

Javascript is my first coding language and I am still learning. JSDOC is something that i recently discovered that has been a game changer when it comes to understanding my own code. If you are new-ish to Javascript like me, and have looked at a lot of code, you might have seen something that looks like this:


/**
*description
*@param {any} arg description
*/

This is JSDOC, and it’s a special way to keep track of your functions, objects, variables or pretty much anything that you want to document. The really cool part about JSDOC is that it comes with a program jsdoc that you can run to analyze all of your javascript files, and then spit out a whole ass website with all of this info organized and pre-formatted. It gets even cooler because you can download templates to apply to your outputted site. the one I use comes with a light/dark theme toggle and a search bar. Probably a very basic concept that most people who code would know, but It’s still my first year with Javascript, so its new to me. And if you are completely new coding and have no idea what I’m talking about, lets say I have a function:


// checks if the number is less than another, if so, sets to the second argument.
function reset(num, or){
	if ( num > or ) {
		num = or
	}
}

let startingNumber = 1;
let myNumber = startingNumber + 9;

console.log(myNumber)
// --> 9
reset(myNumber,startingNumber)
// --> 1

This is a completely useless function that reduces the number to a given value if it is less than the current value. But let’s say I want to use this function much later on in my project, and I’ve forgotten which arguments I need to use it, or how the function even works. If I pass in the wrong arguments, Javascript will not complain, you will just not get the result you wanted. I could search through my code and see if I’ve left myself any notes, but that is very inefficient, especially if you have to reference back over and over. That’s why we use JSDOC.


/**
*checks if the number is less than another. if so, sets to the second argument.
*@param {number} num the number to test.
*@param {number} or the original number to reset to.
*@returns {number}
*/
function reset(num, or){
	if ( num > or ) {
		num = or
	}
}

When JSDOC runs on this code, it will check each of the @ tags and map them to the function directly below it. This way, you can document in detail which type each argument expects, as well as what is returned, if anything. You will also notice that after adding this documentation, when you start to type out this function in a IDE like VSCode, it will provide a preview to this information, which makes coding stupidly simple.

My Current Thoughts on AI

I’ve thought a lot about how best to approach this subject, but I guess it all just comes down to one thing:

AI in creative work is lazy

The whole point of being creative is being able to solve problems. And in my opinion, that includes every little tedious detail that goes into creating. You can’t skip any of that.

It Doesn’t Even Look Good

At this point the times that AI is able to create something remotely captivating is an anomaly rather than a feature.

It’s Not Even Fun

I’m sure there is someone out there who enjoys constructing prompts and hoping to get the right output, but for me personally it feels soul sucking, and a little too reminiscent of the book-writing machines from the book 1984. When you consider the fact that LLM technology is literally designed to give the lowest learning curve, LLMs just fail to give that feeling of rigorous learning that you get from learning literally anything.

All in all, I hate it, and I don’t think it’s real Design. You can quote me on that.