#Chaos is a hell of a modular beast
Explore tagged Tumblr posts
Text
So I'm brushing up on my web dev lately. Learning how to use ES6 modules and stuff.
I was having trouble deciding on an effective organization scheme to keep all my modules in a row, so naturally I took to the internet to see if there were any common project structures folks use that I could try out. Either I'm bad at internet searches or there is shockingly little on the subject of file organization in javascript. I suspect a bit of both, because search engines keep getting worse, and because javascript is an old, haphazardly-constructed homunculus that offers approximately zero suggestions on what the hell to do with it. Unless you feel like learning one of the several heavy duty popular JS frameworks, which are complete overkill for my dinky little practice project anyway, so no thank you, I just want a leash for this beast.
Metaphor got away from me a bit. Anyway.
I clicked on one link to an article which promised a convenient way to organize one's javascript in a modular fashion. After all the time fruitlessly searching on github and duckduckgo, I was weary and desperately hopeful for something that actually seemed useful.
Friends, it was not helpful in the fucking slightest.
-----
The article title, which had thus far been partially cut off by the search engine and read "Advanced Code Organization Patterns", now revealed its subtitle in full:
"The Case For One File Per Function"
...Excusez moi?
A single function gets its own file? Every single file, One singular function?
I started to breathe a sigh of relief as I saw the writer start to explain the article title is a bit of a joke, right in paragraph 1. The sigh quickly turned into a disbelieving wheeze as they revealed that no, it's just the "advanced" part that's the joke. Their file organization scheme is actually QUITE simple.
The example they give is a small math module. Rather than, say, have a "math.js" file with functions for "add", "subtract", etc within it, the article writer insists that you should make a "math" FOLDER and have files "math/add.js", "math/subtract.js", and so on.
Now see... part of web dev is trying very hard to make page load times fast. We minify and compress our files to hell, for one thing, to minimize how many bytes of code your browser has to download and execute. And we also, generally, try to minimize the number of HTTP requests a page sends out, because HTTP requests take time.
I am, at this point, imagining a large web app trying to implement this absolutely bonkers organizational scheme. A handful of files for different purposes quickly becomes several dozen, even a hundred. Chaos reigns. Your browser fires off seven billion requests just to load the goddamn javascript for one page.
The author brings up several bullet points in favour of this madness, and at no point am I certain whether they're having a laugh or are actually serious.
--
Point 1: When you're unit testing functions, its so much easier to see what functions you're importing at a glance if there's just one function per file!
Counterpoint:
import { add } from "./utils/math.js"
You can't fool me, writer, I saw the article date. This was written last year. ES6 modules, destructured imports and all, are fully supported and have been for ages. What the hell are you talking about.
--
Point 2: It's easier to see when individual functions where changed in the commit history! Easier to make sure they all work!
...Ok, I do have to cede a bit of ground there. The commits WOULD be buttery smooth and easy to understand that way.
But you know what wouldn't be nice and easy? My screen real estate. My amount of time spent coding. If I have a module with like ten tightly related functions and I need to be working on them all at the same time, my IDE physically cannot fit all those tabs onto the screen comfortably. I can't have docs or other references on one side and code on the other anymore because of endless IDE tabs. I keep having to click different tabs to look at different functions instead of just... scrolling a bit or using Ctrl+F. Everything needs a zillion import statements. I am hypothetically exhausted and joyless.
You haven't made the dev process easier, you just moved the frustration from one place to another! And gave it a megaphone!
--
Point 3: It's SO much easier to figure out your codebase's organization scheme from the import statements alone! You can always tell exactly where each function is!
I REITERATE:
import { add } from "./utils/math.js"
Buddy. Pal. Why do you want to spend 50 http requests and 50x more characters in import statements loading your utility functions one by one so badly. There is no difference in import clarity.
--
It has been only a scant few paragraphs and already my eyebrows are helping each other into their space suits so they can safely shoot off my forehead and into the stratosphere.
But there is one small glimmer of hope that I will be able to convince them to stay with me: a heading which reads "Drawbacks". Surely this is where the author acknowledges how fucking bonkers this is. Surely this is where they bring up some of my same counterpoints, or even ones I haven't thought of. Hell, when I scroll a little I even start to see an example code block with a destructured import statement!
The glimmer fades. They are only doing this to show off that, well, your code linter will probably format a destructured import as multiple lines, and if it does, doing four imports from this hypothetical math module is A WHOLE LINE SHORTER than a multi-line destructured import for those same four functions!! ...Yeah, one line shorter and like 10x more characters, with little hope of minification helping you. Instead of blasting off, my eyebrows have now scrunched up as far down on my face as possible, as though trying to mine for reason. Lines aren't the POINT in javascript, its CHARACTERS. And you can just... configure your linter to not make it a multi-line import if you care about lines. What are you TALKING about.
And the crowning jewel. The grand finale to this steaming pile of batshit advice iced with a thick layer of arrogant phrasing and condescension.
This guy closes out the article saying that if you are doing OOP, and you find you are writing too many private methods in a class, it is a sign you should break some of that logic into another class to improve maintainability. And naturally, that means you break it out into more files and more import statements, for all the benefits his extra simple super obvious file org structure brings.
Break the private code from one class out into another class that anyone can just go and import.
Either you're referring to the concept of inheritance in the most inscrutable way possible, or encapsulation means nothing to you. If something is private that means no one else accesses it as a rule, I just. I don't know what the hell is happening anymore. But damn, bud, you sure did say it confidently.
--
To be clear, I am not actually mad about this. And if this organization scheme works for the person who wrote that article, great! I'm happy for them, genuinely.
I just also hope I never come within 50 feet of a code base like that because I cannot begin to describe what a nightmare to my workflow that shit would be.
Fuckin. One less line after a poorly configured linter run and twelve trillion files. Get outta here.
At least it confused me so much it buffer overflow'd my confusion and made me decide on a directory structure, finally.
Finding some real unhinged coding advice tonight
#kind of a rant but not really#i'm not actually mad#this advice is just the total opposite of everything i do and i felt compelled to point and go WHAT and write weird metaphors about it#person saw ''smaller files is good because it reduces cognitive load'' and took it so far to the extreme it became actively unhelpful#man i hope this person uses some kind of bundling process to package their shit into a more reasonable number of files before deploying
5 notes
·
View notes
Text
My 20 Favorite Records Of 2018
Hi. I made a list of my favorite records of the year again. People seem to enjoy these things, and I definitely enjoy tearing my hair out trying to figure out what I liked best, so here we are again.
This years list is chock full of heavy/sludgy bummer jams, post-rock epics, and super aggressive metal and hardcore, with a few poppier and more adventurous indie records scattered about. The honorable mentions list gets a bit more eclectic if you’re looking for stuff that sounds a little less like it was birthed from the loins of the late-90s/early-00s Hydrahead and Relapse discography.
As always, I welcome your suggestions for records and podcasts I might’ve missed the boat on, no matter the genre. There’s way too much good stuff out there to keep up with, so help me out.
Also: When my aging corpse is not being pissy about being used for something other than child-wrangling, eating, or sleeping, I try to run a few days a week and will listen to/briefly review a record on each run. Almost every record on this list has been a part of one of those posts, so if you’re interested in such a thing, please check out my Instagram.
BONUS: I put together playlists of my favorite song from each of my top 20 records, so if you’re overwhelmed and don’t know where to start, just throw it on and see if anything grabs you.
Hermitology’s Favorite 20 Records of 2018 - Spotify Playlist
Hermitology’s Favorite 20 Records of 2018 - Apple Music Playlist
20) Slugdge - Esoteric Malacology
This record is ridiculous in the best ways possible -- insane amounts of shredding, light-speed double bass and blast beats, and lyrics about slugs and other assorted beasts. It’s been ages since I went through my Swedish & Norwegian Metal phase, but this awakened those long-dormant receptors that used to hum when I listened to At The Gates, Opeth, Dimmu Borgir, Soilwork, et al.
Listen here.
19) Ingrina - Etter Lys
Excellent French doomgaze/post-rock that sounds like it could very easily be the soundtrack to the apocalypse. Etter Lys has a familiar sound/vibe, but a refreshing energy and captivating sense of dark melody that really makes them stand out to me. Highly recommended for fans of This Will Destroy You, Rosetta, God Is An Astronaut, et al.
Listen here.
18) Beach House - 7
This record was the perfect foil to all heavy stuff I listened to this year, and my go-to in-flight record of 2018. It’s a damn near perfect collection hazy, airy, dreamy, downtempo indie pop. I’d never been a huge Beach House fan, but 7 hooked me and pulled me in. Throw this your headphones on, press play, and melt into your chair or couch.
Listen here.
17) Culture Abuse - Bay Dream
This record was not what I was expecting, but it ended up being exactly what I needed. (If that makes any sense.) Instead of a grimy, high-energy punk record, I got a fuzzy, bouncy, catchy-as-hell soundtrack to my entire summer. A perfect blend of The Ramones and peak-Weezer, with a vibe all its own.
Listen here.
16) Deads - LLNN
Roughly forty minutes of insanely heavy and furious drop-tuned, down-tempo, doom-inspired crushers offset by eerie, cinematic synth parts. If you’re a fan of early-Cult of Luna and/or Isis, this record should be a new staple in your diet. There’s also enough atmosphere here to appeal to post-rock fans who might desire a little aggression boost.
Listen here.
15) Heads. - Collider
Beautifully written sludgy rock that falls somewhere between the heaviness and spookiness of Young Widows and the heroin-soaked atmosphere and melody of Failure. For what it’s worth, I dig Collider more than either of the aforementioned bands’ most recent output. It’s a perfect marriage of influences, killer songwriting, an excellent recording, and a flat out fantastic record from front to back.
Listen here.
14) mewithoutYou - [untitled]
I’ve been a mewithoutYou fan for ages and love everything they’ve done (so I’m a little biased), but this record is just on a completely different level as far as I’m concerned. It’s the peak of their creativity, songwriting, mood, dynamics, lyrics, production, etc. It’s got the atmosphere and moodiness of post-rock, the angular quirkiness of Fugazi, the energy of Refused (at times), and the all the character of a classic mwY record. It’s phenomenal, and doubly impressive because they made it 18 years deep into an already impressive career.
Listen here.
13) Foxing - Nearer My God
I was familiar with Foxing before this record came out because they’d toured with many former tourmates, and while I appreciated what I’d heard from them, they never really clicked with me. And then I heard this record and it totally floored me. It’s incredibly ambitious without coming across as super scatterbrained or pretentious and it’s executed flawlessly (production included). This band should be massive, and I’m stunned that I’m not seeing this record on more year-end lists
Listen here.
12) This Will Destroy You - New Others Part 1 & 2
Somehow TDWY managed drop two incredible full lengths a month apart, and I honestly cannot choose between the two (so I’m combining them into one). These LPs are arguably their best work as a band, the addition of Robi Gonzalez on drums has given their sound new energy, dynamics, and pocket, and there aren’t many bands in post-rock doing it as well as these dudes do. Incredibly impressive to be able to put out this much music all at once and have it be this consistent.
Listen here.
11) The Armed - Only Love
Somehow this record manages to be chaotic, energetic, beautiful, delicate, catchy-as-hell, abrasive, and atmospheric all at once. Sometimes it sounds like you accidentally have five different songs playing at the same time. Somehow modular synth-soaked punk/metal works. Clearly I cannot explain exactly what in the everliving hell is happening here, but I can tell you that it’s a wholly arresting record that blew my mind on first listen, and has gotten better with every listen since.
Listen here.
10) Hemwick - Junkie (EP)
Normally, I wouldn’t include an EP on this list, but this is one just too good to ignore. It’s 30 minutes of insane riffage and heaviness that sounds like it spawned from the same gene pool that produced Converge, Cult Leader, and Intronaut. It’s got the spazziness and brutality of the former, blended perfectly with the occasional post-rock/metal shift into the epic melody of the latter. Super excited to hear what comes next for these guys (hopefully an LP recorded with Scott Evans or Kurt Ballou?), because this is an incredibly promising “debut”.
Listen here.
9) Architects - Holy Hell
As a standalone record, Holy Hell slays. As a follow-up to losing a family/band member to cancer (guitarist, Tom Searle), it’s a fucking triumph. Somehow Architects managed to push through the grief and heartache, and pushed the boundaries of their musical creativity and emotive lyrics to create what is arguably their best record. Holy Hell is packed to the gills with with massive, arena-sized riffs and moshworthy breakdowns, sprinkled with just enough melody and dynamic to keep things fresh without losing its edge. An amazing accomplishment in the face of such adversity.
Listen here.
8) Slow Mass - On Watch
An outstanding fusion of mellow(er) post-hardcore, bummer jams, Unwound-inspired post-punk, and shimmery shoegazey goodness. “Suburban Yellow” (see playlist) is one of my favorite songs of the year, falling somewhere between the crushing gloominess of a Kowloon Walled City song, and the somber plod of a classic Pedro The Lion track. I tend to shy away from music with dual lead vocals (because I often prefer one of the voices to the point that I’d rather just hear it all the time), but Dave Collis and Mercedes Webb’s voices are so complimentary and perfectly balanced that they take these songs to another level. Bonus: I’d highly recommend watching their frigid Audiotree session.
Listen here.
7) Hot Snakes - Jericho Sirens
One of my favorite bands of all-time put out its first record in 14 years, and it was well worth the wait. It’s Hot Snakes doing what they do best -- ripping 30 minutes of high-energy post-punk jams fueled by the brilliantly weird guitar wizardry of John Reis, and propelled by the dual drummer attack of Mario Rubalcaba and Jason Kourkounis. I’m not entirely sure where I’d rank it in their discography, but having fresh Hot Snakes tracks makes the world a better place.
Listen here.
6) Cloud Nothings - Last Building Burning
What did we do to deserve two Cloud Nothings LPs in two years? I was a little worried about whether the band could churn out a record as fantastic as Life Without Sound (which landed at #7 on last year’s list), but they absolutely did. Last Building Burning builds on the catchiness and energy of LWS’s bummer jams, but adds a little extra grit, fury, and urgency. The result is a record that’s damn near peak Cloud Nothings. It’s got hooks for days, an energy that’ll make you want to bounce off the walls, and a nasty edge that brings to mind 80′s Wipers or early Hot Snakes jams.
Listen here.
5) Cult Leader - A Patient Man
Cult Leader’s Lightless Walk was a Top 5 record for me in 2015, Gaza’s No Absolutes In Human Suffering was in my Top 5 in 2012, so it should be no surprise that they’ve cracked the Top 5 again. I’d be hard pressed to name another HEAVY band who has done it for me the way these guys have over the past six years. A Patient Man hits all the notes -- pure chaos, expansive and melancholic post-rock sections, and the most headbang-worthy breakdowns on the planet. It’d take a miracle to get this 43-year-old geriatric with a bad back to come out of mosh retirement, but the breakdown in “Aurum Reclusa” is seriously making me think about a comeback.
Listen here.
4) Low - Double Negative
I don’t think I’ve had a record screw with my brain as hard as Double Negative did since I heard Kid A for the first time. It’s a spooky, brain-liquifying journey through sonic textures and ambience, arranged and mixed in a manner that is absolutely enthralling (and a bit unnerving and “wtf are my headphones broken?”at times). If you’re gearing up for a first listen, I’d highly recommend clearing an hour on your schedule, throwing on a good pair of headphones, and letting this have its way with you. If you’ve already heard it, you should listen to it again. It gets better and weirder and more captivating every time. It’s a trip, and a great one at that.
Listen here.
3) Daughters - You Won’t Get What You Want
As a standalone record, this is groundbreaking. As a “comeback record” it’s a fucking triumph. Their S/T record (2010) is one of my favorite heavy/noise rock records of all-time, and somehow YWGWYW surpassed my lofty expectations for a follow-up. It’s a dizzying journey for sure. It’s moody as hell. It’s coherent. It’s adventurous without being overly weird. And it’s all of the best things about their previous work distilled into a perfect chunk of musical madness. The best records are the ones that make your brain matter spill out of your ears upon first listen, but it’s the all-time classics that do that and get better with every subsequent listen. Sure, it’s a record for “when the mood is right”, but when I’m in the mood, this hits all the notes for me. It’s a masterpiece.
Listen here.
2) Holy Fawn - Death Spells
This record came out of nowhere and absolutely knocked me on my ass. I’m not sure I’ve had a record do that to me since I first heard Cloudkicker in 2009 -- knew nothing of it, had zero idea what to expect and literally had goosebumps for a majority of my first listen. Tempe’s Holy Fawn have created a unique blend of dense, dynamic, and cathartic post-rock, doom, and shoegaze with airy vocals that remind me a bit of Jonsi from Sigur Ros. It’ll be a daunting task to follow up this masterpiece, but I’m incredibly excited to see and hear what the future holds for these guys.
Listen here.
1) Pianos Become The Teeth - Wait For Love
This was one of my most anticipated records of the year, and it not only lived up to my lofty expectations, but exceeded them. “Bitter Red” was far and away my most played song of the year, and I must’ve listened to Wait For Love 50 times during the month of February alone. It’s no surprise that I found myself going back to it throughout the year, and in revisiting for this list, it gave me chills just like it did 10 months ago. These dudes are doing melancholic and cathartic post-hardcore better than just about anyone these days, and I cannot wait to hear what’s next for them.
Listen here.
HONORABLE MENTIONS
Roughly 80% of these records could/should have very easily landed on the Top 20 list (and probably would if I obsessed over this list any further and gave everything a super dedicated re-listen). They’re all absolutely worth checking out.
I know this list might be a little daunting, so I put together a Spotify Playlist of my favorite songs from each record, so you can just throw it on and see if anything grabs you.
Thanks to my man Zack Hite for helping me out and putting together an Apple Music version of the playlist.
Hermitology’s 2018 Honorable Mentions Spotify Playlist
Hermitology’s 2018 Honorable Mentions Apple Music Playlist
Baptists - Beacon of Faith
Birds In Row - We Already Lost The World
Boygenius - S/T EP
Candy - Good to Feel
Coastlands - The Further Still
Conjurer - Mire
Death Engine - Place Noire
Drug Church - Cheer
Emma Ruth Rundle - Dark Horses
Failure - In the Future Your Body Will Be ...
Fiddlehead - Springtime and Blind
Hammock - Universalis
IDLES - Joy As An Act Of Resistance
Jay Jayle - No Trail & Other Unholy Paths
Jesus Piece - Only Self
KEN Mode - Loved
Man Mountain - Infinity Mirror
Mogwai - KIN
Nate Smith - Pocket Change
OHHMS - Exist
Ólafur Aarnalds - re:member
Polyphia - New Levels, New Devils
Portrayal of Guilt - Let Pain Be Your Guide
Prefuse 73 - Sacrifices
Rolo Tomassi - Time Will Die …
Sectioned - Annihilated
Slow Crush - Aurora
Snail Mail - Lush
SUMAC - Love In Shadow
Svalbard - It’s Hard To Have Hope
Taken - With Regards To (EP)
The Story So Far - Proper Dose
Tides of Man - Every Nothing
Vein - Errorzone
Yashira - Shrine
PODCAST QUEUE
The Deadcast (humor, sports, politics)
Chapo Trap House (politics, humor)
Hang Up & Listen (sports, culture, nerdy)
Effectively Wild (baseball)
The Frotcast (movies, humor)
The Trap Set (drums, psychology)
The Gist (current events, politics)
Song Exploder (songwriting, production)
The Modern Drummer Podcast (drums)
17 notes
·
View notes