And this is why I've never been a fan of using package managers by default literally everywhere.
The less you look under the hood, the less you know how well-designed your motor really is...
Especially for small projects, manually managing your dependencies does have its perks, in the sense that you get a much better sense of how much bloat you're adding with each depencency!
You'd just manually drag-and-drop a folder with a dependency into your node_modules folder.
Or you create your own new one there.
You're not supposed to, because that's where npm puts the dependencies it gets for you at install time and the content of node_modules isn't supposed to maintained in any repo...
But it totally works fine.
And you can totally have your repo maintain node_modules if you want to.
But yeah, we've grown so accustomed to using package managers anywhere that there's really no authorized way to do it manually in node... not AFAIK... but it totally works fine if you do things this way...
Hmmm… I see your point, but I’d be curious to get some data (which I assume no one has) on the ROI aspect of this.
I agree with what you’re saying generally, but we don’t code in a vacuum. We code in the context of brutal cold capitalism. Meaning “it works” code is often just as good as “really good code” in the sense that it makes the same amount of money.
This approach to me seems very time consuming and prone to issues, especially on boarding new engineers. Especially in the context or building yet another B2B sass product that’s basically just excell for a niche industry on the web lol.
Imo the only time this would make sense, from a business perspective, would be if what you’re writing is very critical and must be stable at all costs (finance, healthcare, anything where someone could die or lose their livelihood if the app fucks up).
I don’t want to come off like I’m saying it’s a bad idea. It’s not and I get your argument. I’m just not convinced it’s worth the time and money
I actually already do this kind of. I have a project that consumes a library, and when developing locally I sometimes have to build the library and then reinstall it in the main project. I used to build then npm install the built lib, but that took too long. So after building it, I would just copy it into my node modules dir and it was much faster haha
I agree with what you’re saying generally, but we don’t code in a vacuum. We code in the context of brutal cold capitalism. Meaning “it works” code is often just as good as “really good code” in the sense that it makes the same amount of money.
Short term : yes. Long term : no.
The less you invest in the quality of your code, the more technical debt you accumulate. The more technical debt you accumulate, the more expensive your maintenance will become.
The longer your software needs to run, the more important it is to optimize the quality of your code ASAP, to keep technical debt at least at manageable levels...
This approach to me seems very time consuming and prone to issues, especially on boarding new engineers.
I remember the days when almost every PHP project out there that had any notoriety whatsoever was PSR-0-compatible. Back in those days, you could just manually copy-paste any PHP project into your project to be optionally used by any of your code with a single import.
If your project uses a few dozen dependencies at most and the code of your dependencies is stable enough they don't require to be updated all the time, this is IMO still by far the easiest approach.
PHP also took the package manager approach with Composer, though, and they messed it all up with PSR-4, which broke backwards compatibility with PSR-0 and made it a lot more difficult to create projects without package manager because PSR-4 favored configuration over convention.
Totally agree with you ideologically. In practice I have yet to see a successful company that has “good” code. I think it’s pretty clear that “good enough” Is more important from a business sense than “good code”.
All your points are valid, but don’t matter if you’re already the lead in the market. Meaning in a new space the one that can grow the quickest (the one putting out it just works code), will likely out compete the others. Changing platforms is a pain, and users are all too susceptible to the sink cost fallacy.
I’ve seen it so many times I’ve lost count. A popular company, been around a while, leaders in their space, code is shit but it works.
Again, I’m not saying that’s how I would want to do things. I think it sucks and makes our lives annoying, but my opinion doesn’t change the reality of the industry
In practice I have yet to see a successful company that has “good” code. I think it’s pretty clear that “good enough” Is more important from a business sense than “good code”.
In practice, pretty much every company out there uses some form of Agile development these days. And, in my experience, Agile is great for prototyping because it allows for fast iteration of new features, but it's horrible for maintaining and updating an existing platform, because with every Agile project I've done this comes at a cost of a massive amount of technical debt.
I used to be employed in maintenance and development of LuciadRIA, a massive frontend JavaScript framework used for geospatial visualization. Originally, about a decade ago, LuciadRIA started out as a 2D-only partial port of the Java library LuciadLightspeed, built around the Dojo Toolkit. Gradually, it was converted into a fully standalone library with a WebGL component, supporting both 2D and 3D, developed partially in JavaScript and partially in C++ that was compiled to JavaScript with Emscripten. Now, can you imagine the technical debt you get with a project this old, this complex and this large?
Because technical debt is one of my pet peeves, one of the first things I pretty much decided to do on my own when I joined the company was stripping any remaining dependencies on Dojo, manually harmonizing the module format across the entire codebase and various similar improvements. The only reason I was allowed to do this, was because I had the freedom to experiment with technical debt cleanup rather than being put on projects where new features were developed due to still being pretty new in the company.
I did the harmonizing mostly because it makes code a lot more readable when every module is written the same way. And fewer dependencies means better optimizability. These changes also had an impact on other things, though. When I left the company, they were about to convert the entire library from AMD modules to ES6 modules. Just having a single AMD module format and no more Dojo depencency made AMD module conversion to ES6 module conversion a hell of a lot easier.
This harmonizing process I did still was a pretty massive enterprise, though, considering the number of modules involved, but precisely because there was no consistency in module definition and various other inconsistencies I fixed, the lack of consistency kept getting worse with every development cycle...
I’ve seen it so many times I’ve lost count. A popular company, been around a while, leaders in their space, code is shit but it works.
This is one of the reasons I'm considering leaving the industry as an employee and either create a business around a yet to develop software platform of my own or do something completely different!
In my experience, even in high tech companies where management actually contains civil engineers & other folks with a strong technical background, all too often the piling up of technical debt is ignored in favor of producing new features faster and business problems are consistently prioritized over technical problems. While I do understand where it's coming from, I find it very frustrating to work in an environment where technical problems are consistently ignored in favor of business problems, even though those technical problems continue producing more and more busness problems and other technical problems in the long run!
Even most very smart people seem to have become incapable of thinking long term these days...
Ideologically I’m on your side. I would love to be able to write good code, after good planning, in a fair time frame. But that’s just not the reality of the industry.
I’ve thought about doing my own thing as well, but the game Is played the way I described for a reason… that’s how everyone else plays. And if business bros are rihjt about anything, it’s that first to market, first with a new feature, etc gets the $$$. And that’s without getting into the whole exploitation aspect of having employees.
I have begun considering starting a coop or a worker owned enterprise with some people. But that would only resolve the exploitation aspect. To compete in the market, it’s likely we would make a lot of those same compromises.
It’s not like business people are stupid, it’s mot that they don’t understand when you tell them tech debt is bad.
I also don’t think it’s a lack of being able to think long term. Like I said now, they’re mot stupid. But the way our market works is well this way. Not to mention that the goal of the industry has changed dramatically. People used to want to build their own thing and grow it into an empire. Now tech has been monopolized by a few players, and the goal for most companies is to get bought by one of those players.
Or for example how VC firms operate. They buy a bunch of companies, hope one of them gets big, if not they polish the turd and try to flip it to another firm.ñ (6year ownership average i believe).
The fact is the game has become all about appearances and inflating your perceived worth; not about building good products or services.
The profit motive has corrupted and ruined tech. It’s no longer some geeks trying to build cool shit. It’s business people trying to squeeze the most money out of us as possible.
Thank you capitalism! I joke, i fucking hate capitalism
I would love to be able to write good code, after good planning, in a fair time frame. But that’s just not the reality of the industry.
And, as I said, that's one of several reasons I'm considering leaving the industry altogether;
I love programming as a hobby, but I've come to hate it when doing it professionally as an employee. Sure, the pay is decent, but somehow the way software projects are run I still feel more like a the high tech equivalent of a slave, just with manual labor replaced with intellectual labor. And, at least for me, that sucks the fun out of it entirely!
I’ve thought about doing my own thing as well, but the game Is played the way I described for a reason… that’s how everyone else plays.
Just because something is more popular doesn't mean it is better.
To compete in the market, it’s likely we would make a lot of those same compromises.
You will probably have to make at least some compromises. But giving tech people more control of tech decisions would be a good start. Making technical debt a priority would be a good start. As would be dropping Agile methods like Scrum.
The reason Agile is called Agile is it's supposed to provided agility, but it's become the very opposite. Real life Agile has become nothing more than just one of several methods business people use to try to control tech people and to force them to prioritize poorly!
Be lower-a agile, not capital-a Agile, I say!
It’s not like business people are stupid, it’s mot that they don’t understand when you tell them tech debt is bad.
Business people pretty much ALWAYS underestimate the impact of technical debt. They don't understand how piling technical debt on technical debt reduces the budget available for everything else with every iteration, which is why it's almost always ignored.
They always push technical debt issues forward as something that can be fixed later because it has no business impact, but it does. A steady but gradual reduction of the budget remaining for everything but technical debt with every iteration is a pretty critical business impact if you ask me, unless your platform is the kind of platform that requires little to no maintenance and rarely gets new features!
The fact is the game has become all about appearances and inflating your perceived worth; not about building good products or services.
True.
But the worse this gets, the greater the chances are for competitors that actually do do things right. End customers in particular still tend to prefer products with the best value for money!
The profit motive has corrupted and ruined tech.
There's nothing wrong with profit per se. But when short term profit becomes the key priority, things can get messed up pretty fast!
The profit motive has corrupted and ruined tech. It’s no longer some geeks trying to build cool shit. It’s business people trying to squeeze the most money out of us as possible.
The only way to change this, is for geeks to say "no more" and do better with their own businesses by creating better products at lower cost!
4
u/johnslegers Jun 28 '21 edited Jun 28 '21
Those are loooooots of packages!
And this is why I've never been a fan of using package managers by default literally everywhere.
The less you look under the hood, the less you know how well-designed your motor really is...
Especially for small projects, manually managing your dependencies does have its perks, in the sense that you get a much better sense of how much bloat you're adding with each depencency!