HNHacker News
TopNewBestAskShowJobs

adamzochowski

651 karma · joined November 19, 2009

submissionscomments
adamzochowski··on A meteor or alien tech: Harvard professor plans UFO expedition
The world says "leading news story" and therefore "burying the lead".

Lede is an american thing. Parent could have been a british or canadian neighbour with their british colourful spelling.

adamzochowski··on Vangelis has died
Miami Vice had two memorable tunes, miami vice title song, and the crocket's theme (more nostalgic like feel). Both were made by Jan Hammer. If you want to see cool stuff, checkout his "beyond Mind's Eye", one of the earliest 3d music videos https://www.youtube.com/watch?v=b5zMtCvWhG0
adamzochowski··on Show HN: Privaxy – Adblocking / tracker blocking by MITMing HTTPS traffic
There was a proxy, proxomitron in early 2000s, that allowed you to change the html/js as it went through the proxy. people used it for adblocking and removing page annoyances, like removing sounds / animated gifs / etc. Here is a list of random old filters people had built at one time: https://proxomitron.info/45/help/Default-Web-Filters.html
adamzochowski··on The absurd complexity of server-side rendering
because scraping and indexing the site is hard.

because getting first response on super slow speeds doesn't accomplish anything

because many js devs write buggy code that renders in their browser

etc

adamzochowski··on Reproducible Builds in February 2022
Not OP, but this often is used when I am brought onto a new project against old code base, where no one from original developers is around. I am then given four things:

- here is binary that is currently running - here is source code previous developer left - here is scant documentation of what it is supposed to accomplish - here is what we want you to change

the first things you want to to do is confirm the source code you have can build the binaries running.

A lot of compilers, for one reason or another, like to sprinkle random crap into the binaries that makes them different every time you compile. .Net for example adds compiled time into the binary. If you try to compare the two binaries with md5/sha they will always return different.

Without reproducible builds, your next step is to run decompilers against the two binaries, and hope that that output matches.

Much easier if you have reproducible builds. This is also security feature: you will know if anyone tampered with the binary.

adamzochowski··on Using HTTP Basic Auth in 2022
One of my favourite auth is the NTLM/SSPI which came out of the the windows NTLM world.

Users don't even see they are being asked to be authenticated, they are either logged in, or told they don't have access.

Works great in corporate world.

adamzochowski··on Simple SSH Security
The goal is to avoid password sharing.

if 20 people have root password, and server supports root login, then you can't know which of the 20 people had their machines compromised.

if 20 people each have to sudo, then you can trace which user was compromised.

adamzochowski··on Problems with Oracle SQL
But they are not. Empty string means "we know this is empty", Null means "We don't know".

For example, I have a second name. Some people don't have second names. And some records we might not even know if such exists. Null means "unknown". Empty string cannot be equal to null.

adamzochowski··on Ask HN: How did you establish and maintain relationships with your first users?
There are bad scrapers out there. Plenty of common problems:

- Denial of Service by queries - they hit search pages with complex or slow queries, diving to 1000th page of results . This kills the db.

- Denial of Service by parallelization - they hit 1000s of pages at once, causing server to run out of memory or other issues . This kills the web.

- Denial of Service by bugs - their code is buggy, slight change to page causes their scrapes to repeat ad nauseum.

- bad URL/cookie scrapes - they hit URLs that perform actions (say add to cart) against websites. This causes sites to track more data in abandoned carts, managing sessions, item popularity.

If scraping wouldn't affect server negatively, then it would feel less illegal.

adamzochowski··on Twitter adds 'Arabic (feminine)' language option in diversity drive
Does this mean that other languages that are gendered also will be fixed?

Currently Polish Twitter displays both variations in a single text because it doesn't know which variation to use. For example I see:

"Nie wysłałeś/aś jeszcze żadnych zdjęć ani filmów"

The word should be just "wysłałeś" for masculine, and "wysłałaś" for feminine.

adamzochowski··on Sublime Text 4
Yeah, plenty of people edit files like xml or json in text editors.
adamzochowski··on Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
The backwards compatibility is for physical keyboards. So that a keyboard with just one alt can still trigger polish letters.

I don't know how other OSes allow for users to trigger "right-alt" when the keyboard has only one alt character.

adamzochowski··on Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
There is also a whole slew of issues with Polish characters. Polish keyboard setup relies on "right-alt" and a letter to get it's diacritics variation. Ie: 'ą' is 'right-alt'+a

Windows for backwards compatibility reports 'right-alt' as 'alt+control'.

