I'm fairly experienced in MATLAB, but a complete beginner in Python and VBA, as evident from the two linked questions.

I have to (and want to) use Python and VBA at work, but I don't have the time to read the manual from beginning to end, do tutorials etc. What I do now is I write a code in Python / VBA, that basically looks like a translation of MATLAB-code. The code I have is working, but it's written mainly based on answers from SO, and some help from the documentation.

I've tried to write it as well as I can, but a lot of stuff is done horribly cumbersome. I've made no attempts at "fixing" my code after it started working. When it works, I'm done. I don't have time to go through it step-by-step and find alternative, better ways to do stuff. I've probably passed my deadline already.

The code I write now will never be shared with anyone, and it will never be part of some bigger project. I do however want to learn both languages well enough to write code I can show to peers, and share with others.

I will learn a lot if I get a review of my code, since I've used days/weeks to make work. My concern is that if I post it, it might look like I've just written a sketch and then ask someone else to fix it for me (even though I've been working on the code for a long time).

I start writing new scripts regularly. Unfortunately, I'm probably doing the same bad choices over and over since I know it works, and I don't know any alternative ways to do it.

Is it OK to ask for a review when I've spent a minimal amount of time trying to restructure and fix it myself?


Yes, but test extensively. Ideally, provide test cases. You'll want to be extra sure that it works like it's supposed to, so refactoring suggestions can be made and tried without risking that the implementation stops working.

Another thing to note is that answers will be based on the code you have posted, so the better the original code, the better the answers. You'll want to make sure you're going to get non-obvious answers, or it'll be a waste of time for everyone involved.


Not the answer you're looking for? Browse other questions tagged .