TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Before you try to do something, make sure you can do nothing

252 pointsby Sindisilalmost 2 years ago

28 comments

dicrocealmost 2 years ago
When I am starting a new project I have learned to identify the unknowns.<p>&quot;I don&#x27;t know how to do X, Y and Z.&quot;<p>Before I begin working on the real solutions for X, Y &amp; Z I start by making a test program that does X. It&#x27;s ok if it requires a ton of scaffolding, or canned data... the important thing is to do X. Then I do the same for Y &amp; Z.<p>Now that I understand the problem I do a software design. I do this on paper and I purposely do it super quick and not caring about how neat it is... and I throw away designs rapidly as I iterate and improve. Eventually the paper crumbling slows down and I approach a real design.<p>This is finally the point that I can write &quot;real&quot; code. The unknowns are gone and all the software design iteration happened on paper.
评论 #36867224 未加载
评论 #36866565 未加载
评论 #36866099 未加载
sowbugalmost 2 years ago
Other good nothings:<p>Can you check in even a tiny change to the source-code repository? A new project&#x27;s first commit often triggers a slew of politics: wait, you&#x27;re building <i>what</i>? Where&#x27;s your design? Who approved this? Why are you naming it this and not that? We already built this; why are you building a second one?<p>What&#x27;s your installer story? For installable software, do you know how to produce the installer for it? Too often the installer work is left until just before launch, at which point it&#x27;s way too late. For a service, do you know how to deploy anywhere but localhost so your team can start doing internal demos?<p>Can anyone besides you build your hello world code? The release team often has their way of doing things, and it&#x27;s not what Visual Studio spits out from its new-project template. Might as well integrate early, rather than wasting time solving problems for a build system you were never going to use.
评论 #36865833 未加载
评论 #36866714 未加载
评论 #36864766 未加载
SPBSalmost 2 years ago
I feel like this is one of the things beginner programmers eventually figure out on their own without having to be told about it, otherwise they&#x27;d never be able to complete fairly basic programs but large programs which touch a lot of systems.<p>You&#x27;d have to be <i>really</i> new to write a bunch of code without ever testing it working incrementally, likely because you&#x27;ve never encountered it before. A couple of painful debugging sessions will quickly make you realize you need to test your assumptions one by one in the right order if you are to ever have a chance of making an unknown program (i.e. a program you are writing for the first time) work. <i>All</i> the stars have to align, because one wrong error will throw everything right off. Debugging is the act of visiting each possible source of error and validating it works. The best way to do this is to build the program incrementally (which again, I expect programmers to quickly realize).
评论 #36869373 未加载
DaOne256almost 2 years ago
Getting the &quot;Hello World&quot; to compile and run is often the most difficult part of a project. After that it&#x27;s only easy incremental improvements.
评论 #36863873 未加载
评论 #36864028 未加载
评论 #36864797 未加载
shireboyalmost 2 years ago
Related truisms I&#x27;ve come to:<p>* Watch the test fail first. Write a test FooMethod_Should_Do_X. Confirm it fails. If it passes, it means you&#x27;re testing the wrong thing. Once it fails, make it pass. Once it passes, make it pretty while still passing<p>* The simplest thing you can do is nothing. As a developer, your first job is to talk customers down from that feature request without annoying them too badly. &quot;What bad things happen if the app doesn&#x27;t do X?&quot;, &quot;Explain the business value of X to me. About how much time or money will this save?&quot;.<p>* This applies not just in code. In personal interactions, saying nothing or doing nothing is often better than prematurely doing the wrong thing. There is a time to say and do something, but it is usually later than we think and not on social media.
评论 #36867333 未加载
dmdalmost 2 years ago
&gt; The program hasn’t even gotten to the point where it can comprehend the possibility of executing that line of code. I mutter to myself, “How did you let it get this bad?”<p>I support a lot of scientists-who-sometimes-code, and I get this all the time. They bring me in and show me the 5000 line Python (or Matlab if I&#x27;m unlucky) script they&#x27;ve written. &quot;It doesn&#x27;t work.&quot;<p>Turns out they&#x27;ve written 5000 lines of code without having ever once tried to run a smaller piece while they were writing it. Not even once. They write the whole thing and THEN when it doesn&#x27;t run on the first try, they don&#x27;t know what to do.
sidmitraalmost 2 years ago
This also can be articulated as a sort of incremental TDD.<p>- Write the scaffolding test to call the new &quot;thing&quot;<p>- Add basic assert to check your thing was called with right input<p>- Add more logic to &quot;thing&quot;<p>- Incrementally add more asserts to check for output, side-effects etc.
评论 #36868018 未加载
评论 #36867727 未加载
satisficealmost 2 years ago
I wish people who wrote these things would give a bit more context. Seems like the great temptation when writing about programming is to assume that your kind of work is the only kind of work any programmer ever does.<p>I write tools that help me test things. There are a lot of people like me who don’t work on big systems or write production code. Our priorities are different.<p>I need to duck tape a thing to another thing quickly. I happily accrue tech debt because getting my testing done today (not regression testing, but primary testing) is paramount. Later I will declare bankruptcy (abandon the code).<p>I work alone, mostly.<p>The dynamics change when I work with other guys, or when my software has to serve as a persistent framework into the future.<p>I’m just saying there are a lot of programmers like me. We are also interested in good craftsmanship— but we operate in a “battlefield” context, not a drawing room context.
评论 #36902010 未加载
justinsaccountalmost 2 years ago
That&#x27;s usually how I go about things too. It&#x27;s annoying that a lot of the new crop of youtube programming videos skip these steps. I&#x27;ve seen a few &quot;How to write X using Y&quot; videos that basically write the whole thing from top to bottom one line at a time.<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;@JustForFunc">https:&#x2F;&#x2F;www.youtube.com&#x2F;@JustForFunc</a> and <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;@fasterthanlime">https:&#x2F;&#x2F;www.youtube.com&#x2F;@fasterthanlime</a> are good exceptions to this. I want to see the process of building out something complicated one bit at a time, including all the mistakes and dead ends.
dbcurtisalmost 2 years ago
Embedded robotics firmware version: Show me that you can deploy an update to BlinkyLED, via the cloud manager, over LTE, to the robot with rock-solid reliability every damn time. Step two: update the bootloader over the wire without bricking the robot.
pjc50almost 2 years ago
&quot;Bringup&quot; of a complicated build or deployment system can consume quite a lot of work to &quot;do nothing&quot;. Not unusual with a new FPGA system to spend days trying to blink an LED, or a new 3D system to get a single triangle to display.
评论 #36863795 未加载
评论 #36868467 未加载
dasil003almost 2 years ago
I think this is a good reframing of Gall&#x27;s Law for junior devs. The problem is, it&#x27;s hard to put in practice if you don&#x27;t know what the shape of the thing your building should be. That may actually be a non-trivial problem for a junior dev.
评论 #36864143 未加载
michaelfeathersalmost 2 years ago
I&#x27;ve always thought of this as being like proof by induction: start with the basis case.
评论 #36864025 未加载
shermix011almost 2 years ago
Reminds me of an article from Mitchell Hashimoto: <a href="https:&#x2F;&#x2F;mitchellh.com&#x2F;writing&#x2F;building-large-technical-projects" rel="nofollow noreferrer">https:&#x2F;&#x2F;mitchellh.com&#x2F;writing&#x2F;building-large-technical-proje...</a>
csoursalmost 2 years ago
How many proof of concepts must a project knock down, before you start to integrate. (with profuse apologies to Bob Dylan)<p>This is a very good thing to keep in mind when estimating.
SoftTalkeralmost 2 years ago
Almost boils down to my approach: write a few lines, test. Never write more than a few lines without making sure it still compiles, runs, and does what you intended. I almost never use a debugger. Just a terminal or log file output, an editor, and a Makefile.
评论 #36864362 未加载
actersalmost 2 years ago
Speaking directly about the title, it is true. Once you start something, it is the most important thing. It can be dropped at any moment if desired. However, the optimal path is towards completion. This means that you are unable to do something else. Thereby planning to do nothing else. You have to make sure you can focus on your task to completion. Otherwise, you will end up having to alternate tasks. Surprisingly, we alternate tasks constantly. Mainly, it is because of boredom, time constraints, or lack of capability(knowledge, power, resources, etc).
bambaxalmost 2 years ago
&gt; <i>Start with something that does nothing. Make sure you can do nothing successfully. Only then should you start making changes so it starts doing something.</i><p>Excellent advice!<p>Just last week I did JSON transformations in a succession of little Node JS programs that are chained by pipe. Each program does one step of the transformation; it starts its life by outputting what it receives, then evolves to actually manipulate data.<p>It&#x27;s an approach that&#x27;s quite safe and rarely breaks, and when it breaks it&#x27;s easy to find where the problem is.
firecallalmost 2 years ago
Especially true when working on an unknown code base.<p>I frame up small projects that replicate the key parts of the software I need to interact with.<p>So often you find yourself trying to integrate with outdated code vases full of unknown dependencies and customisations that look nothing like the docs or sample code.<p>Even the smartest people can feel overwhelmed!<p>Gives your confidence when you can get a feature working from a fresh project!
RajT88almost 2 years ago
There&#x27;s a time and a place for hackathon-style coding.<p>But I find that I take a similar approach to Chen. Maybe not quite so rigorous.<p>- Start with a console app (actually I always keep a console app in the solution for isolating bits of code I want to debug)<p>- Scaffold the part where said code needs to go<p>- Once the code from step 1 is ready, stick it in the scaffold and debug until it looks good<p>- Work on further tests (load test, code coverage, variety of inputs)
评论 #36864354 未加载
reese_johnalmost 2 years ago
&quot;Make it work, make it right, make it fast&quot;
评论 #36865202 未加载
aikiplayeralmost 2 years ago
Back when I was doing a lot of full time dev, my approach was to figure out how to build Hello World (usually the device driver equivalent) and then debug it and then start for real. But always started with how to build it and debug it.
yellow_leadalmost 2 years ago
I like how people take this in different ways. For me, it is simply - compile often. Although, sometimes if I&#x27;m feeling greedy I won&#x27;t compile for quite a long time.
emmanueloga_almost 2 years ago
Reminds me of woodworking: 60% of a project is building cutting jigs, 30% is for cutting, 10% is for gluing and fixing the parts together.
garevealmost 2 years ago
baby steps baby!<p>this is great strategy for debugging &amp; so code reviewers have an easier time reviewing your incremental changes.<p>On newer teammates, I usually reject code reviews if they don&#x27;t follow these practices (if the company&#x27;s engineerimg culture is compatible with it)
pizzaknifealmost 2 years ago
the blog post illustrates a failure of mentoring junior(or even midcareer) engineers (EDIT2: but doesnt admit it - for shame!). EDIT: no one (regardless of their tenure or pedigree) should be left to their own devices to paint themselves into a corner.
swayvilalmost 2 years ago
I have several friends, programmers, who brag about their big concentration powers.<p>But can you turn it off?<p>To concentrate one on thing is to ignore 1000 things. If that can&#x27;t be turned off, becomes habitual, permanent, fades to invisibility as constants and habits generally do, one might be suffering from a massive distortion of perspective and not even know it.
评论 #36868622 未加载
tveitaalmost 2 years ago
This Raymond Chen guy should probably look into what debuggers are available on his platform of choice, he could save time by avoiding all this printf() style debugging.
评论 #36863921 未加载
评论 #36863947 未加载
评论 #36864152 未加载
评论 #36866498 未加载