|
|
|
Ask HN: Refactoring Code to Enterprise Level
|
|
5 points
by p3rry
1993 days ago
|
|
I have been writing code since past 10 years, mostly for small companies which have seen medium level of traffic (50-500 concurrently active user). Last year I moved to a startup where I had to scale code to 5000-10000 concurrent users which has been done nicely so far!
Now I have to refactor one of its core functionality to enterprise level software. In short it would be a logistic division of my company and whose end users would be 3-4 tier city users of India who aren’t really so tech Savy ( basically it means exceptions catching and validations should be full proof). Last written code has been working good so far but I am not happy with the ‘if else’ way code has been written!
Any suggestions on how to architect a logistic company or how to refactor code that with assumptions it would fail and recover automatically or atleast points developer/data team that some thing wrong has happened (as there are 2-3 dbs which have to kept in sync, thanks to micro services :/)
In short I have never written enterprise grade application !
Any suggestions/advise would be highly appreciated. |
|
Sounds like you are unhappy with the quality of code and error handling. Seems like it was written by junior devs? I would recommend having the team read the usually recommended books if they haven't. At the bare minimun:
* Refactoring by Fowler
* Clean Code by Robert Martin
If you are using an OO language:
* Practical Object-Oriented Design in Ruby
The book has "in Ruby" in the title but it's a general purpose book on what make OO design "good"
Then follow it up with
* Patterns of Enterprise Architecture
* Clean Architecture
These books are not perfect or the be all end all, there are parts of them that might be slightly dated but they get you to a large chunk of the way to the promised land.
Lastly, if the application is working, the users are happy, there is no bug infestation and you are not having issues with releasing new features, don't feel the pressure to immediately "fix" the code.