HNHacker News
TopNewBestAskShowJobs

martin_ky

243 karma · joined July 31, 2017

Software developer from Bratislava. Focus on native embedded / desktop / mobile software. C++, Qt, Java, Kotlin, JavaScript. Also dabbling into gamedev, graphics, algorithmic trading. Meanwhile also cloud: AWS, Kubernetes.
submissionscomments
martin_ky··on Why the Update Fever Is Bad
I don't think it's the added security, that makes new software slower and less responsive.
martin_ky··on Why the Update Fever Is Bad
I don't know if it's just me, but I have to exert significant energy to convince (typically) new hires, that it does not really hurt anything if we use older versions of some dependencies, as long as they are stable and we are not hitting any bugs or vulnerabilities. In other words: it is not reason enough and not worth to update only because a new version was just released.

Such discussions usually end in one final argument from the new developer: "But your version is no longer maintained!"

martin_ky··on Computers are fast (2014)
I beg to differ. I find UI programming (and by extension any kind of graphics programming) interesting and rewarding. I can see the results of my work immediately. The visual confirmation after each code-compile-debug cycle is satisfactory. I believe many UI programmers share this view.

Personal taste aside, UIs tend to be slow for different reasons:

I think the major reason is the mindset of "oh, it's just UI", thinking that UI is not really 'that' important [part of a bigger system] or that anyone can do it. Not enough attention and expertise then goes to UI.

On the other hand, if UI gets enough attention, the effort tends to go to design mostly. You end up with a design department producing beautiful artwork and one poor overworked programmer putting it together. Management tend to overlook the fact, that UI is not just Photoshop or Aftereffects work, but someone needs to actually write the code that uses those pretty graphics assets. This programming part is often misjudged as a trivial step.

Don't even get me started on motion design. This whole discipline can be summed up as "how can we use up more CPU/GPU cycles and make things less responsive".

Then the market became saturated with UI frameworks built on top of web browsers which by itself is a thick, slow and bloated layer - a far cry from native UI performance. Unfortunately this is becoming the norm due to obvious commercial advantages - it's cross platform and it's easier to hire JS UI programmers. I mean good luck finding a programmer with experience in several native UI kits (say Cocoa, MFC and Android) at once. Even finding someone with adequate experience in one of them is hard enough nowadays.

Doing UI properly is expensive.

martin_ky··on Coda, a “next-generation spreadsheet” – from rows and columns to custom apps
> Has this been tried before?

Yes, on Windows this technology is called OLE (Object Linking and Embedding). It allows embedding (parts) of other applications' documents in a document. Nowadays only a few programs besides the MS Office suite provide OLE capability.

For example, you can embed a complete Word document inside an Excel cell by clicking: Insert -> Object -> Microsoft Word Document. By double clicking this object, the Word UI opens up inside Excel.

martin_ky··on Coda, a “next-generation spreadsheet” – from rows and columns to custom apps
I am genuinely curious to learn what do you mean by "delivered in a modern way"? Which parts of Excel are obsolete and could be modernized?
martin_ky··on Font-display for the Masses (2016)
Thanks for the tip. The command line flag for Chrome is --disable-remote-fonts and it works as of version 60. But this breaks also other, more useful uses of web fonts, such as font icons. I guess my gripe is mostly with web designers who prioritize design over readability.
martin_ky··on Font-display for the Masses (2016)
I wish browsers provided a setting to prefer internal system fonts over web fonts (or even option to disable web fonts completely). Readability is still important - not everyone has a >200 ppi display. Fonts distributed with the operating system are usually well optimized (hinted) for on-screen usage. Proper hinting is critical to readability at lower resolutions / small font sizes. Unfortunately it is a painstaking manual (and therefore expensive) process [1]. That's why virtually all web fonts are simply print fonts, unsuitable for on-screen usage, except at large point sizes (e.g. for headings).

[1] https://www.typotheque.com/articles/hinting

martin_ky··on Marko – An isomorphic UI framework similar to Vue
> Now that I'm forced to dive into it, I see that they just reinvent square wheels in a wrong ways that were polished a decades ago in regular desktop apps.

