Team Productivity Archives - HackerRank Blog https://bloghr.wpengine.com/blog/tag/team-productivity/ Leading the Skills-Based Hiring Revolution Fri, 23 Jun 2023 16:51:07 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.1 https://www.hackerrank.com/blog/wp-content/uploads/hackerrank_cursor_favicon_480px-150x150.png Team Productivity Archives - HackerRank Blog https://bloghr.wpengine.com/blog/tag/team-productivity/ 32 32 3 Reasons You’re Not Building Compatible Tech Teams https://www.hackerrank.com/blog/building-compatible-tech-teams/ https://www.hackerrank.com/blog/building-compatible-tech-teams/#respond Tue, 10 Nov 2020 08:38:48 +0000 http://bloghr.wpengine.com/?p=13328 Building out a technology team is a huge undertaking.  Not only do you evaluate skills...

The post 3 Reasons You’re Not Building Compatible Tech Teams appeared first on HackerRank Blog.

]]>

tech teams working blog header

Building out a technology team is a huge undertaking. 

Not only do you evaluate skills and technical knowledge, but you also have to curate a team that works well together.

Ultimately, building the right team is a function of two basic variables:

  1. Having complementary skill sets
  2. Having complementary working styles

A team of skilled individuals that can’t work together is like a can of premium gasoline without a car to put it in. Having gasoline is an essential component in moving the car but you won’t have much luck getting it from point A to B without the vehicle.

Mismatched teams not only bode poorly for each individual’s future performance, but they also heighten the risk of short tenures. Incompatible teams run the risk of huge time losses—forcing team leaders to hire the same roles over and over.

If you find yourself struggling with how to build a team that’s compatible, check out this Recruiter Cheat Sheet or continue reading for highlights. 

Top reasons why you’re not building a tech team that’s compatible 

1. You're missing the intricacies of each role

As tech stacks become more and more fragmented, the line between some specialized technical roles is admittedly blurry.

For example, take the difference between data analysts and data scientists. A data analyst and data scientist might both be focused on interpreting data for non-technical stakeholders. But a data analyst might focus on interpolating historic data, whereas a data scientist might focus on extrapolating predictions from historic data. 

And especially at smaller companies, a data scientist might even be doing both.

Solution: 

Ultimately, this challenge boils down to misalignment between hiring managers and recruiters. Historically, research has shown that aligning on expectations is hiring managers’ biggest hurdle.

Even if you’re recruiting for a role you’ve seen a dozen times before, don’t assume the ask is the same. Take the time to deep dive into each individual role, and understand the finer points they need in order to be a successful team member.

2. You're not putting enough emphasis on EQ

Emotional intelligence (EQ) describes the ability to identify and manage your emotions, plus the emotions of others. It’s an important indicator of how candidates will conduct themselves on the job. It’s shown a strong correlation with job performance, leadership capabilities, and much more.

But when it comes to technical roles, most recruiters are focused more on technical skills and less on potential EQ signals—like endorsements from past coworkers. 

On some level, that’s fair. After all, finding qualified candidates is the most time-consuming part of hiring for both hiring managers and recruiters.

Solution:

Ultimately, the best way to emphasize EQ is to make the time for it. Establish a process to vet technical skills systematically and uniformly. The less time you spend on verifying a candidate’s stated skills, the more time you can spend getting to know them as a person.

3. You aren't evaluating candidates in the context of your current team

Let’s say you’re hiring a senior back-end developer. Some qualities you might be looking for include:

  • Senior back-end developer
  • Some light front-end knowledge (for context)
  • Work with a team of 35 developers
  • Work primarily with 2 product managers, 3 front-end developers, and 1 other back-end developer

You come across a candidate with the following qualities:

  • 8 years of full-stack development experience
  • Stellar results on skills tests
  • Full-stack capable, but back-end focused
  • A career spent working with small teams (teams of 3-5 developers total)

On paper, this candidate might look great. They have the skillset you’re looking for, and they’re seasoned enough to be independent. But we can catch a few red flags:

Full-stack capable, but back-end focused

Have they ever worked with a front-end developer, or are they used to doing the work themselves? Do they know how to communicate with them in a meaningful way to get things done? How much ownership do they expect to have over the process?

