There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

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

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

Only 3h? What kind sql magician are you?!

spudwart , in Bill is a pro grammer

Make it deceptively easy to read.

It appears easy to read in a review of the code, but upon any further glance, to actually keep it up, the only one who can understand it is you.

RGB3x3 ,

That’s just job security

Anders429 , in Merge then review

Bet you $50 we later learn this guy was orchestrating a supply chain attack.

MonkderZweite , in Yes

Just don’t call it with ‘!#/bin/sh’. Because that’s POSIX shell, not bash.

philm , (edited )

but effectively it’s bash, I think /bin/sh is a symlink to bash on every system I know of…

Edit: I feel corrected, thanks for the information, all the systems I used, had a symlink to bash. Also it was not intended to recommend using bash functionality when having a shebang !#/bin/sh. As someone other pointed out, recommendation would be #!/usr/bin/env bash, or !#/bin/sh if you know that you’re not using bash specific functionality.

MonkderZweite , (edited )

Still don’t do this. If you use bash specific syntax with this head, that’s a bashism and causes issues with people using zsh for example. Or with Debian/*buntu, who use dash as init shell.

Just use #!/bin/bash or #!/usr/bin/env bash if you’re funny.

wolo ,

#!/bin/bash doesn’t work on NixOS since bash is in the nix store somewhere, #!/usr/bin/env bash resolves the correct location regardless of where bash is

JackbyDev ,

Are there any distos with /usr/bin/env in a different spot? I still believe that’s the best approach for getting bash.

Nobsi ,
@Nobsi@feddit.de avatar

My own. I use arch btw

MenacingPerson ,

All posix-compliant distros need /usr/bin/env

MonkderZweite ,

I do think a simple symlink is superior to a tool parsing stuff. A shame POSIX choose this approach.

Still the issue that a posix shell can be on a non-posix system and vice versa. And certificates versus used practice. Btw, isn’t there only one posix certified Linux distro? Was it Suse?

MenacingPerson ,

Posix certification is dumb but posix compliance is nice to ensure some level of compatibility.

Symlinks would be pretty bad in the case of nixos. Wouldn’t fit at all

quantenzitrone ,

/bin/bash won’t work on every system for example NixOS some other systems may have bash in /usr/bin or elsewhere

MonkderZweite ,

NixOS didn’t do /usr merge?

quantenzitrone ,

Binaries are not in /usr/bin or /bin except for /bin/sh and /usr/bin/env. Programs should not assume fixed paths for binaries and instead look for them in $PATH.

Aatube ,
@Aatube@kbin.social avatar

macOS
Debian
Ubuntu

SurpriseWaterfall ,

It is a symlink, but bash will automatically enable posix compliance mode if you use it. So any bash specific features will bomb out unless you explicitly reset it in the script.

callyral ,
@callyral@pawb.social avatar

i thought most unix-like systems had it symlinked to a shell like dash. it’s what i have on my system (void linux), of course not as an interactive shell lol

i use #!/bin/sh for posix scripts and #!/usr/bin/env bash for bash scripts. #!/bin/sh works for posix scripts since even if it’s symlinked to bash, bash still supports posix features.

JackbyDev ,

No no no no no, do not believe this you will shoot yourself in the foot.

wiki.debian.org/Shell

Beginning with DebianSqueeze, Debian uses Dash as the target of the /bin/sh symlink. Dash lacks many of the features one would expect in an interactive shell, making it faster and more memory efficient than Bash.

From DebianSqueeze to DebianBullseye, it was possible to select bash as the target of the /bin/sh symlink (by running dpkg-reconfigure dash). As of DebianBookworm, this is no longer supported.

UNWILLING_PARTICIPANT ,

Wut that is not even the case for Ubuntu. You’re probably thinking of dash example:


<span style="color:#323232;">sh -c '[[ true ]] &amp;&amp; echo ya' 
</span><span style="color:#323232;"># sh: 1: [[: not found
</span><span style="color:#323232;">
</span><span style="color:#323232;">bash -c '[[ true ]] &amp;&amp; echo ya' 
</span><span style="color:#323232;"># ya
</span>
silencioso , in Merge then review

Before everyone loses their minds, in Extreme Programming there are safeguards other than PR reviews. Before you submit a PR, you are supposed to have written the tests and to have written your code with pair programming, so your code already has some safety measures in place. On top of that, when you merge and deploy, more tests are run, and only if all of them are green do your changes go into production.

agilob OP ,
@agilob@programming.dev avatar

you are supposed to have written the tests and to have written your code with pair programming,

I commented out the tests because they were failing, pipelines were green so I merged. Now it’s running on prod. What do you do?

silencioso ,

Fire you for destroying the tests. It’s intentional sabotage.

Blackthorn ,

I would fire you for incompetence and sabotage. Problem solved.

pomodoro_longbreak ,
@pomodoro_longbreak@sh.itjust.works avatar

Give you public kudos for moving fast and breaking things. We need more fearless cowboys like you around here

MeanEYE ,
@MeanEYE@lemmy.world avatar

You lost me at “pair programming”. Having tests for what you can test is fine. But there’s code that simply can’t be tested, or at least not easily at which point you are just wasting time. Open source mantra is always great in my opinion… release early, release often. In addition to that have a test version of your software before you push it to production if there’s sensitive data. That’s usually good enough to catch issues.

And he’s right, reviewing changes before merge just takes time and resources away from project while the master branch keeps moving. Merge, if there are issues, whoever submitted the change is obliged to fix it. You can always checkout earlier version.

dbilitated ,
@dbilitated@aussie.zone avatar

I just made a github action that merges anything updated in master into feature branches automatically. you get pinged if there’s a conflict but the automerge keeps drift to a minimum so it’s less common and fixed sooner.

better than merging poorly tested/reviewed code.

and yeah, a small team of superstars doesn’t need reviews so much, but most teams have a range of devs with different levels of experience and time working with particular parts of a large codebase. Someone more senior or more expert derisks people picking up tickets and improves code quality.

it also leads to plenty of good conversations about the best way to implement, so overall it’s a win.

MeanEYE ,
@MeanEYE@lemmy.world avatar

Well, Git was designed to branch out, not be a single repo with bunch of users. So one team can have a local repo, that in turn gets merged into big one, etc. Structure matters as you say. Small experienced teams move fast. Big teams require a lot of management and supervision. I still think it’s better to split people up into small teams and give individual tasks, or let them pick tasks that need to be done.

redcalcium ,

Pair programming? Then the code is already reviewed.

hglman ,

Yes, that’s part of the point. Dumping all at once into a merge and asking people to comprehend it all isn’t particularly realistic.

shootwhatsmyname , in GoOn
@shootwhatsmyname@lemm.ee avatar

one of them has a 7 I’m pretty sure

comrade_pibb ,
@comrade_pibb@hexbear.net avatar

wow don’t doxx me plz

RageAgainstTheRich , in Merge then review

What in the shit is “xtreme programming”?

cypherix93 ,

it’s NewGame+ for when you 100% programming

KepBen ,

Fuck you guys are getting progress??

MagicShel ,

I’ve been doing this for twenty five years and I’m nowhere near 100%. In fact I think my percent might be going down.

LiveLM ,

A real thing, believe it or not.Though I don’t think what that guy said fits in it.

T4V0 ,
@T4V0@lemmy.pt avatar

For a second, I thought they were talking about XGH (eXtreme Go Horse).

mindbleach ,

He is, whether or not he knows it.

GoodEye8 ,

It’s when you write everything in l33t WITH CAPSLOCK ON.

e8d79 ,
@e8d79@feddit.de avatar

I guess that makes COBOL the most Xtreme programming language.

theneverfox ,
@theneverfox@pawb.social avatar

It’s agile based around rapid prototyping. You build a thing, then you do it again, but better

It’s not a new idea… But I’ve never heard of anyone doing it professionally

starman , in thisIsGoingToBeASeriousDebate
@starman@programming.dev avatar

Console.WriteLine(“Hello World!”);

Successful_Try543 , in The temptation is always there

I’ve once had a course involving programming and the lecturer rewrote the code, which we were usually using at our institute, making ALL variables global. - Yes, also each and every loop counter and iterator. 🤪

Chriszz ,

There’s no way you teach a uni course and do this kind of thing unless to demonstrate poor practice/run time difference. Are you sure you were paying attention?

Successful_Try543 ,

Yes. He really thought it was efficient and would avoid errors if literally all variables were defined in a single Matlab function he called at the beginning of the script. We students all thought: “Man, are you serious?” As we didn’t want to debug such a mess, in our code, we ignored what he was doing and kept using local variables.

Chriszz ,

Ah I misread I thought it was specifically a programming course. I can expect this from a math prof.

Successful_Try543 ,

Yes, it was a course on finite deformation material models. And no, you do really, really not want to declare each and every variable in your material subroutine globally for the whole finite element program.

magic_lobster_party , (edited )

Lecturers at universities tend to have little to no industry experience at all.

Successful_Try543 ,

Productive research is also hard to imagine with such coding practice either.

Techmaster ,

That’s why when your job hires new people right out of college they have no idea what they’re doing and now must be trained how to actually do the job. “What, you mean we aren’t writing this enterprise application in python!?”

rtxn ,

I’ve seen two teachers do this, both of them mathematics professors who teach programming for the extra cash. One uses C, the other Pascal.

wreckedcarzz ,
@wreckedcarzz@lemmy.world avatar

Oh they were paying, way too much

xmunk , in classic configure neovim experience

That’s why I use emacs. It just works.

(just kidding, I use nano because it’s “good enough”)

Chreutz ,

You freak…

busydoinnothin , in A fun simple game

I have laughed at this for too long. Good way to start the morning.

Daft_ish , in Microsoft Edge could use a win

How long is Microsoft going to play this game? We don’t want your browser and we didn’t want it since Netscape. No one trusts you.

Sheeple ,
@Sheeple@lemmy.world avatar

I want it

Daft_ish ,

Bizarre

fiddlesticks ,
@fiddlesticks@lemmy.dbzer0.com avatar

Username checks out

Nobsi ,
@Nobsi@feddit.de avatar

I want it. I use it.

Sheeple ,
@Sheeple@lemmy.world avatar

Team edge!

Phen ,

For as long as they want. What we want doesn’t matter. They are a very large company, so what they want is above what we want.

Daft_ish ,

Obviously

Honytawk ,

And this mentality is exactly why they keep shoving it down our throats.

People should stop equating Edge to Internet Explorer. It isn’t the same browser, it has a lot less problems, it is quite a lot faster, it it compatible with anything.

Edge shouldn’t have the stigma of Internet Explorer. It is a very decent modern browser.

Rheios , in "how good are you?"
@Rheios@ttrpg.network avatar

Ah, the good ol’ “I’m not, but actually am, but not enough that I should get a raise, but I really would like one and less work hours, but I really need to stay longer because I’m so slow at everything I do and am terrible at focusing so I should really be working harder to give you your money’s worth, but you’re probably not paying me as much as you should be for that work in hindsight” theoretical with yourself and your imagined boss.

tuna_casserole ,

Wow that’s… exact.

rustydrd , in What's your most obscure binding?
@rustydrd@sh.itjust.works avatar

Not sure if this is obscure or not: I have F12 bound to cycle through the low- to high-contrast versions of my color scheme so I can keep working when the sun hits my shitty laptop screen.

gandalf_der_12te ,

this is definitely obscure

JackGreenEarth , in Clyde, the most advanced and intelligent AI known to man

Now ask Bing Chat 😂

Player2 ,

For some reason it turns French. I’ve never seen that behavior before to be honest. https://sopuli.xyz/pictrs/image/09735948-525d-47fb-8fd5-8076cef8288d.jpeg

BatmanAoD ,

This is as funny as the Clyde response, arguably funnier.

Player2 ,

It’s probably some pre written thing for this area (Quebec) that overrides my set language. Definitely funny!

CanadaPlus ,

Based on my epic Canadian “cereal box French” this does appear to be a boilerplate “sorry you’ve had a bad experience but don’t ask the bot” message.

BatmanAoD ,

I really like that it follows this up with, effectively, “we’re done here, get out”

MyNameIsIgglePiggle ,

Love how Bing chat just gets uncomfortable all the time and nopes out of most conversations

Decide ,

I’ve used it to help me understand some code concepts and debugging, but over the last two weeks, it went from competent to completely stupid half of the time. It also fails to connect so often, it’s unreal.

30p87 OP ,

For me it starts bullshitting about Microsoft being a large company so mistakes can happen, but ofc M$ is dedicated to being good and reliable blablabla. Definitely not my experience with M$ Teams. I should reach out to support. Well those idiots first “advice” would be using Edge on Windows ofc. 1000010592

Karyoplasma ,

I love how it “sources” the reliability of Azure by linking to the Azure storefront. Great job.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines