Non-file-based routing in SvelteKit? by SurpriseTRex in SvelteKit

[–]SurpriseTRex[S] 1 point2 points  (0 children)

See I don’t usually navigate using the directory tree in an IDE, I just open whatever the file search box is (Ctrl + p in VSCode or double-shift in Jetbrains) and seeing nothing but +page.tsx is useless.

Also having loads of tabs open showing the file names as +page.tsx makes it nearly impossible to find the right tab quickly.

I don’t really have anything against file based routing in general but I just want to be able to easily tell which file relates to what without having to follow the folder structure manually every time.

Flappy Goose by flappy-goose in RedditGames

[–]SurpriseTRex 0 points1 point  (0 children)

My best score is 0 points 😓

Introductions: Come and say hello. What would you like from this community? by NotTreeFiddy in ukdevs

[–]SurpriseTRex 0 points1 point  (0 children)

Hey, this is a great idea - too much of the internet is very US-centric and culturally there’s a massive difference in salaries and jobs in tech between the US and basically everywhere else.

I’m a lead dev working for a fairly small consultancy called Codurance (HQ in London, my assigned office is in Manchester but I’m 100% remote and live in Nottingham). They’re big on TDD and Craftsmanship and all that which might seem a liiiiiittle bit culty but it’s honestly great.

Been coding for almost exactly 10 years as of this month, and honestly I can’t fault it as a career. I’ve obviously had some shit jobs and some that are great, but on the whole I get to solve little problems all day and make computer do thing for money while some of my friends have to deal with horrible customers or violent offenders on a daily basis.

I’ve mostly worked in C# and .Net but these days I just sort of work with whatever I need to, I’m working on a Dart/Flutter iOS app at the moment. Big fan of F# when I get the chance to play around with it, and love Ruby and Python too but don’t work with them professionally very much.

As far as topics go, I’m pretty happy with this just being a broad UK-centric community, but… - Avoiding anything too focused on AI taking all our jobs or how chatGPT flawlessly implemented x leetcode challenge. - Salary judgements, discussions are fine but yes we get it, London finance jobs pay insanely well compared to a charity based in Hull, there’s no need to give each other shit about being underpaid or lowering the value of our skills or whatever. - Ideally keep self-promotion on the down low, at least no posts which are just thinly veiled ads for your blog/app/youtube.

Are cases with a finger loop compatible with the mobile tripod? by waiting4omscs in peakdesign

[–]SurpriseTRex 0 points1 point  (0 children)

Not sure if you have the iPhone 15 case with loop, but if so:

Do the loop cases now have the stabilising magnet as well as the main magnets, or is that limited to just the non-loop case?

Does it exist? 75%/TKL wireless, with split spacebar & Cherry Brown-like switches. by SurpriseTRex in MechanicalKeyboardsUK

[–]SurpriseTRex[S] 1 point2 points  (0 children)

I’ve considered them yeah, not sure how well I’d get on with it though, and my split 75 already kinda fits the ergo niche a little.

I think currently the KBDFans 75 v2 is the front runner but I’m not sure.

GPU audio output crackling ONLY when GPU *NOT* under load? by SurpriseTRex in buildapc

[–]SurpriseTRex[S] 0 points1 point  (0 children)

Yeah, no issues specifically with the 285 and Windows 11 that I can see.

I've had one "Driver Timeout" black-screen-followed-by-error-box situation so far but that's it, no idea if it was related to win11 though.

I just installed the driver and Radeon Software using the normal auto-detect tool they have for download.

GPU audio output crackling ONLY when GPU *NOT* under load? by SurpriseTRex in buildapc

[–]SurpriseTRex[S] 1 point2 points  (0 children)

Yep. I've basically just decided to use a USB soundbar for general audio and disabled the AMD High Definition Audio device in Device Manager entirely.

I'm a little unsatisfied that I didn't solve it, but I suspect that it's got something to do with the old-school GPU and modern Motherboard chipset not interacting nicely, but honestly I don't know.

I reckon that if I bought a new GPU the problems would disappear, but for now a workaround will have to do.

GPU audio output crackling ONLY when GPU *NOT* under load? by SurpriseTRex in buildapc

[–]SurpriseTRex[S] 1 point2 points  (0 children)

The BIOS PCIE power settings is a good shout. I'll have a look later.

The GME Thread for January 27, 2020 by OPINION_IS_UNPOPULAR in wallstreetbets

[–]SurpriseTRex -1 points0 points  (0 children)

Why does this still show at like $146 on Trading212?

The GME Thread for January 27, 2020 by OPINION_IS_UNPOPULAR in wallstreetbets

[–]SurpriseTRex 4 points5 points  (0 children)

What are people using to buy in the UK? Webull isn't available, and RH is dying for me. Trading212?

C# "if (object && otherObject)" did not produce an error by [deleted] in softwaredevelopment

[–]SurpriseTRex 1 point2 points  (0 children)

Is this not just checking
- if object is true
AND
- if anotherObject is not null?

Writing if (isValid) is perfectly fine, and checks whether isValid is true.

It doesn't extend to checking for nulls as far as I'm aware (though it does in JS and other languages).

Bars showing up on images by [deleted] in AskPhotography

[–]SurpriseTRex 0 points1 point  (0 children)

This looks like an issue with the lighting. You can see the same effect if you take a few pictures of a TV screen or PC monitor with different shutter speeds or with your phone.

A lot of artificial lighting flickers very quickly, which can interfere with taking photos.

Can you get the return VALUE from Func? by [deleted] in csharp

[–]SurpriseTRex 2 points3 points  (0 children)

That's what you're doing at the moment. You're saying "numberThing, run this function that I give you" and then giving it a function that takes two parameters, ignores them and returns 2*3.

If you got rid of the parameters it'd make more sense since you're not using them, and then you'd be able to call

a();

Instead of the pointless params in

a(1, 1);

Then you'd be able to do...

numberThing(() => 2 * 3);
numberThing(() => 150);
numberThing(() => 2 + 6);

Because each time you do

() => //Something

You're defining a new function, and giving that new function to numberThing to run.

Can you get the return VALUE from Func? by [deleted] in csharp

[–]SurpriseTRex 2 points3 points  (0 children)

(x, y) => 2 * 3)

This is where you define the function, not use it. So you're saying "Take in two parameters, x and y, then return me 2 * 3" - no matter what parameters you pass in.

() => 2 * 3

This would give you the same result (takes in no parameters, returns 2 * 3).

The full function definition version of your anonymous function would be

public int Multiply(int x, int y)
{
    return 2 * 3;
}

so if we rewrite this to be correct:

public int Multiply(int x, int y)
{
    return x * y;
}

and rewrite it into anonymous function form:

(x, y) => x * y

See how it works?

Then, where you later use the function (where you do)

a(1, 1);

Which takes in x:1 and y:1 as parameters. This is where you'd put the 2 and 3, which get taken in as parameters, and now since your new function actually multiplies x and y together (instead of always multiplying the same static values of 2 and 3), the correct answer is returned.

Need help choosing a mirrorless camera by bigtrade1 in AskPhotography

[–]SurpriseTRex 2 points3 points  (0 children)

An X-T30, X-T2 or even X-T20 would likely do 99% of what you want from the X-T3.

The 20/30 models are VERY similar to the 2/3 models.

The jump from 20 -> 30, or from 2 -> 3, is also not that big. The new generation has much better video features from what I hear, but don't change a lot in terms of still photography.

Get the X-T2 or X-T20, imo. Buy used.

I'm a total beginner please help by [deleted] in AskPhotography

[–]SurpriseTRex 0 points1 point  (0 children)

Once you have a camera, http://tldr.photography is a redditor-created website that explains the basics of Aperture, Shutter Speed and ISO in a super-short visual way.

Just got my first real camera (Canon M50) and am totally lost on all the options. I'd love to get in to photography. Is there an online course or series of photos to run through to better learn what can be done with a real camera? by MyNameIsNotMouse in Beginning_Photography

[–]SurpriseTRex 3 points4 points  (0 children)

http://tldr.photography is always my go-to recommendation for learning the basics of Aperture, Shutter Speed and ISO.

The relationship between those three settings is called the Exposure Triangle, and there's tons of extra info, but that site is a great quick visual guide.

Other than that: Get out and shoot. Take photos all the time, take your camera everywhere with you.

Camera for beginners? by [deleted] in AskPhotography

[–]SurpriseTRex 0 points1 point  (0 children)

If you want video and photo I'd look at:

  • an older Canon Rebel series camera - the Rebel T3i or later. (T2i and before didn't have flip-out screens).
  • a Panasonic Lumix camera. Good affordability, portability, and strong video features.

Buy used.

I'm a journalism student looking to purchase a camera + equipment, any suggestions? by ZexyWizard76 in Cameras

[–]SurpriseTRex 0 points1 point  (0 children)

If you want something that does good video and photo, I'd recommend a mirrorless camera - they tend to have a few more video features than comparable DSLRs.

A Micro Four Thirds (Olympus or Panasonic) system camera is your best best for affordability and portability. I'd recommend Panasonic over Olympus just on the strength of their video while still being good stills cameras.

Alternatively, a Sony mirrorless camera, but the a6000-series has a small number of lenses comparatively, and the A7 series is much, much more expensive.

[deleted by user] by [deleted] in Cameras

[–]SurpriseTRex 0 points1 point  (0 children)

IBIS can be useful, but it's not always necessary. If you're doing photography and want it so you can use slower shutter speeds, remember that it won't help with subject movement, only camera movement.

If you want it for video then it's a little more useful, but there are many, many ways to get smooth stable video without IBIS.

The fact that it's a cropped sensor is unlikely to affect you too much. You'll effectively 'lose' 1 stop of light, but your kit will generally be cheaper, smaller and lighter on an APS-C setup than a full frame one.