My first job out of school as been as the sole developer in a small company. I've been here almost a year now, and have created a couple of projects from the ground-up which are running in production day-to-day within the company.<p>My problem is, how do I make sure I am always creating good code? The one metric I have to determine if I'm making a good product is if it works. As I am the only developer, there's no one to review my code, to bounce ideas off of.<p>Has anyone else been in a similar position? How do you ensure you're not making foolish mistakes that you've become blind to?
>Has anyone else been in a similar position? How do you ensure you're not making foolish mistakes that you've become blind to?<p>If you are the only developer, well you still know the pain points in your own code.<p>And its far better to have something correct than nothing at all, even if its ugly and/or slow and/or hard to maintain or modify.<p>I often rewrite my code if i encounter limitations. Refactor often and write tests (I'm too lazy to write tests, bad, very bad, bad!).<p>Also read a lot of others code. Helps you grow and fill in blindspots.<p>You have a larger burden than usual to facilitate your own growth and knowledge expansion. Because you are alone.
Hi, not easy indeed !<p>No miracle, you will do thing that, looking at it in one year, you will find aweful.. that you would have been done differenlty..<p>You can try to use tools like codesniffer and such (code quality tool) to give you some metric and show you improvment.<p>You can maybe try something like <a href="https://github.com/marketplace/actions/openai-based-pr-reviewer-summarizer">https://github.com/marketplace/actions/openai-based-pr-revie...</a>. (Be sure it's ok with your company to use it - it uses OpenAI GPT model)<p>It's far from ideal, but it can maybe give you some insight ;)<p>Good luck
One option is to always have a few different projects going to keep your perspective fresh:<p>Create commits and PRs as if you were on a team, then go work on another project. Then come back and re-read your own PR. Having been doing something else for a while, you'll see it with fresher eyes. If it still makes sense and looks good, ship it.<p>This won't catch everything - you probably still have blind spots in your skill set. We all do. But it will prevent tunnel vision from being too close to your own code.
This is difficult. Few ideas.
1. Ask ChatGPT to review your code
2. Start contributing to open source projects where you can get your PR's reviewed.
3. Use <a href="https://codereview.stackexchange.com/" rel="nofollow">https://codereview.stackexchange.com/</a>
This is a common problem in small dev teams which have one infra/devops, QA, DBA, etc, and I’ve certainly been in those shoes numerous times.<p>You have to figure things out by yourself and rely on available resources for guidance. I often joined Slack groups, subreddits, etc. both to contribute and ask for advice. You’d be surprised how many people are also in the same position!
Maybe ask if your company can hire an expert to do an audit. Might be difficult it should be positive expected value for them. (you'll obviously need to make the case for this though)
You need a way to expose your code to others. Use chatgpt, hire a mentor or reviewer, open source your code, whatever it takes. Code reviews are crucial