Not stupid exactly but…
Instagram This Week
Stupid Human Tricks revisited
It’s been a while since I posted one of these.
An article on the CBC about an 18-year old kid caught doing 308 km/hr in a 100 zone.
https://www.cbc.ca/news/canada/hamilton/burlington-qew-stunt-driving-308-1.5564486
This was one of the comments. I can’t even…
Reuben Danko 8 minutes ago
Nothing wrong with speeding as long as one know how to handle a vehicle at that speed , what is dangerous is those who can not handle a vehicle within or below the ridicule speed limits. It is quite feasible to drive on a 3 lane hiwghay at 140 Km/H to 16 Km/h, the Europeans do, with narrower lanes, and have less accidents than drivers in the US and CAN, because they know how to drive,m most drive 5 speeds, not that girl sort of nonsense of automatic (works to sell cars and place more inept behind the wheel, mostly women and mentally slow men). Driving needs to be reserved for those who can handle a foot cluctch, 5-6 sped manual on a rear wheel traction, try texting, put on make up (CAN and US women are known to do dirty things to) eat (that is something utterly abhorrent eat in a car). In life there are drivers and there are commuters, most CAN and US are commuters, and they proved it, more safety toolls in cars today than ever and the number of accidents and dead has not dropped significantly.
It was deleted about 30 minutes later (thank god). The number of people defending the kid blew me away (200 km/hr OVER people!) but this guy doubled down big time.
Instagram This Week
Updating a digital log
Years ago when we first started chartering I created a Filemaker database to track our voyages and sea miles. A lot of charter companies want a “resume” and I had heard if I ever wanted to get some really advance certification that one needed minimum numbers of recorded miles as crew and captain. So I used the database to track miles etc. At the end of each trip I would diligently add in all the days, miles, notes and lat/long if I had happened to note them.
Fast forward a bunch of years and my version Filemaker now no longer runs reliably on my updated OS. And since I no longer have any need for it, buying a new license doesn’t seem like a reasonable expense. Luckily I had both a printout of the contents and was able to export the data from the files between crashes. But it was time to acquire a new database tool.
MySql/php
A bit of sniffing around the internet and it became clear that building a MySql database was going to be the likely successor. But unlike Filemaker, it has no graphical interface—so that meant if I wanted it to be at all user friendly I would need to build a custom php website to add, view and edit the data. Since my knowledge of both MySql and php was cursory to say the least, it looked like an impossible task. But nothing ventured, nothing gained…
To cut a very long story short (or at least shorter) I managed to find a nice tutorial for building a CMS (content management system) and then began the painful task of hacking it into my new Cruising Log. Along the way I have learned tons and tons and have thoroughly enjoyed the exercise. As a work in progress it probably took me around a year to get it to the state it’s in now—although a lot of that was back-tracking to do things over so future changes would also work. I am a very dangerous coder.
Entering Data
The original design was based on the idea that I would get home after a cruise, grab info from the official ship’s log and then type it all in manually. But I use Farkwar.com to post updates on a daily basis while I am cruising which updates our position by means of an email formatted in particular way:
Enter text and/or notes here. ----- At 04/24/2020 10:40 (pdt) our position was 49°50.1068?N,124°31.6473’W Destination: Nanaimo
It occurred to me that my site could also parse the email and potentially update the database automatically. So I rejigged the email in a way that allows Farkwar to ignore the extra information and leaving me able to enter what I wanted to. Next I wrote a python script to parse the email, extract the relevant data and output in a format that MySql will understand. Then when I send it to my secret Farkwar email, I cc it to a personal secret email—Farkwar will post the position and update its map, and my python script will parse and post it to the database. So now the email looks like this:
Log Entry We decided to go. It will be an arduous journey but I have faith we will survive it mostly unscathed. Whales will be looking forward to our visit ----- At 05/21/2020 10:40 (pdt) our position was 49°50.1068?N,124°31.6473’W Destination: Nanaimo From: Edmonton To: Nanaimo Distance: 0
…and this results in a posted entry that looks like this:
Back to the site
But before I could really get going I had to build the website, connect it to the MySql database in a more or less secure way and start formatting various pages. Another long , hijinx-filled story I won’t bore you with. So after a few farcical fits and starts, the site now consists of a front end with two pages (an overall view and a detail page for each cruise):
…and an admin backend that allows me to add/delete/edit boat lists, crew lists, and the cruises themselves.
Of course it is never that simple, and a lot of extra things needed to be built along the way—like a login screen, a database table to hold users and some truly convoluted MYSQL statements to be able to display and edit the information I wanted in the way I wanted it. (And, as I just discovered, a way to delete an entire voyage.) But in the end I got it done.
I also realized that since I had the latitude and longitude nicely formatted it wouldn’t be hard to build a link to google maps: https://www.google.com/maps/place/49%C2%B0%2030.8916%20N+123%C2%B0%2057.8196%20W so I could visually see the various locations each entry was made. So I did.
Printing
The last piece of the puzzle was the ability to print a nicely formatted pdf version of the log as a whole. I started off experimenting with some php to pdf utilities but in the end decided to design a nicely formatted webpage and then print direct to pdf.
Conclusion
After all that, I decided not to schedule the updating script and rather I will just run it when I get home —at least for the first few trips to ensure everything works in real world conditions. That is if we ever get to go cruising again 😉
The very last thing I did was port a copy from my personal server to the server where NeverforEver.ca is situated and try and set it up as a sample. Which, after a long battle, you can now find here: Cruising Log. If anyone is interested in the back end, let me know and I might send you a temp admin password.
It’s been a great learning experience and makes me want to do more development. Apparently Swift is pretty close to Python, and Swift is the official language of iOS development. Maybe I could make it into an iphone app next? If this COVID thing goes on long enough, well, who knows…
P.S. As a side note, according to my fancy new cruising log, not including inland water trips, I am officially at 6218 nm total cruising.
P.P.S. I will likely post at least the python code over at macblaze.ca, but probably not for a few days as it will take a bit of cleaning up.
—Bruce #Posts
Instagram This Week

