Better HN
topnewbestaskshowjobs
Log inSign up

cryptos

1,795 karma · joined Sep 13, 2012 (14y ago) · 645 submissions

Submissions

comment 5y ago · link · parent

But the whole first screen is pointless. Why not show the log-in prompt directly on the first screen? This is counter intuitive and an example of "function follows form" (and not the other way around).

comment 5y ago · link · parent

Improving UX, including usability testing with actual users, should be a top priority. Today Gnome has some pointless mobile-device-like UI concepts that don't make much sense on a desktop (like "swipe" away the start screen to be able to log-in). Then there are way too much ridicoulus limitation in the UI. In certain aspects Gnome was better 10 years ago.

comment 5y ago · link · parent

Capitalism needs to be fixed immediately! The root cause is that short-term profits are more important than sustainability. Using pesticides is just one of many symptoms.

comment 5y ago · link · parent

Timescale: "TimescaleDB vs. Amazon Timestream: 6000x higher inserts, 5-175x faster queries, 150x-220x cheaper"

https://blog.timescale.com/blog/timescaledb-vs-amazon-timest...

comment 5y ago · link · parent

That could be done with Hugo, if the generated API docs are placed into the static assets folder of the Hugo project. I think you are looking for a tool that would support it out of the box, but it shouldn't be to hard to set up.

336.

Growing Concerns Among Developers about the AWS Free Tier(infoq.com ↗)

4 points · by cryptos · 5y ago · discuss

comment 5y ago · link · parent

Since most developers don't like to write documentation, it is important to make the hurdle to write as low as possible. For me AsciiDoctor is the sweetspot because it is easy to setup, has good tool support (for example VS Code and IntelliJ), supports many text features and is relatively easy to learn (if you would only use the features known from markdown, it is as easy to learn as markdown).

comment 5y ago · link · parent

For more complex technical documentation AsciiDoc would be a better fit than markdown. A simple table with code blocks is not possible with markdown, for example. I think the target audience is pretty much the same as for AsciiDoctor.

https://asciidoctor.org/

comment 5y ago · link · parent

That is exactly the point! Most people talking about "REST" are just talking about web service APIs or HTTP APIs, because they are not aware of the actual meaning. REST became a shallow term.

comment 5y ago · link · parent

I expect to see more mysterious, deadly car crashes of oppononents of some regimes ...

341.

Startup Acquisition Marketplace(microacquire.com ↗)

3 points · by cryptos · 5y ago · discuss

comment 5y ago · link · parent

Go is like Java 1.2 from 1998.

comment 5y ago · link · parent

That is my experience, too. I worked on a SPA with a more or less simple looking table that presented hierarchical data and made them editable with form elements. Under the hood there were hundred lines of very dense rxjs code and the whole thing was communicating with about 10 HTTP endpoints. But it looked simple.

344.

Patent Suspensions Threaten Germany's Booming Biotech Industry(spiegel.de ↗)

1 points · by cryptos · 5y ago · discuss

comment 5y ago · link · parent

But just look at Gnome, which is probably the most widely used Linux desktop. Until Gnome started Gnome 3 it was something like a nice replacement for Windows 95..XP. But then they crippled the UI, decided what the user really needs and removed all the rest. By taking pointless inspiration from touch devices and macOS they made things even worse. I really liked Gnome, but I've given up.

The other problem is that there isn't THE Linux desktop what makes building GUIs for Linux hard. Yes, I know, it is the year of the Linux desktop, but I fear it will not work out this time.

346.

Java still rocks the finance industry(blogs.oracle.com ↗)

5 points · by cryptos · 5y ago · discuss

comment 5y ago · link · parent

The argument that a schemaless DB would be easier for developers is pretty much the same argument that a programming language with dynamic tpying would be easier than a language with static typing. That might be true in the short term, but just like static typing a schema helps in the long run. Types and schemas make explicit what would otherwise be implicit knowledge and help to catch bugs early.

comment 5y ago · link · parent

For me it is just more fun to write on a mechanical keyboard. I've never measured it, but I think that I'm writing a bit faster on it. But anyway, there is no other reason for me than that I like the the feeling, the sound and the mechanical quality. It's like drinking good wine.

comment 5y ago · link · parent

What sometimes gets forgotten is that even a programming language _is_ a model! And it is a model that fits exactly all the details that are necessary to construct an actual program with all the little special cases.

Modeling all constraints and runtime behaviors in UML is cumbersome and hard to understand. UML could be used for showing larger building blocks or complex flows (e. g. with sequence diagrams), but it is a bad fit to model a complete program in it.

comment 5y ago · link · parent

I wonder whether UX tests are performed during the development of Gnome. A big number of the design decisions seeming arbitrary. Overall there is very little usability progress since Gnome 3 appeared.

Gnome has long been my favorite desktop, but they never managed to trim Gnome for usability and efficiency. Instead their followed a weird concept of minimalism and a pointless touch oriented (as if anyone would use it on a smart phone!) UI.

As much as I like the idea of Linux as my primary desktop OS, I've given up.

In the future I see Windows macOS and ChromeOS but no Linux on classical computers (not smartphones and tablets).

comment 5y ago · link · parent

A good approach to avoid that kind of technical debt is domain-driven design (DDD). It helps to express concepts discussed with stakeholders directly into the code base. Thus the chance to make errors when translating the customer language into the technical language of developers is reduced. DDD could be seen as the continuation of requirements engineering, since it bridges the gap between specification and code. Both, the specification and the implementation would use the same ubiquitous language.