Many applications developers assign key combos with no negative checks. So 'ctrl-s', typically used for save gets triggered when user wants to type 'ś'. To repeat, "right-alt"+"s" is reported as "alt"+"control"+"s", which triggers crappy "control"+"s" checks.

Similar scenarios happen many places that check for 'alt'+'letter' without checking if control also is not pressed.

Microsoft thread for team user voice issues on this https://microsoftteams.uservoice.com/forums/555103-public/su...

or Medium's developer talking about 'ś' and 'ctrl'+'s'. https://medium.engineering/the-curious-case-of-disappearing-...

adamzochowski··on WebRTC 1.0 telephony app using “hifi” Opus codec with up to 500kbs bitrate
Opus at sample rate of 48khz, still only encodes frequencies up to 20khz of listening range (think of opus as having 40khz sampling rate).

This is same as audio CDs, which although are in 44khz sampling rate, have a red book recommendation to always filter out anything over 20khz.

Thing is, most people can't hear well over 16khz. Some can hear 18khz. 20khz is peak possibility. To encode 20khz wave we need 40khz sampling rate. Everything else is marketing.

adamzochowski··on Linux Mint Dumps Ubuntu Snap
snap has problems that exist for years.

It will upgrade a running application without telling the user. Then it will remount all folders in use by the running application in read only mode. As such, your chromium will start misbehaving, crashing, extensions will start failing, it won't save cookies or remember tabs after restart. DBeaver won't be saving your .sql scripts. Snap developers think users are precogs. That users without any foreshadowing will close application before snap silently upgrades it behind the scenes.

Also Snap does really weird things as a container. I run multiple VPNs each within own network namespace. So something as simple as :

as root: ip netns exec myVPN chromium fails with execv failed: Permission denied

Both of these problems exists for years.

adamzochowski··on SELECT wat FROM sql
Some SQL Servers, like MS-SQL have been slowly going into banning order by a number / constant expression, and flagging column numbers as error prone constructs.

https://www.sql-server-performance.com/error408/

adamzochowski··on SELECT wat FROM sql
Sigh,

In all other programming languages the code has to be along the lines of:

    if ((jane.car.colour == james.car.colour) and
        (jane.car.colour != null            ) and 
        (           null != james.car.colour)):
       print ("James and Jane have same car color")
or attempted with a second variable to indicate if value is known

    if (( jane.car.colourKnown == True ) and 
        (james.car.colourKnown == True ) and 
        ( jane.car.colour == james.car.colour)):
       print ("James and Jane have same car colour")

I like to think that SQL nulls are the most human way. I think of a scenario: James and Jane each own a car. I don't know neither car colour. Does it mean they are of same colour? All typical programming languages say "Yes". SQL says "I can't tell you, I don't know", and that is what a human would say.
adamzochowski··on Handling Null Values in Postgres
An easy way to think about database nulls is how you would answer a question in real life about unknowns.

I have a friend James, and another friend Jane. I don't know their ages. Are they of the same age?

Or Jane has a car. James has a blue car. Do car colours differ?

SQL provides human answers: explicitly answers "I don't know".

Other languages treat null as if it was just another value, providing very confusing answers. I wish all programming languages would use SQL style of null.

adamzochowski··on Using GoAccess for self-hosted web analytics
FYI: Paranoid adblockers / privacy protectors will block iframe to remote domains. For example: uMatrix by gorhill (same author as uBlock Origin) does this.
adamzochowski··on A Dead-Simple Web Stack in Haskell
I think OP's point was that for starting developer PHP is super easy.

- edit a text file with any text editor (notepad?) - copy file onto a server (ftp? scp? git push? -- most servers will process php) - access it through url in browser

The example was about simplicity. OPs text file is 11 bytes long "Hello World", and is a valid PHP, it will run on a server.

This is about how easy a person with no knowledge and no special tools can start doing things.

Your example implies that developer has node installed, and expects the developer to run a server from within node, and then understand how the server handles URLs to functions. Additionally, I don't know how an early developer is expected to get this onto a server. First copy, then ssh onto server, then start the node server on server. That is a lot of steps for beginner to remember.

Additionally, as you mention, changes to file require server restarts, or building a self reload capability. I play with Flask, which has self reloading available, when developer pushes broken code Flask can just crash (self reload fails), and then developer has to start flask again. With PHP, broken code does not crash apache/nginx.

