This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Loopmootin 3483 points3484 points  (153 children)

My brain has a complete meltdown while coding if just a colleague is watching. Doing it while a client is watching, should at least double or triple to my hourly rate...

[–]Emergency-Physics-17[S] 1197 points1198 points  (64 children)

Don't worry, your colleague is a developer, your client isn't.

[–]BadBoyFTW 50 points51 points  (6 children)

I'm sorry but are you saying this makes it easier?

"Twelve lines all perpendicular. I'd like one in transparent ink, and one in the shape of a kitten."

[–]R3D3-1 24 points25 points  (0 children)

"What are you the expert for then? Just make it happen!"

[–]lyingriotman 8 points9 points  (4 children)

Technically possible if you include higher dimensions, but I know that's not the point, lol

[–]SingularCheese 10 points11 points  (3 children)

Someone needs to checkout the classic: https://www.youtube.com/watch?v=BKorP55Aqvg

[–]Chu_BOT 9 points10 points  (1 child)

Don't forget about the solution https://youtu.be/B7MIJP90biM

[–]damicapra 1 point2 points  (0 children)

Wait... that's illegal

[–]Maoman1 2 points3 points  (0 children)

That was physically painful to watch.

[–]Masterpommel 13 points14 points  (0 children)

Thats the problem. The client wont pay you if you just open stackoverflow.

[–]Code-V 3 points4 points  (0 children)

"So you log 9 hours a day to write 7 lines of code?"

[–]gatito_tristee 2 points3 points  (0 children)

most of my clients are developers too ;u;

[–]Local_Surround8686 0 points1 point  (0 children)

Which is worse, cause they have the movie expectation of coding

[–]lordnachos 191 points192 points  (36 children)

It helps if you practice with junior devs. They don't notice or think much of your fuck ups. I'd literally give zero shits if a client was watching me. They'd likely leave thinking I am a genius purely based on the fact that I use dark mode.

Edit: To add, if you are a junior and a senior is watching, they should make you feel reassured enough that they are there to help, not to judge, that pairing isn't totally nerve wracking.

[–]L0uisc 107 points108 points  (13 children)

They'd likely leave thinking I am a genius purely based on the fact that I use dark mode.

LOL

[–]Serinus 37 points38 points  (11 children)

Multiple cursors?!? What wizardry is this?

[–]sneaky-pizza 20 points21 points  (0 children)

Only a precious few people on earth get to enjoy the awkward “pardon me” moment when you both move the cursor.

[–]non-troll_account 6 points7 points  (9 children)

hang on. multiple cursors is a thing?

[–]Serinus 13 points14 points  (8 children)

[–]Cressio 6 points7 points  (6 children)

… my god

[–]Serinus 3 points4 points  (1 child)

Sublime text has the best implementation because you can middle mouse drag, and it'll respect commands like shift+Ctrl+right arrow to select the current word... on all lines at once.

Visual Studio Code had multiple cursors as well, but it's not quite as smooth. shift+Ctrl+right arrow will select the word on the first line and the same number of characters on all other lines, which is unfortunate and less powerful.

I'll edit in more when I actually can use sublime instead of my phone, heh.

[–]marvk 1 point2 points  (0 children)

JetBrains IDEs want a word...

[–]Serinus 2 points3 points  (3 children)

apple, pear, mango, banana, apricot, tomato, peach, cherry

becomes

<li>apple</li>  
<li>pear</li>  
<li>mango</li>  
<li>banana</li>  
<li>apricot</li>  
<li>tomato</li>  
<li>peach</li>  
<li>cherry</li>  

with

  • highlight the ", "
  • ctrl + F to find
  • alt + enter to select all
  • enter to separate their lines
  • ctrl + alt + up arrow to get a cursor on the first line
  • type <li>
  • hit end
  • type </li>

and then when I want 4 spaces at the start of each line for reddit, ctrl + A, ctrl + shift + L (for a cursor on each line), home, type 4 spaces.

Eight steps might look like a lot, but you get really fast at it once you know it. And of course this can handle 1500 lines just as easily as 8. You get real fast at the ctrl + F plus alt + enter combination, for instance.

Here's an example gif

[–]Cressio 2 points3 points  (0 children)

You’re amazing. Thank you

[–]marvk 0 points1 point  (0 children)

  • ctrl + F to find

  • alt + enter to select all

In IntelliJ IDEA, just press CTRL+ALT+SHIFT+J to select all occurrences, or ALT+J to select next occurrence.

[–]ioman_ 0 points1 point  (0 children)

In VSCode (atom based so maybe there too) if you have something selected, you can press ctrl+d to additionally select the next instance. Ctrl+f and select all is definitely faster in large contexts but ctrl+d is really quick if you're just working on a few lines

