blog.ericd.net - imagineric : interactive design & technology

Shaking a macOS Window

There may come a time when you’d like to shake a macOS application’s window (or one of them) to reinforce an event. In my case, I am creating a macOS application that serves as a conduit to control aspects of a user experience. It communicates with an iOS application which serves as a kind of remote control for the macOS application. And settings are synchronized back and forth. It’s pretty cherry.

macOS Sierra and iOS 10 using Swift 3 are quite similar. I know enough about iOS development to make myself a drunken lumberjack in a glade of birch trees – swinging wildly hoping to hit things. Anyway, I am using MultipeerConnectivity framework for the communication discovery and data transfer (at a top-level explanation). When a connection is made (the iOS app advertises), I turn a little grey dot into a green one to show this state. When a disconnection is made, I turn it back to grey.

However, this might not be enough. I could play a disconnection tone (and I still might), but I wanted to shake the window to let someone know, “Hey! I lost a connection.” This sets expectations and it’s a cool effect I wanted to try out.

I have an extension that will do this, written for Swift 3. It’s implementation is a little different than for previous versions of Swift. Here is the extension. The Cocoa import is because I keep separate extension swift files instead of in-lining everything into a view controller, etc. This keeps things cleaner and a little easier for me and others to find.

I certainly hope that you enjoy it.

Quick & Easy JavaScript/PHP CMS

by Eric Dolecki 0 Comments

I needed to create a website where I could update multiple pages worth of content remotely. It’s a travel blog. I could use WordPress to do this out of the gate, but I wanted to get away from the whole commoditized theme look and feel. Something where I have more control without customizing a lot.

So I created a site structure with multiple pages (one per travel day – ahead of time). Each of those PHP pages has a PHP include for the guts of the content for that day. For example

Easy peasy. That PHP file contains HTML of the contents. So for each day there is a file to include. Each one could contain a lot of information, so I didn’t want to do run down the dynamic population route too far.

So that part is easy. What about editing/adding content to the PHP files remotely? Enter an admin page.

The admin page has a drop-down menu of all the PHP include files. The first one it automatically loaded into a textarea control. You can select different pages and load them into the textarea with some JavaScript.

Easy too. However JavaScript can’t write back to the files, so we POST the text to a PHP script page and that writes to the file (filename and contents are posted).

Easy again. The PHP script takes the variables and uses them to save the data. So with a little PHP and a little JavaScript, we have a CMS system. It’s not robust but rather lightweight. And I have full control over all aspects of how things look, feel, and operate.

Something to consider to avoid the continued WordPress onslaught.

 

Bose QC 35 versus Blue Microphone Mo-Fi

by Eric Dolecki 0 Comments

bose_mofi

I’m lucky enough to have access to both products, the Bose QuietComfort 35 and the Blue Microphone Mo-Fi. The Mo-Fi currently can be purchased from Amazon for $318.99 (discounted from $349.99) and the Bose for $349.99 (no discount offered).

Screen Shot 2016-09-02 at 1.45.50 PMI was told to try out the Mo-Fi by BT himself (Brian Transeau) as he swears by them. That was about a year ago. So I sought the Mo-Fi out and I’ve been using them on and off, with QC25s and then QC35s. A note: The QC35s are wireless BT, the Mo-Fi are wired with a built-in amplifier with three states: off, on, and on+ for some bass boost.

I listen to an eclectic set of music. New Age (Andreas Vollenweider), Electronic (BT, Trentmøller, Sasha, Zomby, etc.), Rock (Rush, Queensrÿche, Afghan Whigs, Led Zeppelin, etc.), Heavy Metal (Megadeth, Iron Maiden, old Metallica, etc.) In no situation has the Mo-Fi bested the Bose sound, even with the on+ setting activated.

Countless hours of listening, I get far more clarity from the Mo-Fi, regardless of what BT thinks of them. I am not taking into account the comfort of either headphone. However, the Bose are 1,025 times more comfortable in my opinion. And far lighter.

It might just be my ears, as the Mo-Fi are indeed highly rated. And BT loves them. He’s a brand ambassador on the Blue website. I just don’t get it. I’ve tried to as the headphones are unique in their appearance. And I like the idea of a powered amplifier (that also saves my phone from some power draw). My audio files are good/great quality. Not listening to vinyl with them –  and perhaps that’s the rub?

I may never know. Putting the Bose back on 🙂

Truefitt & Hill 1805 vs St. James Sandalwood & Bergamot shaving cream


For years I have tried various shaving creams, expensive and cheap – except for XPEC since that’s around $80 a tub. I’ve narrowed it down to 1805 as my favorite go to shaving cream. Taylor of Old Bond Street easily a number two (just about any scent but Eton College it’s amazing).

