|
Only in the sense of being brought in as a consultant to fix the mess.
Marc
|
|
|
|
|
At least you got payed for (I hope so!)...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Kornfeld Eliyahu Peter wrote: At least you got payed for (I hope so!)
Yes quite, but it's interesting how frustrating the process can be, working with crappy code. To give you an example, I took one function with 20 or so property "setters" all hand-coded against a database table and replaced the whole thing with one line of Linq and some reflection.
Now, imagine dozens of these functions, because there are dozens of these tables, each of which was hand-coded, and all of which, comprising thousands and thousands of lines of code, could be reduced to my one line general purpose function.
And no, performance is not an issue, using reflection is just fine, etc.
And this code was written by someone (around Jan of 2014) claiming to have 20 years of experience and degrees in Computer Science.
Argh. It's really strange, but I can actually "hear" the code screaming, like a deformed baby from some horror movie. It sure needs a lot of healing.
Marc
|
|
|
|
|
Marc Clifton wrote: And no, performance is not an issue, using reflection is just fine, etc.
Not sure how that it relevant since of course performance would be mostly impacted by the database call itself and of course the overall architecture.
Marc Clifton wrote: And this code was written by someone (around Jan of 2014) claiming to have 20 years of experience and degrees in Computer Science.
Did the code work?
Was it laid out in a consistent manner?
Was the code that was created by the one individual consistent between different entities?
If the answer to all of those is no then it was crappy code.
If the answer is yes then of course you are discussing a preference which has nothing to do with the actual quality of the code.
|
|
|
|
|
Yes, yes, and yes.
jschell wrote: If the answer is yes then of course you are discussing a preference which has nothing to do with the actual quality of the code.
Not really. It's costly to maintain because to make a change (like adding a column to the DB) requires:
Add a field
Adding the get/set property
Updating the query method
Updating the insert method
Updating the update method
Updating the method that copies the DB field to the properties
Updating the method that copies the properties to the DB fields.
What should take one minute ends up taking about 30, not to mention that none of the code is abstracted enough to mock the DB and write unit tests, so the only way to test the changes is to actually run the app, which is a web service, so that requires a bunch of complex hoops on the client side to even get to the point where you can access the changed functions.
That's all factual issues, not opinion.
Marc
|
|
|
|
|
Marc Clifton wrote: It's costly to maintain because to make a change (like adding a column to the DB) requires:...
Err...no it doesn't.
To add a column to a field should be a business decision and as such it will have an end to end impact on one or more systems. The cost of making this simple change to one system, presuming that the database layer is laid out using some consistent methodology is trivial because it is so straightforward. The impacts to the other parts of the system(s), one would hope should also be as easy but that depends on whether each level was also using a consistent methodology.
Unfortunately what is much more likely to happen is that some layer uses several methodologies. Or is basically just an example of chaos. And thus the cost goes up because of this.
As well one must ignore other issues such as prioritization of improvements/bugs versus the tradeoffs of whatever expertise exists currently within the development staff along with delivery times which also have an impact on real and perceived costs.
Marc Clifton wrote: What should take one minute ends up taking about 30
Perhaps we work in different environments but I work with teams and methodologies which have the following constraints.
- Estimates are not less than an hour and often four.
- Code must be unit tested, and adding unit tests even for a new column is going to take more than one minute regardless of what it takes to actually add the column.
This doesn't include things like building, running unit tests, checking in code and taking care of the ticket(s) that initiated the change in the first place.
Not to mention of course that before all of this occurs reviewing why the change was needed in the first place would take time.
Marc Clifton wrote: so that requires a bunch of complex hoops on the client side to even get to the point where you can access the changed functions.
If that is relevant than it suggests something either wrong with the design/architecture or it has nothing at all to do with how the database layer is implemented.
|
|
|
|
|
Marc Clifton wrote: claiming to have 20 years of experience and degrees in Computer Science. Programming was a lot different back then. Having 20 years of experience is not the same as having 20 years of knowledge
I know people with many years of experience who still code like they're in VB1 (yes, really!).
My blog[ ^]
public class SanderRossel : Lazy<Person>
{
public void DoWork()
{
throw new NotSupportedException();
}
}
|
|
|
|
|
Once saw a new years resolution to "finish more projects than I start"
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
Yeah, there are also times that I start a new side project after putting the first brick only.
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
We had a company outing today for open ship on the new German research vessel Sonne[^].
Back in the company the boss gave us the rest of the day off. So I'm already at home now.
|
|
|
|
|
What does it research? Or does it just "look for things" generally?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Maybe the new RV Sonne has a glass bottom to research the old RV Sonne
|
|
|
|
|
Not necessary. She's still swimming. Actually in Colombo waiting to be selled.
|
|
|
|
|
Areas of operation are geology, climate, oceanography and marine biology deep sea research in the Pacific and the Indian Ocean.
|
|
|
|
|
Yay! All the mercans are getting pished and/or fatted.
Have a Happy Thanksgiving, and don't forget to thank your local native mercans for all they did!
|
|
|
|
|
Nagy Vilmos wrote: All the mercans are getting pished and/or even more fatted.
FTFY!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I represent that remark!
I'm retired. There's a nap for that...
- Harvey
|
|
|
|
|
This Mercan's celebrating Thanksgiving by attending scrum.
/ravi
|
|
|
|
|
What? Mercats?
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
|
|
|
|
|
|
The Syrian Electronic Army has hacked a number of news websites after apparently compromising a third party content delivery network, possibly an advertising network.
The Pro-Assad javascript popup appeared across several websites, including The Telegraph, The Independent, Forbes, Time Out, PC World and The Evening Standard.
The Graniad was saved by a misspelt URI on the site.
|
|
|
|
|
Movie Quote Of The Day
Those could be giant Jiffy-Pop poppers.
Which movie?
|
|
|
|
|
|
Metallica: Some kind of monster
|
|
|
|
|
Faster, Pussycat! Kill! Kill!
|
|
|
|