HNHacker News
TopNewBestAskShowJobs

AugustoCAS

381 karma · joined April 4, 2017

submissionscomments
AugustoCAS··on Is ORM still an anti-pattern?
Sounds like you've have misused hibernate if you had an 'anaemic domain model'. The only reason to use hibernate is to have a full domain model and then let hibernate map it to the DB. I recently worked for a company that was using hibernate in the way you mention and I was surprised as I had never seen it used in that way in the ~10 years I used it.

I'm not trying to defend Hibernate, but if used correctly it can be a good tool for a good number of scenarios.

AugustoCAS··on Research papers on ML in Compilers
Thanks for sharing this. I became a bit of a fan of Dr Hutton after I followed his Functional Programming in Haskell classes on Youtube.
AugustoCAS··on Estimation isn’t for everyone
I cannot say about NYT, but a lot of newspapers have amazing tech teams. The tech team at FT has an excellent reputation. Unfortunately, some tabloids also have really good tech teams, but I shall not name them because they sell toxicity.
AugustoCAS··on Gently Down the Stream – A gentle introduction to Apache Kafka (2021)
That's a cute site.

The author forgot to say that teenage otters set `acks=0` when producing messages :D.

AugustoCAS··on Zap – Fast backends in Zig
In what industries is Zig popular? I'm asking as I saw Zig as being the 'highest' paid language on the 2023 Stack Overflow Dev survey - https://survey.stackoverflow.co/2023/#section-salary-salary-...

The performance looks outstanding!

AugustoCAS··on Show HN: Java REST without annotations, DI nor reactive streams
Hi Ivan!

From my exprience there are multiple reasons - The main one: I've learned tons from reading code. The ability to jump into code that does X to see how it's implemented is worth a lot to me. This is something I love about the jvm ecosystem which is unfortunately not present in many other languages. - Many libraries/frameworks (Spring Data comes to mind) provide very leaky abstractions. Understanding how the underlying technology is used can make a big difference. - Address questions when the documentation is not clear enough. - And last: to discover bugs in libraries. This is not common, but it happens.

AugustoCAS··on Show HN: Java REST without annotations, DI nor reactive streams
Something that people are missing about annotations: in order to test the annotated class/method one needs to start running extra code, sometimes a lot of extra code.

Using spring as a toxic example, many things have to be tested using @SpringBootTest which is incredibly slow to start. On top of that because of the use/abuse of @MockBean tests stop being thread safe. So one ends up with slow test that need to be run sequencially. I'm working in a 'start up' that went the spring boot way and quite simple services take 15+ minutes to run all their tests, which is insane.

On top of that, annotations make it impossible/very dificcult to know what code is actually executed (and also it not possible to navigate to the code in an IDE). As I rule of thumb, I'm always happy to swap one annotation for one or two lines code.

AugustoCAS··on Kent Beck on Agilevs Waterfall
This is from a talk Dave Farley (co-author of Continuous Delivery) and Kent Beck had which was published yesterday.

They discuss how the ideas of XP and Agile have been diluted and how a good number of organisations now follow a waterfall approach with a different name (I happen to work for one of those orgs unfortunately).

If anyone is interested in this topic, Anthony Marcano (creator of the Screenplay Pattern) published a video on the same topic a few months ago with some examples of how Agile has been diluted: https://www.youtube.com/watch?v=fzqEHwXVpKQ .

Maybe I'm a bit of a Romantic, but I believe that given 2 orgs on equalt terms, on doing XP or Kanban and another one doing SaFE or whatever, the one doing XP/Kanban will be a far better place to work. And from experience I'll say that an XP/Kanban org will be able to deliver, get feedback and learn faster.

AugustoCAS··on The Rails Doctrine
I stopped at the first point out of sadness. I've worked on the JVM space for 19 years. For the last 1.5 years, I've been working in an org that uses Spring Boot and the code, configuration, and general designing of the applications feels horrendous. I know spring boot was the 2nd (or 3rd?) attempt of Spring to get a quick development framework simiar to Rails (Spring Roo was the first I think) but my gosh it has soo much magic, and it's so slow. Starting up a app can easily take 20+ seconds, and the full start/stop cycle can take 60+ seconds. On production we often have apps taking longer than 2 minutes to boot up and the only thing they do is open a few connections to the database and to a messaging broker (both which are very fast). The component scanning "feature" is a disaster.

I love ruby and find it and I know Rails also has some magic, but I love my types. I'm glad I'm going back to do something sensible in a few months. Probably Kotlin + http4k.

AugustoCAS··on Things that don’t work well with MySQL’s FOREIGN KEY implementation
I have the strong feeling I would never do this regardless of the DB engine for performance and storage reasons. I would try to hash the blob into a bigint and use that as the PK/FK.

Out of curiosity, is there a scenario you can share in which using a binary blob as a PK/FK would be the best solution?

AugustoCAS··on A Yubico FAQ about passkeys
I use keys as my default way of login but I have 'phishable' backup methods (OTP codes or backup codes).

For me, the main thing is that using the keys by default make my accounts more secure and I would only use the phishable methods in case of emergency (if my house goes up in flames with my keys, computer, mobile, etc). One important thing for me was to remove my mobile number for SMS OTP or password reset, as sim cloning is a posibility.

And a password manager is still indispensable as most sites don't accept hardware keys at all.

AugustoCAS··on Application-as-a-Function Thinking
I think you are right. If the response would be a promise or similar, it would become a reactive system.

Disclaimer, I've avoided using reactive approaches as much as I can on the server side as it increases the complexity (and cognitive load) and makes diagnosing issues harder. This is my experience in the JVM world, I'm not sure how it is in other languages/platforms.

[This article](https://netflixtechblog.com/zuul-2-the-netflix-journey-to-as...) from Netflix mentions the tradeoffs they experienced when they re-engineered their API gateway to be reactive. I wonder if this is still valid as the article was written 6 years ago.

AugustoCAS··on Application-as-a-Function Thinking
I couple of years ago I was lucky to use http4k, a server as a function web library for Kotlin. It was such a wonderful change compared to every other technologies available in both Java and Kotlin. It's simple.

Testing becomes so much easier too, as one can instantiate a the whole web routing aspect, without having to bind it to a port and having to send real http requests.

If strongly suggest people to take a look at it. It's not perfect, but it's a lot simpler than other frameworks and libraries. And it's a shift in some of the current mentality of using heavy frameworks (such as spring boot) which blow up anyone's cognitive load.

https://github.com/http4k/http4k

AugustoCAS··on Using a framework will harm the maintenance of your software
I didn't read the whole article, but I agree in principle.

My rule of thumb is:

* Prefer code vs a library if what I want to do is simple and/or if the complexity of the library overshadows whatever benefit I get from using it. * Prefer a library vs a framework if the library provides what I need.

A couple of examples when using:

* The use of the Spring Framework in the Java world to do DI, web apps and many other things. I think java is the only language where a framework has such a bad influence on developers (maybe Ruby and Rails follows it, after all Spring tried hard to copy Rails ease of use). In this example the framework makes a few things easier, by ading a metric ton of complexity. * The npm left-pad library (debacle).

This doesn't mean that one shouldn't use libraries or frameworks, just that they need to be justified. Development is boring and most developers just see shiny stuff and have to use it in production just to get some entretainment.

AugustoCAS··on How to Validate Names
Recently at work I had a discussion about how _not to_ validate names and found this quite detailed summary about all the tricky aspects of name validation.
← PreviousPage 3 of 3