Better HN
topnewbestaskshowjobs
Log inSign up

hknmtt

352 karma · joined Sep 5, 2022 (4y ago) · 301 submissions

Submissions

1.

Ask HN: How was setting up EU VAT for you?

1 points · by hknmtt · 2y ago · 1 comment

comment 2y ago · link · parent

yes, ff does a ton of background connections. use wireshark to see what it is doing. i tried to block all that crap once but after a while i just gave up.

it is still my primary browser because it is now the only alternative to google's monopoly(even though mozilla is de facto living off of google's money).

comment 2y ago · link · parent

a) why not use switch { case len(a) < len(b): b = b[:len(a)] case len(b) < len(a): a = a[:len(b)] }

b) do you know the usual length of the slices? if so, can't you autogenerate/manually write switch to manually do the math? how would that perform?

comment 2y ago · link · parent

Scrum/Agile is awesome! I always used the daily calls to ask as much dumb shit as possible to make the meetings as long as i could so i could keep charging my hourly rate without actually working.

comment 2y ago · link · parent

No, i just remember a comment from some former MS dev who knew something about the testing process in MS. I think it might have even been a comment in here actually.

comment 2y ago · link · parent

interesting. i was actually yesterday pondering whether youtube gave up on this since i have not had issues for months now. before i had to scrape all cache and logout. usually once a week. but then it stopped and all went back to normal. i am using ubo, still.

comment 2y ago · link · parent

i remember reading years ago about the reason windows updates since 8 or 10 were so bad was because MS fired all testers and scrapped their testing hardware and now they are testing virtually in cloud. I guess nothing has changed, still. cost cutting at its best.

8.

Ask HN: How to Count Content Views?

1 points · by hknmtt · 2y ago · discuss

comment 2y ago · link · parent

essentially that is how integrals are calculated in mathematics if i remember correctly. you take a curve and divide it into columns, the thinner the column the smaller the deviation(because the curve has round edges so your bar will have inherent error) and you simply calculate each column and then total it and you get the body/volume of the function. same principle like radians with circle. you are merely splitting the work into smaller pieces that you can process.

comment 2y ago · link · parent

say you load 1 million records and you average them at 5.1. you then load another million and average them at 4.5. so you 5.1+4.5=9.6/2=4.8. rinse and repeat. as long as you keep the amount of records processed per each run about the same, your numbers will not be skewed. only the last chunk will most likely be smaller and it will introduce small rounding error, like if it has only 10k records instead of 1M. but still it is the simplest solution with good enough outcome.

comment 2y ago · link · parent

actually i think you can also just average each chunk and then add it to existing data. like read N rows(say all have one location to keep it simple), average the data from the chunk, update/save min and max, move on to next chunk, do the same but now update the average by adding to existing/previously computed average and divide by two. the result will be the same - disk IO will be the most limiting aspect. this "challenge" is not really a challenge. there is nothing complicated about it. it just seems "cool" when you say "process 1 billion rows the fastest you can".

comment 2y ago · link · parent

first search result for averaging streaming data:

https://nestedsoftware.com/2018/03/20/calculating-a-moving-a...

so you just walk the file and read a chunk, update the averages and move on. the resource usage should be 0.000 nothing and speed should be limited by your disk IO.

comment 2y ago · link · parent

>On a cache hit, SIEVE marks the object as visited. On a cache miss, SIEVE checks the object pointed to by the hand. If the object has been visited, its visited bit is reset, and the hand moves to the next position, keeping the retained object in its original position in the queue. This continues until an unvisited object is found and evicted. After eviction, the hand moves to the next position.

Dude, what?

comment 2y ago · link · parent

> Officials explained that companies will be able to use commercially available databases to verify that users are old enough to access their content. The new law will take effect starting January 1st.

ಠ_ಠ

comment 2y ago · link · parent

looks like the increased cost is not worth the profit. simple mathematics. capitalism is nature and you cannot fight the nature because sooner or later something gives.

comment 2y ago · link · parent

I used to use it a lot but in time it becomes more of an obstacle than a net positive. http and websockets with json(front end), cbor(back end) or pb(back end) is the way to go. it gives you exactly the same features but zero restrictions. it is nice to have pb schema that is transferable into other languages but you can define schema in anything and port it to anything, it just takes time to initially write it instead of using pb as intermediary. the little layers of code it autogenerates is not worth the limitations you might be needing to overcome in the future with a larger project. also there is massive issue with no value provided vs null or empty or zero value. pb tries to solve this by using wrappers but in code that is massive pain to work with all the nesting. that was actually what broke the camel's back for me.

i just want to mention that i do not use rest, at all. i do use http methods and url routes but i never accept any rest rules for design or behavior. i am using something like json rpc but i am not using a single route to handle all communication. i still use the same approach as grpc does - route per method, but i keep the flexibility of naming and http methods. people seem to be very much stuck with rest and its limitations/rules for some weird reason.

comment 2y ago · link · parent

"if you do something illegal, WE will fine you" ... yeah, that makes perfect sense.

comment 2y ago · link · parent

> Tier 2: $1,000, for illegal content

strange legal system you got there

12345
11