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.

bigredgiraffe , in Which one???

I found this diagram on SO at one point but I can’t find the post and it is the best explanation I have found for how all of the files work for bash and zsh, each color is an individual path of execution (eg, follow the red line).

Bottom line though, it only really matters if you are overriding something that is already defined, for example I tell my users to use zshrc and I provide defaults and common things in zprofile because zshrc is executed last when they login.

https://lemmy.world/pictrs/image/bb776685-f8fd-4f48-8c25-1cab8272904a.jpeg

JackbyDev OP ,

I feel like I couldn’t make this more confusing if I tried. What is doing on with the golden arrows around /etc/profile??

MajorHavoc ,

Agreed! It’s cathartic to see it laid out so terrifying. Now I feel less bad for never understanding it.

agressivelyPassive ,

That’s decades of legacy for you…

I bet each step/arrow/decision had a good reason at some point, but most of them probably back when computers lived in caves and hunted their tapes using spears and rocks.

I feel like we’re slowly reaching a point where the complexity is collapsing in on itself - just look at the absolute chaos a modern web app is.

JackbyDev OP ,

I was referring more to the graphical representation that the actual flows.

mumblerfish ,

Is this a diagram for how it should work? Not how it actually works? Like I put my stuff in the ~/.bashrc, mostly because I think the debian one says like “put your fun stuff below here” or something. The green and grey lines go through the ~/.bashrc, but both of them go through the “no login” bubble in the diagram. But I know my ~/.bashrc works, so the diagram is a suggestion?

JackbyDev OP ,

A lot of systems will call various inits from others to give you a more simplified flow. (Closer to what zsh does.) Check out some of those files in /etc/ it is calling as well as ~/.bash_profile. Or, you might not even be in a login shell!

communism ,
@communism@lemmy.ml avatar

What do the differently coloured arrows mean? I’m confused.

gamma , (edited )
@gamma@programming.dev avatar

Select the color which matches the steps before filenames ((non-)login and (non-)interactive), then follow that arrow the rest of the way. There’s more colors in Bash because Bash makes a distinction between remote and local shells.

Another way to look at the same data for Zsh (note: $ZDOTDIR will be used instead of $HOME if it’s defined at any step along the way):

File neither interactive login both
/etc/zshenv x x x x
${ZDOTDIR:-$HOME}/.zshenv x x x x
${ZDOTDIR:-$HOME}/.zprofile x x
${ZDOTDIR:-$HOME}/.zshrc x x
${ZDOTDIR:-$HOME}/.zlogin x x
${ZDOTDIR:-$HOME}/.zlogout x x

One confusion on the Bash side of the diagram is that you see branching paths into ~/.profile, ~/.bash_profile and ~/.bash_login. Bash will use for

JackbyDev OP ,

And what’s confusing is that many times those files still manually call the others to make it more logical like zsh. That’s what I remember at least, it’s been quite a while since I used bash.

gamma ,
@gamma@programming.dev avatar

manually call the others

Yeah, most distros will set up source chains to make things nicer for users.

ulterno ,
@ulterno@lemmy.kde.social avatar

Here’s the seemingly original source for those who like to know.

hendrik , in Average CSS
color: lime !important;
z-index: 1000000;

xmunk ,

I love the superstitious z-index just in case it does something to help.

independantiste ,
@independantiste@sh.itjust.works avatar

At least that’s actually easy and quick to do and is the only way of doing it. Centering a div however has 81639393 ways and it seems the one that works is different every time

CodexArcanum ,

Bro its so easy bro, just use flexboxgridcolumns its been a standard since 2010 just flex it bro you haven’t learned to flex yet just check w3c schools and add a flex you can polyfill it but don’t use that hacked one use the good flexpolyfill then { content-align-middle-child-elements: center-middle-true-neutral } so easy with flex bro

Cosmonaut_Collin ,
@Cosmonaut_Collin@lemmy.world avatar

Dude, stop flexing on him. You’re gonna make him cry.

CatLikeLemming ,
@CatLikeLemming@lemmy.blahaj.zone avatar

