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

There's a difference though between farming out to a SaaS product like Auth0 and rolling your own. You should absolutely not try and write your own Oauth2 server unless you really, really know what you're doing. But there are a lot of options for self-hosted auth services that are rock solid and battle tested.

comment 5y ago · link · parent

Keycloak is pretty battle-tested and rock solid although it is a bit of a behemoth operationally.

Outside of that they Ory ecosystem is really nice. We user Hydra, which is not a drop-in Oauth2 server but requires you to write several of the components yourself.

comment 5y ago · link · parent

Ha, whenever some 3rd party SaaS tool is down and I am obsessively refreshing their status page I'm always enraged with the lack of updates. But then later I think about what if I were one of the engineers trying to bring things back up. There is nothing worse than being heads down trying to get a mission-critical system back online and being constantly distracted by demands for "status updates."

What is the ETA on getting back online? Well, about 5 minutes longer than it would have been now that you pulled me away from what I was doing....

comment 5y ago · link · parent

Sorry, it's boop not bloop. Source is at https://github.com/IvanMathy/Boop

comment 5y ago · link · parent

Yeah, I use bloop personally which is great for this stuff.

comment 5y ago · link · parent

That is decidedly untrue. The big problem with cycling and swimming is that they are low impact and don't stress your bones an joints enough. Your joints and bones are just like any other tissue in your body. They respond to stress by getting stronger and when they are not stressed they get weaker. As in all things you can of course over do it, but the amount of running the average person would do (15-20 mpw or less) is very beneficial to bone an joint health.

comment 5y ago · link · parent

I think the aesthetic for men is to have muscle definition rather than muscle mass per se. And that is more about being lean than having big muscles. And if you are lean it doesn't take much in the way of weight training to get enough definition to appear muscular.

comment 5y ago · link · parent

I drank a lot of soda as a child/adolescent but somewhere in my early twenties I mostly just stopped. Not for any particular health reason either. I just stopped liking it. And now I actually find it pretty disgusting and don't quite understand how anyone actually enjoys it.

comment 5y ago · link · parent

I can't the exact details but IIRC there is a canonical study which tracked physical activity, calorie intake and obesity in large cohort. There was a high correlation between calorie intake and level of activity in the sample and likewise only a weak correlation between level of activity and obesity (or lack thereof). Basically, people were good at calibrating their calorie intake to their level of physical activity. EXCEPT for the sedentary people, who tended to consume calories way outside of their needs based on little or no physical activity and (not surprisingly) tended to be obese at high rates.

Our bodies seem to be good at calibrating hunger and calorie intake to maintain balance between calories in and calories out, but there is something about being completely sedentary which causes that mechanism to malfunction.

comment 5y ago · link · parent

People argue endlessly about which exercise is "best" but the fact is that the difference between forms of exercise is a rounding error compared to the difference between ANY exercise and being completely sedentary. The most important thing is just to find something that you personally enjoy and don't get inured doing. The constraint for the vast majority of people is just motivation.

comment 5y ago · link · parent

Ha. I bet if you were so inclined you could harvest a gold mine of sensitive information by having a public website which did:

1. JSON prettifying

2. JWT decoding/verification (bonus for "paste your signing key and we will generate JWTs for you too!")

3. PEM <-> DER conversion

comment 5y ago · link · parent

This seems transparently ridiculous coming from someone as famously thin-skinned and pugnacious as Taleb.

comment 5y ago · link · parent

I use minikube for local k8s dev but you could also use it as basically a local Linux VM for running docker. It is (slightly) less ergonomic than Docker for Mac but not my much. For the most part I use the qinikube VM for everything docker related since it's annoying to run both a VM for Docker Desktop and for qinikube.

comment 5y ago · link · parent

Depends on a lot of things. If the 0day is an RCE they would need another privilege escalation exploit. How easy that would be depends a lot on how your system is setup.

But the short answer is probably not. Unless you are running Qubes or something, if someone can exploit an RCE then they can probably own your system.

comment 5y ago · link · parent

Haha. I'd be surprised if they work NEXT year.

comment 5y ago · link · parent

I've always had a pipe dream of building a CI system on top of something like Airflow. A modern CD pipeline is just a long-running workflow, so it would be great to treat it just like any other data pipeline.

comment 5y ago · link · parent

It's funny. If you stick around this business long enough you see the same cycles repeated over and over again. When I started in software engineering, builds were done with maven and specified using an XML config. If you had to do anything non-declarative you had to write a plugin (or write a shell script which called separate tasks and had some sort of procedural logic based on the outputs). Then it was gradle (or SBT for me when I started coding mostly in scala) with you could kind of use in a declarative way for simple stuff but also allowed you to just write code for anything custom you needed to do. And one level up you went from Jenkins jobs configured through the UI to Jenkinsfiles. Now I feel like I've come full circle with various GitOps based tools. The build pipeline is now declarative again and for any sort of dynamic behavior you need to either hack something or write a plugin of some sort for the build system which you can invoke in a declarative configuration.

comment 5y ago · link · parent

I think the most people overestimate how hard it is to be a remote member of a team that is in the office (especially for software engineers). I've been remote for years and up until the pandemic the rest of the team was working together in an office. I honestly never felt like it put me at a disadvantage and in many cases I think that I was the one at a considerable advantage.

