Live data from Hacker News

Ask HN: How do I code offline for a week?

news.ycombinator.com

11–20 of 89 posts

Re: Ask HN: How do I code offline for a week?

#14
There’s stuff like https://zealdocs.org/ that allow you to take all relevant documentation with you so offline coding will work.

If you just want to be productive, you could also bring a lot of books or downloaded tutorials on a drive.

Btw, make sure your drive is encrypted and you think of a way to backup your data so you don’t lose the offline progress.

Re: Ask HN: How do I code offline for a week?

#17
>to make sure I'm productive over this time?

Is the purpose of the retreat to the middle of nowhere to be productive ?

Why do you think you need to make sure you're productive ?

If the purpose of your retreat is to be productive, maybe chose something that you can do without Internet, like programming in a language/framework you feel comfortable with, and just bring their documentation with you ?

Re: Ask HN: How do I code offline for a week?

#18
If I were you, I'd make sure I have a local instance of f.ex Llama 2 and Code lama up and running.

Even though it's not as good as GPT-4, and might even be slower, the value you might get from a local modal in such a case will probably beat most other things. It will allow you to both look stuff up, and even learn new things without needing to copy large parts of potentially irrelevant information beforehand.

Re: Ask HN: How do I code offline for a week?

#19
Not quite as long as a week but here are some tips when I want to code from a long haul flight or some other offline situation.

- The replacement for Figma is straightforward - pen and paper. Make sure you take some.

- devdocs.io for offline docs or if what you're using isn't in there, a lot of packages offer a PDF of their docs.

- I keep a pyproject file that has basically any mainstream package I am likely to want at any point while writing Python, then when I leave for a trip I make sure everything is installed locally. Docker can also be helpful for this.

- Sometimes I write tests when I have internet then when I'm offline I just spend the time making the tests go green.

- Other times I will forget about writing new code and learn something new by working through the PDF of a book. Most technical books set up the dev environment in the first few pages, do that when you have internet then you're good to go.

Other people have raised good points about getting away from your computer. I don't want to preach but I do like a 'holiday' day where I do some light coding in the morning then spend the afternoon doing something else entirely.

Re: Ask HN: How do I code offline for a week?

#20
I tend to agree with the other commenters suggesting you just step away from the keyboard for a while. I've been programming for 40 years... it can be addictive, fun, and useful... but there are other and more important things in life. Focus on those.

If that advice falls on deaf ears, and you really do want to write code on your time off, then here are some suggestions. I was about to say 'welcome to how we used to code'... but there are differences, both positive and negative.

* Tools like `git` are invaluable to the extent they let you manage source code control offline. Use them if you don't already.

* Settle on your dependencies and frameworks while you have network access. Download all the source you can for future reading.

* Focus on algorithmic work.... places where it's more about thinking through the code you're writing rather than interfacing with something else. (Hard these days.)

* Buy and bring some books. There are still good programming books that can be useful. You won't be totally at the cutting edge with these, but you probably don't need to be either.

Post reply on HN