I know you meant this sarcastically, but yes, flex is a good option for centering something. Either that or setting the left and right margins of the element to auto, which is generally even easier.

Basically, if you’re in a flex container use flex, if you’re in a grid use grid, and if neither of those apply set the left and right margins to auto.

marcos ,

Also seriously, anybody having problems with flexbox should try this:

flexboxfroggy.com

I’m not sure there’s any version of it for grids, but IMO grids are inherently more intuitive, so it may not be needed. Flexbox is the one that is hard to learn.

davidgro ,

I don’t know any CSS (despite reading memes about it like this) but I do know that the bottom of that page has a link to something called Grid Garden

CatLikeLemming ,
@CatLikeLemming@lemmy.blahaj.zone avatar

Well, flexbox and grid have different purposes in my opinion/experience. Personally I use grid for “top level” layouts like the layout of the whole site, while I tend to prefer flexbox for layouts inside the grid. Of course that’s just a rule of thumb, there are absolutely cases where this isn’t the best option.

bleistift2 ,

Also exists as Tower Defense

independantiste ,
@independantiste@sh.itjust.works avatar

You’ve perfectly captured twitter tech bro energy it’s kind of incredible actually

drathvedro ,

It’s 2024 and flexboxes still don’t work that well with vertical direction and wraparound…

bleistift2 ,

Do you have an example?

drathvedro ,

Sure. Here you go. The green container should cover all red boxes in both cases. I’ve been bashing my head against this issue for a while, but, as far as I understand, this is a bug that’s never going to be fixed. Which sucks, because I wanted to re-design some of the apps in the horizontal metro-style scrolling manner for the bottom screen on my zephyrus duo, but this effectively prevents me from doing so (Unless I use grids and set positions manually).

bleistift2 ,

That’s interesting. Chrome displays it as you intended, Firefox doesn’t. I guess it’s required that the vertical flex be inline-flex?

drathvedro ,

Huh, neat. The last time I looked, chrome was also plagued by this. Might actually re-start some projects I had, but it sucks to have to use chrome.

inline-flex is indeed necessary since we’re growing left to right and flex would take the entire/fixed width, unless it’s also inside a flexbox.

bleistift2 ,

it sucks to have to use chrome

I also hate to admit it, but Chrome currently is the superior browser.

drathvedro ,

Chromium is a superior engine, yes. But Chrome itself, at least in my eyes, looks to be the least capable browser out of the bunch. I’d rather Vivaldi if I had to switch.

Aux ,

Inline is never needed and you already know that.

drathvedro , (edited )

https://lemm.ee/pictrs/image/c44d0f23-815c-473b-848a-6cdc84d56376.png

https://lemm.ee/pictrs/image/2027b9e1-f534-4e91-a859-15d96b64f67e.png

EDIT: Alright, this is a terrible case because the parent element has flex and therefore no inline-flex is necessary there, but I’d argue it’s the parent element being flex that is redundant, rather than child element being inline.

Aux ,

Inline means that your element should be treated like text. If your element is not text, then you shouldn’t use inline. In this screenshot the element is text, so it’s ok.

kamen ,

It’s a good indicator that someone is desperate and/or doesn’t know what they’re doing.

Prunebutt , in It's called attaining divinity

I once knew somebody who supposedly thought that ASM was high level.

NateNate60 ,

ASM is high level. Real programmers use punch cards

boonhet ,

Once met a man who said he loved assembly language because it was so much nicer than punch cards and FORTRAN, but C was OK too.

This was last year. In his defense though, he’s been retired for years, used to work as a professor.

sylveon ,

Real programmers use a magnetized needle and a steady hand.

Prunebutt ,

There’s an emacs-command to do that.

Hupf ,

No, the emacs command is for the butterfly

Prunebutt ,

Dang, I meant a neovim-Plugin

Ziglin ,

Emacs keybind?

And009 ,

Back to the iron ages

EntirelyUnlovable ,
@EntirelyUnlovable@lemmy.world avatar

REAL programmers tap into the electron flow across the CPU and set bits in real time

duckythescientist ,

Wait until you learn about micro ops and processor internals. That somebody isn’t as wrong as you think.

