-
-
-
+ {% include 'meta.html' %}
+{%- if summary -%}
+
+{% else %}
+
+{% endif %}
+
+
+
+{% if title %}
+
+{% else %}
+
+{%endif %} {%- if summary -%}
+
+{% else %}
+
+{% endif %}
+
+{% if tags contains "post" %}
+
+{% else %}
+
+{% endif %} {% if tags
+contains "post" %}
+
+{%- endif -%}
+
diff --git a/src/posts/2012-09-08-initial-commit.md b/src/posts/2012-09-08-initial-commit.md
index 58c884c..e7a5e74 100644
--- a/src/posts/2012-09-08-initial-commit.md
+++ b/src/posts/2012-09-08-initial-commit.md
@@ -1,10 +1,13 @@
So finally, after many years of world class procrastination I finally have my first site
+---
+
And what a beauty she is! From start to finish this site has taken me about 2 days to complete _(and many more tinkering)_. To say I'm pleased is an understatement, not only because it has taken me so long to get this far but also because I did it under my own steam.
I'd like to send out a special thanks to [David Darnes], for helping me not only with my snazzy logo but also solving a few of the irritating bugs webkit and friends threw my way.
### So who am I?
+
I'm Rob, a developer from Great Britain. I started coding in 2007 while at school with ASP.NET, a lot of people dislike .net and personally I don't blame them. But looking back there was a lot of good stuff in the .net framework if you knew what you were doing from the outset... I clearly didn't!
So one thing lead to another and I made the switch to PHP. Moving over was a breath of fresh air from the often complicated world of xml config files and code behind files. Initially I started using Kohana after being recommended by [Richard Standbrook], but I also dabbled in WordPress after discovering its ability to get a basic site up in minutes.
@@ -12,7 +15,8 @@ So one thing lead to another and I made the switch to PHP. Moving over was a bre
It wasn't until working on the famed Jigoshop plugin that I discovered all the new things that WordPress could do such as custom post types, routing to name just a few. I also had good fun learning about working on a distributed product to boot!
### What's occurring
-Like many in my world I decided I should start writing some of my *eureka* moments down so:
+
+Like many in my world I decided I should start writing some of my _eureka_ moments down so:
1. I now have a reference to check incase I've forgotten how to do something.
2. Hopefully I can save someone else who's in the same boat some bother.
@@ -20,21 +24,21 @@ Like many in my world I decided I should start writing some of my *eureka* momen
### Credit where due
-* [Peter Rhoades] - for helping with the logo and setting up the site.
-* [Matt Kersley] - for providing some much needed illustrator help.
-* [Laura Kalbag], [Jack Franklin] and [Rachel Shillcock] - for motivating me to finally get around to creating this blog.
-* [Chris Coyier] - for providing the fantastic tutorials on [CSS-Tricks].
-* [Github] - for providing a platform for me to use and just generally being awesome!
+- [Peter Rhoades] - for helping with the logo and setting up the site.
+- [Matt Kersley] - for providing some much needed illustrator help.
+- [Laura Kalbag], [Jack Franklin] and [Rachel Shillcock] - for motivating me to finally get around to creating this blog.
+- [Chris Coyier] - for providing the fantastic tutorials on [CSS-Tricks].
+- [Github] - for providing a platform for me to use and just generally being awesome!
It's going to be a fun ride and I hope you enjoy reading my posts as much as I enjoyed creating them :)
-[David Darnes]: https://twitter.com/daviddarnes
+[David Darnes]: https://twitter.com/daviddarnes
[Richard Standbrook]: https://twitter.com/richstandbrook
-[Peter Rhoades]: https://twitter.com/createdbypete
-[Matt Kersley]: https://twitter.com/kersley
-[Laura Kalbag]: https://twitter.com/laurakalbag
-[Jack Franklin]: https://twitter.com/Jack_Franklin
-[Rachel Shillcock]: https://twitter.com/missrachilli
-[Chris Coyier]: https://twitter.com/chriscoyier
-[Github]: https://github.com
+[Peter Rhoades]: https://twitter.com/createdbypete
+[Matt Kersley]: https://twitter.com/kersley
+[Laura Kalbag]: https://twitter.com/laurakalbag
+[Jack Franklin]: https://twitter.com/Jack_Franklin
+[Rachel Shillcock]: https://twitter.com/missrachilli
+[Chris Coyier]: https://twitter.com/chriscoyier
+[Github]: https://github.com
[CSS-Tricks]: https://css-tricks.com
diff --git a/src/posts/2012-10-11-pattern-passwords.md b/src/posts/2012-10-11-pattern-passwords.md
index 926c3f5..029339d 100644
--- a/src/posts/2012-10-11-pattern-passwords.md
+++ b/src/posts/2012-10-11-pattern-passwords.md
@@ -1,3 +1,7 @@
+---
+summary: An exploration into different authentication techniques
+---
+
Let's face it we all hate coming up with a password, especially if we forget what it is!
Meet my old password, it was a 12 character monstrosity full of numbers, punctuation and buckets of frustration! In the end I decided enough was enough this password had to go, but what would be it's replacement? The answer lay in Android's pattern lock screen.
diff --git a/src/posts/2012-10-22-deue-1-2.md b/src/posts/2012-10-22-deue-1-2.md
index afa27a1..10f6cc7 100644
--- a/src/posts/2012-10-22-deue-1-2.md
+++ b/src/posts/2012-10-22-deue-1-2.md
@@ -6,6 +6,8 @@ It's been a while but Deue's finally been in for a facelift. Say hello to 1.2
This update brings with it a new shortcode which allows you to show when the post is expiring either as a date or a really simple javascript powered countdown
+---
+
You can grab the latest over at codecanyon, that's all folks!
-__I'm sorry, Deue is no longer available on codecanyon.__
+**I'm sorry, Deue is no longer available on codecanyon.**
diff --git a/src/posts/2013-02-28-suit-and-tie.md b/src/posts/2013-02-28-suit-and-tie.md
index ddd3eb0..b7a01f9 100644
--- a/src/posts/2013-02-28-suit-and-tie.md
+++ b/src/posts/2013-02-28-suit-and-tie.md
@@ -6,6 +6,8 @@ So I realise it's been a fair while since my last post here, but I have been bus
With 2013 (now in full swing) I wanted to repaint my little corner of the internet. I probably did it out of habit, I tend to get the paint & brush out during this time of year.
+---
+
I liked my old colour scheme, it was a good footing and was leaps & bounds ahead of the blank page previous to it. But as with all initial versions there were a few problems.

