4 ms·
I’ve been asking people this question. But first some context. Push-ups are almost universal in fitness tests. They are a solid proxy for strength. Additionall
by oldsklgdfth 6y ago
I’ve been asking people this question. But first some context.
Push-ups are almost universal in fitness tests. They are a solid proxy for strength. Additionally, they are an exercise that is manageable enough that you can do daily and reap significant returns if you do them consistently.
What are the push-ups of programming? More specifically for me, c++.
- mattmar96 6y agoI enjoy project euler. Its a series of programming challenges that can be completed in any language you’d like. https://projecteuler.net https://projecteuler.net
- haihaibye 6y agoRun a linter, think about the changes (eg new language feature) then fix the code, and try to write it that way going forward.
- glangdale 6y agoI hate to be one of those guys ("well actually, your question is wrong, because ...") but I spent a lot of time trying to find "C++ pushups" before deciding that I may as well work on interesting projects and try to consciously improve my C++ while doing them. I mean, sure, you can do Project Euler (or many other things), but you can also work on cool projects. I'm writing a superoptimizer (and I have C++ coding stuff at work). For both, I make a conscious effort to try to figure out better ways of doing that stuff (rather than just banging out ancient idiomatic C++ that isn't modern or good) - it's easy to slip into "doing things a dumb but quick way" that doesn't teach you much about the language or coding. I have a similar attitude to push-ups, honestly. I'd rather bench press once a week and do a sport than be constantly banging out push-ups. In both things, you quickly get to the point where you're hitting diminishing returns from the "push-up" type of operation, unless your goal is "to be the best at exercising". If we're comparing someone who couldn't complete 10 pushups or do a basic Project Euler problem with someone who can, I'd say "sure, that first person needs pushups (or programming equivalent)". I'm not sure once you're well beyond that point whether it makes sense to do that many more "pushups", unless you are going to a push-up competition in a month's time.
- ed25519FUUU 6y agoI think the sentiment is good. Who wants to waste time on “exercises” for programming? It’s much more fun to make stuff. The field is so vast and deep that you can pursue anything that interests you and learn a lot.
- CodeGlitch 6y agoCame here to say that programming exercises (hackerrank, etc) seem completely redundant when you can spend the time creating something useful whilst also improving your programming skills.
- dopeboy 6y agoThis is an interesting analogy and question. I'm a fitness guy and you're right, things like push-ups or squats are a vital, great thing to do regularly. I don't think performing a specific exercise is the route here. It's probably best to work backwards and find projects/challenges you find interesting and implement them in c++. You'll inevitably build new muscles + strengthen existing ones and most critically, be motivated to do it.
- stevegalla 6y agoTwo fitness principles: - Specific Adaptation to Imposed Demands (SAID) - Training blocks / periods / cycles / waves What are you trying to accomplish with C++? If you’re looking to have a better command of syntax, then do advent of code or something aimed at that. If you’re trying to implement algorithms in C++, get an algorithms book and implement them in C++. If you’re trying to get better at designing and architecting C++ code, look at good implementations (easier said than to find). What ever you practice, that’s what will improve, so it’s best to align that with your goals and work backwards. Athletes tend to have different phases of their training. Some periods of pre-season training, season, post-season where there may be a greater emphasis on things like strength, endurance, power. I think building is good, but there must be some other phases too. You can’t just build all year or else you might get stuck in a local maxima. So, there should be phases of learning, building, refining. Again, aligned with what your end goal is.
- strictfp 6y agoPush-ups is taking time to understand fundamental constructs. Everytime you are surprised by the language, take the time to understand why it behaves that way. Making this into a habit will grow your knowledge and give you core strength so to speak :) You will be able to progress from trial and error into diagnosing and correcting problems.
- caffeine 6y agoI don't think the analogy works so well ... programming and exercise are very different. Once you're not a beginner, programming mostly becomes about the specific domain youre working on, rather than the code. So improvement comes from a better understanding of banking or file systems or whatever you're doing, rather than cross-training in some proxy thing the way you do with exercise.