abbadon420 , (edited )

There is no way ASM is high level

MartianSands ,

It’s a matter of perspective. To someone who’s job is to write the system which interprets ASM, ASM is high level

victorz ,

Exactly. For every level of abstraction, the abstractor is the high level and the abstractee is the lower level. Those aren’t real words perhaps, but you get what I’m saying. It’s all relative along the chain of abstraction.

Ziglin ,

Is it a chain though? I think it’s more of a branching network that (almost?) always is stopped at quantum physics and it’s theories or some form philosophy.

victorz ,

My mental model of it is a chain, yes. But you can define it however you like. It’s just steps in some direction.

Maybe a cake would suit someone the best.

Lmaydev ,

It’s higher than machine code. It’s degrees of highness. Any abstraction technically makes it high level.

abbadon420 ,

It’s not really abstraction though. It is more like syntactic sugar. In stead of 1000111011 you say ADD, but it is still the exact same thing. There is no functional, prgrammatical benefit of one over the other. It’s just that asm is readable by humans.

At least thats as far as I understand asm. I haven’t gone beyond NandToTetris

Cethin ,

I would argue they don’t know what that means really. Assembly is pretty much a mapping of words to machine code. It’s just a way to make machine code easier to read. It doesn’t actually change how it works.

A compiler re-arranges and modifies things so what you write isn’t the same as the final program that is created. With assembly it is. It’s not really an abstraction, but a translation. It doesn’t move you further from the machine, it only makes it so you’re speaking the same language.

waigl , (edited ) in University Students

Writing good comments is an art form, and beginner programmers often struggle with it. They know comments mostly from their text books, where the comments explain what is happening to someone who doesn’t yet know programming, and nobody has told them yet that that is not at all a useful commenting style outside of education. So that’s how they use them. It usually ends up making the code harder to read, not easier.

Later on, programmers will need to learn a few rules about comments, like:

  • Assume that whoever reads your code knows the programming language, the platform and the problem domain at least in general terms. You are not writing a teaching aid, you are writing presumably useful software.
  • Don’t comment the obvious. (Aside from documentation comments for function/method/class signatures)
  • Don’t comment what a line is doing. Instead, write your code, especially names for variables, constants, classes, functions, methods and so on, so that they produce talking code that needs no comments. Reserve the “what” style comments for where that just isn’t possible.
  • Do comment the why. Tell the reader about your intentions and about big-picture issues. If an if-statement is hard to parse, write a corresponding if clause in plain English on top of it.
  • In some cases, comment the “why not”, to keep maintenance programmers from falling in the same trap you already found.
smeg ,

Commenting the why not is key. Half my comments are explaining why I had to use this hack as a warning that the obvious fix doesn’t work!

Thorry84 , (edited )

Good advice, just to add to this:

  • Comments should be part of code review, having at least two pairs of eyes on comments is crucial. Something that’s obvious to one person maybe isn’t so obvious to another. Writing good comments is as hard or harder than writing good code, so having it checked for mistakes and quality is a must
  • Comments aren’t the actual documentation and aren’t a reason not to write documentation to go along with your code. Often I see larger projects where each class and function is documented in comments, but the big picture and the how and why of the overall structure is completely missing. Remember that in the real world you often have a lot of folk that need to understand how the code works, who aren’t programmers themselves. They can’t read the code or don’t have access to the code. Writing documentation is still important.
  • Please for the love of god when you change code, check if the comments need to be updated as well. Not just around the immediate area, but also the entire file/class and related files. I’ve worked on large codebases before with a high wtf factor and having the code do something different to or even opposite the comments is a nightmare. I’d rather have no comments than wrong comments.
FlorianSimon ,

This is a notoriously bad book. If you read the part about comments (which I don’t know about, and am willing to accept is good) make sure to skip everything else because Robert Martin is a fraud.

Thorry84 ,

Agreed, removed

magic_lobster_party ,

I'd rather have no comments than wrong comments.

I’ve seen cases of outdated comments in the same line of code it’s describing. People suck at maintaining comments.

Tamkish ,

