The Go-based Web Server

Every now and then I begin a project with little practical reason: There are existing, better alternatives; it doesn’t have a rational return for the time spent; etc. But I do it just as a diversion from other projects, particularly if I’ve been drawn away from a realm for a bit.

In this case I’m switching the presentation server of this blog (among other web properties) to a Go-hosted, protocol-buffer-persisting, in-memory SQLite-using minimalist server. Still edited and published from WordPress, but wholly detached from WordPress on the authoring side (on a hidden private server, pushing to the minimalist server side). I’ve gone through a number of blog engines over the years, including several custom built, and in this case it is a fun diversion to play around with HTTP Push and a few other techniques I’ve been curious to build around. I’ve delayed a couple of technical pieces until I publish it through that, with the first iteration hitting in the next couple of days.

My technical life otherwise lately has been primarily in deep learning, having been pulled into it for professional reasons. It has been amazingly rewarding — my favorite tasks are those that expose me to a lot of things that I don’t know — but I do like to expand out on occasion. My first iOS app release (e.g. wholly my own work, and not a contribution to another project) is imminent as well, so that should be fun.

So that’s a lot of coming soons. Coming soon!

Yet More Bits and Bytes

Again I must offer apologies for the lack of real content. It has been an exciting, busy period. Many of the pieces I’ve started over the past few months still sit in a draft state.

As one change, I recently updated my work laptop to a Lenovo Yoga 720. I don’t normally post about random hardware, and certainly have never mentioned the procession of laptops that preceded this one, but I simply love this laptop. I’ve always viewed my laptops as a poor alternative to my desktop when the situation absolutely demands, but this is the first laptop that I actually want to use (and the first that offers a battery life remotely approximating its claims). Outrageously fast 1TB SSD (1.5GB/s at times, and of course ridiculous random access times), i7, gorgeous 4K screen, and work-day long battery life. Most importantly, given a lot of recent work I’ve been engaged in, it has a GTX 1050, allowing me to pound out some convolution neural networks on it. 2GB of GPU ram limits the scope of the network, but still offers extraordinarily opportunities to hash out a lot of solutions that I can then move to the less portable Titan V. I don’t even use the convertible or pen functionality, and very seldom use the touch screen, though they came along for the ride.

The one real weakness of the 720 is that its Thunderbolt 3 port (e.g. through the USB C connector) only has 2 PCI-e lanes, or about 16 Gbps of bandwidth if my recall is correct. I contemplated putting the Titan V in an external enclosure and tasks that are heavily bandwidth bound could be limited by this. For gaming this restriction is unlikely to be relevant, but it could come into play for workloads that need to constantly move working data to and from the GPU. I do plan on benchmarking it at some point, as having the GPU external from my desktop is ideal for both flexibility and heat dissipation.

The Titan V is simply outrageously powerful, on that topic. Whether double, single, or half precision, it is incredible for classic networks and scientific or financial uses, but add in the Tensor cores and it reaches extraordinary heights. An incredible processing value.

To continue this diversion, it is astonishing how absolutely AMD has screwed up their opportunities in the deep learning and even scientific community. OpenCL is an afterthought, and everything, it seems, is built only for CUDA. They tried a final minute hail mary with HIP, but clearly gave it too little resources to really make it credible. It will be interesting to see how they try to recover — competition would be good for everyone — but as is it’s an nvidia world.

Other than that, I solemnly promise to get a couple of technical pieces published shortly. Swearsies. And they’ll be great.

Bits and Bytes

Professional obligations have delayed some technical pieces but for now just wanted to pound out a few quick thoughts while the coffee brews in the French press (oooh la la la).

On Tablets

Five years ago I made my first Apple purchase ever, adding a 3rd generation iPad to the household.

It has been a remarkable value. The pad has served the family well over many thousands of hours of service, over a thousand full charges, and still last for hours. The screen still looks great (something that wouldn’t necessarily be true were it OLED-based — I love OLED but it is does have downsides for long-term heavy usage). From a cost-versus-usage perspective it is quite possibly the most effective purchase I’ve ever made, the Nexus 7 2013 just slightly behind.

The device is no longer supported in recent iOS updates, and is showing its age on the speed front.

It was finally replaced, or at least augmented with a new model.

The iPad is without peers, and what once was a competitive space has been winnowed out to junk extremely low-end Android devices, the iPad in the value space (that original 3rd gen was $620CAD. The 7th gen replacement is $399CAD), and then Samsung devices up with top-tier iPads and Surfaces in the high end.

