Code Faster with Fewer Bugs
Code Faster with Fewer Bugs
We as programmers all know this stuff, but it is good to remind ourselves... even the "old hands". We all want more speed and less haste. Read the bullets.
Join the DZone community and get the full member experience.Join For Free
Feeling anxious about your code? Does it seem as if your boss is always waiting around on you, breathing down your neck? Are you worried your colleagues are wondering why you’re taking so long? Well don’t worry, you’re not the only one!
Any developer worth his or her salt will have gone through the exact same thing. Coding is a creative endeavor; you’re not on a production line and your job isn’t about producing the same thing again and again. Just like music, writing or acting, there’s often not a ‘right’ way of getting to a functional end product, although there are a lot of ways of doing it better – and faster.
Of course, if you’re writing quality, well tested and unbuggy, easy to maintain code, you’re actually going to save yourself and your colleagues a lot of effort down the line. However, even if you’re doing all the best groundwork, the pressure to do more, faster is always going to be there.
No one likes to feel as if they’re holding the team back – it can feel embarrassing and frustrating. Fortunately, there are quite a few simple, pragmatic steps you can take to code faster and with less bugs. Reading this post shows you’re taking a positive approach to your work, so cut yourself some slack, you’re on the right path!
We spoke to our highly experienced team of developers here at Infragistics to see what advice they’d give.
1. Learn From More Experienced Developers
As with many problems in life, you’re probably not the first person to have had this issue. That should feel like a relief - knowing other people have struggled with coding fast and have gotten better shows you can too. Many of our devs told us they’d really benefited from shadowing more experienced programmers themselves. Working on a project with a seasoned pro will help you pick up a lot of tricks of the trade. You can see how they approach a problem, what code they reuse and test bugs.
Taking this same approach online, and sites like StackOverFlow are immense resources where intelligently asked questions are met with thoughtful answers.
2. Are You Doing Unnecessary Work?
As we stated, coding is creative, with many ways to solve many problems. But for common tasks and issues it is often the case that someone has solved the issue before (and potentially more elegantly). Again the web is the developers’ friend. Sites like C# Design Patterns offer good solutions to common problems. More general patterns are offered by sites like TutsPlus that solving common programing problems.
3. Don’t Code, Plan
That’s right, if you want to code faster with fewer bugs, stop coding. Using libraries and patterns like those described above is one route. Another is to stop coding altogether and plan. You can cut the development time of app by building with prototyping tools. Indigo Studio, our UX prototyping tool saves developers a lot of time by helping them build a working prototype of their app without writing a single line of code. You get from idea to finished product in way less time.
4. Don’t Replicate Your Code Across Platforms
When you’re building an app for multiple operating systems, our developers recommend a platform like Xamarin. Xamarin speeds up your coding time by letting you build your app one time in C# but deploy it rapidly across iOS and Android. You save a lot of time and energy replicating your app before deploying to stores, compared to writing (and supporting) fresh code for each platform.
5. Objectively Measure How You Spend Your Time
Our team also recommended you start measuring your own productivity. This is a little like doing your own experiment; spend a week with pen and paper by your desk and simply track how much time you spend on different jobs throughout the day. At the end of the week you’ll have a quite a clear diary of how you actually approach the working week — you might be shocked by the amount of time you spend off-task. Replying to emails, attending meetings or whatever. You may also realize you’re not actually coding slowly but are instead spending far too much time on some unnecessary task. You can then identify your weak points and work on reducing time lost in these areas.
If you take some of these steps and implement them in your day to day working practices, you should start to notice gradual improvements. We’re not promising instant miracles, but taking a pragmatic approach will help you to minimize your weaknesses and accentuate your strengths. Good luck!
Published at DZone with permission of Josh Anderson , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.