Tagged Questions
59
votes
19answers
10k views
How important is it to reduce the number of lines in code?
I am a Software developer who works on J2SE (core java).
Often during our code reviews we are asked to reduce the number of lines in our code.
It's not about removing redundant code, it's about ...
20
votes
8answers
1k views
Should comments say WHY the program is doing what it is doing? (opinion on a dictum by the inventor of Forth)
The often provocative Chuck Moore (inventor of the Forth language) gave the following advice (paraphrasing):
"Use comments sparingly. Programs are self-documenting, with a
modicum of help from ...
4
votes
2answers
227 views
What should my “large codebase sample” look like?
If an employer asks for a large code sample, one for an entire project, what characteristics should the project have to show architectural skills and the ability to manage a large codebase?
For ...
7
votes
7answers
938 views
Why would an employer ask for a 'long' code sample?
What would a large project that spanned multiple files and >1000 lines show to an employer that a few individual files and a couple hundred lines couldn't capture?
2
votes
4answers
273 views
Create new variable or make multiple chained calls?
What is the best way to get this attributes, thinking in performance and code quality?
Using chained calls:
name = this.product.getStock().getItems().get(index).getName();
id = ...
4
votes
3answers
195 views
What quality level in the commit history can/should I expect/enforce?
I worked as a lone developer for a long time. During this time, I developed a way of formulating and ordering commit messages: Refactor first, describe exactly the reason for the commit in the ...
20
votes
9answers
727 views
Is it better to use pre-existing bad practices, or good practices that don't fit well with old code?
I was thinking of this because I was trying to write an extension for an existing 3rd party software, and their database is horribly denormalized. I needed to use their existing tables and add a bunch ...
10
votes
7answers
428 views
Introducing design concepts/patterns/principles to co-workers
I've read Joel's article about getting things done when you're a "grunt", several times in fact, but I've never been able to do any of the things it mentions.
I work as part of a small development ...
4
votes
8answers
603 views
How can I promote clean coding at my workplace?
I work with a lot of legacy Java and RPG code on an internal company application. As you might expect, a lot of the code is written in many different styles, and often is difficult to read because of ...
5
votes
4answers
341 views
How a freelancer can learn industry standards?
Being a freelancer, I don't have access to corporate training programs where employees learn best practices. Most of the time I am advised to look into the available code on the Internet. Ideal places ...
17
votes
13answers
707 views
How do you overcome your own coding biases when handed legacy code?
As programmers, we often take incredible pride in our skills and hold very strong opinions about what is 'good' code and 'bad' code.
At any given point in our careers, we've probably had some legacy ...