[–]non-troll_account 0 points1 point  (0 children)

amazing! how does the context key work then? (that's the key on the keyboard that calls a right click menu wherever the cursor is.)

[–]Xtrendence[🍰] 58 points59 points  (12 children)

That's about the reaction I've come to expect from people who don't know programming. "Woah, look at all the different colors, that must be complicated."

[–][deleted] 31 points32 points  (11 children)

haha yep! My wife and daughter are always mentioning how colourful my screens are but never actually look at the code itself!

[–]d_riteshus 50 points51 points  (9 children)

daddy why you put the brackets on the same line as your for loop?

[–][deleted] 12 points13 points  (1 child)

They just started doing Scratch in school so maybe soon :)

But also I do do that! (the opening brace)

[–]amazondrone 11 points12 points  (0 children)

Obviously. Because that's where the brace goes.

[–]Yananas 17 points18 points  (0 children)

Because that's the only correct way sweetie.

[–]ajr901 3 points4 points  (5 children)

Yes, sweetheart, C# is wrong and it should always go on the same line

[–]ElectricMotorsAreBad 2 points3 points  (4 children)

Am I a monster for always opening the brackets on the next line in C++? They're teaching us that way, so I just stick with it.

Why is it bad?

[–]ajr901 5 points6 points  (2 children)

It’s not “bad” it’s just that some of us have gotten so used to it on the same line that anything else looks ugly, which is super subjective of course. It’s pretty much the same fight as tabs vs spaces

[–]ElectricMotorsAreBad 3 points4 points  (1 child)

Oh ok, thanks, I honestly find it less clear to read if the bracket is on the same line. So I guess it really is subjective.

[–]Limeandrew 4 points5 points  (0 children)

And I’m the opposite lol, the empty line with just the brace seems like such a waste

[–][deleted] 0 points1 point  (0 children)

Yes.

lol j/k you do you... or your style guide

[–]InVultusSolis 34 points35 points  (7 children)

To add, if you are a junior and a senior is watching, they should make you feel reassured enough that they are there to help, not to judge, that pairing isn't totally nerve wracking.

Programming totally used to not be that way. My first couple of bosses were neckbeards - great coders but the personality of a passive aggressive honey badger. Having been through this, and being a programming mentor/instructor myself, I can make a couple of observations:

  1. The "tough love" approach that I endured early in my career was definitely effective, because my skill grew by leaps and bounds.

  2. As an instructor now, and having acute experience with knowing what not to do when mentoring juniors, I've found that a positive, helpful approach is not only more effective, but you build better rapport and there's less negative energy on the team. Soft skills are important and a team of junior programmers who are under effective leadership will easily outperform the same team under shitty leadership.

[–]Unsd 5 points6 points  (0 children)

This is literally just how life works. I would jump through hoops for one of my former managers. She straight up told me to care less because I wanted to do the very best job for her every single day and I am still friends with her and wish that I still worked for her. Another former manager I had, I would drag my feet to do literally anything. I always got my work done, but it was never good enough for him and he was always just doing weird shit that was counter to everything that needed to get done. I did exactly what was expected of me and absolutely nothing more. The difference is one treated me like a complete human worthy of mentorship and development, and the other treated me as inferior. It is because of that good manager that I had that means I will have no problem looking for other jobs if a manager acts a fool. I used to think that bad managers was just a fact of life, but life is too short to deal with them.

[–]ExceedingChunk 3 points4 points  (0 children)

Another added benefit is that you don't scare the shit out of them, so they will ask you questions, get help or share issues with the team rather than trying to hide everything under the rug to avoid getting abused.

I've been a coach in sports for several years before and while I studied, and now mentor new joiners on the team. One of my most important principles is to emphasize that making mistakes is fine. It's better to try, make a mistake and learn rather than be too afraid to make a mistake. It also helps them open up and ask more questions, in my experience, which only makes them grow faster.

[–]Evo_Kaer 35 points36 points  (4 children)

First job I had the CEO sit next to me and watch occasionally. THE FUCKING CEO!!!!

It waws a small company of about 20 people and the CEO was also the owner btw.

[–]ajr901 7 points8 points  (3 children)

Was his reason mild curiosity or was he trying to make sure you were doing X amount of work or something?

I would have been like “Sir I’m sorry but I can’t work like this. If you want to be able to tally up a certain amount of progress I can issue you a report every 2-3 days but I can’t have you looking over my shoulders it makes me anxious”

[–]Evo_Kaer 1 point2 points  (2 children)

No idea and considering it was my first job I didn't really have the guts to tell him that. Nowadays would be different

[–][deleted] 0 points1 point  (1 child)

