code-quality

How do I get developers to treat test code as "real" code?

In the last two companies I've been at, I have found an overriding mentality among developers that it's okay to write unit tests in a throw-away style. Code that they would never write in the actual product suddenly becomes OK in the unit tests. I'm talking Rampant copying and pasting between tests Code styling rules not followed Har...

What are some good books on software testing/quality?

I'm looking for a good book on software quality. It would be helpful if the book covered: The software development process (requirements, design, coding, testing, maintenance) Testing roles (who performs each step in the process) Testing methods (white box and black box) Testing levels (unit testing, integration testing, etc) Testing p...

What are some commonly used source code check-in policies?

I'm curious what code review policies other development shops apply to their source code when it's checked into the source control repository. I'm setting up a TFS (Team Foundation) server, and I'd like to apply some check-in policies to start to stamp out bad practices. For example, I was thinking of starting with the following couple,...

How did Perl gain a reputation for being a write-only language?

How did Perl gain a reputation (deserved, undeserved, or used to be deserved, no longer so) of being a "write only language"? Was it The syntax of the language Specific features that were available in the language Specific features not being available in the language (or at least old versions of it) The kind of tasks Perl was being us...

How to organize the work when project needs to be re-implemented due to poor code quality?

Hi, I have been asked to join a very small team where one main developer has been buiding the web app (.NET 4.0) during ~6 months. The project should be delivered within next 2 months. After first look at the code I can say that I would never allow it to go to production (things like catch { }, no tests at all with WebForms etc). So t...

Putting a dollar value on code quality

As noted in another thread, "In most businesses, code quality is defined in dollars." So my company has an opportunity to acquire a large-ish C code base. Obviously, if the code quality is good, the code base is worth more than if it's poor. That is, if we can readily read, understand, and update the code, it's worth more to us than if...

How to write high quality Javascript

I have been in the process of learning Javascript to complement ASP.NET. I have a strong background in general programming, and have always been an advocate of disciplined practices and good hygiene to reduce the error count in code. However, the language that Javascript is seems to make this very difficult. Its dynamic and interpreted ...

Maintainable CSS vs. theme-ability

The above seem to be contradictory goals. On the one hand, making CSS maintainable seems to me to suggest keeping CSS structured and orderly, and keeping all the styles of an element together in one place. So for example, the style of a top logo would look like this: #logo { width:50px; height:30px; background-image:url(/images/...

What is a common term for the following tools

is there a common term that can be used for the following tools Bugs Database Source control software a software use to compile from various programmers in one step These tools can be used by programmers to improve teamwork, coordination and quality of code produced ...

Dead Code Detector for Guice/Gin modules?

Usual dead code detectors don't seem to find which defined objects in a Guice or Gin module are not needed any more: is there a simple way to detect this? For example, let's say I defined a Provider method for a type with a certain annotation: @Provides @Named("string range") String getStringRange(Request foo) { return foo.getBarPr...

Is there any static code analysis tool like checkstyle for Objective-C?

Checkstyle is a great tool to enforce a code standards for java. We have some projects working with objective-c, and I tried to find some similar tool like checkstyle for Objective-C, but didn't get lucky. Does anyone know that kind of tool which be used to enforce code standards for Objective-C? Thanks in advance. ...

How to define code quality in a contract?

At my workplace we want to outsource some parts of our software development project to an external contractor (another company with multiple developers). Our greatest fear is that although all functional requirements will be met, the code may be very bad, as it is often the case with outsourced software projects. We can't use any of the...

Big random numbers in PHP - Is this a good approach?

I need a big(like, say, 128-bit big) random number generator in PHP. I was thinking in storing this number in a string as hexadecimal. Note that this is meant for a login system that mentioned the need for a "random" number, so I'm guessing I really need it to be "random-enough"(because I know pseudo-random is never truly random). The ...

automatic code quality and architecture quality (static-code-analysis )

I am looking to create a continuous code quality monitoring environment for our large code (Java) base. The static code check will be done on every developer branch and integration branch. Here is my partial list. FindBug (Find bugs!) PMD/CPD (copy paste detection) Hudson (continous build) Sonar (integrated view of other st...

How do you encourage fellow programmers to care about code readability?

I've noticed some programmers do not seem to have much desire to write clean, organized, and readable code. What are some good ways to encourage consistent indentation, good naming of variables and functions, organized file structures, among other things? ...

Should I insist that we perform code reviews before merging back to trunk or am I just a code quality bitch?

I'm working in a small development time with very limited time for development. We develop a tool that is important for the result of our work, but not used daily. I am the only person in the team that has a background as a programmer. My problem is that I have been pushing for code reviews before merging back to trunk for over a year. ...

What's the most effective way of reporting defect rates back to the developer teams?

We are currently reporting defect totals back to the development teams on a daily basis. We also track the usual defect metrics, namely: time to detect a defect, and time to fix a defect. Unfortunately, the teams don't seem to really care if they have the highest defect rates. Or possibly even care about their defect rates at all. I...

Implementing Payroll system

My professor has given me an assignment on Pay roll system in python. There's one feature of printing Employees: All Employees Print by Attributes Print by Id Print by Name Print by Designation Print by Salary Print less than (<) Print greater than (>) ... all possible conditions Print by Depart...