I would argue that if an if statement is hard to parse, replace the entire condition with simpler to read (but way more specific) variables that you assign values (the original condition expression) in the line above. No need for comments in that case

magic_lobster_party ,

Do comment the why

In this day and age of source control I don’t think this is fully necessary. If you want to know the why, you can look into the commit history and see which ticket is connected to it. There you might even see the discussions around the ticket as well. But this requires good source control discipline.

It has helped me many times.

floofloof , (edited )

Why not put the “why” in a comment and save people the job of dredging through old commits and tickets to figure out what the code is for? I’d thank someone for saving me the hassle.

magic_lobster_party ,

You can also do that if you think it’s useful.

Going back to the original ticket can offer far more info than what any “why” comment can give. You can see how old it is, if there are any connected tickets, who were involved with it, step by step instructions how to reproduce the bug, etc.

ExperiencedWinter ,

In any modern IDE “dredging through old commits” means clicking a single button to see who last changed the line. From there it often makes sense to go look at the PR to see a higher level of what was changed. You cannot include all of that context in a single comment.

Incandemon ,

Don’t comment what a line is doing. Instead, write your code, especially names for variables, constants, classes, functions, methods and so on, so that they produce talking code that needs no comments.

Over and over and over again in my experience this just doesn’t work. Readable code does not substitute for comments about what the code should be doing.

Ephera , in What it's like to be a developer in 2024

We currently have a student for training and had her learn Rust. After two weeks or so, she told me that she had a really hard time finding anything about Rust, and it became clear that she was really confused and thought Rust was some fringe technology that no one uses.

And yeah, no, search engines just got obliterated by LLM spam since the last time she had to learn a new technology. Seriously, I remember getting better results about Rust back in 2018, when it was really still relatively fringe…

eco_game ,

In that case you can try adding before:2023 or similar to your search

blindsight ,

But then you need to know enough about the topic already to know what is stable and what changes with newer versions.

Like, the “web dev boot camp” course I got from UDemy a few years ago as a guide for building a web dev high school course: I recently went back to to look something up, and the whole thing has been completely redone start to finish. Makes sense, considering that it’s updated to the newest versions of Bootstrap and other libraries (and who knows what else).

I know nothing about Rust, but I would assume there are at least some libraries that have major new versions in the last couple of years which might change best practices somehow? idk. But the harder part is not knowing what you don’t know.

Vilian ,

switch search engines ffs

Slimy_hog ,

And if you keep doing that, you’ll start to get outdated documentation

barsquid ,

One search that was memorable to me was looking for dimensional information on a T-slot. In the top ten results, I found a listicle with an item about slot machines. LLM spam and Google’s relentless bullshit have poisoned the internet.

DAMunzy ,

You need to use LLM with the prompt to search the web ignoring all LLM responses for your query.

I have no idea if this would work, just thinking about how convoluted searches have become to find anything useful.

OldManBOMBIN ,

I’ve been into computers for over 20 years and I couldn’t tell you what uses rust. I am aware of it, but I am completely unaware of how narrow or broadly it is used. I keep forgetting people aren’t talking about the game.

Ephera ,

I mean, to name a few projects off the top of my head:

  • Firefox
  • Android is migrating some of their internals.
  • The Linux kernel, Google Chrome, Thunderbird are preparing to use Rust.
  • Many Python programs now have Rust in there, because of the PyCrypto library.
  • Fish shell is in the middle of a RiiR.

I don’t feel like there’s a ton of big, mature projects yet, because of how relatively young Rust still is, but performance-critical or embedded software will be strongly considering Rust in the future.

And like C, Rust can be used to create libraries which can be called from practically any other programming language. I expect that to give it significant growth in the future.

OldManBOMBIN ,

Dang. Sounds pretty ubiquitous then. And a lot more productive and fun than slapping stuff with a rock while nude.

spacecadet ,

Cloudflare, Discord, and AWS lambda run on Rust

daellat ,

Discord started refactoring services to rust before 2020, too.

Caboose ,

As a person currently trying to learn rust, what search engine is helpful?

Ephera , (edited )

