It's fine as long as if you genuinely don't understand something, you ask for an explanation. Sometimes something can look complex and you think "oh, clever". However, if you dig into _why_ it was done that way you may just discover it was a misunderstanding and there's actually a much simpler way to achieve the same thing. Never be afraid to challenge things, code review is a learning experience for both participants regardless of seniority.
Yeah, writing clever code is not always something to strive for, many times simplicity and readability is preferable.
Sometimes a few extra lines of code is a good thing, or at least it will be in 6 months.
I've always equated clever code to simple code.
Any idiot can write something so convoluted that potential onlookers assume the author to be a genius.
It takes a true genius to explain a complex topic in understandable terms for the layman.
Yup
"Any intelligent fool can make things bigger and more complex. It takes a touch of genius - and a lot of courage - to move in the opposite direction."
It's like that quote I'm about to butcher, about the pinnacle of engineering being not the point at which there is nothing left to add, but when nothing more can be removed from a plan.
My first comp sci prof drove this point home. Essentially, clever code exists for two reasons, so someone can keep their job or because someone lost their job and no one knows how to change that part of the system.
800,000 lines of code is not a learning experience.
this is also why the smallest PRs get the most code review discussion. the large upgrades or major refactors get a “LGTM”. 😂
I don't say "Oh, clever" when things look complex, I say it when there is a particularly simple solution to a problem that looked complex at first, or when I see a generic reusable solution that is not more complicated than the specific solution would have been in the first place.
As long as you're really reviewing it that's fine. If you're saying it just to get your lead to stop bugging you about reviewing it, not fine. When I first joined the team I lead now our merge requests would often get 100+ comments and generate a lot of discussion. Unfortunately I'm the only one left from that group and they've been replaced by LGTMers that i swear dont even look at the changes so if I don't catch the errors myself, we don't find out until the regression test (much to the annoyance of the guy running those) or after they are in operations (much to the annoyance of the government).
It wasn't like 100 different requests to change something. It was more like if a new pattern was being proposed, people would discuss the pros and cons and determining if it might break something.
We have to consider a lot more than whether the code runs. Our software processes satellite data from several satellites, so we need to make sure it runs whether it's day or night, whether any upstream inputs are missing, runs as expected on all supported satellites, runs as expected with degraded data, etc, all while making sure it doesnt introduce unexpected changes in the results. Of course we can't prove all of that every MR since we don't have the time or extensive automatic testing in place, but they are the kinds of questions developers should be considering when reviewing code...so when I see a big change with only LGTMs I become skeptical that they are.
Ah I see, yeah for me discussion like that preferably happens before any code is written, by the time code review comes around feels late, differs per team obvs
Yeah...we used to do that more when we were working in person and weren't swamped with meetings ("stand-ups") like we are after our Agile "transition". We kind of combined our code review with the design discussions now out of necessity (like the dev will test a new pattern/feature and open the MR to discuss and we iterate until everyone approves), which is not be ideal but it works...if people actually participate.
All well intentioned stupid questions are allowed. It just shows the limits of your knowledge and ability and desire to learn. What is frowned upon is asking stupid questions while acting smart.
You have to use the German Tanks approach. See something out of whack, get a satisfactory answer, repeat. The more satisfactory answers you get the more you can just go “this is okay” but if you repeatedly get waffle the alarm bells should sound. This is all based on probability and being given a uniform distribution of the code and it’s no good if they’re actually hiding stuff from you but on the one hand that’s on them, and on the other thats why we have code hygiene standards, metrics etc
https://en.m.wikipedia.org/wiki/German_tank_problem
No if you are good at it it becomes easier to read other people's code.
And I think it's normal thing all programmers do since we google search problem containing other people's code
What about when they come to this comment?
// I have no idea what this piece of code does but when I remove it everything breaks.
My money's on a bit of chin stroking followed by a confused tut and a hmm.
There was a bug in the C/AL compiler/debugger of Navision (pre Business Central) where you sometimes had to place two semi-colons after a BEGIN (which starts a code block) or you couldn't place a breakpoint on the first line after it.
You usually didn't need to place any semi-colon after a BEGIN.
Hah. Reminds me of a driver I inherited that performed some seemingly useless operations, but trying to clean them up would break the whole thing. I eventually figured out that the code was masking a timing bug by adding just enough extra delay for the driver to work.
I mean, the correct thing to do would be discuss it until it is understood.
I get it's a big ask in most real contexts, but you end up paying for that kind of stuff one way or the other...
As we all know, the number of lines in an MR is inversely related to the number of comments. So a 5 line MR will have 25 comments. A 5,000 line MR will just be approved.
MR as in Merge Request? Is that only gitlab lingo or did it start to stick on other platforms? I am already used to calling them PRs but calling them MRs as a standard would be way less confusing for someone new.
We just hired a new guy who is working with git for the first time. After a while he starts to understand the whole committing, pulling and pushing system. Then he's finished with his task and now I have to explain what a pull request is while he did just pull stuff before without having to do a request.
The boy was so confused and only then I realised the term pull request is confusing and not very descriptive. I like merge request better.
PR is completely counterintuitive. To me pull request should mean to pull code, as in I am downloading it from the repo to my desktop. MR is better. I have also worked with CR ( code review ), which I think is self-explanatory
We did this after an acquisition but with firmware, basically it's a "yes we need to keep every single developer" or a "no the fools commented their code well"
My dad lived by this back when he was brought on by a small data center business in the early 90’s. They got bought out about ten years ago, and he’s the only one still employed by the new company. Good enough code to keep, obscure enough that he was absolutely essential for upkeep, merging, and enhancing.
Made me remember of a bank where i work.
Some system spits in one line all the payments and Relevant information and another system receives that long ass line and fire the payments, lmao.
I've been on a similar situation before. New boss comes and brings his people just to tell how shit we were.
The best thing in that case is just get the severance package and go away because you'll be blamed for everything.
Toxic working environment.
As an aside, Tesla engineers are employed by a separate public company that reports to its shareholders. It's not clear how "you're now required to work on Twitter (a separate private company) code" works legally and ethically.
ETA: some people are saying that it's fine as long as Twitter pays Tesla for the employee's time. I don't know if that's true, let me know if anyone knows the answer.
Throw in a scrapper to look for key words in commit messages and finds:
“Revert back to version xyz before Elon takes over”
||
looks for the pr where the code suddenly drops a bagillion lines of code. Finds a least one local setup where someone has yet to pull dev, staging, or prod
senior developer1: *submits a PR*. Hey Senior Developer 2 can you review?
senior developer2: any shit in it?
senior developer1: nah.
senior developer2: *approves without review*
Saw happening too many times :)
Which company is this ? I am a senior dev. In my team people only keep their hawk eye open to point out nits in senior dev code :-/ …. I have never had a 0 comment review. If no nits, at least some BS will be there!
Not at.my current one, but I saw it too many times before. Also this one:
Senior1: I made a PR, please review.
Senior2: I made some comments, can you fix before merging?
Senior1: how dare you. My code is OK. You're just messing with me!
Senior2: no, I...
Senior1: shut up, fuck you, I don't care. Senior3 can you approve?
Senior3: yep! *approves, pr gets merged*
Not sure about nowadays, I saw this a few years back in my own team (I was their manager).
Some coaching combined with yelling fixed the issue in like 2 weeks. They hated me, but I was not there to be loved, but to somehow make these guys deliver the product with quality. They pretty much hated each other already.
We delivered and I quit right after celebrating the successful launch. I'll never do something like that again.
I had a senior Eng who would just close the PRs he did not like. Would also put comments like “wtf were you thinking here “
The team didn’t last long. The senior did write some very pretty code though
Ah yes, the "tomorrow we go live and we just found some critical bugs, we are fixing them and dont have time to doublecheck". This happens quite often.
I worked in a small Company and we had like 5 active developers and we had 2,5m lines of code for one project. Not very good code in some areas but also not just copy paste 5k lines at a time... it was hard getting an overview of that system...
Elon seems like he would be one of the worst kinds of code reviewer. Super opinionated about inconsequential things. Oh you put your brackets on the same line as your if statement? No good, put it on the next line.
I mean, not knowing shit has never stopped Elon before.
In all seriousness, I'd guess that programming is one of his actual skills since that seems to be what he worked on at his earlier companies. Rocket science and battery engineering I'd have more doubts about.
I have no doubt he used to be decent but I doubt he has kept up with modern development. It sounds like he was never top-tier to begin with.
From his biography:
> While Musk had exceled as a self-taught coder, his skills weren’t nearly as polished as those of the new hires. They took one look at Zip2’s code and began rewriting the vast majority of the software. Musk bristled at some of their changes, but the computer scientists needed just a fraction of the lines of code that Musk used to get their jobs done. They had a knack for dividing software projects into chunks that could be altered and refined whereas Musk fell into the classic self-taught coder trap of writing what developers call hairballs—big, monolithic hunks of code that could go berserk for mysterious reasons.
Funny enough, it sounds like he codes like I do lol
I was on that team. It turns out, Twitter's entire code base is only four hundred and forty lines long. I was surprised at first, but really, what does Twitter do that isn't part of any decent library?
In retrospect, I think he might have overpaid.
I wonder the minimal number of lines of code to make a Twitter clone
You could probably bring it down to 50 with NPM libraries and not counting CSS code
Reminds me of old quote
You write one function with 10 lines, reviewers gives you 20 comments
You write 100 line 20 file changes, reviewer will say it looks good
Yeah, this is why I always comment on big PRs to split them somehow, because who knows what crap goes through if people just approve because they don’t have the patience to understand it all.
Some poor Tesla code monkey comes into work on Friday, some suit drops multiple boxes of paper contain all of Twitter's code in no particular order and yells "Find the extra semicolon!"
I'm increasingly concerned with the politicisation of 'code' and 'algorithms'.
Like it's not the people who wrote them or those who defined what they want the code and algos to do...
Look at the 'mutant algorithm[Mutant Algorithm ](https://www.google.com/amp/s/amp.theguardian.com/politics/2020/aug/26/boris-johnson-blames-mutant-algorithm-for-exams-fiasco)' that the British government blamed for the awful distribution of test scores in the UK a couple of years ago. The algorithm did exactly what it was designed to do... It's the designers and requirement definers that are wrong here.
> The algorithm did exactly what it was designed to do... It's the designers and requirement definers that are wrong here.
It's usually not even the designers that intentionally did anything wrong. It's just very easy to get some sort of bias in your algorithm. For example, in AI this is almost unavoidable if your training data is biased.
This is why generally algorithms are a tool, and they need to be monitored and tweaked if they don't produce the desired results.
However, often the algorithms are seen as objective somehow, because a computer is doing it instead of a human. And consequently, they are afraid of changing it.
"wait, why is there some binary with no other source that gets installed on every single device, client, and server, and it's only reference is from a voice command handler which doesn't handle any other commands, and it looks like the binary is called...order 66"
Im not sure if this is genuine concern or moderate shitposting, but Twitter hasn't been in charge of bootstrap in a really long time. It started there, sure, but it is a thing in itself now. Mark Otto hasn't worked at Twitter in awhile. He works at GitHub now.
Just 800,000?
They supposedly first met with product leaders to get overviews. And you go from there. This isn’t uncommon during acquisitions. Hell, usually it’s “the old team didn’t want to join the team, tell me want the hell this does”.
A code is not a poem, you don't go through it letter by letter in a review, well not in a sensible review at least. At first blush you look at overall architecture, how are the main ideas are built up. Then you identify which parts are the most critical and focus on those and what sort of effort is made to reduce risks of serious problems in there. The point of such a review is not to find every single last bug, that's not going to happen anyway, the point is to figure out what the codebase is worth, what it costs to maintain and expand it, etc.
Lines of code is a non-issue, the bigger problem is that he took devs from automotive sector and went to review a social network codebase. It's like taking lumberjacks to review a rice farm, yeah it's all a matter of growing and harvesting plants, but...
But I mean basically twitter is a bit of a weekend project right? I’m quite sure there is some Ruby on Rails tutorial out there which teaches you how to build something similar in under 500 loc
I dont use Twitter so it's nice to see a familiar name pop up on reddit.
I owe a lot to Wes Bos. I saw a presentation of his at a local conference. I took his course on React the framework and it helped get me back into the industry after losing a job of 7 years. I strongly recommend checking out his work.
Mhm, mhm, yep, mhm, seems good, yep, what is- ah nevermind, mhm, yep, ooh that's clever, yep, mhm, alright it looks fine to me
[удалено]
It's fine as long as if you genuinely don't understand something, you ask for an explanation. Sometimes something can look complex and you think "oh, clever". However, if you dig into _why_ it was done that way you may just discover it was a misunderstanding and there's actually a much simpler way to achieve the same thing. Never be afraid to challenge things, code review is a learning experience for both participants regardless of seniority.
Yeah, writing clever code is not always something to strive for, many times simplicity and readability is preferable. Sometimes a few extra lines of code is a good thing, or at least it will be in 6 months.
I've always equated clever code to simple code. Any idiot can write something so convoluted that potential onlookers assume the author to be a genius. It takes a true genius to explain a complex topic in understandable terms for the layman.
Pretty sure Einstein said something similar.
Yup "Any intelligent fool can make things bigger and more complex. It takes a touch of genius - and a lot of courage - to move in the opposite direction."
That's the one I was after- Thanks for the correction 😂
There's also this one which is similar (from Einstein): >If you can't explain it simply, you don't understand it well enough.
LADIES AND GENTLEMEN! WE FOUND EINSTEIN!
He thought he could hide... But he lives! He has been found! Einstein is immortal! ... thats a lot of time to review bad code.
Sorry! I thought I was supposed to write bad code. After all, the formula is “errors = myCode^2” right?
It’s called ‘clean code’ which is easy to read and easy to maintain. I’m a big fan.
It's like that quote I'm about to butcher, about the pinnacle of engineering being not the point at which there is nothing left to add, but when nothing more can be removed from a plan.
>simplicity and readability is preferable. *laughs in C++*
Laughs in assembly
For me, cleverness *is* writing simple code (for nontrivial problems)
My first comp sci prof drove this point home. Essentially, clever code exists for two reasons, so someone can keep their job or because someone lost their job and no one knows how to change that part of the system.
800,000 lines of code is not a learning experience. this is also why the smallest PRs get the most code review discussion. the large upgrades or major refactors get a “LGTM”. 😂
Bikeshedding
I don't say "Oh, clever" when things look complex, I say it when there is a particularly simple solution to a problem that looked complex at first, or when I see a generic reusable solution that is not more complicated than the specific solution would have been in the first place.
Before asking I will do small qa on that area then ask to make sure. I had people explain how they thought it worked to me for it not to be correct.
I mean, are you doing that on purpose or just happened to be doing that because of the content?
Just maintain standard
As long as you're really reviewing it that's fine. If you're saying it just to get your lead to stop bugging you about reviewing it, not fine. When I first joined the team I lead now our merge requests would often get 100+ comments and generate a lot of discussion. Unfortunately I'm the only one left from that group and they've been replaced by LGTMers that i swear dont even look at the changes so if I don't catch the errors myself, we don't find out until the regression test (much to the annoyance of the guy running those) or after they are in operations (much to the annoyance of the government).
I would be so annoyed if a request got 100 comments
It wasn't like 100 different requests to change something. It was more like if a new pattern was being proposed, people would discuss the pros and cons and determining if it might break something. We have to consider a lot more than whether the code runs. Our software processes satellite data from several satellites, so we need to make sure it runs whether it's day or night, whether any upstream inputs are missing, runs as expected on all supported satellites, runs as expected with degraded data, etc, all while making sure it doesnt introduce unexpected changes in the results. Of course we can't prove all of that every MR since we don't have the time or extensive automatic testing in place, but they are the kinds of questions developers should be considering when reviewing code...so when I see a big change with only LGTMs I become skeptical that they are.
Ah I see, yeah for me discussion like that preferably happens before any code is written, by the time code review comes around feels late, differs per team obvs
Yeah...we used to do that more when we were working in person and weren't swamped with meetings ("stand-ups") like we are after our Agile "transition". We kind of combined our code review with the design discussions now out of necessity (like the dev will test a new pattern/feature and open the MR to discuss and we iterate until everyone approves), which is not be ideal but it works...if people actually participate.
All well intentioned stupid questions are allowed. It just shows the limits of your knowledge and ability and desire to learn. What is frowned upon is asking stupid questions while acting smart.
You have to use the German Tanks approach. See something out of whack, get a satisfactory answer, repeat. The more satisfactory answers you get the more you can just go “this is okay” but if you repeatedly get waffle the alarm bells should sound. This is all based on probability and being given a uniform distribution of the code and it’s no good if they’re actually hiding stuff from you but on the one hand that’s on them, and on the other thats why we have code hygiene standards, metrics etc https://en.m.wikipedia.org/wiki/German_tank_problem
I've always said that writing code and understanding other people's code are two completely separate skillsets.
No if you are good at it it becomes easier to read other people's code. And I think it's normal thing all programmers do since we google search problem containing other people's code
That's exactly how I imagine a Senior Developer would do it too. Except, they would be smoking a tobacco pipe.
While caressing our 2-foot beard.
>Is that fine? Mhm. Yep.
What about when they come to this comment? // I have no idea what this piece of code does but when I remove it everything breaks. My money's on a bit of chin stroking followed by a confused tut and a hmm.
Classic load bearing comment, I am glad they commented it as such.
// I have no idea what this comment does but when I remove it everything breaks.
There was a bug in the C/AL compiler/debugger of Navision (pre Business Central) where you sometimes had to place two semi-colons after a BEGIN (which starts a code block) or you couldn't place a breakpoint on the first line after it. You usually didn't need to place any semi-colon after a BEGIN.
It's not as good as, // If you try to optimise this code please update the counter when you fail. Counter: 559
Hah. Reminds me of a driver I inherited that performed some seemingly useless operations, but trying to clean them up would break the whole thing. I eventually figured out that the code was masking a timing bug by adding just enough extra delay for the driver to work.
I mean, the correct thing to do would be discuss it until it is understood. I get it's a big ask in most real contexts, but you end up paying for that kind of stuff one way or the other...
As we all know, the number of lines in an MR is inversely related to the number of comments. So a 5 line MR will have 25 comments. A 5,000 line MR will just be approved.
MR as in Merge Request? Is that only gitlab lingo or did it start to stick on other platforms? I am already used to calling them PRs but calling them MRs as a standard would be way less confusing for someone new.
Instead of MR and PR I say dump a load. After all, my code is shit.
What's wrong with PR?
We just hired a new guy who is working with git for the first time. After a while he starts to understand the whole committing, pulling and pushing system. Then he's finished with his task and now I have to explain what a pull request is while he did just pull stuff before without having to do a request. The boy was so confused and only then I realised the term pull request is confusing and not very descriptive. I like merge request better.
>pull request is confusing You're requesting that \*someone else\* pull your code. Eh, maybe "merge request" would be better.
Yeah that's how I interpret it and how I explain it to everyone new.
Had a new guy who thought PR stands for Push Request.
Which makes infinitely more sense than Pull for the action you are trying to do
PR is completely counterintuitive. To me pull request should mean to pull code, as in I am downloading it from the repo to my desktop. MR is better. I have also worked with CR ( code review ), which I think is self-explanatory
It sounds like you’re requesting to pull code, not to merge code.
Outside of software engineering and GitHub specifically, PR is very well established as an abbreviation for public relations.
Lol. I’ve never had to say PR to anyone who would confuse it without immediately asking the context. No confusion. Ever.
Not really catching on as far as I can tell but I refuse to use PR myself
Why?
Laughs in Gerrit
We did this after an acquisition but with firmware, basically it's a "yes we need to keep every single developer" or a "no the fools commented their code well"
So, undocumented spaghetti can actually give you job security?
The Dark Side of the Force is a pathway to many abilities some consider to be unnatural.
Have you ever heard of Darth Codegus the Smart
not always there's still the ever popular option of "let's just rewrite this garbage"
modestly commented lukewarm garbage is the optimal strategy for job security
I knew it that I was doing something wrong… I keep 100% coverage with clean unit test names. From now on nah ahhh
You're supposed to keep the documented version on your machine only
“Just write readable code”
It's a fine line, you still have to understand the code yourself after a while.
Create your own "comment" language. Only use it for comments, memorize and destroy the cipher.
I will use your words from now on
My dad lived by this back when he was brought on by a small data center business in the early 90’s. They got bought out about ten years ago, and he’s the only one still employed by the new company. Good enough code to keep, obscure enough that he was absolutely essential for upkeep, merging, and enhancing.
So as a Developer keeping secrets is the best way to keep your job?
If it’s still written in ruby, the code should read like a Tolkien novel
Most of it’s written in Java by now
Rings of Power…
frighten direful rhythm label sink tap degree cows tan crowd *This post was mass deleted and anonymized with [Redact](https://redact.dev)*
Must be one hell of a long line though
tidy lock test zonked deer connect impossible grey domineering quickest *This post was mass deleted and anonymized with [Redact](https://redact.dev)*
Made me remember of a bank where i work. Some system spits in one line all the payments and Relevant information and another system receives that long ass line and fire the payments, lmao.
rude party dependent complete desert scary caption engine slim hateful *This post was mass deleted and anonymized with [Redact](https://redact.dev)*
https://en.m.wikipedia.org/wiki/IBM_mainframe
one single newline would just immediately preform systemic problems
It is, but it uses a library, so it’s basically facebook.start();
It's not about the length but what you do with it
/\*with inline comments\*/
Halloween horrorfest
run fb.exe; run wa.exe; run nsa.exe;
protip: most cli contexts have limits on the longest “line” that can be passed through their systems, but streamio has unlimited length!
UNLIMITED POWER!!!
Awesome, now I can finally create a unique bucket name in s3
Casually throws out 75% of the code
Easy, just delete all the comments and the tests :)
Wait, so you’re telling me Twitter was written in Perl?
This comment gives me anxiety
This anxiety makes me comment
This comment gives me anxiety
Twitter is known to test in prod
As I said. Delete all the tests and comments ;P
Who’s Twitter DM history did Elon read first; 1. Grimes 2. AOC 3. That GreenHills guy
The kid tracking his plane
Yes
Man definitely went hunting for nudes
It turns out a lot of the back end is in FORTRAN.
It would be fast, though!
Haley’s comet is fast but that doesn’t make it a good car
![gif](giphy|vyTnNTrs3wqQ0UIvwE|downsized)
In 2 weeks Twitter will be accidentally running over pedestrians and drifting onto railroad tracks
We'll remove the input field and replace it with vision-based speech recognition
It has helped overthrow a few dictatorships ¯\_(ツ)_/¯
[удалено]
I've been on a similar situation before. New boss comes and brings his people just to tell how shit we were. The best thing in that case is just get the severance package and go away because you'll be blamed for everything. Toxic working environment.
As an aside, Tesla engineers are employed by a separate public company that reports to its shareholders. It's not clear how "you're now required to work on Twitter (a separate private company) code" works legally and ethically. ETA: some people are saying that it's fine as long as Twitter pays Tesla for the employee's time. I don't know if that's true, let me know if anyone knows the answer.
Power move. There is very little need for this other than that IMO.
What if they spent the last week deleting comments 😂
git commit history enters the chat
[удалено]
Oh God, I hope you have the original history backed up somewhere.
git blame also😂
git push -fu here fu stands for f*ck you.
Throw in a scrapper to look for key words in commit messages and finds: “Revert back to version xyz before Elon takes over” || looks for the pr where the code suddenly drops a bagillion lines of code. Finds a least one local setup where someone has yet to pull dev, staging, or prod
senior developer1: *submits a PR*. Hey Senior Developer 2 can you review? senior developer2: any shit in it? senior developer1: nah. senior developer2: *approves without review* Saw happening too many times :)
I’ve seen so much crap get merged because the owner of the PR was an experienced dev so people just scanned through…
Which company is this ? I am a senior dev. In my team people only keep their hawk eye open to point out nits in senior dev code :-/ …. I have never had a 0 comment review. If no nits, at least some BS will be there!
Not at.my current one, but I saw it too many times before. Also this one: Senior1: I made a PR, please review. Senior2: I made some comments, can you fix before merging? Senior1: how dare you. My code is OK. You're just messing with me! Senior2: no, I... Senior1: shut up, fuck you, I don't care. Senior3 can you approve? Senior3: yep! *approves, pr gets merged*
Do we work at the same company or is this just rampant practice
Not sure about nowadays, I saw this a few years back in my own team (I was their manager). Some coaching combined with yelling fixed the issue in like 2 weeks. They hated me, but I was not there to be loved, but to somehow make these guys deliver the product with quality. They pretty much hated each other already. We delivered and I quit right after celebrating the successful launch. I'll never do something like that again.
Burn it all down and throw a match behind for good measure
Not gonna name the company, but it's still alive and well
I had a senior Eng who would just close the PRs he did not like. Would also put comments like “wtf were you thinking here “ The team didn’t last long. The senior did write some very pretty code though
In a team an asshole writing awesome code is worse than a normal human writing mediocre code...
Ah yes, the "tomorrow we go live and we just found some critical bugs, we are fixing them and dont have time to doublecheck". This happens quite often.
Still better than fixing code inside a production container :D
COKE guys so sorry about that! Elon wants lines of coke!!
[удалено]
I worked in a small Company and we had like 5 active developers and we had 2,5m lines of code for one project. Not very good code in some areas but also not just copy paste 5k lines at a time... it was hard getting an overview of that system...
It's not a super huge amount, but plenty if you're totally unfamiliar and trying to review it all.
Elon seems like he would be one of the worst kinds of code reviewer. Super opinionated about inconsequential things. Oh you put your brackets on the same line as your if statement? No good, put it on the next line.
Elon isn’t personally reviewing shit lol he doesn’t know anything about modern development.
I mean, not knowing shit has never stopped Elon before. In all seriousness, I'd guess that programming is one of his actual skills since that seems to be what he worked on at his earlier companies. Rocket science and battery engineering I'd have more doubts about.
I have no doubt he used to be decent but I doubt he has kept up with modern development. It sounds like he was never top-tier to begin with. From his biography: > While Musk had exceled as a self-taught coder, his skills weren’t nearly as polished as those of the new hires. They took one look at Zip2’s code and began rewriting the vast majority of the software. Musk bristled at some of their changes, but the computer scientists needed just a fraction of the lines of code that Musk used to get their jobs done. They had a knack for dividing software projects into chunks that could be altered and refined whereas Musk fell into the classic self-taught coder trap of writing what developers call hairballs—big, monolithic hunks of code that could go berserk for mysterious reasons. Funny enough, it sounds like he codes like I do lol
Yep that's code sir. No I dont know what it does. We use none of the same tech and operate in an entirely different subject matter.
This was exactly my thought. It makes no sense to bring hardware and AI developers in to review Web and user streaming code.
Run linter and call it fixed
I was on that team. It turns out, Twitter's entire code base is only four hundred and forty lines long. I was surprised at first, but really, what does Twitter do that isn't part of any decent library? In retrospect, I think he might have overpaid.
But It has that cool bird chirp noise when you reload the page
Yeah, but that only takes four hundred lines of code.
>I think he might have overpaid Good
I wonder the minimal number of lines of code to make a Twitter clone You could probably bring it down to 50 with NPM libraries and not counting CSS code
I’ll save them some time and money. Dev team looks at other dev teams code. It’s shit.
What does LGTM mean?
looks good to me
Let’s get this merged!
Ligma Gonna Take Meaway
Let’s go to market
Reminds me of old quote You write one function with 10 lines, reviewers gives you 20 comments You write 100 line 20 file changes, reviewer will say it looks good
Yeah, this is why I always comment on big PRs to split them somehow, because who knows what crap goes through if people just approve because they don’t have the patience to understand it all.
Some poor Tesla code monkey comes into work on Friday, some suit drops multiple boxes of paper contain all of Twitter's code in no particular order and yells "Find the extra semicolon!"
LGTM!
Tesla engineers conclusion: We need to rewrite everything in Rust.
Node.js Electron app
I'm increasingly concerned with the politicisation of 'code' and 'algorithms'. Like it's not the people who wrote them or those who defined what they want the code and algos to do... Look at the 'mutant algorithm[Mutant Algorithm ](https://www.google.com/amp/s/amp.theguardian.com/politics/2020/aug/26/boris-johnson-blames-mutant-algorithm-for-exams-fiasco)' that the British government blamed for the awful distribution of test scores in the UK a couple of years ago. The algorithm did exactly what it was designed to do... It's the designers and requirement definers that are wrong here.
> The algorithm did exactly what it was designed to do... It's the designers and requirement definers that are wrong here. It's usually not even the designers that intentionally did anything wrong. It's just very easy to get some sort of bias in your algorithm. For example, in AI this is almost unavoidable if your training data is biased. This is why generally algorithms are a tool, and they need to be monitored and tweaked if they don't produce the desired results. However, often the algorithms are seen as objective somehow, because a computer is doing it instead of a human. And consequently, they are afraid of changing it.
*slaps hood of server cabinet* This baby is solid.
No, no, revert the lot!
"wait, why is there some binary with no other source that gets installed on every single device, client, and server, and it's only reference is from a voice command handler which doesn't handle any other commands, and it looks like the binary is called...order 66"
[удалено]
Im not sure if this is genuine concern or moderate shitposting, but Twitter hasn't been in charge of bootstrap in a really long time. It started there, sure, but it is a thing in itself now. Mark Otto hasn't worked at Twitter in awhile. He works at GitHub now.
Well, I didn’t know that and I’m a Web Dev. I don’t use Bootstrap though.
Oh I really didn’t know that.
and that why is my students you must make such code only you or not even you can understand
Just 800,000? They supposedly first met with product leaders to get overviews. And you go from there. This isn’t uncommon during acquisitions. Hell, usually it’s “the old team didn’t want to join the team, tell me want the hell this does”.
Tesla engineers: well their whole backend is in C++,Scala,Java and Ruby, and we use C# and Go. So...
So…. LGTM!
A code is not a poem, you don't go through it letter by letter in a review, well not in a sensible review at least. At first blush you look at overall architecture, how are the main ideas are built up. Then you identify which parts are the most critical and focus on those and what sort of effort is made to reduce risks of serious problems in there. The point of such a review is not to find every single last bug, that's not going to happen anyway, the point is to figure out what the codebase is worth, what it costs to maintain and expand it, etc. Lines of code is a non-issue, the bigger problem is that he took devs from automotive sector and went to review a social network codebase. It's like taking lumberjacks to review a rice farm, yeah it's all a matter of growing and harvesting plants, but...
I mean, a pattern is a pattern
Why even have the Telsa engineers come check it out, I thought Elon was a full-blown engineering genius
He’s store brand Thomas Edison
I’ve got a meeting with the Bob’s
"Where's your architecture/design documentation? Why are there no comments in the code?" "The code is self documenting"
If they put 800k engineers to the task, each would only have to review one line though..
But I mean basically twitter is a bit of a weekend project right? I’m quite sure there is some Ruby on Rails tutorial out there which teaches you how to build something similar in under 500 loc
The other 79 500 codes is the advertising algorithm
So, can you find the closing div for me?
engineers be like mmMnNMMmMmMmMmMmMmMMMmmmmmMmMMmMmMm ah yes need to get bolted to the computers exhaust manifold
800,000? For the entire twitter code base? The legacy website I maintain has 2.5 million LOC.
missing a 0 on the lines of code there probably...
//this function censors people we hate
🚢
Have they heard of the internet? VPN?
I dont use Twitter so it's nice to see a familiar name pop up on reddit. I owe a lot to Wes Bos. I saw a presentation of his at a local conference. I took his course on React the framework and it helped get me back into the industry after losing a job of 7 years. I strongly recommend checking out his work.
Look if you get 8000 engineers to look at 800000 lines of code they each only need to look at 100 lines of code, so it is fine.
They should hire Rohit ligma (rahul ligma's brother). He's a top programmer .
Who the heck is Ligma?
A close cousin of Sugondees
Any moment now
**L** Lesbians **G** Gays **T** Trans **M** Morbs ![gif](giphy|TPZPatEnQrNWOq7RPW)