Because humans adapt to them and they’re no longer good

Remember the first time you had sex? How good was that! Unless your virgin in which case, the best is yet to come ;) But for the rest of us, we can only remember what it was like for the first time.

It has been a great two weeks. Got a bit derailed with XCOM2 at times, catching up on the latest movies during lunch but overall, I made about a month and a half’s progress in the last two weeks (given I normally spend an hour a day outside of full time work and I got to spend 5-6hrs a day the last two weeks).

Alot of this was testing. I’ve got a total of 102 tests now that run over 0.47 seconds. I’m not sure why it went up by so much, it was at 0.15 most of the time and then just jumped. Still, 0.47th of a second isn’t too bad for getting feedback on stuff I’m breaking during development which would otherwise take me hours to work out with manual testing.

Leveling up with lodash

I’m getting more comfortable with a nice little library that I use for doing data manipulations called lodash. It’s in some sense similar to LINQ extension syntax in .NET and allows me to transform the input data by passing it through a chain of pure functions.

In typical imperative fashion, you loop through some collection and gather data in a local variable before passing it back

export const getItemsFromContainer = (state, cid) => {
   let items = [];
   _.forEach(state.containers[cid], (isExist, itemId) => {
     if (!!isExist)
       items.push(state.items[itemId]);
   });
   return items;

In lodash or LINQ, you pass the data through a chain of functions, in this case the first one _() which sets up your data for chaining, and the only function required here is the _.reduce.


export const getItemsFromContainer = (getState, cid) => {
  const {containers, items} = getState();

  return _(containers[cid])
    .reduce((res, isExists, itemId) => {
      if (isExists)
        (res || (res = [])).push(items[itemId]);
      return res;
    }, []);
  };

Blake Education

So on Monday I’m starting at a new company. I’m glad I went to the interview because I had such a bad first impression of it that I dreaded going to the interview. And it was all because of a rude receptionist on the other side of the line when I called to follow up on my application as I typically do to get myself noticed.

I had the impression that it was going to be a corporatey place, putting in ReactJS to rope people in and then hitting them with jQuery and a mess of javascript which is what alot of the agencies do now. Jobs are never as good, not even half as good, as agencies make it out to be. This is experience talking.

But the moment I walked in the door, it completely changed my impression.

  • The place I mistaken as a cafe was their kitchen - Tick
  • Atmosphere was friendly and energetic - Tick
  • No SUITS - Tick
  • My interviewer wore shorts and thongs - Tick! (Having worked like this in a startup for the last 4 years, it was very uncomfortable to have to be ‘well dressed’ for work)
  • Shower in the back (and later I learned there was a bike shed) - Tick
  • Job has nothing to do with React but CreateJS, making games - WTF…. TICK!?!?!
  • No one uses windows - Tick
  • Team looks fairly impressive on LinkedIn, some roguelike indie game devs - This really isn’t a criteria because if I have a criteria that says, ‘Do they have indie game devs interested in roguelikes?’ then that’s going a bit far imo… but it’s a bit scary how this is turning out… the last time I thought that I was going into a awesome team, it completely bombed out and ended up being my second worst job by a long margin. The one I’ve just left is the worst place I’ve worked, ever.

These guys seems to care about what they do, just from spying on their github activity and discussion threads. This is a very refreshing change from working with external Indian senior devs who didn’t know what a class constructor was and had never used one in their life. The company is medium sized and they make educational content for kids which is also alot better than fogging off cheap bad quality Chinese goods to lower income Aussies to make a profit.

So this is all pretty exciting as all my indicators are returning big green ticks. Let’s see how this one goes.

What’s next

I go back to monthly or fortnightly blogs. I go back to doing this an hour a day. I still commit to finishing this.

Currently working on the visual notification system which will also serve to as a undo so I don’t need a ‘Are you sure?’ after every purchasing decision.

Example notification of sword purchase