I feel I am in the same boat as you. I belive myself to be a very average (possibly less so) developer.
Even believing that I cannot understand the amount of crap I have been forced to rewrite because it simply does not work.
Just recently a expensive contractor was brought in to write a series of simple CRUD screens using .NET MVC and KendoUI. It appeared to work, but if you even scratched the surface you quickly discovered it was almost totally broken. Further down it consisted of one big class as a service layer, raw SQL rather then LINQ, and a jumble of interdependent hell. I spat the dummy after 5 days of fixing bugs (trying to avoid changing too much) and scrubbed each page one after the over and ended up with something modular which I could actually support. It took me 2 weeks to scrub (80% of the codebase was touched or rewitten) what took this contractor 3 months to write.
I am with you. If that's normal (its not the first time this has happened to me) then what sort of dev am I if I know I am not a rockstar?
I don't mean this offensively, but this has a bit of a whiff of NIH syndrome.
Rewriting and refactoring existing code is a lot easier and quicker than writing it the first time, even if it's someone else's. Unless you saw a massive drop in TLOC you were probably just rewriting it into your own style. Looking back on my own past, I am guilty of doing this myself more than once.
And raw SQL vs the Entity Framework is not a reason to judge code. There's a lot of warts on that thing still, though I do use it in moderation. LINQ and the EF are two completely different concepts btw which you seem to have muddled. You can use LINQ or the LINQ extension methods with any IEnumerable, not just with the EF ORM.
No that's fine. From the above it does sound like it.
Normally I would agree, but I really couldn't fix bugs in this code without re-factoring majorly. It really was that bad. I wouldn't have minded so much if we hadn't supplied the guy with a sample which showed how he should lay it out as well.
I may have gained a boost from his code (I did literally just scrub the codebase and reused a lot of had a change a heck of a lot too) but im certain I didn't gain 3 months from using what was delivered.
For the SQL portion we explicitly told him to use repository pattern using Entity Framework which he totally ignored this requirement. The moment I saw raw SQL in our models I really cracked it.
Of course the above could have been fixed with a decent peer review process but I could write chapters over what happened there. Suffice to say I saw the code once, made many requests of things to fix and was never invited to review it again.
I thought about reasons for re-writing for 2 days. But the system is just not reliable or safe. I'm not re-writing it in one sitting, just replacing the buggy/unsafe code with good code until the system is stabilized. Then, and only then will I re-write. Though there are parts of the system that would work very well in Lisp. (:
Absolutely. The parts that really bugs me is when I take on bi challenges. My biggest challenge so far has been building Nuuton. It took me months of thinking and reasoning the data flow and structures. On top of that, I had to pick which language fit the problem, rather which problem fit the language. My original choice was Lisp, because it allowed me to create DSLs. Something that would have really helped in building each individual sub-system. But at the same time, Lisp is not as simple to pick as it should. It has libraries, and an amazing amount of data ready to be researched. Yet, it does not seem (to me) as complete, in terms of libraries and community, as Python. Which was my second choice. Python has all of the libraries I needed. Sure, I had to play by Python's rules, but libraries and frameworks like Django really do save development time.
Them, I had to research the options available within Python that would allow for the architecture I had designed. Every sub-system is simply a black box that reads/returns data in a standard format. From the crawlers, to the data store, to the actual web app, everything is simply an API. Ultimately, I chose the Django rest-framework, because it had a lot of features built into it. Thing like authentication, a permissions system, throttling, and so on. Those were things I did not have to write. A simple set of Models/Views and I was off. With Lisp, I would have had to write that, and end up with a code base that would not have been as good as that one.
Nuuton is huge, in terms of sub-systems. But small at the same time. Everything is divided neatly, and is very simple to follow. The queue sub-system that handles requests/responses from the crawlers is very simple to follow. Plus you can actually see how the data is collected, cleaned, formatted, analyzed, stored, served, and modified.
But I'm not a rockstar, cowboy, or even great. I'm average.But worse is that I have this inherent thought that I will never become any better. Even though years ago I was writing Visual Basic apps (you know the type). This due to how much I struggle. Every day I have to research some class, or some method. Can it do that? What's parameters does it take? Does it fit the design? And sometimes I just write the damn thing and end up throwing it out because I realize it is too complicated. I also understand that I will always struggle. But I will never quit. Do rockstars struggle? Do the people that graduate MIT and go on to work on Google struggle? I don't know. Maybe if they do, they dont struggle as much as me. Guess thats the difference. Average struggles a lot, rockstars not so much. Yet I know thats bullshit. Who am I to question my own insecurities?
Even believing that I cannot understand the amount of crap I have been forced to rewrite because it simply does not work.
Just recently a expensive contractor was brought in to write a series of simple CRUD screens using .NET MVC and KendoUI. It appeared to work, but if you even scratched the surface you quickly discovered it was almost totally broken. Further down it consisted of one big class as a service layer, raw SQL rather then LINQ, and a jumble of interdependent hell. I spat the dummy after 5 days of fixing bugs (trying to avoid changing too much) and scrubbed each page one after the over and ended up with something modular which I could actually support. It took me 2 weeks to scrub (80% of the codebase was touched or rewitten) what took this contractor 3 months to write.
I am with you. If that's normal (its not the first time this has happened to me) then what sort of dev am I if I know I am not a rockstar?