diff --git a/src/posts/2013-04-24-small-tool-to-help-look-after-your-eyes.md b/src/posts/2013-04-24-small-tool-to-help-look-after-your-eyes.md
index 57acce3..7fd1aef 100644
--- a/src/posts/2013-04-24-small-tool-to-help-look-after-your-eyes.md
+++ b/src/posts/2013-04-24-small-tool-to-help-look-after-your-eyes.md
@@ -4,6 +4,8 @@ title: A small tool to help look after your eyes
Both my parents have to wear glasses and a number of my friends do too and while it's recommended that we all take a 5 minute break for every hour we work at a computer very few of us really do.
+---
+
There are a bunch of mac apps out there that do the job, one that comes to mind is [Time Out](https://www.dejal.com/timeout/). While it does the job it did get a little annoying after a month or so. Instead I decided to use my screens brightness to dictate when I should take a break.
After some searching I found a great [little terminal app](https://hints.macworld.com/article.php?story=20090901021817717) which wraps OSX's brightness settings into something I can work with.
diff --git a/src/posts/2013-04-25-easy-digital-downloads-receipt-bcc.md b/src/posts/2013-04-25-easy-digital-downloads-receipt-bcc.md
index 610b777..c469490 100644
--- a/src/posts/2013-04-25-easy-digital-downloads-receipt-bcc.md
+++ b/src/posts/2013-04-25-easy-digital-downloads-receipt-bcc.md
@@ -1,5 +1,11 @@
+---
+summary: Earlier this evening Pippin, author of Easy Digital Downloads tweeted about an idea for a simple little plugin to extend EDD's customer receipts
+---
+
Earlier this evening Pippin, author of Easy Digital Downloads tweeted about [an idea](https://easydigitaldownloads.com/support/topic/send-a-copy-of-the-receipt-to-another-address/) for a simple little plugin to extend EDD's customer receipts, sending blind copies to email addresses specified in the admin.
+---
+
Interested to have a go I opened up my code editor and got cracking. After a while I had myself a working plugin which is now [available on github](https://github.com/studioromeo/edd-bcc)!
Cheers guys!
diff --git a/src/posts/2013-06-11-using-guard-phpunit-with-composer.md b/src/posts/2013-06-11-using-guard-phpunit-with-composer.md
index 9f22afb..7044571 100644
--- a/src/posts/2013-06-11-using-guard-phpunit-with-composer.md
+++ b/src/posts/2013-06-11-using-guard-phpunit-with-composer.md
@@ -4,6 +4,8 @@ title: Using guard-phpunit with composer
While reading through a book on unit testing with PHP I ran into a few issues using guard with phpunit. This article guides me (and maybe you) through the process of installing & configuring guard with PHPUnit.
+---
+
First of we need to install phpunit globally using composer. To do this create a new hidden directory called .composer/packages in your home folder
```bash
@@ -20,7 +22,7 @@ Then inside that directory create a new composer.json file and fill it with your
}
```
-Install phpunit by running composer install, this will install phpunit and all of its dependencies. After its completed we then need to edit our __$PATH__ variable so we need to edit our `~/.bash_profile` with the following
+Install phpunit by running composer install, this will install phpunit and all of its dependencies. After its completed we then need to edit our **$PATH** variable so we need to edit our `~/.bash_profile` with the following
```bash
export PATH=$HOME/.composer/packages/vendor/bin:$PATH
diff --git a/src/posts/2013-11-12-anchor-cms-in-laravel-part-1.md b/src/posts/2013-11-12-anchor-cms-in-laravel-part-1.md
index d29e97c..a23c40f 100644
--- a/src/posts/2013-11-12-anchor-cms-in-laravel-part-1.md
+++ b/src/posts/2013-11-12-anchor-cms-in-laravel-part-1.md
@@ -1,3 +1,7 @@
+---
+summary: Part 1 of building AnchorCMS in Laravel. I really like AnchorCMS, its super clean and simple and I like the extensibility of Laravel. Can we combine the two?
+---
+
{% include 'video.html' src:"https://www.youtube.com/embed/edRbZJ7NXTM" %}
This took me an age to prepare, probably the hardest 3 minutes of my life but here it goes. The transcript is below incase anyone wants to read through.
diff --git a/src/posts/2013-12-02-anchor-diary-migrations.md b/src/posts/2013-12-02-anchor-diary-migrations.md
index 785becd..cd28ca5 100644
--- a/src/posts/2013-12-02-anchor-diary-migrations.md
+++ b/src/posts/2013-12-02-anchor-diary-migrations.md
@@ -1,3 +1,7 @@
+---
+summary: Part 2 on our building AnchorCMS in Laravel series. We're looking at migrations today and how we can get our database ship shape!
+---
+
{% include 'video.html' src:"https://www.youtube.com/embed/nwSwPYKPgEY" %}
Hi Guys, hope you're well! I've just been cracking on with coding laravel anchor in laravel.
diff --git a/src/posts/2013-12-08-anchor-diary-composer.md b/src/posts/2013-12-08-anchor-diary-composer.md
index df97a2f..8d105c9 100644
--- a/src/posts/2013-12-08-anchor-diary-composer.md
+++ b/src/posts/2013-12-08-anchor-diary-composer.md
@@ -1,3 +1,7 @@
+---
+summary: Part 3 of rebuilding AnchorCMS in Laravel. Today we look into composer and how we should set it up
+---
+
{% include 'video.html', src:"https://www.youtube.com/embed/dMudLAYp7WY" %}
So I just wanted to run through how I envisage anchor working with Laravel.
diff --git a/src/posts/2013-12-10-anchor-diary-resourceful-routes-controllers.md b/src/posts/2013-12-10-anchor-diary-resourceful-routes-controllers.md
index a3349ab..69e3a4d 100644
--- a/src/posts/2013-12-10-anchor-diary-resourceful-routes-controllers.md
+++ b/src/posts/2013-12-10-anchor-diary-resourceful-routes-controllers.md
@@ -1,5 +1,6 @@
---
title: Anchor Diary Resourceful Routes & Controllers
+summary: Part 4 of AnchorCMS to Laravel, we're looking at building out our routing now
---
{% include 'video.html' src:"https://www.youtube.com/embed/oA1PuHz2zBE" %}
diff --git a/src/posts/2014-06-23-quality-assurance.md b/src/posts/2014-06-23-quality-assurance.md
index 0432860..00cea81 100644
--- a/src/posts/2014-06-23-quality-assurance.md
+++ b/src/posts/2014-06-23-quality-assurance.md
@@ -1,5 +1,6 @@
---
title: A day in the QA Maze
+summary: As a developer its easy to forget how your actions affect other roles. In this post I go over my experience shadowing a QA for the day
---
This week is a week that every dev dreads in one way or another. In my opinion going live is never a stress free task no matter how silent it is. In fact I'm pretty tense just writing this article and there's absolutely nothing that could go wrong (I kid myself, it could totes go horribly wrong in ways I couldn't possibly imagine but onwards and upwards?).
@@ -16,7 +17,7 @@ It's this that I thought was trivial, after all the work is done right? All they
For a dev it's easy to know the story behind a ticket, what everyone said, when, and how that relates to other tickets. After all in order to implement it we have to delve into the specifics and down and dirty with the criteria.
-A QA has none of this. They have to trawl through the history of the ticket searching for the simple answer which is usually "What the fudge am I testing here?!"
+A QA has none of this. They have to trawl through the history of the ticket searching for the simple answer which is usually "What the fudge am I testing here?!"
Sometimes the history can be so in-depth and convoluted that a simple changing of the default option on a select can take hours to QA. This sucks, it really really sucks and it makes me sad (even cry) that this is can be true.
diff --git a/src/posts/2014-11-30-short-films.md b/src/posts/2014-11-30-short-films.md
index 11fa567..7b6dada 100644
--- a/src/posts/2014-11-30-short-films.md
+++ b/src/posts/2014-11-30-short-films.md
@@ -2,6 +2,8 @@ I love short animated cartoons, it's astonishing to see how much detail the anim
can cram into a 5 minute sequence. My favourite type includes a bit of warm
cheeky humour with bright colours that make the film appear vibrant and fun.
+---
+
Here is a selection of favourites on vimeo, each one I like for differing reasons
but they are all ace. I hope you enjoy!
diff --git a/src/posts/2015-06-30-dotfiles-2.md b/src/posts/2015-06-30-dotfiles-2.md
index 4a0fc3a..7b2b72d 100644
--- a/src/posts/2015-06-30-dotfiles-2.md
+++ b/src/posts/2015-06-30-dotfiles-2.md
@@ -1,5 +1,7 @@
Dotfiles are a fantastic way to centralize your configuration files for various tools and utilities. Examples of these include Git, Vim and Shells such as Bash, Zsh and Fish.
+---
+
I have been using [holmon's dotfiles](https://github.com/holman/dotfiles) for a while and it has been really good. It comes some nice tweaks and a bootstrap script which symlinks everything with the suffix '.symlink'.
But I wanted to have a go at making my own from scratch, also I wanted to add [homebrew](https://brew.sh) and [casks](https://caskroom.io) into an install script so it installed everything for me.
@@ -11,6 +13,7 @@ I took inspiration from [webpro's](https://github.com/webpro/dotfiles) installat
**Update** is a convenience script which updates homebrew, npm, and ruby packages as well as a few other chores. I usually fire this off in the morning while I make a cup of coffee, when I come back I know everything is up to date which is nice :)
## brew.sh, npm.sh and gem.sh
+
I use npm and ruby gems to install any official packages (eg Sass/Bower) and homebrew for tools and apps such as Git and Google Chrome. These files just have a list like the one below which I can add to whenever. It also checks to see if it's installed it before which is kind of a poor mans idempotent but it works!
```sh
@@ -32,9 +35,11 @@ apps=(
```
## Atom Editor
+
I've recently started using [Atom](https://atom.io) again and stumbled across their package manager [APM](https://atom.io/docs/latest/using-atom-atom-packages#command-line). This allows you to install packages from the command line, and even includes an option to read a list of packages to install from a text file. This was brilliant because it meant I could just tell atom to grab the latest plugins and themes.
## Git
+
In my original dotfiles I had a prompt which asked me to put in my git name and email. While this is cool it was a bit of a pain to be asked this every time I ran install so I sought inspiration from symfony and created a secrets file.
```sh
diff --git a/src/posts/2015-09-17-a-hack-at-the-hacknight.md b/src/posts/2015-09-17-a-hack-at-the-hacknight.md
index 16d99ec..71ece57 100644
--- a/src/posts/2015-09-17-a-hack-at-the-hacknight.md
+++ b/src/posts/2015-09-17-a-hack-at-the-hacknight.md
@@ -1,3 +1,7 @@
+---
+summary: My personal experience running an internal hack night for my work mates and what we built on the night
+---
+
A few of my work chums wanted to put on a hacknight but initially it didn't sound too exciting because there wasn't any end goal to it. You just played around for a few hours and the went home when you eventually got tired & hungry.
This year I've been an attendee at the [simpleweb hacknights](https://simpleweb.co.uk/brands/simpleweb-challenge) and they've been great fun. There's live music, complimentary food (which is delicious) and even prizes to be won at the end of the night!
diff --git a/src/posts/2015-09-24-omsvg.md b/src/posts/2015-09-24-omsvg.md
index 1d60ffa..07186e3 100644
--- a/src/posts/2015-09-24-omsvg.md
+++ b/src/posts/2015-09-24-omsvg.md
@@ -1,5 +1,6 @@
---
title: OMSVG
+summary: My first public talk talking about all things SVG and how we can use them in our code to make amazing things
---
I've been noted throughout my life to be rather quiet, personally I don't see this as a negative thing - someone has to do the listening after all!
diff --git a/src/posts/2015-10-07-responsive-day-out.md b/src/posts/2015-10-07-responsive-day-out.md
index 84b904e..d170a35 100644
--- a/src/posts/2015-10-07-responsive-day-out.md
+++ b/src/posts/2015-10-07-responsive-day-out.md
@@ -1,3 +1,7 @@
+---
+summary: Responsive day out is a front-end focused conference sharing tips and tricks on workflow, techniques and experiences on dealing with a responsive web.
+---
+
This is my second talk of the year and first duet with [Christelle](https://twitter.com/littlecrome) (I'm not sure if thats the right terminology but lets run with it). At [Box](https://boxuk.com) whenever someone goes to a conference they can do a short talk to summarise the event for those who couldn't attend.
Responsive day out is a front-end focused conference sharing tips and tricks on workflow, techniques and experiences on dealing with a responsive web. The nice thing about this conference was it contained both devs and designers!
diff --git a/src/posts/2016-02-13-congestion-busting-blackfire.md b/src/posts/2016-02-13-congestion-busting-blackfire.md
index 738b759..721e8b8 100644
--- a/src/posts/2016-02-13-congestion-busting-blackfire.md
+++ b/src/posts/2016-02-13-congestion-busting-blackfire.md
@@ -4,4 +4,6 @@ title: Congestion Busting with Blackfire.io
Recently at work I was involved a project which aimed to improve the performance of one of our analytics systems. We needed a way of measuring our progress of certain user flows before and after optimization so we could give the client feedback on how the project was progressing.
+---
+
[Blackfire](https://blackfire.io/) is a performance measuring tool written by the folks behind the symfony php framework and was ideal for the task. You can read about my experience with blackfire over on the [Box UK dev blog](https://boxuk.com/insight/tech-posts/reducing-congestion-with-blackfire-io).
diff --git a/src/posts/2016-02-23-refactoring-with-bem.md b/src/posts/2016-02-23-refactoring-with-bem.md
index ffd6473..39d2f98 100644
--- a/src/posts/2016-02-23-refactoring-with-bem.md
+++ b/src/posts/2016-02-23-refactoring-with-bem.md
@@ -1,5 +1,6 @@
---
title: Refactoring with BEM
+summary: 3 years ago I put the finishing touches to my first design. We'll go over what I've changed since and where I hope to go next
---
It was around this time [3 years ago](/suit-and-tie) I was putting the finishing touches to this design.
diff --git a/src/posts/2016-04-19-all-about-atom.md b/src/posts/2016-04-19-all-about-atom.md
index dcfcd47..6485fdc 100644
--- a/src/posts/2016-04-19-all-about-atom.md
+++ b/src/posts/2016-04-19-all-about-atom.md
@@ -1,3 +1,7 @@
+---
+summary: Atom is an exciting new editor built on web tech. In the talk I go through how atom works and some of the changes I've made to it to make it work for me
+---
+
I did this talk way back in November last year but it's only now I've managed to see about putting it on the interwebs.
Apologies the fan noise towards the end, I'm still using an old mac from the days when only rappers had gold macs.
diff --git a/src/posts/2016-05-01-polymer.md b/src/posts/2016-05-01-polymer.md
index 41ad654..1a16757 100644
--- a/src/posts/2016-05-01-polymer.md
+++ b/src/posts/2016-05-01-polymer.md
@@ -1,3 +1,7 @@
+---
+summary: Polymer is an framework which is used to create custom HTML elements. In this talk we explore what it is and build a cat pintrest app for cat lovers everywhere
+---
+
Another talk I did back in November was on Polymer.
{% include 'video.html' src:"https://www.youtube.com/embed/s4dybsEIAIs" %}
diff --git a/src/posts/2023-02-11-dev-diaries-episode-1.md b/src/posts/2023-02-11-dev-diaries-episode-1.md
index e2a6f74..2edaf59 100644
--- a/src/posts/2023-02-11-dev-diaries-episode-1.md
+++ b/src/posts/2023-02-11-dev-diaries-episode-1.md
@@ -1,13 +1,15 @@
---
title: "Dev Diaries Episode 1: Writing a Tool to Help Test Migrating Lots of Code"
tags:
- - Dev Diaries
- - Angular
- - Mobile App
+ - Dev Diaries
+ - Angular
+ - Mobile App
---
My day job involves working on a mobile app for a well known medical journal based in the UK. It provides healthcare professionals with the latest evidence-based clinical decision support information.
+---
+
These days the tech stack is aging but its much too large to rewrite all in one go. So instead we are doing a phased migration, gradually re-writing the application bit by bit between releases. We are moving from AngularJS to Angular, which incase you don't know is a huge change as it involves a new framework and language!
I would explain more but it's a long story so I'll save that for another post.
@@ -108,11 +110,11 @@ Initially I struggled to write the code to make all this work, sometimes I get m
2. For each topic get more data about the topic so I know its type. Different topic types need a different set of transformers
3. We then need to get all the repositories related to the topic
4. For each repository we need to do the following
- 1. Disable the `new_transformer` flag
- 2. Get the data from the repository
- 3. Enable the `new_transformer` flag
- 4. Get the data from the repository again (this time it'll be using the new transformers)
- 5. Check both to see if they are the same and if not show the difference
+ 1. Disable the `new_transformer` flag
+ 2. Get the data from the repository
+ 3. Enable the `new_transformer` flag
+ 4. Get the data from the repository again (this time it'll be using the new transformers)
+ 5. Check both to see if they are the same and if not show the difference
I started by getting the topics, then looping over those and getting information about the topics inside that loop, then getting the repositories inside that loop again and then running the tests twice in that loop.
@@ -134,15 +136,15 @@ for (const topic of topics) {
}
```
-Imagine this with promises too and its a bit of a mind ~~f*ck~~. So a ranty walk later I switched approach.
+Imagine this with promises too and its a bit of a mind ~~f\*ck~~. So a ranty walk later I switched approach.
Instead we use promises as they were meant to be used and chain them. (Why didn't I do it this way to start with?!). Starting off we get the topics then with that we map over the resolved array to get more info about each topic like so:
```javascript
this._topicRepository.findAll().then((topics) => {
- return this._$q.all(
- topics.map((topic) => this._topicRepository.findById(topic.id))
- );
+ return this._$q.all(
+ topics.map((topic) => this._topicRepository.findById(topic.id))
+ );
});
```
@@ -192,9 +194,9 @@ I wasn't sure how to do this but a quick stack overflow later I found my answer
```javascript
jobs.reduce(
- (promise, job) =>
- promise.then(() => this._test(job.repository, job.topic, job.key)),
- this._$q.resolve()
+ (promise, job) =>
+ promise.then(() => this._test(job.repository, job.topic, job.key)),
+ this._$q.resolve()
);
```
diff --git a/src/posts/2023-04-23-dev-diaries-episode-2.md b/src/posts/2023-04-23-dev-diaries-episode-2.md
index a83af7f..921311a 100644
--- a/src/posts/2023-04-23-dev-diaries-episode-2.md
+++ b/src/posts/2023-04-23-dev-diaries-episode-2.md
@@ -1,12 +1,17 @@
---
title: "Dev Diaries Episode 2: Lessons learned the hard way with dependencies"
+summary: "Learning the hard way that sometimes it's better to build your own than to struggle with existing tools"
tags:
- - Dev Diaries
- - Angular
- - Mobile App
+ - Dev Diaries
+ - Angular
+ - Mobile App
---
-We're working on adding OpenID Connect to the app. Luckily for us we only needed to create a client rather than the server, that was being handled by another team. Theres a saying in software, don't roll your own security. And for us that naturally lead us to looking for a dependency. We also noted that OpenID certifies packages for compliance to the spec, pretty handy! We found two for Angular that we thought would work. The first one we tried was a bit of a dud for our cordova setup so we flipped to the other. This worked well and we managed to get the flow to work.
+We're working on adding OpenID Connect to the app. Luckily for us we only needed to create a client rather than the server, that was being handled by another team. Theres a saying in software, don't roll your own security. And for us that naturally lead us to looking for a dependency.
+
+---
+
+We also noted that OpenID certifies packages for compliance to the spec, pretty handy! We found two for Angular that we thought would work. The first one we tried was a bit of a dud for our cordova setup so we flipped to the other. This worked well and we managed to get the flow to work.
OpenID comes with tokens, these are used to talk to a protected API. They can expire and if they do we can exchange for a new one. It was this exchange task that was the beginning of our problems. Our issue was trying to make the exchange process work with a device that maybe offline for long periods of time. The plugin would simply keep trying every few seconds which caused our logger to fill up with lots of failed requests.
@@ -20,9 +25,9 @@ Theres a lot that some dependencies offer. They're often authored by multiple pe
But be careful. It's worth taking the time to look at the dependencies available to you. Look at the common things like:
-- How many authors are there?
-- Whats the activity like on the repository? Is there a lot of recent action or has it been untouched for years? This might not be a bad thing if the dependency does what it needs to and has no bugs but it could also be a sign of a dead project.
-- Whats the license like? Can you even use this dependency? Is there a fee you need to pay?
+- How many authors are there?
+- Whats the activity like on the repository? Is there a lot of recent action or has it been untouched for years? This might not be a bad thing if the dependency does what it needs to and has no bugs but it could also be a sign of a dead project.
+- Whats the license like? Can you even use this dependency? Is there a fee you need to pay?
But there are also more nuanced things to look at, personal to you and your team / project.
diff --git a/src/posts/posts.11tydata.js b/src/posts/posts.11tydata.js
index 9e3794b..ea2f766 100644
--- a/src/posts/posts.11tydata.js
+++ b/src/posts/posts.11tydata.js
@@ -4,8 +4,7 @@ export default {
permalink: "{{ page.fileSlug }}/index.html",
eleventyComputed: {
- // The 'title' property is what you want to set
- title: function (data) {
+ title: (data) => {
// 1. Check if the title is already set in the Front Matter.
if (data.title) {
return data.title;
@@ -23,8 +22,19 @@ export default {
.join(" ");
}
- // Fallback if no title and no fileSlug (shouldn't happen often)
- return "Untitled Post";
+ return "";
+ },
+
+ summary: (data) => {
+ if (data.summary) {
+ return data.summary;
+ }
+
+ if (data.page.excerpt) {
+ return data.page.excerpt.substring(0, 160);
+ }
+
+ return data.site.description;
},
},
};