Better HN
topnewbestaskshowjobs
Log inSign up

codedokode

9,867 karma · joined Aug 20, 2015 (11y ago) · 5,528 submissions

PHP developer from Russia.
Submissions

comment 8y ago · link · parent

Yes, but I have JS disabled on most sites. Regarding adblock, there were posts that it slows the browser down, injects huge CSS rules into every iframe etc.

comment 8y ago · link · parent

Then let's change it to "IIS and Java Applets".

comment 8y ago · link · parent

Design Patterns are used very often; you probably just don't notice them. Most of the patterns described by Fowler [1] can be found in large web application frameworks.

For example, Ruby on Rails uses Active Record, Page Controller, Template View patterns. If you look at an ORM, for example Hibernate or Doctrine, they use even more patterns described by Fowler.

But of course they are mostly used in frameworks. If you are writing a CRUD app, just take a web framework and make everything as simple as possible.

[1] https://martinfowler.com/eaaCatalog/

comment 8y ago · link · parent

The problem arises when people use something just because they think it's cool and someone wrote about it on Twitter and not because it has clear advantages compared to other solutions. Do not blame design patterns if you don't understand them. But you can blame book authors for not explaining it to you properly; maybe they don't understand the patterns too.

Also I disagree about DB and normalization: in most cases the best choice will be SQL DBMS and normalized data. Please let me explain why:

- normalization saves you from duplicating data; MongoDB will make you do the opposite. Updating the data will be more difficult and you will spend more time writing the code.

- fixed schema will make it easier to understand DB structure for new developers and helps you to detect errors; with MongoDB all invalid data will go straight into the storage and you will spend additional time fixing them later.

- foreign keys and transactions save you from saving inconsistent data into the database; MongoDB won't help you with this.

Designing a database properly doesn't require much thinking, it is a natural thing and you are not losing time.

But I understand what the author is talking about. Recently I was using two of Google's products, Doubleclick for Publishers and Google Analitics. Their UI is super slow, at least on my hardware. One Chromium tab with DFP page consumes over 700 Mb of memory. When I decided to inspect it, I found that on DFP page they used Dart "apps" compiled to JS; each of them was not less than 2.4 Mb. Even the "changelog" app which was just displaying information about recent changes (yes, they did it as a separate app).

In Analytics UI, they decided to use Material Design with large number of animations, it is very slow and UI elements are too big for 1280px wide display. It looks more like your legacy enterprise app written 10 years ago in Java and IIS, rather than a Google product.

They could just use something simple, like Symfony Framework and jQuery and avoid most of those problems. I think the reason why they didn't is because Google employs smart people and gives them a boring job; to entertain themselves they tried to play with something new, like Dart or make Android-like UI but didn't have enough time to do it properly.

comment 8y ago · link · parent

That is why I never install browser extensions.

comment 8y ago · link · parent

> You may not make any public statement about us without our prior consent.

Is it even legal? What about freedom of speech?

comment 8y ago · link · parent

In Google's Doubleclick for Publishers UI they use Dart apps. The page loads several "apps" compiled to JS, each of which weights more than 2 Mb (even the "changelog" app). Page loads very slowly. So I would expect something similar for Go.

comment 8y ago · link · parent

Imageine if there is an USB device with new Chrome WebUSB driver (which has necessary permissions) and then vendor's website gets hacked.

comment 8y ago · link · parent

Next step will be devices that cannot work without Chrome, network connection and "anonymous" "telemetry" for the purpose of "improving customer experience".

comment 8y ago · link · parent

What is the usecase for WebUSB? Here [1] someone from Google suggests vendors should write device drivers in Chrome HTML and Chrome Javascript. Please don't.

Or (my assuption) it might be for devices that cannot work without browser and network connection.

[1] https://developers.google.com/web/updates/2016/03/access-usb...

comment 8y ago · link · parent

What if that privileged website has XSS vulnerability?

comment 8y ago · link · parent

If you disable JS you won't need any ad blockers and you will be surprised how faster the sites will load (if some sites are still not fast enough, try disabling web fonts; they are heavy and block rendering, but sadly Chrome doesn't allow to block them on per-site basis).