For developers that live and breathe computing knowledge running things through additional steps make sense. C/Java/C++/C# all have compilation and linker steps. Things like Grunt or Less are nothing scary for developers that ran C/C++ code through M4 preprocessors before compiling (now M4 is built into compilers).

So yes, for professionals, PHP is just a programming tool as any other.

But for beginners, PHP is awesome easy to grasp and use.

adamzochowski··on Ways to Tweak Slow SQL Queries
> Otherwise it does not matter how many columns you select, because you will have to read all the columns for every row anyway.

It does matter. An index can actually contain a cache of values for some columns. This is done with INCLUDE statement.

     CREATE INDEX idx
         ON book ( author_id )
         INCLUDE ( book_title )

This select will use only index:

       select author_id, book_title
       from books
       where author_id = 123

This select will use index, and then have to follow and fetch data out of rows:

       select *
       from books
       where author_id = 123
https://use-the-index-luke.com/blog/2019-04/include-columns-...
adamzochowski··on VESA Publishes DisplayPort 2.0 Video Standard
The people who say "No Scaling" mean that they want to use screen to fit more things. It is not state of mind about past pixels, but about how much stuff you can fit on the screen. how many lines of code. How many sidebars in your utilities, etc.

People who say "Scaling" are a different breed. Some like it because for them smoother fonts are more readable. To others, scaling presents ability map physical dimensions to screen.

Saying this, I agree that OS and software has to support alternative scalings, and ability to make things larger or smaller. I wish we could just pinch zoom apps on Windows and Linux.

adamzochowski··on Why are large companies so difficult to rescue (regarding internal technology)
The made up story sound similar to Hertz losing 32 million while hiring Accenture to do internal API rewrite in 2 years.

https://www.theregister.co.uk/2019/04/23/hertz_accenture_law...

adamzochowski··on Please don’t theme our apps
As an application developer I want for my users a consistent experience, irrelevant of OS or distribution. I understand that.

But, as a user I want for my experience consistent on my os, irrelevant of that different apps are written by different people on different setups. I want consistent icons, I want menus that follow same convention, I want to change text colours and sizes.

The biggest issue is that developers don't want to follow gnome checklist. Instead of that, they hardcode colours and behaviour. They go heavy into 'it works for me'. And then have audacity to complain that world doesn't bend to their will.

Here is a gnome checklist. I wish the open letter stated how their application follows the checklist and was broken by a distribution so that the checklist now includes fails.

https://developer.gnome.org/accessibility-devel-guide/stable...

adamzochowski··on Please don’t theme our apps
There are two solutions to this:

1) use offset colours, like specifying to move 10% in Hue off the theme colour.

2) specify all foreground + background colours and admit that this is special and won't conform to any user or distro theming

adamzochowski··on A BMW outage made Apple CarPlay unusable. Why connect everything unreliable?
For me I get adblock blocking the series of redirects:

Step 1: Engadget is doing a 307 redirect to : ttps://guce.engadget.com/consent?brandType=nonEu&gcrumb=_____&lang=en-US&done=https%3A%2F%2Fwww.engadget.com%2F2019%2F05%2F10%2Fbmw-carplay-outage%2F

Step 2: that gets me a 302 redirect to https://guce.advertising.com/collectIdentifiers?sessionId=1_...

Step 3: adblocker blocks it

I assume there is some cookie that would get set between the redirects to make sure that eventually the real url loads without a 307. As it stands I won't be reading.

adamzochowski··on PostgreSQL 11.3 and 10.8
User CAL is only cheap if you only deal with small amount of users (internal app). Please note a user is not SQL User account, but represents actual individual person. If you have a webserver (with one db user) but a thousand of visitors, then Microsoft treats it as thousand user CALs . Following MS doc explains this in detail http://download.microsoft.com/download/6/F/8/6F84A9FE-1E5C-4... , look for keyword 'multiplexing'
adamzochowski··on Smoke and Mirrors: How Snap and Pinterest Hide User Attrition
Google released very own Chrome Extension specifically to block domains that you find to always provide bad results. You can use that to permanently block pinterest, and any forum/stack exchange clones, etc.

https://chrome.google.com/webstore/detail/personal-blocklist...

adamzochowski··on Web Scraping with Electron
Javascript rendered pages load JS which then in turn calls some rest API to get data and use that to render contents. Web scraper stops scraping the html, but calls and scrapes the rest api endpoint.
adamzochowski··on “Catastrophic” hack wipes out email provider’s entire infrastructure
pg_dump provides return codes just like any other executable. Zero means no error, and treat non-zero value as an error.
← PreviousPage 3 of 8Next →