3 ms·
I came here to mention 'Deep work' (which I found a very effective way to do and talked about on HN previously [1]) AND another tactic which is giving me good r
by splintercell 10y ago
I came here to mention 'Deep work' (which I found a very effective way to do and talked about on HN previously [1]) AND another tactic which is giving me good results.
The trick I found to complete things is:
Do not switch ladders of abstractions. When working on a modern web application (with backend, frontend, css, testing etc) if you start with writing backend API calls, then just write all of them first. Starting with the API call for /user', /signup, /login, /compose, /rate, /play. Don't worry about it working. If you do TDD then fine, but if you don't tests before you write the code, then avoid writing tests until you're done writing the basic code for your API. Then you write tests for it and make sure that each endpoint at least works.
Then write E2E testing for it(for the backend). E2E tests are a great way to build your app with it's core functionality full working and validated. In other words, write unit tests which first call /signup, then /login, then /compose then /play (which is I presume one full flow of a user). This will help you figure out issues with your API and it kinda feels like writing a full app.
Once you're done with testing, then write the frontend, just simple HTML, don't worry about CSS. Don't try to grab React + ES6 + Redux boilerplate or things like that. Just go with the simplest thing. Even if after every action user has to refresh to page, so be it. Oh you heard about CycleJS and think that you should be using that instead? Well guess what, you purposefully chose a really terrible technology to build this app, so once you're done making your app in that crappy tech, then you can rewrite it in CycleJs or anything else you want.
This way, even if you abandon your CycleJS rewrite effort halfway, you'd still have a completed project(and trust me, you will never let your app be stuck at static HTML with no CSS). Chances are that you'd abandon it, when you've already written your app in CycleJS but made a new rewrite effort to write it in Vue.JS.
Basically idea is, you think in terms of one layer at a time, and you defer all desires to refactor things until you are done finishing that layer.
1. https://news.ycombinator.com/item?id=13813173 https://news.ycombinator.com/item?id=13813173
- lukewrites 10y agoMental Models sounds fascinating, thanks for the suggestion.