Being a desktop and embedded developer myself, I share your sentiment. My personal explanation of the state of the art of web UI tech is, that there can only be wrong ways of doing it if the basic abstraction at the bottom of the stack is wrong. HTML was invented as a hyperlinked semantic document markup language with presentation largely left to the browser's interpretation. Presentation (CSS) and interaction (JS) aspects were only added (dare I say "glued") to it later, which seems like a design afterthought.

martin_ky··on Afraid of Makefiles? Don't be
Due to its versatility, Makefiles can be creatively used beyond building software projects. Case in point: I used a very simple hand-crafted Makefile [1] to drive massive Ansible deployment jobs (thousands of independently deployed hosts) and work around several Ansible design deficiencies (inability to run whole playbooks in parallel - not just individual tasks, hangs when deploying to hosts over unstable connection, etc.)

The principle was to create a make target and rule for every host. The rule runs ansible-playbook for this single host only. Running the playbook for e.g. 4 hosts in parallel was as simple as running 'make -j4'. At the end of the make rule, an empty file with the name of the host was created in the current directory - this file was the target of the rule - it prevented running Ansible for the same host again - kind of like Ansible retry file, only better.

I realize that Ansible probably is not the best tool for this kind of job, but this Makefile approach worked very well and was hacked together very quickly.

[1] https://gist.github.com/martinky/819ca4a9678dad554807b68705b...

martin_ky··on HTML5 Version of the Tron:Legacy Boardroom Scene
Exactly. These fictional UIs are designed for a single end - to look good on camera. I think there is an inverse correlation between "cool" and "useful" - the "cool" often distracts from the "useful". While this kind of UI could work for something trivial like a simple calculator or alarm clock, in my experience it does not work for serious applications. As works of art however, these things are a beauty to look at - http://sciencefictioninterfaces.tumblr.com/

I had this idea first back when I saw Star Trek The Next Generation and its slick flat computer panels, called "okudagrams" after their designer, Michael Okuda - https://en.wikipedia.org/wiki/LCARS. I tried to reproduce the look in a note-taking application. It didn't work. The UI was dominated by these large colored buttons and arches, with too much contrast against the black background, leaving too little room for the actual content.

martin_ky··on Can you make your brain not see this circle illusion?
This effect is kind of similar to what makes subpixel font rendering look horrible when the wrong LCD subpixel order is selected. Or why text looks jaggy on pentile displays, especially while scrolling.
martin_ky··on Can you make your brain not see this circle illusion?
Similar device was used in the sci-fi novel Snow Crash. It appeared like a black and white image of static but in fact contained a subliminal message which tapped into some subconscious low-level cognitive functions of the brain. Just by looking at it, it reprogrammed the victim's brain and made them into a mindless zombie.
martin_ky··on Can QML become the next standard for web UI?
There has been a recurring theme in the comments: "You don't just replace HTML with something else and non standard overnight."

Perhaps, I should clarify... In my blog, I don't call for replacement of any current web technology. I am simply proposing an alternative client language that would exist side-by-side with current tech. Purely from technical perspective I believe QML could be this language, because unlike HTML, it was purpose-designed from the beginning as a UI language.

It does not mean rewriting browsers from scratch either. QML and the Qt Quick library share many aspects and technologies with any HTML browser - a JavaScript core, a web access network stack, utilizing native graphics acceleration APIs. So already there would be many common shared components. In my idea, QML would be just another frontend (language) reusing those components. Although implementing QML on top of current tech (HTML+JS+WebGL) is also within the realm of possibility, it's entirely not what I had in mind and would defeat the purpose.

I also don't want to add any non-standard extensions or plugins to existing browsers. What I would like to see, is QML being adopted as a new web standard. I realize this does not happen overnight and that there are political, commercial, licensing and consensual prerequisites that need to be solved first. It would be interesting to hear the thoughts of Digia and KDAB (the companies behind Qt) on this.

