programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

chemical_cutthroat, in Programming: The Horror Game
@chemical_cutthroat@lemmy.world avatar

This is a blessing. You won’t have to look at the spaghetti the last dev left behind.

rimjob_rainer, (edited ) in ifn't

Why not just ifnot? Same count of characters but an o instead of a possibly problematic single quote.

KmlSlmk64,
@KmlSlmk64@lemmy.world avatar

If someone really wanted to add it, probably the best would be to use unless

JoshuaEN,

I really liked having unless in Ruby; a ! can be easy to miss, while unless made it clear without needing to write out != true.

HexAndSquare,

It’s also cool when you do unless(!condition). I particularly like this.

Ookami38,

I think it’s just capitalizing on a trend to add n’t to otherwise noy contractions, to make them into contractions. Contractionn’ts, if you will

xia, in ifn't

“Help’s with readability”? You know what else helps? Not using contractions and introducing an unbalanced single quote.

bdonvr,

If they’d’nt’ve done that, it’d’ve been better. Agreed.

fsr1967,

TIHI

Cwilliams,

they’d’nt’ve

Aside: rip Tom Scott

survivalmachine,

This feels racist against Appalachia. We naturally speak with contractions and are commonly referred to as “unbalanced”.

frezik,

Runs havoc on parsing, too. It’s bad for both humans and robots. I say we ship it.

idunnololz, in Let me just move this project to the "unfinished" folder
@idunnololz@lemmy.world avatar

I’m so glad I made games as a hobby before I got anywhere close to graduating. Killed that dream real fast. It felt like shit having to play your own game so many times the game lost all meaning and it was hard to gauge if it was even fun anymore.

charmed_electron,

I did something similar. I would get about as far as writing the interesting mechanic/game logic and then give up.

Kissaki,

So you succeeded in prototyping?

magic_lobster_party,

I’m also glad I did it as a hobby before I started viewing software development as a job. No code from me if there’s no money on the table.

idunnololz,
@idunnololz@lemmy.world avatar

Oh I actually love programming. I just hated writing games it turned out lmao. I love front-end development especially.

Bransons404,

This. I started with 2d browser games. Turns out that was way too much work for me and landed in front end. I’m totally enjoying it now

dan,
@dan@upvote.au avatar

Interestingly it’s becoming more common to use front end technologies like React in AAA games, for things like in-game menus, and development tools.

oce, (edited )
@oce@jlai.lu avatar

Reminds me of learning to play a piece of music you love. By the time you master it, it seems all the magic has disappeared.

idunnololz,
@idunnololz@lemmy.world avatar

I tried to teach myself piano. I actually enjoyed it when I was learning it, however I was really enjoying the progress I was making and less about the music I was playing. I wonder though if you get really good with music, you can probably learn and play new pieces much more quickly so maybe the magic won’t fade as quickly.

oce,
@oce@jlai.lu avatar

I think you appreciate the piece in a different way, it’s less magic and more knowledge.

Aceticon, (edited )

Game making professionally is more like going all the way to playing a full piano concerto to a paying audience.

Sure you start by learning to play the piano, which is fun, but you also have to compose several pieces that people will like enough that they’ll pay to hear them, organise the concert, learn the specifics of public performance and so on.

The cycles were the pieces you compose are shit because they’re limited by your limited piano playing knowledge so you go back to learning some more only to find out you learned it all wrong hence your current technique will never be good enough so you have to relearn a lot of what you thought you already knew, is not fun and the having to learn everything else needed to organise the concert because you have to make the whole thing generate $$$ even though all that you really wanted was to play the piano, is also not fun.

For somebody working in a large game company, it’s the difference between a hobby and a job, whilst for somebody doing indie game development it’s the difference between a hobby and a business.

MonkderZweite,

Is that the same effect like playing a piece you love over and over and suddenly you can’t hear it anymore?

oce, (edited )
@oce@jlai.lu avatar

