KyleHQ

Honest, loyal, senior software engineer, looking to make a real difference by putting people first.

KyleHQ © 2024
Svelte Gotcha - Tailwind Inline Styles

Svelte Gotcha - Tailwind Inline Styles

Svelte comes with a bunch of little tweaks and snippets to make common UI behaviours easy for you and I to implement. One such behaviour being the applying of a custom css style to emphasise a dom element, eg this button or link is “active”. From the the Svelte tutorial itself https://svelte.dev/tutorial/classes This is such a common pattern in UI development that Svelte includes a special directive to simplify it

Read more...
September 22, 2021
|
code
|
feedarmy
|
sveltejs
|
tailwind
Celebrating Oneself

Celebrating Oneself

Motivation zero. Laughter unheard of. I am pretty sure that I personally, am at my lowest point thus far inside the pandemic. To be 1000% clear, I in no way, want to diminish the pain, anguish or loss that so many have felt thus far throughout the pandemic. In general, I actually have it pretty good. Although we have friends whom have had Covid deaths, I personally have not lost anyone close to me.

Read more...
September 13, 2021
|
personal
Svelte Gotcha - The Reactive Microtasks

Svelte Gotcha - The Reactive Microtasks

One of the USP’s of Svelte is of course its “reactivity”. As their homepage proudly declares No more complex state management libraries — Svelte brings reactivity to JavaScript itself And on any given day, developing with Svelte and its reactive nature is simply a dream to use. You can tell Svelte to track state changes on practically anything using the $: directive. And it’s quite likely that your first reactive changes will produce all the expected UI results.

Read more...
August 30, 2021
|
code
|
feedarmy
|
sveltejs
The Brilliance of SvelteJS Stores

The Brilliance of SvelteJS Stores

One of the (in my opinion) most useful components of the Svelte library is that of “stores”. You can read the official documentation here, but in short, a Store is a reactive object in which you “subscribe” to state changes from any component inside your application. Furthermore, stores can be “derived”. Eg a stores value can be based on the value of one or more other store instances. For me however, things get really interesting with the creation of “custom” stores.

Read more...
June 13, 2021
|
code
|
feedarmy
|
sveltejs
Why I Chose Svelte

Why I Chose Svelte

It had been years since being fully immersed in the “frontend” realm as the majority of my professional career had always leaned towards server side, backend and infrastructure roles. A lingering pain point that I had been “putting off”. But I knew if I wanted Feed Army to be in any way successful, it would need a pretty sharp UI. The hurdle of course being that my last forays into the “new” frontend developments were just not at all enjoyable.

Read more...
June 4, 2021
|
code
|
feedarmy
|
sveltejs
Feed Army

Feed Army

#UPDATE: 9 May — we are having issues connecting with Instagram at this stage in the production environment. My apologies as I deal with Facebook to rectify error. Connect up with Twitter as they know what they are doing… Having been originally frustrated with Instagrams' user experience and your common web browser, I researched what available browser based extensions or services were available to aggregate my own personal social media feeds.

Read more...
May 1, 2021
|
code
|
feedarmy
|
go
|
sveltejs
|
tailwind
Go Templates - a final outcry

Go Templates - a final outcry

Working with Go templates, being a compiled language, is not always an easy task. And I have definitely had my fair share of gnashing of teeth in past which you can easily refer to here and here. So when I started a new Go project that required a web view component, I decided to take my past learnings and create a public package that will hopefully, remove most of the hurt from your rendering needs too.

Read more...
March 18, 2019
|
code
|
go
Another year of interest?

Another year of interest?

Wow….it’s been quite “the” year. At the LGBTQ party hosted by the US Embassy in Mexico I’m not sure how most measure their years??? I measure mine not only by time, but by distance as well. We just need to to define our distance metric =] So what has changed? Well, I no longer fear or doubt myself. That’s a biggie! Opinions are just that. Social media aghhh…reach out rather than opt in!

Read more...
November 21, 2018
|
personal

Sad beautiful truths

Serendipity played it’s part yesterday. A series of events that lead me to an open invitation track day at Hampton Downs. With summer drawing to a close here in New Zealand, and my bike going back into storage due to overseas committments, “scratching” on a track day was the perfect way to end the season. But it wasn’t the thrill of the 20 somethings on their sports bikes being left in my wake on my “tourer” that I enjoyed most.

