Live data from Hacker News

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

news.ycombinator.com

61–70 of 89 posts

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

#62
post #60

Earlier quoted context omitted.

It's really annoying to answer a question by telling the asker that you know better and they should do something else. This person cared enough about this question to ask it to a community on the internet. Have the humility to answer their question instead of telling them that you're wiser than them.

This is a classic example of the xy problem https://xyproblem.info/ , where the author is asking for advice on his solution (how to study react on a vacation without internet), when for the vast majority of circumstances the best advice for the author would be to not waste his vacation studying React.

You don't seem to understand what a conditional is.

_Given_ that I want to study React in the woods, how should I do it?

Whether or not to study React in the woods is completely irrelevant.

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

#64
I would suggest setting up a 'forward proxy' on localhost with a piece of software such as nginx. With a sufficiently large hard disk or SSD, you can set the cache lifetime to be something very long like a month or two. Ideally, you'll be able to have your most frequented Web pages available offline. In practice, I've found DNS to be the biggest challenge, as browsers like to check the domain name too frequently; you'll probably need to cache that as well. I can share a prototype nginx configuration that I have been trying, if you like.

More immediately, Kiwix is fantastic for this. I have the entirety of Wiktionary downloaded - the complete "English to X dictionary" where X is about 50 languages - and it only takes up 8GiB. Install at least two different Kiwix client applications; there are occasionally glitches that make one unable to show a certain page. Wikipedia and Stack Overflow might be good Kiwix libraries for your use-case.

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

#65
post #60

Earlier quoted context omitted.

This is a classic example of the xy problem https://xyproblem.info/ , where the author is asking for advice on his solution (how to study react on a vacation without internet), when for the vast majority of circumstances the best advice for the author would be to not waste his vacation studying React.

You don't seem to understand what a conditional is. _Given_ that I want to study React in the woods, how should I do it? Whether or not to study React in the woods is completely irrelevant.

> You don't seem to understand what a conditional is; you'd have a hard time doing math or formal CS.

Ad hominems are against TOS.

Answering the question is irrelevant if it’s the wrong question to begin with. And for the wrong circumstances (ie if this is a family vacation) can be counter-productive. It’s far more productive to zoom out, ask why the author is asking for advice to study react on vacation, and address that instead. Consider this as you advance your career past recent college grad / swe1 :)

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

#67

I would suggest setting up a 'forward proxy' on localhost with a piece of software such as nginx. With a sufficiently large hard disk or SSD, you can set the cache lifetime to be something very long like a month or two. Ideally, you'll be able to have your most frequented Web pages available offline. In practice, I've found DNS to be the biggest challenge, as browsers like to check the domain name too frequently; you…

Commenting because I want Kiwix to be more visible: it's making having copies of Wikipedia, StackOverflow and various other Wikis and books offline quite easy: https://library.kiwix.org/#lang=eng

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

#68
Ensure you have offline copies of books and documentation you might need and perhaps some cloned repos that might be helpful.

You didn't provide any details about this excursion, so I'm not going to assume anything and tell you to do something else.

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

#69
post #34
post #23

Earlier quoted context omitted.

kinda weird they airgap but allowed thumb drives. that would be very hard for me though, coding without internet. he must be really good at his craft haha.

The one place I know that is this secure, you hand the thumb-drives to security who scan them and verify the contents are of no risk before handing them back. The same on exit.

I'm surprised they're permitting thumb drives at all. External drives are common though, usually specifically cleared one. Every gov't office and gov't related contractor I've been involved with got the memo over a decade ago that thumb drives are not to be trusted. They go through and whitelist specific external drives and also permit bringing in (and usually shredding after) optical disks (CD or DVD). Optionally they use a "data diode" to bring data into the network.

https://en.wikipedia.org/wiki/Unidirectional_network

Post reply on HN