comment 5y ago · link · parent

Even Lukas Eder, the creator of JOOQ, suggests to use Hibernate for CRUD and JOOQ for querying: https://blog.jooq.org/2015/03/24/jooq-vs-hibernate-when-to-c...

comment 5y ago · link · parent

Exactly this! And I'm curios to learn how to solve this update problem (in an elegant way) with pure SQL.

comment 5y ago · link · parent

The interesting part is how to perform updates without an ORM. All this "just use SQL" statements seem to ignore this problem. If a domain model is used there is no simple, obvious way how to find out what needs to be updated in the database and how to generate performant SQL code from it. I'm really interested in some examples how to do it.

comment 5y ago · link · parent

A default constructor must be present, yes, but if you use Kotlin a compiler plugin can generate this constructor that is not visible in your code base (but would be if another module would use the compiled byte code).

JPA/Hibernate does not require getters and setters. Fields can be used directly for ages (more than 10 years).

The arguments against reflection are pseudo arguments, because the developer doesn't use reflection himself where usual programming language means would be better. Instead the framework uses reflection to free the developer from writing boilerplate code - completely different things!

The claim that it would be impossible to return unmodified collections because one would be forced to provider getters and setters is wrong. If Hibernate uses the fields directly, it is no problem to give only an unmodifiable view of a collection to the outside.

I don't see a general problem with lazy loading. You have to understand what you're doing, but that should be the case with every framework. Hibernate is quite flexible with eager and lazy loading and it is possible to specify an entity graph per use case to say Hibernate what to load eagerly and what not. Another possible is to use dedicated query objects (usual entity classes mapped to the same table, but designed for a certain use case).

The section about "Accessing a single table field" ignores the fact that the object mapped with Hibernate could also only use the needed fields. You could even select a single value with JPQL without any domain class involved. This argument is kind of dumb and wrong.

"Constraints" with Bean Validation are not a core part of Hibernate and shouldn't really be in this article. But, as they are already there, let me say that the criticized "too late" enforcement of the specified constraints is only the default behavior (because Hibernate can not know when to perform the check). Nothing prevents you from performing these checks explicitly with the means of the Bean Validation API. But apart from that, I'd prefer to write this kind of rules as usual code, too.

"Framework updates are horrible": I had never a severe problem switching to a new Hibernate version. Same is true for Spring (but wait, why does this article mention Spring at all?).

"Rename your JPA Repositories to JPA DAOs": The author doesn't understand the difference between a DAO and a Repository. A repository is at the same level as an entity or value object, it _is_ a domain concept. BUT the implementation of the repository interface is indeed part of the infrastructure, but this implementation would reside in another package. There is no need to name "repositories" always "repository" - if you want to name the class "BankAccounts" then do so! By the way: the class name "BankAccountsJPAImpl" is a crime!

The advice to generate IDs in your own implementation is kind of silly. "if an id is generated, it should be done knowingly" Why? Usually an ID is just a number with no special meaning other than being unique per entity type. Even if you'd decide to drop relational databases and use advanced CSV files instead the sequence number generation could easily be implemented then. And why on earth should one want to test the sequence number generation? I trust every solid database to be able to generate perfectly fine sequence numbers!

The section "Stop adding multi-directional association" has nothing to do with Hibernate specifically, because that is some kind of general design consideration.

One big question remains unanswered by this article: What is the alternative? The author implicitly suggests that it would be SQL. But things are not so simple. If you want to have a domain model (and not a mixture of domain logic and technical infrastructure), you not only have to load data from the database and create objects from it (the easy part), but you also need to find out what data needs to be written to the database after business operations were performed. I'm not aware of a simple solution here (but let me know ...). There are other things like optimistic locking where Hibernate simplifies things a lot.

All in all the article is not well balanced and flawed.

comment 5y ago · link · parent

For me Python is a more ergonomic language. It is easier to read and write. And that led to a sustained growth of Python. Python's popularity exploded in recent years due to data analytics tools using that language, but there was a reason why these tools did choose Python in the first place ...

comment 5y ago · link · parent

I think most interpretations of OOP are too specific. Interpretations are often about classes, inheritance, polymorphism and stuff like that. But the original idea of OOP was more about message passing, so that you tell an abject what you would like it to do, but have no further influence of how it performs the request (if at all).

comment 5y ago · link · parent

After being a big fan of Scala about 10 years ago, I think that Kotlin is better suited in almost all cases. Kotlin is much easier to learn (especially if you know a similar language like Java, C# or TypeScript), much easier to read and understand and has much better long term stability. The support in IntelliJ is also better. Scala causes performance issues from time to time in IntelliJ and there are some language constructs that the IDE doesn't really understand in all cases.

JetBrains build Kotlin as a programming language for industrial projects - and it shows.

comment 5y ago · link · parent

But first-class function is a completely different thing than dependency injection (DI). Supporting functional programming is a an aspect of the programming language itself, while DI is part of the infrastructure.

I agree with you, that Java should have had first-class function from day one. Ironically this was considered by the language designers, but they decided that it would be too exotic for the average Joe. OOP was a hype back then ...

comment 5y ago · link · parent

I don't think there is a need to blur the line between a standard library and frameworks. Maybe @Inject should have been in the JDK, but on the other hand it can be added to any project easily and is supported by several frameworks.

In general I think, it is wise to keep the standard library small, because innovations are easier to implement in libraries. Rust is a good example for this style.

1
111213
22