Two lines of code I wrote today with a straight face (at least for a while)
-
An old C system I once worked on had a routine `abortOrphans()`. :laugh:
veni bibi saltavi
According to democrats, that's okay (and it's called "full term abortions" now.).
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
There's no such thing as a "line of code" in C-style languages.
-
An old C system I once worked on had a routine `abortOrphans()`. :laugh:
veni bibi saltavi
-
You have my blessings on the underscore :D But why is there a comment that just puts the two words of the function name in a different order? :~ Why not change the function name to _Terminate_Users (or TerminateUsers if you want to do it right ;) ) so it's slightly more readable and ditch the comment?
Best, Sander sanderrossel.com Continuous Integration, Delivery, and Deployment arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly
Sander Rossel wrote:
Why not change the function name to _Terminate_Users (or TerminateUsers if you want to do it right ;) )
That was last month. The coding standard of this month says that functions should be named __. The argument for that is that in a sorted list of function names, you get all the actions on one object class gathered together. I have no information wha will be the right way to format code next month, or what the arguments will be, but I am really happy that modern IDEs have support for coding style changes. For newlines, indents and spacing it can be fully automated. Changing naming standards usually require some more manual work, but compared to the old days where you had to manually search for every occurence of a symbol to change it to the standard of the month required a lot more work.
-
You have my blessings on the underscore :D But why is there a comment that just puts the two words of the function name in a different order? :~ Why not change the function name to _Terminate_Users (or TerminateUsers if you want to do it right ;) ) so it's slightly more readable and ditch the comment?
Best, Sander sanderrossel.com Continuous Integration, Delivery, and Deployment arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly
The comment was removed shortly thereafter. The "user termination" logic was directly after the comment, but was moved into its own method. This was part of a reorganization/refactoring going on in preparation for a new feature.
Software Zen:
delete this;
-
Sander Rossel wrote:
Why not change the function name to _Terminate_Users (or TerminateUsers if you want to do it right ;) )
That was last month. The coding standard of this month says that functions should be named __. The argument for that is that in a sorted list of function names, you get all the actions on one object class gathered together. I have no information wha will be the right way to format code next month, or what the arguments will be, but I am really happy that modern IDEs have support for coding style changes. For newlines, indents and spacing it can be fully automated. Changing naming standards usually require some more manual work, but compared to the old days where you had to manually search for every occurence of a symbol to change it to the standard of the month required a lot more work.
Fortunately for me, our coding standard (all 1½ pages of it) hasn't changed significantly since 2000.
Software Zen:
delete this;
-
I do similar. Private members have leading underscores in my code. I was just yanking Sander's chain.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
honey the codewitch wrote:
yanking Sander's chain
Chain-yanking is almost always a useful thing. :-D
Software Zen:
delete this;
-
The comment was removed shortly thereafter. The "user termination" logic was directly after the comment, but was moved into its own method. This was part of a reorganization/refactoring going on in preparation for a new feature.
Software Zen:
delete this;
The best comment is a removed comment :thumbsup: :D
Best, Sander sanderrossel.com Continuous Integration, Delivery, and Deployment arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly
-
The best comment is a removed comment :thumbsup: :D
Best, Sander sanderrossel.com Continuous Integration, Delivery, and Deployment arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly
A long time ago I took a programming class from Dan Saks, one-time secretary of the ISO C++ standardization committee. He said something to us which has stuck with me ever since, and has led to a profound reduction in the number of comments I write: "If you can, say it in code. If you can't, only then say it in a comment." While we do maintain change history in our source, my comments now tend to serve other purposes than simple documentation. For example, our code base is in the neighborhood of 3 million lines so navigation can be a problem. Comments can serve as markers for 'find in files' destinations when Intellisense doesn't work.
Software Zen:
delete this;
-
// terminate users \_Users\_Terminate();
:-D
Software Zen:
delete this;
-
A long time ago I took a programming class from Dan Saks, one-time secretary of the ISO C++ standardization committee. He said something to us which has stuck with me ever since, and has led to a profound reduction in the number of comments I write: "If you can, say it in code. If you can't, only then say it in a comment." While we do maintain change history in our source, my comments now tend to serve other purposes than simple documentation. For example, our code base is in the neighborhood of 3 million lines so navigation can be a problem. Comments can serve as markers for 'find in files' destinations when Intellisense doesn't work.
Software Zen:
delete this;
One of my mentors once stated "The comments are the part of the code that even the compiler cannot understand"
-
An old C system I once worked on had a routine `abortOrphans()`. :laugh:
veni bibi saltavi
-
// terminate users \_Users\_Terminate();
:-D
Software Zen:
delete this;
And I thought the problem was: _Users_Terminate( IgnoreUser=Me ); // Bug found that after terminating my user, program stopped...
-
There's no such thing as a "line of code" in C-style languages.
You mean I've spent all these years doing... nothing? :wtf:
Software Zen:
delete this;
-
An old C system I once worked on had a routine `abortOrphans()`. :laugh:
veni bibi saltavi
Many years ago my team was working with an inherited system based on FoxPro. The original designer had used abbreviated table names like ASS instead of Assignment. A normally straight laced co-worker bust out laughing one day when he had to write a SQL statement "INSERT INTO ASS ..." :laugh:
Outside of a dog, a book is a man's best friend; inside of a dog, it's too dark to read. -- Groucho Marx
-
my hubby used to work helldesk in college and he said he kept a paperclip around for rebooting the imacs and an icepick around for rebooting their users.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
-
An old C system I once worked on had a routine `abortOrphans()`. :laugh:
veni bibi saltavi
-
// terminate users \_Users\_Terminate();
:-D
Software Zen:
delete this;
-
A tad BASIC, but sounds like fun.
Software Zen:
delete this;
-
Many years ago my team was working with an inherited system based on FoxPro. The original designer had used abbreviated table names like ASS instead of Assignment. A normally straight laced co-worker bust out laughing one day when he had to write a SQL statement "INSERT INTO ASS ..." :laugh:
Outside of a dog, a book is a man's best friend; inside of a dog, it's too dark to read. -- Groucho Marx
In a similar tone... Many years ago, we had a small network of Sun machines. The machine names followed the names of the planets in our solar system. The QA guy (who was a 1st-order asshat) was incensed when he was given the machine named... wait for it... you know it's coming... Uranus.
Software Zen:
delete this;