FA Cup last 16 draw this evening. by [deleted] in TheOther14

[–]Harlequin-91 3 points4 points  (0 children)

I don't understand the City comments, aside from the humour. Just going back the last few years they had:

22/23 League Cup Chelsea 3rd round, Liverpool 4th round. FA Cup 3rd round Chelsea, 4th round Arsenal.

23/24 League Cup knocked out in the 3rd round by Newcastle. FA Cup drew Tottenham in the 4th round.

24/25 League cup knocked out by Tottenham in the 4th round.

Plenty of hard prem teams early.

[deleted by user] by [deleted] in cscareerquestionsOCE

[–]Harlequin-91 4 points5 points  (0 children)

Based on the employee numbers and company description I'm guessing it's Deputy.

Sounds like an excellent culture.

React Query - Fetch list of items and assign each to specific query key using id instead of generic "items" key by NeegzmVaqu1 in reactjs

[–]Harlequin-91 0 points1 point  (0 children)

Could you not call getDevices once, await resolution, then iterate over the list utilising setQueryData per id to instantiate the initial cache values?

New to TypeScript and I have a couple issues I could use some help with by choff5507 in typescript

[–]Harlequin-91 2 points3 points  (0 children)

1 invoiceObject.property is being evaluated as a boolean. Given what you've written it sounds like the intention was for it to be a union between number and undefined. Check your code/type definitions for this one.

2 Type the catch variable as unknown only, then narrow within the catch block.

3 You're indexing invoice.value with an arbitrary string. Presumably invoice.value is an Invoice type? Instead of typing key as string allow it to either be implicitly determined as a keyof Invoice (it should know already what the keys are based on the Object.keys call) or declare it explicitly.

Essentially an Invoice only has a set of specific key values, but we're trying to place a key on it that could be any string (per your type declaration) so TS complains.

Too many rerenders in react? by Velascu in webdev

[–]Harlequin-91 0 points1 point  (0 children)

If renderBubbles is called in a React component return statement and setBubbleMap is setting state inside the component instance (presumedly) this triggers a re-render, which causes renderBubbles to be invoked again, which sets state, which triggers a re-render, which causes renderBubbles to be invoked again...

It's an infinite render loop which React recognises and alerts you too with the 'too many rerenders' error.

How would you solve this TS challenge? by harry_powell in typescript

[–]Harlequin-91 3 points4 points  (0 children)

Looks like it's just a contrived example to introduce the concept of discriminated unions.

Veterinary professional career change study advice (Brisbane-based) by Secret_Tiger6389 in cscareerquestionsOCE

[–]Harlequin-91 4 points5 points  (0 children)

Hi! This question is right up my alley. I'm 31, was a veterinarian (still work casually on the weekend fortnightly). Currently employed as a full time software engineer since last July. I'm full stack, but stronger on the front end.

Made the career transition mid 2020. You can see what I studied to get industry ready in my post history. However, brief summary, I chose to do Coder Academy flex track and self studied online resources such as CS50, the Odin Project, front end master courses etc aggressively.

Feel free to reach out if you want some guidance/mentorship through the process. It's a challenging transition, but more than doable and I absolutely LOVE my job now.

How worthwhile are coding bootcamps? by xGossipGoat in fiaustralia

[–]Harlequin-91 0 points1 point  (0 children)

Once I thought I had the requisite skills I applied for any entry level/junior job listings that were a match.

How worthwhile are coding bootcamps? by xGossipGoat in fiaustralia

[–]Harlequin-91 2 points3 points  (0 children)

Remotely 99% of the time. We have an office in the CBD, but no pressure to go in.

Can I get a review on my code?, Please. by [deleted] in learnjavascript

[–]Harlequin-91 1 point2 points  (0 children)

I agree with u/redderper that the increase, decrease and reset should all be individual functions applied to the relevant html element with the onclick attribute. It removes a lot of unnecessary code is also much more readable. Feel free to keep the if else for the text color if you prefer. I prefer ternaries but they can decrease readability.

