Redux and Parcel

I spent some of Friday going through my Chinese flashcard app with the goal of refactoring it to use #Parcel.js and #Redux.

It was quite interesting taking something that wasn’t using Redux and slowly moving logic out of the components.

I took a bottom up approach – starting with click handlers on lower level components and slowly shifting logic upwards to a reducer.

It was useful (and a learning experience) to think about the events in my app and watch the components simplify (at the cost of a growing reducer JS file)

I’m not quite done.

  • While refactoring I decided to add a subscriber that changes the state of my Game component on any event. Long term my goal is not to do this and instead rely entirely on properties and add a single render subscriber.
  • There’s still stuff to simplify. I have an END_ROUND event that is currently fired by Game.jsx when all the current cards have been dealt and answered. I found myself pondering whether the reducer itself should dispatch this event. I never made a decision.

This was surprisingly straightfoward. I decided to make my game client side only. I pulled all the logic in the server side components into JS libraries that didn’t rely on the node fs package and then I removed all my express routes/logic in favor of a babel inline JSON plugin which allowed me to import my data into the app’s JS directly. For the one API request I did need – I relied on CORS.

Once this was done, since I was already using babel plugins (not webpack) and parcel.js has the main selling point of zero configuration – it was easy.

Things I did learn on the way: Parcel.js doesn’t work with Node 6. I use Node 8 locally but Node 6 is on most of our labs boxes.

Open questions: I didn’t work out how to change the port and get time to look in production modes but I recommend Parcel.js if you have a client side only app you want to get up and running with quickly!

Morning todo lists

The first I do every morning is create a todo list of all the things I want to achieve as part of a standup email for the small remotely distributed team work for. I rarely over-commit and it forces me to plan my day and manage my time. This practice has helped me from straying too far away from my goals and getting things done.

A typical day’s todo list might look like this:

  • Research W
  • Review X
  • Read Y
  • Write a patch for Z with an idea of how much progress I’ll make today

I’m going to experiment with thinking about the nature of the work

One thing I noted when reflecting on last year was that I’ve not been writing and learning as much as I would like. I’m going to try and phrase these morning todo lists with these checkboxes in mind:

  • I’ll make sure I read something
  • I’ll make sure I’ll learn something
  • I’ll make sure I write something
  • I’ll make sure I build something
  • I’ll make sure I’ll help someone.

ie. my todo list must contain one of each of these things!

I think this will help me focus energy into the right places and encourage me to be a better person.

#todo #dailypractices #efficiency #gtd

State of the web and me 2018

I have become quite grumpy towards the web in 2017. I ended the year jaded.

