|
That sounds like a disaster. Code reviews can be helpful but you do have to go in with the idea of constructive criticism, and in any case, it's easier after the first couple of times.
Real programmers use butterflies
|
|
|
|
|
Look at it from a different angle: that guy was actually very smart.
When ever you touch a little useless line, you are likely to break the codez. Thus he provides proof that the code really requires deep long thoughts and enormous diligence. Which can be provided by really smart asses people like him only.
Oh sanctissimi Wilhelmus, Theodorus, et Fredericus!
|
|
|
|
|
Gary Wheeler wrote: He even cultivated a mythology about it, that it was dangerous for other people to even look at it,
Observing the code changes the code. Physics!
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
|
|
|
|
|
He told his management he didn't want anyone else to see it since they wouldn't understand it and would screw it up if allowed.
Software Zen: delete this;
|
|
|
|
|
I embed some curse words in my comments but I'm the only one that will ever read itr.
The less you need, the more you have.
Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?
JaxCoder.com
|
|
|
|
|
Would it be easier to deduce the function it performed and re-write from scratch. Or is that not possible given the circumstances?
"Momma looks down and she spit on the ground evry time my (his) name gets mentioned" - Paul Simon
|
|
|
|
|
We have sufficient information to recreate the product, but neither the manpower nor the time to do so.
Software Zen: delete this;
|
|
|
|
|
..with all your due respect!!..
😇😇😇😇
|
|
|
|
|
Been there done this rewrite. Only in my case it was my boss's code that I rewrote. He had four entry points and I whittled them down to two - add() and delete(). Had to track down all the instances where he used the four entry points and rework those as well. Final code not only was about two thirds the size it executed about a third faster (very disk intensive).
|
|
|
|
|
Part 1
You probably know about jsfiddle and how you run and test your JavaScript in your browser.
But there is also a SQLFiddle which allows you to run and test your sql in your browser[^].
It's quite convenient.
Supports MySQl, Postgres, Sqlite, Oracle and Sql Server.
Also, if you work on a query, you can save the URL and get back to it.
Part 2
I recently discovered that you can do a select from two tables allowing you to select just the columns you want (versus a join). I don't know why that amazed me, but I'd never tried it before and it really helped in a current situation.
here's a very simplified sqlfiddle example:
SQL Fiddle[^]
edit
fixed initial link to sqlfiddle
modified 18-May-21 13:25pm.
|
|
|
|
|
Nice, but did you really intend to have a non-unique key in Address ?
/ravi
|
|
|
|
|
Ravi Bhavnani wrote: but did you really intend to have a non-unique key in Address ?
Oops! Updated the link (to the one where I fixed the key value in address).
Thanks
|
|
|
|
|
There are quite a few "fiddle" sites for different technologies: There's a fiddle for that![^]
However, steer clear of refiddle DOT com for the moment. The site seems to have been taken over by an Indonesian casino.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
If you didn't came across implicit join until now, then you better left it alone...
It will translate to a cross join but without the clear syntax of it...
It is not standard too (IIRC it started with MS Access)...
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
|
|
|
|
|
Quite standard Postgresql.
Which one of these you use is mainly a matter of style. The JOIN syntax in the FROM clause is probably not as portable to other SQL database management systems, even though it is in the SQL standard. For outer joins there is no choice: they must be done in the FROM clause. The ON or USING clause of an outer join is not equivalent to a WHERE condition, because it results in the addition of rows (for unmatched input rows) as well as the removal of rows in the final result.
|
|
|
|
|
MS SQL recognises that syntax as a JOIN and generates exactly the same execution plan.
|
|
|
|
|
Yeah, I think the main thing it helped me with was cleaning up my original Stored Proc query (which already had a bunch of joins). This helped me to easily add the one field I wanted without having to do all the join syntax and it ended up being a little cleaner.
|
|
|
|
|
There is also C# Online Compiler | .NET Fiddle[^]
raddevus wrote: do a select from two tables allowing you to select just the columns you want Do not ever do this. It is a very, very old way of doing joins, before join syntax was a thing. It is an ancient form of writing sql. And it IS a join, just in the WHERE clause.
|
|
|
|
|
Good to know. Thanks. I've been reading about it and will do more research.
|
|
|
|
|
private string _CustomName = "Contact the developer";
public string CustomName
{
get
{
return _CustomName;
}
set
{
if (!_CustomName.IsNull())
{
if (!_CustomName.Equals(value))
{
_CustomName = value;
OnPropertyChanged("CustomName");
}
}
else
if (_CustomName != value)
{
_CustomName = value;
OnPropertyChanged("CustomName");
}
}
}
Not sure I want to contact the developer.
|
|
|
|
|
It's custom-ary 
|
|
|
|
|
... and he forgot the StringEqualityComparison parameter in the Equals function...
Oh sanctissimi Wilhelmus, Theodorus, et Fredericus!
|
|
|
|
|
Ridiculously long identifier of the day: Connect_catcher_line_to_PIC_ink_port__Connect_duct_line_to_PIC_storage_port__Then_Step_Up
All 90 characters of it. Yes, I created it deliberately and yes I know it includes two occurrences of two underscores in a row.
To make matters worse, it's an enum value, identifying a bit in a mask.
Thank [diety-of-choice] for IntelliSense.
Software Zen: delete this;
|
|
|
|
|
I would consider that a nominee as a potential candidate of the year. Nice effort.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
Thanks. I have had longer ones (I remember a resource identifier that was close to 200), but this one set a recent record.
Software Zen: delete this;
|
|
|
|