Florianopolis – Mole Beach

praia Mole

My bed at the Sharehouse Backpacker’s in Barra da Lagoa overlooks some tasty-looking 4-foot waves breaking onto the sand. Too bad I’m not allowed to surf there. Much to my dismay, fishing season is in full swing and the fishermen get first dibs on all the beaches. They’ve decided to only allow surfing at Mole beach and in Joaquina. This is the first time I’ve been muscled off waves by fishermen and I don’t understand why surfing conflicts with their fishing. That is, until I watch their methods. The fishing process is as follows. First, you have to wait until you’re at least a million years old. Brazil is no country for young fisherman. They fish by wading into the water waist-deep and staring intensely at the water. Once they feel they’ve intimidated the fish sufficiently they toss a net and pull it in. I have yet to see anyone actually catch a fish but they’re for sale at the market so I’m sure it works eventually. As comical as it is to watch, it seems like a cruel way to punish surfers. Noted; in Florianopolis they still fish like Jesus. The old man would be proud.

I roll out of bed and land on Ronin’s “kiteboarding” bag. I swear It feels like an arm under my foot but I’m sure it’s just his kite’s harness. I apologize to the lady just in case I woke her up from her very deep slumber. I’ll be surfing in Brazil for the next month or two so I need to find me a board and some gear at the local surf shop. Lucky for me the hostel has the poorest excuse for a quiver and lazyness wins. At least the price is right (free) and I’m getting to hit the surf sooner. I grab one and head out to the bus. Nothing could ruin today. This may be Edna’s (my board has been named) first return from retirement in a loooooong time as she’s looking pretty ragged. My last surf was in San Diego 4 months ago and ended with a sliced foot for me and a snapped fin for my board. It’s time to get back on the horse…..er Edna.

The bus driver and I are having some serious communication issues but I am carrying an enormous surf board and it’s apparent I’m not from around here so hopefully he has deduced I’m going to surf at the sole stop on his route where it is allowed and will notify my accordingly. After 2o minutes we pass by a beach and I can barely pick out surfers in the lineup. I wave my hand furiously and it seems to do the trick. Driver man stops the bus as Edna and I head down for the beach. The waves here at Mole (pronounced moe-lay) don’t seems all that big (4 feet tops) and it should be perfect for getting back in the swing of things. Being the light traveler I am, I have not packed a wetsuit. It’s Brazil in May after all, how cold could it be. The lineup seems to disagree with me and I’m the only guy paddling out in shorts. I’ll be depending on my manly, god-given insulation today. At least it’ll be easy for the pro scouts to spot me shredding it.

Turns out I was right about the first part, it was pretty easy to spot me and not necessarily because of my lack of wetsuit. My arms have decided four months off isn’t quite enough vacation time and refuse to show up to work today. Edna has also put on a few pounds since her prime isn’t quite the spring chicken she used to be. I put on a great show for the beach crowd impressing them with my sweet surf moves including: the drowner, shoot the falls, digging for pearls, and my favorite…. board to the gut. Alas after a healthy beat down I snap the leash (thank god!) and head back home . Tomorrow I’m trading in Edna for a younger and lighter model. She doesn’t seem to give two hoots one way or the other. Stay tuned.

P.S. Cameras tend to grow legs and walk off when left alone on beaches so you’re going to have to settle for whatever photos I could scrap together.

Announcing instantscreenshot.com

Taking a break from the travel stories, I’m launching a new website this week named instantscreenshot.com.

http://instantscreenshot.com

If you need a simple way to get a picture of a website, it doesn’t get simpler than this. Here are some possible uses for the tool:

  • To share a site that may be blocked from certain locations.
  • To share a site whose content changes frequently, but you want a “snapshot” of the site in its current
  • Show that a screenshot hasn’t been photoshopped.
  • To see what a site looks like from a computer besides your own.

That’s all I can think of off the top of my head, but I’m sure there’s more. Keep on reading if interested in the technical details of what’s running the site behind the scenes.

 

The Technical Stuff

The web app is built on the Play! framework in Java. Unlike many Java frameworks, Play is refreshing in that you can go from zero to a live app really fast and iterate like crazy. However, the more interesting component is the piece that actually generates screenshots. I make use of a project called PhantomJS. It’s basically a headless web browser with a Javascript API. What makes it ideal for this project is that it doesn’t require a graphical user interface so I can run it directly on the web server without the need to install or run an X Window System environment.

It took a few iterations to arrive at PhantomJS though. I originally play around with Selenium, wkhtmltopdf, PyThumbnail, and even a the mShots service by WordPress among other things. Here’s a quick summary of what has and hasn’t worked so far.

 

The Losers:

  • Selenium has an active community for support and generated good-looking screenshots, but it’s prone to hanging or crashing on Javascript-heavy pages so it wasn’t stable enough. Also, it requires an X session and my little server slice just doesn’t have the juice to run all my apps and X.
  • wkhtmltopdf can run in a “fake” X environment like Xvfb, but the documentation was sorely lacking so passed it up for something with a better support community. I’ve heard from a few people though, that wkhtmltopdf is worthwhile so I’ll remember to try it out next time.
  • mShots is a web service provided by WordPress. It’s purpose is to generate screenshots to be used in blogs. Using this was really nice since I could pass off all the hard work and performance/bandwidth usage of generating a screenshot to WordPress, but where’s the fun in that? Also, it caches screenshots so they’re generally a few hours old and only captures the top portion of each page. Any page with a scroll bar would be missing content in the screenshot.

 

The Winner: PhantomJS with Xvfb

Pros:

  • Much like wkhtmltopdf, can run in a “fake” X environment. Xvfb can run X sessions in a buffer so you don’t need a display.
  • Decent documentation. I had Phantom running on the command line within minutes of downloading it and the example in the wiki are very straightforward.
  • Generates good-looking screenshots.

Cons:

  • While it’s the best solution from a functional standpoint, it has some drawback in performance. It takes a few seconds to load up a screenshot and this could become an issue if instantscreenshot generates significant traffic. Generating screenshots with any tool is going to have performance implications so I’m not sure I will find a solution out of the box and may have to write one myself should it become necessary.
  • Runs outside of the app’s VM so I lose some control over the execution. This hasn’t proven to be a problem yet, but I could see me kicking myself for it later.

I got the suggestion to try PhantomJS from this thread so I got to give credit to Chris of brushd.com for the idea. As always, let me know if you have any feedback on the site. You can hit the feedback button on instantscreenshot.com and it’ll go straight to me.