HNHacker News
TopNewBestAskShowJobs

romaniv

2,750 karma · joined February 2, 2011

submissionscomments
romaniv··on Modern JavaScript for Ancient Web Developers
>The value proposition is "You can use the same code on both the server and client"

With differences in standard libraries, environment specifics and even language features available, I think a far more accurate statement would be "you can sometimes use some code on both the server and client".

romaniv··on Why OO Matters in F#
I've been thinking and reading about OOP and its roots recently.

Here are some interesting resources on the subject:

Alan Kay's elaboration on what he envisioned when he coined the term:

http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht81Ht/doc_kay...

Two papers he references:

https://www.rand.org/content/dam/rand/pubs/research_memorand...

http://repository.cmu.edu/cgi/viewcontent.cgi?article=2281&c...

Cool article on failures of OOP:

http://www.smashcompany.com/technology/object-oriented-progr...

Its long and frustrated, but most of the points he makes are true. A lot of the stuff people claim as

I think the original vision of OOP is more valuable than what we call OOP right now. I think a good balance would be writing low-level stuff in functional style and then wrapping it in objects when you need state and cross-library messaging. Also, it seems there is some overlap between the original vision for OOP and what we call "microservices" today.

romaniv··on False information on the internet is hiding the truth about onions
It's a chicken and egg problem. To get a lot of incoming links you need to be popular. To become popular (via search engines, at least) you need a lot of incoming links. This heavily penalizes smaller websites and rewards incumbent players on the web who have dedicated marketing teams that can afford to spend several hours a day on social network promotions and viral campaigns.
romaniv··on False information on the internet is hiding the truth about onions
Related anecdote.

I used to write for an amateur online magazine with product reviews and analysis of a certain industry. It wasn't big, but the content was good - not just in my opinion, I was told that many times by various readers. In ~2005 we routinely were #1 to #5 in searches related to the products we're covered. Today I often can't find new articles from that website even when I use the exact title as the query. The website is minimalist, fast and has no ads. The articles are extensive and well-conceived. And yet they are buried several pages deep under piles of single-paragraph stub "reviews" on more popular resources.

I assume the same thing happened/happens to a lot, maybe most small-scale content creators these days. Clickbait rules and content doesn't matter nearly as much as the number of incoming links. You can no longer rely on search engines to get you traffic and need to constantly self-promote on other websites (e.g. social networks).

romaniv··on Scrolling on the web: A primer
I'm not sure why anyone is using scrolling events for any standard websites at all. It's much easier to have a function on timer that detects the current viewport position and acts accordingly. The code is simpler, the performance is better, and it's way more future-proof.
romaniv··on The Internet Is Saving Culture, Not Killing It
CDN-hosted scripts, for starters.

Also, running old games in DOS Box is often a finicky process that requires some tinkering for every game. That's one of the reasons GOG.com took off so rapidly. People are gladly paying several bucks to save themselves the trouble of messing with configs and reading forums about game's quirks.

This isn't a huge deterrent in case of games, but it will be a huge deterrent for retro-browsing, because the whole point to the Web is its interconnectedness. Plus, there are many more websites than there are games.

romaniv··on The broken promise of Web Components
Fixed it.
romaniv··on The broken promise of Web Components
A demo of sorts:

http://quickenloans.github.io/Behaviors.js/

The code will look extremely non-idiomatic to most frontend engineers. Treat it as a thought experiment (which it is). The important thing isn't the particular implementation, but the ideas I outlined above. There are other, often simpler, ways to implement the same concepts.

One property of these libraries that might not be immediately obvious is that they "automatically" adapt to changes on the page. So you can add an element with a behavior via AJAX or dev tools and it will actually work. This is why using timers and global events is a part of that list.

Another thing is that none of these libraries have an API or modify the global JS namespace. This is part of the thought experiment not directly related to the main concepts. It drives some of the complexity.

Edit: Fixed the link.

romaniv··on The broken promise of Web Components
Couple years ago I gave some thought about how to handle reusable JS in a sane fashion. Actually, a lot of thought. The end result was something that superficially sounds like Web Components, but it quite different underneath. I guess a good name for it would be "Web Behaviors".

It's not a framework or a library, but rather a set of rules and practices of how to do things. It will sounds somewhat weird, but I'll list them anyway. Maybe someone will find it useful:

