thread for computer programming ppl

That’s a new one to me!

I came across something similar in JS with eslint. In this case, it’s automated code standardisation / cleaning tool where that value is configurable. For some reason, someone set it to 10 which is frustratingly low at times. Looks like it’s built in with C#.

1 Like

26 if…elses in one method?! Too right they should sort it out :wink:


Wow. New one on me too.

Slightly related, and I may have posted the picture of this book before, but I was bored and flicking through one of the ‘classics’ that other day, Refactoring by Fowler.

It really is a good book, split into smallish lessons that can help readability and development generally. I always recommend it to my team, and one of them actually listened to me and bought it the other day.


There are actually only two for loops but they each have some huge if statements and use of Lambda stuff.

1 Like

I’m so glad the focus of static analysis seems to have shifted from “we can work out if your code is bad” to “we can work out if your code is correct.” All code is bad, idgaf what the C# compiler thinks about it, but I’m happy I can encode a lot of my logic in a compile-time checked type system.

The word from the Devs is they’re using VS2019 and I am using 2015 so I need to update and see what happens.

Not sure if that means the setting was deprecated in 2019 or the compiler is much more efficient

git commit -m “WIP - …”

That’s still not a solution to the point of not having branches

Oh, only on a branch of course! Never commit WIP to main, but should still mark any non-compiling, test failing commits as such regardless.


Sure. My issue was just with how I see the point of branches really. Obviously mostly dependent on software complexity and number of devs

1 Like

Loads and loads of free courses on udemy for the next 24 hours. They should stay in your account afterwards

Trying to think who has been doing intro courses ITT - @epimer @harru @TVDenimChap spring to mind - but there’s courses at all sorts of ranges, so should be of interest to everyone. can’t really complain for free, innit

Good timing for me as I need to pick up lots of java script. Actually none of those are free. Curses. Actually there is. Hooray.


Thanks, grabbed some Python machine learning stuff. Going to automate myself out of a job eventually.

1 Like

Reminds me I never finished that Angular course after getting annoyed that it took a week to do what would have taken me an hour in web forms

What a fucking stunning piece of code of mine I’ve just discovered.

Only the first option was specified originally, with the other two given placeholder values. In time they got filled in and I didn’t realise they were the same!



Now THAT’S what I call cyclomatic complexity!


someone quickly knockup a photoshop of that on a NOW! CD cover

Anyone ever dealt with Facebook Pixel and revoking/granting consent? I’ve got it set to revoke until the user clicks the Accept button on a popup. Consent is then granted, and a value is saved in Local Storage which is then checked for next time a page on the site is visited. If its there then the Pixel is granted consent otherwise the popup appears again.

I can see nothing wrong at all with the way this is set up and I’ve seen it done in the same way in other tutorials. Yet the Facebook Pixel Helper extension doesn’t show a successful page view event when consent is granted through the presence of the cookie in Local Storage. It shows as successful when the popup appears and the Accept is clicked, but not via the cookie route.

I can’t ascertain whether this is just a flaw in the Facebook Pixel Helper, and the page view event has still been sent, or whether it simply isn’t firing. Zero replies.

This isn’t even my code either. But there’s nothing wrong with it. It must just be the Facebook Pixel Helper lying? Fuck off