Read more...
April 1, 2018
|
personal
|
motorcycles

MyDigest - A learned journey

Luckily and happily, I’m always in an ongoing pursuit to level up my knowledge. For me personally, I’ve found the best way I learn is not by reading, but by building instead. With that, I present to you my latest online application: Starting simple and small, MyDigests' current purpose is to deliver a daily sales digest to retailers using the Vend POS Retail platform. We have much larger future goals, but we plan to grow with the feedback of our users into different data sources and broadcasting mediums.

Read more...
August 1, 2017
|
code

Golang Templates - An Addendum

Dealing with DOM Ready. Note: If you haven’t been playing the at home game, then I suggest you read the first <a href="{{ relref . “golang-templates-what-I-missed.md” }}">post here, otherwise let’s assume that you have a directory structure like the following. main.go templates ├── _footer.html ├── _header.html ├── layout.html ├── templates.go └── user ├── dashboard.html The problem: ensuring that any JS snippets defined throughout your application templates are executed with a valid DOM available.

Read more...
June 2, 2017
|
code
|
go

Golang Templates - What I missed!

TLDR Don’t include {{define}} calls in your templates parsed with template.ParseFiles(). Know that template.ParseFiles() will overwrite any reference to a template with the same filename, not filename and path! Go look at the way I now parse my application templates here - https://gitlab.com/snippets/1662623. Otherwise feel free to stick around and read why =] So what’s the issue? Having happily built out the backend of a little Golang app I’ve been working on, I’ve refocused my attention to the frontend.

Read more...
May 21, 2017
|
code

Qupid - A Golang Queue

In my experience working with Golang thus far, I encounter a pretty regular requirement to fetch some sort of data, process the data accordingly and then persist or send the output. Naturally the use of Golangs' channels really shines here, but you still need a little orchestration to tie your channels together. Publish to one and subscribe to another along with the ability to stop processing as and when required too!

Read more...
March 2, 2017
|
code

What JSON?

If you’re one to consume JSON api’s (who isn’t really?), then it’s likely you’ve bumped into the issue of figuring out whether the resource you just called is returning a single JSON object or an array payload. As per the JSON API Spec, The document’s “primary data” is a representation of the resource or collection of resources targeted by a request. Primary data MUST be either: a single resource object, a single resource identifier object, or null, for requests that target single resources an array of resource objects, an array of resource identifier objects, or an empty array ([]), for requests that target resource collections To help out all the Gophers out there, I created a simple little helper package to figure it out for you.

Read more...
December 31, 2016
|
code

Lessons in Golang - Goroutines and Channels

Recently I made publicly available an in memory scheduler written in Golang, https://gitlab.com/kylehqcom/kevin. Writing code for public consumption is always something of a scary exercise. Knowing full well the critiques, scrutiny and chin rubbing that will come from your peers and non peers alike. But being an optimist I appreciate any feedback. Good or bad it is always greatly received as it all just helps with the learning. My goal here is to share some of that learning, mistakes and “a ha” moments I have found in developing with Go.

Read more...
September 1, 2016
|
code

29 Days in Murica No.2

Las Vegas I certainly had expectations before entering Las Vegas. Most were met. But other experiences I encountered I hadn’t expected at all! I mean the bar was well ‘n truly set exiting the plane “offramp”, walking through the airport doors and being faced with an entire wall of slot machines. Forget airport security, just give us some coin! The start of an underlying theme was beginning to occur. Making our way from our gated “trailer park” community towards the “strip”, the shear scale began to bed in.

Read more...
August 30, 2016
|
travel

29 Days in Murica No.1

Having recently spent 29 days in the good ol U S of A, I wanted to share just some of that experience with you. How better than to list 29 sights, sounds, emotions invoked and/or “things discovered” along the journey. *God knows I wanted and had every expectation to be writing these posts in transit. But to be perfectly honest, I’m actually glad I just let the road get in the way.

Read more...
August 19, 2016
|
travel

Someone got spoilt this year

Each year, we all get to enjoy travelling around the circumference of the sun a.k.a your birthday. Some take this time to reflect. Others try find a new youth and binge themselves at the bottom of a bottle or a handful of pills. This year, my lovely lady decided to surprise me and change it up! Knowing I’d nudged a fair amount of speed via the 2 wheeled variety, and that I’d be petrified of jumping from a perfectly good plane, she did the next best thing.

