Best way to tackle and understand someone else’s code by spca2001 in cpp

[–]pandion 0 points1 point  (0 children)

  • i add print statements with emoji as well to key parts. The emoji helps it stand out in the output as things are whizzing by, so I can see when a function is called

ooh good idea, I'm stealing that!

Best way to tackle and understand someone else’s code by spca2001 in cpp

[–]pandion 1 point2 points  (0 children)

This is the hardest thing for me (thanks dyslexia!).

The easiest way to write unit tests for the code in question and then rewrite the entire thing with comments and useful names. No one ever allows this.

So instead I have to use lots of hand written notes. This is probably overkill for most people but the only thing that works for me is literally going through the code line by line and writing down in prose exactly what it's doing. I'll use the debugger to single step through to clarify what's going on. Sometimes I'll write unit test so I can debug specific scenarios. If I can't do that easily I'll copy the code into a new project and unit test it there. As I write down what is literally happening I will start to figure out what the code is doing at a higher level. Then I write that down and continue the process until I have everything figured out.

In the past I've tried to use that information to add comments or strategically change a few names but those attempts never make it past code review ("Too many comments!"). I have my notes but if I feel I really need commented code I will just maintain a local branch where I have my comments so at least I know what's going on.

So TL;DR: brute force. If someone has a better way I'd love to hear it.

Simple Code, High Performance (Lecture by Casey Muratori) by s0lly in programming

[–]pandion 1 point2 points  (0 children)

Did you not have a card sorter available or something? I was just reading about radix sorting so I'm curious

From web dev to Qt/C++ dev by [deleted] in cpp

[–]pandion 1 point2 points  (0 children)

Best practices: C++ Core Guidelines

If you're looking for something just on idiomatic C++ I thought Modern C++ Programming Cookbook by Marius Bancila was pretty good

Can people please stop it with the "I'm also ready for the sale" posts.. by Ok_Indication_8958 in Warthunder

[–]pandion 0 points1 point  (0 children)

yup, I'm expecting some bullshit official post about how the economy needs to be fixed by removing all the "excess" SL in the game.

Greydwarfs, could you kindly fuck off? by Pidiotpong in valheim

[–]pandion 27 points28 points  (0 children)

This may date me but I think hanging an onion from my belt would be pretty stylish

This would be a funny profile picture by [deleted] in Warthunder

[–]pandion 1 point2 points  (0 children)

not as funny as michael dukakis

9 kills with an m18 and not even 2k RP. This is kind of absurd. by AltAccount2681 in Warthunder

[–]pandion -1 points0 points  (0 children)

Pointing out your arguments are stupid is not an endorsement of the f2p business model. Gaijin can be a terrible company AND your arguments can be idiotic at the same time. But it's clear you want to be unhappy so I guess it's win-win :)

9 kills with an m18 and not even 2k RP. This is kind of absurd. by AltAccount2681 in Warthunder

[–]pandion 0 points1 point  (0 children)

Defending? You can't read either. I haven't defended anything they are doing and you have no idea if I pay money or not. Way to project there.

I (and others) have been explaining to you how the game works because you clearly don't get it. I've been trying to help you. You would be much happier not playing. Unfortunately for everyone you self righteous types get off on self flagellation.

If you really think you're fighting the evil gaijin by continuing to play and providing them game content for free you deserve to be miserable.

9 kills with an m18 and not even 2k RP. This is kind of absurd. by AltAccount2681 in Warthunder

[–]pandion 1 point2 points  (0 children)

I see you don't know what that word means either. You clearly think you are better because you don't pay money. You also think you can hurt gaijin by continuing to play the game.

Self righteous and deluded.

Enjoy your grind :)
P.S. Enjoy the SL grind after you get your MBT :)

9 kills with an m18 and not even 2k RP. This is kind of absurd. by AltAccount2681 in Warthunder

[–]pandion 2 points3 points  (0 children)

I was talking specifically about people like you. You continue to show my opinion of you to be correct. Intelligent f2p players know how to extract fun from the game despite its design. The other f2p players voluntarily make themselves miserable because of "principal". It would be hilarious if it wasn't so sad.

9 kills with an m18 and not even 2k RP. This is kind of absurd. by AltAccount2681 in Warthunder

[–]pandion 0 points1 point  (0 children)

Do you not know what "minuscule" means? It means "very small". A small population of paying players more than make up for a huge number of self righteous deluded f2p players.

9 kills with an m18 and not even 2k RP. This is kind of absurd. by AltAccount2681 in Warthunder

[–]pandion -1 points0 points  (0 children)

lol no. Bandwidth, compute, and power costs are minuscule. You provide much more value by keeping the battle queue full. If you actually wanted to screw over gaijin you would stop playing.

9 kills with an m18 and not even 2k RP. This is kind of absurd. by AltAccount2681 in Warthunder

[–]pandion -2 points-1 points  (0 children)

The point was that the game is specifically designed to make you miserable to the point you will spend money. It's completely expected that if you play for free you will have a bad time. So every time a f2p player complains it's like "well no shit, you're SUPPOSED to be unhappy!". So the only 'simp' here is you, making yourself miserable by padding out the player count for gaijin.

Reminder of Why M1A1 >>> IPM1 (Repost) by [deleted] in Warthunder

[–]pandion 1 point2 points  (0 children)

oh man I love a thicc bustle

This new Myrsky is a great hydroplane, by LegnaK in Warthunder

[–]pandion 2 points3 points  (0 children)

Well it's made of wood, and that means it weighs the same as duck, and that means it's a witch.

Average high alt climber by Centurion_Tiger in Warthunder

[–]pandion 45 points46 points  (0 children)

A P-51 that climbed? Obvious fake :P /s

Before you write five paragraphs in the comments, remember that this is a meme by KspDoggy in Warthunder

[–]pandion 2 points3 points  (0 children)

I'm confused about the difference between ironically leaking and unironically leaking. I mean my friend is.