I read a few wet shavers think that St. James makes a trip notch cream so I had to try it. Then compare it to 1805. 

The scent is not something I can honestly say I love. Let’s get to lathering. It’s a soft cream in a glass jar which is a nice touch since TH come in PVC tubs. Lathering is more difficult but not incredibly so. It definitely takes more water to get going but works up well given a lurker more effort. It’s slick and pleasant and hold up well in the bowl. Using my silvertip brush I can easily get a few passes. The shave is good. 

1805 worthy? Not a chance. 1805 is a dream to work with and the scent is immaculate and a bit more masculine. It’s more slick as well. And I could easily go for six passes which would be asking for trouble. Three is my limit and with Feathers I can get away with two without second thought. 

Is it TOOBS worthy? Again no. I would place it behind. It’s not unpleasant save the aroma, but it lacks the character and ease. Placing it solidly at number three. It’s not cheap and thus this will be my first and my last glass container of the stuff. 

Mount Everest Base Camp Trek

by Eric Dolecki 0 Comments

I’ve been bitten by the Mount Everest bug – just the very idea of it – for a number of years. I worked on a sherpa-inspired work project a many, many years ago and that got me initially interested in the notion of an ascent. Knowing full well that my athletic years have passed me by, my last shot at something would be something like a base camp trek.

Everest base camp sits at 5,364m/17,589ft above sea level. Kala Putter sits at 5,550m/18,208ft above sea level. No small feet – if you pardon the pun. There is 50% of the oxygen at base camp as there is at sea level. Extra oxygen makes you warmer, so 30ºF at sea level is going to feel far colder at altitude.

I’ve found an excellent resource (Everest FAQ) online that documents actually Everest summiting and gear, but much of that should apply to a base camp trek – especially for someone like me who knows absolutely squat about any of it. In fact, it’s a little daft to do such a thing. But I’m not getting older, and the window to physical stuff like this becomes more remote with each calendar year.

I’ve discovered that REI offers a trek as well as Mountain Ram Adventures. Mountain Ram is shorter by about 7 days and thus it’s far cheaper and also probably more accommodating in regards to available calendar. REI is 19 days long, MRA is 12 days long. I wonder if that means MRA is more grueling in terms of acclimatization and miles covered per day.

Another one is ActiveAdventures. They offer a base camp trek too – 19 days and $4,000 per person.

Here is the REI itinerary:

  • Day 2: Explore Swayambunath Temple, Boudhanath Temple, Durbar Square, and more.
  • Day 3: Fly to Lukla and hike through colorful villages to Phakding.
  • Day 4: Hike through fields and villages from Phakding to Namche Bazaar.
  • Day 5: Day hike for our first views of Everest, then return to Namche Bazaar.
  • Day 6: Ascend to the village of Phortse Tenga through rhododendron forest.
  • Day 7: Half-day ascent to visit Pangboche’s impressive monastery.
  • Day 8: Hike to Dingboche, the highest permanent Sherpa village in the Khumbu.
  • Day 9: Day hike to remote monastic caves and views of Makalu.
  • Day 10: Traverse the Pheriche Valley and ascend past the Khumbu glacier.
  • Day 11: Depending on weather, climb Kala Patar or hike to Everest Base Camp.
  • Day 12: Depending on our previous day, climb Kala Patar or hike to Base Camp.
  • Day 13: Cross Pheriche Pass before arriving at Tengboche Monastery.
  • Day 14: Trek to Namche Bazaar, with views of Everest, Lhotse, and Ama Dablam.
  • Day 15: Leave Namche Bazaar and descend to Phakding Village.
  • Day 16: Hike to Lukla and enjoy a final night in a comfortable lodge.
  • Day 17: Return flight from Lukla to Kathmandu, weather permitting.
  • Day 18: Free day to explore more highlights of the Kathmandu Valley.
  • Days 19: Our Everest Base Camp trekking adventure ends today in Kathmandu.

And the MRA itinerary:

  • Day 01: Early morning fly to Lukla and then trek to Phakding.
  • Day 02: Phakding to Namche (3450 m)
  • Day 03: Namche rest for acclimatization.
  • Day 04: Namche to Tengbuche (4 to 5 hours)
  • Day 05: Tengbuche to Dingbuche (5 to 6 hours)
  • Day 06: Rest at Dingboche for further acclimatization
  • Day 07: Dingbuche to Lobuche (4 to 5 hours)
  • Day 08: Lobuche to Gorakshep – EBC- Gorakshep. (5 to 10 hours)
  • Day 09: Gorakshep to Kalapatther and down to Pheriche 6 hours trek.
  • Day 10: Pheriche to Namche (6 hours of walking down)
  • Day 11: Namche to Lukla (7 hours of walking down)
  • Day 12: Lukla to Kathmandu (early morning flight, 30 minutes)