Read more...
February 9, 2016
|
personal

Speaking of a little more speed

Being new to the bike, it’s always a good idea to bed yourself in. Find out traits and characteristics that could save your ass on the road. The best place to do that is on the track. Period. Though a little daunting at first, once you get over your pre track nerves and put down a couple warm up laps, you begin to appreciate how much of a controlled and safe environment the track is.

Read more...
December 4, 2015
|
motorcycles

Back to something familiar

After enjoying all the outright speed of the MV Agusta F4, and the touring capabilities of the BMW GS1200, coming back to NZ I knew I wanted something in between. Meet the new addition, a KTM 690SM Prestige. The previous Yamaha XT660X was/is mechanically a strong bike. It just lacked a little “punch”. The above KTM comes with an after market exhaust & air filter. Plus a power commander kit with auto tuner installed.

Read more...
December 2, 2015
|
motorcycles

Track Notes 2 Always Learning

There’s something about being on a bike that endears me. Sure there’s the thrill of the front wheel popping up, being thrown back in the seat, and the sound of your tyres clinging on by a knife edge. But it’s the mastery that really grabs me. That balance of pushing yourself and your machine to your “perceived” limit. There’s a couple of things that I’ve learnt in “my time” thus far.

Read more...
November 3, 2015
|
motorcycles

Track Notes 1 Brake early…

Just because you can go as fast as you want on a track, doesn’t necessarily mean that you should! Though its a little hard to notice from this camera angle, the end of the straight finishes with a down hill. Just to make things interesting when you want to slow the f%#k down! Run off areas for the win!

Read more...
October 23, 2015
|
motorcycles

Through the other side

So as much as I want to screen a video of the alpine roads that followed the Stelvio climb, I am actually “through” the other side of something completely different. A month free hiatus from sugar, coffee, alcohol and social media! The first week was the worst “mostly”. Changing habits is hard. My normal coffee commute had to be replaced with a “new and improved” habit. Green tea for the win!

Read more...
October 1, 2015
|
travel
|
motorcycles

The Stelvio Run

After crossing through an Italian border, cruising through beautiful alpine roads and taking in the scenery, there was just one more mountain face to conquer. How happy am I another 48 hairpin turns later! Crazy crazy piece of road! And an epic hot summer day to be riding this pass. I was giggling in my helmet all the way up, and I thanked it all the way down? I have plenty more footage so here are some of the highlights.

Read more...
August 24, 2015
|
travel
|
motorcycles

The best still yet to come!

Making my way from Austria towards the Stelvio Pass. Plenty of alpine roads and such a glorious day to enjoy them! I could have quite happily done a u-turn and re-discovered all over again! Super glad it’s not winter, check out the poles used to mark the roads.

Read more...
August 18, 2015
|
motorcycles
|
travel

End of the day

End of the day. All my money troubles behind me and some long miles complete. Swim time and a good sleep ready for Stelvio tomorrow!

Read more...
July 12, 2015
|
travel

Late in the day

Late in the day, winding through narrow roads in Switzerland. Trying to make Liechtenstein before night fall.

Read more...
July 12, 2015
|
travel

Kiwibank comes to the party

I’m really starting to appreciate firms like PowerShop, Vend and Kiwibank. They “get” that given the opportunity, they always want to do right by the user. Thanks Kiwibank. A mistake was made and you admitted so. You took responsibility. An adult and respectful conclusion was made #winning. Though I would try to change the ability to take control over Visa/Western Union timeframes. Either way, I’m not about to jump ship just yet =] Here is the raw response.

Read more...
July 10, 2015
|
travel

When Switzerland says “Haaay”

That’s Obersee or Lake Constance in the background.

Read more...
July 8, 2015
|
travel

When Switzerland says Hi

After making my way through some quaint, narrow, back country German roads, I make my way into Switzerland. Welcomed by a stinking hot day, green lush fields and a mountain range in the background. Looking super forward to passing through those!

Read more...
July 8, 2015
|
travel

Back roads

Set up the Navie to avoid all highways and toll roads. Took me on some picturesque Germany countryside.

Read more...
July 8, 2015
|
travel

Bitchin'….literally.

