November 11, 2016 at 4:43 am
Jeff Moden (11/10/2016)
Lynn Pettis (11/10/2016)
Jeff Moden (11/9/2016)
Lynn Pettis (11/9/2016)
Jeff, I actually excepted you to have some interesting comments about the code I emailed you, or didn't you get it?Ah. sorry. I did see it and did start to look through it and got side tracked. Who wrote it?
Not really sure, but apparently the person currently responsible has a canned response ready when I make suggestions for minor changes, "Someone else wrote this code before me." With absolutely no comments in the code, would know. I have slowly started adding comments to my code and hopefully it is starting to look more like the code you write.
I don't know why people think that the code is the documentation. COBOL came close to that, but even that needs more comments where complex logic is involved.
As you know, my general rule of thumb is that if you remove all of the code, the comments that remain should allow someone to create a functional flowchart. My original thought when I saw the code was "typical code by someone that doesn't know, doesn't care, or both".
Hrm. Looking over the comments I've made in processes I've built, I doubt anyone could make a flow chart. But definitely they see all the ticket numbers and all the stupid "The user wanted us to do this, it didn't work so they backed it out. Then they tried the same thing again a year later. Then they tried the same thing a year later" comments I've made.
My boss loved that comment in particular because come the fourth time they made that request, I was out of the office. So he opened up the proc, saw all the dates where they tried exactly the thing that kept failing and said "NO" in a very loud voice. Pushed the ticket back and told them to fix their ... stuff before they ever requested it again.
November 11, 2016 at 5:20 am
😎
Not certain how to read these requirements.
November 11, 2016 at 5:26 am
It's kind of beautiful.
November 11, 2016 at 5:36 am
Eirikur Eiriksson (11/11/2016)
😎
Not certain how to read these requirements.
I'm not sure for how many more years my marbles will be in order.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
November 11, 2016 at 5:46 am
Creating the tables on my local machine and looking at the requirements more closely, I have a sneaking suspicion this is a homework assignment. It certainly looks a lot like the kind of programs I had to write in high school.
November 11, 2016 at 9:51 am
Phil Parkin (11/11/2016)
Eirikur Eiriksson (11/11/2016)
😎
Not certain how to read these requirements.
I'm not sure for how many more years my marbles will be in order.
I'm not sure about mine either. If I manage to find them I will have to analyze them to see if they are still in order.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
November 11, 2016 at 11:58 am
Sean Lange (11/11/2016)
Phil Parkin (11/11/2016)
Eirikur Eiriksson (11/11/2016)
😎
Not certain how to read these requirements.
I'm not sure for how many more years my marbles will be in order.
I'm not sure about mine either. If I manage to find them I will have to analyze them to see if they are still in order.
Well, they'll certainly be in some kind of order, whether haphazard or not.
Regarding the post, it does look like homework. The OP hasn't responded, so they likely went elsewhere.
November 11, 2016 at 12:45 pm
Ed Wagner (11/11/2016)
Sean Lange (11/11/2016)
Phil Parkin (11/11/2016)
Eirikur Eiriksson (11/11/2016)
😎
Not certain how to read these requirements.
I'm not sure for how many more years my marbles will be in order.
I'm not sure about mine either. If I manage to find them I will have to analyze them to see if they are still in order.
Well, they'll certainly be in some kind of order, whether haphazard or not.
Regarding the post, it does look like homework. The OP hasn't responded, so they likely went elsewhere.
Wonder what kind of "home work" the OP is doing playing with his marbles.
😎
November 11, 2016 at 12:58 pm
Marbles?
Pretty sure I lost them years ago.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
November 11, 2016 at 1:02 pm
Grant Fritchey (11/11/2016)
Marbles?Pretty sure I lost them years ago.
Yeap...it was right around the time I said "I do". 😀 Last I knew she still kept my marbles locked away for "safe" keeping. ROFL!!
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
November 11, 2016 at 1:33 pm
"safe" keeping? More like ransom.:w00t:
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 11, 2016 at 1:50 pm
WayneS (11/11/2016)
"safe" keeping? More like ransom.:w00t:
Nah a ransom would indicate a possibility of parole. :hehe:
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
November 12, 2016 at 3:48 am
What a spamtastic Saturday morning:pinch:
😎
November 12, 2016 at 11:33 am
Brandie Tarvin (11/11/2016)
Jeff Moden (11/10/2016)
Lynn Pettis (11/10/2016)
Jeff Moden (11/9/2016)
Lynn Pettis (11/9/2016)
Jeff, I actually excepted you to have some interesting comments about the code I emailed you, or didn't you get it?Ah. sorry. I did see it and did start to look through it and got side tracked. Who wrote it?
Not really sure, but apparently the person currently responsible has a canned response ready when I make suggestions for minor changes, "Someone else wrote this code before me." With absolutely no comments in the code, would know. I have slowly started adding comments to my code and hopefully it is starting to look more like the code you write.
I don't know why people think that the code is the documentation. COBOL came close to that, but even that needs more comments where complex logic is involved.
As you know, my general rule of thumb is that if you remove all of the code, the comments that remain should allow someone to create a functional flowchart. My original thought when I saw the code was "typical code by someone that doesn't know, doesn't care, or both".
Hrm. Looking over the comments I've made in processes I've built, I doubt anyone could make a flow chart. But definitely they see all the ticket numbers and all the stupid "The user wanted us to do this, it didn't work so they backed it out. Then they tried the same thing again a year later. Then they tried the same thing a year later" comments I've made.
My boss loved that comment in particular because come the fourth time they made that request, I was out of the office. So he opened up the proc, saw all the dates where they tried exactly the thing that kept failing and said "NO" in a very loud voice. Pushed the ticket back and told them to fix their ... stuff before they ever requested it again.
Revision history is the other type of very valuable comment. I generally relegate such things to the header of the proc in the "Revision History" section of the header. As they did for you and your boss, such comments can help prevent duplication of idiocy. 😀 Hard to lose them because they travel with the code forever, if you do things right.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 12, 2016 at 11:37 am
Eirikur Eiriksson (11/12/2016)
What a spamtastic Saturday morning:pinch:😎
Indeed it has been. I've personally hidden about 100 spam posts in the last 4 to 5 hours. The bots are having a field day today. I hope the folks at SSC release whatever fix they're thinking of soon. This has gotten totally out of hand. Although it's certainly gotten worse, it's not a new problem. I told folks at SSC several years ago that it was going to get much worse. They mostly brushed it off as a low occurrence they could handle manually.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 15 posts - 56,551 through 56,565 (of 66,712 total)
You must be logged in to reply to this topic. Login to reply