ReactJS: Synthetic Mouse Event Properties Null

While working with ReactJS, I added a click handler. I used console.log to dump the event object passed into the handler, but all the properties on the SyntheticMouseEvent were null.


An insightful tip via StackOverflow point me in the right direction. Chrome and React interact strangely with the event object in this situation: Chrome does not copy the properties, and by the time Chrome prints the object to the console, React has nulled out the values. But at runtime, the properties are not actually null, they’re there.

Just reference your synthetic event properties directly instead of trying to dump the entire object.

Enable Custom Configuration Files in Lumen

Lumen does support custom configuration files, but they need to be enabled first.

You need to add calls to $app->configure('file.php') in your bootstrap/app.php. A cleaner method might be to make a config.php to contain the configure calls and then include that file from bootstrap/app.php.

If you want to use .env values directly, you can also uncomment Dotenv::load(__DIR__.'/../'); at the top of bootstrap/app.php. That will allow getenv('name') to work.

Open Atom from the Terminal

Opening you graphical text editor from the terminal is pretty convenient. Although not the most technical solution, this is the easiest method.

Just open Atom, go to the Atom menu, and click Install Shell Commands.

Be sure to have migrated Atom to /Applications first, otherwise there might be some weird bugs if you decide to move it there later.

Rename extensions with the terminal

I had a directory full of files with the same extension, and a script was design to process any file in the given directory with that specific extension – to ignore the processing on a file, all I had to do was rename the extensions of all the files except the one I wanted to process specifically.

There’s a great answer on Ask Ubuntu, of all places.

rename ‘s/.original$/.new/’ *.new

Flipkart to shut down website

Flipkart is similar to Amazon, but for India.

It seems weird to shutter the web version of the store, but using the mobile web on low end phones is awful. An app only store will provide the best experience, in the long run.

New MacBook rivals 2014 MacBook Air

Only the top of the line, most expensive, model competes with the 2014 MacBook Air.

That’s great performance though, for the first real generation of Core M processors.

The 2013 Nexus 7 has been discontinued

I thought the Nexus 7 was discontinued when the Nexus 9 was launched, honestly.

Right now, there is no leading Android tablet.

We’ll miss the days when we loved the Nexus 7.

SML: operator and operand don’t agree

I am tired of having to look this up every time I forget everything I know about SML.

Error: operator and operand don’t agree [tycon mismatch]
operator domain: ‘Z * ‘Y
operand: ‘Z

When you get this error, you have called a function with the wrong argument types.

The operator domain is what the function called expects, and the operand is what the function was called with.

To fix the problem, call the function with the proper arguments.

You can learn more about a variety of SML errors at the SML NJ error document.

The End of Siracusa’s Reviews

Though Apple will presumably announce the next major version of OS X at WWDC this coming June, I won’t be reviewing it for Ars Technica or any other publication, including the website you’re reading now.

John might still review the occasional microwave, but those OS X reviews were pretty special.

The one, long article I wrote about OS X for Ars Technica every year or two has long since been dwarfed by the volume of my audio output.

There is no doubt that John’s audio vastly exceeds his written endeavors, especially in the last few years. But there is something icky about podcast audio. Podcast audio feels almost as ephemeral as a tweet, but even harder to access easily. By comparison, you could flip to any page in a review pretty easily. It’s not too different, content wise, but the experience we have with his reviewing will be different.

GW2: Colin Johanson Interview

Colin is too evasive in his interviews.

It has been 75 days since the PAX South announcement of the expansion, and ArenaNet is still skirting information while trying to pretend like they have things to say.

The Verge: Apple Watch Review

Watch The Verge’s well made and well articulated review of the Apple Watch, and take a look at their pretty spiffy review page too.

I rarely like reviews from The Verge, but this one was great.

Intel: Atom x3, x5, x7 Mobile Chips

I knew that there would be updated chips announced this week. I figure it doesn’t matter as much because it will take months for OEMs to build phones and tablets and let those get cheap enough to be worth it.

The Atom Z3735 (which is from the Baytrail generation) is just slightly more performant than the Snapdragon 805 (though battery life might be a sore spot), there is great potential from Intel.

But that x-name.

Timehop using Go in Production

Go is really catching on. For an web API, Go makes sense with native json awareness and great concurrency tools.

I would be interested in a non-API usage of Go for a web app though.

Moto E – Second Generation

If the Moto E has a Snapdragon 410, what will an updated Moto G have? A 610-615? Can we dream? Can I love the future of Qualcomm again (at least in the mid-tier market)?

I hope so.

The New Pebble Time

When I saw the Pebble Time pictures came out yesterday, I thought, “Very nice! But a little late…”.

We’re weeks away from the release of the Apple Watch will cost a fortune and be iOS only, we’re in the the lull between major Android Wear versions – but new hardware will be undoubtedly coming throughout the year anyway.

Before the iPad, I remember dreaming of the color Kindle. I don’t know the specific technology behind the color screens in the Pebble Time, but if it is lasting seven days with always on functionality, then, that’s pretty good1. I forget about charging things like my own Fitbit Charge on the seven day timescale.

So that will be the tradeoff for now: a bulkier, funnier looking, but ultimately longer lasting and natural charging cycle, or the cutting edge, hipster, charged once every 36 hours device.

  1. With that said, it does sort of look like the low resolution screens I have seen with Nintendo’s DS. The resolution on the DS, even the New 3DS, is appalling compared to the 1080p phones and tablets that are pervasive, let alone the increasingly common (though pointless) 2K screens. 

Falcon Pro 3

Here’s a quote from Falcon Pro 3 creator, Joaquim Vergès:

On the last version of Falcon, I really got screwed when I added the multi-user feature because people bought it once but had eight accounts. With in-app purchases, I can now have people with multiple accounts pay a bit more than the person who only wants one account. That way, I can also limit the people who actually have eight accounts, so now they think twice before adding them. With a free app, I would hit the limit immediately, so I put the price a little higher to make sure it goes slowly.

No. You didn’t get screwed when you added multi-user features. You got screwed when Twitter went insane.

Guild Wars 2: Charr Footprints Backwards

I have a little information on this: Footprints are determined by the geometry of leg joints. That is, the direction of a footprint is determined by the joints of a particular creature’s legs and ankles. For all the races except Charr, those bones bend in the same direction of that of a human, they each have the same “ankle roll.” But if you look at images of the Charr, the ankle roll is different. And it’s the way the leg is configured that results in the footprints being backwards for the Charr. Or, as an artist said, “Once the Ankle goes over the ball of the foot, as it does with the Charr, the footprints get reversed because the (game) engine thinks the foot is pointing the opposite direction.”

In Guild Wars 2, the Charr are a primary playable race with significantly unique designs (i.e. they are giant bipedal cats). I never have personally noticed that Charr footprints are backwards, but for an entire playable race to be given such treatment, that’s very odd.

The Verge: Vizio P-Series review

Where was Vizio at CES?

This isn’t a review of any Vizio TV. It’s an article of words that merely exists as filler for the thinnest veneer of analysis.

Don’t buy a 4K TV this year.

Laravel 5 Released!

Laravel 5 was released yesterday. It’s a more humane version of the anti-monolithic Symfony. For the last couple weeks, I have been reading, learning and experimenting with Laravel and it has been great.

I have been tinkering and tweeting about it occasionally. Everyone needs a PHP framework in their life.

Raspberry Pi 2

1GB of RAM, quad-core 900 MHz processor. It’s already better than many computers running Windows XP fifteen years ago.