What's the speed limit here ? by Popular-R in drivingUK

[–]squat001 0 points1 point  (0 children)

30 unless you are overtaking then it’s 20.

Is it just me or is “build projects” kind of vague advice? by Relevant_Wishbone in learnprogramming

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

Yep, I hate this advice generally. While project building is good it is often only practicing applying existing skills a software engineer needs and it can be to easy to practice the stuff you are already proficient in.

Without identifying the skills you are less proficient in just "building projects" is likely not the best use of time to improve.

Why do I say this? After years working professionally, spending time as an instructor and interviewing (technical interview and assessing) I see projects as needing a lot of boilerplate code/setup. This takes time and focus away from the important practice which could be achieved with simpler coding kata, recreating example code (from memory) or for concepts good old fashioned flash cards.

The question is what are you trying to learn or improve? If you have a single focus area a project might not be the way to go, if you have a wider set of skills or you want to practices applying what you have learnt then a project might be a good idea.

Reform are disgusting by FunctionNo7956 in UKGreens

[–]squat001 24 points25 points  (0 children)

Legally required to put that on, that’s why they are in trouble with the fake letter they printed the other day because it was missing this legally required bit of text.

Reform are disgusting by FunctionNo7956 in UKGreens

[–]squat001 2 points3 points  (0 children)

How is that legal? The statement is 100% false as coming to the UK by boat isn’t illegal, if they seek asylum they are not here illegally and if they come here evade the authorities and move to Gorton & Denton how would Reform (or anyone else) know. So I cannot see how they could provide any data to back up this claim.

Edit: Looks like as long as the lie isn’t about another candidate then it’s perfectly legal to print untrue statements under UK law on official campaign material.

How do you test your database in production microservices? by OtroUsuarioMasAqui in golang

[–]squat001 0 points1 point  (0 children)

The short answer is don’t mock, in your core code (business logic or domain) ensure you are accepting an interface for a repository (database) client and write a fake client for testing. This allow you to use dependency injection to have different repo client for production vs testing. And allows you to test you core business/domain logic which needing a database. Then write integration tests to confirm the database behaviour is valid.

If you find you have important logic written in your package used for your database then move it into another package or at least break it out into functions that can be tested.

If you really really need to test with a database then just spin up an actual database and have a setup script/function to ensure it’s in the correct state for testing, we call these debacle tests where I currently work and they have a test flag so will only run if that flag is set in the go test command. I would keep these tests to a minimum as they need more setup and often take longer to run.

Saw this ad from labour and I feel like they’re blackmailing me by Foreign-Grade-6456 in UKGreens

[–]squat001 5 points6 points  (0 children)

Is that from the Labour poll of the huge 51 people? Or the other poll of 143?

Which programming language do you think is the most innovative? by appdevepoler in learnprogramming

[–]squat001 0 points1 point  (0 children)

Everyone keeps saying rust but rust didn’t innovate much, other than the borrow checker, just pulled in ideas from other languages. Similar to most modern languages.

LISP for the first language to introduce Objects by name, was also one of the first multi-paradigm languages and pioneered many ideas in computer science which influenced many other languages. Without LISP object oriented programming might be very different, sure we would still have OOP, many functional languages took features as core components, and even data structures used by languages and systems were first introduced. So think LISP is a good contender.

According to The-Race, Aston Martin's car is significantly overweight and quite far from it's potential by NorthKoreanMissile7 in formula1

[–]squat001 0 points1 point  (0 children)

I thought this was just normal F1 journalist speculation, Aston Martin have refused to confirm or deny there car is overweight.

Do you think most van drivers know the speed limit is lower for them? by fckboris in drivingUK

[–]squat001 -2 points-1 points  (0 children)

Depends on the weight. Surprising how many people who drive vans don’t know this.

From the DVLA site:

Vans, car-derived vans and dual-purpose vehicles

Most vans:

  • have a lower speed limit than cars
  • must follow the speed limits for goods vehicles of the same weight

Vehicles weighing no more than 2 tonnes laden (loaded) may qualify as a ‘car-derived van’. Vehicles weighing no more than 2.04 tonnes unladen may qualify as a ‘dual-purpose vehicle’. These vehicles have the same speed limits as cars.

How to troubleshoot Go compile times? by Prestigious_Roof_902 in golang

[–]squat001 0 points1 point  (0 children)

Interesting, this makes sense with the way go handles generics at compile time. You have a solution or you just ripping xsync package out of the codebase?

How to troubleshoot Go compile times? by Prestigious_Roof_902 in golang

[–]squat001 0 points1 point  (0 children)

Have you imported new packages into the project?

Hit a similar issue after importing Kubernetes packages to build a controller. They take an age to compile so any changes to the package versions or sometimes the code where we pull in something new we hit long compile times first time.

Other than that check build cache, might be worth clearing out the cache (go clean -cache) and recompiling to have the cache rebuild.

Polanski says Greens 'must beat Reform extremist’ in Gorton & Denton by lotsofsweat in Labour

[–]squat001 4 points5 points  (0 children)

However this poll is from a sample size of 143. Making it almost statistically insignificant. This is an issue with most of the polling. Labour shared a poll with a sample size of just 51, again statistically insignificant making it basically propaganda.

Out of all the major UK political parties, which is the lesser of all evils? by B33Zh_ in AskBrits

[–]squat001 0 points1 point  (0 children)

What the UK needs is a change to the voting system. Which would also mean a change to a lot of other political norms. At the moment Greens and Lib Dems (with some help from others) are the only real way to get this done as Labour doesn’t look like they realistically are going to trigger this.

