Ask HN: How do you modify functions over 1000 lines long?
Ask HN: How do you modify functions over 1000 lines long?
2 by azeirah | 1 comments on Hacker News.
I recently started working at a startup whose code was developed under very intense business pressure. This combined with the attitude towards code needing to "work" and not code needing to be qualitative has lead to a messy codebase. One can argue that at least if the code _does_ work then it's ok, but we're dealing with many errors daily. Luckily we do have sentry and continuous deployment set-up (no CI though), so these errors can be fixed quickly when they are seen. Needless to say, we don't have any tests. The code is messy in most places, not all. We're working on improving the codebase, but I still feel like I'm not very well equipped to work in functions that has 10s of database queries, over 100 variables, nested if-statements, and if-statements with 5 or more checks all over the place. I'm trying to learn testing, but under these circumstances it's still kind of difficult. The positive side is that I do get a lot of time to read, research and learn, and I do get the freedom to try things out if they provide some form of benefit for us. I consider myself a medior in terms of experience, this is my second job in programming.
2 by azeirah | 1 comments on Hacker News.
I recently started working at a startup whose code was developed under very intense business pressure. This combined with the attitude towards code needing to "work" and not code needing to be qualitative has lead to a messy codebase. One can argue that at least if the code _does_ work then it's ok, but we're dealing with many errors daily. Luckily we do have sentry and continuous deployment set-up (no CI though), so these errors can be fixed quickly when they are seen. Needless to say, we don't have any tests. The code is messy in most places, not all. We're working on improving the codebase, but I still feel like I'm not very well equipped to work in functions that has 10s of database queries, over 100 variables, nested if-statements, and if-statements with 5 or more checks all over the place. I'm trying to learn testing, but under these circumstances it's still kind of difficult. The positive side is that I do get a lot of time to read, research and learn, and I do get the freedom to try things out if they provide some form of benefit for us. I consider myself a medior in terms of experience, this is my second job in programming.
Comments
Post a Comment