201

Object-oriented code is not by definition cleaner, and conversely non-OO code is not by definition crappy. While there does seem to be a rather obvious object-oriented mapping to this particular problem, I would suggest that you try the functional programming approach anyway. Give it your best shot, try to solve the problem in the best functional ...


144

Non-techies aren't idiots (for the most part). They can understand a technical argument if you keep it high-level enough. Pick a task you thought should be simple, and walk them through why it's not. I expected this change to be one word in one file. The most likely place to change it seemed to be here, but when I changed it there, it only worked ...


116

All the other answers and comments here really threw me for a loop, because they are so counter to my first reaction and so counter to the attitude I've witnessed in my coworkers. So I'd like to describe an alternate approach, if only for the sake of being the dissenting voice. The guiding principle of this answer is, "Delight the customer". Delighting the ...


87

Code structure, style, technical debt are one thing that - at least initially, until the client trusts you - you're going to need to live with. Security vulnerabilities are another matter. Personally, I would do an estimate based on the work required using the existing structure and style while making it clear that there are significant issues with the ...


83

The customer is king. So as contractor you shall meet whatever the client has defined as quality standard. Or you risk to be out. This being said, it matters very much how the (here poor) quality standards are defined: Contractual quality standards: the delivered code must comply, or otherwise it's a breach of contract. No choice. Formal corporate ...


76

Some great suggestions here on how to convey and communicate this to the client. Hopefully they will pay off for you. Major red flag here! If the client asks you not to make any changes other than what you've agreed to (HTML and CSS) I'd pass on this project and withdraw my bid. Even with a written and well communicated overview of all of the flaws and ...


68

You mention that the client used to program in a functional language, maybe he has a reason that he requires you to write the code in a functional style. You should ask him why. Maybe he intends to keep the code and maintain it himself later. Moreover, I don't think the two choices are either do it OO-style or write crappy code like you mentioned. Sure ...


65

This is a failure of your manager. You, as a contractor, should not have been placed into a situation with such a tight deadline by your company without a firm set of requirements up front, in writing. None of this 'they added features' afterwards nonsense - each time that happened, they should have signed off on an updated schedule that you gave them. ...


55

Are you aware that functional programming doesn't just mean "programming without classes"? See the Wikipedia article about it for the full schtick, but in short... In computer science, functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the ...


41

If it's your job to understand, it is your job to ask questions until you do The person you ask may be someone who is not the customer (i often talked to an intermediary, who was in contact with the customer), so the ones who forbid you to talk to the customer should instead answer the questions themselves or refer you to someone who can. But, in the end ...


40

The only answer I have is this: everything sucks. You can find tons of arguments against OOP being any good (a quick search will reveal them) versus functional or procedural programming. You seem to indicate that PHP's OO support defends it. Google blank sucks and you will find results for anything. Python sucks. Ruby sucks. Rails sucks. PHP sucks. ...


30

Explain and possibly demonstrate the flaw When it's your word against his, everything you say could just be hot air as far as they're concerned. Once you show them how their app can be abused via SQL injection, then suddenly you're a person to be trusted. You're going to need credibility in order to renegotiate. And this is enough of a game-changer to give ...


29

This is really, really a case for a lawyer. Should you refund your client? Not until your attorney told you so. By refunding your client, you might inadvertently admit that your work was not adequate, so your client might use that to claim damages for his work, for the lost business opportunity etc.


28

Defects are an expected result of the software development process. For a time and materials contract, I would expect that the developers charge you for the time they spend fixing bugs. This is a normal part of a developer's job. For a fixed bid contract, I would expect that the developers eat the cost of the defects and deliver the system bug free (or as ...


27

In my opinion, what's more important is using the bug to establish meaningful on going contact with the user. Writing and understanding bug reports is a skill, and my advice would to be to make it as easy as possible for the user to make first contact, then progressively make their feedback of more value as needed. For example, just get the user's email, ...


24