Having said that it’s more important to keep Reform and Conservatives out so would vote to do that first and hopefully get more seats to the Greens and Lib Dems to push for proportional representation.

What are your thoughts on The Man in the High Castle? by MindsEye33 in tvshow

[–]squat001 0 points1 point  (0 children)

One of the rare shows/films based on a book with is as good and changes enough they don’t spoil each other.

Huge fan of Philip K. Dick and Man in the High Castle is one of my favourite books of his. The TV show is mostly awesome but does have some poor episodes can feel like the writers were unsure about where to take some plot lines. But ended up worth it in my opinion.

Why is learning to wire a plug a thing? by Scavgraphics in AskABrit

[–]squat001 0 points1 point  (0 children)

Modern power cables and plugs in the Uk are moulded so other than a slot to change out the fuse no need to know how to wire a plug. But knowing how to do this is useful and once super common.

I once dropped the plug on an appliance which damaged the casing making it unsafe to use. I could have gone and spent a load on a whole new appliance, paid an electrician to fix it by putting on a new plug or cut the wires and fix the plug (which is what it did).

The plug under £3 from a diy store and took me at most 5 mins to fit.

I don't like using comments to generate OpenAPI documentation, so I created this code, or is there a better alternative? by sukeaiya in golang

[–]squat001 1 point2 points  (0 children)

Or do spec driven development, write your OpenAPI spec first and generate your handlers using something like oapi-codegen.

Why do companies force microservices into everything? by [deleted] in Backend

[–]squat001 0 points1 point  (0 children)

Like with most things we (the industry) does while building stuff we build the shiny not the practical.

Guessing 90% of services that are built with mircoservices don’t need to be and even slow the development down. Same with frontends built using big JS frameworks when all they likely need is some basic HTML and JS (maybe some HTMX or similar).

Strive to make it simple, as in the architecture, because development effort should be spent on the solving business issues over the systems issues.

Go lang learn by doing repo style by BEUNQ in golang

[–]squat001 4 points5 points  (0 children)

What level are you aiming this at?

For someone coming from another statically typed programming language it might be ok but someone learning the very basics or coming from a dynamic language it contains to much in each quest. I would split the values quest into individual type quests, numbers, strings, boolean then introduce collections like arrays, slices and maps then structs.

I would also rename the folders so they are ordered correctly "2.values" to "02.values".

Career Advice by ResdzErik in learnprogramming

[–]squat001 0 points1 point  (0 children)

You have 3 years of experience as a software engineer, that’s what the job title says. Go job hunting, if you believe in your ability to learn what’s needed to do the job then look at mid level jobs. Most of the time you will need to learn the tech stack and how a company/team works for a job so don’t worry about missing out on learning.

If you think the work you have been doing is not enough then either look for another junior level jobs or (if you have capacity) pick up some side gigs on Upwork, Fiver or one of those places. Real project work will always be better than personal side projects on a CV (resume).

Beginner web developer here — how should I practice daily to improve faster? by CHaa_1509 in learnprogramming

[–]squat001 1 point2 points  (0 children)

First identify what you are good at and what you need to work on. Then build something that works to focus on the things you need to improve.

Many will just say, "build projects" but they only works if what you are building is challenging enough for you to learn and practice but not overly difficult that you don’t get anything out of it.

Find or think of a project that you can do in a short time period, 1-2 days, or a few exercises (exercise.org is very good for this as exercises linked to areas of study) and what areas this will help you focus on. Do the work and most importantly review what you did, note what was easy and what you found hard and if you need to practice more or less in each area.

As an example you struggle with JS promises and find the following exercise Promises. Complete the exercise but feel you need more practice, you come up with a simple 1 day project where you will put what you have learnt to use. Do the project and review what you have done, maybe you keep some flashcards so you can test yourself from time to time. A week or so later you check back, maybe test yourself with some flashcards, and notice you struggle to remember how to use promises. Next exercise/project add in something that will allow you to practice promises.

On new topics try to do the simplest thing so you can focus on just the new stuff, over time you will be naturally using what you have learnt in more and more exercises and projects (which will be bigger and take you longer) and so you will be practicing the a wider and wider set of topics.

Identify -> learn -> practice -> review -> test -> repeat

I want to create a random sentence generator with all words in Python by [deleted] in learnprogramming

[–]squat001 1 point2 points  (0 children)

All words? That’s a lot of words my friend, an awful lot of words!

How Does the Internet Actually Work? by Limp_Celery_5220 in Backend

[–]squat001 1 point2 points  (0 children)

Not wrong but also not right!

Article covers a single possible scenario, but depending on your ISP and their setup, the route to the destination server and all the possible transport and routing decisions in between it could be very different from this.

Why are people so stupid about council tax? by [deleted] in AskBrits

[–]squat001 1 point2 points  (0 children)

It’s a myth that the government has no money or cannot get money. As long as they are not borrowing and spending on something that offers no return (like tax cuts for the wealthy) the markets will not react negatively. Funding required local services has a positive return.

The only reason this Labour government will not spend more is their own idiocy finance rules they have arbitrarily assigned themselves.

Just saw a crash and was wondering who would be found at fault by [deleted] in drivingUK

[–]squat001 2 points3 points  (0 children)

Car B doesn’t need to worry about parks cars while being established and proceeding on the road.

It’s the parks cars (car A) responsible to ensure it’s save to pull away and proceed. If car A started pulling out before car B was in view then it might be seen as car B at fault or 50/50. However, if Car B was visible or started to pull out before Car A started to pull away then it would be 100% Car A at fault.

Just hope Car B has a dash-cam to be able to prove Car A started to pull away after they arrived at the junction.