A career spent working with small teams (teams of 3-5 developers total)

Coming from a small company means the candidate is likely self-sufficient. But are they too self-sufficient? How do they work in a team? Do they openly collaborate with others, or do they tend to silo themselves off from the group? Neither option is bad––but one might be a better fit for your team than the other.

Solution:

While a candidate might look solid on paper, think about how they will fit within your team and specific needs. Look for red flags that might shift the team dynamic or hinder team performance

Finding the right match for your tech team

Finding developers with the right mix of technical skills, soft skills, and team compatibility can be a challenge. This blog post is just the abridged version. 

If you want to dig deeper into building a winning team, bookmark this Recruiter Cheat Sheet. We explore what to expect from key technical roles, how to build effective teams, plus data on what languages and frameworks developers know best.

recruiter-cheat-sheet-read-now

The post 3 Reasons You’re Not Building Compatible Tech Teams appeared first on HackerRank Blog.

]]>
https://www.hackerrank.com/blog/building-compatible-tech-teams/feed/ 0
How to Build High-Performing Engineering Teams https://www.hackerrank.com/blog/how-to-build-high-performing-engineering-teams/ https://www.hackerrank.com/blog/how-to-build-high-performing-engineering-teams/#respond Fri, 06 Mar 2020 19:31:51 +0000 https://blog.hackerrank.com/?p=15572 This is part 2 of a 3-part series based on a conversation between HackerRank’s CEO...

The post How to Build High-Performing Engineering Teams appeared first on HackerRank Blog.

]]>
photo-of-people-sitting-beside-wooden-table-3182762

This is part 2 of a 3-part series based on a conversation between HackerRank’s CEO and Co-founder, Vivek Ravisankar and Atlassian’s Head of Platform, Mike Tria, on engineering management. 

This post discusses how to assess developer candidates and build high-performing engineering teams. Catch part 1 and hear Mike’s advice on building key engineering management skills here.

HackerRank’s CEO and co-founder, Vivek Ravisankar, and Atlassian’s Head of Platform, Mike Tria, are both developers who have built and lead engineering teams. Drawing from their experiences, they share which interview assessment methods spotlight the right candidates—and common mistakes first-time engineering managers make.

How to assess individual contributors and managers

When hiring new grads, junior developers, and even senior developers, it’s the industry standard to evaluate a candidate's skills with a technical assessment before extending an offer. But developers disagree about whether companies should require seasoned individual contributors (ICs) and hiring managers to code during the interview process.

For developers who have 10+ years of experience and a robust portfolio, the request to invert a binary tree on a whiteboard can be insulting and irrelevant. When it comes to take-home challenges, developers who work full-time don’t want to spend 3+ hours completing a lengthy assignment.

During the hiring process at Atlassian, every IC and hiring manager goes through some form of technical vetting, but the type of assessment differs for each role. 

Assessing individual contributors

Since ICs are responsible for the heavy lifting on high-stakes projects, Mike believes every IC should receive a coding evaluation. “On the IC track at Atlassian, everyone from the junior dev to the top-level architects are expected to write code,” says Mike.

His reasoning? He’s seen first-hand moments when ICs with rusty coding skills struggle. “When they jump in on a problem that might require them to be the one that innovates on a solution, they’re unable to do it. So, we test for that, for every single level of engineer.”

Assessing engineering managers

For engineering managers, Mike says there’s a different type of technical assessment for each level of seniority. A first-level manager is required to write code. Managers at higher levels are required to show their experience with architectural and system design questions. 

Mike doesn’t assess more senior managers’ coding abilities for one simple reason: engineering managers require more than a technical skill set. Instead, managers need a mix of strong soft skills and technical skills. Some of the crucial soft skills include team-building, active listening, communication skills, and a sharp business acumen.

According to Mike, if the manager has a proven technical foundation, they shouldn’t be required to code during the interview. “You can bring in a VP who hasn’t coded in 8 years, and you might be completely comfortable with them representing the team because they’re current on the technology, they understand architectural principles. And that’s sufficient for them.”

