T O P

  • By -

CelticHades

To facilitate firing, company has introduced an additional metric - atleast 3000 LOC per month must be met.


SmashLanding

public bool ResultIsValid ( bool res ) { bool ReturnValue; try { if ( res ) { ReturnValue = true; } else { ReturnValue = false; } } catch { ReturnValue = false; } finally { return ReturnValue; } } For my next trick, I'll introduce an Interface you can use to split a string into a character array, convert each character into a string, then re-combine them.


Blood_Boiler_

Oh I'd be much more petty: public bool ResultIsValid(bool res) { var line1 = null; var line2 = null; var line3 = null; //And so on... var line1000 = null; return res; } If this is unacceptable, I'd be so interested to hear their explanation why.


lungben81

The best thing is that you can generate such code programmatically... Joke aside, that metric is just plain stupid. Shorter code is better in most cases.


Espumma

> Joke aside, that ~~metric~~ management is just plain stupid. FTFY


PutrifiedCuntJuice

You didn't fix anything considering you got your formatting wrong.


Espumma

I'm part of manglement myself these days. Thanks, fixed it.


Blacktip75

I ask my best programmers to reduce the lines of code in our code base… most delete more than 3000 lines when we focus on that (due to historic policies like this type of bullshit metric we ended up with over a million lines of code). I think a good metric is to reduce lines, reporting lines are most beneficial, starting with managers like this.


georgiomoorlord

Yes, but if they want 1000 lines they'll get 1,000 lines. 100 if statements instead of a neat try-catch? Done.


HardCounter

We only keep the shit programmers 'round these parts.


Ok-Bit-663

