frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Fake NZ news pages are swamping Facebook with AI slop

https://www.rnz.co.nz/news/national/586298/how-fake-nz-news-pages-are-swamping-facebook-with-ai-slop
3•billybuckwheat•1m ago•0 comments

Tenure Is a Total Scam

https://www.betonit.ai/p/tenure-is-a-total-scam
1•barry-cotter•3m ago•0 comments

Double Rootlessness: AI's Cognitive Illusion and Systemic Risk Amplification

1•JanusPater•4m ago•0 comments

Microsoft Outlook thinks Microsoft Azure emails are spam

https://twitter.com/OrganicGPT/status/2020327350379196602
1•behnamoh•6m ago•0 comments

KVM: x86/PVM: Introduce a new hypervisor (2024)

https://lwn.net/Articles/963718/
1•indigodaddy•8m ago•0 comments

Build your own Claude Code

https://app.codecrafters.io/courses/claude-code/overview
1•sarupbanskota•13m ago•0 comments

The Democrats Again Risk Losing Voters They Take for Granted

https://www.nytimes.com/2026/02/08/opinion/ai-democrats-jobs-economy.html
4•doener•23m ago•0 comments

Sparklines

https://indieweb.org/sparkline
1•spacebuffer•24m ago•0 comments

Dwegretryt

https://gist.github.com/ebaerakhan
2•faresfa•25m ago•0 comments

Earth's youngest desert: Satellites show the disappearance of the Aral Sea

https://universemagazine.com/en/earths-youngest-desert-satellites-show-the-disappearance-of-the-a...
3•stared•30m ago•0 comments

End of the Line for Video Essays

https://pluralistic.net/2026/02/07/aimsters-revenge/
3•hn_acker•31m ago•0 comments

Reflections on Section 230's Past, Present, and Future on Its 30th Anniversary

https://blog.ericgoldman.org/archives/2026/02/reflections-on-section-230s-past-present-and-future...
1•hn_acker•39m ago•0 comments

Someone did Bitcoin superbowl squares

https://sbsqr.vercel.app/
1•sfffs•39m ago•0 comments

Another Confusing Internet Jurisdiction Opinion-Stokinger v. Armslist

https://blog.ericgoldman.org/archives/2026/02/another-confusing-internet-jurisdiction-opinion-thi...
1•hn_acker•40m ago•1 comments

Chance the Rapper Is Now Chance the AI Company Spokesman

https://stereogum.com/2488412/chance-the-rapper-is-now-an-ai-company-spokesman/news
1•throwoutway•45m ago•0 comments

Single-capillary endothelial dysfunction resolved by optoacoustic mesoscopy

https://www.nature.com/articles/s41377-025-02103-6
2•PaulHoule•54m ago•0 comments

The Ownership Class and the Working Class

https://satisologie.substack.com/p/the-ownership-class-and-working-class
3•sova•56m ago•1 comments

Bonobo able to imagine a scene, act it as if was real while knowing it's not

https://arstechnica.com/science/2026/02/watch-kanzi-the-bonobo-pretend-to-have-a-tea-party/
1•i-blis•57m ago•2 comments

Evolving the Agent Enviornment

https://github.com/harivansh-afk/agentikube
1•rathiharivansh•1h ago•1 comments

Buccal Pumping

https://en.wikipedia.org/wiki/Buccal_pumping
2•thunderbong•1h ago•0 comments

Every book recommended on the Odd Lots discord

https://odd-lots-books.netlify.app/
1•muggermuch•1h ago•0 comments

Show HN: WhatsApp Chat Viewer – exported chats as HTML

https://github.com/rodrigodesalvobraz/whatsapp-chat-viewer
1•rodrigobraz•1h ago•0 comments

Throne Wars: When Claude Opus 4.6 Clashes with GPT-5.3 Codex

http://yeasy.blogspot.com/2026/02/throne-wars-when-claude-opus-46-clashes.html
1•yeasy•1h ago•0 comments

400k Iranians abroad share Internet access with users at home

https://www.iranintl.com/en/202602084487
1•ukblewis•1h ago•0 comments

Setting Up an IRC Server

https://www.neatnik.net/setting-up-an-irc-server/
3•rickcarlino•1h ago•0 comments

I hacked my own computer using OpenClaw and it was terrifyingly easy

https://www.androidauthority.com/openclaw-ai-prompt-injection-3636904/
2•jrmg•1h ago•1 comments

PRD-driven, dependency-aware agent workflow for Claude Code and Vibe Kanban

https://github.com/ericblue/claude-vibekanban
2•ericblue•1h ago•1 comments

Sandwich Bill of Materials

https://nesbitt.io/2026/02/08/sandwich-bill-of-materials.html
2•zdw•1h ago•0 comments

Pi Is All You Need

https://p10q.com/pi_is_all_you_need/
2•tmsh•1h ago•0 comments

AI Makes the Easy Part Easier and the Hard Part Harder

https://www.blundergoat.com/articles/ai-makes-the-easy-part-easier-and-the-hard-part-harder
56•weaksauce•1h ago•32 comments
Open in hackernews

Ask HN: Java why put string in a constant?

1•ramsicandra•8mo ago
I'm relatively new to Java. I often notice a pattern where there is a list of constant which value are equal to the name.

  class Constant {
    public static final String ALBUM = "album";
    public static final String NAME = "_name";
    public static final String DISPLAY_NAME = "display-name";
    public static final String SERVICE_NAME_METRIC_NAME_PREFIX = "service_name.metric_name";
  }

Here is a public example of this practice I could find: https://developer.android.com/reference/android/provider/MediaStore.MediaColumns

I could understand that this might help in 2 ways refactoring and typo. This reduces chance of typo because you'll get compile error instead of run-time error if you typo a constant. This might also help in refactoring if you ever wants to change the value. but if may use this android public API example, I don't think it's wise to change a field name ever. If it's decommissioned, it's good to keep it so we don't re-use the field. If it's a new better field available, I think it should have a different name. I maybe making a straw man argument here. Let me know. If it's an internal API where such refactoring might make sense -- I still kind of think internal API should also be backward compatible, replacing a string are not a complicated operation in my opinion.

I see that this practice has a cost. One being that in every class that use this API. You need to add an import. It's also often the const is only used once from my experience.

  import static com.example.MediaFields.NAME;
  import static com.example.MediaFields.DISPLAY_NAME;

  String value = json.getString(NAME);
  String value2 = json.getString(DISPLAY_NAME);
vs

  String value = json.getString("name");
  String value2 = json.getString("display_name");
You write 1 line for declaration plus 2 lines for each class using this API. This is not a big deal in terms of LoC and I'm not an LoC police. However, my sense is the cost outweigh the benefit.

What do you think?

Comments

lanna•8mo ago
You just made TWO typos: "display-name" vs "display_name" and "_name" vs "name", automatically counter-argumenting your point.

It is also for documentation. With the declared constants, we know all possible values. With plain strings, how am I supposed to know which values to use?

The benefits far outweigh the marginal cost.

ramsicandra•8mo ago
The -, _, and leading _ are just variations of white space / separator I have encountered. I think it's possible to document all the allowable values in the Javadoc section of the function that takes in string as their argument.

In the specific android example, I would put it here. Under projection params where it takes in all the Images.Media.* string consts.

https://developer.android.com/reference/android/content/Cont...

Though, if it's a practice of Java Engineer to document allowable enum like string as a constant, then I can say that's a valid argument.