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.