I think it’s even stronger, because sometimes you’ll repeat the same 10 seconds a thousand time to master it until you feel like jumping out of the window.

anzo, in Release notes of an open source app. Someone is pretty mad at Canonical for Snap

This post title is misleading. The developer was working with Snap until Canonical didn’t allowed it anymore. He’s pissed with the policy enforcement which is strictly speaking commercial and as bad as Apple’s afaik…

suy,

Sorry, could you clarify what you mean? I don’t see the difference. Isn’t the author complaining about Canonical for the policy enforcement?

anzo,

Canonical has been taking bad decisions for quite some time now, and this developer was trying to reach Ubuntu users even while probably knowing these. Which makes sense, of course. The point being that this dev’s disappointment seems quite specific in these notes (against Snap), and imho he might work again towards shipping their app through Snap if he was allowed to. My comment compares Canonical to Apple, to give some context of where Canonical is at so many other idiosyncrasies (for example, I also heard other bad stuff about their H.R., in particular a way too lengthy hiring process.)

cynber, (edited ) in Me and my new GitHub repository
@cynber@lemmy.ca avatar

I was chatting with a friend, and she mentioned how she tries to at least set up a README, which includes her vision for the project and her plan for the implementation, design, and goals.

Best case scenario is that the planning helps her complete the project herself. Worst case scenario, someone else can pick up where she left off and use her considerations for the project.

I’m thinking of doing that for future projects too

hypnotic_nerd,
@hypnotic_nerd@programming.dev avatar

ReadMe is always underestimated while project is building, but it can become a cornerstone if it’s setup from very beginning. Your friend is smart 👍

d_k_bo,

A Free Software License is even more important. There are many great projects out there which you can’t modify etc. because the project isn’t distributed with a license (which means “all rights reserved” in most jurisdictions).

lingh0e, in Programmer tries to explain binary search to the police

A police officer being unable to think in such a fashion is exactly why no one could solve the see-saw riddle on Brooklyn 99.

Mr_Dr_Oink,

How do you solve that? I saw a solution in the comments where it says to start with numbering all the people and butting 1234 and 5678 on the see saw, then it says if they weight the same then continue and that seems to work. But if they dont weigh the same it doesnt work and it doesnt say what to do in that case.

NotSoCoolWhip,

If 1234 and 5678 don’t weigh the same youd need 4 seesaws in some cases

adrian783,

you can do it like you weight 6v6 then 3v3 then for the last weighing you weight the 2 out of 3.

or you weigh 4v4 to find out which grouping of 4 the light weight person is in, then do 2v2 and 1v1.

ChairmanMeow,
@ChairmanMeow@programming.dev avatar

You don’t know if the person is lighter or heavier yet.

Sagifurius, (edited )

That’s not the question. Either the scales balance, and the third is heavier or lighter, or the scales don’t balance and you get both answers, but the question is purposely framed this way

ChairmanMeow,
@ChairmanMeow@programming.dev avatar

I mean that not knowing it is part of the question, and the proposed solution doesn’t work without knowing if the person is heavier or lighter.

If you know if the person is heavier or lighter, the question becomes trivial.

Sagifurius,

The question is to figure out who is different, not how they are different. That takes one more step, half the time.

Mr_Dr_Oink,

The question was to find who doesnt weigh the same and if its heavier or lighter. Watch the clip again.

Sagifurius,

That’s easy enough to answer, but he really should work on his grammar. In that case you just do 3 groups of three, weigh two of them. If they’re even, the third group is different. Weigh 2 membres of the third group, they’ll either be even or one heavier. Weight the last member against the heavier one from step 2 to see if they’re even or not for your answer.

Mr_Dr_Oink,

Thats 4 uses of the seesaw. It has to be 3.

Sagifurius,

That three dude

Mr_Dr_Oink, (edited )

Im sorry when i read weigh two of them i counted it as two separate weighings of two sets of groups. My bad.

What about the 4th group? There are 12 people

Sagifurius, (edited )

Well I meant to write 3 groups of four. Same general thought just adjust the logic somewhat

Mr_Dr_Oink, (edited )

I’ve had a look into it, and it doesn’t work if you try to do it mathmatically. You always need more than 3 gos on the seesaw.

There is a solution in the replies to my original comment that is the actual solution, and it works every time and is much simpler than any grouping method.

It involves assigning a letter to each person and then aligning that with a grid of positions “left” or “right” or “none” on the seesaw. Over the three rounds. So, person A is on the right all three rounds person b is on the right for 2 rounds then on the left for the 3rd round.

You end up with a list of 12 patterns that do not repeat or mirror any other pattern like “LLL” “LLR” “LRR” “LR-” etc. Then you do all three rounds and compare the position the seesaw was in with those patterns.

If the seesaw was down on the left 2 times the down on the right the third time then you look for which person had that pattern in this case it was person B. So they are the one with a different weight and they were heavier.

Equally, if the opposite pattern occurred. It was down on the right 2 times, then down on the left for round, then that is the opposite pattern of person B and does not occur anywhere else, so it was person B, and they were lighter.


<span style="color:#323232;">person:  A B C D E F G H I J K L
</span><span style="color:#323232;">
</span><span style="color:#323232;">round 1: L L L L R R R R — — — -
</span><span style="color:#323232;">
</span><span style="color:#323232;">round 2: L L R R R — — — L R L -
</span><span style="color:#323232;">
</span><span style="color:#323232;">round 3: L R R — — L R — L L — R
</span>
ChairmanMeow,
@ChairmanMeow@programming.dev avatar

Yes, I’m aware. But with 12 people you can’t simply divvy the groups in threes constantly, because if you weigh and the groups are unequal, then you don’t know in which group the different person is (yet). E.g., weighing ABCD - EFGH can tell you the different person is in IJKL if the groups are even, but if they’re uneven you don’t know in which of the other two groups the different person is.

RoyaltyInTraining,
@RoyaltyInTraining@lemmy.world avatar

Where is the piped bot when you need it

Venat0r, (edited )

You can just replace the domain of the url with piped.video:

Piped.video/Mgqqzt6Iah4

skydivekingair, (edited )

For those looking for the handout:

person: A B C D E F G H I J K L

round 1: L L L L R R R R — — — -

round 2: L L R R R — — — L R L -

round 3: L R R — — L R — L L — R

drislands, (edited )

This would be easier to parse with a monospaced font. I’m not sure how that works in lemmy so this might take an edit or two…