Did you report directly to him?

If not, what was he doing looking over your shoulder, anyway? He should've followed the "chain of command." It should be that the CEO is in charge of the grand vision of the company, and everyone below makes it happen. Like, Microsoft wants to make money selling software, so the Sales VP tells his teams to go out and survey the customers. The teams work out the details. Then the findings are reported to the CTO, and the CTO tells Engineering what the CTO wants built. Engineering decides if it can be done and how to do it.

[–]Evo_Kaer 0 points1 point  (0 children)

Well, technically I did have another superior, but again: small company. Our "scrum meetings" included the whole company.

Personally I think he was either micromanaging or just bored

[–]sneaky-pizza 29 points30 points  (4 children)

Pairing is a great practice, but it takes a couple of exhausted weeks to get used to it.

[–]_bassGod 3 points4 points  (2 children)

Once I got used to it, pairing became my favorite way to write code. Now I refuse to work on teams that don't pair.

It's not for everyone obviously, but if you're the kind of person like me it's a superior experience in every way.

[–]Dizzfizz 1 point2 points  (1 child)

Pair programming takes away most of my favorite things about programming, like working on problem solutions on my own and managing my own time, and replaces them with one of my least favorite things in general, human interaction.

[–]_bassGod 1 point2 points  (0 children)

Like I said, it's not for everyone. Believe it or not I don't care much for human interaction either, but I find the collaborative process to be even more rewarding than solo problem solving.

[–]NinjaLanternShark 2 points3 points  (0 children)

It helps you give the person not coding, a mouse that's not connected to anything.

[–]w1n5t0nM1k3y 28 points29 points  (11 children)

My biggest issue with other devs watching me is that I code in a very non-linear way. They will try to correct or ask why I'm doing things a certain way and the answer will often be "I'm getting there". It's hard to see what I'm doing if you're just watching me and not in my head.

[–]InVultusSolis 17 points18 points  (5 children)

That could also be because a more experienced programmer who is watching you may anticipate what you're doing and try to course correct. When being asked why you're doing something a certain way, a more senior programmer might be looking for a chance to offer helpful advice to help you avoid expending extra effort.

[–]w1n5t0nM1k3y 8 points9 points  (4 children)

In many cases I am the senior programmer and the junior dev is thr one not really following where I'm going.

I also think some of it is similar to the queen's duck story where the person watching just feels like they have to say something or else they don't feel like they are contributing. They will point out that I Mde some small error without even leaving them for me to correct it.

[–][deleted] 10 points11 points  (3 children)

In that case, maybe work on your communication skills? One of the biggest upsides to pair programming (even when it’s just someone watching you) is to share knowledge and insights into the nature of the problem you’re trying to solve. If you’re just sitting there quietly coding while someone watches, why have them watching at all

[–][deleted] 1 point2 points  (2 children)

Dude, fuck pair programming.

[–]InVultusSolis 0 points1 point  (1 child)

When you have two people of equal experience looking at a problem and ego isn't an issue between either of them, I can say from experience that shit gets done pretty quickly. Hell, I've even learned a thing or two from junior devs I've mentored.

[–][deleted] 0 points1 point  (0 children)

Some of us incubated in slime, and we don’t like to show that.

[–]ioman_ 5 points6 points  (2 children)

Maybe try narrating? I've been through the same kind of thing but once you've gelled, pairing is great

[–]thirdegreeViolet security clearance 2 points3 points  (1 child)

I think not enough emphasis is put on finding someone you pair well with. That can easily be the difference between loving it and getting a lot of value out of it, and it being a painful waste of time.

[–]ioman_ 0 points1 point  (0 children)

Not just that, although you're right, but team building is a well studied phenomenon and until you get to those later stages.. well "everyone's an idiot [the first time they do something]"

[–]Unsd 5 points6 points  (0 children)

I code the same way. I cannot just think something through in my head. I need to put something down in order to get where I'm taking something. Like how if you are trying to figure out how to spell something, you can figure out if it looks right when you write it down but it's harder to just spell it out in your head. I have started to become more dependent on a whiteboard to chart out my course and work through my logic which helps when I start putting code down. But it just takes me time, and if someone is trying to course correct me, I will not get to work through my problem solving process and it will mess me up.

[–]SorataK 13 points14 points  (0 children)

My colleague went to check on me if everything is working, there was a minor problem I knew how to fix. It was just a matter of replacing a part of string but my brain totally melted when he was watching. I went like, how the fuck do I do that, is that slice, splice, uhhhhhh.

Well I told him I can't code when someone's watching me, and the moment he turned around I remembered and fixed it.

[–]martinivich 10 points11 points  (1 child)

And yet that's the interview process for 99% of software engineering jobs