Mike asks questions focused on systems design and real Atlassian technical problems to accurately assess a candidate’s skill level. “The technical problem could be related to improving one of Atlassian’s products, like: ‘How do we solve this storage problem?’ or ‘How can we deliver a better performance to our users?,” says Mike. “We’ve failed managers that have managed 100s of people at well-known public companies because they were not able to pass these. So technical matters, but coding specifically for managers after the first [level] we don’t do.”

Atlassian’s take on role-specific assessment questions

To provide a candidate-first experience, more companies are positioning their technical assessments to give candidates a preview of the day-to-day work they’d see on the job. While this approach is beneficial to both the candidate and the employer, it’s hard to scale. Larger companies might not have the time or resources needed to create an assessment specific to each role they’re hiring for.

At Atlassian, they use generalized real-world problems in their assessments. “We will do coding based on a similar set of problems, and those coding problems tend to be grounded in problems we actually have at Atlassian.”

Once Atlassian stopped asking brain teaser questions and focused on problems they face in their products, they were able to better identify the best-fit candidates. It also paints candidates a clearer picture of what their day-to-day would consist of—a huge benefit for candidate experience. 

While Mike promotes real-world problems in assessments, he advises teams to keep a reasonable time limit on the assessment. Sending multi-day simulation problems might work for junior candidates who just graduated from a college program. But, Mike says assigning a multi-day assessment to candidates who are working full-time is a big ask. “Outsourcing your job to a candidate during an interview can be a really hard thing to ask and it limits your pool.” 

Common mistakes first-time engineering managers make when building teams

With 13+ years of experience leading engineering teams, Mike has noticed several common mistakes new engineering managers make when building teams. Here are the top 3 team building missteps first-time managers should avoid:

Hiring people just like you

The most common mistake is hiring candidates who hold the same values, work styles, personality, and interests as the manager. While it’s natural to connect with candidates who are just like you, focusing solely on  those candidates negatively impacts the entire direction of your team. “If you end up bringing in people who are just like you, you’ll end up with a team with blind spots you can drive a truck through, and you’re going to make big mistakes when the time comes,” Mike says. 

Atlassian conducted in-depth research on the values of balance & belonging, and creating diverse teams. All of this research points to one consistent fact: diverse teams are the teams that win.

Not setting clear expectations for their team

Another mistake Mike sees new engineering managers make? Not outlining clear task and performance expectations. Even if your team members display leadership and project management skills, it’s still the manager’s responsibility to check in with the team and communicate expectations.

“It’s very easy to have a team and give them a ton of autonomy,” says Mike. “If you don’t set any expectations of what you expect as a manager, they’re just going to go off-road quickly. Your job is to give them expectations.”

Not giving your team enough autonomy

On the other end of the spectrum, some new managers don’t give their team enough autonomy. In order to build a high-performing team, you need to create space for your team to tackle problems in their own way. Making room for each member of your team to introduce a new process or offer a different perspective gives them a sense of ownership and responsibility. 

According to Mike, the combination of diverse hiring, outlining expectations, and giving your team freedom to work in their own way is the formula to building high-performing engineering teams. “Hire the right people, ideally a diverse team,” says Mike. “Setting expectations of what success means for that team, and give them the room to do it.”

Tying it all together

Every engineering leader faces a learning curve when it comes to building and leading teams. Learning how to assess every type of developer, choose candidates who bring a different perspective to the table, and communicate expectations, while also encouraging autonomy, are skills that take time to hone and perfect. But the more experience you gain in each of the above, the closer you’ll be to mastering the art of building high-performing engineering teams.

The post How to Build High-Performing Engineering Teams appeared first on HackerRank Blog.

]]>
https://www.hackerrank.com/blog/how-to-build-high-performing-engineering-teams/feed/ 0
Legendary Productivity And The Fear Of Modern Programming [TechCrunch] https://www.hackerrank.com/blog/legendary-productivity-and-the-fear-of-modern-programming-tech-crunch/ https://www.hackerrank.com/blog/legendary-productivity-and-the-fear-of-modern-programming-tech-crunch/#comments Tue, 15 Sep 2015 01:28:22 +0000 http://bloghr.wpengine.com/?p=7531 This article originally appeared on TechCrunch   JavaScript master Douglas Crockford once said that software is...