- Overall mental model: libraries don't implement components, but rather change the behavior of certain elements on the page.

- No library keeps state in JavaScript variables. DOM is your model.

- All configuration is also done through DOM with liberal use of CSS selectors to reference things.

- No library has any direct dependencies on any other.

- Things that need to react to changes should (if at all possible) use timers. If that's not possible, they should register global event handlers, rather than attach them to individual components.

While this might horrify some people, it actually forced me to come up with rather nice, abstract behaviors that capture many common features I had to commonly implement. Also, this plays well with the notion of progressive enhancement. I recommend everyone to try it on some new web-based project of low to moderate complexity. Ir really does simplify a lot things.

romaniv··on Amper raises $4M to use AI to write music
Those are pretty handy features, but they are not nearly enough. I know plenty of people who spend several hours a day entering, validating and fixing data in giant Excel spreadsheets because they need to work with multiple systems that don't have real integration points. That work is mind-numbingly boring and completely avoidable. (Besides, system integration is also rote work, only one level up. I know plenty of engineers whose only job is to constantly write adapters between various web services.)
romaniv··on Amper raises $4M to use AI to write music
We can't automate filling out Excel spreadsheets, but investing 4 million dollars in automating music creation. Meanwhile there are plenty of CC-licensed tracks and plenty of aspiring composers/producers who would gladly work on creating tracks for "commercials or short online videos" for very reasonable price.
romaniv··on Summary of the Amazon S3 Service Disruption
Anything that requires human approval for routine operations quickly devolves into bureaucracy that adds a lot of manual steps without any real safety. Now, you may argue definition of "routine operation", but the thing in the article didn't sound like they were doing anything crazy.
romaniv··on Quantifying the Impact of “Cloudbleed”
Some website being Slashdotted is not in the same class of issues as users' (possibly encrypted) page content being spread all over the web. Also, the notion that you either need to use some super-centralized platform or be susceptible to Slashdot effect or loosing backups is a false dichotomy.
romaniv··on A static website with React
> I think the whole benefit of a static website generator in general is to avoid the "I copy/paste the same header/footer on each" step, especially copy-pasting the menu/header, as your menu can change as you add new pages / blog posts.

If the website is simple, you could use iframes for headers and footers.

romaniv··on A static website with React
Search is more than Google. There are many other search engines. And I'm not just talking just about Bing. I'm talking about the likes of Yandex and Baidu with huge user bases. Do you know whether they can crawl SPAs? What about Archive.org? What about new projects that just try to get started and need to crawl the web to do their thing? Saying "I don't care about those" over and over again is not a good enough answer.
romaniv··on Simple Made Easy (2011)
This is a classic. Definitely worth watching for everyone working within IT.
romaniv··on Websites can now fingerprint a device when multiple browser instances are used
>If a website doesn't have at least minimal functionality, then the website is broken.

Curious. This goes completely against the sentiment in all of the discussions around modern SPA frameworks and JS libraries I've seen on this very website. It seems that for most fronted devs today JS is a natural prerequisite for using their product. Progressive enhancement is often sneered at[1] as impractical and unnecessary. This leads me to believe that there are two mostly disjoint groups of people commenting on this issue in different threads.

---

[1] - Good example: https://www.viget.com/articles/the-case-against-progressive-...

romaniv··on Mark Cuban on Why You Need to Study Artificial Intelligence
I edited the post because I thought someone will nitpick on my comment about hardware, but it seems you caught the older version.

> This is a fallacy, AlphaGo didn't increase very much with additional hardware at all

