I do hope that this is on topic here. I am looking for some advice from other seasoned software developers.
About five years ago, a friend of mine started an app. Although I have been a professional software developer for decades, he did not ask me to participate. Instead, he got a young guy in college to do it. As a result, there is "working" code, but zer0 software engineering. The college guy has moved on, and my friend has asked me to help out. I believe that his idea is good, and could bring in some money or he may even hit the jackpot and be bought out.
There is no:
– requirements
– architecture document, or even diagram
– functional specification
– documentation for each of the 5 or 6 major subsystem
– test specification
– automated testing
Personally, I would have used PHP, because I have 20 years of it, rather than Node.js, although I have 10 years AngualrJS and Typesecipt, through Angular2+. And MySql rather than Firebase. And it is highly tempting to specify it properly and start again from scratch. I am well aware of Joel Spolsky's Things You Should Never Do, Part I, although Joel is Wrong, and it costs you a fortune makes a good counter case.
As to the code:
– there is little or no logging, and that only in one subsystem, where it writes to Firebase's console. There are a handful of subsystems with zero logging – there is no documentation of function calls; what they do, what kind of parameters they take, what they return
– there is almost no error handling and no exception catching
– the code is littered with 400 and 500 line functions, with almost no comments
– there is much repetition. For instance, 22 different places in the code read exactly same field of data from Firebase, rather than one central function. Just to make it interesting, there are 5 or 6 different variants of the code, but all have the same effect, so it is not even (consistently) copy/pasted
– there is no Object Orientation. Not a deal-breaker, but to me it's a smell
My thinking is that it would take a year, more like two to get it straightened out. My friend would, unfortunately, like to continue to add features, and we will undoubtedly lock horns over that. That said, he taught himself to code Python and now updates the app using Node.Js and Flutter/Dart. He seems to appreciate what I say to him about software engineering, and is a very quick learner.
My question is threefold:
- should I undertake to give up my evenings and half of my weekends for the next year or two? If I don't do this, I will be spending the time hobby coding anyway.
- should I ditch the code and start from scratch? Or switch to typescript, add some OO, comments, debug logging, exception handling, replace all the convoluted promises with async, restructure to have smaller functions, each with a single propose … all the things I would do if starting from scratch
-
what's the priority of that first list? I am leaning to towards getting it documented – in detail – first and the getting some automated testing set up, so that I can make sure that any changes don't break anything?
Sorry that this is long (it would have been muuuuch longer). I would be very grateful for any advice. Feel free to ask questions.
submitted by /u/jamawg
[link] [comments]
from Software Development – methodologies, techniques, and tools. Covering Agile, RUP, Waterfall + more! https://ift.tt/hqGdVaj