![]() But if you always count lines of code to provide an easy-to-understand metric for your execs, they could start asking you to separate and rank devs based on their individual performance. Teams are just that - a group of developers working toward a shared goal. Con: Leads to Stack-Ranking Individual Devs So when you’re trying to convey project size and complexity, everyone can understand that writing a thousand lines of code took more effort than writing a hundred. Pro: Works Well for Non-DevelopersĮveryone understands big numbers. A little competition can be good, but that shouldn’t be the general atmosphere in your org. This will negatively affect the overall psychology of your engineering org. If teams are always focusing on their total lines of code, they can easily start believing they wrote more code than other teams. Con: Creates a Hostile Environment for Devs ![]() Most IDEs and even GitHub will automatically tell you how many lines are in a specific file. Unlike other engineering benchmarks and metrics, counting lines of code is fairly simple. Don't be like elon, don't count lines of code! Pro: Doesn’t Require Special Tools This also means you won’t be able to assess resources properly because your files will all be extra inflated. ![]() This, in turn, will inflate your measurements, leading to longer PR processes because each review gets longer and longer. If your devs are convinced that lines of code are of utmost importance, they’ll start opting to write suboptimal code. This way, you can form a good idea of how complex and resource-intensive a task may be. Pro: Could Help You Optimize Your ResourcesĬounting lines of code can show you how dense your project and its individual components are. It just means they wrote the function more efficiently. And does that mean the senior dev was distracted all day? Also no. Does that make the junior more productive? Clearly not. Con: Doesn’t Indicate Productivity AccuratelyĪ junior dev may write a function in ten lines, while a senior dev can write it in just three. So by counting lines of code, you may get some takeaway as to whether devs are actually writing code or just looking at memes all day. Teams who are writing code are clearly doing something. As with everything, it has its pros and cons. But that doesn’t mean this metric is inherently bad. Pros and Cons of Counting Lines of CodeĪlthough counting lines of code are an old practice, they’re not as useful as you may think today.You can find more information on using the this interface on the languages page here.įor more information on creating multi-file frontend questions, check out this guide.In this article, we’ll show you how (and when) to count lines of code, and help you identify the problems that come up from using this metric incorrectly. Interview provides an interface specifically for frontend coding. You will see dropdown arrows appear at the beginning of all major code blocks such as comments, imports, classes, methods, etc. Hover over the space between the line numbers and the code. If you’ve selected adjacent lines, but later realize you missed a line you wanted to add, you can use this method to add to your list of selected lines.Īlt + Ctrl + Up/Down in Windows or Option + Shift + Up/Down in Mac allows you to select contiguous lines above and below your current selection.Īlt + Shift + Up/Down duplicates the lines you are on.įree-up space and improve readability by temporarily hiding code using code folding. This method of multi-line select stacks on top of other methods, since you only have to hold down the modifier key when actively clicking the mouse to select a new line.īecause of this, you can even scroll in the middle of selecting lines. Alt+Shift+Click and drag selects multiple contiguous lines at a time.Alt+Click selects or deselects one or more cursor positions, anywhere in the code.Multi-cursor has a number of different methods for line selection: Select cursor positions, lines, and sections This can be especially useful when you want to make the same change to multiple lines of code. Multi-cursor functionality lets you edit multiple lines at once. The full list of symbols that will auto-close are: ✅ To help reduce potential bugs, this feature is enabled by default. Interview provides the ability to automatically close related symbols - like parenthesis, brackets, and quotation marks.
0 Comments
Leave a Reply. |