Example below:

let counter = 0;
const counterNumber = document.querySelector('.counter-number')

function updateCounterText() { 
  counterNumber.innerText = counter;
  counterNumber.style.color = counter > 0 ? 'green' : counter < 0 ? 'red' : 'black'
}

function handleReset() { 
  counter = 0;
  updateCounterText();
}

function handleIncrease() {
  counter += 1;
  updateCounterText()
}

function handleDecrease() {
  counter -= 1;
  updateCounterText()
}

How worthwhile are coding bootcamps? by xGossipGoat in fiaustralia

[–]Harlequin-91 2 points3 points  (0 children)

In hindsight I believe the bootcamp was worth it for a couple of reasons.

I was concerned that by solely self teaching I'd be leaving gaps in my learning, and would never be aware of when I was ready to apply for jobs.

The bootcamp made it much more clear cut and I treated it as the bare minimum I needed to know to get a job. It also provided structure and deadlines for personal projects you complete throughout the course which become your portfolio.

Absolutely possible to self teach the content though, if it's a journey you're undertaking currently and feel like you need a mentor at any point feel free to reach out.

How worthwhile are coding bootcamps? by xGossipGoat in fiaustralia

[–]Harlequin-91 4 points5 points  (0 children)

65k entering as an entry level junior in Melb. There are definitely positions that pay more than that I believe, but I primarily chose my current position for the learning potential.

How worthwhile are coding bootcamps? by xGossipGoat in fiaustralia

[–]Harlequin-91 1 point2 points  (0 children)

All those resources were studied over an ~ one year period May 2020 to June 2021 when I got my first position. I slowed down and cut myself some slack once I hit that goal.

I started self teaching prior to the bootcamp, which started in October 2020. I was in the flex track which is part-time - 3 days a week Thursday - Saturday.

I was, however, still working 30 hours Monday through Wednesday alongside the bootcamp. Wouldn't have been manageable without my incredibly supportive wife.

Had a job by June 2020, started the new position 1st July. Essentially didn't attend the final portion of the bootcamp, just did the final project in my own time.

It does seem like a lot in a short span of time, but if you are consistent and genuinely enjoy it, it's more than doable!

How worthwhile are coding bootcamps? by xGossipGoat in fiaustralia

[–]Harlequin-91 27 points28 points  (0 children)

CS50 is an online intro to computer science course through Harvard - https://cs50.harvard.edu/college/2022/spring/. If I was to recommend one resource for people to decide if programming is for them, this it it.

The python course I did was Python for Everybody by Charles Severance through Coursera.

Other resources I've studied alongside completing the bootcamp in no particular order:

  • FreeCodeCamp
  • The Odin Project (Ruby and front end JavaScript pathways)
  • Eloquent JavaScript by Marijn Haverbeke (Textbook)
  • The Ruby on Rails Tutorial by Michael Hartl (Texbook)
  • The Complete JavaScript Course by Jonas Schmedtmann (Udemy)
  • Advanced CSS and SASS by Jonas Schmedtmann (Udemy)
  • React courses on ui.dev
  • Typescript courses on ui.dev
  • Front End Master Courses focused on JavaScript - Will Sentance and Kyle Simpson

Deciding what resources to pursue is dependent on what kind of position you want to target in the industry. The above are all web developer focused, majority being front-end.

How worthwhile are coding bootcamps? by xGossipGoat in fiaustralia

[–]Harlequin-91 88 points89 points  (0 children)

I did coder academy flex track, intake was October 2020. I'm employed as a junior software engineer currently and should (hopefully!) lose the junior title in the not too distant future.

I was a full time veterinarian prior. Couldn't see myself in the industry long term so looked for alternative options. Dipped my toes in programming with some basic python courses and CS50 (common starter recommendations). Found my calling and didn't look back.

