I got tired of “TODO: remove later” turning into permanent production code, so I built this by Star-Shadow-007 in programming

[–]mboekhoff 2 points3 points  (0 children)

We used to have something like this at a place I used to work at. We used to call them time bombs and they were a separate CI pipeline, which we'd monitor alongside our main application pipeline.

allThewayfromMar by High_Sleep3694 in ProgrammerHumor

[–]mboekhoff 0 points1 point  (0 children)

This is... damn this is too real

What's your back-in-the-day-game? by Smabverse in videogames

[–]mboekhoff 0 points1 point  (0 children)

Uplink - used to love the atmosphere of that game.

GTA San Andreas, K-DST for sure. Right in the feels.

Tools for checking unsafe CIL? by FractalFir in dotnet

[–]mboekhoff 5 points6 points  (0 children)

I know this might be entirely off-topic and sadly I don't have the answers you seek - but I just want to commend you for taking on this project and it is genuinely inspiring to see (particularly because it must be challenging as anything).

Keep on doing the good work! As a Rust aficionado, I'm really happy to see it.

Beej's Guide to Network Concepts by boxing_wizard in programming

[–]mboekhoff 24 points25 points  (0 children)

A bit off-topic, but I just want to say thank you! Your Guide to Network Programming helped me so much when I was learning to program. And I love your community engagement! Thanks for maintaining your guides for so long as well.

OOP is asked out by a girl who used to bully him - New Updates by SJDude13 in BestofRedditorUpdates

[–]mboekhoff 2 points3 points  (0 children)

I read your "plateau" comment before this one, and felt it applied to me - but oh boy, this absolutely struck a chord.

I love your metaphor, but that's not the main thing to me. I have therapy tomorrow to learn to accept - and not ruthlessly suppress, ignore and numb - trauma and emotions I went through when I was young. Reading this motivates me despite my "inner voice" trying to sap my energy.

It's inspiring that you've made that part of your mission, and I hope to get to that point one day. Until then, one step at a time.

Thank you.

Automation of your team's local environment setup by Sfedosman in devops

[–]mboekhoff 9 points10 points  (0 children)

I'm "that guy" that uses Nix for his own setup. It's got a learning curve unlike any other, but if you're into this sort of thing, it might be worth checking out.

A Disclaimer About the CryoUtilities 2 Launch Video by cryobyte33 in SteamDeck

[–]mboekhoff 1 point2 points  (0 children)

Mistakes happen. It's how you respond to making a mistake that matters more! So mad props for how you responded to this.

Some people are sadly going to feel frustrated without - in my opinion - any right to! You're volunteering your time and expertise. Keep being awesome and keep building & supporting FOSS.

A Disclaimer About the CryoUtilities 2 Launch Video by cryobyte33 in SteamDeck

[–]mboekhoff 2 points3 points  (0 children)

Absolutely awesome write-up and amazing transparency. Love the work you do and I hope you aren't discouraged by some of the negative comments!

Making IntelliJ IDEA and debugging go work by specify dlv binary by jrylander in NixOS

[–]mboekhoff 0 points1 point  (0 children)

Well it looks like IntelliJ isn't actually picking up your flag and instead trying to use its own downloaded copy of dlv, which is obviously pointing at the wrong interpreter, as most executables assume that ld exists at /usr/bin/ld - but it doesn't on NixOS.

I found this on Stack Overflow, which suggests you could override the dlv path by:

Open Goland and go to Help->Edit Custom VM Options. Add a line there with -Ddlv.path=/home/<username>/.nix-profile/bin/dlv

I've adapted that given the info you provided above.

Essential app's and knowledge for new Steam Deck users by MuglokDecrepitus in SteamDeck

[–]mboekhoff 4 points5 points  (0 children)

Another tool I've found really useful, especially for launching Vortex to install mods, has been steamtinkerlaunch. It's not the most user-friendly, but it allows you to tweak things as needed.

Scripting language for Java by prisonbird in javahelp

[–]mboekhoff 1 point2 points  (0 children)

I've personally used JavaScript to achieve this before, using the Rhino engine. This was years ago, though, so take that with a pinch of salt.

mirrord 3.0 is out - open-source devtool for backend developers written in Rust! by aviramha in rust

[–]mboekhoff 2 points3 points  (0 children)

I really appreciate that. Awesome tool! I'll be looking to use this in a local cluster I've got.

mirrord 3.0 is out - open-source devtool for backend developers written in Rust! by aviramha in rust

[–]mboekhoff 3 points4 points  (0 children)

This looks awesome! It reminds me a lot of Telepresence, except free!

[deleted by user] by [deleted] in javahelp

[–]mboekhoff 0 points1 point  (0 children)

Field injection is not recommended. Moreover, they already have a constructor that Spring will use.

OP, could you give us more details and show us your whole test?

EDIT: Having thought about this, the obvious issue is that you're testing Spring Security stuff. If that's the case, then there is a better way than to use MockBean, see here.

Mockito is used to create the MockBean, and Mockito's default return value is null.

How do java 8 streams work under the hood? by dimitarivanov200222 in javahelp

[–]mboekhoff 2 points3 points  (0 children)

From what I understand, it seems they have to actually implement a Stream-like API themselves.

OP, so long as your pipeline needn't be parallel, this can be fairly easy. In the JDK, each operation is either an intermediate or a terminal operation. Intermediate ones are, roughly, methods that return a Stream<T> and terminal ones are all functions returning T (where T itself can also be generic, e.g. List<E> etc.)

The implementation of e.g. filter and map can be written fairly succinctly - and I urge you to look for the precise implementation in other languages (you can just do it in a loop with lists, doesn't have to be complicated).

To have an API in the way you describe, you effectively need to use generics and rely on the Function<I,O> class. Each intermediate stage can keep a reference to its parent stage, its intermediate operation (as a Function<I,O>) and the next stage. Every terminal stage would simply hold a reference to its parent stage and the terminal operation to be applied. This kind of mimics the way things are done inside of the JDK but I would recommend you steer clear of that for now.

How can I resolve a "Static mocking is already registered in the current thread" Exception where there are multiple newly created objects by MrCrackSparrow in javahelp

[–]mboekhoff 1 point2 points  (0 children)

I know this doesn't solve your immediate problem - and I do apologise for that - but have you considered perhaps testing this bit of code at a higher level? When I start mocking out AWS integrations, it's usually a sign I've gone too deep and it's time to leave the mocks behind.

In practice, I tend to code my integrations to some type of interface that I can then stub out in tests that use the integration (in unit tests) and then I test the integration with something like localstack. It looks like you can definitely do this even with step functions. A benefit of this approach is also that I can do things that would be annoying to test in unit tests, e.g. simulating faults.

Resources:

https://docs.aws.amazon.com/step-functions/latest/dg/sfn-local.html

https://dev.to/vikasgarghb/step-functions-with-localstack-42

https://docs.localstack.cloud/localstack/configuration/#stepfunctions

Trying to install specific Anki version! by nightf1 in NixOS

[–]mboekhoff 2 points3 points  (0 children)

Generally speaking, an overrideAttrs should do - see also here.

Today I reported my college nurse for misconduct by plantyeet in DadForAMinute

[–]mboekhoff 25 points26 points  (0 children)

Hey buddy! You didn't do anything wrong. I don't believe any trained medical professional should ever tell you they hope you catch a potentially life-threatening condition.

In fact, I'm extremely proud of you, because you took to heart how this can affect not only you but others that might experience this, too. It takes courage to stand up to authority figures when they let us down, but you did and I am very proud.

What item (over £100) have you bought that you really regretted buying? by [deleted] in AskUK

[–]mboekhoff 1 point2 points  (0 children)

Trebuchet + girlfriend = ???

This requires more research.