• ## Six tips for digital nomads working remotely

Working remotely and traveling at the same time is an incredible experience. You get to see different parts of the world, meet new people and get immersed in a different culture for a period of time. It does, however, bring some additional concerns to your normal workday. In this post, I’ll be sharing my learnings from working as a digital nomad. Here are my top 6 tips for digital nomads working remotely.

## 1. Over-communicate with your colleagues

As you’re not going to be seeing your colleagues every day, it’s important that you stay in the loop. This goes both ways. From your colleagues perspective, you’re now halfway around the globe somewhere and for all they know, you’re sipping pinácoladas at the beach instead of working. You’re going to meet some judgment for working remotely like this, therefore it’s important to make sure they know what you’re up to.

I like to start my day by jumping on slack (or whatever means you use for communication) to say good morning and give a summary of what my plans are for the day. I try to do this as close as possible to the time they arrive at work, so it becomes a natural part of their morning. During the day, I make sure to write about my findings. If I’m struggling with something, I’ll ask if someone knows. Found an interesting article? Share it. You get the point.

By the time I wrap up, I make sure to give a short status on what I got done that day and let the team know what’s on my agenda for tomorrow. The cool thing about this is that it encourages your colleagues to do the same. If there’s a lack of communication the other way, be sure to request it. I like to ask publicly so that everyone knows about it and in addition message one or two specifically as that drastically improves the changes of your colleagues sharing.

## 2. Have a dedicated workplace

When traveling, you’re going to realize a couple things: 1) Internet is not always good enough to get work done. 2) Working from the same location as you spend the day can lead to cabin fever. Due to this, I highly recommend finding a co-working space in your area. These are offices with good quality internet connections where you can rent a spot for a period of time.

Having a place like this helps you stick to your routines. As you now are completely dependant on your self-discipline, this can be useful. Another perk of being in a collaborative environment like this is that you get to meet other, like-minded people and you might also make some new friends.

## 3. Mind the timezones

There’s a lot of really interesting locations, but interesting also usually means different than what you’re used to, which in terms means you might be in a completely different time-zone than your co-workers. I find it most challenging when you’re in a timezone behind the rest of the team. There’s a soft limit around 5-6 hours behind where it becomes very difficult to have enough time with the team. This can, of course, be counteracted by getting up really early, but that again will significantly impact your experience when traveling.

Having a balance between this is what I’ve found to make the most sense. When I’m in a timezone behind my team, I make sure to get up a bit earlier but I don’t over-do it as I want to enjoy the journey as well.

• ## Improving test output in Gradle

If you’ve ever ran tests in Gradle, you might have noticed that the output on failing tests are quite sub-par. This becomes an issue on Travis specifically, as you cannot debug the results and to get more infomation on the test, you must enable the --stacktrace flag. By default, Gradle does not output which tests have been run, something which could be useful.

Another thing I find useful is to see any console output. You could enable the --info or --debug flag, but I feel that Gradle clutters this too much. For my projects, I prefer using this test configuration to get the most information possible, without cluttering the output too badly.

This will output anything written to the console (including lint errors), print the full stack traces and list all tests ran.

tasks.withType(Test) {
testLogging {
exceptionFormat "full"
showCauses true
showExceptions true
showStackTraces true
showStandardStreams true
events = ["passed", "skipped", "failed", "standardOut", "standardError"]
}
}


• ## Ascii Art Generator

Sun, beer, volleyball, travel, bathing, swimming, longboarding, and of course… programming!

It is the time of year when I have the time to dedicate time to some personal projects. Today has been a long day of coding and the result was a JavaScript Ascii Art Generator. I have been doing some image manipulation using HTML5 recently and this was simply a natural next step. The image above shows the result from a render i did.

The applications is stand alone and can handle most images, although images with a lot of contrast seems to work the best. The current version works well, but I might want to tweak it at a later point to get be able to handle darker images better.

If you want to give it a try, you can find it at the GitHub Repo.

I have also got myself a longboard. It is much easier to start out with than I would have thought and it is so much fun! The thought is to use it as a means of transport, but at my current skill level I am most like better off simply walking.

• ## PHP Server redirect

After a couple months of moving, putting together IKEA furniture and reconfiguring servers and devices there is still one thing missing; a static IP. I am currently running OpenProject as my choice of project management tool. The challenge of using this is that it runs on Ruby, so it has to be hosted on one of my servers and these are placed in my apartment at the moment.

Normally, when having a static IP you would simply add a CNAME record for the IP and it would have been working as intended. At the moment this is unfortunately not the case. So how do we get around this?

In my case, only HTTP needs to be supported at the moment so the solution was making a simple PHP script handling the redirection. This stores the server IP on request and redirects everything else. It also handles subdirectories and GET requests correctly.

To use the script, create a folder with the desired name of your server(server1.your-domain.com) would be achieved by creating a folder named server1 in the root directory of your web host. Then all you have to do is extract the source in that directory and create a cron job on your server for updating the server IP. Remember to update your auth token in index.php.

## Cron Job setup

Append the following content to your crontab:

Save and exit.

## Example usage

https://server1.your-domain.com/?action=set&auth=eVZKwTTFYASm6orAgzjm

Retrieve the server IP in a browser
https://server1.your-domain.com/?action=get

Get your server IP in a terminal
$echo Server ip is:$(curl -sL https://server1.your-domain.com/?action=get)

• ## Console debugging in PHP

Recently, I have been playing around in PHP again and found that I missed the simplicity of printing whatever object I wanted to the JavaScript console. Guess what? Now we all can!

After some fooling around, I ended up with the following class for handling it. Although it requires your code not to crash, I found it very useful when handling exceptions and inspecting objects when I set up a new API recently.

The attached archive includes both the source and example usage of the script. So sum it up, what you need to get started is this:

As always, feel free to use it however you like.