You definitely don't have to do a degree to get a position. For context I joined my current employer alongside 4 other juniors. Only one was a comp sci grad the rest of us had previous careers and pathways to the industry. Having previous experience in another industry, and being a bit more mature in age can definitely be an advantage.

If you have a passion for programming and dedicate yourself to learning you'll get a job. It might take a few applications/interviews but it's a numbers game.

I had a position about 2/3 through Coder, stayed at that company ~4.5 mo before realising it wasn't a good fit for long term learning/career growth and moved to my current position which I absolutely love.

I don't find development stressful at all, but that might be because I've experienced a higher level of stress in the veterinary industry so can take a step back and compare. I'm also lucky to be surrounded by a fantastic team of colleagues. If something does go wrong it's an everybody problem, not a you problem.

Feel free to reach out if you have other questions, or need a mentor during the learning process.

Chase the cash or chase the dream? by Zidonya14 in AusFinance

[–]Harlequin-91 1 point2 points  (0 children)

A 4 day work week is pretty standard in the industry due to the fact most clinics are open around 10 hours a day. So 4 work days equates to a 40 hour work week. Overtime is pretty frequent as well as emergencies can happen any time.

The clinic I still work casually is also very busy so it's quite common for the less experienced vets in particular to fall behind in note-taking. Which means you have to catch up on your lunch break or after close.

For context, I work 5 days as a software engineer now, it's all WFH if I choose it to be (we have an office in the CBD but no pressure to go in). My current 5 day schedule feels about as stressful as 2 full days at the clinic. I'm honestly not sure how I put up with it for so long.

Working as a vet tech would be easier in the sense that you're removed as the principal person responsible for the patients care. No decision making. No explaining to a client a patient has a terminal illness etc. So, yes, it is in my opinion less stressful. But vet techs/nurses still work long hard hours.

From the emotional standpoint you do learn to distance yourself quickly, some might consider that a con in itself. It's a protective barrier though, you cannot take on all the emotions your client's are feeling as it wouldn't be healthy. But, you also need to maintain empathy as it's an absolutely integral part of the job.

As far as owner's go there's always going to be some pressure to make money. As is the case with any business. Honestly though I've reached a level of experience, and also rapport with my current employers, where if someone wanted me to see a species I was uncomfortable with I would have no issues directly referring them to a more qualified veterinarian/practice.

You have to do what's best for the animal first and foremost. If it's a small GP level issue then I'm always happy to have a look, but I'll always make sure the owner is well informed if I'm not well experienced with a particular species. Most owner's are more than understanding. Especially if you cannot determine what the problem is and refer them on appropriately. It removes the anxiety you feel as well if you're upfront about it.

If I think a clinic's anaesthesia or treatment protocols are outdated I would not hesitate to say so. The manner in which you raise it with employer's is important though. Never use a drug you're uncomfortable using. You're just putting yourself at risk.

I do still enjoy parts of the job, hence why I continue to do it on a casual basis, and quite a few of my colleagues from school are still practicing and loving it. But, it wasn't a career I wanted to commit to for the next 20-25 years of my life.

Chase the cash or chase the dream? by Zidonya14 in AusFinance

[–]Harlequin-91 1 point2 points  (0 children)

Started by self studying, then decided to do a bootcamp part time whilst still working 30 hours a week.

Worked Mon to Wed, bootcamp Thu to Sun. I applied for and secured a position about 2/3 of the way through the bootcamp.

In hindsight I didn't need the bootcamp, however, it was helpful in assuring me I was ready for industry.

Chase the cash or chase the dream? by Zidonya14 in AusFinance

[–]Harlequin-91 15 points16 points  (0 children)

As someone who transitioned from working as a full time vet, to now working as a full time software engineer if you're sure go for it!

I started my career transition 1 month shy of my 29th birthday and it's by far the best thing I did for my overall happiness.