The post Legendary Productivity And The Fear Of Modern Programming [TechCrunch] appeared first on HackerRank Blog.

]]>
This article originally appeared on TechCrunch


 

JavaScript master Douglas Crockford once said that software is the most complex thing that humans have ever created. It’s made up of intricate bits and bytes pieced together like virtual puzzles. These insurmountable calculations help us achieve extraordinary feats, like routing human beings to the uncharted craters of Mars. By the very nature of the burgeoning computer science discipline, “we’re dealing with things that are on the edge of what humans can handle and more complicated than ever before,” said renowned computer scientist Donald Knuth.

While no one programming legend can possibly accomplish any big feat solo, there are programmers worthy of fame for their supreme productivity. Every so often, leaders of new revolutionary tools make an explosion in the field that reverberates across generations of new programmers.

But what’s even more interesting is that some of the highest-achieving programmers — who can make sense of such unfathomable complexity — can’t foresee a lucidly bright future ofprogramming. Several accomplished computer scientists share a grave concern of the shift toward our more fragmented web. Tools that act as layers, like frameworks and packages, are created to help programmers be more productive, but some experts fear they’ll actually have the opposite impact long-term.

If the foundation of the modern world is built on software, then deconstructing the toolkit of today’s software leaders can help us not only become better programmers, but develop a better future. Contrary to popular belief, greatness isn’t exclusive to unreal legends. Culture critic Maria Popova puts it most eloquently when she says, “Greatness is consistency driven by a deep love of the work.”

After researching stories on and conducting in-depth interviews regarding seven programmingpioneers, from computer scientist Donald Knuth to Linux’s Linus Torvalds, we uncover productivity patterns common to achieving greatness and pitfalls of which to steer clear: There’s never been a widely used programming tool that was created by just one lone wolf in a cave. Sure, Jeff Dean is the trailblazer of the famed distributed computing infrastructure upon which Google towers. Peter Norvig may be immediately associated with JSchema. David Heinemeier Hannson’s pride and joy is the Ruby on Rails framework. But each of these creators had support for their groundbreaking inventions.

Teamwork is the foundation of an empire that lone wolves simply can’t sustain. It’s why Google, home of world-renowned engineers, doesn’t tolerate lone wolves on campus. It’s the antithesis of “Googliness,” and software development in general, for two core reasons.

First, the mere proximity to other engineers fuels greatness. When Rob Pike worked at Bell Labs, well before making waves on the Unix team, he recalls fond memories of hovering around clunky minicomputers with terminals in a machine room in the Unix Room. “The buzz was palpable; the education unparalleled,: he said. “The Unix Room may be the greatest cultural reason for the success of Unix as a technology.”
Folks like Ken Thompson and Dennis Ritchie (authors of C Programming Language) would code, sip coffee, exchange ideas and just hang out in the Unix Room. It was this necessity of convening in a physical room that helped turn Unix into what it is today. Since the proliferation of PCs, however, proximity to each other isn’t as rigid in modern programming. Going out of your way to meet with smart engineers, however, is a timeless essential contributing to greatness.

Just ask Jeff Dean, the famed Googler who often is referred to as the Chuck Norris of the Internet. As the 20th Googler, Dean has a laundry list of impressive achievements, including spearheading the design and implementation of the advertising serving system. Dean pushed limits by achieving great heights in the unfamiliar domain of deep learning, but he couldn’t have done it without proactively getting a collective total of 20,000 cappuccinos with his colleagues.

“I didn’t know much about neural networks, but I did know a lot about distributed systems, and I just went up to people in the kitchen or wherever and talked to them,” Dean told Slate. “You find you can learn really quickly and solve a lot of big problems just by talking to other experts and working together.”
Second, every great coder, with however pristine a track record, must check in their code for a peer review. Pivotal Labs, the company behind the software-scaling success of Twitter, Groupon and a dozen other high-growth Silicon Valley startups, requires the freedom for any coder to look at any code. It’s simple: If code is too dependent on one person, your business is susceptible to dire wounds.
Even the great Guido van Rossum checks in his Python code, and Thompson checks in C code. Linus Torvalds, author of the biggest collaboration Open Source Software project in history, says he actually judges coders — not by their ability to code — but how they react to other engineers’ code. As a bonus, reading others’ code also can help you become a better coder. You often can see things in the source code that are left unsaid in the office.
Knuth would wholeheartedly agree. “The more you learn to read other people’s stuff,” he said, “the more able you are to invent your own in the future, it seems to me.”