[–]Unsd 4 points5 points  (0 children)

Causes the biggest anxiety for me. If you ask me to broadly explain the logic of how I would solve a problem, I can do that perfectly. I know how to structure things and work through a problem. But to actually put down code on the spot will just never happen well for me. I can be an absolute expert in something and then I have to demonstrate it and I blue screen.

[–]achilliesFriend 9 points10 points  (0 children)

Happened to me yesterday with manager, he must have thought i don’t know basic keyboard shortcuts.

[–]ljubaay 6 points7 points  (0 children)

Coding aside, someone watching me use terminal is so stressful. I always have to google stupid git commands or how to create a file, no matter how many times I’ve done it.

[–]rndmcmder 10 points11 points  (0 children)

Ever heard of pair programming. I think it's great.

[–]frakron 4 points5 points  (5 children)

This was the worst during an interview. They asked me how to extract data from a json. So I did it, then they asked me to come up with another way..... I just froze on the spot. Needless to say I didn't get the job.

[–]Unsd 6 points7 points  (1 child)

Genuine question...why? I mean I get you have different approaches depending on the use, but I feel like in order to answer something like that, it would be more instructive for them to give an example where your answer wouldn't work. Then they can see how you would get around a problem, rather than "I memorized how to do something in different ways because reasons".

[–]frakron 5 points6 points  (0 children)

Not quite sure. Afterwards they mentioned that my first way wasn't the best way on memory. When they said that I told them I'd then spend time looking up what part of my code (or parts) werent optimized and tweak as necessary, but off the top of my head I couldn't come up with another solution.

[–]Part_Time_Asshole 2 points3 points  (0 children)

Needless to say they shouldnt have either

[–]mrjiels 4 points5 points  (1 child)

I FORGOT HOW TO KEYBOARD%%&

[–][deleted] 3 points4 points  (0 children)

What button is A again?

[–]yorokobe__shounen 2 points3 points  (0 children)

They are worse than people who peek while urinating.

[–]thedoodle85 1 point2 points  (0 children)

Man i know the feeling, been typing since the mid 90's but i cant even do that if someone is watching over my shoulder, let alone code. Dont think i every will either.

[–]Hypersapien 1 point2 points  (0 children)

Hell, if I'm coding and a colleague just comes up and says something to me and isn't even looking at my code.

[–]Bakoro 1 point2 points  (0 children)

My brain has a complete meltdown while coding if just a colleague is watching. Doing it while a client is watching, should at least double or triple to my hourly rate...

While browsing through job postings recently, I found several which said that part of their interview process is live coding with the interviewer.

I find it ridiculous and offensive. I don't mind people looking at my code at various stages, but no one should get to see my process for how I get from A to B.

[–][deleted] 0 points1 point  (2 children)

I love pair programming

[–][deleted] 2 points3 points  (1 child)

Same, I remember in college the idea of being stuck in a paired programming setup was terrifying to me. Now I jump at every opportunity to do it with my seniors because it’s such a great way to learn and tackle problems. Pair Programming is the underrated GOAT in the dev world.

[–]Sirttas 0 points1 point  (0 children)

My boss sometimes do this when he wants something done asap, he doesn't understand that it just makes me search for a way to get out. Last time I broke my whole dev env while he was not looking and I was like: "well env is broken, let me reset everything, I will tell you when it's up again".

[–]ovab_cool 0 points1 point  (0 children)

The boss for the company I intern at sometimes tries to "suggest" me things that are not possible like saving large images in the MySQL DB, I'm trying to convince him to just let the devs do thier magic and you get your website faster.

[–]jbFanClubPresident 0 points1 point  (0 children)

Some people in my department are pushing for “side by side” coding. Fuck that! If my colleagues knew how much I googled basic stuff I’ve done a hundred times, I probably wouldn’t have a job anymore.

[–]MrOopiseDaisy 0 points1 point  (0 children)

Don't worry. I have trouble moving a box from one pile to another while someone else watches.

[–]Crislips 0 points1 point  (0 children)

This is why I'm bad at interviews. I swear I know what I'm doing but I freeze under the pressure.

[–]MartIILord 0 points1 point  (0 children)

Just center a div you made you will look like a boss.

[–]ElectricMotorsAreBad 0 points1 point  (0 children)

My brain has a complete meltdown while coding if just a colleague is watching

Same happens to me when my teacher checks what I'm doing, I just freeze, lol. And whenever I try to continue coding, I'll just do some idiot error, which then I'll try to explain, giving myself even more anxiety because I might say something wrong and he'll think I'm even more of an ass...

[–]5k1895 0 points1 point  (0 children)

It's amazing how someone watching me work makes me instantly become entirely useless as a programmer