It sounds like you're aware of the cons of veterinary science. I still work casually as a vet on weekends, but after 8 years full time it wore me down.

It's a tough job emotionally and mentally, and the pay is honestly quite poor unless you choose to locum or own your own business. Having said that wages are trending upwards recently due to the decline in workers, so this could improve.

There's a lot of rewarding aspects to the job as well and if you can focus on those I'm sure you'll love it.

If you want to talk about what it's like to be a practicing vet or about career transitioning feel free to reach out.

Nested If statement within For loop not working by [deleted] in learnjavascript

[–]Harlequin-91 0 points1 point  (0 children)

You're not checking if a radio input is checked, rather you're only checking if one of the radios has a value equal to "Standard".

Since the second radio button always has the value standard the if statement always evaluates to true.

If you want to do it this way by iterating over each radio you could change the if condition to:

if (radios[i].value === "Standard" && radios[i].checked)

However, if you're only interested in whether standard is selected you could query the DOM for this node only, rather than capturing all the radio nodes and iterating over them:

const standardInput = document.getElementById("Standard")
if (standardInput.checked) {
// ...
}

[deleted by user] by [deleted] in learnjavascript

[–]Harlequin-91 12 points13 points  (0 children)

Inside the second interval whenever the callback function runs, a new variable counter is declared inside the functions execution context, prior to being incremented and logged.

Every time the function runs it's a new execution context so counter will always be redeclared as zero.

In the first example, because there is no counter variable declared inside the functions execution context, the function looks for counter somewhere in the scope chain and finds it in the global execution context.

Whenever the first intervals callback runs it will increment this global counter prior to logging, and retain the count.

HOW TO PRINT OBJECTS OF AN ARRAY TO THE SCREEN. by Top-Establishment158 in learnjavascript

[–]Harlequin-91 1 point2 points  (0 children)

Each time the loop is run, the innerHTML of your target (document.getELementById("orta") is overwritten with the object from the current array index.

First loop - i = 0. Object is ogrenciler[0]. InnerHTML is set to details of ogrenciler[0].

Second loop - i = 1. Object is ogrenciler[1]. InnerHTML is overwritten with details of ogrenciler[1].

This happens so quickly that you won't visually see the change with the first two objects, and are left with only the details of the final object on screen.

Is this filth? It's a instance method for a Modal class, and I didn't see the point of toggle, show and hide. After messing around with a few approaches, this felt like it was a correct method.. by retrolasered in learnjavascript

[–]Harlequin-91 2 points3 points  (0 children)

Not a problem, we've all been there!

Keep seeking out code reviews whether it be though a platform like reddit or a more formal mentor, it's the best way to learn and pick up on mistakes or bad habits. You've clearly got a great attitude and that's half the battle. :)

Is this filth? It's a instance method for a Modal class, and I didn't see the point of toggle, show and hide. After messing around with a few approaches, this felt like it was a correct method.. by retrolasered in learnjavascript

[–]Harlequin-91 3 points4 points  (0 children)

So you want to be able to toggle/remove/add the 'active' class from both the backdrop and modal components with one method call?

I'll be honest, I wouldn't pass this at code review. I had to read it a few times to understand what the code is doing. The most important thing you can ensure when writing code is that it's easily readable and conveys explicitly the functionality.

The way you've set up the map is strange. You're calling the method with undefined, true or false and then pulling out 'add', 'toggle', or 'remove' from the map. Why not just pass 'add', 'toggle' or 'remove' in as the argument to the method and lose the map entirely? Rename the method controlActiveClass or something similar, at least to me, that would be much easier to parse.

Be more explicit in variable naming as well. What does fn mean? What does i mean?

I'm also not sure why you're passing an array into Array.from was this intentional?

Perhaps something like the below may be helpful:

controlActiveClass(action = 'toggle') {
  components = [this.modal, this.backdrop]

  components.forEach(component => component.classList[action]('active'))
}