I did spend about 15 years programming without a fixed internet connection, of those some 5-6 years at a professional level.
So how did we do it back then? Well first of all, most development tools came with built in language, library or API references. For example Borland and Microsoft shipped IDE's with help files covering most of what was needed for development.
But when Java shipped in 1995, you usually downloaded everything including the Java DOC HTML files. Nowadays I usually settle with a bookmark to the latest online JDK (Which strange enough is AD-free).
But except for documentation, depending on what kind of application you are developing, various integration scenarios may make it hard to develop outside your usual working environment.
But there is always stuff that has to be done that does not require a working setup. You can write unit tests, document code, do some refactoring or other maintenence tasks.
This summer I was telecommuting and had to setup a working environment to do software development for an IPTV service without relying on a fixed high speed internet connection. I did have mobile internet but it was not able to carry IPTV streams so I had to use tcpreplay and VLC to get a working test environment up and running.