Welcome to Bitche, France. Clearly this wasn’t a destination I “actively” sort out to visit. You can blame Garmin and the Navie for that! But what a pleasant little surprise! And in the centre, a citadel that you can see from the run into town. Something of a sight.

Read more...
July 7, 2015
|
travel

Open borders

I love these open borders!

Read more...
July 6, 2015
|
travel

Flip the coin.

My given name is Kyle. It’s origin is to mean a “narrows, channel or strait”, but it’s also has another definition. “The fair one”. I can’t help but wonder about the German soldiers whom stood and fought for their homeland. Much has been said from outside Germanys' borders and the condemnation of the Nazi’s (for countless despicable reasons). But looking at this monument quietly located through rolling farm lands, were these names not from sons, brothers and fathers?

Read more...
July 6, 2015
|
travel

Wine much?

For those who don’t know, I normally reside on an island called Waiheke. Due to a barrier of water between itself and the “mainland”, the island climate & temperature lends itself well to grapes. So I’m clearly not new to vineyards (also have you landed at Blenheim airport?). But winding my way down into a valley that follows the Rhine, you’re greeted with what at first looks like rolling grass fields but turns out to be more vines than I care to imagine.

Read more...
July 5, 2015
|
travel

Stranded in EU by Kiwibank

TLDR: Someone didn’t do their job. Note that this post isn’t aimed at anyone personally. I’m sure all involved were trying to do their best to resolve the situation. But Kiwibank, you can do better. Lets make amends. Current Situation. I have €22 Euros in cash. I have an approx range of 80kms of fuel left in my tank. I am 385kms from home base. Although I have funds, I have no access to them.

Read more...
July 4, 2015
|
travel

Meet Option B.

As the old adage goes, when you get given lemons, make lemonade. I’ve been “eyeing up” the BMW R1200GS for a little while now. Being that it’s a bike that can tour the globe. And now with Agnes parked up in the garage being reserved for race tracks and autobahns, what better opportunity to check out how this bike performs? First impressions: The sheer size of the thing is daunting to start of with, but for a 1200, she is remarkably light on the bars.

Read more...
June 23, 2015
|
motorcycles
|
travel

The reality of a superbike

My F4 MV Agusta (Agnes) is a drop dead gorgeous piece of machinery. At any given stop tourists take photos. Even regular bikers at the Nürburgring pull their cameras to capture the red trim and clean racing lines. On top of the looks, she does one thing very, very, well. Speed. I’m not even close to harnessing her potential (yet). With a strong raw acceleration which sits you back in the seat and an ever present eagerness to always go faster, Agnes devours the road ahead.

Read more...
June 22, 2015
|
motorcycles

All the major brands

All of the major brands. Kawasaki, Ducati, MV Agusta and Suzuki….

Read more...
June 22, 2015
|
motorcycles

Agnes shock horrors

250kms from home, the battery light flashed red on my dash. After locating the blown fuse, we “happened upon” a spare 30amp fuse in our luggage. On restart, we were charging again….until 400mtrs down the road. Out of fuses, we unplugged the main headlamp and decided to see how far we could get on the battery alone. Surprisingly not that far… After making the “AA” call, we had to wait a couple hours.

Read more...
June 19, 2015
|
travel
|
motorcycles

Norway, you broke me.

Someone didn’t get the memo. The open speed limit in Norway is 80kmph**. For those of you who haven’t been playing the home game, the bikes we are riding only get comfortable at 150kmph upwards. So what does this mean? Pain. And plenty of it. For the non bike riders in the audience, pain and discomfort on a motorcycle leads to fatigue. Fatigue leads to bad. It’s a simple equation.

Read more...
June 19, 2015
|
travel
|
motorcycles

Denmark Best Western

750km down today. Feeling remarkably better off than I was expecting and there is a couple reasons why. Autobahn kilometres are easy kilometres. You can soon clock them up. Both the Ducati and the Agusta are built for speed. They likey likey open speed limits! Without speed restrictions, everything on this bike makes sense. Without speed restrictions my race suit makes sense. At 150kmph, there’s enough air flow to get the bikes temperature down to a respectable level.

Read more...
June 14, 2015
|
travel

It’s go time!

Mount your trusty steed and take to the wild blue yonder. In theory we are ready….but we know that in 12 days time, we will be broken men. Both of these bikes are gorgeous. I beg you differ. With either of these, on the track, you are the lord of the domain and in a straight line (we likes curves of course), you will be left wondering where we’ve gone?

