Tree Research

There is a Muhammad saying about a giant tree,

“In Paradise there is a tree in whose shade a rider could travel for a hundred years without crossing it.”

According to this World Building StackExchange conversation, a horse rider can realistically travel about 50 km a day. This means the shade being mentioned is more than 1,825,000 km long, or a radius of 3,650,000 km assuming a circular overall shade shape.

There is a unit of distance mostly used to measure the size of stars called Solar radius. As the name says, it is based on the radius of our sun, so 1 Solar radius equals to about 695,700 kilometres.

That tree has a Solar radii of 5.25, which according to this NASA page, is around the size of the MU1 Scorpii star.

الله اعلم

Modern Web Dev Overview Presentation

My knowledge on web development practices is several years old, and I find this presentation by Mark Erikson to be a great overview. The number of tools and doodads being in use right now can be overwhelming, and the presentation helped fill in the knowledge gaps in my mind about which one goes where, and why. Highly recommended.

The presentation also linked to this eye-opening (to me anyway) comment on Hacker News:

By the same note, you likely won’t be writing a complex desktop application without some tooling installed, with similar pre-requisites. I don’t know why people get so irritated at “JS tooling is hard”. Try writing an (INSERT FRAMEWORK HERE) app outside the browser.

People assume that writing an APPLICATION for a browser is easy, which is why people get stuck maintaining monstrosities that are disorganized, not composed and tens of thousands of lines of spaghetti. Writing an application in the browser deserves just as much respect as one would give towards setting up the database & schema or creating a service layer.

That lack of respect for front end code is a big reason as to why front end projects have crappy code. React is a real break from this on so many levels… Yes, you’ll need (webpack|jspm|browserify) with (babel|typescript), and likely (postcss|less|scss) in place closer to the start than the end. Much like if you’re writing code for a desktop application you’ll likely need at least an IDE installed, and potentially several libraries close to the start.

My current tooling of choice is webpack + babel, depending on the project I may bring in scss or less, and react tooling as needed. Using CSJ or ES6 style module syntax means cleaner code that’s easier to restructure. Using webpack means being able to bundle resources in a logical flow. Working on a project without webpack + babel is just painful by comparison… I’m working on an ng1 app at work that’s less than 6 months old, and feels like it was written in 2011… having to add .js files to some common point, and not being able to easily refactor services/controllers/directives/components into discrete modules is pretty painful in general.

What does it take to get a Java application going? Maven, some build system, some other tooling, and understanding the component/class hierarchies? It’s not any easier than working with any new tooling.

Surabaya Trip

Here are some photos from a trip to Surabaya last week. Coincidentally there was a night market event near our hotel celebrating the city’s 724th anniversary.

All of these are taken with a Sony NEX-6 bought secondhand from Japan (where it is not possible to change its language, but that’s for another story) using the neat Sigma 30mm f/1.4 DC DN Contemporary Lens.

They were all edited and posted to Instagram first, and I merely uploaded the Instagram-generated files from my phone. Mostly out of laziness, but also to see how the images would work on a bigger, non-smartphone screen. The file turns out to be 1616 x 1080 for the landscape ones (example), which seems quite decent for web uses.

The Logic Behind Japanese Sentence Structure

I’ve been learning Japanese on and off for  several years now. I’m nowhere near good at it, though, and the knowledge decays slowly as it’s not being used. I also have a problem understanding a lot of the why’s in how the language works, so I’m really happy to have found this article:

One of the biggest reasons for this is that the usual way of learning Japanese involves remembering random phrases and sentence patterns in isolation, without actually being taught why those sentences work the way they do. This is fine in the beginning when you’re just trying to learn a few basic phrases, but it makes it very hard to take the next step. The truth is, Japanese sentence structure is actually incredibly logical, and a solid understanding of it will save you a huge amount of time trying to make sense of Japanese grammar.

It is quite well written and now a lot of the rules just click in my mind. I’m glad to now understand the emphasis on particle usages in Japanese sentences, compared to word ordering in English sentences. The article also comes with great diagrams that should help clarify things better for visual learners, like this one: jp-sentence-3

Nintendo Switch’s Cartridges Taste Horrible

Nintendo designed the cartridges for Nintendo Switch to taste horrible, so that children and pets do not eat it:

A Nintendo spokesman said “To avoid the possibility of accidental ingestion, keep the game card away from young children. A bittering agent (Denatonium Benzoate) has also been applied to the game card. This bittering agent is non-toxic.”