When Collaboration Goes Awry

Collaboration is generally a solid learning tool, but can be catastrophic when injected at the wrong time. Hansson has seen too many Open Source Software (OSS) projects fallen victim to premature collaboration. That’s why, for the first 1.5 years of RoR’s life, Hansson had commit rights to the framework. And it took another 4.5 years before he felt comfortable collaborating with another framework to produce RoR version 3. Even then, it wasn’t easy for him.
“I’ve seen plenty of open source projects being pulled in a thousand different ways because you allow collaboration to happen too early before the culture and vision is established enough so that you can invite enough people safely into the project without them spoiling it,” he says in a Developer’s Life podcast.
Plus, the truth of the matter is, many programmers simply enjoy blasting through code alone. Solo coding is faster, short-term. You don’t have to worry about communication mishaps. And things are generally more uniform. Engineer Ben Collins-Sussman once asked a room full of programmers:

  • How many of you work solo? …Crickets…

  • How many of you LIKE to work solo? Nervous laughter and raised hands spread across the room.

Collaborating is a necessary evil for many of the greats, like Norvig, who is now Director of Research at Google. Norvig makes the observation that too much collaboration is also not as effective. “If you’ve got two good programmers,” he says, “it’s better for them to work independently and debug each other’s work than to say we’ll take 50% hit just for that second set of eyes. 10% of the time it’s good to sit down and have that shared understanding. But I think most of the time, you’re not going to be as effective.”
For collaborating on a project that lacks a clear vision, unlike that of Hansson, it’s good to figure out what the problem is together. Once you have an idea, great programmers divvy up the work; leave them alone to burn through the code and sync up during review. The best collaboration happens by creating a solid feedback loop, where you can catch one another’s errors before you’re too far into the project.

John Carmack, known for creating Doom, was also very wary of adding more programmers to his process of achieving his vision of great games. There was a time when Carmack wrote the majority of the basic program, he says.

Now, we’ve got lots of situations where, if something is not right, it could be like, “Oh that’s Jan Paul’s code, or Jim’s code, or Robert’s code.” It’s not so much a case where one person can just go in and immediately diagnose and fix things. So, there is a level of inefficiency.
Again, there’s a limit to what a lone wolf can do. Doom 3 required a lot more features, which meant more programmers. Carmack found this to be a double-edged sword. So, it’s manageable, he says — and necessary — in achieving a grander vision.

Jack Of All Trades And Master Of One

Most — if not all — of the seven legendary programmers had at least one thing in common: They mastered one well-defined domain, primarily using one language to carry out their work. Jonathon D. Tang pointed this out in a recent Hacker News comment, and it rings true. Knowing your language inside out is key to optimal performance. So, “read the reference, read books that not only show you the mechanics of the language but also debugging and testing,” Norvig advises. Being able to memorize the common calls for your language of choice can help expedite productivity.

Screen Shot 2015-09-14 at 11.22.54 AM
But it can get really comfortable (or boring) really fast if you stick to just one set of tools and domain. So, after mastering one definitive domain, most of them have experience in switching contexts, which helps them open their minds and see things in a different way.
For instance, John Carmack switched from creating video games to Oculus for virtual reality. LIkewise, Rob Pike moved from Plan 9 to Go. Andy Hertzfeld transitioned from writing the original Mac system software in assembly to writing the Google+ Circle Editor in JavaScript. “But rarely do the greats ever try to juggle multiple platform at the same time,” Tang said in a follow-up email. Delving into new domains after mastering one helps you see things in different levels.

Visualizing The Program In Your Brain

Nearly every programming legend points to the importance of visualizing solutions and being able to hold programs in your head. There’s a lot of productivity lost when you dive into code or start testing without first developing a mental model of the solution.