The highlights of the 19 days AA:

  • Trek to Everest Base Camp
  • Explore the colourful and vibrant city of Kathmandu
  • Visit Namche Bazaar Hike through Sherpa villages
  • View Mt Everest from Kala Patthar
  • Visit Swayambhunath “Monkey” Temple

Here is a lovely video documentary made recently (MRA).R

Here is a slideshow of images from the REI (I believe).

And finally one from active adventures

So begins the thought progress of all of this.

Gerlach Enigma update


Incredible. What an awesome beater. The only thing I don not like about this watch is the concentric rings on the sub dials, because they reflect a lot of light which sometimes makes it look like there is a scratch or two on the domed sapphire. There never is, and I’ve banged this watch against door handles galore. It’s a great watch and as a bonus I wear my Polish pride on my wrist. 

Soylent Coffiest taste review

I’ve waited a day to try one of the Coffiest that arrived this week. I waited for it to chill in the garage refrigerator. 

First thing. Opening is now a joy. You only need to remove the outer wrapper around the cap! No more secondary pull film over the opening (which I always found maddening). Kudos Soylent!!!

The taste. It’s more like a darker chocolate bar than coffee. Much more. With a delightfully nutty after tone. I didn’t care for it much but it’s a stronger flavor than straight Soylent 2.0. It’s grown on me and now I like it. It also feels a little thicker in the mouth. 

I’ll pair this with regular 2.0 and add it to my routine. 4/5 stars. 

CVS Pay? Come on…

The number of times I frequent a CVS a year can probably be counted on one hand. CVS has been anti-Apple Pay for some time. But a barcode based payment system requiring a CVS application? I’m sorry but that’s pretty lame. 

Just adopt a nearly defacto standard already. Like Apple Pay. Quick, easy, and secure. Google Wallet for the others. It’s worth having a tiny cut taken. 

I already visit Dunkin Donuts more because     of Apple Pay. Bang, done. Value your customers over yourself. 

Do not buy boutique faucets online. 

Holy shit. We learned the hard way not to buy faucets online. We’re now paying for it in both times and money. 

We bought some vintage looking stuff with the labeled porcelin handles online because we couldn’t find them at Home Depot or Lowe’s and Kohler wanted $1,200 each for them. We still paid close to $250 each. I won’t mention the brand yet. 

Missing parts, non-standard size for parts, short stems, broken parts shipped in the box, etc. Our granite guy told us never go with online stuff because it always ends in nightmare situations. We thought all this stuff was standard-based. Nope. He mentioned how a woman bought a $800 fancy shower valve and he had to tear most of a wall or to install it because it was so custom and awful. 

So we’re on week two without a matter bathroom we can use because we need the sinks done for the hardware which doesn’t fit because of non-standard sizings, and we have no tile on the floor because the counters need done first. And no toilet until the tile is done. 

Ducking joy. 

Coffiest from Soylent. Caffeine costs $16 more?

coffiest_gallery1.bb02355898bd

I’ve been a Soylent 2.0 subscriber for a long time now. Since April on subscription, I’ve been buying it for a while longer than that. Soylent has now come out with Coffiest – still 400 kcal but now with the addition of the equivalent of a 16oz. cup of coffee. 50mg of caffeine. This is very cool – as I always have coffee in the morning and generally enjoy a Soylent 2.0 bottle in the commute to work.

The pricing seems a little wonky however. I get 24 bottles a month per subscription for $58.00 (a savings of $10). If I want to change it to Coffiest, the same 24 bottles will be $74.10 (a savings of $3.90). $16.10 more for the Coffiest. $1.50 more per bottle. I can brew my own coffee for far less than that and it can be whatever flavor I’d like from fresh beans. The bottle is beautiful I’ll add.

They have added some things to smooth out the caffeine delivery, so I don’t think they just dumped some caffeine into each bottle.

In addition, Soylent is coming out with a nutrition bar called Soylent Bar. 250 kcal and macronutrient breakdown of 38/43/19 percent fat/carb/protein. The bar is not available for order yet.

So will I change to Soylent Coffiest? Probably not right now. I’ll wait for some reviews online and then get a box of 12 or something before I commit.

I am still waiting for Huel to make it to the United States (delivery restricted by the F.D.A. at the moment). I also like Ambronite quite a lot, even with it tasting like chlorophyll mixed with nuts. Very expensive.