Re-implementing an old web site in a modern style (Part 1)

So a few weeks ago I found out that my contract was going to be ending early due to a loss of funding. This is a great shame, not least because it gave me the opportunity to learn a bunch of new technologies, and also because I’ve really enjoyed working from home with minimal supervision. It’s been really helpful to my kayaking training to be able to go out and train during the afternoon and work in the evening after it gets too dark to paddle. It’s unfortunate timing because my contract ends at the end of April, and we’d already booked our cruise for two weeks towards the end of May.

But I’ve discovered a bunch of things since I’ve started looking for work:

  • Getting remote work is hard, even if you have 7 years of remote work.
  • Lots of potential employers want to see your work and your code, or worse, they want to see your GitHub profile. The problem with that is that most of my code is written for employers who don’t allow me to share the code I’ve written for them, and the websites I’ve worked on have been internal rather than facing the internet, so I can’t show them. Even worse, the only thing I’ve got on GitHub is a WordPress plugin that I forked for a project I did for the local kayak shop in exchange for a new boat. I used to contribute more to open source projects, but that was before the days of GitHub and mostly it involved emailed patch files. That was back in the days when I didn’t have so many hobbies and obligations.
  • While I’ve been doing a lot of JavaScript over the last 7 years, I haven’t used any of the cool frameworks. We’d actually made the decision to transition our project at my soon-to-be-ex job to Angular, but we never got around to it.
  • A whole bunch of companies are embracing coding exercises as an evaluation process. I don’t blame them – I’ve given interviews and I’ve received them, and they are an utterly shit way of evaluating people’s technical ability. But it is time-consuming if you have to do this for every company you apply to.

So I thought it would be useful if I could do a bit of a project that I could show to people, and put the code on GitHub, just like all the cool kids. And it should obviously use a JavaScript framework. And you’d think that I’d choose Angular, but there is a particular job here in Rochester that is currently top of my want list, and they use React, so I thought I’d use React.

So having made a decision on the front end technology, what I needed to do was pick a project. And the obvious candidate is my navaid.com website. While I keep the data updated loading FAA and Eurocontrol data every 56 days, I haven’t updated the UI in many years, and it shows. I’ve got several data generators there, but most of them are for Palm Pilot programs, so they’re probably not worth updating. But the GPX generator at http://navaid.com/GPX/ is still viable. So I’ll only reimplement that one.

The first step is to make a mockup of the new site. Actually, the first step was to watch a bunch of tutorial videos for React. Which start off teaching you about WebPack and ES6, and then React, and then React-Redux. I wasn’t 100% sure if I needed Redux, but it seemed like a good way to separate the data state code from the render code. But after watching the videos, it was time to write the mockup.

Obviously, since I have been using Bootstrap for the last several years, it would be easiest to make something modern and presentable using it. I just had to find a nice theme with a CDN. I settled on the “Paper” theme from Bootswatch, which has a nice simple clean look.

The obvious thing was to replace the multiple pages of the original GPX interface with a single page. The existing interface saves your last set of parameters in the database linked to a cookie and re-uses them next time you come back, and I’ve heard from users that they often just click through to the end and hit the action button without changing any of those parameters, so I thought it would be good to be able to display what they’ve loaded so they review to make sure that they don’t need to change anything and click the “Start Generating” button. So I decided on an accordion panel where the header for each type of filter shows what’s selected for that type and if you click on the header, you can modify it. Hard to describe, hopefully, easy to see in action.

So it took a few days, but the mockup is here. The code is the first commit on this project on GitHub.

After playing with it a bit, the first thing that leaps out at me is that the accordion panels should open when you click anywhere on the title bar, not just on the text. Also, Vicki suggested that the color of the accordion panel is a little blah and I should make it a nice light blue. You’ll see that in generation 2.

Update On thing I forgot to mention: While Bootstrap has support for responsive design, I made no attempt to make it work on mobile devices because generating and downloading large files isn’t something you’re likely to do on a phone or tablet. Probably the only change I’d have to make for mobile would be to use <div class=”row”> and <div class=”col-xs-12 col-md-4″> instead of tables, and possibly some tweaking of the padding or margin around checkboxes because they appear to overlap the label text a bit in Chrome and Safari on my iPad (although they don’t overlap in Chrome on my desktop when I choose “iPad mode”).

Also, as per a comment below, I’m also going to look at increasing the text size if I can do it without messing out up the look. The default font is 13px, which I’ve always thought was plenty big, but the Roboto font is a bit “thin”. I like it because it looks elegant, but maybe it doesn’t work at 13px? Bootswatch has some other clean themes, maybe I’ll have a look at some of them instead.

Update: You can read Part 2 and Part 3.

V10 Sport good as new, what to do with my V12?

So after my last update I sent my boat off to get fixed. It came back looking amazing – you can’t tell where it was damaged, either by color or by texture. John at ateammarineandsupply.com did an amazing job. But I paid a high price for it – $500. More than I would have liked, but it’s my best boat.

In the meantime, I’ve been paddling my V12. When I bought the V12, I knew it was a bit old and beat up, but I wanted something that would challenge my balance. Also, it had an overstern rudder option, so I thought it might be useful for inland races, especially in shallow waters. And I used it in a few races in 2015. But in 2016, I ended up not using it in races, in spite of using it for much of my early spring training. The only race I did in 2016 that I’d done in the V12 in 2015 was the week before the Canadians, and I had a theory that I wanted more time in the V10 Sport. I didn’t use it for other races that I’d thought about using it for like Round the Mountain because I just haven’t managed to handle it in waves yet, and I wasn’t sure what the weather would be like on race day. I’d still like to get some time in it in waves with the hope of eventually being able to use it in smaller waves.

But here’s the problem: the boat is in much worse shape than I thought it was when I bought it. I don’t know if I just didn’t recognize how horrible it was when I bought it, or if has deteriorated since I got it. As well as the cracks on the seam line that I knew about beforehand, I’ve noticed a bunch of soft spots on the hull, especially where the boat rests on my V-racks. I had it up on my shoulder today and I could hear the gel coat cracking as it bounced when I walked. Not surprisingly, it leaks like a sieve. But on the other hand, I like the fact that my V12 is a beater that I don’t mind dropping in the mud while spring paddling. It also has the earlier bow shape that doesn’t pick up weeds quite as badly as my V10 Sport (the 2014 V10 Sport redesign changed the bow shape to make it sweep up every weed in the world), which means it might be better at the Seneca Monster race if I do it this year. And the overstern option might be good in that race as well.

I don’t want to spend the money to fix it – if fixing a few small cracks on an otherwise pristine boat was $500, fixing all the multitudinous problems with this pig-in-a-poke will cost way more than what it’s worth. Ideally, I should probably get a replacement (used) boat. But what boat? The fact that I’ve been unable to master this boat in anything more than a single boat wake is bothersome. I’d like something that’s faster than the V10 Sport, but I’d also like something I wouldn’t be afraid to use on the Bay (at least before the motorboats come out to play).

But the other problem is that I’ve got my heart set on a better computer this spring, so I don’t have money for a new boat. So I think the plan will be to keep using my V12 as a beater boat until it finally gets an irreparable hole, then look for a used V12, V10 or maybe something else. According to Wesley’s surf ski reviews the Stellar SEL or Fenn Spark might be as fast as a V12 but more stable. So might the new redesign of the V12 but I bet the new one has the weed sucker bow as well as being more expensive.

Paddling the GoPro

With the GoPro mounted on my lovely Jim Smith bow mount, I took it out on the Genessee River to see how it looks. And I have to say, I think it looks awesome (ok, as I write this it’s only a few minutes after I uploaded it to YouTube and YouTube is only showing it in 360p, but trust me when I say it looks great in 4K). The GoPro doesn’t have image stabilization in 4K, but on a flat water trip like this, it doesn’t need it. And I love the position – the Jim Smith mount puts it just at about the right height, and it feels firm.

GoPro Hero 5 Black battery tests

I’m going to update this table as I do further tests. These are “bench tests” done with the camera mostly stationary in my office or in my work-out room. The idea was just to get a basic idea of whether I’m going to be able to record long kayak races with the camera as-is, or if I’m going to have to figure out how to attach an external battery to it without compromising the waterproofness.

Resolution/
Frame Rate
Wifi/
Bluetooth/
Voice
GPS Image
Stabilization
External Battery Battery Life
4K/30 On Off NA No 92 min
4K/30 Off Off NA No 97 min
4K/30 On Off NA Yes 142 min overheat
98 min
2.7K/60 On Off On No 85 min
2.7K/60 On Off On Yes 290 min
– card filled up
1080p/60 On Off On No 110 min
1080p/60 On Off On Yes 272 min

One additional test: I wanted to see whether being in “standby” mode using a remote consumed a lot of battery power, because if not I could perhaps cover a long race by turning it off and on as action warranted. However, in 4K mode (where I got 92 minutes video in continuous shooting), going 30 minutes on then repeating 15 minutes off and 15 minutes on, I only got a total of 111 minutes total between shooting (66 minutes) and standby (45 minutes). That’s not what I was hoping – basically 45 minutes in standby was equivalent to 26 minutes running.

Note: The “External Battery” in the table is a Novobeam NBP3000 Waterproof USB battery. I’m trying to figure out how to attach it to the camera without compromising the waterproofness of the camera, possibly by covering the USB and HDMI port hatch with Sugru or something similar.

First results with the GoPro Hero 5 Black

First thing I did was turn off gps but leave all the other stuff on (wifi, Bluetooth, voice recognition) and see how long it would record a 4K video before overheating or running out of battery. On the “bench test” i accidentally shut it down at 82 minutes because I didn’t realize that it would keep recording when it had a low battery warning on the screen. But no overheating problem. With the same setup I went paddling in mid to high 40s Fahrenheit and got 92 minutes before the battery completely died and it shut off. That bodes well. I plan to post the paddling video later after I give it the VIRB Edit treatment.

In order to see if it would work if I plumbed in an external battery, I repeated the bench test with a USB battery hooked up. It over heated and shut down after just over two hours. That’s not encouraging. The battery indicator was indicating a nearly full battery though. I let it cool down for 15 minutes or so and started it up, and it’s currently 75 minutes into that test and the battery indicator is saying 19% remaining, which makes me wonder if the first video before it shut down was just the external battery and after is just the internal. I’ve discovered from testing on other cameras that removing the internal battery entirely when you’re using an external battery can solve some overheating – that might be worth a test with a higher capacity external.

For my next test I want to reduce the resolution to 2.7K, increase the frame rate to 60fps and turn on image stabilization and turn off the other features and see how long the battery lasts both with and without external battery. If I could get a three hours or more with the external I might have exactly what I was looking for.

On the other side of the coin, I tried editing the kayaking video using that fancy video editor daVinci Resolver and it was slow as molasses so I gave up. So then I tried in iMovie and it was slow but bearable. I had to shut down just about everything else on the computer though to prevent it from stuttering and dropping frames. Maybe I do need that new MacBook Pro after all.