HNHacker News
TopNewBestAskShowJobs

qw

1,789 karma · joined July 17, 2008

submissionscomments
qw··on Building a Game with the Real Engine
I accidentally hovered my mouse cursor over the images, and saw a detailed description. It may have been generated by AI, but it's a nice touch that was not expected
qw··on Giving Life to Æthelstan
You are right. I got the two mixed up.
qw··on CrowdStrike Update: Windows Bluescreen and Boot Loops
It's not all of Europe. The airports in Norway are operating as normal. One of the airlines reported booking issues on their website, but I haven't read about any other issues.

Some international flights have been delayed or canceled of course, depending on the route.

qw··on Giving Life to Æthelstan
The article is from 2011.

Æthelstan is a central character in the TV show "Vikings" that came later, so perhaps his name is more recognized now

qw··on Binance built a 100PB log service with Quickwit
I agree that fuzzy matching etc. are usually not needed, but in my experience I need at least substring match. A log message may say "XYZ failed for FOO id 1234556789" and I want to be able to search logs for 123456789 to see all related information (+ trace id if available)

In systems that deal with asynchronous actions, log entries relating to "123456789" may be spread over minutes, hours or even days. When researching issues, I have found searches like Opensearch, Splunk etc. invaluable and think the additional cost is worth it. But we also don't have PB of logs to handle, so there may be a point where the cost is greater than the benefit.

qw··on Don't use booleans (2019)
If the method takes so many arguments that named parameters is necessary for readability, it is often a sign that the method is either too complex and should be split up, or that the method should accept a "config" record as a parameter. I this makes it clearer because you can group the parameters and give them meaning. Then you know that "url", "headers" and "body" belongs to the "request" record, while "customerId" and "taskId" are separate
qw··on Writing GUI apps for Windows is painful
If money was not an issue, I'd probably try Delphi for both A and B, which can create native cross platform apps.

If not, I'd try Lazarus for A and Kotlin compose for B A: Lazarus or Delphi (if money was not an issue)