comment 8y ago · link · parent

It is more likely that recordings can be used to detect users who have are nearby (who hear the same sound) but have GPS disabled or not available.

comment 8y ago · link · parent

Russian photographer took photos of random people in the subway in Saint-Petersburg and later could easily find their social network profiles [1] [2]

The creators of the app (FindFace) that indexes face data do not have any respect for privacy and boast how good their app is.

I think browsers should issue a warning before uploading photo to internet. Maybe then less people will want to publish their photo online.

[1] https://www.theguardian.com/world/2016/apr/14/russian-photog...

[2] https://birdinflight.com/ru/vdohnovenie/fotoproect/06042016-...

comment 8y ago · link · parent

Yes, I don't know if it is checked scientifically, but people have different figures. If we take several people of the same height and age and will give them the same food and the same amount of physical load, they still will have different body mass.

comment 8y ago · link · parent

I think it is important to diffirentiate between people who are born with overweight body and cannot do anything with it and people who would have normal weight but are gaining it because of unhealthy food or lifestyle. Sadly, the page doesn't have such a table.

comment 8y ago · link · parent

What about replay attack? Providing apt with old metadata and packages?

comment 8y ago · link · parent

Such crawler should not be difficult to ban by looking at stats - if there are many requests per IP per unit of time, or many requests from data center IPs, or many requests from Linux browsers, it is likely bots and you can ban them (you can ban whole data center to be sure).

comment 8y ago · link · parent

This has been possible for a long time with any browser using Selenium for example. It has APIs and client libraries for many languages.

Also using a real browser brings a lot of problems: high resource consumption, hangs, it is unclear when the page has finished loading etc. You have to supervise all browser processes. And if you use promises, there is high chance that you will miss error messages because promises hide them by default.

comment 8y ago · link · parent

It is difficult to live without versions pinning in commercial projects. Imagine if you get an urgent task that needs to be completed today, but then you find out that the dependencies were updated, your project doesn't build anymore and you need to fix that first.

comment 8y ago · link · parent

PHP package manager, Composer, uses lock files only for applications, not for libraries. The developer makes sure that everything works and then commits the lock file.

comment 8y ago · link · parent

> Over time, though, version pinning builds up technical debt. You have software locked to old unmaintained versions of packages.

If you are talking about open source, it is not a problem: anyone can upgrade dependencies and make a pull request. Without version pinning, the project will always be in a "broken" state.

For example, recently I tried to run Firefox 3.5 on linux and it crashed with modern versions of gobject libraries although they are supposed to be backwards-compatible. I wish Debian package manager allowed to install an old version of a library specially for this application.

comment 8y ago · link · parent

> This proposal ... deprecates GOPATH in favor of a project-based workflow

That would be awesome. GOPATH was an awful idea that works only for distribution package managers.

comment 8y ago · link · parent

I have JS disabled and websites are not that slow for me.

comment 8y ago · link · parent

In Russia unlike Europe one has to provide an ID to reissue a SIM card, but criminals often have accomplices inside a provider who can do it without any documents.

comment 8y ago · link · parent

The article gives a good reason to use open source technologies rather than proprietary "clouds" that do whatever they want with your data. Of course, Chinese government can try to ban Jabber/OTR but they won't be able to read the encrypted messages.

comment 8y ago · link · parent

New version of Skype RT and Opera Browser have no option to disable automatic updates. Probably they understand that nobody wants their updates that only bring new bugs and more ads.

comment 8y ago · link · parent

I think the point is that Google (Youtube) didn't delete the video while Facebook has complied with government's request. And it is not the first time Facebook is doing this - earlier they blocked a page for unapproved protest rally [1].

[1] https://www.theguardian.com/technology/2014/dec/21/russian-f...

comment 8y ago · link · parent

In this case they not only look, but also bother you with unneeded greetings. Like an annoying staff in a shop asking whether you need help.

comment 8y ago · link · parent

I wonder what is the percent of users who really need help and use the popup for it? If it is a minority than maybe it is better to make the popup closed by default so the majority of the users doesn't get distracted?
1
159160161
185