Stuff

Reflections on VueConf TO, first ever Vue Conference in Canada

This year, in 2018, VueConf TO was my choice of conference. The other choice for this year would have been Web Unleashed but I did that in 2017. I tend to attend one conference a year due to budgeting and commitment reasons. I’m not sure if it’s the same for a lot of people out there but I feel like these events are important and it constitutes a type of duty and responsibility for me. It’s as if I need to mentally prepare myself for it. Alas, this is a topic for another post.

So, how was my experience? I was very impressed by the organization and the details the conference people took care of. Hotel staff at the venue were very polite and helpful. Lunch was tasty and shared together around a table of colleagues, peers and enthusiasts. But, you are here probably for technical bits, not for what was comforting at the event, right? Well, follow up.

Continue reading

Programming

How to Create a Simple Descriptor Generator with Vue

Some time ago, the company I’m still working at needed a lot of descriptor names. Like, Support Specialists, 24/7 Help, etc. The goal of this article is to show you how simple it is to create a generator tool using Vue. To get a better idea of how simple it is, look below. Also, here is the final product you can play with before reading the article.

Descriptor Generator

Continue reading

Programming

Sorting An Array of Objects

This post has been on my mind for a while. Today, I would like to talk about sorting an array of objects. This exercise assumes your array is uniform, meaning all elements in the array are of the same type. To keep things more simple, I’ll assume you know what you are doing and we won’t check whether the array is uniform.

Additionally, we’ll keep this functionality as part of Array prototype so you can keep using it as if it is a native method rather than passing your array as an argument. One last note before we dive into the code is that while we are implementing our solution, we may as well throw in a way to sort the array ascendingly or descendingly.

Continue reading

Programming

A Better Way of Bookmarking Code Snippets

In an earlier article, I talked about placing your Javascript code snippets as bookmarks. I used this technique to get a list of books on Goodreads and to enhance the user experience on Safari Books Online for their video section. In both examples, I dumped the code directly into the URL section of the bookmark right after typing javascript:. If you need a refresher on how to do this, please check out my earlier article.

Now, can we do a better job than dumping the code there? And, why? Because it’s tiresome to keep pasting the code again and again when I make changes to it. Because the code already lives in a Gist, so it only makes sense that we trigger the Gist code when the bookmark is requested.

Continue reading

Programming

Trifecta: Filter, Map, Reduce

I love using Goodreads. There is a great community there; contributing to the site with their comments, reading lists and such. When I discover a new list such as the Riftwar Cycle, I want to copy the book names to a Google Sheet. When I visit a bookstore, I then pull up the file to see if I have already purchased it or not. So, my Google Sheet is ever changing but one thing stays constant. My rate of buying books is exponentially growing over the rate of reading what I already own.

Some lists are mixed, meaning they are part of a universe and there are many authors contributing to it. In that case, I would like to write down the author’s name next to the book’s title. You might wonder if it would be a better idea to group the items by author name first then the book title. I thought about doing it that way too first but then the books that I’m usually interested in are grouped by type so they are all clustered in one bookshelf rather than distributed all over the store by the author’s name.

So, our goal is to parse a list out of page content in the following format: Book Title, Author Name.

Continue reading

Programming

Bookmark Code Snippets

I’ve recently written two articles that depend on a bookmark. I figured it would be easier to use this article as a reference when I conclude future articles where I need to mention the bookmark method.

[EDIT] This method has had a major update since I wrote this article. If you follow here, you’ll see that there is a more elegant way of running code snippets but you might still like to refer to this article for simpler needs, especially when your code is not hosted.

Continue reading

Programming

Using Reduce to Remove Duplicates

Most examples I see for reduce talk about summing up numbers. Can we use reduce to do more than punching numbers? Doesn’t it sound ironic that these accumulator or sum calculator examples look more like they are increasing some values rather than reducing? I know I’m pushing the envelope here. I think removing duplicates from an array would be a more suitable example of reducing the array we are working with. Because, after all, we would be reducing it to a minimal state.

How ever you define what reduce does, here is my take on using reduce to remove duplicates from an array. It only works for simple data types of course but you can enhance it the way you see it fit. For simplicity sake, I’ll attach my solution to Array.prototype. Again, this is optional.

Continue reading