B: Kotlin compose or Delphi (

qw··on Htmx 2.0.0 has been released
One example of this is the lack of an include-tag that could fetch a fragment from the server (useful for headers/footers). Developers have wanted it for decades and have been forced to reproduce the functionality themselves using frames and/or javascript.
qw··on AOL pretends to be the internet
Yahoo Messenger was available as a Windows program. If they had focused more on chat and video calls, we might be using it now instead of Slack and Teams
qw··on Ask HN: How to generate PDFs from the back end?
I recently found out that a Norwegian government agency open sourced a micro service for generating PDF

I haven't used it, but it looks promising. You create templates based on html (Handlebars templates), which should make it easy to get started.

https://github.com/navikt/pdfgen

It may be worth a look

qw··on JEP 430: String Templates (Preview) Proposed to Target Java 21
It's a standard full sized external Mac keyboard for Norway bought directly from the Apple store. We share the keyboard with Denmark too I think. The Swedes and Finns have different keyboards, but I think they use a similar combination for backslash.

So the Mac issue applies to 4 countries in the Nordics at least. Please note that traditional PC keyboards use a different layout for some characters and may in some cases have a dedicated key for backslash too, in case you Google Norwegian keyboards. It's one of those Mac vs PC things we are used to.

Before anyone starts suggesting connecting a PC keyboard to my MacBook Pro, keep in mind that I use the built in keyboard almost 50% of the time and having two different key mappings is a hassle

Regarding backslashes and other special characters, I never said it's on Java specifically, but the US centric culture in general. K&R used curly brackets when they designed C because they fit the US teletype character set of the 60s/70s, but that doesn't mean it's the best choice today.

I'm not suggesting we use special unicode symbols like arrows and emojis, but just pause for a minute and look beyond the US keyboard and see if we can find a solution that also works ergonomically for at least some non-US countries.

qw··on JEP 430: String Templates (Preview) Proposed to Target Java 21
They are ok to use

I press ⌥ + 8 for square brackets and SHIFT + 8 for parentheses.

It's probably not possible to find better alternatives for Mac keyboards that could be used for a language based on Lisp syntax.

The Mac keyboard simply doesn't have any dedicated keys that are not used for normal text, except for "@". For some unknown reason, they have a dedicated key for umlauts ("¨") that we don't use in our language. I guess I could map it to brackets, but SHIFT + UMLAUT returns a "^" that is often used in regexps and I don't want to lose that.

Windows keyboards has a different layout that is slightly more programmer friendly if you have a full sized keyboard. They do have a backslash key but lack the dedicated "@" key. Windows needs a dedicated backslash due to the file paths, unlike Mac. It is an acceptable tradeoff for Mac users, as non-developers are more likely to use "@" than "\".

Let's just say that there is a reason why I love my IDE that will automatically add closing curly brackets when it detects a block.

qw··on JEP 430: String Templates (Preview) Proposed to Target Java 21
I agree. On my keyboard I need to press ⌥ + ⌘ + 7

It's actually made worse because { and } also need special combinations.

To type \{X} I need to press

  (⌥ + ⌘ + 7) (SHIFT + ⌥ + 8) X (SHIFT + ⌥ + 9)
I know this is something we need to live with due to historical reasons, but I would prefer that new syntax is made simpler.
qw··on This is the year of the RSS reader?
With "nntp//rss" you could get the best of both worlds. It contained both an NNTP server and an RSS aggregator, with a web interface for administration.

It's no longer maintained, but it was a great concept

qw··on Resolving the great undo-redo quandary
"Local history" in IntelliJ has saved me several times. The diff mode is very useful when working on a piece of code and suddenly your tests starts failing and you need to find out what changes you made in the last hour.
qw··on From zero to 10M lines of Kotlin
I think you are right. Many also got their first experience with Java in school or at their first job. Languages like Java/C# can seem intimidating at first.
qw··on Cloud desktops aren't as good as you'd think
Jetbrains has support for remote development environments. I haven't tried it myself, but it looks promising.

https://www.jetbrains.com/remote-development/

qw··on EV shipping is set to blow internal combustion engines out of the water
Moat of the discussion is based on storing enough power to last the whole journey. What about providing floating supply stations where they could charge or exchange batteries?
qw··on Google refuses to reinstate account after man took medical images of son’s groin
There are still some fees involved of course, but they are much lower and typically a fixed price. One article I read says that BankAxept is cheaper than Visa for transactions over 30 NOK (~3 USD), but the information may be out of date.
qw··on Google refuses to reinstate account after man took medical images of son’s groin
When you pay by card in a Norwegian store, you probably use a card that supports BankAxept (since 1991). In that case the payment will be made through the banks, instead of through Visa. 3 of 4 payments go through BankAxept.

Cards issued by banks will often combine BankAxept and Visa/MC on the same card, so that users don't need a separate Visa card. The terminal will switch to BankAxept if available automatically. This is done transparently, so there are no issues with using it as a Visa card outside Norway.

qw··on Log4j: The pain just keeps going
I think Spring Boot defaults to Logback these days.
qw··on Magnus Carlsen to give up World Championship title
> I've found them entertaining to watch. But Norwegians are master of slow-TV, so I guess that's why. They have good experts that manage to explain it to normal people. Interesting guests in the studio between moves. Interact with audience through questions from chat etc.

I usually don't follow chess, but I still end up watching the WC matches on Norwegian TV. They manage to make it interesting and exciting.

qw··on RSS is back as an underpinning to SlackOps
I don't know if they are still in use, but there are pub/sub services that can be used for notifications.

This was created to avoid unnecessary polling of RSS/Atom feeds:

https://en.m.wikipedia.org/wiki/WebSub

qw··on CotEditor – Lightweight Plain-Text Editor for macOS
Have you tried UltraEdit? I used it 10 years ago, so I don't know how well it has aged, but I preferred it over Notepad++ at the time.

The reason why I don't use it now is because IntelliJ and vscode covers most of my need, and it's hard to justify the extra expense at my work place. I sometimes miss how well UltraEdit worked in multi-column mode and hex edit mode

qw··on Why do people not notice our enormous, prominent, clear and contrasting banner?
> The ban on psychic violence was not comprehensive, and included exemptions for images used in the furtherance of scientific, educational and artistic works. To survive, the advertisers had to learn to speak the language of art.

I'm impressed by the AI. It's actually what would happen if this law was introduced. There would be exceptions, and the advertisers would find ways to exploit them.

qw··on Big Bird: killing SQL injection with graph homomorphisms
> you need to programmatically construct queries based on user input

You still need to build the queries and have control of what parametres are in use. Why not build the parameters list dynamically as well?. There are some databases or drivers that have limitations where you need to sanitize data yourself, but I'm not sure if that applies to the majority of the scenarios.

This is a simple example of code for constructing dynamic queries:

    query = "... WHERE country = :country";
    params.set("country", country);

    if (userId != null) {
        query += " AND user_id = :userId";
        params.set("userId", userId);
    }
It may become more complex as you add sub queries or if the database does not support adding a list as a parameter, but the principle is the same. You can always just build the list programatically using parameters instead of concatenating the values given by the user directly.

If there are drivers or databases that does not support this, you will need to sanitize the data yourself of course. But I don't think that is the case for most users.

(btw, database drivers that support named parameters are much more convenient than using "?")

qw··on Scientists discovered a new molecule that kills even the deadliest cancer
The article says it also works on dead human tissue. I don't know the significance of this, but it has been tested on something other than mice. I guess we can't make any conclusions on the adverse effects on a living human body, but it seems promising to me (not a scientist)

From the article:

> The molecule also killed cancer cells in human tissue that were gathered from patients who had their tumors removed

qw··on Important PostgreSQL 14 update to avoid silent corruption of indexes
I just opened IntelliJ and it has this feature too, where you can "Split right" or "Split down" and have multiple views of the same file. Thanks for letting me know this is something editors might support.

For some reason I have not noticed that feature before. It's not like it is hidden either, as it is in the "right click" context menu that I use daily. I guess I need to learn the tool, so that I don't miss useful features like this.

qw··on Microsoft Purview: Additional classifiers for Communication Compliance (preview)
I honestly first thought this article was satire. It is so unreal to find myself in a world where this is acceptable. What's next? Installing cameras in restrooms to catch offline conversations?
qw··on Ask HN: What game do you wish existed?
Have you considered the "cloud" approach, where players could rent a hosted server?
← PreviousPage 2 of 17Next →