Better HN
topnewbestaskshowjobs
Log inSign up

oftenwrong

15,025 karma · joined Apr 22, 2012 (14y ago) · 2,479 submissions

sfir6i2z@mailer.me
Submissions

comment 5y ago · link · parent

Java is poor choice as a language for teaching programming. There are simply too many irrelevant bits that will get in the way of learning.

482.

Honey Bee Waggle Dancing(youtube.com ↗)

1 points · by oftenwrong · 5y ago · discuss

483.

Calculating Pagination Metadata Without Extra Roundtrips in SQL(blog.jooq.org ↗)

2 points · by oftenwrong · 5y ago · discuss

484.

Folders Language(danieltemkin.com ↗)

2 points · by oftenwrong · 5y ago · discuss

485.

Check – The app that makes traffic stops safer for everyone(getcheckapp.com ↗)

3 points · by oftenwrong · 5y ago · discuss

comment 5y ago · link · parent

https://darklang.com/

https://news.ycombinator.com/item?id=20985429

https://news.ycombinator.com/item?id=20394166

I think it's inevitable that darklang's vision will be achieved eventually, at least in part, whether by darklang or by other projects. We are already at the stage where you can define your infrastructure in code, and execute functions on managed "serverless" runtimes. It's not too much further to the point that cloud providers will build tightly integrated developer experiences that allow a developer to "just code" while handling all of the complexity that comes after. Within some large software companies, there is something close to this experience, but it hasn't yet been wrapped up and sold to the public.

comment 5y ago · link · parent

>I don't know what version of Python I'm going to have on the system, installing dependencies is not fun

If your colleagues can be expected to have Docker, you can wrap your Python script in an image that contains specific versions of Python and the dependencies.

488.

Calculating Pagination Metadata Without Extra Roundtrips in SQL(blog.jooq.org ↗)

2 points · by oftenwrong · 5y ago · discuss

comment 5y ago · link · parent

Some of these things can be achieved with lower-tech sensors.

Outdoor lights with light or motion sensors are common.

Garage lights typically turn on automatically when the garage door opens. If you mean the human-sized door to the garage, light bulbs with built-in motion sensors are available; I have used those in entryways and in closets. I don't have a garage, but if I did it would be nice to be able to close it remotely if I forgot to.

I have also installed timer switches to make sure things like vent fans for the shower do not stay on longer than necessary.

Switching all lights at once is nifty if you live in a large home. I have a small home, so it's quite trivial to turn off all of the lights.

For myself, I just don't think it's worth it to setup more sophisticated automation at this time. For one, I rent. Second, of all of the inconveniences in my life, these are at the bottom of the list.

One of the best minor conveniences I addressed recently was getting a larger-volume soap dispenser so that I have to refill it less often.

comment 5y ago · link · parent

I have installed my own switches in rentals. For example, I installed a timer switch for a vent fan in my last apartment. Very easy to undo when it comes time to move, if necessary.

comment 5y ago · link · parent

Home automation seems to mainly achieve "low low benefits". Like turning on a light from your phone instead of using a light switch. These things make some minor conveniences possible, but don't come close to being essential. It doesn't seem worth it for the privacy, security, management overhead, cost, etc.

comment 5y ago · link · parent

Not long after, hobbyists and hackers will be hijacking that cellular connection.

493.

Bit Cowry(granolashotgun.com ↗)

2 points · by oftenwrong · 5y ago · discuss

494.

How Bankrupt American Cities Stay Alive (11 min video)(youtube.com ↗)

4 points · by oftenwrong · 5y ago · discuss

comment 5y ago · link · parent

That is true. I prefer an experience that's more fiddly and annoying overall, but that can be customised to fit my preferred usage if necessary. I would not be happy on an iPhone, stuck with what they have chosen. I like to install my own launcher and such. That's why I use GNU/Linux on the desktop, and Android on my phone. Both of these ecosystems are very fragmented as well. For example, my old Android phone had neither of the problems I mentioned.

comment 5y ago · link · parent

If you want a lightweight launcher with few features and an atypical UI, try https://kisslauncher.com/ (available in the Play Store and in F-Droid). It shows your apps in a "frecency"-ordered, scrollable and searchable list.

comment 5y ago · link · parent

What's wrong with working around barriers? I find Tasker useful for fixing things I don't like about my phone that are otherwise beyond my ability to fix. For example...

1. By default my phone remembers the last media volume level used with headphones. This does make some sense, but it is easy to accidentally get maximum volume blasted in your ear. I use Tasker to automatically reset the volume to a safe level when I plug in my headphones.

2. I find that the automatic screen brightness on my phone doesn't work well at all. In a dark room, it would not set the brightness to its minimum level. It also would not turn the brightness to maximum even in direct, bright sunlight. I prefer to just set the brightness manually, and avoid the poor guesses of the automatic brightness algorithm (which is claimed to be "smart" and aware of my preferences). The only problem with manual brightness control is that it's common to end up in bright sunlight with a very dim screen. It is impossible to use the phone under such conditions. So, I used Tasker to add a gesture. If I shake my phone relatively hard, twice, in an up and down motion, it sets the screen to maximum brightness. I use this all the time.

comment 5y ago · link · parent

The US has a lot of infrastructure that was built around the same time period. That is why so much of it is reaching its end-of-life around the same time. The replacement phase for all of this infrastructure has not necessarily been planned for well, but we will have to see how it plays out.

China has built at an even more aggressive pace and scale. It has built an unprecedented amount of infrastructure in an unbelievably short amount of time. That infrastructure will reach end-of-life all around the same time. It's likely going to end up as an infrastructure crisis at a level beyond what the US is suffering from now.

comment 5y ago · link · parent

Kotlin could easily end up "the next groovy", but it might also end up the next Java, or at least maintain its edge against Java.

Java is rapidly improving, and significant resources are being invested into that effort. To remain relevant Kotlin will have to keep up with Java's improvements, and will also have to retain enough killer features that differentiate it from Java.

Java is going to retain backwards compatibility, as they always have. This is a double-edged sword, of course. It holds Java back from fixing some its most glaring issues, but also keeps people in the ecosystem, and demonstrates desirable stability.

Kotlin, on the other hand, could more easily introduce big, breaking changes. The Kotlin world is more keen on the cutting-edge, and would probably switch to a "Kotlin 2" without much resistance. Plus, JetBrains is extremely well-equipped to provide tools for auto-upgrading old code.

comment 5y ago · link · parent

I don't think I've ever seen an HN thread with this many different suggestions.

501.

JEP 408: Simple Web Server(openjdk.java.net ↗)

4 points · by oftenwrong · 5y ago · 2 comments

comment 5y ago · link · parent

That's all fine, but why not use kubectl's excellent tab completion?

    kubectl delete pod <tab>
and it lists the pods.

For bash or zsh:

    source <(kubectl completion $(basename $SHELL))

comment 5y ago · link · parent

    return stuff.stream().anyMatch(this::checkForThing)

comment 5y ago · link · parent

HTTP: javalin

persistence: jooq + postgres

search: postgres full text search

cache: ehcache

comment 5y ago · link · parent

It's reasonable to provide a single implementation of an interface, if the goal is to facilitate dependency injection for that component. The problem I find with Spring is that it is designed for dependency injection at all levels of its architecture, leading it to be one of the ultimate examples of Ravioli Code.

https://wiki.c2.com/?RavioliCode

DI is a powerful concept, but Spring projects rely on DI in such a generic way that it often doesn't even make sense for your application. You have to gain intimate knowledge of the abstractions, and inject a bunch of code in a bunch of places just to make it do the very-straightforward thing you were trying to do.

comment 5y ago · link · parent

No flag necessary for latest versions of OpenJDK 8, either.

comment 5y ago · link · parent

>To calculate the real dislikes on a video, we tabulate only increases to the dislikes, and ignore decreases. On normal YouTube videos (e.g., on PewDiePie's videos), the official YouTube stats and our real stats completely agree. On many White House videos, there is a huge discrepancy between official dislikes and our calculated real dislikes.

This might not be nefarious manipulation. YouTube may be removing illegitimate dislikes, such as from bots or sock-puppet accounts.

comment 5y ago · link · parent

Solar-powered edition of this article:

https://solar.lowtechmagazine.com/2021/03/urban-fish-ponds-l...

509.

Urban Fish Ponds: Low-Tech Sewage Treatment for Towns and Cities(solar.lowtechmagazine.com ↗)

1 points · by oftenwrong · 5y ago · discuss

1
161718
83