Author Topic: Have you turned down work because of quality of source code  (Read 3997 times)

0 Members and 1 Guest are viewing this topic.

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Have you turned down work because of quality of source code
« Reply #25 on: April 29, 2020, 09:23:05 am »
It does exist, sprintf is in K&R version 1, look it up, I did that's why I suggested it.
Harsh!  Just because something existed in a language specification doesn't mean it existed in the development environment and even if it did its use might not be advisable depending on hardware constraints.  Specifically you get very dependent on how clever the linker is and if it can be very specific and also using any library adds additional stack constraints. 
My memory fails me but I believe in some PICs you only got about 6 levels of stack... something tiny and you need to account for an interrupt too... in that kind of environment calling anything (unless the call is optimised out) uses precious resources.
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4208
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Have you turned down work because of quality of source code
« Reply #26 on: April 29, 2020, 09:54:02 am »
At least you had the chance to see the code before deciding to take the job or not. TBH the state of the code wouldn't worry me nearly as much as how easily - or not - you can test any changes you make.

I've had to turn down a couple of software jobs for just this reason, and one in particular sticks in my memory.

"Give us the code and 3 weeks, and we'll tell you if it works or not" wasn't the answer I was looking for.

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11537
  • Country: my
  • reassessing directives...
Re: Have you turned down work because of quality of source code
« Reply #27 on: April 29, 2020, 10:53:06 am »
never took a programming job except for freetime hobby and once as a RA 20yrs ago but if someone come to ask "program this and if its work you get your money, otherwise your weeks of hardwork will go down the drain" i will say to them "you can go f yourself".
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline Syntax Error

  • Frequent Contributor
  • **
  • Posts: 584
  • Country: gb
Re: Have you turned down work because of quality of source code
« Reply #28 on: April 29, 2020, 01:31:13 pm »
Quote from: HwAoRrDk
... The lead programmer apparently favoured 'sh...
Clearly that hack did not go for peer reviews... or he was a 'lead programmer' so code shone out of his var_se anyway?

Lord of the Rings and Hogworts references litter code from script kiddies. Even Manga and K-Pop gets a look in. Which is easier to reverse engineer than code where every object is called 'o'.

 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14299
  • Country: fr
Re: Have you turned down work because of quality of source code
« Reply #29 on: April 29, 2020, 01:41:58 pm »
Yeah, using comments like this either means that was a lone developer with no code review whatsoever (the most likely), or the whole team was a bunch of weirdos. :-DD
 

Offline HwAoRrDk

  • Super Contributor
  • ***
  • Posts: 1456
  • Country: gb
Re: Have you turned down work because of quality of source code
« Reply #30 on: April 30, 2020, 10:07:04 am »
The ironic thing was that the code was pretty good. It's just the comments were of a scatological nature and lacking a bit in insight.

I have no idea whether any of the code was peer reviewed. The 3rd-party consultancy that developed it had 50+ developers, but I don't think more than a handful of people ever worked on the thing.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14299
  • Country: fr
Re: Have you turned down work because of quality of source code
« Reply #31 on: April 30, 2020, 02:05:06 pm »
Putting shit like this everywhere as a placeholder looks a bit like the smurf language... only a bit more offensive.
 :-DD
 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1924
  • Country: us
Re: Have you turned down work because of quality of source code
« Reply #32 on: May 06, 2020, 11:05:18 pm »
Indirectly, yes.

A former employer once sent me to evaluate a code base they were considering buying from a bankrupt technology firm. To my horror, the code had NO comments, no documentation, nothing. Just source. And it was basically unreadable with variable names that bore no relationship to what they were used for, etc. I recommended STRONGLY that they skip this "opportunity" since I viewed it as a money sink that would not only work out poorly, but also make anyone who touched it (read: Engineering) look terrible. Even the representative from the bankrupt firm that managed my access to it said he'd run, not walk, away from the purchase.

Nevertheless, our Sales and Marketing droids forced their way and my employer bid on the asset. Thankfully they got into a bidding war with another company, and lost. Sales and Marketing were furious, but I told everyone in Engineering that our department and the company as a whole had dodged a bullet. You just know that Sales and Marketing would have been first in line to criticize Engineering's inability to make this code work.
 

Offline Tomorokoshi

  • Super Contributor
  • ***
  • Posts: 1212
  • Country: us
Re: Have you turned down work because of quality of source code
« Reply #33 on: May 17, 2020, 11:27:19 pm »
In this case, a lot of what drives the decision comes down to:

1. What is the timeframe of getting the system to be somewhat documented and understood?

2. What are the requirements for any upcoming changes? What is the schedule for those changes?

3. What is the willingness of management to take on the costs in software analysis tools to help figure it out? Let's ballpark $25,000 as a starting point for various tools until something is found that helps. This doesn't include research and engineering time.

4. What is the projected lifetime / revenue of the product line after updates?

5. Do you have access to all the tools used by the previous engineers, or are licenses, software, and dongles lost?

6. If this is an embedded system, are there issues with circuit board updates or part obsolescence?

The effort breakdown is probably something like 10% programming, 30% engineering, and 60% management until the updated system gets running smoothly. Note that it's possible that the updated system will never actually run smoothly, or that market conditions will eventually cancel the project.
 

Offline hulk69

  • Contributor
  • Posts: 22
  • Country: fr
