Better HN
topnewbestaskshowjobs
Log inSign up

thinkharderdev

1,874 karma · joined Jun 12, 2019 (7y ago) · 701 submissions

https://www.thinkharder.dev

[ my public key: https://keybase.io/thinkharder; my proof: https://keybase.io/thinkharder/sigs/Ibpz0COsvz2qYl2K8YfzrhucHf2rcZIxityh5WvYC_k ]

Submissions

comment 5y ago · link · parent

Not complicated as in "too hard for AWS to build" but complicated as in "really hard to use as someone trying to limit your spend on AWS." So the people most at risk of huge unexpected bills are also not going to be the people knowledgable enough to setup the billing cap correctly. So it would mostly be a feature for enterprises and most enterprises would rather just pay the extra $ rather than potentially turn off a critical system or accidentally delete some user data.

I worked at a company that spent ~$10m per month on AWS. We had a whole "cloud governance" team who built tools to identify both over and underutilized resources. But they STILL never cut any thing off automatically. The risk/reward ratio just wasn't there. You make the right call and shave $10k off a $10m bill every month, but the one time you take down a mission critical service, you give all of that back and then some.

comment 5y ago · link · parent

I recently switched jobs. At my old company the dev team basically had carte blanche to setup their own AWS infra without any real restrictions (there were some but very few). It was nice, I almost never had to ask anybody outside my team to do anything to unblock us (at least from an infra standpoint).

In my new job we also use AWS for everything BUT I haven't used the AWS cli once. I don't even have credentials. Basically, their is a platform team which is responsible for running a k8s cluster (or clusters really) and some other common infrastructure which is all running on bare EC2 (no RDS, no EKS, we do use S3 for blob storage but that's about it). And I have to say it is pretty amazing. No more dealing with arcane IAM rules, or trying to figure out how to string together a chain of lambdas to do some sort of complex orchestration task).

I've really come to appreciate the model of using k8s as your "cloud platform." Having a dedicated team that manages the k8s clusters and makes sure they are elastically scalable and reliable. Everyone else is just deploying stuff to kubernetes. They could decide to move everything to a colo tomorrow and I would have to change exactly nothing about how I do my job.

comment 5y ago · link · parent

I think the sandbox idea is a great one. They should just do away with the free tier entirely except for sandbox accounts in which everything just gets shut down the second you go over the free allowance. If you want to build something for real then you pay for whatever resources you use, but if you just want to tinker around and learn a few things then you can get a safe sandbox to do it in.

BUT, I think the parent's point is that such a feature would actually be quite complicated. It's not just a matter of saying "I only want to spend $X in this account per month/total" but defining exactly what you want to do in the case where you hit that limit. Shut everything down? My guess is almost nobody would want to do that. So it ends up being some complicated configuration where you have to deeply understand all of the services and their billing models in order to configure it in the first place. What are the odds that the student who accidentally spins up 100 EC2s for a school project is going to configure this tool correctly?

But I do think the sandbox would be great. Either you are a professional in which case it is your responsibility to manage your system and put in appropriate controls to prevent huge unexpected bills or you are a student (in the general sense of someone learning AWS, not necessarily just someone in school) in which case they provide a safe environment for you to experiment.

comment 5y ago · link · parent

But that's the thing. A senior engineer is also costing a business ~$100/h (all in) so even if you accept that there will be a fair amount of waste (misconfigurations, devs spinning up boxes and then forgetting about them, PoC projects never torn down, etc) it can still be a net-positive proposition. People always want to compare the cost of compute/storage/bandwidth but that isn't really the value proposition. Of course you are going to pay more for cloud-hosted infra than for equivalent infra in a colo or on-prem DC. But I used to spend hundreds of hours a year doing random busy work to deal with on-prem infrastructure. Need a new server, put in a ticket and when the ticket gets no response follow up with emails and finally setup a meeting to discuss with the ops team. Need a new firewall rule, same deal.

comment 5y ago · link · parent

The trick is that it is not a monoid AND and endofunctor but of monoid OF endofunctors. The whole "monads are monoids in the category of endofunctors" was a joke because it is a needlessly complex way of describing what a monad is.

comment 5y ago · link · parent

A functor has three things: 1. A type constructor 2. A "map" function 3. A "flatten" function

So basically it is just a parametric type such as List<T> which has a type constructor so you can get a concrete type (eg List<String>), a map function which takes a function f: A => B and and turns it into a function List<A> => List<B>, and a "flatten" function with will turn a List<List<A>> into a List<A>.

The last part is what allows "flatMap" which takes a function f: A => List<B> and turns it into a function List<A> => List<B> and is really just a shorthand for doing map and then flatten.

comment 5y ago · link · parent

A function that take one type and gives you another type. So (in Java for example) you have a generic type such as List<T>. But that is not a really a type because you can't have a value of the generic type. It is actually a type constructor, you can give it another type (say String) and it will give you a type List<String> which can actually be instantiated to a value. So in the context of programming languages it is just a fancy word for a generic or parametric type.

comment 5y ago · link · parent

Not really, mathematically a functor is really two "functions," one mapping objects to objects and one mapping morphisms to morphisms, along with some conditions that make sure the functor is "structure preserving." It is fundamentally a type level construct because, as it is applied to programming, the category in question is the category of types (which is not technically a category due to the halting problem but we sort of hand-wave that away).

comment 5y ago · link · parent

That may be the greatest thing I've ever read.

comment 5y ago · link · parent

In general, yes that is exactly what you are supposed to do. But the really hard part is determining what scopes (which is what I assume you are referring to here as permissions) allow access to which resources/actions.

comment 5y ago · link · parent

I worked on an identity provider platform and this was always such a huge problem. Many application developers treat authentication as an all or nothing proposition: either a user is authenticated or they are not, but the reality is that authorization is truly hard part and often completely overlooked. This is especially true in Oauth2/OIDC schemes where JWT bearer tokens are issues. At that point you are delegating token validation and access control out to all clients. Even if you are using opaque tokens to prevent basic token verification issues, you still just end up doing the token validation for the client. They still are responsible for access controls on specific resources.

comment 5y ago · link · parent

That may well be true, but I would not necessarily equate "hiring internal candidates" with "hiring family and friends".

comment 5y ago · link · parent

Maybe it's a cultural thing but my experience has been the exact opposite. As a software engineer you have to actively avoid taking a management position after a few years at any given company.

comment 5y ago · link · parent

How much of it is "hiring friends" vs just hiring someone you have better information about? A lot of people interview exceptionally well but it's always something of a crapshoot how well they will do in the actual job. But for an internal candidate you should have a lot better information on how well they performed in other roles. You can have actual frank conversations with their managers/coworkers instead of getting BS references from people the candidate themselves chose for you to talk to.

comment 5y ago · link · parent

I think it is mostly the issue of dealing with byzantine corporate procurement processes. Also, it's really not all the clear what value-add Docker for Desktop is. Essentially it is just doing what you can do using the OSS components (running a Linux VM which runs the docker daemon and mounting a Unix socket on the host machine to talk to it). The only "value add" is a UI app on the host machine which I have never once used personally or witnessed anyone else using.

I certainly don't begrudge Docker for trying to create a sustainable business, but as an "open core" model it's really hard to understand what their proprietary extensions are that people will want to pay for. They took a stab at the container orchestration space with Docker Swarm (which you could definitely imagine having an "enterprise version") but that lost out pretty definitively to Kubernetes. So they're left with Docker Hub? That just doesn't seem like it will really be much of a revenue generator. You're either using whatever cloud container registry is available (ECR, GCR etc) or you're using a more general artifact repository like Artifactory, GitHub which can be a container registry as well as a Maven/NPM/etc artifact repository.

comment 5y ago · link · parent

Hyperkit, which is incidentally also what Docker for Mac uses.

comment 5y ago · link · parent

Yeah, I used minikube for local dev on k8s services and ended up just using it for all Docker stuff after a while. It is slightly less ergonomic than Docker for Mac though especially with respect to DNS and network issues. For instance, the minikube VM and any containers running in it cannot by default use the host machines VPN, so if you have to connect to an external service over your corporate VPN then you need to do some extra config (which isn't very well documented) to make it work. And the setup I ended up using was to use the VPNKit socket that was part of Docker for Mac to make it work. Now VPNKit is also OSS so I'm sure you can get it to work without Docker for Mac at all but it's also not trivial.

comment 5y ago · link · parent

I'm not so sure about that. Obviously pro cyclists aren't purposely crashing but the nature of the sport is to put yourself in extremely dangerous situations on a regular basis. Descending at 60+ mph on narrow, wet roads. Sprints where they are riding in excess of 35ph in VERY close quarters with other riders, etc. Not to mention the long term health consequences of maintaining an extremely low body fat percentage for long periods of time.

The parent is being downvoted for a "what about X?" response but I think it is actually a legitimate question to ask. Almost every elite sport carries with it serious health and safety risks.

But to counter their concern I would argue that elite sports almost always carry health risks, may amateur sports do not and are broadly beneficial. Contact sports such as American Football, Rugby, etc however are in a different class where the amateur athletes are also putting themselves at significant risk.

comment 5y ago · link · parent

In general that is true, but I don't think NFL players fall into the category of "desperate for a paycheck." That said, the vast majority of football players never make a dime and if the NFL DOES go bankrupt it will because the pipeline of players dries up because many fewer people want to play at the HS/College level given the obvious health risks and very low adds of becoming a successful professional.

comment 5y ago · link · parent

I've definitely seen my share of impossibly convoluted code written in the name of "best practices" (often done because we need to "future proof" against some imagined future use case), but I've also seen my share of properly engineered code that was elegant, testable, composable and easy to work with (code that "cleaved the problem domain at the joints" if you will).

But what I think the author meant is that the incomprehensible abstraction soup is at least in part a result of the "enterprise development" method. If you are solving a particular problem for a particular application you tend to solve the problem in a straightforward way as possible (if you're any good at least). But if you an "enterprise architect" you are trying to create architectures that both solve no problem in particular and all problems at once. So you tend to get complex abstractions that are both complicated to work with and don't cleanly deal with any particular implementation.

comment 5y ago · link · parent

I guess it depends on how you define "enterprise" but I always associated that word with unnecessarily bloated code. Or even worse, trying to reduce the amount of code by pushing more and more to ever more complicated declarative configuration files. That is mostly because when I hear "enterprise" I immediately think Java EE, which to me was the exact polar opposite of easy to edit and follow.

comment 5y ago · link · parent

The issue is that the team/person doing the implementation has to "justify" their architecture to someone who won't be themselves working on the implementation. Or just in general separating "architecture" and "implementation" into separate tasks done by separate teams. The people in the best position to weigh the relevant tradeoffs and design the best architecture are the people who have the most domain knowledge of the problem being solved and who will ultimately be on the hook for the system when it is production.

comment 5y ago · link · parent

"Reflection, endless hierarchies, complexity on complexity" sounds like the exact opposite of "elegant properly engineered code"

comment 5y ago · link · parent

I've done these sorts of questions before and the point (more me at least) was two-fold:

1. Do they understand the basic machinery of a web application (assuming the job is about building web applications)?

2. Can they take a vague problem ("the page is loading slow") they might get from an actual non-technical user and drill down to identify what precisely the issue is? Is it DNS? Is it a proxy server/load balancer? Is their latency at the DB layer? How would you tell the difference between all of these?

comment 5y ago · link · parent

Most of the relevant plumbing is generic though. Check out ZIO or cats-effect in Scala which I think both provide highly composable effect systems.

comment 5y ago · link · parent

It's not quite built into the language but Scala has a really well-developed ecosystem of effect libraries (ZIO, Monix, cats-effect) that solve this problem really nicely.

comment 5y ago · link · parent

My mistake, the 400 number is not correct as you point out. Still, even at 5km per km^2 it is one quarter the density of Seoul and one fifth the density of Paris. I've never personally been to Seoul but Paris still seems to have plenty of green spaces.

I don't doubt for a second that building a lot more housing is not possible for the foreseeable future but like in most places that is a political problem and not some fundamental constraint. And rent controls don't "solve" the basic imbalance between people wanting to live in a place and there not being enough housing for all of them in any meaningful sense. You are still rationing one way or another. When there are fixed supply constraints then maybe that is a more just way to do it, but when the supply constraints are artificial then it just entrenches a bad equilibrium.

418.

Advances in the ZIO 2.0 Scheduler(ziverge.com ↗)

3 points · by thinkharderdev · 5y ago · discuss

comment 5y ago · link · parent

There is a third option in which we have market rate prices and don't dramatically restrict the ability to add new housing.

And I don't believe that is impossible to build more housing in Stockholm. It has a population density of 400 people/km^2. To put that in perspective, Chicago (in the US) has a population density of 4000 people/km^2. And Chicago (outside of a central business district which is very dense) is not some dystopian megalopolis. It is mostly neighborhoods of single-family homes and small apartment buildings. Seoul, SK has a population density four times higher than that at ~16000 people/km^2. Paris is even denser at 20000 people/km^2.

comment 5y ago · link · parent

We seem to have settled on the worst possible equilibrium in a lot places where housing prices are market rate but also we have a huge tangled thicket of regulatory processes which severely limit the amount of new housing we can build.
1
131415
24