If there’s a question about what tablet to buy, the answer is iPad 9 times out of 10. And even with our smartphones getting larger, having a pad to fall back to when convenient not only gives you a more generous, readable screen, it makes battery management so much better. Not just retaining a charge, but avoiding lifetime battery exhaustion of the sort that has been making the news.

A pad remains a great compliment to a smartphone and a desktop.

Since that original Apple purchase this household has added a lot of Apple to the mix, in every product line. My workstation is a Ubuntu/Windows box aside a Mac mini (a product that needs a refresh, though moving to an external USB3 SSD is elegantly simple). My main smartphone a GS8, but my fallback / dev device is an iPhone 8. There are great options in all spheres.

The Nexus 7 2013 is still running well (it is extraordinarily unfortunate that Google abandoned the line, jealous of all the lucre Apple was pulling in, failing to emulate it with the miserable, grossly overpriced Pixel lines), but while both devices are aged and out of the OS support window, the Nexus 7 has me much more hesitant to trust it among my children, which was validated when I put it away one night to find an R rated ad layered over the screen, using draw on top permissions (despite not having the permission, instead using an unpatched exploit), kicked off by a Minecraft-clone my son had installed. In a rational world this developer would be punted from the platform for eternity, but in the Google world they just need to pay $25 and be up on the platform again minutes later with another fake identity.

If Google Play goes without curation — which is a choice that has many merits to go with the downsides — at least offer the optional validation of the developers/publishers (whether individual or corporation) and allow users to limit installs to those that are verified. Make the threat of being kicked from the platform something that actually scares those who install shady advertising library from exploitative, garbage companies.

The Dirty Blockchain

Got forwarded this submission to Hacker News, seeking my opinion given my recent comments on blockchain related technologies (where I have become involved in some extremely high performance/low latency initiatives).

I try to avoid negative commentary, and negativity in general, but that submission struck me as curious. Enumerating every grievance of an entire industry and then assigning it to a single implementation/opportunity is not a productive approach.

The overarching blockchain concept, which applies to merkle trees, shared and cross signed ledgers, data transparency, etc, and does not necessitate proof-of-work, entails an enormous number of technologies, uses and implementations. It isn’t a magic cure-all (or even cure-many, and might actually inflict and infect many, being misused and abused), it is over-hyped, but it isn’t productive to discredit anything tangentially related. Buying into the anti-hype can be as misleading as buying the hype.

For years people have linked to some old pieces here for anti-NoSQL firepower. I never wanted to champion that cause (the cause of being anti-something, or of being defined by negativity). As with the blockchain, often people were trying to counter the hype, but in doing so perilously veered to an anti-position that was sometimes just as coarse.

It’s a very nuanced industry.

I Was Wrong on Intel

A few years ago I exclaimed that we shouldn’t count Intel out of mobile. I like to revisit those old statements and own my mistakes, and in that case I was completely wrong. [I also thought HD-DVD would beat BR, but in reality streaming beat both].

At the time I had viewed Intel as a remarkably capable company that was most afraid of competing with themselves, but that would stay at the edge of relevant in the space. The compete-with-themselves bit remains true, but they are completely irrelevant in mobile now.

In the void mobile chipmakers have made enormous advances at eventually competing with Intel’s cash cow.

The notion of Apple moving all of their devices to variants of their ARM processors is a very real possibility now: There remains a performance differential, but scale the chip up to the power profile of a desktop or a laptop, copy/pasting cores as necessary, and enormous performance is possible. The single core performance is already there, which is simply extraordinary given the traditional strengths of each variant, and the classic design philosophies guiding each architecture.

Intel’s missteps lately have been surprising, and they seem to be stumbling at everything they do lately. It has been a lost half decade, and they don’t seem to be recovering.

Kotlin and Swift

One of the reasons I picked up Kotlin on the Android (and general Java) side was that as a language it shares a lot of parallels with Swift, which I’d been embracing at the same time.

After several projects and many tens of thousands of lines of codes, just wanted to reaffirm that Kotlin is fantastic. It carries some warts from its JVM targeting foundation, but if you’re doing Android and you haven’t embraced Kotlin, you’re missing out.

On Editing Old Posts

I periodically edit existing posts to make them more concise and efficient for readers. Often this entails removing adverbs — it is remarkable how seldom the word very adds to a statement — and parentheticals. I have a bad habit of trying to cover possible counterpoints when I make a statement, yielding unnecessary wordy entries.

It’s worth making the time a little more beneficial for readers. One of the reasons I didn’t make use of podcasts early on was that most were often improvised with a lot of umms, casual banter, etc, offering little real content density to listeners outside of entertainment (which is now the case with many YouTube channels). Lately I’ve found a lot of fantastic podcasts that clearly have considerable preparation and research to provide a high value/high content audio experience  to awareness/education.

Things That I’ve Enjoyed Lately

Admission Requirements – wonderful book of poetry by Phoebe Wang

PlayerUnknown’s Battlegrounds – current diversionary game to quickly hop into for a short round, with a high-intensity conflic. Most rounds are 98% collecting things, 2% getting shot at from sources unknown. Lots of bugs, lots of hackers (especially in third-person perspective — stick to FPP), but the exhilarating game experience makes it worth a try

Cohen Live – an album that I return to every couple of years, wondering how I ever put it aside

The Problems of Philosophy – Enjoyable read by Bertrand Russell. The whole field of philosophy has fascinated me lately, and I also got great value out of the Kindle edition of The Philosophy Book (Big Ideas Simply Explained)

Virtually any Nordic / Euro show added to Netflix – Have loved so many of these.

Glorious Fall In the Northern Hemisphere

Everything is spectacular right now, and I’m hard at work on some exciting projects. I hope to finish up a barometric land topography piece (an enjoyable side project that I mostly used to get very acclimated with Kotlin, and then decided to use as a vehicle to play around with the iPhone 8 and re-acclimate with xcode and swift) within the week and it should make for some interesting content, but aside from that I hope to be very prolific in my creations over the next while, having the time and attention to make the most of opportunities.

Thank you to all who have queried on the quiet — it will be worth the wait.

Technology and Population Density Trends

A bit of a rambling, conversational piece today.

Amara’s Law states-

We tend to overestimate the effect of a technology in the short run, and underestimate the effect in the long run.

We declare that a technology changes everything, realize that entrenched patterns/behaviors and small hangups limit broad adoption. We discount it as over-hyped and not as significant as expected. It quietly takes over and changes the very foundations of society and our lives.

Recently I was pondering what electric cars and self-driving cars would do to population density. The former — using mechanically simpler vehicles with a much less expensive energy source — will significantly reduce the cost of driving as it achieves the economy of scale, while the latter will reduce the inconvenience of driving, commuting in particular.

Self-driving cars will not only allow us to do other things during the ride, it will significantly increase the capacity of our roads to handle traffic by reducing human error and inefficiencies.

Intuitively, at least to me, these changes will propagate lower density living. That home that previously would have been an expensive, three-hour commute becomes a relaxing period to watch a Netflix series or catch up on emails.

Considering the probable social change of self-driving EVs led me to consider the changes over the past several decades. In Canada, as an example, lower density areas of the country — the Atlantic provinces, rural areas, small towns and villages — are hollowing out. The high density areas, such as the Golden Horseshoe around Toronto, is a magnetic draw for all of Canada and continues growing at a blistering pace.

Even if a home in the Toronto area costs 5x the price for a given set of amenities, and even if a hypothetical person might prefer lower density, many forces still draw them in.

Which is strange, in a way. I grew up in a small city and seemed to be completely isolated from the larger world. Calling a relative 20 minutes down the road necessitated long distance. My town had no computer store, a mediocre BBS, few channels on television, no radio station, etc. There were few resources for learning.

I was wide eyed at the options available in the big city.

Yet today we live in a world where that same small town has inexpensive 100Mbps internet, and can communicate with anyone over the globe in an instant. Where you can order just about anything and have it the next day, or even the same day. Every form of entertainment is available. Every resource and learning tool is a couple of clicks away (aside — education is one area that has yet to see the coming change from the new world). Few of the benefits of the density are missing.

But those same changes led to centralization, and a hollowing out of most of the better jobs, entailing the workforce having to follow.

We centralized government and administration, pulling the school boards and government offices, banks, etc, out of those small towns in the quest for efficiency, moving up the density ladder. Those five small villages amalgamated to a single board, that then got pulled into a larger board in the city an hour up the road, etc. Connectivity means that management for the few remaining auspices of structure can be at a far flung location.

Every medical specialty was moved to larger centers as the ownership of cars became prevalent, and long drives were accepted. Seeing a pediatrician 200km away becomes a simple norm. Service and even retailing gets centralized to some unknown place elsewhere on the globe.

Everything centralizes. Because it can.

Most decent jobs require a move to density. The same forces that gave the convenience of the city in far flung locations also relegated it to being essentially a retirement home.

Reconsidering the probable change of EVs and self-driving cars will likely accelerate that migration.