In general I think the future is not "fully remote" or "fully colocated" teams but teams were everyone is to some degree remote based on their preferences. So you may have some people who come into the office every day because they don't have a good workspace at home (or just like to get out of the house every day) but everyone else will come into the office somewhere between a few days a week and never.

comment 5y ago · link · parent

Wait, so it's rude to ring someone because they may be occupied or busy but it's not rude to interrupt them in person? At least with a phone call I can silence my ringer when I'm heads down or at least ignore a call if I'd rather stay focused.

comment 5y ago · link · parent

Thank you. That line made my head turn as well. All IO is just saying "read" and "write." And all systems that do any real world work are doing network IO.

comment 5y ago · link · parent

Isn't analyzing case-by-case exactly what remote work is though? Obviously some people really like working at home in isolation and some people like the social aspects of being in an office. But with a remote-first company you have the option. If you want to work at home you obviously can and if you want a more social work environment then you can rent a co-working space (hopefully your company could even foot the bill with all the money they are saving on office rent) or co-work with a group of friends, etc.

I think a lot of people who have worked remotely for the first time due to COVID have a misleading impression of what remote work is. In normal times you have ample options to be able to work in an environment with other people if that's what you want. You also have the option to spend the time you save on commuting doing other non-work social activities.

comment 5y ago · link · parent

For those sorts of systems, my bet is that the DR strategy is to fall back to what they did before computers existed at all. And honestly that may be the best option. As long as you have pencils, paper and telephones then you can probably approximate what you were doing in 1995 anyway.

comment 5y ago · link · parent

Is it really? You would maintain an entire parallel stack built on an entirely separate infrastructure stack, with completely different deployment patterns and all the data synced? DR is really hard if you just want to fail over to another AWS/Azure/GCP region. I can't imagine what a nightmare it would be to maintain an on-prem DR standby. To mitigate a couple hours per year (in a really bad year) of cloud downtime?

comment 5y ago · link · parent

Generally you are using a typeclass to specify behavior (which I guess is a kind of duck-typing).

For example, there is a typeclass Foldable[F[_]] which provides the ability to "fold" (i.e. recurse over) some type F[_] which takes a type parameter. Then you have typeclass definitions for Foldable[Set], Foldable[List], Foldable[Tree], Foldable[Option], etc.

Then if you have an operation and you want it to work on any collection that can be folded, then you can just define it in terms of a generic type that has a Foldable typeclass. For instance to generically sum a collection of ints, you might do

def sum[F[_] : Foldable](ints: F[Int]): Int = ...

Now you can call sum(List(1,2,3)), sum(Set(1,2,3)), sum(Option(1)), etc...

comment 5y ago · link · parent

Wait, so is it that Scala has too many feature or too few?

comment 5y ago · link · parent

I think the point is that comparing Scala the language to Java the language is apples-to-oranges. In general you are using Java along with a bunch of libraries (or Scala plus a bunch of libraries) so the question is whether Java plus all the libraries you are using is less complex than Scala plus all the libraries you are using. And the answer is not nearly as obvious as many people tend to assume.

For example, the most common thing people point to when talking about Scala's complexity is implicits. And that's fair because implicits can be hard to understand and can be used in wildly inappropriate ways. But I have found that what implicits are mostly doing (at least when used correctly) is taking stuff that would be implemented in Java with some crazy runtime reflection scheme and making it a compile-time construct. So then the question is not "are implicits complex?" but "are they MORE complex than the equivalent implementation using reflection?" And on that question I would say absolutely not! Runtime reflection is (to me at least) much more opaque, error prone and difficult to debug.

comment 5y ago · link · parent

Yeah, you would think that obviously useful features that were added in a principled way up front would in fact be better than features bolted on after the fact.

comment 5y ago · link · parent

Counterpoint. A focus on type-safety makes Scala less likely to suffer from too-clever-by-half solutions. Sometimes a group of developers will be smart enough to create an overly-complicated solution that still type checks and works (see the original Slick library...) but for most normal teams, the compiler is a guard against overly ambitious type magic.

On the other hand, I've seen my fair share of too-clever uses of runtime reflection (Java) or weird metaprogramming (Python/JS) techniques, except they were not only too-clever but actually just didn't work and would fail miserably at inopportune times.

comment 5y ago · link · parent

I don't see this as a particularly bad problem in Scala tbh. Any language that is mature enough to be used for a large project will include many different ways of solving common problems. I'm old enough to remember listening to J2EE developers arguing endlessly about which GoF design patterns to use in which situations, usually resulting in using roughly all of them in one way or another so everyone could feel included.

comment 5y ago · link · parent

Scala minor versions are not binary compatible. So if you try and use a library compiled for 2.12 in a project that is using 2.13 it won't work.

In practice though it is not a major issue. It is easy for library authors to cross-compile for different versions and SBT handles fetching to correct binary dependency for your project. And in general, binary incompatibility doesn't mean source incompatibility. So generally uprgrading your projects scala version is as simple as changing the scalaVersion in your build.sbt. The exceptions are:

1. If you have a dependency that hasn't been cross-compiled for the new Scala version yet. So if you are trying to upgrade as soon as a new Scala minor version comes out then you may have issues if you have a lot of dependencies.

2. If you are trying to publish a library compiled for multiple older Scala versions then you can run into source compatibility issues. For instance, if you are using a method/interface that is new as of Scala 2.13 you won't be able to cross-compile to Scala 2.12.

1
161718
24