It did. Please take a look at the page 36 of the original paper. (https://gogameguru.com/i/2016/03/deepmind-mastering-go.pdf) The performance did not grow linearly, but the increases were vert significant.

>it's elo would still have been higher than lee se-dol's elo

I seriously doubt it would win that match. One-GPU version lost to 8-GPU version around 95% of all games.

The paper is somewhat misleading in estimating relative performance of AlphaGo compared to older programs, because (as far as I know) while all of them were run on the same hardware, only AlphaGo used GPU acceleration.

romaniv··on Mark Cuban on Why You Need to Study Artificial Intelligence
>And let's take a look at AlphaGo, how would you do that with SVMs or decision trees?

This is a poor example. There are Go programs that work very well and use exclusively MCTS without any neural networks.

romaniv··on Mark Cuban on Why You Need to Study Artificial Intelligence
>I'm not sure I fully buy the "explainability" argument against deep learning since our goal is human level intelligence and human intelligence isn't easily explained either.

There are two types of explainability. One is explaining why the system converges on correct solutions in general. Another is explaining why a particular decision was made the way it was made. Human intelligence is usually very much explainable in the second sense. This is not always true, but such cases are called "intuition" and we tends not to trust such judgements for mission-critical tasks.

romaniv··on Using logistic regression to predict parking difficulty
The grandparent post contains a hint of something I've already heard in lectures and from ML practicioners: boosting and random forests are more resilient to improper tuning (to put it another way, they are more universal and work well "out of the box").

Which, BTW, makes them more appealing to me personally. In many real-life cases extra few percent of accuracy matters very little, but ability to just apply something to a problem without much fuss matters a lot.

romaniv··on CSS Grid – Table layout is back. Be there and be square
XSL was not envisioned as a middle layer between HTML and CSS. Plus, it was a quintessential design by committee, trying to cater to a bunch of conflicting use cases with no overall vision or conceptual elegance.
romaniv··on CSS Grid – Table layout is back. Be there and be square
IMO, HTML/CSS have always been missing a middle layer. It really should be:

- HTML for pure information - Something else (template/view?) for layout and (possibly) forms - CSS for styling in terms of fonts, colors, etc.

This would easily handle layouts, but it would also have some NLS-like capabilities where you could switch from one way of presenting information to another without changing the actual docment.

romaniv··on Lossless Web Navigation with Trails
>Today this would be even harder, with the prevalence of web pages that are actually _heavily_ dynamic apps. Navigation to a new "page" is a much fuzzier concept now. What gets indexed?

This kind of stuff is why I am an advocate of progressive enhancement. It's not about whether someone has JS disabled or not. It's about using HTML as a semantic representation of information rather than a mere rendering layer. The second option might seem more convenient at times, but the first one opens a lot more doors for innovation in the long run.

romaniv··on Front-End Developer Handbook 2017
This is what J2EE developers said back in the day.
romaniv··on Lossless Web Navigation with Trails
From the link:

>But if I try to revisit this later, it’s impossible. I can remember what I found, but it wasn’t a linear progression, therefore my browser history is useless.

If I want to find a page I visited more than three days ago, seeing a tree of history is not going to help me much more than seeing a linear list. There is just way too much information to sift through manually.

The obvious solution is to add full-text indexing by page content. And maybe even store pages for offline use. Perhaps when you enter special browsing mode akin to "private browsing" (although it would be the exact opposite, since it would retain more information).

I am aware of the complex issues this would require to solve, but those capabilities would qualitatively transform browsing and give users back some modicum of control over their page navigation. These days Google is our history. We remember a few keywords and instead of sifting through a giant list of URLs we simply search. Again, sifting through giant tree is not going to be any simpler. In fact, in terms of visual identification it might be more difficult than skimming a list.

...

Some simple machine learning algorithm that learns to bookmark and auto-tag pages would be an awesome feature/experiment as well.

...

And filtering open tabs by a keyword. Many people use tabs as a sort of dynamic set of bookmakers. Partly because they (sort of) preserve page content locally.

romaniv··on Using Immutable Caching to Speed Up the Web
Could you post a link to the relevant part of the spec or some article dealing with this feature?
romaniv··on Using Immutable Caching to Speed Up the Web
Unless we're talking about different things, cache manifest is an HTML 5 feature designed to enable websites to work offline. That's quite different from HTTP-level caching, which would be applicable to any files/resources and designed primarily with performance and bandwidth savings in mind. I might be unaware of some relevant HTTP 2 features, though.
romaniv··on Using Immutable Caching to Speed Up the Web
That is true in most cases, but versioned URLs are a hack that requires you to change document's address and then change a bunch of other documents just to fix an issue with HTTP. It's like changing file content and their names to fix something in FTP protocol.

Also, it doesn't cover all the cases properly, because the page with versioned URLs can be cached as well.

romaniv··on Using Immutable Caching to Speed Up the Web
HTTP caching is a mess. I wonder why no one proposed a properly redesigned and negotiable protocol that covers all the edge cases. (And maybe supports partial caching/partial re-validation of pages.)
← PreviousPage 10 of 30Next →