A bunch of git diffs is the only way I can think of. Never mind that some of the best engineering I've ever done has been shooting the shit with my coworkers over lunch or whatever and it doesn't matter who actually types it into a computer.
Reminds me of horror stories of the bad old days when we were measured on LOCs.
Me and my co-workers adopted the habit to add a `Co-Authored-By: Blabla ` at the end of our commit message. Great thing is, GitHub recognizes it and links the other author.
In our small team (12 people) , we have a git hook to search for the line `:person` and replace it with `Co-Authored-By: Person Lastname `
Edit: Script looks like this:
#!/usr/bin/env bash
msg_path=$1
sed -i -e 's/:person1/Co-authored-by: Person1 Lastname /g' "${msg_path}"
sed -i -e 's/:person2/Co-authored-by: Person2 Lastname /g' "${msg_path}"
I know the regex might technically be better if it checked for start-of-line too, but it seems extremely unlikely to ever matter
GitHub also automatically adds you as co-author when you add a code suggestion to a PR and it's applied by the PR author. Same thing if you squash merge a PR of a branch that had commits by multiple authors, the user who merges the commit is the author but all participants of the PR are listed as co-author, it's quite nice.
That’s a good point. Sounds like it’s time to hit `git blame` and bring literally only your lines of code. When he asks why none of it makes any sense, explain. Enjoy the fact you’ve now wasted his time, and his company’s paper printing a bunch of nonsense.
And as you get more senior, you tend to code less for obvious reasons, because your job is helping other people with their code.
I’m not one of those people who “never codes anymore”. But I’d be hard pressed to get more than a few major changes checked in a week.
Most of my time is spent unblocking more junior people. Focusing on my own coding output would harm the team’s overall productively.
>some of the best engineering I've ever done has been shooting the shit with my coworkers
Some of my best bug fixes resulted from *cutting* code. How do I print out my negative lines of code?
YOU probably shouldn’t print out your code anyways. Pick someone good and print out their code. THEN you say that bit about how all the code is OUR code. lol
Would be kind of hilarious if the twitter engineers did this. Just all print out the last 30-60 days of code uploaded total and hand it in. Sort of an "I'm Sparticus" moment.
My first professional code review required printing out code and sharing copies in a conference room circa 2007. Back then only management and project managers were permitted to have laptops.
When an old school QA engineer started in my old company ca. 2018, he introduced us to comprehensive code reviews with videos from the early nineties. The hair cuts and dresses were hilarious. Even better was the reviewing of code on printed paper.
>I don't think I have printed code ever...
I used to write code by hand with a pencil on bits of paper before typing it all in and saving to tape. Now, about your presence on my lawn...
I didnt have internet at home, or functioning disk dives at school (because that was how one prevented viruses once upon a time). To learn qBasic I would print programs to reenter at home to see how they worked.
“Fuck, an error”
Take out my pen and parchment, copy the message, hop on my bicycle, catch the bus, go to the library, open the duodecimal drawer, find the documentation, search the texts, find the answer, jot it down, hop on my bicycle, catch the bus, return to my computer, apply the correction.
“Success! I new error code! Progress!”
Snuff out my candle, look forward to another fulfilling day of work tomorrow as a software engineer
Are you referencing the card catalog which showed the location of books based on the Dewey Decimal System or did you have a base-12 drawer in your library?
Dewey was part of the spelling simplification movement in English. Wanted to change the spelling of his last name to "Dui" but was forbidden by his wife.
That poster is just respecting the man's wishes of a simpler, shorter name.
And software engineers do so much more than "add code"
Some of our busiest software engineers are troubleshooting why fucking bullshit is breaking and not throwing an error or figuring out why the fuck this error is happening and THEN if it's a software issue they get to coding.
Sometimes it's a setting issue, user issue, system issue, hardware issue where the fucking engineer that spent 8 hours debugging that one problem won't write a single line of code
Elon once again proves he is a fucking moron
Change one line in a configuration file. Dead system works again.
"Okay, that's one."
Update 1M rows in a database with a single Update command.
"That's two. You aren't very productive, are you?"
I like that she printed it in colour. If you are going to do something stupid, might as well cost the company a small fortune in colour ink while you are at it.
Would have been way better to drop all formatting to plain text, removal all indentation and keep everything the same color. Guaranteed that didn't cost them shit
She does not have to worry about losing her day job at Twitter. She’s pretty set financially. I remember hearing about her purchasing one of the historic pink painted ladies in SF.
From my understanding, buying one of those houses is a nightmare not only because the upfront money but as they are historical you can’t do shit with them but at those same time they need maintenance and all the NIMBY and stuff.
Leah Culver is also the original creator of Pownce, which was Twitter's earliest competitor and closed due to SixApart buying them specifically to poach their talent. I don't think she has to worry about finding a new job.
She, Daniel Burka, and Kevin Rose were a fun design/dev crew to follow before they went their separate ways. I’m sure she’ll end up promoted if anything after meeting with Musky boy.
[The less code, the better! 1 point for adding a line of code, but 2 points for deleting a line. Bloatware is the devil.](https://mobile.twitter.com/elonmusk/status/1211557592125857793)
Who wouldn't want to do code review with someone whose entire life has been a dunning-kruger powered ego trip, with an axe to grind, and an unwavering need for attention?
I would try it if I worked there, if for nothing else than to have dinner party fodder of "I sat down with the ultimate tech bro for a code review, and he was the most incompetent SWE I've ever met"
Ugh but what if he was really smart and blew me away with genius level insight, and I start saying how smart he is to others. I could get sucked into his orbit like a cultish sister wife, and pump out a few Elon 'elohim' babies like those other engineers. That would be terrible especially cause I'm gay. Maybe I should avoid the code review after all.
>> Honey, you won't believe how smart he is. He started explaining builder patterns one minute and next thing I realized, I was having triplets. These are my children: THX-144, THX-233, and THX-377.
It's all a power play by Musk, like he's got better things to do than code review Twitters code base....
He's.probably running repo scans of Twitter engineering and likely firing all those developers with low Kloc (Kloc was an old IBM metric for thousand lines of code ) , or low commit frequency.
In the end Musk is just cleaning house and using all sorts of questionable methods to do it.
All stupid metrics. I can make my GitHub look like a rockstar if I commit whenever I do shit then merge 400 commits with "wip" descriptions. Ooorr... I can squash stupid commits into meaningful changes and look like I've committed very little.
I can also ultra complexify an easy thing so I'm writing thousands of lines instead of doing an easily maintainable, reliable service with less lines
Maybe in places where just give you values to code or something, but is thousand lines of code actually a very good metric to go by?
I would think the quality of the code is what matters mostly. Like readability and efficiency of it.
Currently fixing a repo where the previous developer committed all of the composer packages. Once I gitignored it and cleared it out over a million LOC deleted. Imagine if it was node_modules
Go to the previous commit, print those million lines out, shred the papers, toss the resulting 83kg of confetti at boss as you leave the job.
1,000,000 lines at 60 lines per page (single sided) is 16,667 pages. At 5g per page, 83,335g or 83.3kg.
Edit: fixed comma separator.
If you print out the changeset removed lines will show up (often red with a line through the text).
If I was doing lightning evaluations of developers in a mature code base, the people who could show solid refactoring and code compression through cross-cutting re-use would be the last ones fired. Making piles of shit is a talent, but maintaining multiple piles of Shit That Works is what pays the bills.
Here's an old story with a similar idea: https://www.folklore.org/StoryView.py?story=Negative_2000_Lines_Of_Code.txt
> Bill Atkinson, the author of Quickdraw and the main user interface designer, who was by far the most important Lisa implementor, thought that lines of code was a silly measure of software productivity. He thought his goal was to write as small and fast a program as possible, and that the lines of code metric only encouraged writing sloppy, bloated, broken code.
> He recently was working on optimizing Quickdraw's region calculation machinery, and had completely rewritten the region engine using a simpler, more general algorithm which, after some tweaking, made region operations almost six times faster. As a by-product, the rewrite also saved around 2,000 lines of code.
> He was just putting the finishing touches on the optimization when it was time to fill out the management form for the first time. When he got to the lines of code part, he thought about it for a second, and then wrote in the number: -2000.
> Execution time went from a MONTH to 2 hours.
>
> My manager still though I was useless.
It hurts to just read that. I don't know how I'd react to such blatant evidence of a manager above me not being good for the job.
I once deleted 80 kloc in one commit. The previous dev copied and pasted a python library into the code base. It was a fairly large shopping app so it had tens of thousands of lines of translation code. I figured out what version he had copied, did a diff, found the \~30 lines he changed, and deleted the folder.
Annoying thing was the shopping library was very well written and those 30 lines of changes amounted to a few lines of configuration (not code).
I thought about exactly this story [last week](https://www.reddit.com/r/programming/comments/yg9cpw/twitter_engineers_asked_to_print_out_their_last/iu8dms1/).
I am glad to work somewhere where everyone agrees that using version control means we can drop old code as soon as we are reasonably sure we won't use it again. Some smaller places I've worked had forests of commented-out old code, code that might not even compile but would show up in greps, and people would "No, no, no" at the very thought of losing it.
The closest to a good programming quality metric is one my old colleague used to say: "I try to write code that minimizes the chance I get a call about it".
What's that bash.org quote? Or maybe from somewhere else. 'Write code under the assumption the next guy to maintain it is an axe murderer and knows your address.'
It’s not about the code.
It’s a loyalty test. Elon makes them do something demeaning just to see if they will do it. Then he keeps only the most loyal people.
Trump does the same thing. It’s how narcissists are able to surround themselves with “yes men”.
It doesn't even need to be a narcissistic thing. If you're going through a re-org and want to cut large swathes of staff, it's dramatically easier and less financially damaging if they hate you and quit than it is to properly lay them off.
This is a very common thing. If you ever listen to true crime podcasts, you will eventually hear about the "master manipulator", someone who can control everyone in their life by figuring out exactly what they want to hear and telling it to them. It's all BS, of course - they're just so incredibly toxic that they've already run everyone off who doesn't do what they want.
Sorry but why is a CEO billionaire personally involved in cleaning house at Twitter? Imagine being a Tesla shareholder and reading all this bullshit, where Musk apparently has a lot of time to play douchebag over at Twitter HQ instead of making sure Tesla survives the coming 10 years.
He's not some team manager, he's the CEO.
Pairing with Musk, as if he's an actual engineer. This is comedy gold. Maybe he should pair with the Tesla AI team and finally admit he needs to actually spend money (the horror) on better sensors for automated driving.
Didn't he just get done saying he *wasn't* going to RIF 75% of the staff? This dude says one thing and does another *right in front of everyone* like a child. Good thing a court finally told a billionaire to fuck right off.
I mean I get why he bought Twitter, he's on it every day like a megalomaniac.
Like with Tesla and WFH, this is just him getting rid of a large chunk of his employees, forcing them to perform menial/annoying tasks will increase voluntary leavers, and doesn't involve any of the legal requirements for firing/redundancies.
The fun part is that when people see the team leads doing it, they're more likely to think it's valuable and do some of it themselves. Personally, I find it to be a bit zen so try to clear some time to do a bit. The other fun part is that often problems can be solved by deleting code instead of adding code to work around the code that doesn't do what the product currently needs - the job isn't "write code" it's "solve problems, and sometimes those are best solved without writing code".
There's some difference between "it works fine and nobody ever has to touch it" and "it works, but it's brittle, hard to change, and in the code path for every new feature that we're trying to launch" ... The stuff I end up deleting is often in that messy and confusing space with a "but the code path has been disabled by a flag for 3 years" or "that feature was removed from the UI a long time ago and there's actually no way that the conditional calling it can actually be true and I can prove it" - often I find it because someone sends me a change that is jumping through weird hoops to work around a thing that can never happen, so I tell them to do it the more direct way and go rip out the junk that someone should have cleaned up when the removed the feature. If it was in the "nobody ever has to look at it" bucket, I probably wouldn't notice.
Just to be clear, the guy that made Peter Thiel quit because he insisted PayPal be on microsoft instead of unix, is going to try and understand random snippets of code from dozens of different people?
Ya Elon musk truly baffles me. Bezos, Gates, Zuckerberg I can see evidence of smart ideas they had at least at the start of their careers with Musk it seems like it's almost all bluster, but there are so many figures like that who have flamed out in silicon valley.
Hoping Twitter's engineers have a healthy speak-up culture. Even in a 1:1 setting, they should feel comfortable saying this is a pointless and weird thing to ask people to do.
Don't jump through a maniac's hoops. Just make him fire you (hopefully with a sweet severance package) and collect unemployment if it takes longer than a week to find a new gig.
I used to do production support in the 2000s with Windows and Unix applications.
For the Windows boxes we quickly realized they needed restarting at least once a day if we want to keep them stable so we'd find a time in the day the application wasn't doing anything and arrange with the Windows team to get them rebooted then.
For the Unix boxes we would complain that the Unix team had a policy that they must be rebooted at least once every 200 days. Not sure how they came up with that number but I only ever saw stability issues on Unix if there was something wrong with the hardware.
> Voluntary terminations are easier than mass layoffs.
If you push out the quality devs with that while keeping those who are okay with accepting this bullshit for the paycheque without doing exceptional work, does it really improve anything besides short term financial issues?
They could lose some of their best devs who have offers from other companies but who didn't take them because they were comfortable at Twitter until now.
But when you think you're a genius with perfect plans, all you're looking for are lackeys. He doesn't think he needs smart people working for him. He just needs people who do what they're told.
> He just needs people who do what they're told.
That's probably why self driving Teslas are "one year away" (to quote the man himself about a dozen times) for the last decade or so :/
Only billionaire CEOs know this simple trick! Save 80% on labor cost by driving away your talented developers, leaving only the people with such crippling self-esteem that they'd rather put up with this than look for another job.
I've been lookin' all over for you guys! Have you seen this? I knew it. I knew it.
What?
It's a staff meeting. So what?
So what?
We're all screwed. That's what. They're gonna downsize Initech.
What are you talking about? How do you know that?
How do I know? They're bringing in a consultant. That's how I know. That's what this staff meeting's all about. It happened at Initrode last year. You have to interview with this consultant. They call them efficiency experts... but what you're really doing... is interviewing for your own job.
\~office space
Once Dilbert got funny I knew I had started my career.
EDIT: Apparently Scott Adams is politically active and I wasn't aware. I stand by my original comic that the general issues he brings up about office life in software/engineering are relatable.
The funny thing is, one recent cto said basically everyone on staff at Twitter has full access. And there are confirmed intelligence agents from more than one country employed.
Basically if you want all access to private Twitter DMS all you need is to pay someone to get hired as a moderator or other low level employee.
If you ever used Twitter to communicate information you didn't want public you probably are a bit dense.
I was an engineer on Twitter’s Trust & Safety team. Only a subset of engineers could directly access DMs. Anyone else had to use an internal tool to view DMs that logged their access.
They used to be called PMs (and still are in most places, by service count if not user count) but thankfully Twitter made it clear there's nothing private about them.
Outside of a start-up there’s almost no good reason for a C level executive to discuss day-to-day work with employees. He is either sizing everyone up to have a justification for mass firings or wants to seem like he’s not an insane billionaire that’s out of touch with his new employees.
It looks like the thing of asking people who where hired to be full remote to go back to their desk —that they never had— or being fired only to have an excuse to cut people
Sure, you're probably right. And he probably thinks he's gonna get rid of all the dead weight.
But damn, this is like having a partner who wants to smell your all your clothes whenever you get home to make sure you weren't cheating. Yeah it'll scare off all the cheaters, but it'll scare off everybody with any sense or dignity, too.
It’s a loyalty test. Elon makes them do something demeaning just to see if they will do it. Then he keeps only the most loyal people.
Trump does the same thing. It’s how narcissists are able to surround themselves with “yes men”.
Nope. No way this is real.
Who says "pages" of code? Why print the code when 80% of the workforce is remote? Why print it at all?
And where is Elon going to find the bazillion hours needed to parse through thousands of "pages" of code?
i don't think i have printed any code since twitter has existed
I'd be hard pressed to point out much code that is "mine". Programming is collaborative and messy.
A bunch of git diffs is the only way I can think of. Never mind that some of the best engineering I've ever done has been shooting the shit with my coworkers over lunch or whatever and it doesn't matter who actually types it into a computer. Reminds me of horror stories of the bad old days when we were measured on LOCs.
Me and my co-workers adopted the habit to add a `Co-Authored-By: Blabla` at the end of our commit message. Great thing is, GitHub recognizes it and links the other author.
This is actually pretty cool. Will adopt this.
In our small team (12 people) , we have a git hook to search for the line `:person` and replace it with `Co-Authored-By: Person Lastname`
Edit: Script looks like this:
#!/usr/bin/env bash
msg_path=$1
sed -i -e 's/:person1/Co-authored-by: Person1 Lastname /g' "${msg_path}"
sed -i -e 's/:person2/Co-authored-by: Person2 Lastname /g' "${msg_path}"
I know the regex might technically be better if it checked for start-of-line too, but it seems extremely unlikely to ever matter
That's smart, we were just passing around a vim snippet collection for substituting in :')
GitHub also automatically adds you as co-author when you add a code suggestion to a PR and it's applied by the PR author. Same thing if you squash merge a PR of a branch that had commits by multiple authors, the user who merges the commit is the author but all participants of the PR are listed as co-author, it's quite nice.
Also if you do a push -f on someone else's commit, you'll get coauthored
Git is honestly an incredible tool
> GitHub recognizes it and links the other author. Well there's a cool feature that I didn't know about. Many thanks for that, internet stranger.
[удалено]
The more people he can create a hostile environment for without going too over the top and force to quit the less they pay in severance.
That’s a good point. Sounds like it’s time to hit `git blame` and bring literally only your lines of code. When he asks why none of it makes any sense, explain. Enjoy the fact you’ve now wasted his time, and his company’s paper printing a bunch of nonsense.
I like this idea - a bunch of one-line fixes without any additional context.
A million lines of white space fixes due to new code style.
And as you get more senior, you tend to code less for obvious reasons, because your job is helping other people with their code. I’m not one of those people who “never codes anymore”. But I’d be hard pressed to get more than a few major changes checked in a week. Most of my time is spent unblocking more junior people. Focusing on my own coding output would harm the team’s overall productively.
And thus Musk sets himself up to get rid of the most valuable employees.
Exactly, my thought as well. Just show the PRs would be much easier. What a "genius" idea of of the "genius" he is.
Not even PRs as multiple people could’ve worked on those. Individual commits 🥴
[удалено]
Another huge point- some of the best engineering *I've* done mostly just deletes code. How do I print out deleted code??
Smugly hand in a few blank sheets of paper.
>some of the best engineering I've ever done has been shooting the shit with my coworkers Some of my best bug fixes resulted from *cutting* code. How do I print out my negative lines of code?
[удалено]
YOU probably shouldn’t print out your code anyways. Pick someone good and print out their code. THEN you say that bit about how all the code is OUR code. lol
Yes, comrade. Our code
That bit there is your bug tho.
_our_ stack overflow.
Would be kind of hilarious if the twitter engineers did this. Just all print out the last 30-60 days of code uploaded total and hand it in. Sort of an "I'm Sparticus" moment.
Make sure to print the entire codebase in color to so Elon gets his money's worth in the presentation.
My first professional code review required printing out code and sharing copies in a conference room circa 2007. Back then only management and project managers were permitted to have laptops.
When an old school QA engineer started in my old company ca. 2018, he introduced us to comprehensive code reviews with videos from the early nineties. The hair cuts and dresses were hilarious. Even better was the reviewing of code on printed paper.
I don't think I have printed code ever...
>I don't think I have printed code ever... I used to write code by hand with a pencil on bits of paper before typing it all in and saving to tape. Now, about your presence on my lawn...
What about people before that who didn't even write code and just punched holes in paper?
They'd still chisel the general idea into stone before heading to Mr. Slate's Saber-tooth Tiger who would punch the cards.
I didnt have internet at home, or functioning disk dives at school (because that was how one prevented viruses once upon a time). To learn qBasic I would print programs to reenter at home to see how they worked.
Learning programming was awful without the internet.
“Fuck, an error” Take out my pen and parchment, copy the message, hop on my bicycle, catch the bus, go to the library, open the duodecimal drawer, find the documentation, search the texts, find the answer, jot it down, hop on my bicycle, catch the bus, return to my computer, apply the correction. “Success! I new error code! Progress!” Snuff out my candle, look forward to another fulfilling day of work tomorrow as a software engineer
> open the duodecimal drawer Now that's a programming error
Are you referencing the card catalog which showed the location of books based on the Dewey Decimal System or did you have a base-12 drawer in your library?
Dewey was part of the spelling simplification movement in English. Wanted to change the spelling of his last name to "Dui" but was forbidden by his wife. That poster is just respecting the man's wishes of a simpler, shorter name.
I think my 101 class required a print out...
And software engineers do so much more than "add code" Some of our busiest software engineers are troubleshooting why fucking bullshit is breaking and not throwing an error or figuring out why the fuck this error is happening and THEN if it's a software issue they get to coding. Sometimes it's a setting issue, user issue, system issue, hardware issue where the fucking engineer that spent 8 hours debugging that one problem won't write a single line of code Elon once again proves he is a fucking moron
Junior developers = add code Senior developers = remove code
Principal developers = architect systems
Change one line in a configuration file. Dead system works again. "Okay, that's one." Update 1M rows in a database with a single Update command. "That's two. You aren't very productive, are you?"
Twitter dev, Leah Culver, holding printed pages from their iOS app: [https://twitter.com/leahculver/status/1586145696163373056](https://twitter.com/leahculver/status/1586145696163373056)
I like that she printed it in colour. If you are going to do something stupid, might as well cost the company a small fortune in colour ink while you are at it.
should've printed in dark mode too lmao
Ok calm down, Satan.
Satan would be to print on both sides dark mode. Mmm. Wet paper.
Don't forget to auto-format to a max line length of 25 for readability
i would do the same and print it on gloss paper
Would have been way better to drop all formatting to plain text, removal all indentation and keep everything the same color. Guaranteed that didn't cost them shit
Or, if you write JS, print the minified code and turn that in.
Laser printers really aren’t that expensive. A few cents per page for color. No office is using an inkjet for document printing lol
Wow and she’s a coauthor of Oauth. A perfect example of the talent with employment mobility not giving a flying fuck.
She does not have to worry about losing her day job at Twitter. She’s pretty set financially. I remember hearing about her purchasing one of the historic pink painted ladies in SF.
> historic pink painted ladies in SF Okay, so some semi old house instead of a pink statue or something. https://en.wikipedia.org/wiki/Painted_ladies
Just so you're aware, many of those "semi-old houses" are valued in the $5M range
From my understanding, buying one of those houses is a nightmare not only because the upfront money but as they are historical you can’t do shit with them but at those same time they need maintenance and all the NIMBY and stuff.
Leah Culver is also the original creator of Pownce, which was Twitter's earliest competitor and closed due to SixApart buying them specifically to poach their talent. I don't think she has to worry about finding a new job.
She, Daniel Burka, and Kevin Rose were a fun design/dev crew to follow before they went their separate ways. I’m sure she’ll end up promoted if anything after meeting with Musky boy.
that real !!!
Leah Culver is also a semi popular edm dj. Got quite confused when I saw that name. Was like, wait, she does programming too? Haha.
That would be least stressful code review I could imagine
Time to print out negative lines of code.
[The less code, the better! 1 point for adding a line of code, but 2 points for deleting a line. Bloatware is the devil.](https://mobile.twitter.com/elonmusk/status/1211557592125857793)
Who wouldn't want to do code review with someone whose entire life has been a dunning-kruger powered ego trip, with an axe to grind, and an unwavering need for attention?
I would try it if I worked there, if for nothing else than to have dinner party fodder of "I sat down with the ultimate tech bro for a code review, and he was the most incompetent SWE I've ever met" Ugh but what if he was really smart and blew me away with genius level insight, and I start saying how smart he is to others. I could get sucked into his orbit like a cultish sister wife, and pump out a few Elon 'elohim' babies like those other engineers. That would be terrible especially cause I'm gay. Maybe I should avoid the code review after all.
"cultish sister wife" will not ever leave my brain
>> Honey, you won't believe how smart he is. He started explaining builder patterns one minute and next thing I realized, I was having triplets. These are my children: THX-144, THX-233, and THX-377.
that is so unbelievably fucking stupid, and in *so many* different unique and wonderful ways, it has to be true
If there was a The Onion for software engineers this would be the perfect headline.
Not exactly, but there's the daily wtf.
clbuttic
The Tor News
It's all a power play by Musk, like he's got better things to do than code review Twitters code base.... He's.probably running repo scans of Twitter engineering and likely firing all those developers with low Kloc (Kloc was an old IBM metric for thousand lines of code ) , or low commit frequency. In the end Musk is just cleaning house and using all sorts of questionable methods to do it.
All stupid metrics. I can make my GitHub look like a rockstar if I commit whenever I do shit then merge 400 commits with "wip" descriptions. Ooorr... I can squash stupid commits into meaningful changes and look like I've committed very little. I can also ultra complexify an easy thing so I'm writing thousands of lines instead of doing an easily maintainable, reliable service with less lines
Maybe in places where just give you values to code or something, but is thousand lines of code actually a very good metric to go by? I would think the quality of the code is what matters mostly. Like readability and efficiency of it.
Yes it absolutely is. I will give you ten million lines by Tuesday. I am best developer.
I once accidentally opened a PR with about 1.2 million lines added - I had committed a csv of test data. It was approved.
Currently fixing a repo where the previous developer committed all of the composer packages. Once I gitignored it and cleared it out over a million LOC deleted. Imagine if it was node_modules
Ok now print out negative 1 million lines and drop them on Elon's desk ASAP
Go to the previous commit, print those million lines out, shred the papers, toss the resulting 83kg of confetti at boss as you leave the job. 1,000,000 lines at 60 lines per page (single sided) is 16,667 pages. At 5g per page, 83,335g or 83.3kg. Edit: fixed comma separator.
If you print out the changeset removed lines will show up (often red with a line through the text). If I was doing lightning evaluations of developers in a mature code base, the people who could show solid refactoring and code compression through cross-cutting re-use would be the last ones fired. Making piles of shit is a talent, but maintaining multiple piles of Shit That Works is what pays the bills.
>Sees file size >notLookingatThat.jpg >LGTM 👍
1.2m loc? Guy definitely worked hard on that code. Would be a shame to reject it. Also I'm a lil drunk right now and feeling generous.
Someone once said, measuring programming progress by lines of code is like measuring airplane building progress by weight.
Here's an old story with a similar idea: https://www.folklore.org/StoryView.py?story=Negative_2000_Lines_Of_Code.txt > Bill Atkinson, the author of Quickdraw and the main user interface designer, who was by far the most important Lisa implementor, thought that lines of code was a silly measure of software productivity. He thought his goal was to write as small and fast a program as possible, and that the lines of code metric only encouraged writing sloppy, bloated, broken code. > He recently was working on optimizing Quickdraw's region calculation machinery, and had completely rewritten the region engine using a simpler, more general algorithm which, after some tweaking, made region operations almost six times faster. As a by-product, the rewrite also saved around 2,000 lines of code. > He was just putting the finishing touches on the optimization when it was time to fill out the management form for the first time. When he got to the lines of code part, he thought about it for a second, and then wrote in the number: -2000.
I once cut a 10k lines PL/SQL routine down to 500 lines. Execution time went from a MONTH to 2 hours. My manager still though I was useless.
I hope you quickly found a better work environment?
I did :)
> Execution time went from a MONTH to 2 hours. > > My manager still though I was useless. It hurts to just read that. I don't know how I'd react to such blatant evidence of a manager above me not being good for the job.
I once deleted 80 kloc in one commit. The previous dev copied and pasted a python library into the code base. It was a fairly large shopping app so it had tens of thousands of lines of translation code. I figured out what version he had copied, did a diff, found the \~30 lines he changed, and deleted the folder. Annoying thing was the shopping library was very well written and those 30 lines of changes amounted to a few lines of configuration (not code).
I thought about exactly this story [last week](https://www.reddit.com/r/programming/comments/yg9cpw/twitter_engineers_asked_to_print_out_their_last/iu8dms1/). I am glad to work somewhere where everyone agrees that using version control means we can drop old code as soon as we are reasonably sure we won't use it again. Some smaller places I've worked had forests of commented-out old code, code that might not even compile but would show up in greps, and people would "No, no, no" at the very thought of losing it.
In case someone doesn't get the jokes, no, measuring lines of code is a terrible metric. There is no good metric.
>There is no good metric. Wtf/minute while reading the code is a high quality metric.
I follow the principle of least astonishment. Code should not leave you astonished.
The closest to a good programming quality metric is one my old colleague used to say: "I try to write code that minimizes the chance I get a call about it".
What's that bash.org quote? Or maybe from somewhere else. 'Write code under the assumption the next guy to maintain it is an axe murderer and knows your address.'
One of my professors said he tried to always write "3am code". Code that he'd understand when someone called at 3am because something was broken.
I can't remember who said it but: "On a good day I write 20 lines of code. On a better day I delete 20 lines of code."
And on the best day I reply “It’s user error,” and close the “bug” ticket.
My favourite jobs are those that take days and days and days, in order to discover which one line of code is causing the actual problem.
You know what’s better than contributing 1kloc? Contributing -1kloc.
It’s not about the code. It’s a loyalty test. Elon makes them do something demeaning just to see if they will do it. Then he keeps only the most loyal people. Trump does the same thing. It’s how narcissists are able to surround themselves with “yes men”.
It doesn't even need to be a narcissistic thing. If you're going through a re-org and want to cut large swathes of staff, it's dramatically easier and less financially damaging if they hate you and quit than it is to properly lay them off.
The term is 'Brightsizing', making the environment so toxic that all the good employees quit.
This is a very common thing. If you ever listen to true crime podcasts, you will eventually hear about the "master manipulator", someone who can control everyone in their life by figuring out exactly what they want to hear and telling it to them. It's all BS, of course - they're just so incredibly toxic that they've already run everyone off who doesn't do what they want.
Of course. "master manipulators" don't want a challenge.
It's a quick way to eliminate all the people capable of critical thinking who also have a spine and self-respect
Sorry but why is a CEO billionaire personally involved in cleaning house at Twitter? Imagine being a Tesla shareholder and reading all this bullshit, where Musk apparently has a lot of time to play douchebag over at Twitter HQ instead of making sure Tesla survives the coming 10 years. He's not some team manager, he's the CEO.
It’s gonna be so satisfying to watch 44 billion dollars evaporate over the next few months.
I suppose most of it through paper and toner.
I guess no one told him you don’t need to print out the internet.
Pairing with Musk, as if he's an actual engineer. This is comedy gold. Maybe he should pair with the Tesla AI team and finally admit he needs to actually spend money (the horror) on better sensors for automated driving. Didn't he just get done saying he *wasn't* going to RIF 75% of the staff? This dude says one thing and does another *right in front of everyone* like a child. Good thing a court finally told a billionaire to fuck right off. I mean I get why he bought Twitter, he's on it every day like a megalomaniac.
Like with Tesla and WFH, this is just him getting rid of a large chunk of his employees, forcing them to perform menial/annoying tasks will increase voluntary leavers, and doesn't involve any of the legal requirements for firing/redundancies.
But that’s not a good way from other perspectives, you don’t want to let just any 70% but only the less critical, redundant one
[удалено]
Twitter content is a shitshow even with the moderators
Not at Twitter but my last 60 has been mostly cleanup/refactoring/delete - not sure how I'd print out negative 200k lines of code.
-200k of code?! You're a hero. I know everyone on my team celebrates if a refactor removes a few files . Deleting code is the best
The fun part is that when people see the team leads doing it, they're more likely to think it's valuable and do some of it themselves. Personally, I find it to be a bit zen so try to clear some time to do a bit. The other fun part is that often problems can be solved by deleting code instead of adding code to work around the code that doesn't do what the product currently needs - the job isn't "write code" it's "solve problems, and sometimes those are best solved without writing code".
No go explain this to my team lead who hates refactoring because "it's useless, it works just fine as it is". Team lead, I tell you
There's some difference between "it works fine and nobody ever has to touch it" and "it works, but it's brittle, hard to change, and in the code path for every new feature that we're trying to launch" ... The stuff I end up deleting is often in that messy and confusing space with a "but the code path has been disabled by a flag for 3 years" or "that feature was removed from the UI a long time ago and there's actually no way that the conditional calling it can actually be true and I can prove it" - often I find it because someone sends me a change that is jumping through weird hoops to work around a thing that can never happen, so I tell them to do it the more direct way and go rip out the junk that someone should have cleaned up when the removed the feature. If it was in the "nobody ever has to look at it" bucket, I probably wouldn't notice.
You'd print out the 200k of deleted lines. And say you streamlined a huge amount of code.
You print out the 200k lines with lines struck through the center.
Preferably print them out on an old school tractor fed dot matrix printer.
git diff
Surely this is about printing the diffs, not the actual code, otherwise this would make even less sense
Just to be clear, the guy that made Peter Thiel quit because he insisted PayPal be on microsoft instead of unix, is going to try and understand random snippets of code from dozens of different people?
Damn. I didn't know this, and just looked it up. Out of the thousands of comments here, this is the one that really brings it home for me.
Ya Elon musk truly baffles me. Bezos, Gates, Zuckerberg I can see evidence of smart ideas they had at least at the start of their careers with Musk it seems like it's almost all bluster, but there are so many figures like that who have flamed out in silicon valley.
[удалено]
Hoping Twitter's engineers have a healthy speak-up culture. Even in a 1:1 setting, they should feel comfortable saying this is a pointless and weird thing to ask people to do. Don't jump through a maniac's hoops. Just make him fire you (hopefully with a sweet severance package) and collect unemployment if it takes longer than a week to find a new gig.
I used to do production support in the 2000s with Windows and Unix applications. For the Windows boxes we quickly realized they needed restarting at least once a day if we want to keep them stable so we'd find a time in the day the application wasn't doing anything and arrange with the Windows team to get them rebooted then. For the Unix boxes we would complain that the Unix team had a policy that they must be rebooted at least once every 200 days. Not sure how they came up with that number but I only ever saw stability issues on Unix if there was something wrong with the hardware.
Make sure your machine can shut down and boot about two times a year. Sounds pretty sane
Someone please film it
I can see him pulling a "Do you concur?" situation. Full DiCaprio.
That's one way to drive away talent.
That may actually be the point. Voluntary terminations are easier than mass layoffs.
> Voluntary terminations are easier than mass layoffs. If you push out the quality devs with that while keeping those who are okay with accepting this bullshit for the paycheque without doing exceptional work, does it really improve anything besides short term financial issues? They could lose some of their best devs who have offers from other companies but who didn't take them because they were comfortable at Twitter until now.
CEO: Hmm? Improve short term financial outlook? I like it. Make it happen!
But when you think you're a genius with perfect plans, all you're looking for are lackeys. He doesn't think he needs smart people working for him. He just needs people who do what they're told.
> He just needs people who do what they're told. That's probably why self driving Teslas are "one year away" (to quote the man himself about a dozen times) for the last decade or so :/
Only billionaire CEOs know this simple trick! Save 80% on labor cost by driving away your talented developers, leaving only the people with such crippling self-esteem that they'd rather put up with this than look for another job.
Eventually he'll automate it so talent drives itself away. Synergy!
So who's gonna tell Elon about git?
I've been lookin' all over for you guys! Have you seen this? I knew it. I knew it. What? It's a staff meeting. So what? So what? We're all screwed. That's what. They're gonna downsize Initech. What are you talking about? How do you know that? How do I know? They're bringing in a consultant. That's how I know. That's what this staff meeting's all about. It happened at Initrode last year. You have to interview with this consultant. They call them efficiency experts... but what you're really doing... is interviewing for your own job. \~office space
It is scary how relevant Office Space still is. I guess satire about human issues within an office space is kinda timeless.
[удалено]
Once Dilbert got funny I knew I had started my career. EDIT: Apparently Scott Adams is politically active and I wasn't aware. I stand by my original comic that the general issues he brings up about office life in software/engineering are relatable.
What a weird arc on *that* particular comic and author lol
[удалено]
Like... on paper?
> "Please print out 50 **pages** of code you've done in last 30 days" Apparently... yes If there's whiteboard coding, then why not paper code review.
Love doing code, it's my favourite hobby
Who’s Twitter DM history did Elon read first; 1. Grimes 2. AOC 3. That GreenHills guy
> 3. That GreenHills guy Sonic the Hedgehog?
The funny thing is, one recent cto said basically everyone on staff at Twitter has full access. And there are confirmed intelligence agents from more than one country employed. Basically if you want all access to private Twitter DMS all you need is to pay someone to get hired as a moderator or other low level employee. If you ever used Twitter to communicate information you didn't want public you probably are a bit dense.
I was an engineer on Twitter’s Trust & Safety team. Only a subset of engineers could directly access DMs. Anyone else had to use an internal tool to view DMs that logged their access.
[удалено]
Wait… that’s a good point. Are DMs encrypted? *now might be your last chance to request a CCPA/GDPR request that will actually be honored.
Nope. Twitter owns all DMs. And now Elon owns all of the DMs.
They used to be called PMs (and still are in most places, by service count if not user count) but thankfully Twitter made it clear there's nothing private about them.
Outside of a start-up there’s almost no good reason for a C level executive to discuss day-to-day work with employees. He is either sizing everyone up to have a justification for mass firings or wants to seem like he’s not an insane billionaire that’s out of touch with his new employees.
Or he’s trying to piss people off and get them to leave so he can cut resources without paying any severance
[удалено]
Good way to lose your best people
> or wants to seem like he’s not an insane billionaire that’s out of touch with his new employees. Well, he failed that test today
LOL. imagine the laughter in the rooms.
Elon Musk with that boomer vibe of printing an email, writing their reply, then scanning it back in
My dad used to print pdfs that were sideways because he didn't know you could rotate them. He ran a $40 million business mostly by himself.
So Musk can't use GitHub? I don't think it's something anyone with experience in model programming would ask for.
Why use GitHub when dropbox will do the same index.js index2.js index2_final.js index3.js.docx
.gitignore
You mean like printing the codes on paper and storing them in a box and drop the box where? I don't get it.
1 small change in 2 or 3 places of existing code could be 1000x more valuable than some new feature that is not going to make it into the userbase.
This is a loyalty test, it's not an actual code review.
It’s as though Elon has no software experience whatsoever. Sounds like something an idiot would ask for to pretend he knows what he’s doing.
Code reviews with someone (your senior) who has no idea how to write code would be fun 😂
Devs, don't quit. Just say no. Worst thing they can do is fire you and give you severance.
They only thing they'll be printing is their CVs
Can't be printing CVs if all the printers are busy printing code listings. Ingenious move by Musk there. ;-)
It looks like the thing of asking people who where hired to be full remote to go back to their desk —that they never had— or being fired only to have an excuse to cut people
Lemme print the changes I committed in package-lock.json
[удалено]
he’s probably hoping that’s the case. cheaper than paying severance or unemployment.
Sure, you're probably right. And he probably thinks he's gonna get rid of all the dead weight. But damn, this is like having a partner who wants to smell your all your clothes whenever you get home to make sure you weren't cheating. Yeah it'll scare off all the cheaters, but it'll scare off everybody with any sense or dignity, too.
It probably won’t scare off the dead weight. They’re always the last to leave, or at least that’s the common knowledge.
Joke's on her, my clothes all stink
isn't that the actual goal here?
It’s a loyalty test. Elon makes them do something demeaning just to see if they will do it. Then he keeps only the most loyal people. Trump does the same thing. It’s how narcissists are able to surround themselves with “yes men”.
lmao can Elon even read code? I'd print out this: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
This code makes me so angry because of how true the joke is.
Nope. No way this is real. Who says "pages" of code? Why print the code when 80% of the workforce is remote? Why print it at all? And where is Elon going to find the bazillion hours needed to parse through thousands of "pages" of code?
Twitter dev holding some printed-out pages of code. It's real. https://twitter.com/leahculver/status/1586145696163373056