News for hackers. Stuff that matters.
Re:How true hackers write JavaScript by krapp on Wednesday September 05, 2018 @07:02AM (#17916788)
>Having less characters makes code more readable (or rather "scannable") as well, it's just another tradeoff.

Only to a point, otherwise minified js would be more legible than plain source. It takes "a couple of seconds" to scan the codebase and find out what el or ev refer to, but it would take zero seconds if they were just called "event" or "element."[0] There's no gain in readability from shaving off one or two characters in that case. It just "feels" more efficient because it resembles the common style of lower level code.

[0]Assuming those aren't reserved words in javascript, I don't know.

Re:How true hackers write JavaScript by xigma on Wednesday September 05, 2018 @08:19AM (#17917232)
Of course, up to a point. The same goes for very long but extremely descriptive variable names. Hence, it is a tradeoff.
Re:How true hackers write JavaScript by dvlsg on Wednesday September 05, 2018 @04:38PM (#17921696)
You are allowed to use both event and element, as they aren't strictly reserved keywords.

I think it's generally frowned upon, though. For example, I believe "event" is defined as a global in browsers (on window, perhaps?), so you run the risk of shadowed variables and accidentally referring to the wrong thing.