Carmack’s ability to hold gaming concepts is among the most remarkable, considering just how massively complex the virtual world of gaming is. “A video game’s program is actually more complex than that of space shuttles sent to the moon and back,” he said in an interview. Paul Miller helps put his work into context. When manipulating light beams to create a virtual world, he renders an image at least 30 times a second to prevent the game from breaking. This adds up to a trillion calculations per second. Meanwhile, Disney’s Pixar takes 10 hours to render a single frame. In video games, you’ve got just milliseconds to make an impact.
Given the extensiveness of video gameprogramming, Carmack says, “being able to clearly keep a lot of aspects of complex system visualized is valuable. Having a good feel for time and storage that are flexible enough to work over a range of 10 orders of magnitude is valuable.”
Interestingly enough, Knuth, Norvig, Dean, Pike, Torvalds, Thompson and Hansson have all at one point said they’re believers of having a strong mental model, focus and visualization. It’s all about the ability to see the solution before diving into the problem.
The best concrete example comes from Norvig. He once was tasked to write a Sudoku-solver program. From the get go, he knew from his AI knowledge that the combination of field of constraint propagation and recursive search would solve the problem. Meanwhile, another programmer tested all sorts of code on his blog, but never really solved anything. It’s perfectly possible to write correct, tested code without correctly approaching the problem.
Herein lies the key to approaching the problem correctly. “I think it’s useful to imagine the solution, to see if it’s going to work,” said Norvig. “It’s useful to see if it feels comfortable.”

There’s Joy Inside The Black Box

In Coders at Work, Knuth expresses a major concern for the future of programming if young programmers are simply assembling parts without studying them. The neatly packaged boxes might be a good short-term solution for speed, but programmers will lack the grand visualization that’s necessary for true progress in programming. Plus, it’s just not as fun to copy/paste commands without knowing the fundamentals of why and how it’s happening.

“If the real case takes a certain time, t, then the complex case takes time 4t. But if you’re allowed to open the box, then you’ll only need three real matrix multiplications instead of four because there’s an identity that will describe the product of two complex matrices,” Knuth explains.
In fact, the very purpose of Knuth’s most famous work, The Art ofProgramming, helped programmers learn how and why data structures worked. “So my book sort of opened people’s eyes: ‘Oh my gosh, I can understand this and adapt it so I can have elements that are in two lists at once. I can change the data structure.’ It became something that could be mainstream instead of just enclosed in these packages.”
Comparing it to mathematics, it wouldn’t be fun to simply get the right theorem for the right problem each time. The joy comes from trying various theorems, visualizing what might work and getting that thrill when it finally does. Norvig shares this concern and stresses that programmers need to ask more questions before copy/pasting black boxes.
Sure, the code might have worked once, but what are the failure cases? Is it consistent? Are there other scenarios for expanding functionality? How can you understand it better? Simply relying on prepackaged boxes to carry out a command can be tedious and mundane. It’s more fun to problem-solve, think critically and learn the mechanisms of why code strung together is performing in a certain way.
Thompson is downright fearful of modern programming because it’s made up of layers upon layers upon layers. “It confuses me to read a program which you must read top-down. It says ‘do something,’ and you go find ‘something’ and it says ‘do something else’ and it goes back to the top maybe. And nothing gets done. I can’t keep it in my mind — I can’t understand it.”
While frameworks, APIs and structures might make programmers feel more productive, trueproductivity comes from unpacking the containers and truly understanding what’s inside. Only then can you build upon your knowledge and continue to push the limits of what human beings can achieve.

The greatest engineers who have brought us this far in software grew up in an entirely different era of computing — packed inside rooms filled with terminals, carrying mental models of new algorithm-based programs. Newer generations of programmers are born into a more fragmented world. The programs today are far too large to carry in our minds. Plugging in black boxes can get you to a certain point — very quickly — but the greatest programmers will always be bored with redundancy. True greatness comes with consistent drive to seek new problems with like-minded programmers, be able to see the floor before the roof and stay curious about what’s inside the black box.

 

 


Enjoyed this piece? Subscribe to our free newsletter to get new articles in your inbox. 

