Developing with no internet 📵

Developing with no internet 📵

Notebook on the grass on a sunny day, with a phone on top that reads "Developing with no internet" from a digitally hand written note. There is a mate kit on the left and a lake on the top of the image.
Sun, grass, a lake, a Thinkpad, a phone with a stylus and the right Argentine touch

Have you tried programming without internet? Creating software is an activity that in practice, it becomes greatly coupled to an internet connection. It is widely spoken about that searching a lot of stuff in the internet isn’t a sign of a bad developer. As devs, we regularly look things up in the internet, because having the extensive amount of information that there is online at our fingertips can feel like a superpower. But, as the great Uncle said:

With a great power, comes a great responsibility

Uncle Ben – Spiderman
Uncle Bob and a quote that reads "WITH GREAT POWER COMES GREAT RESPONSIBILITY"

It can be dangerous to rely too much on the internet, with time it will banish your problem solving abilities. Sometimes we jump too quickly to the browser for pasting that weird error we are not quite understanding, or for reminding ourselves how to map() a collection on this new language, or for looking up the existence of a library that performs X task, just in case the stars are aligned and someone wrote that lib.

While that behavior will in fact help you in the short term, in terms of resolving challenges (as corporate now likes to call them 😛), you are not giving yourself the chance to perform the nicest activity only human beings can do: think! I present to you:

Developing with no internet

Now, what if we didn’t have that awesome power of searching for information on the internet for resolving a situation? Well, we gotta find out using our gray matter. I’ll list some of the challenges we sometimes face and the path we can take to resolve it, scenarios we usually end up consulting the web for. But the overall idea will always be as abstract and concise as: think.

What can I do when….

The compiler/interpreter/IDE is telling me about an error I am not understanding ⚠️

Instead of

Copy pasting the error into Google, finding a solution to it than maybe includes changing your own code, for unknown reasons, and using code from a person that doesn’t work with your code 🫠…but hey, at least it works, right? no thanks!

Do

Well, first of all, read the error. With the internet at hand, you may even miss the most basic task: read the error. If you didn’t understand it after reading it, read it again. And once again until words start making sense (some sense at least). Then, check the context of the error (if the error isn’t too harsh, it will tell you where it’s coming from). Ask yourself why is the error appearing? Something you introduced? Are you trying to do some weird sheet? Why don’t we revisit that code you just wrote…

I don’t remember how to perform that routine and I need it quickly! 🚗🌪

You may need to reverse a string (said no one ever, except for programming courses), or use a quick sort algorithm, or parse a CSV file and you know implementing it yourself will take way more time and effort than googling it. But wait! why do you need it so fast tho? Aren’t you developing software? Will it seriously take thaaat much to implement it yourself?

Instead of

Searching the routine, copy-pastying it, calling it a day while taking the risk of having variable names that don’t apply to the context of your code or forgetting it to create a test for it, not to mention, still not knowing how to implement it yourself

Do

You probably have the knowledge tools for performing such routines. And usually the routines we search for are for low level operations that don’t involve any external library (more complex or specific routines can’t be searched). Try to implement it yourself, in any way, any thing will do! as long as you wrote it, understood it and it works. But what if it’s extremely horrible to look at? well, if you understood it, you certainly can make it better…didn’t you write it?

Is there a lib that does this? 🔍

I’m using UTC for object persistence but the mailer is based on GMT -3, let me quickly grab this timezone conversion library so I don’t mess it up, if it has 40k weekly downloads it must work consistently. Yes, but why don’t we take a step back?

Instead of

Installing and including the lib in to the system, while introducing dependency and a larger bundled size

Do

Verify the use case. Do you really need a worldwide timezone conversion library? Increasing coupling in your application? Creating an exposure layer for vulnerabilities? All that just for converting from UTC to GMT -3? That doesn’t sound right. Also wasn’t the requirement to support GMT -3? Why are we now supporting CT, CST, IST, ABC, IH, ATE, TI, ME, ZON, ES?

First, check if the language / framework you are using doesn’t already solve this problem (it probably does) If not, write yourself that function. Time will tell if requirements change towards implementing more time zones.

Just picture yourself watching the npm install && npm build of a cheap CI pipeline instance 😅

Benefits of going offline

Going offline encourages to take a course of action different than the usual one, which can be compared to going to work using a different route, expanding your neural patterns, making your brain work, practicing your problem solving using only the tools you have.

Now, this may not be for “the final product”. As these “think and do it yourself” activities can introduce bad decisions (because we are human and we make mistakes), you’ll probably need to go back to what you’ve developed and take a second look; but you should do this always anyway. Where I think the real value is in, is in the way that going offline makes you take a step back and think the problem yourself, solving it with no help. If you’re in that situation already, you probable have the tools required to solve it.

Following these behaviors instead of the muscle memory internet search, I perceive it

  1. Gives more awareness when dealing with errors
    • I can’t do anything else with it other than reading and interpret it

  2. Makes the code cleaner
    • Because you’re focusing on solving the task at hand, for that specific scenario, for that specific context, without being biased by opinions you may read when looking for a solution

  3. Enforces refactoring more often
    • Because being offline gives the illusion of a more personal relationship with the software you’re developing, it feels like it’s you and the software, as if you were able to grab it with your hands, inspecting it, polishing it, adding something and taking a step back to admire it

  4. Obliges you to think first, act second
    • What are you going to act about if you didn’t think it yet?

Closing words

While “going offline” may be a speaking about behaviors it encourages and it’s benefits, these practices can be applied regardless of the internet connection. But hitting the internet switch off is an easy way to put your mind into that state (just like the airplane mode in your smartphone)

Going offline doesn’t mean no documentation

You can still download the official documentation, or have the internet but just for that, or actually looking into the source code of the framework or standard lib when possible, or check on your smartphone for challenges that block progress, or look for existent similar implementations. The goal is to remove searching on the internet as the first option in our toolbox.

Of course, you wouldn’t want to always develop offline, it can become quite tedious. But introduce this mode in some programming sessions, I’ll assure you it will give you a nice perspective about your software and your knowledge…do you actually know how to do it and you’re just lazy that’s why you look it up on the internet, or in reality you forgot how to do it but admitting it feels wrong to you?

Remember that your brain is like a muscle, and we must train it

Drawing of a brain flexing his two biceps on his sides

1 thought on “Developing with no internet 📵

Leave a Reply

Your email address will not be published. Required fields are marked *