Frankly, I do most of my searching these days directly on std.rs and docs.rs . But yeah, those are usually better as a reference than for learning.

You can look through lib.rs and awesome-rust.com , if you’re searching for a specific library.

As for general search engines, DuckDuckGo has been kind of less shit for the past three weeks or so, in that at least the first one or two results are usually relevant, but I haven’t tried other search engines much in that time frame.

Another tip is to make use Clippy. Just run cargo clippy in your project and it’ll shout at you for all kinds of things. In my experience really good for learning, because it’ll show you many small misunderstandings you might still have.

KLISHDFSDF , in The IT experience?
@KLISHDFSDF@lemmy.ml avatar
Shareni ,

When you do things right, people won’t be sure you’ve done anything at all.

Damn you, the photo didn’t load and I thought I’d be the first one. Time to start my own comment chain, with blackjack and hookers.

ChaoticNeutralCzech , in Computer components cheat sheet

Laser printers more accurately “bake paper so that number powder sticks to it”

okamiueru ,

There are two common types of laser printers. Those that have special paper that react to heat, such as receipt printers, would fit the description.

The other laser printers… Hm, I don’t think your description is accurate either. It’s more that the laser electrically charges ink particles so that they jump on to a separate roller that gets rolled on to the paper.

I’m no expert though.

ChaoticNeutralCzech , (edited )

I am not aware of any receipt printers using lasers - thermal printers have an array of resistors that get hot when necessary. I know how a laser printer works and it is hard to explain in 12 or so words. Inkjets are way easier, you can just say “squirt squirt oops”. Anyway…

  1. A photosensitive drum gets a negative electrostatic charge.
  2. A laser shining through a rotating prism scans lines across the drum’s surface. This removes charge from parts of the drum that should not be covered in toner.
  3. A high-voltage corona wire inside the toner reservoir charges an amount of toner positively.
  4. The charged drum rotates past the corona wire, getting covered in toner where its negative charge remains.
  5. Paper is pushed against the drum and the powdery toner is transferred to it.
  6. The paper continues into a fuser, a little oven where a heating element briefly makes the toner so hot that it melts, its powder particles making a permanent bond among themselves and with the paper. (The heater is usually stationary and heats the paper from below. The fuser drum that pushes paper against the heater can get sticky and pick up some of the toner, making images repeat down the page. This is the most common failure mode that cannot be resolved through regular maintenance such as replacing the toner cartridge and printing cleaning pages. However, almost all laser printers have a cheap fuser module or its drum available so it is usually worth replacing.)
Kolanaki ,
@Kolanaki@yiffit.net avatar

I like the chemical paper because I can write on it with a hot stick.

ChaoticNeutralCzech ,

Yeah, it’s fun but the temperature needs to be correct. With rising temperature, the paper goes black, light gray, brown and then glowing orange.

Kolanaki ,
@Kolanaki@yiffit.net avatar

“Watch as I turn this ordinary paper into pure energy!

frezik ,

It’s an accurate description of laser printers. The “powder” in the description are small plastic flakes (toner), and the paper is baked so that powder melts into it.

Receipt printers have no additional consumables beyond the paper. The heat itself is all the paper needs.

Scrath ,

Wait, seriously? We use plastic for printing documents as well?

frezik ,

Yup, that’s what toner is. Little black plastic flecks. If you break a toner cartridge and get it everywhere, try not to breathe too hard.

uis ,

Fuse number

lurch , in CheapGuilty™ A hypothetical Amazon feature that disables "high-to-low" filter if you are cheap 😅

the search in amazon is so bad that you sometimes need high to low: some searches get you so much cheap unrelated trash, you have to sort high to low, and page down so you find the actual cheapest match quicker.

Transporter_Room_3 ,
@Transporter_Room_3@startrek.website avatar

Default sort: 237 matches

Sort by price (either way): 17 matches

So uhhhh… What happened to the other 220 results?

Amazon search is trash and you might as well google it like you had to do with reddit search.

noobnarski ,

The best thing is, if you sort low to high, after the 2nd or 3rd page it just completely breaks and starts showing items randomly.

trollercoaster , (edited ) in I see.... finally vim has other purpose than being text editor