<span style="color:#323232;">
</span><span style="color:#323232;">round 1: L L L L R R R R — — — -
</span><span style="color:#323232;">
</span><span style="color:#323232;">round 2: L L R R R — — — L R L -
</span><span style="color:#323232;">
</span><span style="color:#323232;">round 3: L R R — — L R — L L — R```
</span>
Mr_Dr_Oink, (edited )

Oh i get it. So if in round 1 it tilted down on the right. Round 2 it was even then round 3 it tilted down on the right then it was person G and they are heavier. However if it was reversed and tilted on the left then even then left then it was still person G but they are lighter. Because that pattern only occurs once. This is brilliant. Thankyou to you and the person you corrected the formatting of.

skydivekingair,

Cool, thanks. I’m not the best at formatting when using my phone.

jballs, in We've come a long way baby
@jballs@sh.itjust.works avatar

I read in a different post that the code was misinterpreted to be a 5 second sleep before showing the video, but instead was waiting 5 seconds to execute some anti-ad-block script. Still pretty sleazy either way.

A_Very_Big_Fan, (edited )

There’s a video going around of a guy using a useragent spoofer to prove that it only does this on non-Chromium browsers. So I don’t think it’s necessarily anti-adblock, but it could be interpreted that way when you consider Google’s plans to implement DRM in Chromium.

vpklotar,

Had a look at Louise Rossmans video yesterday about this and from what he showed he got it on all browsers.

Video: https://youtu.be/_x7NSw0Irc0?si=My5Nurw4XqdjDH8l

Solemarc,

When I went rooting around to find it. I figured it was some QA process that starts 5 seconds after the video loads (the timer seems to be async and the code sends a promise off while it waits). Of course, it’s all minified JS so it’s a huge pain to read.

kromem, in The Perfect Solution

Inefficient solution.

You should simplify it to just ask the model if the last bit of the binary representation of the integer is a 1 or a 0.

Natanael,

They don’t process inputs as binary (they use clusters of symbols, i.e. letter groups) so that’s not guaranteed to work

kromem,

r/woosh

Natanael,

I did realize that too was a joke, still wanted to point that out

kromem,

Well, in the sake of pointing things out, GPT-4 can actually correctly answer the prompt, because it arrives at it in the opposite direction. It can tell the integer is even or odd and knows that even or odd integers in binary end in 0 or 1 respectively.

AeonFelis,

You can ask it if the last digit is odd or even, then.

umbrella, in Revisiting code I wrote last year
@umbrella@lemmy.ml avatar

Whos the fucking idiot that wro… oh it was me.

savvywolf, in Twitter/GitHubProjects has no chill 😅
@savvywolf@pawb.social avatar

Anyone else getting that corporate “forced meme” vibe from this?

hypnotic_nerd,
@hypnotic_nerd@programming.dev avatar

I didn’t, but now I do 🙌

cupcakezealot, in It's that time of the year again!
@cupcakezealot@lemmy.blahaj.zone avatar

dammit bobby tables is on the naughty list again

NoneYa, in I'll just be a quick 3h

I hate these requests so fucking much. I’ve learned a lot of SQL because of it but I’m sick of it. Especially sick of the users who ask for the same data over and over again.

One guy asked me to run a report every first of the month and then he wouldn’t respond when I would send it so I stopped sending it. Additionally because he would request it AGAIN later in the month after I already sent it at the beginning of the month.

Guess it’s too much to search your fucking emails before requesting a new report to be run. A report that I’ve told you countless times will slow down everything for everyone else who’s using the system.

But tHis iS uRgENt aSAp to run a report asking for all data for the last 3 years.

dan,
@dan@upvote.au avatar

Especially sick of the users who ask for the same data over and over again.

Use something like Apache Airflow to automate it :)

pomodoro_longbreak,
@pomodoro_longbreak@sh.itjust.works avatar

If it’s regular, I recommend cron + mailutils. Have the cron job call a script with a variable sleep in it if you want to make it look more manual.

killeronthecorner, in 10 months later bill revisits his spaghetti code. forgets absolutely everything and refuses to elaborate. this wouldn't have happened if Bill forgot to comment on his code
@killeronthecorner@lemmy.world avatar

Bill never revisits his code.

Bill is a contractor smart.

Socsa,

Bill changes jobs every two years to outrun the crushing weight of institutional responsibility.

mp3,
@mp3@lemmy.ca avatar

A technical debt escapist.

Potatos_are_not_friends,

NGL that is one of the best parts about being a contractor.

So many hackjobs. Sorry maintainers.

killeronthecorner,
@killeronthecorner@lemmy.world avatar

We all envy you more than we hate you

nintendiator, in What you are according to you fav language

What? No HTML?

Jakylla, (edited )
@Jakylla@sh.itjust.works avatar

HTML: You are not a nerd

Edit: OH MY GOD what did you just share !!!

nintendiator,

what did you just share !!!

Power.

Beware: might cause maniacal laughter.

fl42v,

Dude, I just woke up the whole house 🤣

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programmer_humor@programming.dev
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 18878464 bytes) in /var/www/kbin/kbin/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php on line 171

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 10502144 bytes) in /var/www/kbin/kbin/vendor/symfony/error-handler/Resources/views/logs.html.php on line 27