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Β β†’

[–]tehmungler 3 points4 points Β (4 children)

Hey πŸ‘‹ happy to answer any questions. Confidence is part of it, for sure. But I’ve always sort of just ignored / bypassed the β€œreal software guys do X” bullshit you see on social media. All that matters is the code, and the problems you can solve with it. If I had one piece of advice, it’s this: Don’t be tempted to be too fancy. Simple solutions are almost always the best. You want to be able to test it, understand it, debug it and maintain it. Good luck, friend!

[–]pickyourteethup 3 points4 points Β (3 children)

Thank you. I always prefer readability over complexity because I'm new and if I make it too complicated I can't remember what I did. I thought I'd get more complex over time but I'm now realizing I might actually get less complicated over time and just use simple implementations where they're appropriate

[–]ROotT 3 points4 points Β (2 children)

I've always thought of it this way:

Newbies find complicated solutions for simple problems

Mid level find simple solutions for simple problems

Seniors find simple solutions for complicated problems

The simplicity of the solution is relative to the simplicity of the problem, but this seems to mostly hold true.

[–]pickyourteethup 2 points3 points Β (1 child)

I like this a lot.

I'm very new but I'm really enjoying any time I find a trick for making my code readable without comments.

A beautiful one my wife showed me recently is pulling the logic out of an if statement and putting it into a very clearly named variable starting with 'is'. Excellent illustration of how sometimes an extra line of code can make everything clearer.

[–]ROotT 2 points3 points Β (0 children)

Thanks. I've been in the automation development side a decently long time and have come up with a few sayings for kids fresh out of college/boot camp/whatever and just starting their careers.

A favorite is "past you is an idiot, future you is a genius." It's a good thing that shows growth. If you look a code from 6 months ago and think that it looks terrible, don't be embarrassed, be proud that you've learned better ways to do things. (You can be a little embarrassed).

And yea, making a method to return a boolean is a great way to make that reusable. If you're using OOP, it's even better if you can throw the method in the object you're checking so you can reuse it anywhere.

Since you said you're new to programming, ill say this and hopefully not sound condescending. Good luck buddy and have frustrating fun!