Re: Have you turned down work because of quality of source code
« Reply #34 on: May 19, 2020, 01:14:56 pm »
Oh man this post is resonating with me so much!

I am working on taking over/maintaining a huge C project done by people who had no business writing code.
This is the most depressing time in my professional carrier. This thing is a living nightmare, your code compare to it looks like art!

 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4196
  • Country: us
Re: Have you turned down work because of quality of source code
« Reply #35 on: May 22, 2020, 02:53:42 am »
There's a certain challenge and satisfaction that you can get from learning how particularly mysterious code works.Whether I'd turn down "work" for that sort of thing would probably depend on whether the employer understood that that was going to be the problem.  If they know they're in deep crap and are willing to spend the time and money to get it fixed, that's an entirely different situation than if they think their current code is wonderful and they just need someone to make a few changes.
 

Offline guenthert

  • Frequent Contributor
  • **
  • Posts: 706
  • Country: de
Re: Have you turned down work because of quality of source code
« Reply #36 on: June 05, 2020, 04:38:22 pm »
  The quoted code might not have been pretty, but it was by no means obfuscated.  I would say about standard for older C. 

  Unless it's assembler, I don't expect much comments within the code, but appreciate if there is (as long as it (still) matches the code, which sadly isn't a given).  More important to me is documentation outside the code -- some kind of product requirement document, worklog, changelog etc. .  Is the code under some version control (if not, that might be the answer you're looking for), how do the check-in comments look like?  Is the motivation of changes documented (or does the author only state the obvious, as in "added foo() to bar.c", which is all too common or mysterious, as in "fixed baz()")?  Is there a defect database (for larger projects IMHO a must)?  Is that defect database consistently(!) referred to in the version control check-in comments? 

  And yes, I chose to decline a work-offer once, but that involved a collection of shell scripts a different company already declined to work on ...
« Last Edit: June 05, 2020, 04:43:48 pm by guenthert »
 

Offline Michael Rempel

  • Contributor
  • Posts: 14
Re: Have you turned down work because of quality of source code
« Reply #37 on: June 05, 2020, 08:26:34 pm »
Personally I am a professional software architect. When I looked at those snippets I saw that it was written by a total amature. Experienced developers acquire a few really good ways to do things over the years. That code has none of them.

I think you were facing one of two possibilities:
1) they have hired the cheapest dev they could find in the past. It is now biting them hard.
2) the guy who wrote it is the one trying to hire you.

Both of these are a nightmare. Good choice to let it go.

And by the way, yeah I have let projects go. Even when I was very hungry, for just these reasons.
Be careful with people like them, they can bad mouth you and cause you lots of grief. Wish them well and forget to anwser their calls.
 

Offline Warhawk

  • Frequent Contributor
  • **
  • Posts: 819
  • Country: 00
    • Personal resume
Re: Have you turned down work because of quality of source code
« Reply #38 on: June 05, 2020, 10:02:18 pm »
Run Forest, RUN!

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4196
  • Country: us
Re: Have you turned down work because of quality of source code
« Reply #39 on: June 06, 2020, 05:44:05 pm »
With the proper experience, you pretty much INSTANTLY recognize that last panel as a mouse trap...

 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Have you turned down work because of quality of source code
« Reply #40 on: June 06, 2020, 06:02:46 pm »
Perhaps, but it's too large to hold a mouse.  It seems more like a... developer trap? ;D

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4208
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Have you turned down work because of quality of source code
« Reply #41 on: June 06, 2020, 06:37:59 pm »
With the proper experience, you pretty much INSTANTLY recognize that last panel as a mouse trap...

Exactly!

More specifically, it's the mouse trap that you end up with if you just #include "mousetrap.h" and don't think too hard about how that particular mouse trap is implemented, what resources it requires, or how long it takes to execute. After all, it's a library that someone else wrote, a long time ago, so it must be tried, tested, reliable and fit for purpose - right?

Offline stafil

  • Regular Contributor
  • *
  • Posts: 205
  • Country: us
Re: Have you turned down work because of quality of source code
« Reply #42 on: June 07, 2020, 01:45:43 am »
How easy can you find another job?

 

Online dietert1

  • Super Contributor
  • ***
  • Posts: 2020
  • Country: br
    • CADT Homepage
Re: Have you turned down work because of quality of source code
« Reply #43 on: June 07, 2020, 09:33:01 am »
Yes, try to get that job, with a contract including your findings. Which means design and docs, no coding. You seem to be the right person to recover that project from the dumpster. Later, if you write one file per day, after another year the project will be yours.
I have been recovering many projects like this - for years. Somehow it stopped after one large year 2000 project that took me about five years. It gave me so much income that i could build my own business, yet i may have become a bit messy, too.

Regards, Dieter
 

Offline tkamiya

  • Super Contributor
  • ***
  • Posts: 2178
  • Country: us
Re: Have you turned down work because of quality of source code
« Reply #44 on: July 07, 2020, 06:12:31 am »
A lot of production code I've seen are like that....  When the code was originally written 10+ years ago and multiple people has had their hands in it, spagetification tends to happen.  Workaround of workaround of workaround isn't fun to fix.  But it's a reality in a lot of places.

Every now and then, I get fed up with it and take out all that code and clean it up.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf