Week 32: Use prismjs instead of gist, update on NGO website requirements, subscription by email - WIP

The week was more about reading and experimenting with websites.

Books and Links

I resumed book reading. Rich Dad Poor Dad is 55% complete.

Despite clearing 200+ links, there are about 9064 links to be read in my pinboard account.

Subscribe by email

Adding an email subscription is still in progress.

NGO websites

We got a new requirement. NGOs wanted to check the possibility of collecting the email address of the volunteers. Based on the requirements, WordPress seem to be a good fit since it matches all the required criteria.

Prismjs

I have been using GitHub gist to display code snippets. But recently, I discovered prismjs for the same. It is light. Just 15KB in total and can be served from our server instead of making multiple calls like gist.

A comparison between a sample gist from Cleaner array manipulation using ES5/6/lodash post and prismjs block.


const totalByOne = users.reduce((previous, current) => {
    return previous + current.balance;
},0);

const totalByTwo = _.reduce(users, (totalBalance, user) => {
    return totalBalance + user.balance;
}, 0);

console.log(totalByOne); //220
console.log(totalByTwo); //220

The best part is that it isn't an image. It is copyable code highlighted text.


For my new posts, Subscribe via weekly RSS, common RSS or Subscribe via Email