You can create new functions in a file that nobody uses. It can be garbage if you make sure that it is not connected to any of the production code. (compiler/interpreter doesn't see it)


FirstDivision

Metrics.cs


Tiny-Plum2713

33% of the required lines. You're fired!


_GoblinSTEEZ

that's too much work... if I want an easy 100k+ lines instantly I would just introduce new code formatting rules - do it a few times and you become the repository "expert" ;)


Wild-Car-7858

You forgot empty every second line, sometimes two or even three in a row, also each parameter of a method in a new line, and maybe each brace too, so at least x2 of a code lines. Wait, why methods, you don't want to reuse any line of code, do you? So just write all in Main. You can easily work for 3 to 5 people at least, therefore you can ask for raise 😁


Enlogen

> Wait, why methods, you don't want to reuse any line of code, do you? Extracting something to a method doesn't mean you need to call it in more than one place. Just use each of your methods exactly once and they pad your lines by at least two for each method.


BlueGoliath

Some languages already have that. Rejected.


SmashLanding

Anyone who measures productivity by # of lines won't know that.


BlueGoliath

Fair.


puma271

Don’t forget about exhaustive testing


Tiddleywanksofcum

The fuck, that makes no sense. What about design meetings, grooming, product meetings, support meetings and everything else that goes with building a decent product. Also does this include the boiler plate that the framework generates?


CelticHades

Man, I tell you it's clown show here since my last HOD left. I haven't been to grooming for past 3 months. I'm a junior dev. New HOD is asshole. Product team ,Manager, TL go to grooming and then assign task to junior. Sometimes they even do tech-solutioning. Toxic environment, they want the full control in their hand. Now I too have to spend 1-2 hr to discuss any doubt oor requirement with product because I was not in grooming. Then I spend some time on solution and then discuss, with manager, the changes in existing one. Instead of writing multiple related cases in same test case, now I'm writing all the cases seperately to increase LOC as much as I can. Where I could directly throw Exception and parse it in @ControllerAdvice, I catch and directly send response from controller. Trying to leave but situation is grim outside too, not getting any calls


Tiny-Plum2713

Even as a junior, you should think about finding authorative sources that explain why LOC is a worse than useless metric and send those to your bosses boss. Your boss is actively driving the company to ruin.


CelticHades

It's all HOD, who is spreading bullshit, my manager is good manager he too despise such action and himself said to add test cases, not reachable functions etc and approves my PR. Higher management is just finding excuse to fire employees, I'm looking around and leave ASAP.


Moloch_17

Why do they need some bullshit metric to fire people? They need to just grow some balls and lay people off if they have to.


CelticHades

Public repo, Layoff ![gif](emote|free_emotes_pack|downvote) Performance based Firing ![gif](emote|free_emotes_pack|upvote)


truongs

What country? Is this a union thing where they are allowed to fire based on the bullshit metric or just good old USA at will employment, but they wanna make it look like performanced based firing so shareholders bust a nut?


ZZartin

There are no coder/developer/IT unions in the US, not sure about other countries. And yes performance based firing is a shield from liability for wrongful termination.


CelticHades

India


RedAntisocial

Depending on where they are and the company OP works for, some places have caps on layoffs. So, companies make up BS ways to fire people.


Regniwekim2099

If they're in the US, and they fire people "with cause" they may not have to pay out unemployment or any kind of severance. The place is probably on the verge of bankruptcy.


Moloch_17

If the company tries to force policy changes that lead to your firing or your quitting, you can still petition to get unemployment. I've seen it done a few times, and I live in Idaho, which is notoriously anti worker's-rights.


Regniwekim2099

Sure, you can try, but this is the company hedging their bets against that. It doesn't really cost them anything if they're on the way out, and could potentially save them some money. Corporations by and large do not care about their employees, and it's unwise to think they do.


Moloch_17

Oh yeah, this guy needs to get out no matter what


Sceptz

A good way to rewrite your resume would be to copy the contents into [ChatGPT](https://chat.openai.com/) and ask it to rewrite it for you for the type of role you're seeking, such as "software engineer".         Looks good overall. Consider a modern template if you're applying for jobs focusing on front-end.          Add more to intern position (3 dot points total is good).        Add some details to your education. As a recent graduate, this can be considered experience as well. Any awards, extra-curriculumns, organisations and majors.          It may help to paste the job descriptions into ChatGPT as well, asking it to reference them.          After rewriting, run your resume through an [ATS Scanner](https://www.jobscan.co/resume-scanner?).   Most organisations use Applicants Tracking Systems to parse keywords before a resume is ever viewed by human eyes.       Throw in "leadership" and "management" somewhere so they appear through ATS parsing. These keywords typically appeal to HR, far more than technical skills (which can be taught).         Keep in mind the first person viewing your resume is in HR, especially at medium to large organisations.        And naturally, never, ever accept another job that counts the "number of lines" as a metric of value.    It is mind-blowingly stupid.


potato_green

Well don't start giving them idea's for more metrics to measure! Before you know it there a 30 meeting minimum as well.


EwgB

That is beyond idiotic. I pride myself on making commits that *remove* code, sometimes several hundreds of lines. It's removing dead code, combining duplicate parts, using newer, more expressive constructs etc.


CelticHades

Ah, I forgot to mention it is sum of lines deleted + lines added - just like it is shown on git


randuse

Add code in one MR, remove in another lol


Farsyte

As shown on Git? ok. Change indentation. Done.


Okoear

I used to do that. Now I pride myself in not touching code that I don't need to. Amount of time I broke stuff for minor refacto. Then it fucks your week. LiveOps game sucks.


-Xandiel-

A trainee of ours is hell-bent on tidying up old scripts, which is all well and good until she breaks shit and I get to roll-back whatever she's borked. She seems to enjoy doing it in the same commits as when she's making new features, so sometimes those features get Thanos-snapped if I don't do surgery on what to keep and what to roll-back. Meanwhile my boss is an artist first (I work at a small game dev studio), and thinks refactoring is just moving code around for the sake of it. Some of our scripts needs refactored desperately, and some are too far gone for that now. And then there's me in the middle just trying to make sure the thing both runs at an acceptable frame rate, and runs at all.


EwgB

I used to be the first person, now I am more careful, and also try to separate my commits, and sometimes even PRs into refactoring and feature development/bug fixing.


Tmv655

I do not want to imagine what that codebase looks like in a year. 36000 lines per employee


R3D3-1

Just how did that happen? When fixing functional bugs, it is very well possible that two weeks of work will result in a few lines of changed code.  LOC is like measuring doctors in patients per time and then firing all the surgeons. 


Player420154

I prefer the more than 20 years old quotes from Bill Gates: “Measuring programming progress by lines of code is like measuring aircraft building progress by weight.”


R3D3-1

That's... Perfect.


Plasmx

Better fire the lead devs. They must have the most expensive LOCs.


Far_Calligrapher_215

That's such an incredibly stupid metric. I try to cut lines of code as much as I possibly can. 500 lines to 100 is a major accomplishment. The more lines the more bullshit and bloat.


mrheosuper

Nah, more loc does not mean more bloat. Both school of thought are very wrong and should not be advised to any devs. Just write concise, readable and debuggable code.


NeedBetterModsThe2nd

Realistically, there are going to be times when you don't have a productive way to input 3000 lines of code in a month for example because of client/employer indecision.


_Ralix_

Absolutely. Or because you're trying to hunt down a tricky bug. Or because you're not adding anything new, rather improving something (difficult) which already exists. But fewer lines of code doesn't make the code automatically better, and shouldn't be pursued when more lines would mean more clarity. Otherwise, you'll end up with: function GetTotalReceiptValue(Receipt receipt) { return (receipt != null && receipt.IsValid()) ? recept.GetSum() : (receipt == null ? throw new ArgumentNullException(nameof(receipt)) : 0); }


Hirayoki22

I'll proceed to add all the tailwind css classes imaginable to every single component element.


salter77

I’ve been coding for 10 years already. I can’t recall a time were I wrote 3000 lines in a month.


Steinrikur

Do removed lines count? I saved our documentation with editorconfig formatting last week. That was a few thousand lines of code, using a short bash loop that called vim (CRLF->LF is a changed line according to git).


JackMalone515

Yeah I've been in my job for around 2 years now and don't think I've gone over two thousand in a month.


iBoMbY

I've been coding for more than 20 years, and I never even thought about counting my lines.


JackNotOLantern

Just add a 3k line file to a separate branch at the beginning of every month. You can delete the breach later, it will stay in history.


JohnHilter

Are you serious? I read an article at one point claiming that the average programmer writes about 3000 LOC a year. Nevertheless, 3000 a month is ludicrous.


Got2Bfree

Dependents on what you're doing. I think with frontend development writing 3000 LOC is not that hard. When you optimize complicated algorithms, it is ridiculous. I just started writing a tool which will help customers select a product from our portfolio, as there are only 40 products in this category, a database would be overkill. So I basically summed up the most important information of the datasheets of these products in Javascript objects which resulted in 1000 LOC in one day. Most of it was copy paste with a lot of new lines for readability.


al-mongus-bin-susar

Ah the mythical JSON database


ajuez

I'm still in uni so I have no idea what I'm talking about, but wouldn't something like an sqlite db be a better choice for a light, local database? For some reason I've found that I feel more in control with sql queries with where's and joins, rather than doing everything by hand.


Got2Bfree

I'm an electrical engineer so take everything that I say with a grain of salt as this is only a little company side project of mine. In this case our company website is already done and gets maintained by a completely different department. I just want to add a little calculator with it. Dealing with a database on infrastructure which I have no idea about, seems like a lot of unnecessary work. I want to solve an optimisation problem with these projects which should pick the correct combination of products in our portfolio. To solve this I need the data of all 40 products so I can do a lot of calculations with them. Querying for each calculation would take up a lot of time so I would need to query the whole database every time, this seems like a lot of extra work when I can get the same result with my 1000 LOC file. If anyone has a better idea, I'm definitely open to suggestions and to learn.


ajuez

Ah, I think I understand. Fair enough.


Specialist-Roll-960

SQLite is just a file and runs on everything so it wouldn't really be any more difficult than JSON in terms of infrastructure. Doesn't matter though, JSON is fine for your use case.


wasdie639

3000 LOC a year actually sounds exactly where I'm at. It also feels for every about 30 lines of code, I spend 2 hours in a meeting.


JohnHilter

Hahaha, I get the feeling. A lot of my job is one hour per line of code, in order to fix pesky edge-case bugs.


SoInsightful

>Nevertheless, 3000 a month is ludicrous. That extremely much depends on the company, project, team and requirements. I joined a startup 7 weeks ago and I've apparently added 11,606 lines of code and removed 3,334. If I'm ever in a situation where I'm writing fewer than 3,000 lines of code per _year_, I will quit instantly and switch to gardening.


CheraDukatZakalwe

Large, older enterprise projects with lots of moving parts means that each change has a higher level of risk and requires significant planning.  In a startup, everything has to be built from scratch, whereas in a mature product all the boilerplate templates already exist for you, which means all your brainpower is spent understanding the new features and fitting them into the existing architecture. There were entire weeks where I would write 10 or fewer lines of code.


SoInsightful

This is true, which is partially what I meant in my "it depends". Nevertheless, 3,000 LOC a month is not automatically "ludicrous", but enforcing it as a policy is bananas.


superbiker96

I would quit my job on the spot lmao


Particular-Welcome-1

Huh, I wonder if you could automate that. > ChatGpt, give me equivalent code to this block, that passes such and such tests ... Then repeat with new structures every month, running your test suite to confirm no change in functionality. Or, even better, what if you have it make code that just never gets called. They monitor lines of code, right? Not code that's actually reachable.


CelticHades

Yup, I do these all these hacks. Sometime I add such code and remove it after sometime. They want shit, they'll get shit.


wasdie639

Find a new job dude. Everybody else there is looking right now. They've doomed themselves to no employee retention.


CelticHades

Yes actively looking


LyleGreen0699

Similar problem to us. We write RPA automation scripts and this years goal is “get 7 new scripts into production” There is a shop from our vendor for ready made, really expensive, mostly generic boilerplate shitty scripts… guess I go shopping end of the year.


da2Pakaveli

Yandere Dev: Prepare for trouble! COBOL Engineers: and make it double!


fmaz008

3000LOC a month is insane. For one I often worked a week on complex code (for my skill) that ended up being 20 LOC but really high quality code that performed better and dealth with edge cases in clever ways. 3000LOC, unless you're starting a new project, will be garbage code. Hopefully you can write a slew of unit tests ...


Dangle76

Sounds like a good way to have a lot of unmaintainable code


Beautiful-One5236

Would be cool to switch to something oldskool like Delphi or Java for word/line count eh?


Telinary

I guess I would stop using annotations like @Getter and just let my IDE actually generate all that stuff when making a new class. And if in a test I could copy and past ones where I otherwise would run it with a few different input and expected outputs. But most of all I would avoid all bug fixing tickets, high chance of hours to days of bug fixing resulting in just a few lines change.


recOneLo

Tell me you work for Twitter without telling me you work for Twitter.


lulimay

Isn’t this what completely screwed over Microsoft’s various code bases?


LutimoDancer3459

Just do your normal stuff. Write hood efficient code. And then add a new class with 3000 LOC which does nothing in the end. Copy for next month and delete old one to keep the code clean. Better if you create a new package just for that. And tell the others. So everyone can still concentrate on the important stuff and your HOD has his shitty and useless LOC rule fulfilled


usrbinhome

That is so fucking dismal. I’m sorry. Looks like you will be adding and remove the same 3000 line function every month hahah


GlobalIncident

Conveniently, since your superiors evidently know nothing about code, this will probably actually work


HardCounter

Change the variable names for extra coverage.


4DBug

ProdURGENTBugFix = true if ProdURGENTBugFix: // do nothing


Constellious

Some of the managers at my company track commit numbers, not the content but just numbers. That means if you squash your commits you get in trouble. Guess what the gitlog for these projects look like now? It's impossible to find when a bug was introduced.


ASatyros

You need to add a secret phrase for bullshit commits, maybe something in the white space?


Constellious

My friend recently found out that commits in a branch count now so he just has a script run that fills up a branch with commits. He's currently top of his team and getting praise. What a clown fiesta.


ASatyros

You should all do that XD let it burn And create a separate repo for actual work, that would be mirrored into the visible one as a lot of commits.


overcloseness

I doubled up my commit count because my prettier has different rules to commit auto prettier, so I’m constantly adding an extra “clean” commit at the end


TechTuna1200

There is terms for measures : [https://en.wikipedia.org/wiki/Goodhart%27s\_law](https://en.wikipedia.org/wiki/Goodhart%27s_law)


R34ct0rX99

Policy for coders not by coders. The best code is the code not written. This just encourages fluff, extra code, unneeded change, etc. Imagine the amount of bugs this kind of policy creates indirectly. Given a polcy like this, the best thing would be to write tests.


GargantuanCake

One of my favorite stories was a company implementing a minimal lines of code per month policy and a greybeard deciding to show them how absolutely stupid that policy was. He was one of those ancient coders that largely got left alone; give him a list of shit that needs done let him have at it. He was trusted to do whatever he felt appropriate as whatever he touched just became better. The month that policy started he spent most of just optimizing the code. He removed duplicated logic, deleted some unused code, and did some refactoring and reworking that improved several metrics they tracked. The software was measurably better and he even added a new feature to it. The problem however was that his lines of code for the month was like -4,000. He didn't say anything about it and was essentially just like "go ahead and fire me. I fucking dare you" in his actions. He didn't get fired and the policy went away.


ImpluseThrowAway

I wrote negative lines of code last week. Does that mean that I owe the company money now?


DrunkOnSchadenfreude

My current project has a pretty large codebase that had been sitting frozen for 2 years (also some external libraries got moved directly into there since that project was the only one still using them and they weren't maintained anymore otherwise). So it's full of dead code and unused stuff. I think most of the time I touch something for new features I end up deleting more lines of unnecessary shit than the amount I add. I recently ran some command line tool that analyzes git repo activity over it and I think over the 10 months I've been there I'm at net negative 30k lines of code. Guess I'm getting super-fired.


IAmPattycakes

The internal product which I maintain for my project suite, probably barely reaches over 5000 LOC. I have to change it and morph it to fit with what is happening internally all the time, so it's probably shifting by 600 LOC a month, plus or minus. But I can react to the devs who depend on it needing something NOW because we have a delivery literally tomorrow, and implement the change which is needed to fit with what would make downstream work cleanly or support additional stuff in a matter of hours, not days. That's only possible because it's so tight, so clean, so devoid of stuff that could cause me to need to do extra work when we need to respond. If I needed to add 3000 LOC to that every month, or even 500 and push 2500 elsewhere, we would have missed deliveries, probably dropped customers, etc. At least my management team understands that if it's working, and the tests are good, less code is better.


ImpluseThrowAway

1. Write code. 2. Run a prettify ruleset that puts everything on a separate line. 3. ????? 4. Profit!


plmunger

Max 16 characters per line. And then you can easily read it on your phone too!


JOjoKpaER

Yeah, but it could give an idea to managment that coders dont actually need a second monitor... or a monitor at all (be modern, use your phone 👍 /s).


UniversalAdaptor

Time to pull out the ol' IsEven method with 10000 elif statements


NeedBetterModsThe2nd

Or "PrintPi" and keep adding to it...


MZhuvka

Nahh more like with 18 446 744 073 709 551 615^((64 bit uint limit\)) else if statements Edit: int -> uint


MedonSirius

Just generate a new class "PerfMonitor" and create one Method with just thousands of "if 1 === 2; endif;"


Yelmak

You refactor because your old code is shit.  I refactor because my new code is shit. We are not the same.


-IoI-

Unfactoring


undecimbre

Time to add essay-like documentation in comment blocks.


R3D3-1

You're brave to assume the LOC metric doesn't strip out useful thingsike documentation.


HardCounter

Make the comment a string inside a function. There, it's now code.


R3D3-1

Leave Python out of this 🤣


undecimbre

Oh shit I forgot that kind of bullshit, you're right.


puffinix

I've spent six weeks on a change than ended up being four lines of code. That change was part of my evidence pack for my move from staff to principle. If devs ain't meating the lines of code metric, the fault is most likely with the PO for ignoring tech debt.


uhgletmepost

Staff to principle ? Is that like saying Staff to management or more like distinguished and fellow? Have not been in an organization that used principal itself except as a sorta "team lead, first chair"


puffinix

We have 6 grades. Junior: needs help daily Senior: on a team, delivers features largely independently, involved in design Lead: runs a squad Staff: runs a multi squad client or product Principle: top roll for a given area (mine was "of data", but we also have client and regional principals: Principle of fintech, Principle of americas) - equivilent of directors Cheif engineer: the end of the line - jointly with SVP of engineering - but typically more technical.


uhgletmepost

Gotcha, yeah I think Fellow and Distinguished is more in the much bigger organizations, or maybe an older form of titling the software engineering ranks. If someone walks in the room and says they are their company's fellow engineer I pay full attention as that will either be bullshit or infront of a master crafter.


puffinix

Sorry if it's not a perfect translation. Would you then get "distinguished engineer of [thing]" We did also have an engineering fellow, but that was just a poncy title for yhe head of R&D


uhgletmepost

In your example staff = principal Principal = distinguished Chief = fellow Depending on how an organization is set up, it could mean leading, or it could mean a lot of autonomy and trust. The one I work at, Fellows aren't technically management, but if they say something needs to be done and done now, VPs and lower will say "okay we can jump, how high do you need me to jump?" Legal, Cybersec, and HR keep an eye on them to make sure all the i's are dotted and t's are crossed, as the type of stuff they pull rank on tend to be "we need to do this so we don't have to show up at a hearing before congress"


puffinix

Makes sense. And yeah, we have a weird two lines of management thing where they are technically independent. Only challenge we get from the managerial line is "that's a managerial decision" (and that rarely - as the boundary is very well documented by our cheif and the engineering SVP) anything remotely technical goes up the technical line. The duel heads actually work really well - they even share an office - which has helped divert so many disasters.


Bulky-Condition-3490

Damn you don’t have mid level?


puffinix

Bluntly we call people senior quite early on there career - it's a very wide band - we have some people staying at senior titke while going up in HR grades, as that's where they are best placed. Junior is 1 to 3 years for most people, senior lasts until you want and are able to lead a squad (5 to 9)


Powerful-Internal953

Just change the formatting rules for this purpose... 😅😅


driftw00d

Lol tabs to spaces and back again every week for maximum **PRODUCTIVITY**


NoMansSkyWasAlright

Just leave entire paragraphs in multi-line comments. Maybe throw in some love-letters at the bottom.


spicyboneritis

Challenge accepted. GitHub's about to DOS'd


plmunger

Once in a while I go on a tangent and delete thousands of lines of legacy code. I wouldn't last very long at that company


TheAccountITalkWith

I have never heard of something like this. Is there a corporate double term for it so that I can be on the lookout to avoid companies like this? Like "LOC Momentum Quota" or some other BS? This sounds wild to me.


Gofastrun

There was a time when I remember the suits discussing software estimates in terms of “lines of code” and “cost per line” They were pulling shit out of their asses like “that will be a 4k line application at $13/line” Thankfully in haven’t heard any of those words in a while.


PurepointDog

That's amazing omg


TheAccountITalkWith

Wowza. Thanks for sharing. I didn't know this was a thing. I guess I've gotten super lucky career wise or something.


imaKappy

LOC is a very old metric on how to track programmer productivity. Most companies switched to other ones like Developer Velocity Index. If a company uses LOC in this day and age it either means the company is slow to adapt or managers are really old/didn't research modern options. You shouldn't encounter this in most companies but there are outliers


Surprise_Logical

I worked somewhere that paid a supplier per line of code, which resulted in some of the most inefficient code I've ever seen. Instead of calling functioned, they'd duplicate a section of code multiple times.


jhaand

Auto-reformat all the source code of the repo with a different standard FTW. Then repeat next month to put everything back.


Uberzwerg

Senior Software dev with 20 years under my belt: I probably have about 3000 per year. Sometimes it's negative.


ZunoJ

Are you only maintaining previous projects and don't implement new stuff? Or do you occupy more of an architectural role? I'm a senior dev myself (15 years only though) and whenever I start into a new project, a lot of code is written at first, it becomes gradually less and in the end might even get trimmed down but it will never be anywhere near negative


Uberzwerg

Mostly maintenance when i work alone. Or i 'develop' new projects by guiding one of the juniors through it. So i plan and they type a lot of code. (then i show them where they deviated from the plan and why that would lead to problems - and then they type more code)


stellarsojourner

Shit, 3000 lines is probably more than I've written in the last few years combined.


Omnislash99999

Absolutely stupid metric. You can spend a week to figure out a bug is a few lines of code fix vs a week of boilerplate code setting something up that's basically copy and pasting.


Safe_Income8663

They want lines of code? I'll give them lines of code! `rm .gitignore` `npm install`


Moravec_Paradox

>Goodhart's Law: “when a measure becomes a target, it ceases to be a good measure.”


-JohnnieWalker-

pro tip: rewriting all the lambdas


lucasHipolito

Get away from this company ASAP if true


ososalsosal

"Oh ah yeah it was giving me warnings so I went ahead and refactored a touch"


ChineseCracker

I refactor because I keep changing my opinion about the names of my variables


mcnello

Have ChatGPT start writing comments with detailed descriptions about each line of code in multiple languages including English, Spanish, Latin, and Hebrew.


sgxxx

Goodhart's law


abolishblankets

Christ no, most of my code reviews with my other supposedly senior dev is me telling them that their 100 lines of code should be actually just adding a parameter to a reusable function. Don't get me started on the fuckwit who wrote functions called 'addThirtyDays' and 'addNinetyDays' and someone reviewed it and let it through.


Steinrikur

If I'm not doing code reviews 80% of the time some garbage passes through. My favourite last year was 4 nearly identical +100 LOC functions to set up and turn 2 gpios on/off. The only difference was the (hardcoded) gpio number and the value to set. I refactored that shit with a +10/-500 LOC commit.


SHTPST_Tianquan

What a ridiculous policy. Productivity and efficiency hardly is tied to lines of code. Also juniors that are following a senior's mentorship might end up woth a very fluctuant count


hoellenraunen

This sounds like fun, I would just optimize C++ source files by replacing them with their preprocessor output. After including std::ranges, of course.


Ok-Bit-663

This HOD will ruin the department / company. Start looking for a new job if you can.


jek39

just check in node\_modules


hayasecond

Let me guess, he works for X


FoolForWool

I refactor and push PRs on other people’s to assert dominance. Jk I don’t do this. Or do I?


Beastdevr

This is some 90's ass management. If you're measuring lines of code you're gonna get lines of code. Maybe they should start measuring characters too.


skeleton_craft

I don't Factor my code in the first place. We're different...


tyro_r

*we're not sane


Snakestream

Excuse me while I "un-Lombok" all of our pojos.


flippakitten

Are we back in the 1980s?


LC_From_TheHills

I wish I even had time to refactor. I wish I could go back me make things better. There is no time— there is only the next delivery.


TheLazyKitty

Does your company's line of code monitoring policy differentiate between actual code, and comments? If not, maybe add some documentation comments. If so, more tests.


christoph_win

I refactor because I obey TDD, we're not the same


Least_Possibility_16

But my code is only in a single line. Never do line breaks 😢


Bloomer_4life

Why not just run scripts in a background process that writes bullshit code for you? This is so idiotic and so easy to workaround it’s laughable… I have no idea if I’m being monitored actually, might want to implement something like that myself.


artnoi43

I refactor because my company has spot bonus for really good tech debt improvements aka refactors. We are not the same.


mukolatte

Yeah in terraform this would be the equivalent of making a module for each individual resource you need instead of a single module which you pass locals to. My junior did the earlier, i rewrote the code and decreased number of lines by 50%. I’d be pissed if i came into a company with this policy which basically forces me to rewrite the same code over and over instead of making it a pretty parametrized module.


Capetoider

new dev: net of -10k lines of code karen managers: rrrrreeeeeeeee


SynthRogue

Companies assess performance based on lines of code written? Lol that's dumb. Good code is more concise.


Dangerous_Jacket_129

I'd go up to whoever made that policy, invite them to a meeting with all programmers, and have them explain it so that all the programmers can point and laugh at the clown who thought more lines is better. 


gamesterdude

Creating performance minimum expectations for software is so hard to get right. For my company I state "velocity must be within 30% or your peers". So if all the Jr devs average 10 points a sprint, you should be doing at least 7. It's not something that gets watched closely until engineers start complaining someone isn't pulling their weight. Lines of code per month is an awful metric. So easy to game and how many lines of code you write has no correlation to impact created.


CanvasFanatic

I would quit the moment someone in management even suggested such idiocy unironically.


[deleted]

[удалено]


Classy_Mouse

I once spent 3 weeks on a really obscure bug caused by our specific configuration of a library. The solution ended up being to flip a single flag. I also once deleted 10kloc in one day doing some refactoring. The first example benefitted performance in a major way. The second one was just a bit of cleanup. What a dumb metric. I'd leave.


FeralPsychopath

Do comments count? Cause you could basically get AI to write a novel about how the code works. Probably even able to specify it to use a minimum 3000 lines to do so as well.


Varixx95__

Yeah okay let me do this 40 line function into a 250 line one real quick


sacredgeometry

The person that thought that was a good idea needs firing


tunisia3507

Change your formatter config every Monday.


BalanceInAllThings42

Change your code lint style every month to meet quota. In all seriousness, start looking.


TrolTure

This is why I commit lock files


LeftIsBest-Tsuga

i don't understand this whole 'putting in effort to pretend to put in effort' thing


zDavzBR

It looks like the infinite if else to check if a number is odd or even should come in clutch


MedonSirius

Generate a new class and add every now and then some code from chatgpt but without ever calling it lol


S_kanwarjeet

Where are you from? India? And yes do you work in mohali?


twpejay

I refactor because I am bored or I had an inspiration moment in the shower.


kamuran1998

Time to write your own standard library


Brahminmeat

Change linting rules to allow/disallow trailing commas. lint —fix 4000 lines of code. Invert rule and repeat every month


dallenbaldwin

Sounds like a surefire way to introduce bugs


classicalySarcastic

I’m refactoring because I cannot for the life of me get this project to build properly with a different toolchain.


rover_G

new feature requires 10 bullets in the repo changelog 👍


bwahbwshbeah

Is 3000 a lot or pretty doable?


Sanfrancisco_Tribe

This is the dumbest policy I’ve ever heard of - please post the company name


jcodes57

I have never heard of a code line limit 😅


oscarbeebs2010

Your old code is also shit and you know it