Pretty successful experiment I’d say.



Instagram This Week
5 Years!
Its time for a 5 year update
We’ve owned Never for Ever for almost exactly 5 years now. And its been a pretty damn pleasant experience so far. Will our luck hold? Time for an update…
A Little Background
If you’ve haven’t gone through the whole blog, here is a little bit of how we came to own our trusty 2003 Hunter 386.
When we started this process 2014 we wanted a boat to own for one year while L had her sabbatical. The intent was to sail the PNW, overwinter in Victoria while living aboard and then sell her after we had to come back to real life in July 2016. Which is what we did. Except for the selling part. In the end we just couldn’t part with the lifestyle and we decided to keep her and put her in charter with Nanaimo Yacht Charters to provide guardianship and help defray ownership costs.
The year-long sabbatical meant we wanted a turnkey boat that we could board and sail away without any extra major investment, or worse, time delays. A lot of searching ensued and as luck would have it we landed on what has been the perfect boat, at first for the living aboard, and then for putting her into charter.
What’s it cost?
Other than the initial purchase price, we’ve done well. There was a bunch of cash we spent right off the bat before we even set off, but the largest costs of ownership since then have been fixing leaks. And that high number mostly stems from paying people to do it as we are 1000+ kilometres away from her 80% of the time.
Initial expenses:
- new Rocna anchor
- new galvanic isolator
- new graphic decals
- new batteries
- new hot water heater
Major things we spent money on since then:
- 120′ new anchor chain
- Webasto heater repairs
- BMS (battery monitoring system)
- new stove thermocouples
- 2 head rebuild kits
- chasing down leaks and repairs
- 2 macerator pumps
- new head hoses
- new fender
- replacing the motor mounts
- a new hatch
- new (used) e80 chartplotter
- a new shower faucet
- and a new windlass
Ongoing ownership costs include:
- zincs
- cleaning materials
- bottom paint
- polish & cleaning
- winterization
- outboard maintenance
- oil changes
- fire extinguisher recertifications
- propane tank recertifications
I’m not going to dig up all the figures but none of these items (except for the %^&$# motor mounts and associated costs) were more than several of hundreds of dollars—and it has been divided over 5 years.
Oh and the windlass. The windlass was just replaced and I don’t have the final bills yet although the estimates had that pretty price—close to a couple of boat bucks (~$2000). What sucks about that is it worked perfectly fine but since Simpson Lawrence has gone out of business, we couldn’t source any seals (we tried for almost 2 years) and it was leaking a ton of water into the forward compartment. So we bit the bullet and replaced it.
All in all, a pretty short list considering the tropes of boat ownership are BOAT: bust out another thousand (dollars) or Cruising: the experience of fixing your boat in exotic places. We definitely lucked out in our choice of vessels—especially considering our naiveté in boat buying matters.
Summary
We’ve spent a lot…a lot… less than I had anticipated over the last 5 years.
The charter option has worked out for us. Being a 2003, the boat already had its maiden dings and dents far in the past and no charterer has inflicted any damage that wouldn’t be accounted for under the heading of normal wear and tear. NYCSS has done an outstanding job in the guardianship department with annual (or more frequent) haul outs, polishing and even a bit of varnishing here and there and making sure everything worked in tip top shape.
With this arrangement we’ve done darn good — even made ~$100 last year — and, excepting the year I backed over the tender’s painter and broke the motor mounts, our annual cost of ownership has been around one to two thousand dollars. That includes moorage, repairs, maintenance, guardianship and insurance. And we’ve been able to sail anywhere from 27–67 days a year. It may not be for everyone and certainly you can’t have the same kind of pride-of-ownership, but having Never for Ever in charter was the right decision for us. I doubt we would have sailed even a quarter as much if we’d sold her and had to charter ourselves.
So as it stands, after 5 years, Never for Ever is pretty good condition still—excellent even. According to periodic checks of Yachtworld, she would likely sell for near what we paid for her. There is a bunch more wear on the sails and we are currently in the market for a new tender so there are still a few things to keep our eyes on. The enclosure canvas is still good but the side panels might need new clears soon, although as they are taken up and down so often they would just get scratched again. Other than that she is still a fairly turn-key vessel with no other major expenses in the foreseeable future—which is a good thing because with Covid-19 and decreased charter revenue, our ownership costs this year are likely to skyrocket, and, what is much worse in my eyes, with potential zero usage by us.
So It’s been a grand 5 years. And I look forward to a whole bunch more and maybe, hopefully, we can get back out and live aboard again for another year — or maybe even longer.
(Disclaimer: as previously noted somewhere in this blog, I am a notorious rounder of figures. The above was just meant to say that overall the cost of owning this particular boat has been pretty affordable. Your milage is definitely going to vary.)
—Bruce #Purchasing
Instagram This Week


#handmade #giftcards #silkscreen #mushrooms @theflora_faunaproject


#screenprinting #mushrooms
Flask Part Deux
A continuation of The Great Flask Adventure.
The structure
When last we left our heroes we had posted a groovy python script: Mark III. This was saved as yacht_app.py in a folder. The rest of the files were built and also stored there. The structure of the folders is thus:
[searchyachtworld]
—yacht_app.py
—[output]
——boatlist.json (a file generated by the app)
—[static]
——
———style.css
——[images]
———artboard.png
—[templates]
——index.html
——results.html
——template.html
Back to the app
The app/python file consists of several parts which mostly consist of mini scripts to render results to a specific template. The simplest is:
@app.route("/")
def home():
return render_template("index.html")
This simply displays the “index.html file which is a basic form. The next is:
@app.route('/results')
def results():
data = []
with open("output/boatlist.json", "r") as jdata:
data = json.load(jdata)
return render_template("results.html", boatlist=data['boats'],predata=data['fileinfo'])
This defines “results.html,” basically calling for it to open using the boatlist.json file as its data.
The next one is “index.html” after the search button is clicked and it uses a form post request to gather the input data an executes the rest of the python script using that data. I am not going to get into that as it’s just a variation of the Book Page scraping.
I did add a bit at the end that reopens the output json file and uses the submitted search parameter to reorder it before moving on to the results page.
@app.route("/", methods=['POST'])
def echo():
#get index form data
if request.method == "POST":
inputcurr=request.form["inputcurr"]
minprice=request.form["minprice"]
maxprice=request.form["maxprice"]
minlength=request.form["minlength"]
...
data = []
with open("output/boatlist.json", "r") as jdata:
data = json.load(jdata)
data['boats'].sort(key=keyparam)
return render_template('results.html', boatlist=data['boats'],predata=data['fileinfo'])
Back to the HTML
Flask uses the template.html file to set all the default elements (header, navbar, styles sheets etc.)
I won’t bother with the code for the index page, but here is the results which is pretty simple. Basically extracting the header information form the “predata” section of the json and then a loop though the “boatlist” to display each boat.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Yachtworld Results</title>
</head>
<body>
{% extends "template.html" %}
{% set active_page = "results" %}
{% block content %}
<div class="page-header">
<h2 class="orange">YachtWorld Results</h2>
<div id="preface">
{% for pb in predata %}
<div>
<p>{{pb.Text}}<br/>Updated: {{pb.Date}}
<br/><a href="{{pb.Creator}}">created by {{pb.Creator}}</a></p>
<p>Price range : <strong>${{pb.Low}} </strong> and <strong>${{pb.High}}</strong> (${{pb.Currency}})<br/>
Boat length: <strong>{{pb.Short}}'</strong> – <strong>{{pb.Long}}'</strong></p>
</div>
{% endfor %}
</div>
{% for boat in boatlist %}
<div class="col-xs-6" style="min-height:170px;">
<div class="col-md-5 text-right ">
<img src="{{boat.Thumb}}" alt="" width="150px">
</div>
<div class="col-md-7">
<h3><a href="{{boat.URL}}">{{boat.Name}}</a></h3>
<p><strong>${{boat.Price}} </strong> / {{boat.Size}}</br>
{{boat.Location}}</p>
</div>
</div>
{% endfor %}
{% endblock %}
</body>
</html>
Pretty simple really…lol.
In conclusion
Anyway I don’t suspect anyone will actually understand/get much out of all this and its here mostly for posterity. There are plenty of resources online to help dig into the code.
I am still playing with it and it will continue to evolve. I did post it on github if anyone is interested in the latest version (I have already added in some bits to handle price errors). I am still searching for host to make it publicly available but anyone can download it from Github if they want to run it on their own server.















I’m filing this under Stupid Human Tricks but it’s not exactly stupid. I am on the fence about gun control (although I agree that some guns really have no place in the marketplace). But this exchange from CBC.ca’s comments really exemplifies one of the core issues. It’s not about the gun, it’s about the social philosophy that states we should all have what we “want” if we manage to work hard enough or have enough money/privilege/connections. Spoiler alert: No, no we can’t always get what we want.