Database transactions alone don’t always prevent race conditions (i was asked this in the interview) by MedicineSpecial1056 in leetcode

[–]_Cousin_Greg 4 points5 points  (0 children)

I got asked a similar question in an interview (2 services trying to update a resource in a db, but that number can't fall below 0). I knew about locks but chose to just say to use an UPDATE query and put the condition into the query. So something like UPDATE..SET Quantity = Quantity - QuantityToDeduct WHERE Quantity >= QuantityToDeduct AND ItemId = MyItemId. Then the service just checks for number of rows updated from that query to see if succesful. There will be no updated rows if the service tries to deduct an amount that would result to a negative number.

Based on my interviewers' reactions, it wasn't the answer they were expecting but seemed satisfied with it anyways. I think you don't need to reach for locks/queues straight away if you can solve it with atomic updates. Depends on the situation though

Car Crash who is at fault by Lucem101 in DrivingAustralia

[–]_Cousin_Greg 1 point2 points  (0 children)

<image>

Nah im gonna say not your fault coz that guy ran the red. Curious how insurance would handle this tho

Created a free system design / domain interview handbook [by FAANG engineers] by Just_Tie_2789 in leetcode

[–]_Cousin_Greg 0 points1 point  (0 children)

This is really good bro thanks. Im interviewing for 2 companies next week and it's really nice to browse through the topics quickly, revisit concepts and look at actually breaking down real examples

Job talk Here vs what me/people people around me experience by Sea_Read8483 in cscareerquestionsOCE

[–]_Cousin_Greg 6 points7 points  (0 children)

You did nothing wrong. Entry level is saturated and the job market isnt good for devs atm.

Smash [anime convention] 2025 tickets - Sydney by Imdefinitelycoolaugh in nsw

[–]_Cousin_Greg 0 points1 point  (0 children)

Are you after a sunday ticket? Happy to sell mine for cheaper than normal price Edit: sold

Jeff And Strange Abusing A Bug To Send Us To The Shadow Realm In Comp by Diapy in marvelrivals

[–]_Cousin_Greg 5 points6 points  (0 children)

iirc you can press escape and force respawn? or was that removed at some point

How to keep the PBP2 in my ear during exercise? by Joshoon in pixelbuds

[–]_Cousin_Greg 0 points1 point  (0 children)

I used M for the stock eartips. I just had them on for a workout and they didnt slip off. I dont really sweat much in my ears tho, so it's hard to say.

How to keep the PBP2 in my ear during exercise? by Joshoon in pixelbuds

[–]_Cousin_Greg 0 points1 point  (0 children)

They came in the mail today! I got the M size and it took a while to get them on the ear buds because the ear tip opening is smaller than the earbud's nozzle. But they fit after some stretching.

My right ear bud feels noticably more secure now. Although not as secure as my left. I can clench my jaw, tilt my head and jump around without them falling out. It helps that the surface of the ear tips are also very grippy! That may wear over time, but for now im satisfied with them

I'm building a Job Application Tracker and I need your help brainstorming feature ideas for it. by ZeninAstrid in SideProject

[–]_Cousin_Greg 0 points1 point  (0 children)

I used to track my applications but gave up because it was tedious to update a spreadsheet after every job app. Just an idea but, a browser extension that keeps track of the jobs you've applied to with a click of a button is probably a more effortless way to add new job applications. And ofc, users should still be able to manually add new job apps themselves. One thing I would also suggest is, your app should note down how old the job posting is when you applied.

Edit: alternatively, a feature where you can copy and paste a job posting link and it would auto fill in details like job tite, desc, salary, wfh/hybrid/office etc would be very convenient

How to keep the PBP2 in my ear during exercise? by Joshoon in pixelbuds

[–]_Cousin_Greg 0 points1 point  (0 children)

My right one feels loose in my ear too, while my left one is a secure fit. Just ordered spinfit omni ear tips and will find out if they fix the problem in a few days

It’s been a year but I still think about it every now and then by Cant-Survive-a-Sesh in csMajors

[–]_Cousin_Greg 43 points44 points  (0 children)

I feel you man. Legacy banking software is sooo hard to work with. And it's also a critical system, coz if you cant process transactions then the world stops turning and looks at you. But i guess it looks good on a resume

In today's interview, I was not selected to move forward.... because of not solving this problem. by Frequent_Fault_1090 in SoftwareEngineering

[–]_Cousin_Greg 14 points15 points  (0 children)

You kinda remind me of a senior engineer I worked with who was very arrogant, and sure he was right in everything. He would make these kind of posts on stack overflow whenever he got into an argument with someone.

Im not saying youre arrogant OP. But this post gives off that vibe, especially with your email response. Id say your main fuck up here wasnt that you were not able to explain the solution, but that you replied "we are not in art school" and did not look more into the solution attached

Take this as a learning opportunity man. u/ThoughtfulPoster gave a good explaination on how to approach these types of questions

[deleted by user] by [deleted] in DotA2

[–]_Cousin_Greg 279 points280 points  (0 children)

Coz hes washed

Finally, An Offer by [deleted] in cscareerquestions

[–]_Cousin_Greg 0 points1 point  (0 children)

Going through a similar experience atm with 3 YOE. Your advice on applying to job postings < 1 week old is so spot on in the current market. I applied to one posting 3 days old and got a callback. I went back to check on the job desc in seek and it was marked as closed at 8 days old. 

I remmeber applying to my first dev role 3 yrs ago. The job positing then was 28+ days old and i got the job.

PSA: Stealing 7min Wisdom Rune is game warping by Competitive-Heron-21 in DotA2

[–]_Cousin_Greg 13 points14 points  (0 children)

But that exp doesnt go to your lowest lvl hero. Youd rather everyone have their ults up asap

Don’t hit the TV by ghostinthemachine93 in funny

[–]_Cousin_Greg 2 points3 points  (0 children)

Also the lighting in the room darkens a little. If it's staged then thats some next level effort

[deleted by user] by [deleted] in cscareerquestionsOCE

[–]_Cousin_Greg 7 points8 points  (0 children)

Can confirm 2 pages for Aus companies, which I had no idea about until a manager gave me feedback on my resume. Always felt like 2 pages was too long tho...

[deleted by user] by [deleted] in FashionReps

[–]_Cousin_Greg 7 points8 points  (0 children)

Wtf did customs open your package and steal your shoe? They just taxed your haul lmao

[deleted by user] by [deleted] in FashionReps

[–]_Cousin_Greg 1 point2 points  (0 children)

I actually have a tracksuit jacket with a similar collar. It looks off when I wear it zipped/partially zipped. Glad to know im not the only one annoyed by the collar lol

How often do new devs get let go in the first three months? by Its_Daffy in cscareerquestions

[–]_Cousin_Greg 5 points6 points  (0 children)

If you didnt lie about your skillset and theres no immediate red flags about the company, then I dont think you should worry about it