During 2017, thanks to Trump and Brexit and growing negative sentiments in my social networks, I found myself reducing my use of social media. I weaned myself off a Facebook addiction, simply by uninstalling the mobile apps, installing the Facebook newsfeed eradicator to restrict any desktop usage to lookup rather than random discovery. My main use of Facebook was via Instagram where I continued to share photos which uploaded them automatically. I chose to keep Instagram due to the fact I had a small amount of people I followed there – the social network was manageable and I was able to see content from people I wanted to (although in March a product decision by Instagram to change the order of feed based on guesswork infuriated me. I started to use Twitter more than previous years, as it encouraged me to talk more about what I was doing rather than keeping it to myself.

I’ve grown very frustrated with social media and how tools that originally were created to help me keep in contact with friends have now become time suckers for boredom, where I am gamed in order to click more. Let me be clear, engagement is not a good metric. If it was, we’d be giving heroin to heroin addicts in order to sell more needles. Last year I weened off social media. I felt better, but also isolated. Just because I was free, didn’t change much. Others were using it. I no longer gained news from friends about engagements, babies and other life changes. It made me realise I was too reliant on social media for friends updates. I started trying harder – organising Skype calls; making more effort to hang out with friends. Progress was slow but fruitful.

In 2017, I used RescueTime to track my Internet usage. What was I spending time doing? What were my anti-patterns? Setup was easy – I installed an app on my phone and an app on my laptop. I let them know exactly what I was doing for the greater good. I only use the free version, so I am limited in the data I can obtain for that year. In the last three months, despite taking 3 weeks of vacation, I spent the majority of my time in a code editor (58hrs); the terminal (34hrs); my inbox (30hrs); google hangouts (22hrs). In the latter quarter, I was most productive – software development took 40% of my time; communication 15%; learning 10% and writing 7%. The remainder involved distractions. That’s something to work on. In particular, I’d like to spend more time on my computer learning and writing. Entertainment and reading news sites appear to now be my biggest time suckers. Social media is no longer a time sucker, but I still don’t feel like I’m doing the things I want to – learning and writing. That’s something I want to work on this year.

So if 2017 was the year I won back against social media, what do I want to gain from this year? I want to rediscover my love for the web. I want to focus on using apps that help me become more productive and more creative and that are a joy to use without feeling like they are leeching off time I could be using elsewhere.

I don’t want to use a tool, where the main goal of that tool is to get me to use it more. I want to use a tool that fits into my life.


  • write – I’ll be using WordPress; as well as my old fashioned notebook. My hope is to complete these things.
  • learn – this year I’ll be focusing heavily on learning Chinese.
  • use Pinterest to collect ideas and thoughts to help me write and on target for doing the things I love
  • talk more – look inward at what I care about and forge conversations (preferably in the real world) to help cultivate those thoughts.
  • change – change is good and I sure as hell need some.

In 2018, I want to look inwards and achieve something over than hundreds of likes.

I miss tags.

I don’t know how to find people.
I don’t know how to find content.
I don’t know how to #tag my own content (is that how…? apparently not… but I’m sure it’s possible)
I feel so alone.

I guess that’s where Tumblr came from?

Rediscovering WordPress

I haven’t used WordPress in a while. I figured I should see what’s changed in my absence. WordPress has been around for a long time, just like MediaWiki, the software I’ve spent the last few years helping to build, so I think it’s interesting to see what things differently they are doing. I like to write, but on places like the standard of writing is expected to be very high. I want the freedom to write down my thoughts as I have them without worrying about how it might effect my reads or likes and how I might market it. I just want to write for me, freely without any stigma.

It’s quite amazing that WordPress powers 29% of the internet. WordPress thus has a responsibility to help steer the web to good or bad. I apparently built a WordPress blog many years ago, but obviously I forgot my login information. I liked how I could email myself a log in link. More login/sign up forms should be like that. I don’t want to have to remember a password.

The blog I had looked outdated. It did look like something I setup 6 years ago. It reminded me of MediaWiki/Wikipedia. Many users there think you shouldn’t change what’s broken, but fashion is important. I don’t wear clothes I wore 6 years ago. I want to use something that looks modern and interesting. I went to change the theme. The choices were overwhelming to be honest. Luckily I had heard of the P2 blog theme so I chose that one.

The P2 blog makes it very easy to add new blog posts. I like that it’s at the top of the page and I’m using that now and so far so good. I copied the text and refreshed the page and was happy to see my work was retained. I like that the editor is simple. I’ve liked that about Medium too – especially given that with keyboard shortcuts you can access more advanced elements. The icons are very easy to understand, although I think the code icon is always added because this kind of thing is made by developers. I don’t think the average user would need it.

I like that the editor hasn’t got carried away with the ideas of what you see is what you get. I’ve always felt links, some basic styling and images are all you ever really need in an editor and if you are doing anything more advanced, you are entering the world of code. I think this is where MediaWiki went wrong – it allowed HTML via templates. To edit Wikipedia you need to be a coder. HTML inside wikitext is bad in my opinion. It takes away the joy of free form writing. To be honest, I wasn’t expecting a strong tag to appear in my editor. This disappoints me. I think HTML should always be the content storage model, but I think it’s wrong when the HTML language is exposed to someone who doesn’t work in HTML. We treat two new lines as a new paragraph – that’s much neater than expecting user to wrap content with p tags. I don’t like the preview button either. We can learn a lot from how people use text messages. Emphasis is **visual**, it has personality. Strong tags do not have a personality.

I’ve rambled enough today. I think it’s time to hit post.