Read more...
June 13, 2015
|
motorcycles
|
travel

One less thing…

It’s official. It’s done. One less thing. After putting on the new plates, one needed to take their new bike on her first little ride. How “better” than the Nürburgring??? I mean, taking a simple cruise around the quiet back roads, to get accustomed to the new riding position, bike dynamics, brakes, horsepower and handling, not to mention riding on the opposite side of the road. That stuff just sounds like child’s play.

Read more...
June 12, 2015
|
motorcycles

Jumping through the hoops

Getting all “legal tegel” for a new motorcycle registration is a strange manual process here in Germany. License plates are assigned to the city in which you live. So if you move town, you have to re-register your vehicles and get the plates changed? A “bit” back-forwards if you ask me. Once you get through the paper work, you then make the walk down the road to the old lady who actually presses the metal plates.

Read more...
June 11, 2015
|
motorcycles

Welcome to Germany

I like the train. I like the trains in Germany. They are on time. They are fast. I also liked the helpful staff at the ticketing booth, and their advice on paying for my ticket on the train due to their booking system failure. Making sure I didn’t miss the next train on route. What I didn’t like though was the conductor whom later attempted to process my ticket. Before telling me that my card didn’t work (which has and does), giving me lip for not having cash, taking my passport and “bitching” about NZ and claiming that my destination address didn’t exist.

Read more...
June 11, 2015
|
travel

No more beer

Note, this is the last beer I’ll be having for some time. Especially with Shoei in hand.

Read more...
June 11, 2015
|
travel

Go cup go!

The little cup that could.

Read more...
June 10, 2015
|
travel

The wait game

A lot of waiting going on. Planes & airports.

Read more...
June 10, 2015
|
travel

If you are sick, stay home.

My place of work, www.vendhq.com, has a good rule. If you are sick, then respect your fellow workmates. Stay home. Get better for yourself and don’t risk potentially passing on your sickness to your colleagues. If only the passenger whom boarded my last leg of my 25 hours plane ride had done the same… The family of 4 made a fuss from the start, trying to move their seating arrangement. I couldn’t understand what they were saying due to a language barrier, but I was irked by their disposition none the less.

Read more...
June 10, 2015
|
travel

Did someone mention a Camera?

So I previously mentioned my Drift Ghost HD action cameras. Don’t get me wrong, they take a pretty good still. But really, their sole purpose is to be strapped to my bike snapping up video of my knee down. So for the better exposures, I wanted something a little more professional, but still designed with action in mind. Meet the Olympus Tough TG-850 Waterproof to 10 metres out of the box, macro and landscape shooting modes and of course video if you want too.

Read more...
June 8, 2015
|
motorcycles

Lights, Camera….Action

There has been a stalwart in the action video camera world for some time now. Mention the term GoPro and everybody will know what you’re referring to. However, I knew that competition wouldn’t be far behind, so before embarking on my trip, I made sure I did some homework before making any camera purchases. Introducing the Drift Ghost S So what makes the Drift my action camera of choice?

Read more...
June 8, 2015
|
motorcycles

Good friends aren’t dicks

Most people these days can count their best friends from the fingers of both hands. Personally I think myself pretty darn special lucky knowing that I have all but one. I don’t mean those kind of friends you +1 or Like or whatever else you crazy kids are twatter flapping about. I mean the kind of friends that are dependable, loyal and honest (even when it hurts). The ones you’d travel half way around the world just to pop in for a cup tea and shoot the breeze.

Read more...
May 20, 2015
|
personal

Are you really getting that bike?

For all those who asked from my first video post, I can say yes, technically I am getting that bike in the video…just not the one you think. The actual bike was shown in the screen of my phone. Furthermore, it’s not one I am getting, it’s the one I now already have! Granted it wasn’t the race limited addition, but a 2007 MV Agusta F4 1000S is not something to sneeze at (in my opinion).

Read more...
May 7, 2015
|
travel
|
motorcycles

Much Excite!

Much excite for June 2015! Off to Germany (and Norway, Italy, Croatia) to go pick up a new toy I’m bringing back to New Zealand. 

Read more...
April 30, 2015
|
travel
|
motorcycles