From a technical standpoint, I don't see any obstacles why this could not happen. QML is conceptually a simple language and I think it could be standardized relatively easily. The next step would be to standardize the library of UI elements (Qt Quick) or its minimal viable subset for version 1.

martin_ky··on Can QML become the next standard for web UI?
Apart from maybe simple shapes and fills, I think there is little value in adding a complete object-oriented library of scriptable graphics elements into a UI layout / widget language.

For custom drawing needs (charts, data plots, diagrams, etc.), you could use QML Canvas, Context2D and Context3D which offer far greater flexibility with their immediate mode APIs than an object-oriented API could ever provide.

martin_ky··on Can QML become the next standard for web UI?
I apologize. I wrote the article expecting that readers would be already familiar with QML or look it up.

What I ultimately wanted, was to get a discussion going and see if other people (who know both QML and HTML) share my view - that QML would be a great alternative (not replacement) to HTML for writing web UIs.

martin_ky··on Can QML become the next standard for web UI?
You're right. The blog post announcing the NaCl port is dated 9/2015. I don't believe that effort is still active nor am I aware of any official efforts to get Qt / QML run on WebAssembly.

There is the Qt Quick WebGL Streaming official project - https://news.ycombinator.com/item?id=13744631 - but this is a different thing entirely: instead of running the QML app on the client, the app runs natively on the server. Instead of rendering the UI directly using OpenGL, the scenegraph generates a stream of WebGL commands. An accompanying JavaScript library receives this command stream through a web socket an replays it in the browser on a WebGL canvas. Kind of like what Remote Desktop does.

martin_ky··on Can QML become the next standard for web UI?
I (author) meant that as an example of how you could achieve portability and consistency with HTML5. The canvas approach is NOT what QML does, however.

Not unlike HTML DOM, QML builds a tree of objects from the declarative representation (.qml source code) with discoverable properties. It would be straightforward for accessibility tools to traverse this tree and extract information from it.

As user jcelerier already mentioned, QML has accesssibility features built-in. It provides a tool to annotate any part of the UI with accessibility metadata. HTML has nowhere near such a consistent approach to accessibility.

martin_ky··on Can QML become the next standard for web UI?
> I'm not sure that any of these UI frameworks are going to get much traction

QML / Qt Quick gets a lot of traction, from mobile and embedded systems developers and lately a lot from automotive industry. It's just largely unknown to web developers, because it's not on that platform. What I would like to see, is that it got noticed from web developers too and then maybe it will get some push to get to the web.

> they aren't as flexible, don't solve web problems as well as the existing solutions

IMO, it's the current web technology that creates those "web problems" :) I don't say that QML solves them all. But it couldn't hurt if we have an alternative to HTML+CSS.

martin_ky··on Can QML become the next standard for web UI?
We get interactive framerates ~30fps with Qt Quick on Raspberry Pi B+ with fullscreen video playback in the background.
martin_ky··on Can QML become the next standard for web UI?
QML is also a general purpose declarative language with data bindings. The UI framework, called Qt Quick, is just one, though most prominent use case. As a non-UI example, there is Qt's own new experimental build system - QBS - http://wiki.qt.io/Qbs_Quick_Reference
martin_ky··on Can QML become the next standard for web UI?
Yes, I (post author) believe QML can be implemented on top of current browser tech, namely JS+DOM, or NaCl+WebGL. Someone indeed did implement a subset this way - https://qmlweb.github.io/ and the latter might even be supported by Qt Company - http://blog.qt.io/blog/2015/09/25/qt-for-native-client-and-e... although I didn't try that myself and I don't know if that effort is still ongoing.

I'm not a fan of stacking too many abstractions on top of each other. QML basically consists of the same ingredients as other web tech: a javascript runtime + GL/ES renderer + network access manager = same things a HTML5 engine needs under the hood. Surely these could be reused in a browser implementing QML.

martin_ky··on Can QML become the next standard for web UI?
Creating responsive UIs in QML is quite easy: just hook to the screen size property (width property of the root element) and modify your scene accordingly. What I meant by that was, that QML is rather good at displaying things that you meant to look the same identically across platforms.
← PreviousPage 2 of 2