Fire them. Refer them to your worst enemy. You don't need the headaches. If they don't know what they want, neither will you, and the amount of trouble you will go through, finding out what is needed, IS NOT WORTH whatever they're planning on paying you. Many years ago, a drinking buddy of mine gave me a piece of wisdom. When considering undertaking any ...


23

You answer the question honestly. You tell them it's a difficult problem, the solution is not obvious, and you are not sure how long it will take to resolve. Promise to update them on your progress every [time frame], so they know you're working on it, and of course, actually send them the updates.


22

Explain to your client that if he wants functional programming, he should hire someone who specializes in that. Functional programming is very different from OOP, and you will be mistaken if you think you can easily pick it up and deliver a complex solution of high quality.


22

Ethics are quite a bit subjective. Laws aren't. If you can show what you are demanded to do is illegal, you can use that as leverage. IANAL, but I am quite confident that withholding payment to coerce you to do something you think is illegal is really enough to be considered as duress. As for your specific case: It appears that in Germany sending ...


21

The important thing in such situations is to build a CYA paper trail. Nothing should be done without having it written, especially in a complicated business relationship. Sticking to the initial schedule though they needed 20 days to even let you work is a big red flag that it will become complicated. You hold a meeting where additional features are ...


21

The best way to go forward with someone like that is to: 1. Offer to refund the license cost and cancel their license. Tell them that they exhausted the support and that you are unwilling to go further for them, but you are willing to refund their license (and cancel it accordingly). 2. Offer paid consulting services for a reasonable $/h If they really ...


20

PHP has a sordid history. It's much better now that it was even a short while ago, but there was a time, a very long time, where a lot of bad practices and patterns were encouraged and difficult to avoid. There is an entire generation of terrible PHP code out there that is still kicking around, and to the extent that new programmers are learning by reading ...


19

I started this as a comment, because at first I thought it was an aside, but it probably really isn't. I would fully document everything that you feel is should be redesigned, and why (what happens if they don't make the change), and an estimate on fixing the issue. I would be particularly meticulous with anything you perceive as a security risk. I would ...


19

The closest you get to a bug-free application, the more expensive it gets. It's like targeting 100% code coverage: you spend the same amount of time and money getting from 0% to 95%, from 95% to 99% and from 99% to 99.9%. Do you need this extra 0.1% of code coverage or quality? Probably yes, if you're working on a software product which controls the cooling ...


18

Warren Buffett was once told that he was an good and ethical man in an interview, and he said something to the effect of, "The world will never know. I've always been well off in my life. I've never had to steal to feed my family or make the choice between my ethics and poverty." (paraphrasing, as I don't have his exact words) I have had similar ...


18

they have none of the obsessive neurosis attention to detail of "real" developers Preface: The kind of language you used here is typically a red flag for me. When I hear people talk about "real" developers or the (one and only) "right" way of doing things, I start thinking of tunnel visionned cargo-cult developers. Now, I'm not saying that you're ...


18

The client wants at least 25% of comments in each of its software projects. Does the client really want 25% of comments or does your client want your code to be as descriptive as possible? IMHO, the client knows what he wants, but not what he needs. As a client isn't a developer itself and gets feedback from its own workers/customers, your client only ...


16

The most effective way to get users to write decent and useful bug reports is to let them see their reports online... [System] Thanks for reporting, you can find status of your request here: ... ...along with the evaluation and comments from assigned engineer... [Engineer] Request rejected, for the following details are missing: ... ...with an option to ...


16

To be blunt, this question implies a tremendous level of ignorance about the software development process. It might be wise to take your company web site off of your profile [especially since it doesn't exist], and go read a book on managing software development projects. To address your specific question, as others have stated, if you want bug-free code ...


16

From what you describe, it appears that you are participating in a classical Death March project: In project management, a death march is any of several types of pathologic projects involving a dysphemistic, dark-humor analogy to real death marches, such as being gruelingly overworked, and (often and most especially) being gruelingly overworked for ill-...


Only top voted, non community-wiki answers of a minimum length are eligible