---
title: "Jason Knight (@cutcodedown) | Hashnode"
description: "The less code you use, the less there is to break. Read the latest articles by Jason Knight on Hashnode."
url: "https://hashnode.com/@cutcodedown"
---

@cutcodedown

# Jason Knight

@cutcodedown · Keene, NH · Joined December 2015

The less code you use, the less there is to break

[Website](http://www.cutcodedown.com/)

## Comments

[Actually, I have a few more... it's not so much advice as just stupid things clients or their employees have said. There was this one bank I did work for in 2017 that was nothing but headaches, but the two biggest headaches was their IT director, and VP of marketing. "you can't make a site responsive without bootstrap, it's what makes sites responsive" -- their head IT guy was 100% convinced that was the truth, when -- as always -- this guy knew not one blasted thing about HTML or CSS, and didn't even know what a media query was. He even started to try and convince the president of said bank that I didn't know what I was talking about -- which is when I snapped, and said "look, I wouldn't even be here if this {expletive omitted} had any {expletive omitted} clue what he was doing. You hired me to fix the mess this {expletive omitted} made, and the only thing I'm trying to figure out right now is why the {expletive omitted} you haven't fired this {expletive omitted}" I did so in command voice too. For those of you unfamiliar with command voice, go watch "Boys in Company C" and "Full Metal Jacket". Their marketing director was no better -- they threw a conniption fit when I yanked all the bloated slow goofy flash animations and scripting heavy BS off of the banking portal -- you know, the part where people go to do things like check their balances and make transfers. Their reasoning "It has to be flashy and fancy to draw in new customers" On the banking portal... aka behind the client login... aka something people who didn't have accounts with them yet would never even see. Of course this was the client where I got them out of their legal problems, left them with a nice clean fast usable accessible page that met all WCAG requirements to get them out of their continuing fines... and not two weeks after we get them clear of all the legal woes those same two {expletives omitted} went in and put everything back exactly like it was -- then were shocked when sued again, and tried to blame me for it. I went from "guy hired to fix it" to "witness for the prosecution" -- as it went from "they didn't know any better" to "willful and malicious". Somehow those same two {expletives omitted} are still with that bank, but hey at least I got paid triple by the time the legal hell was settled. There's a reason I've started to think that modern marketing executives and many IT "suits" are just burger flippers with degrees. Actually, that's insulting to burger flippers; even they'd probably know better.](https://hashnode.com/forums/thread/what-is-the-weirdest-advice-you-have-received-from-other-developers-or-techies-in-general/comment/5c1e087dddacdb5e46747668)

Comment · Thread · Dec 22, 2018 · [What is the weirdest advice you have received from other developers or techies in general?](https://hashnode.com/forums/thread/what-is-the-weirdest-advice-you-have-received-from-other-developers-or-techies-in-general)

["Use a front end framework" -- any of them. I hear it all the time how "great" these bloated train wreck laundry lists of how not to build a website are, and I cannot fathom how anyone qualified to build a website could even suggest using any of them. Bootstrap, w3.css, react, vue, jquery, angular, whatever. They are utter and complete junk, and it's like the fans of them live in some bizzaro-world alternate reality where ignoring the intent of the specifications, the purpose of HTML, anything remotely resembling good practices, separations of concerns is somehow magic ally "better" ...and that's before we even talk about them all basically being anywhere from two to ten times the work to even work with! To be frank, all the positive claims of how "great" these frameworks are, is, well... full of more manure than Biff Tannen's '48 Ford Super De Luxe. The only way I could see thinking any of these "frameworks" offer any sort of benefits is a complete failure to grasp the point of HTML and CSS, much less the most basic concepts of their use. ... and the scripting ones aren't any better; slopping scripting only elements into the markup with no graceful degradation plan? Epic /FAIL/ at web development. But really HTML/CSS frameworks are the worst. They're gibberish nonsense reeking of everything that was wrong with HTML 3.2 and why HTML 4 Strict got rid of so much of it. It's like a trip with Mr. Peabody back to 1997. Weird, bizarre, nuts, whacko... I just don't get it.](https://hashnode.com/forums/thread/what-is-the-weirdest-advice-you-have-received-from-other-developers-or-techies-in-general/comment/5c1d8c807cf37ae24a80de04)

Comment · Thread · Dec 22, 2018 · [What is the weirdest advice you have received from other developers or techies in general?](https://hashnode.com/forums/thread/what-is-the-weirdest-advice-you-have-received-from-other-developers-or-techies-in-general)

[Never heard of it. (hey, you asked)](https://hashnode.com/forums/thread/does-paul-graham-care-about-hacker-news-anymore/comment/5c1bd537ce0fd2f92cb36a3f)

Comment · Thread · Dec 20, 2018 · [Does Paul Graham care about Hacker News anymore?](https://hashnode.com/forums/thread/does-paul-graham-care-about-hacker-news-anymore)

[Ooh, careful with that question.... you really might not like the answer. In fact if someones low opinion is going to upset you, just stop reading now. :D Generally I find them to universally be trash, often built by people not qualified to use the underlying language in the first place. Much like "frameworks" they have the illusion of simplicity, but that's all it is. It vanishes like a mirage the moment you try to do anything the generator wasn't designed specifically for, which in most cases is what anyone looking at it actually wants to do. This is even more common when what they do is built around some rubbish client-side framework. Angular, react, vue, bootstrap, whatever -- they all reek in my experience of ignorance and ineptitude. Simply put, the people who made those systems simply do not understand enough HTML or CSS to be writing code that outputs, manipulates, or otherwise works with them. It's how people end up with two to ten times the HTML and 20 times or more the overall code even needed to do the job... But then everyone touts how "wonderful" and "simple" having such massive impossible to debug bloat it? No. Basically it has been my experience that when such tools try to lower the bar, they end up letting toddlers on the rollercoaster. That bar may actually have existed for a reason, to keep people safe. It has been my experience that "generators" be they simple front-end WYSIWYGs, "site generators", or for full stack development end up the equivalent of ripping that bar off the wall and clubbing the people duped into using them in the kneecaps. Particularly given what such tools vomit up is a giant middle finger to usability and accessibility. Which is why my day job freelancing involves going into projects for banks, public utilities, healthcare, and government agencies and ripping such things out of websites and applications with great passion and ferocity. Universally such places are utterly screwed over by such tools to the point it can even land them in court under laws like the UK's EQA and the US' ADA. Now all that said, in a brief run-through of the website I could find no example of what Skaffolder produces as a end result -- but if it bears any resemblance to the laundry list of how not to write HTML that is the website itself? Yeah... just say no. CSR only on what appears to be a static website? Static style in the markup? Static scripting in the markup? Zero logical document structure or scripting off fallbacks? Endless pointless presentational classes? Hence the 2.3 megabytes in 51 files for the home page delivering 2k of plaintext and not even a half dozen actual content images. Almost like in addition to broken ignorant development practices it also let some artist under the delusion they are designer have their way with it as well. Laugh being it might even load faster if the whole site were a monolithic page with CSS/JS faking the appearance of multiple pages -- If it were coded properly. Whoever built that site isn't qualified to build websites. Sorry if that sounds harsh, but that's the truth of it; or at least, not if you care in the slightest about usability, accessibility, search, maintainability, sustainability, or any other determining factor in proper site construction. A simple "view source" of Skaffolder's page should be enough to send anyone qualified to build a website running the other direction screaming in horror. Doesn't bode well for a tool aimed at people not qualified to build this stuff on their own... though entirely consistent with what I've come to expect the past six to seven years. It is a poster child for everything wrong with web development today. Maybe if someone could make one of these systems that outputted semantic markup with separation of presentation (CSS) from content (HTML) that gracefully degraded scripting off, and didn't waste 20 times the code needed to do the job, I could get behind it. I've just never seen it done, nor do I even think it can be done. They're a cute toy for something like a blog for grandma, but anyone selling it to a business as something to use is -- and this is just my opinion -- a scam artist; because the result just sets them up for failure from the start.](https://hashnode.com/forums/thread/what-do-you-think-about-code-generators/comment/5c19529882e2450f7afc6fee)

Comment · Thread · Dec 18, 2018 · [What do you think about code generators?](https://hashnode.com/forums/thread/what-do-you-think-about-code-generators)

[I think so long as it's controlled by the user viewing the page and not the person posting, it's a fine and dandy idea. As it is I've got a custom user.css I use to make it all one colour, because I find colour syntax highlighting to be a useless, blurry, illegible train wreck acid trip that makes it very hard for me to tell what the code even says. Some colour combinations of course being worse than others for this -- many of the popular ones not even coming close to accessibility minimums -- but by the time you get to legible contrasts, you can barely even tell there's colour anymore defeating the purpose. I've watched people make mistakes where they couldn't even read their own code because of the fancy colours -- I often wonder if it's that failing that makes people reliant on automation like auto-completion that I find equally annoying. It was ugly and useless 30 years ago when I first encountered it, it's only gotten more obtuse and annoying since that time. If I wanted to taste the rainbow that bad, I'd pop a dot. In case you couldn't guess, not a fan.](https://hashnode.com/forums/thread/should-we-have-syntax-highlighting-choice-here/comment/5c194ef882e2450f7afc6fd3)

Comment · Thread · Dec 18, 2018 · [Should we have syntax highlighting choice here?](https://hashnode.com/forums/thread/should-we-have-syntax-highlighting-choice-here)

[This regular expression meets all of those security requirements set by the internet people. Except for lengths. :D](https://hashnode.com/posts/regex/5c19033a82e2450f7afc6dfb/comment/5c194dde3960ebb0612df5b4)

Comment · Article · Dec 18, 2018 · [Regex…](https://hashnode.com/posts/regex/5c19033a82e2450f7afc6dfb)

["Let" feels utterly pointless and worse, introduces unnecessary memory thrashing. If you "need" that fine a granularity of scope you are doing something horrifyingly wrong in your codebase such as re-using variable names in a confusing manner. Worse, because they don't lift you increase stack allocations and de-allocations since lifting was added to the language to address the fact it's not forward declarative. (Something C gets away with because it's designed for multi-pass compilation so all those inner scopes can be allocated at function entry) When I said I wanted constants, "const" is not what I was asking for. I guess I should have said DEFINE. Though it would be nice if we could have unmutable object properties with something a bit less convoluted than defineProperty. See, the problem for me is that they are scoped, the one place I don't need constants! (unless it were a property on an object's "this") Then that whole "Symbol" thing almost sounds like what I want, except it's so poorly documented and explained you'd almost think it was a W3C specification. The old joke, W3C specifications read like they were written in Finnish, translated to Japanese by a Russian, then Google translated to Engrish moist goodry me love you long time. There's a reason we all pretty much go straight to third party tutorials instead of the specification to learn the... uhm... "specification". I swear there are sections of the ECMAScript, CSS, and HTML specifications that you need to hire a gaggle of lawyers to explain. Arrow functions are another thing that just takes the already agonizingly painfully cryptic BS the language inherited from C (I'm a Wirth guy) and makes it all the more complex and difficult to follow. And for what, one minor distinction in how "this" is handled and "wah wah, eyes bee two layzee too tiep teh wurd function"?!? Though what's really annoying about arrow functions is how everyone is throwing them into code for nothing, often where callbacks and some newer methods -- like foreach -- are less efficient -- often painfully so -- than a simple old-fashined for loop. But then when people don't even seem to realize that ANY expression can go in the middle of "for" what can you expect. There's a lot of new stuff people are just using without thinking about "is this an improvement over the old way or not" -- and the answer is quite often not! "For" example rimshot I keep seeing stuff like this: let allSpans = document.querySelectorAll('span'); allSpans.foreach((span) => { // process span here }); Thing is if you're using an immediate function on foreach, why are you even using a function? Much less, see the flub using querySelectorAll that has to go through every selector instead of getElemetnsByTagName which only searches tagName typically from a pre-built lookup table? This: for (var span of document.getElementsByTagName('span')) { // process span here } .. and of course the pointer for 'span' would be allocated on function entry, which is why I wrap all my scripts in IIFE meaning scope bleed is a non-issue anyways. But if it really bugs you, fine, use let there. Don't even need the extra variable. ... and because we have removed the overhead of the function callback, it executes many, many, MANY times faster. But then it often seems so many people are unaware of the highly powerful for/of. Not surprising when most people operating on nodeLists continued to brute force things in their legacy support instead of just: var allSpans = document.querySelectorAll('span'); for (var i = 0, span = allSpans\[i\]; i++) { // process span here } Basically if you need for/of in browsers that don't support it on a nodeList or other array iterable where you know none of your values are loose false, that's the fastest way to go through them. It's funny because that technique seemed to be gaining traction back in '03, but by '08 it had all but disappeared -- never could figure out why. Even the examples given in various tutorials are -- IMHO garbage. For example I've seen this dozens of places: this.nums.forEach((v) => { if (v % 5 === 0) this.fives.push(v) }); Why would you EVER do that -- especially if you like 'let' -- instead of: for (let v of this.nums) { if (v % 5 === 0) this.fives.push(v); } I don't get it. MAYBE for event handlers, but is it really THAT hard to do "function(e) {" instead of "(e) => {"... I know which one I'd rather look at if I'm trying to write comprehensible code, and it's not the flipping arrow functions! Generally though this whole let, const, arrow function, and endless callback methods thing is introducing excess overhead and reducing code clarity, two things that always raise the hackles on my hackles. That said, things like classList were riduculously overdue, shame that because browser implementations seem to work off the Array instead of the className string methods like classList.add, classList.remove and so forth end up slower than any decent regex polyfill for them. Which is sad when a regex or even multiple regex brute-forced by your own functions are faster than the native methods, but that's JavaScript arrays for you! Probably because they aren't actually Arrays, they're pointered lists! That's not so much a problem with the specification though as it is the implementation. Honestly I don't think the 'array' part of classList should have even been a 'thing'. I do think that proper Class declarations were a good idea, but to be frank the implementation feels as ugly and shoe-horned in as C++'s nasty slopped in any-old-way object implementation. (again, my prejudice is showing. I learned objects in smalltalk, object pascal, modula, and ADA) To the point that honestly, declaring conventional object as the constructor and using object.prototype as a object literal actually feels like a more reasonable approach -- even if extending the object in a new instance can be a bit of a wonk since you have to spin your own clone method. A lot of things strike me as just encouraging bad practices; see "block scoped functions" where if you want another function, give it a new name. I've already hit up against namespace hell from people reusing variable and function names all over the place inside the same parent function. It's a confusing inconsistent mess that after some four decades of writing code, I really question what greenhorn came up with the idea. "template strings" is another of the C mentality garbage I never wanted to see make its way over to JavaScript. I have always found C's printf to be confusing hard to follow garbage; I want to see that string closed, the variable there, and that string opened again for code clarity, not some goofy hard to follow handlebars type bull that for me often triggers false positives. This is only made worse by the allowance of operations inside it, which strikes me as the same type of foolhardiness as using "eval"! It's all part of why I've come to the conclusion that when people say "syntactic sugar" what they mean is "cryptic to the point of intentionally trying to make programming harder than it has to be". All that said, I love all the destructuring on assignment stuff, computed properties, the WAY past due proper unicode support, the new parameter handling that's way less of a headache than the "arguments" array, typed arrays (or as I call them, actual huffing arrays!)... ... and a lot of it I'm just indifferent to as it's not anything I would use when writing JavaScript; such as the moving of certain functions out of the global space and onto their associated objects. All this has done (for me) is result in having to type String(myVar) or Number(myVar) around a bunch of things to use the old method, resulting in zero real-world improvement. Oh noes, library functions in the global space!!! AAAAAAAAH!!! I swear it had to be some die-hard Java fanboy who thought JavaScript needed that. Which makes sense given the mass exodus we've seen from Java to node.js by "people who follow the hot and trendy" if you think about it. I can see that for consistency sake, but it's not really anything I think they should have wasted time on. ... and there are things that I understand, but would prefer to just avoid. Promises for example to me are a pointless addition for a language that's pretty much inherently single-threaded. It's at best a crutch for people who can't handle async coding, at worst a way to make a convoluted mess out of the simplest of things. Shame for 99%+ of what I'm writing these days I can't even deploy a single bit of ES6, since I mostly work client-side where you can't even guarantee it exists yet. (though I have a side project I'm building in Electron that will definitely leverage a lot of it!) I'm sure if I did more with node.js other than ripping out large chunks of code and garbage frameworks that are screwing over clients, taking hundreds of K of code and reducing it to dozens, I'd have a better understanding of why some of this exists. Although arrow functions do have a nice side-effect in that regard. Because IE has no clue what to make of them, their mere presence will make your entire script fail to even execute. I actually used that instead of browser sniffing or capabilities detection on a recent project so that the site could gracefully fall back to the non-scripted functionality, ignoring the attempt at scripting enhancement altogether. But then client-side I write all my pages so that the page's base functionality and the most important thing a website can do -- delivering content -- works before I even think about adding JavaScript to the page. My scripting is there to enhance the user experience, not be the only means of providing it. As my buddy Dan used to say: If you can't make a fully functioning useful page without client-side JavaScript first, you likely have zero business adding scripting to it!](https://hashnode.com/forums/thread/which-parts-of-es67-do-you-like-and-which-parts-do-you-dislike-and-why/comment/5c19473682e2450f7afc6fbd)

Comment · Thread · Dec 18, 2018 · [Which parts of ES6/7 do you like and which parts do you dislike, and why?](https://hashnode.com/forums/thread/which-parts-of-es67-do-you-like-and-which-parts-do-you-dislike-and-why)

[Honestly, hoodoo throwing more code at it isn't the answer, but I guess when you're pretty much strictly CSR telling users with accessibility needs -- and therefor search engines -- to get stuffed, that's to be expected. You want to make pageloads faster? Move the SVG logo's and icons out of the markup so it can be cached and your server-side code doesn't have to waste time pasting them into the markup every time there's a page load. If you're worried about handshake counts since most of them are monochromatic, put them into a font. Lose the Aria role nonsense that you wouldn't need if you had semantic markup; if that's too much to ask, maybe kill off all the empty ones bloating out the code or ones that have zero business in the markup - like the ones on the HTML tag? Kill off 90%+ of the data- attributes for react that have no legitimate reason or purpose to exist in the markup other than to make the page slower. If react needs to hook your META tags, there's something horrifyingly wrong with how you're building the site. Though that's just react and why I rail against its use. Lose the redundant opengraph values that serve zero legitimate purpose when they'll fall-back on your non-og equivalent. (99% of the time there's no real reason to use anything more than og:image) Stop wasting bandwidth on presentational classes. Say what things are not what you want them to look like. If you're using classes like "left-items flex-grow-1 d-flex flex-row align-items-center" you're doing it all wrong. As I often say if you want HTML to work that way, you must really miss HTML 3.2. If you have HTML elements that only serve a purpose for client side scripting, they have no business in your HTML in the first place. Generate all of them from the scripting -- where they can be cached instead of on each and every pageload. There's a reason where you have this 7k of minified code: <div class="progressbar" id="hn-progressbar"></div><div id="\_\_next"><div class="main-wrapper d-flex flex-row" data-reactroot=""><header class="global-sidebar" id="global-sidebar"><div class="d-flex flex-column justify-content-between global-sidebar-content"><div class="sidebar-top"><div class="logo-section"><a href="/"><svg viewBox="0 0 1261 213"><defs><linearGradient id="ma" x1="0%" y1="0%" y2="100%"><stop offset="0%" stop-color="#2196F3"></stop><stop offset="100%" stop-color="#2962FF"></stop></linearGradient></defs><g fill="none" fill-rule="evenodd"><path fill="url(#ma)" d="M44.080002 0h124.839996C193.264711 0 213 19.735289 213 44.080002v124.839996C213 193.264711 193.264711 213 168.919998 213H44.080002C19.735289 213 0 193.264711 0 168.919998V44.080002C0 19.735289 19.735289 0 44.080002 0zm112.614012 186.48571l-.032768-.006554c11.317072-.187479 20.52155-9.173403 20.980882-20.482704.459331-11.309301-7.986098-21.012082-19.25069-22.116725l-40.764377-71.973375c-5.963921-10.70884-17.478874-10.243524-21.627403 4.954642-3.565245 14.392053-2.647718 27.951779-3.683212 44.336175-.006749.107669-.082052.19875-.186533.225617-.104481.026866-.21438-.016592-.27223-.107649l-36.39302-72.550105c2.970206-2.332552 4.70883-5.896732 4.718705-9.673348C60.183368 32.413631 54.769737 27 48.091684 27 41.413631 27 36 32.413631 36 39.091684c0 6.678053 5.413631 12.091684 12.091684 12.091684.570177 0 1.035494-.117967 1.494257-.117967C64.902074 90.446935 81.9484 136.395335 88.04995 146.992762c4.14853 10.132111 18.311201 6.907661 18.65855-4.030561l1.494257-57.463354c0-.347349.458763-.347349.576731-.117967l29.229762 69.548484c-1.738487 3.135306-2.641246 6.665096-2.621503 10.250078.014444 11.761139 9.545129 21.291824 21.306268 21.306268z"></path><path fill="#46494C" d="M283 40.4h26.8v59.8h69.8V40.4h26.8v140h-26.8v-56.8h-69.8v56.8H283v-140zm217.385186 140v-13c-3.733352 4.66669-8.533304 8.199988-14.4 10.6-5.866696 2.400012-12.599962 3.6-20.2 3.6-7.466704 0-14.033305-1.433319-19.7-4.3-5.666695-2.866681-10.033318-6.833308-13.1-11.9-3.066682-5.066692-4.6-10.733302-4.6-17 0-10.00005 3.533298-17.833305 10.6-23.5 7.066702-5.666695 17.066602-8.566666 30-8.7h31.2v-2.8c0-6.266698-2.066646-11.133316-6.2-14.6-4.133354-3.466684-10.133294-5.2-18-5.2-10.133384 0-20.733278 3.3333-31.8 10l-9.4-18c8.400042-4.66669 16.033299-8.033323 22.9-10.1 6.866701-2.066677 14.899954-3.1 24.1-3.1 13.866736 0 24.633295 3.3333 32.3 10 7.666705 6.6667 11.566666 15.99994 11.7 28l.2 70h-25.6zm-28.4-18.8c7.466704 0 13.86664-1.766649 19.2-5.3 5.33336-3.533351 8.33333-7.899974 9-13.1v-9.6h-27c-6.933368 0-12.033317 1.033323-15.3 3.1-3.266683 2.066677-4.9 5.43331-4.9 10.1 0 4.533356 1.699983 8.13332 5.1 10.8 3.400017 2.66668 8.033304 4 13.9 4zm143.785185-59.2c-5.200026-3.066682-10.566639-5.466658-16.1-7.2-5.533361-1.733342-10.63331-2.6-15.3-2.6-4.400022 0-7.899987.766659-10.5 2.3-2.600013 1.533341-3.9 3.899984-3.9 7.1 0 3.33335 1.633317 5.899991 4.9 7.7 3.266683 1.800009 8.433298 3.69999 15.5 5.7 7.466704 2.266678 13.599976 4.499989 18.4 6.7 4.800024 2.200011 8.966649 5.466645 12.5 9.8 3.533351 4.333355 5.3 10.033298 5.3 17.1 0 10.400052-3.99996 18.399972-12 24-8.00004 5.600028-18.066606 8.4-30.2 8.4-8.266708 0-16.333294-1.299987-24.2-3.9-7.866706-2.600013-14.533306-6.299976-20-11.1l9-18.2c4.800024 4.133354 10.5333 7.366655 17.2 9.7 6.6667 2.333345 12.99997 3.5 19 3.5 4.800024 0 8.633319-.833325 11.5-2.5 2.866681-1.666675 4.3-4.16665 4.3-7.5 0-3.733352-1.66665-6.533324-5-8.4-3.33335-1.866676-8.733296-3.933322-16.2-6.2-7.200036-2.133344-13.066644-4.233323-17.6-6.3-4.533356-2.066677-8.46665-5.199979-11.8-9.4-3.33335-4.200021-5-9.699966-5-16.5 0-10.533386 3.833295-18.566639 11.5-24.1 7.666705-5.533361 17.299942-8.3 28.9-8.3 7.066702 0 14.033299.99999 20.9 3 6.866701 2.00001 12.96664 4.799982 18.3 8.4l-9.4 18.8zm95.785186-30c12.266728 0 21.933298 3.699963 29 11.1 7.066702 7.400037 10.6 17.43327 10.6 30.1v66.8h-26.2v-59.2c0-7.466704-2.133312-13.366645-6.4-17.7-4.266688-4.333355-10.06663-6.5-17.4-6.5-8.66671.133334-15.533308 3.066638-20.6 8.8-5.066692 5.733362-7.6 13.066622-7.6 22v52.6h-26V32h26v61.8c7.33337-14.00007 20.199908-21.133332 38.6-21.4zm130.385186 0c12.266728 0 21.933298 3.699963 29 11.1 7.066702 7.400037 10.6 17.43327 10.6 30.1v66.8h-26.2v-59.2c0-7.466704-2.133312-13.366645-6.4-17.7-4.266688-4.333355-10.06663-6.5-17.4-6.5-8.66671.133334-15.499975 3.066638-20.5 8.8-5.000025 5.733362-7.5 13.066622-7.5 22v52.6h-26v-107h26v20c7.33337-13.733402 20.133242-20.733332 38.4-21zm112.785185.2c11.066722 0 20.833291 2.266644 29.3 6.8 8.466709 4.533356 15.066643 10.899959 19.800002 19.1 4.73336 8.200041 7.1 17.63328 7.1 28.3 0 10.800054-2.36664 20.333292-7.1 28.6-4.733359 8.266708-11.333293 14.666644-19.800002 19.2-8.466709 4.533356-18.233278 6.8-29.3 6.8-11.200056 0-21.066624-2.266644-29.6-6.8-8.533376-4.533356-15.166643-10.933292-19.9-19.2-4.733357-8.266708-7.1-17.799946-7.1-28.6 0-10.66672 2.366643-20.099959 7.1-28.3 4.733357-8.200041 11.366624-14.566644 19.9-19.1 8.533376-4.533356 18.399944-6.8 29.6-6.8zm0 22.2c-9.066712 0-16.399972 2.99997-22 9-5.600028 6.00003-8.4 13.799952-8.4 23.4s2.799972 17.39997 8.4 23.4c5.600028 6.00003 12.933288 9 22 9 8.800044 0 15.999972-2.99997 21.6-9 5.600028-6.00003 8.4-13.799952 8.4-23.4s-2.799972-17.39997-8.4-23.4c-5.600028-6.00003-12.799956-9-21.6-9zM1133.91111 32v148.4h-26v-17.2c-3.86668 6.00003-8.8333 10.566651-14.9 13.7-6.06669 3.133349-13.09996 4.7-21.1 4.7-10.13338 0-19.03329-2.299977-26.7-6.9-7.6667-4.600023-13.63331-11.066625-17.9-19.4-4.26668-8.333375-6.4-17.899946-6.4-28.7 0-10.66672 2.09998-20.099959 6.3-28.3 4.20003-8.200041 10.1333-14.566644 17.8-19.1 7.66671-4.533356 16.43329-6.8 26.3-6.8 8.13338 0 15.26664 1.599984 21.4 4.8 6.13337 3.200016 11.19998 7.79997 15.2 13.8V32h26zm-56.4 127.8c8.93338 0 16.23331-3.033303 21.9-9.1 5.6667-6.066697 8.5-13.899952 8.5-23.5s-2.8333-17.433303-8.5-23.5c-5.66669-6.066697-12.96662-9.1-21.9-9.1-8.93337 0-16.19997 3.033303-21.8 9.1-5.60002 6.066697-8.46666 13.899952-8.6 23.5.13334 9.600048 2.99998 17.433303 8.6 23.5 5.60003 6.066697 12.86663 9.1 21.8 9.1zm131.58519-87.2c17.06675 0 29.89996 4.866618 38.5 14.6 8.60004 9.733382 12.9 23.399912 12.9 41 0 3.466684-.06667 6.066658-.2 7.8h-79c1.73334 7.600038 5.29997 13.566645 10.7 17.9 5.40003 4.333355 12.03329 6.5 19.9 6.5 5.46669 0 10.69997-1.033323 15.7-3.1 5.00002-2.066677 9.36665-5.033314 13.1-8.9l14 14.6c-5.33336 5.866696-11.8333 10.399984-19.5 13.6-7.66671 3.200016-16.16662 4.8-25.5 4.8-10.93339 0-20.56663-2.266644-28.9-6.8-8.33338-4.533356-14.76664-10.899959-19.3-19.1s-6.8-17.63328-6.8-28.3c0-10.66672 2.29998-20.133292 6.9-28.4 4.60002-8.266708 11.03329-14.699977 19.3-19.3 8.26671-4.600023 17.66661-6.9 28.2-6.9zm27.6 46c-.26667-7.866706-2.86664-14.13331-7.8-18.8-4.93336-4.66669-11.46663-7-19.6-7-7.60004 0-13.96664 2.299977-19.1 6.9-5.13336 4.600023-8.29999 10.89996-9.5 18.9h56z"></path></g></svg></a></div><nav class="primary"><ul class="list-unstyled"><li><a href="/" class=""><span>Home</span></a></li><li class="dropright"><a href="#" class="d-flex flex-row justify-content-between align-items-center" data-toggle="dropdown"><span>Posts</span><i class="mdi mdi-chevron-right"></i></a><div class="dropdown-menu"><a href="/discussions" class=""><span>Discussions</span></a><a href="/stories" class=""><span>Stories</span></a><a href="/news" class=""><span>News</span></a></div></li><li><a href="/tags" class=""><span>Tags</span></a></li><li><a href="/amas" class=""><span>AMAs</span></a></li><li><a href="/jobs" class=""><span>Jobs</span></a></li></ul></nav></div></div></header> Anyone who actually knows how to use HTML would use this: <div id="top"> <h1><a href="/">Hashnode</a></h1> <ul id="mainMenu"> <li><a href="/">Home</a></li> <li> <input type="checkbox" id="mainMenu\_postsToggle"> <label for="mainMenu\_postsToggle">Posts</label> <ul> <li><a href="/discussions">Discussions</a></li> <li><a href="/stories">Stories</a></li> <li><a href="/news">News</a></li> </ul> </li> <li><a href="/tags">Tags</a></li> <li><a href="/amas">AMAs</a></li> <li><a href="/jobs">Jobs</a></li> </ul> <!-- #top --></div> Assuming one is ok with abusing a checkbox with :checked for the submenu show/hide. Be even less markup if you wanted to rely on a JS only solution. That's 1/15th the code that would have to be sent on subsequent pageloads. There's a reason when I say people using things like react, bootstrap, and other such crutches are making themselves work harder, not smarter -- because you're making massive convoluted non-semantic inaccessible messes of it with anywhere from two to twenty times the code needed to do the job! That's why it's slow. As evidenced by the home page of this site right this moment for a non-logged in guest, takes 3 megabytes in 33 separate files just for the HTML, CSS, JavaScript, and XHR present, all to deliver 2.03k of plaintext, maybe two dozen links, and not even a half dozen content media elements -- not even 10k of HTML's job. Much less given the relative simplicity of this site's design it being highly unlikely for the entire site to need more than 48k of CSS in one or two files. Add on the endless horde of JavaScript with no scripting off graceful degradation... Literally, 90k of HTML doing 10k's job. Nearly a megabyte of CSS in six files doing 48k or less in one or two files' job. Almost two megabytes of JavaScript in two dozen files doing stuff that the lions share of which shouldn't even be having scripting thrown at it! In handshakes alone the realtime overhead for the majority of the world who doesn't have "magic perfect ultra-fiber broadband" comes to anywhere from 5 to 25 seconds just for the code. That's first-load, but the checks and/or sheer volume of it blowing out many browsers cache limits (the reason all that playing with cache-control headers placebo BS doesn't actually work for people who visit more than two websites a day no matter what Google says) still means "hey has this been updated" requests are gonna hurt. So not only would such optimization of the code by kicking bootstrap to the curb and reigning in (if not just killing off) react result in faster subsequent visits, it would also speed up initial pageloads. Of course, you're knee deep in it, so simply getting a stick to -- as I often joke -- "scrape off the bootcrap" is gonna hurt, since we're basically talking a complete rewrite to deal with bad choices in frameworks. But then you know me, IMHO there is no such thing as a good front-end framework for web development. They make you write two to five times the code needed, deploy five to twenty times the code needed, spread stuff out over dozens of separate files when there's no reason to have more than 3 to 5 of them (not counting social plugins, but even those can be bamboozled into behaving). Throwing some fancy "service" and more code at it isn't the answer. Thanks to the choices of technologies you've got a 5+ megabyte homepage spanning 80+ files before lazy-loading even kicks in -- where more than half of that could be pitched in the can -- and you're worried about screwing around with wasting bandwidth on precaching after the fact, playing games figuring out what the user's connection speed is, and figuring out what links are in the viewport? Sorry, but like a lot of things Google is doing lately, waste of time, waste of bandwidth, waste of code to correct for poor architectural choices. Again, exactly the type of failings I go into banks, healthcare, public utilities, and government agencies to send to the nether realms like the reaper leading the horsemen of the apocalypse.](https://hashnode.com/posts/making-subsequent-page-loads-faster-at-hashnode/5c17a248290e874261d54d8a/comment/5c1880dfc2dc419a62d24f1f)

Comment · Article · Dec 18, 2018 · [Making subsequent page loads faster 🚀 at Hashnode](https://hashnode.com/posts/making-subsequent-page-loads-faster-at-hashnode/5c17a248290e874261d54d8a)

[This isn't so much an open source issue as one of blind trust. People blindly trust packages and libraries without even bothering to look at the source code for them, often for things they are unqualified to improve, maintain, or to even do on their own without the library, framework, or whatever other crutches they are using. When's the last time you included something from NPM and actually looked at the source code? Ever reject something because what NPM sent you was already minified or obscured, something that should only ever be done on your deployment? How often have you used a library to do something you are unqualified to even do directly? How often have you assumed the approach some lib or framework is doing is the best or even only way? How often have you verified the claims of a library in terms of its alleged quality with a code audit? Have you ever bothered to check that the code sent to you is the same as the one presented by the author on places like Github? (big warning flag if there's a mismatch!) There are people who make claims they investigate the code they use, and I really have to call bullcookies on that. It's just another lame excuse to not put in the "Work" when long term it almost always ends up costing more in time, effort, and money. It's another of these cases of false simplicity where the "credit mentality" of "now, now, now" results in bloated expensive codebases that screws over everyone from the developers, to the product/site/program owners, to the end user. The entire attitude of "pay more later for something we can't afford now" is rampant across the entire industry, and is a piss poor approach to running any business. As Henry Kissinger joked 40 years ago, "America has gone from a nation of savers to a nation of debtors". As I said in my own recent post on the topic: https://hashnode.com/post/npm-and-blindly-including-librariesframeworks-same-mentality-and-risks-as-client-side-javaflashactivex-cjp1v3t5b00qusjs115u4xst9 It's the same broken mentality of blind trust that gave us the problems of running client-side code with too many privileges like Java, Flash, and ActiveX -- often in many cases to bypass protections being built into the browser for being things you should NEVER have been allowed access to in the first place... such as the lovely ability to quite often extract people's passwords from their clipboard. You also -- as I said there -- we keep hearing people bragging about how this stuff "lowers the bar of entry for beginners" -- sometimes that bar is there for a reason. At least in terms of business coding we need a "you need to be this tall to ride" bar so we don't end up asked to "squeal like a pig" by ignorance and bad practices like a second rate Ned Beatty on a trip down the Cahulawassee river. Unfortunately when it comes to ignorance and bad practices, so many of these "frameworks", "libraries", "includes", "modules", whatever name is hot and trendy for them this week, reek of them so bad, it often seems the people making them are not in fact qualified to write a single line of whatever the underlying language is. Mind you it's nowhere near as bad on the back-end as it is on the front-end where such blindly included libraries rooted in ignorance -- such as bootstrap, jQuery, angular, react, vue, etc -- are the antithesis of good practices or competent process... but it's still there nonetheless. Just look at the "function that broke the Internet" -- it wasn't even very well written; but endless people blindly included it and look at the havoc it wrought when its creator got into a spat with NPM and removed it. What if people had simply copied into their own code instead of blindly including it from a 'repository'? How often does that blindly including not make allowances for sticking with the version that works for you, and instead just 'grabs the latest'? Whist sure there are mechanisms in place for when new versions change functionality in a breaking manner, how many people actually USE them? Sight few from what I've dealt with in cleaning up other people's messes. Again, lessons many learned early on in client side are being ignored or forgotten both client and server-side. Don't blindly trust other people's codebases, don't create dependency hell, don't assume future versions will be compatible with what you've written forever, don't go to a library or framework for anything you cannot implement yourself without them. But no, the "I want it now" screaming like a petulant five-year-old rules the industry, and nobody should be surprised when taking the sleazy shortcuts, failing to put in the work, mated to unrealtistic expectations and insanely short timelines whips around and starts biting people. There's a reason it's called "Work" and not "Happy Happy Fun Time". As is oft attributed to Patton: A pint of sweat will save a gallon of blood. Every time you take one of these alleged shortcuts, you're rolling the dice. That's not development, that's gambling. More so when the effort to verify if what you're blindy including is any good is often more than just writing it from scratch. Aka "the ultimate heresy". How dare anyone suggest writing something new specific to your task from scratch, when an off the shelf answer for a completely different question can have ten times the work and effort thrown at it to get a half-assed result that almost gets the job done.](https://hashnode.com/forums/thread/is-our-current-open-source-model-broken/comment/5c15821b5f70e4373e09fb80)

Comment · Thread · Dec 15, 2018 · [Is our current Open Source model broken?](https://hashnode.com/forums/thread/is-our-current-open-source-model-broken)

[I generally don't have the time to screw around with some custom shell; they rarely offer me anything whatever the OS default is, and often using them gets in the way when you need help from someone who doesn't use the fancy newer "replacements"... which is most everybody. Especially in terms of using Windows which I consider foolhardy to even try to use as a server OS, and which I rarely if ever need the command line for as a desktop OS.](https://hashnode.com/forums/thread/fish-or-zsh-which-shell-cli-do-you-prefer-with-reasons/comment/5c1577285f70e4373e09fb78)

Comment · Thread · Dec 15, 2018 · [FISH or ZSH: Which Shell CLI do you prefer (with reasons)?](https://hashnode.com/forums/thread/fish-or-zsh-which-shell-cli-do-you-prefer-with-reasons)