The post Legendary Productivity And The Fear Of Modern Programming [TechCrunch] appeared first on HackerRank Blog.

]]>
https://www.hackerrank.com/blog/legendary-productivity-and-the-fear-of-modern-programming-tech-crunch/feed/ 6
Broken Code? How to Regroup and Swat the Bugs https://www.hackerrank.com/blog/broken-code-regroup-swat-bugs/ https://www.hackerrank.com/blog/broken-code-regroup-swat-bugs/#comments Mon, 16 Mar 2015 10:18:21 +0000 http://bloghr.wpengine.com/?p=3352 If you’ve been churning away hours of code only to realize that a few pesky...

The post Broken Code? How to Regroup and Swat the Bugs appeared first on HackerRank Blog.

]]>
If you’ve been churning away hours of code only to realize that a few pesky bugs have snuck their way into the software you’re writing, don’t worry. We spoke with a couple of programming experts to help us create a guide that offers advice that any programmer can use to quell those bugs in any programming language.

First…What’s the Root of the Issue?

Before rolling up your sleeves, take a step back and think about what might be at the root of the issue. “After waiting a moment, check any relevant logs which may hold clues to what the problem is. Depending on what’s found there may be a simple solution. If not, it’s time to debug,” says Tim Henrich, founder of Turret.IO.
Most of the time, bugs (or errors) usually fall under one of three major categories:

  • Logic
  • Runtime
  • Compile-time

Logic errors are the trickiest because, quite simply, there is a problem with what your program is trying to do even though it is syntactically correct. “These [logic bugs] are hard to find because they usually aren’t errors you can look into from the compiler or interpreter,” says Jameson Quave, president of JQ Software and author of Developing iOS 8 Apps in Swift.

Logic Errors: Set Breakpoints and Inspect Values

“Whether you’re using a debugger, like GDB from the command-line, or using an IDE, like IntelliJ, setting breakpoints and inspecting the values of any stateful variables is your first step,” Quave says.
He says it’s extremely helpful to familiarize yourself with your debugging tool and then see how other values change as a result. Jorge Colon, senior software architect and owner of 2U Media, points out that any popular IDE for each language has an interactive debugger. “For instance, if you store the value 9.99 as a price, and then upon inspection, you see that its value is–instead–9, you might conclude that you accidentally stored the value in an integer variable at some point along the way.”
Always write a failing test for broken code for future reference.
Use an automated test to help you easily figure out when the problem was resolved. “So, in the future, you can prevent regressions by running the test again after any changes to the code,” he says.

Runtime Errors: Dig into the Error Code

Getting to the solution for runtime errors is a little more straightforward. “You can usually get enough info on the problem by simply reading the error message, or look into the error code,” Quave says.
Even Quave, a veteran programmer, also suggests going the good ol’ fashion Google route. “Searching for an error message is a pretty quick way to either locate others who have faced the same issue, or documentation describing when and where that message would be displayed,” Quave says.
Stackoverflow is a popular favorite for solutions as well. For more program-specific questions, check out smaller communities, like this Swift forum. Here’s one on Salesforce coding as well.

For Exception Runtime Errors, Consider it a Tap on the Shoulder from a Developer

“Exceptions are raised intentionally by platform developers, usually in anticipation of their APIs being used incorrectly in one way or another,” he says. Platform developers often anticipate common issues and incorporate exceptions in order to help you redirect you to the right path and change what you’re doing.
As a simple example, Quave says, “if I wrote a game engine that I know couldn’t handle JPG files as efficiently as PNG files, I might raise an exception when encountering JPGs, in an attempt to persuade developers to convert to PNG.”

For Compile-Time Errors, Modern Tools Will Tell You the Problem

Compiler errors are similar to that of exceptions runtime errors, but they tend to be a little more abstract. “Learning how to address compiler errors is all about knowing the language well, and identifying what particular line is causing problems,” Quave says.
Whether it’s a syntax error or you accidentally declared multiple objects in the same name, fortunately, most modern tools will tell you exactly what line of code is the problem during the compile phase.
These are just a few of the basic guiding principles that are crucial in solving some of the most common bug errors. So, the next time your hours of hard work come to a grinding halt, we hope these tips can help save you some valuable time.

The post Broken Code? How to Regroup and Swat the Bugs appeared first on HackerRank Blog.

]]>
https://www.hackerrank.com/blog/broken-code-regroup-swat-bugs/feed/ 1