Great, now consulting a search engine on questions about vim the text editor will yield equally awkward results as consulting a search engine on matters concerning latex the typesetting system.

unexposedhazard ,

Other examples that are horrible to search for:

matrix/element (yields html coding and other unrelated info)

Signal (pretty common term for anything but the secure messenger)

Finadil ,

Shit, I remember googling “How to kill a child”, my next search was “How to kill a child process.” I’m probably on a list somewhere.

devilish666 OP ,
backhdlp ,
@backhdlp@iusearchlinux.fyi avatar

I think we’ve all been at a point like this

Flipper ,

While I understand the idea behind the naming scheme of matrix, it’s an awful name. The naming behind synapse/dendrite is better I believe. But I don’t have a better idea.

unexposedhazard ,

It was renamed, thats what pisses me off. The client was renamed from riot (much more unique in software context) to element. I assume riot was not investor friendly which is a lame ass reason too.

SaltyIceteaMaker ,
@SaltyIceteaMaker@iusearchlinux.fyi avatar

For matrix i only got the movie’s as a result

planetaryprotection , in Not mocking cobol devs but yall are severely underpaid for keeping fintech alive

I once applied for a “database admin” job at one of the big credit card companies. The job description was basically “run all our Oracle databases” and the salary was in the mid 2 millions USD, but I assumed that figure was typo’ed or something ( an extra 0 maybe?)

In the interview I learned that there was no typo and it was to be one of the seven people on the planet that run the databases for this credit card processor. They said “if the database goes down then we are losing billions of dollars a minute”.

Anyways I didn’t get the job, but they’re not all underpaid.

knightly ,
@knightly@pawb.social avatar

Given how much the shareholders are skimming off the top, $2Mil for a critical database engineer is cheap.

iAvicenna ,
@iAvicenna@lemmy.world avatar

Fuck that job I would probably get stomach cancer from all the stress

planetaryprotection ,

Yeah I had convinced myself that I would only do it for a year and be able to retire much much sooner.

linuxdweeb ,

$2m is enough to pay for chemotherapy

noli ,

Flipping burgers is enough to pay for chemotherapy. Src: am european

EatYouWell ,

It really wouldn’t be all that bad. If they’re dropping $2m/y on a database admin, then their BCDR plan must be rock solid with crazy fault tolerances. I’d imagine outages are extremely rare.

But, if they’re dropping that kind of money, you’d have to be an expert in the field. Or know someone.

zbyte64 ,
@zbyte64@lemmy.blahaj.zone avatar

If you labor there’s only two ways you get paid your full worth: you own the means of your production or your boss is a chump. However much the job pays, you are going to have a larger impact than your salary (hopefully).

mundane , in How programmers comment their code

Comments should explain “why”, the code already explains “what”.

smeg ,

The allowable exception is when the what is a what the fuck, as in you had to use a hack so horrible that it requires an apology comment

mundane ,

Absolutely, although I see that as part of why

Why is there a horrible hack here? Because stupid reason…

bleistift2 ,

Describing the what also helps when you dabble in a new technology or little-used technology. It helps to explain to yourself what you’re doing and it helps in onboarding. “Hey, newbie, there’s a function in XYZ module that’s extensively documented. Look there for guidance.”

sukhmel ,

Or if the what is so cryptic and esoteric that it would require the reader a couple hours of research to understand it.

Also, I find it useful to summarise the what before code blocks if that can’t be summarised in a function name

azdle ,
@azdle@news.idlestate.org avatar

Unless you’re working with people who are too smart, then sometimes the code only explains the how. Why did the log processor have thousands of lines about Hilbert Curves? I never could figure it out even after talking with the person that wrote it.

ripcord ,
@ripcord@lemmy.world avatar

“Smart”

mundane ,

If you know how the code does something, you also know what it does.

calcopiritus ,

Inline comments yes.

Function/Class/Module doc comments should absolutely explain “what”.

mundane ,

You are absolutely right. It was inline comments I had in mind.

MystikIncarnate ,

I don’t code, at best I script. I’m a sysadmin, not a dev, so I play around in PowerShell mostly.

