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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: What tricks have made you a better programmer?

9 点作者 newsoul超过 2 年前
For me it was:<p>1. Writing out input output relations for a function with quite a few examples before actually starting to write the function. Basically writing tests. It makes you realise what the function is actually supposed to do. I learnt this from How to Design Programs (htdp) book. It was a game changer.<p>2. Working on Fermi Problems aka Street Fighting Mathematics. I learnt from the books of Sanjoy Mahajan. They made me much better at estimating how the output to some input may be like.<p>What about you?

7 条评论

ArcMex超过 2 年前
Before I knew that there was an actual term for it[0], I would get a blank piece of paper, pretend I was an esteemed professor teaching whatever it was I was trying to accomplish. I would &quot;ask my students&quot; questions and &quot;hear their answers&quot;. Then I would &quot;guide them to the correct path&quot;.<p>0 - <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Rubber_duck_debugging" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Rubber_duck_debugging</a>
评论 #34842349 未加载
favourable超过 2 年前
Code really badly, and feel no shame in that. Then after the sloppy code has been understood, you can start to iterate on it and polish it, making your code seem professional, but you know you started the project as a total noob.
评论 #34842331 未加载
rudasn超过 2 年前
Read the error message. In full. Google unknown terms, relevant phrases from the message. Don&#x27;t fix the bug unless its cause is understood.
评论 #34848786 未加载
greenyouse超过 2 年前
- getting used to designing abstractions before coding<p>- laying out how I&#x27;m going to program before starting<p>- using TDD for most bug fixes and refactoring efforts<p>- learning how to steal the best parts of code from other people<p>- code reading everyday via PRs (my mental VM is pretty close to a real VM)<p>- learning algorithms and data structures (at least the basics, I&#x27;m no competitive programming pro)<p>- learning how to do code archaeology with git blame
mattbgates超过 2 年前
Writing code constantly and with each new product, how do I get it out faster and in less pages? This has made me a better programmer. I aim to try and get projects done from 1 weekend to 1 month and not take too much longer than that.
kbrannigan超过 2 年前
Thinking at the function level. Instead of thinking: view, controller, Service , database .<p>I write a function that does what I’m trying to accomplish, like image upload.<p>It’s a small part that can be reused in some bigger system.<p>Then make it work with a few constraints: file size, file type.<p>I also hardcode stuff
评论 #34839461 未加载
chewz超过 2 年前
Writing programs...