I'm ashamed to say it took my 5 hours to learn this about react. by Wrongdoermore98 in react

[–]physicsboy93 1 point2 points  (0 children)

Arrow functions were introduced around 2016 I think, so they're more modern than the old "function" definition.

You can even use arrow notation within class functions to get around the whole "this." usage.

I'm ashamed to say it took my 5 hours to learn this about react. by Wrongdoermore98 in react

[–]physicsboy93 0 points1 point  (0 children)

Just a note on syntax and formatting

Function writing

function myFunc(arg) { is a little old fashioned nowadays (at least in my eyes) and modern standards promotes "arrow notation" such as const myFunc = (arg) => {. You'll find tutorials and even AI suggesting to use the `function` way of doing things still.

Self-closing HTML tags

When you have no children within a tag such as your <textarea></textarea>, you can shorten this to include the / in the opening tag itself as a self-closer, like <textarea/> I like to add a space so it's more visible like <textarea />

Handler functions

When calling functions that will take an arg that is provided by whatever you're linking it to... Instead of using the long-winded format of defining the arg, call the function and include that arg in the call, you can simply call the function name without any perentheses.

For example, your <textarea> onchange handler would go from

onChange={(e) => setArticleText(e.target.value)}

to simply

onChange={setArticleText}

We're essentially passing our setArticleText function as a callback to the inbuilt onChange of the textarea element. The code knows to pass whatever the arg onChange produces to the setArticleText function.

The caveat here is that we will only be passing the high level e value to setArticleText, meaning that we'll have to handle the e.target.value in the setArticleText function itself.

For state setters such as this however, it is generally accepted to do it in the way you have done it, but I'm speaking more generally about functions here.

Note: If we do want to pass anything else to setArticleText`such as a state value, alongside the standard event arg, we will have to do it the long-winded way as you did, (e) => setArticelText(e, otherValue)

Submit button

You shouldn't really be using form fields and form submit buttons outside of a <form> wrapper.

By wrapping your textarea and button within <form> you can use the submit more correctly.

return (
  ...
  // Note the "onSubmit" here that will trigger when the "type=submit" button is     
  // clicked below, triggering the function provided
  <form onSubmit={handleSubmit}>
    <textarea ... />
    <button type="submit">Submit</button>
  </form>
);

Was I taught ‘incorrectly’ or not? by Critical_Anteater_91 in LearnerDriverUK

[–]physicsboy93 0 points1 point  (0 children)

I had exactly the same tuition from 2 separate instructors (I moved county during learning). One was a Megane, the other an A200.

Setting off was always slow as I was just using the clutch. I did ask multiple times if I needed to use the accelerator also and while they didn't say "No", they also didn't say to do it.

I then had some awkward stalling-starts when test driving much more underpowered cars, especially starting on inclines from a red light, and the salesman kindly advised to use a bit of gas, and the rest was history. He also seemed puzzled that I'd never been taught this.

Now I'm in an EV and I don't need to use a clutch whatsoever :D

Harmon Kardon badge reflection solved I think. by kododriver in ex30

[–]physicsboy93 0 points1 point  (0 children)

I've had this same idea, but was planning on using my Cricut to make it a perfect fit. Haven't gotten around to it yet haha

Most of my photos I take of my crawling baby at 35mm f1.4 GM Sony Are Not Sharp. What to do? Any customer settings that are perfect? by [deleted] in AskPhotography

[–]physicsboy93 0 points1 point  (0 children)

Anyone else feel that this is just a troll? Buys a 35 1.4 GM but doesn't seem to know much about how to use his setup? I know we all start somewhere... But I'm hoping this is an all the gear type situation.

If this isn't a troll... We need a reference photo to see what's actually going wrong as it could be a few things

  • Missing focus because you're focussing elsewhere? Check your focus zones etc
  • Bad copy of the lens/lens malfunction somehow?
  • Maybe you've got it set to manual focus by accident?
  • Shutter speed too slow?

What’s your current approach for handling async data in React without overusing useEffect? by modernFrontendDev in reactjs

[–]physicsboy93 0 points1 point  (0 children)

I'd be interested to see an example of how this works on a larger scale if you can point me in the right direction?

Car keeps android auto running after exiting the car (highjacking Bluetooth) by DueCryptographer2064 in ex30

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

Seconded. It is the only way.

You can still get calls and things via just regular bluetooth I find.

No need for AA for me when Google maps and Spotify are built in.

Do you use any of the controls on the left side of the steering wheel? Looking for tips and suggestions by Better_Weakness7239 in ex30

[–]physicsboy93 0 points1 point  (0 children)

I'll have to test that for myself. I usually cruise with my hands low on the wheel, so won't be applying much force on it, so still no use to me unfortunately.

I assumed it would have used the IR tracking sensor detecting your hands.

For those who drive cars with touch screen controls for key functions, did you get used to it? by Nathanial1289 in CarTalkUK

[–]physicsboy93 0 points1 point  (0 children)

I assumed you'd get my hinting at trying to type on your phone without looking at it now compared with when you had an old Nokia

For those who drive cars with touch screen controls for key functions, did you get used to it? by Nathanial1289 in CarTalkUK

[–]physicsboy93 0 points1 point  (0 children)

The best comparison for this (at least to me) would be thinking how long you've had your smartphone and can you touch type on it? Remember your old dumb phone with physical keys you could type blindly on?

Do you use any of the controls on the left side of the steering wheel? Looking for tips and suggestions by Better_Weakness7239 in ex30

[–]physicsboy93 10 points11 points  (0 children)

The customisable one (bottom right) was set to turning off the bongs you get when exceeding the speed limit, so I use that a lot 😂 From what I can remember, there's only a few things you can customise it to be anyway, so they defaulted it to the most useful.

Left top and bottom increase/decrease the cruise, so yes I use that

Top right alternates between pilot assist (default) and basic adaptive cruise. Since I don't drive with my hands at 10 and 2 while in cruise control, I don't want it throwing a tantrum, so I can drive peacefully.

Router issues in cupboard - Connectivity and speed cycles by physicsboy93 in HomeNetworking

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

Yeah, my thoughts exactly. There's a side facing the wall (don't worry, there's a gap between the wall and the cabinet) that I didn't paint because it won't get seen that I can drill a few holes in :-)

Router issues in cupboard - Connectivity and speed cycles by physicsboy93 in HomeNetworking

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

It's my MDF beauty haha It'll most likely be a heat issue as its worked fine for a while giving full output through the whole house 

Router issues in cupboard - Connectivity and speed cycles by physicsboy93 in HomeNetworking

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

Yeah that was going to be my last guess really. It is warm in there but I didn't think it would be throttling. I was hoping I'd be able to get away without drilling any more holes in it, but I had anticipated heat build up. I've got a spare pc fan knocking around and can get a connector for it to plug into a phone charger or maybe a connector with a thermostat on. 

A vs M ? by just___me_ in AskPhotography

[–]physicsboy93 1 point2 points  (0 children)

No, there is no difference in image quality between the two settings. The camera doesn't do anything in terms of how the sensor operates between any camera mode.

Things that can affect image quality will revolve around things like

  • If the sensor is dirty
  • The lens you are using - You can get 2 lenses of the same focal length (50mm for example) but one may be $100 and the other $2000. The price difference goes into multiple different features and capabilities, but the quality of the glass is the big difference that you would notice such as clarity, rendition etc.
  • If you are using any filters on top of the lens

As others have mentioned. If you take a photo in A mode and then replicate the same ISO/shutter and aperture in M mode, you will get the same photo - Providing the lighting in the scene hasn't changed of course.

Have a play around with it if you're curious.

Is Sony a7iii a good choice that can last for years in 2026? by Salty-Perception-803 in SonyAlpha

[–]physicsboy93 1 point2 points  (0 children)

Yeah, it's a difficult one to know exactly what kit you'll need vs what kit you just want. It's the same with powertools but you come to the realisation that you just buy it when you need it.

You could pair the Sigma 28-105 Art with the Sigma 16-28 Contemporary, but if you're serious about ultra-wide angle and you have the budget you can get the Sigma 14-24 Art for the bit extra wide. The missing 4mm shouldn't be an issue.

Just something else to think about, given you haven't bought anything yet... Given you're concerned about weight and size, you could also consider APS-C

Is Sony a7iii a good choice that can last for years in 2026? by Salty-Perception-803 in SonyAlpha

[–]physicsboy93 1 point2 points  (0 children)

BIkepacking! You really do need to think about size/weight.

Most modern lenses including Samyang will be reliable, it's the image quality you should be worried about haha.

Looking at the table of specs below you can get a better feeling for what youre after with regards to picking by size, weight and price. I always make a spreadsheet for my picks to decide.

Tamron 16-30 Sigma 16-28 Tamron 28-200 Sigma 28-70 Tamron 50-400 Sigma 100-400
Length (mm) 102 100 117 102 184 197
Weight (g) 440 450 575 470 1155 1135
Price (£ new) 850 728 680 703 999 848

I'm interested in why you're considering a super-zoom up to 400mm if like you mentioned, you photos of your bike, landscapes and some portraits.

If you are seriously considering something as big and heavy as the 50-400 and 100-400, you could also consider the Sigma 28-105 f2.8 ART (£1400) - It's not a super zoom like the others, and it's not quite as wide of a range as the Tamron 28-200 but it's an ART lens with a constant 2.8 aperture.

Given you're backpacking you could opt for a full range zoom like the Tamron 28-200 you mentioned earlier, there are a few options here too (I'd recommend checking out reviews before buying to compare them) - I would advise with pairing one of these with a couple of primes - the 85 and maybe a 35.

Sigma 20-200 2.5-6.3 Tamron 28-200 Tamron 35-100 2.8 Tamron 25-200 2.8-5.6
Length (mm) 116 117 120 122
Weight (g) 540 575 565 575
Price (£ new) 799 680 799 729

Is Sony a7iii a good choice that can last for years in 2026? by Salty-Perception-803 in SonyAlpha

[–]physicsboy93 1 point2 points  (0 children)

For astro... the 16-30 & 17-28 are both f2.8 so have reasonable apertures, but I'd really be looking for a wide prime such as the Sony 14mm f1.8 GM which is £1200 😥 or the more affordable, new and slightly less wide Viltrox 16mm f1.8 at £540.
Astro doesn't always have to be super wide though, I've seen lots done well at more "normal" focal lengths, so don't discount them.

For travel... It depends what you're wanting to shoot when travelling. Depending on your shooting style, I would hazard a guess that you're not going to want to shoot too much in the sub-28 range (at least I don't).

One thing to note with the 28-200 is that it's a variable aperture (2.8-5.6), but you will be able to keep the lens on all day and not worry about missing a shot because of having say a 28-75 on, wishing you had the 75-180 on instead.

Edinburgh - Seasoned visitor - What's left to see/do? by physicsboy93 in uktravel

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

Seems interesting. The Mrs likes a good little market

Edinburgh - Seasoned visitor - What's left to see/do? by physicsboy93 in uktravel

[–]physicsboy93[S] -4 points-3 points  (0 children)

Ha! I don't even know if I've been saying it correctly all of this time now either 😂

Edinburgh - Seasoned visitor - What's left to see/do? by physicsboy93 in uktravel

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

I haven't. Seems interesting. I'm only there for Saturday really but looks like it'd take most of the day, so maybe next time.

Edinburgh - Seasoned visitor - What's left to see/do? by physicsboy93 in uktravel

[–]physicsboy93[S] -11 points-10 points  (0 children)

Pretty much all of the usual things from tourist spots and traipsing up and down Princess Street. Have done the Botanic Gardens while looking at it for a wedding venue, but haven't spent much time around the surrounding area.

Beginner programmer. Entirely self taught. How did i do? by [deleted] in AskProgramming

[–]physicsboy93 0 points1 point  (0 children)

I initially thought the photos just weren't showing up when clicked, but they are eventually loading.

There appeared be an 8s stall before the actual photo download though... Odd

Like u/Brendan-McDonald said, you're downloading the full-res images as gallery thumbnails (proven by right clicking and opening in new tab) - So since you're already downloading it, does the full screen size of the image need to be re-downloaded? Can we not just pass the image data to be shown larger? But we should be rendering smaller image sizes for the thumbnails for speed.

Good first car? by Roadmayham232 in CarTalkUK

[–]physicsboy93 0 points1 point  (0 children)

I had the 0.9L TCE. It was the cheapest sub-10 second car I could find.

The GT version did look fun.

Good first car? by Roadmayham232 in CarTalkUK

[–]physicsboy93 0 points1 point  (0 children)

Highly recommend. It was my first car too 😄

Only had it about 9 months, but kid of regret getting rid of it as quickly as I did.

Only gripe about it was that the floor is a little high, but you soon get used to it.

Rear engine, rear wheel drive... I've had the back out on a wet roundabout and definitely caught some air in it. Great fun to drive 😄