I just started to naturally do all of this. Not because I was taught to, but because I’ve written too many scripts that I later looked at, and thought, WTF is going on here… Who tf wrote this? (Of course it was me)…

So instead of confusing my future self, I started putting in comments. One at the beginning to describe what the file name can’t, and inline comments to step me through what’s happening, and more importantly why I did what I did.

The sheer number of comments can sometimes double the number of lines in my script, but later when I’m staring into the abyss of what I wrote, I appreciate me.

myplacedk ,

I agree.

I usually think of that as documentation, not comments.

But even so, the code should say what it does, with a good name. The documentation adds details.

seaQueue , in Coomitter be like
@seaQueue@lemmy.world avatar

It’s a picture of the people who submit zero value comment spelling fixes to the Linux kernel so they can claim “I’ve submitted X patches to the Linux kernel” for KPIs or resume building

tourist ,
@tourist@lemmy.world avatar

“Hey Bob, you’ve worked on the Linux kernel before, can you handle this CPU scheduler problem we’re having? Shouldn’t take you too long. We need it done before lunch”

mexicancartel ,

“Nah I was in the network driver section”

DudeDudenson ,

“oh nice we’re also having issues with random packets being dropped, can you look into that? It’s business critical”

Anticorp ,

Listen bub, I don’t have time for this Mickey mouse bullshit!

gravitas_deficiency ,

Hey man, I once had an engineering exec (who didn’t last very long) who decided engineers would be stack ranked by SLOC. You can imagine how easy that metric was to cheese, and you can also imagine exactly how that policy turned out.

Give an engineer a stupid metric to meet, and they’ll find a stupid way to meet it for you, if only out of malicious compliance.

seaQueue ,
@seaQueue@lemmy.world avatar

I’d have a field day with that. Max line length 70 or 75, excessively verbose function and variable names, triple the normal amount of comments, extra whitespace wherever possible, tab width 8, etc. The possibilities are endless for that metric.

Anticorp ,

Dude… Just write a python script that makes small changes to white space every few seconds and commits them.

CanadaPlus ,

Campbell’s law goes brrrrr.

towerful ,

When metrics become targets they fail to be metrics any more

AstridWipenaugh ,

Oh, you contributed to the kernel? Name every commit SHA.

Sonotsugipaa , in COMEFROM
@Sonotsugipaa@lemmy.dbzer0.com avatar

Wh… what do you mean, “originally as a joke”?

noproblemmy , in What the heck is a god dang cloud?

But you’ll at least let us take a smaller or bigger peek right? Don’t worry we have a screen recorder ready, you don’t have to do anything.

redcalcium , in new preference war just dropped

I’m truly torn with this. The first one seems sensible (action -> target) and easier to read and reason about (especially with long names), while the other one looks more organized, naturally sortable and works great with any autocompletion system.

kunaltyagi ,

We need a new framework, one that allows universal lookup, and makes life easier


<span style="color:#323232;">x = _.dialog.file.open
</span><span style="color:#323232;">y = _.open.file.dialog
</span><span style="color:#323232;">z = _.file.open.dialog
</span><span style="color:#323232;">a = _.file.dialog.open
</span>

Once done, the formatter simply changes everything to _.open.file.dialog

Let’s get this done JS peeps

\s

Ziglin ,

Aahh you can’t just make this problem object oriented!

C programmers don’t like that.

_g_be ,

Insert xkcd about 15th format

Rainb0wSkeppy ,
And009 ,

Not a programmer, but I’d prefer right naming convention because sorting

Lightfire228 ,

I am a programmer, and i also like the naming scheme on the right

Especially for things like filenames

bitwolf ,

Also a programmer and think method names would be conducive using little endian.


<span style="color:#323232;">TopicGet()
</span><span style="color:#323232;">TopicCreate()
</span><span style="color:#323232;">TopicDelete()
</span>

Writing this I realize we do this implicitly in some instances.


<span style="color:#323232;">http.Get() -> httpGet()
</span><span style="color:#323232;">http.Post() -> httpPost()
</span>
  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines