Sunday, October 28, 2018

Cheap BT headphones

As usual, when I want to try a new tech, I start with the cheapest usable option available. In this case I found Bluetooth Sport Earbuds for five bucks, so I gave them a try.

I must admit, running without cables was really comfortable and I started to wear them on my “grocery walks” as well. Build quality is quite decent, but they have some flaws, like one earbud is louder and the other makes crackling noises when inserting into an ear or lightly pulling on the cable.


The in-ear horn is nice and shirt clip is a must to reduce jumping of the on-cable control box. I made a loose knot on the cable for the clip to stay in place, but It's often not enough, so I just stuff the control box under my shirt, hat or neckband.

AirPod-style earbuds (“truly wireless”) would be much better though. I had health concerns about effect of two wireless devices right next to my brain, but I learned for music they're only in receiving mode and themselves don't emit anything.

It does make sense, as transmitting is more power hungry, so if there's nothing to send, it's better not to do it and save battery.

UPDATE: Yes, my current favorites are truly wireless earbuds. I tried a few cheap ones and while they work nicely, I'll probably invest more next time and they should go a bit deeper into the ear, so they don't fall off and the sound is usually better.

Wednesday, October 17, 2018

Client-Server Web App

I'm often oldschool and even I keep an eye on contemporary approaches, I don't really pay much attention to them. I'm probably worried it's just a short term fashion or an upcoming dead end, but sometimes I miss a lot for a long time – like this time.

I prefer server side HTML rendering, because it's a single solution for both users and robots. I perceive Node.js as yet another Java and I have no problem switching between languages, so using JavaScript also on the server is not that appealing to me.

Years ago I participated on project, where client side was created using GWT in JavaScript, while servlet only provided data via API in a form of JSON messages. I liked the idea, but I didn't see myself doing such thing.

Few years after that I participated on a project with the same approach once again and still didn't see what it's all about. As a sole programmer on most of my projects I don't have the need to divide the code. But this time I finally wanted to try it. My opportunity came in less than a year.

The project for it was perfect – transforming old intranet app, created in Microsoft Access, into a modern web app. Because of the Microsoft ecosystem in their IT department, my proposal to try the “recently” released ASP.NET Core looked like an obvious choice.

I was little worried the Core platform may lack some features, but version 2.x was mature enough to provide everything I needed and I had QetriX up and running in just a few days.

For the client side I created standalone HTML templates, that defined a layout and components. Because nowadays the DOM is optimized enough, I opted out of virtual DOM, defined custom properties as “data” attributes and the rest as QetriX Modules.

It worked surprisingly well, but I also encountered some drawbacks. First of all, I worked with a lot of numbers, but values and data attributes are strings, so I had to convert data types all the time. Second of all...