Better HN
topnewbestaskshowjobs
Log inSign up

ickyforce

101 karma · joined Apr 20, 2019 (7y ago) · 50 submissions

Submissions

comment 5y ago · link · parent

It's ok except the wrapping rules. Everything turns out into vertical grotesque - and TypeScript has longer lines because of type names so it wraps often.

comment 5y ago · link · parent

> Remind me the difference between Slack and Discord at this point?

Discord: you grant to us a perpetual, nonexclusive, transferable, royalty-free, sublicensable, and worldwide license to use, host, reproduce, modify, adapt, publish, translate, create derivative works from, distribute, perform, and display Your Content in connection with operating and providing the Service

Slack: the Customer [...] grants us and the Slack Extended Family a worldwide, non-exclusive, limited-term licence to access, use, process, copy, distribute, perform, export and display Customer Data and any Non-Slack Products created by or for the Customer, only as reasonably necessary (a) to provide, maintain and update the Services; (b) to prevent or address service, security, support or technical issues; (c) as required by law or as permitted by the data request policy; and (d) as expressly permitted in writing by the Customer.

comment 5y ago · link · parent

> If you are building an API, having a mechanism that provides detailed logs—including the POST bodies passed to the API—is invaluable.

I'm not sure about this one. I explicitly avoid logging bodies because they can contain sensitive or proprietary information. But for the past few years I've been working at companies where it was not ok to look at customer data without customer's approval, that probably skews my ways.

comment 5y ago · link · parent

Don't use Kafka as a queue.

(I haven't used Kafka for a while, if anything below is outdated let me know)

The main issue I've experienced was balancing work across consumers - if one consumer is slower than others (e.g. running on a machine with some other heavy workload). In such case when a larger number of jobs is enqueued and expected to process quickly it's possible that everything will complete except jobs which landed on the partition belonging to the slow consumer. There can be only one consumer per partition so others can't help.

One could consider using a single partition to avoid this imbalance but this means that there could be only a single consumer - not good.

In other queue systems consumers fetch up to N jobs from a shared pool when they need more work. This means that in the case of a slow consumer the lag is limited to by the time required to process N jobs.

This situation also arises if consumers are equally fast but some kinds of jobs are considerably slower. Random distribution across partitions mitigates it to a degree.

My case was precomputing caches after some event, the goal was to do this within 10 seconds. First implementation with Kafka worked but very often some consumer couldn't use as much CPU time as others and we didn't want dedicated nodes for this because this even was happening at most few times a day. As a result jobs from a single partition were processed 2x slower - we had to overprovision.

Replacing Kafka with a queue based on Redis solved this right away, all consumers were finishing at the same moment. Although it wasn't a large scale operation.

The second complaint about using Kafka as a job queue is not being able to modify the queue, e.g. to reorder jobs, postpone jobs or cancel jobs

comment 5y ago · link · parent

> the API is also described as an OpenAPI.

The response formats are not described so not very useful.

comment 5y ago · link · parent

> If you want to build reporting on top of text files

The thing is - I don't want to build it (in this case a bunch of scripts that would parse and manage these logs). I want to use something that exists.

comment 5y ago · link · parent

I have a similar issue - my phone broke and I lost access to OTP. I don't have anything on AWS except S3 bucket which costs $0.5/month. My credit card expired so they aren't charging me, just sending "urgent action required" emails. I contacted AWS support to either regain access to the account or pay what I owe and close it but they asked for:

1) A completed, signed, and notarized Identity Verification Form and Affidavit, which can be downloaded online at the following link (the link didn't work)

2) A photocopy of the AWS account owner’s primary proof of identification, such as a State driver’s license or passport.

3) A photocopy of the AWS account owner’s proof of address matching the address on file.

So I'm waiting, maybe they'll give up.

38.

What tools do you use to aggregate test results?

1 points · by ickyforce · 5y ago · 3 comments

comment 6y ago · link · parent

What bothers me more is the lack of a way to ensure that the data is valid. Like always things look great in simple examples where it doesn't matter but fail when it gets tricky.

The main benefit of dedicated, encapsulated types is that they can preserve their invariants. Without that each function operating on "data" has to check that those invariants are kept. It's fine in trivial cases e.g. where this validation boils down to checking if a value is present or not - which might even be supported by the language. But I don't see this working in more complex cases.

In my experience many (most?) bugs are caused by the implementation assuming something incorrect about the shape of the data and I feel like this principle only makes it more likely to happen.

comment 6y ago · link · parent

When I edit code it's broken most of the time. It wouldn't make sense to collaboratively break it in various parts for other people...

comment 6y ago · link · parent

Yeah, but they don't travel sideways and they have pilots.

42.

Lab automation software 'pro-bono' for teams fighting Covid-19(synthace.com ↗)

4 points · by ickyforce · 6y ago · discuss

comment 6y ago · link · parent

E.g. https://aws.amazon.com/ecs/ - that was quite nice https://aws.amazon.com/fargate/ - haven't tried

comment 6y ago · link · parent

Releasing resources is not error handling... And in Java you don't even need finally for that, there try-with-resource.

comment 6y ago · link · parent

Isn't https://www.jetbrains.com/toolbox-app/ doing that?

comment 6y ago · link · parent

The funny thing is that if you want to create an immutable type in Java - no problem, just create a constructor and mark fields as final[1].

In Go - you can't do it like that. You need those getters, preferably an interface (because exported struct allows anybody to create a zero-value) and a factory function.

[1] - assuming their types are also immutable

comment 6y ago · link · parent

> Go seems to have much less boilerplate than Java

Maybe if you compare to Java from 10y ago. Have you ever tried to print a map in an alphabetical order of its keys?

The only thing more verbose in Java are getters/setters which hopefully will disappear once records are available.

comment 7y ago · link · parent

compiler/IDE would complain about "unused local variable"

comment 7y ago · link · parent

Java has a SecurityManager[1] which does exactly that. Is there anything similar in other mainstream languages?

[1]: https://docs.oracle.com/javase/8/docs/api/java/lang/Security...

comment 7y ago · link · parent

I've noticed that I was interpreting the question incorrectly. In the past I thought it was "why did you chose this company over all others?". But if you think of it as "what aspects of our company do you find interesting?" it becomes a quite regular question which I can easily answer honestly.
12