TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why programmers choose convenience over performance?

15 点作者 craftoman大约 1 年前
Several tools are resource hungry, making it challenging for small businesses to keep up with server costs. Zod for example is 150 slower than regular typeof checks. I wrote small article for those who are interested https://www.drakos.me/article/Zod-is-150-times-slower. The problem is not Zod, but rather the programmers who lack the ability to write efficient code. As I write this, my VSCode uses 4.37GB RAM, my terminal Warp (Built in Rust) uses 976MB RAM and Spotify 1.28GB. These numbers are outrageous to an old senior programmer. Let’s not forget that Nasa managed to launch rockets to the moon with only 64kb of RAM.

14 条评论

proc0大约 1 年前
I think it&#x27;s caused by the nature of how most companies scale their productivity up, which is by adding more people and creating more teams. As a result the codebase for any given product starts to reflect this organizational structure.<p>For example, a bank app might have a team for user management, and another team for product management. Then in the bank app, the designers added one module for selecting products on one page, and another module for selecting users on another page... and even though at the implementation level, these two modules are essentially the sam, they are implemented separately, as there is a lot of overhead in communication to have both teams implement one that handles both requirements.<p>I think this phenomenon guarantees that as codebases grow they accumulate tech debt. As more and more people develop on one application proper global abstractions that would be more efficient are not as common because of how the teams are structured in a way that is not aligned with this abstraction and instead is aligned with how the business side decides to structure teams.<p>I think it is born from a fundamental misconception of how software should scale as you add more and more features, and typically companies favor adding more people instead of asking their engineers to do the scaling using the software itself. Within a certain domain, there is very little reason not to abstract the implementation of features themselves, which would scale the application just by adding a few lines in a configuration file. Then a single engineer can be developing multiple features in the same amount of time an entire team completes only one. This might just be a blind side of someone who has not studied computer science theory, and instead thinks that if you want more software you need more people.
评论 #40332507 未加载
jdubya859大约 1 年前
Do the tools save developers time? Do the tools make deployment or code more maintainable? Is the cost of resources greater than the cost of paying for developers time? They sent rockets to the moon with 64kb of ram because they had to, not because they were trying to skimp tooling.
评论 #40330805 未加载
linguae大约 1 年前
1. Convenience usually transfers to less development time, which means less cost. Unless the performance is so poor that it’s unacceptable to a majority of users, many companies are willing to ship less-performant software if it means saving on development time and cost.<p>2. There is a lot of software that is used because people <i>must</i> use them. If your workplace uses Microsoft Teams despite its problems, then you’re essentially stuck using it. The problems would have to be so bad that they affect the company’s bottom line in order to switch. If your local bank or DMV requires use to use a poorly-written Web app, what could you do about it?<p>3. Not all software developers are well-trained in topics such as algorithmic efficiency, computer and network architecture, the trade-offs of different programming languages and their abstractions, etc. There are plenty of developers who could hack up working solutions quickly but cannot write quality production-grade software. The result is buggy software that doesn’t perform well and doesn’t scale.<p>4. This is just my opinion, but I’ve found over the past few decades that most users are more forgiving about crappy software than the average technically-inclined users. Crappy software isn’t anything new. “What Grove gaveth, Gates taketh away” was a quip I first heard in the 1990s about software bloat expanding as hardware improved. I remember the days of constant blue screens on DOS-based versions of Windows, as well as Macs crashing due to the classic Mac’s lack of protected memory. Complaints about the bloat of Microsoft Office and Netscape Navigator were common. I was a teenager in the 2000s when Windows suffered from many security issues. Non-technical users generally grinned and beared personal computing, all chalking up the crashes and slowness as just part of computing. Us technical types were the ones who were upset enough to seek alternatives. But we’re vastly outnumbered.<p>As long as economic effects favor “moving fast and breaking things” over slower, more deliberate approaches to development, and as long as users don’t demand performant software, companies will continue to deliver bloated software. I don’t see this changing outside of niches where performance and other related concerns outweigh minimizing development costs.
评论 #40331989 未加载
willstepp大约 1 年前
If there was a valid reason to write software that efficiently, besides idealism, I&#x27;m sure developers would do so. But there isn&#x27;t in the vast majority of cases, so we don&#x27;t. iow computing resources are cheaper than labor.
评论 #40331399 未加载
al_borland大约 1 年前
With the resources systems have today, it is likely not worth the time and effort to optimize to the levels done in the past, though I appreciate it when it happens.<p>All I ever hear from my management is “when will it be done?” They don’t care at all about resources. It’s not even in the conversation. If there is a resource issue, the general solution isn’t to optimize the code, it’s to throw more compute at it.
mrbirddev大约 1 年前
Make it work, make it right, make it fast.<p>Don&#x27;t do the reverse
评论 #40332689 未加载
NicoJuicy大约 1 年前
&gt; Let’s not forget that Nasa managed to launch rockets to the moon with only 64kb of RAM.<p>We&#x27;re not in the rocket launching business. Desktop memory is cheap and nodejs&#x2F;electron makes it easy to develop cross platform.
评论 #40332637 未加载
评论 #40331416 未加载
devdude1337大约 1 年前
A decompressed 4k texture uses ~80-90MB of VRAM. Your development tools index millions of lines of code. Not sure what your terminal does tho. But finally it’s mostly the massive amount of data modern applications have to handle effectively that lead to large amounts of memory allocated.<p>Zod surely is slow. I never imagined it to be fast. It has multiple layers of abstraction and does lots of checks. A custom solution giving the same level of detailed type safety wouldn’t be fast either.<p>Software just got very complex. Data became larger. And sometimes you better don’t implement abstractions to reach at least some efficiency with all these petabytes of 8k cat pictures and tiktoks…
hnthrowaway0328大约 1 年前
I think once the complexity goes up to a certain point, there is no way to fix performance by throwing more programmers to the caldron.
cookiengineer大约 1 年前
Look in the mirror.<p>You are describing yourself, because you chose convenience over having to look for better alternatives.<p>And there are plenty.
评论 #40332258 未加载
datahack大约 1 年前
You mean why are programmers lazy? Oldest question in compsci my friend.<p>The answer is because it’s efficient.
j7ake大约 1 年前
Convenience saves developers time, which is the most valuable resource in a company.
selimthegrim大约 1 年前
Cue Stanford complaining about 64 H100s…
al2o3cr大约 1 年前
Everybody knows that Real Programmers™ rely on the incredible raw performance of plain Typescript, not fancy libraries &#x2F;s