Difference between obsolete and waste code [closed] - obsolete

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
What is the difference between terms: "obsolete code" and "waste code"?
If there is the difference, what approaches are eligible for its reduction?

Obsolete code:
Code that may have been useful in the past, but is no longer used, e.g. code to use a deprecated protocol.
Waste code:
Never heard of the term, but I'd imagine - code that may or may not be executed that can be removed without changing workings of the application. I'd imagine this would include obsolete code.
Either of the above can range from single statements to entire libraries.

Personally I would say that obsolete code are methods that are there, but aren't used any more. Like for example deprecated methods/functions. Waste code would I define as code that has as only function to slow the application down.

Related

How to avoid cumbersome if/else constructs? [Something more like an architecture approach, not just switch statement] [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I faced a task when I need to process a bunch of conditions and perform an action in the result. Are there any libraries or approaches that can help me building a structure like this? With replaceable/amendable conditions and results?
There are several patterns here, you can use Chain Of Responsibility to extract out the logic into separate classes.
If you want to fully extract it, there are rules engines that can help with that, making the if/else more data-driven. This has it's own concerns, namely around testing, promotion, etc...
Feel free to peruse my rant against rules engines: Method or pattern to implement a Business Rules Engine in a solution?

Type erasure: Rust vs Scala [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I program in Scala. I'm fairly versed.
Now, Rust has caught my eye. It looks good. Like it might be another language I would like to have under my belt.
From time to time, when I want to go crazy with types and still have compile time safety, I run into problems, one of which is type erasure.
Is there much difference between the two? Would it be easier to implement this question in Rust? Does Rust have type erasure?
PS. I hope this question is not too vague. Just want to have an overview of the main difference when it comes to types and generics.
Scala is GC language and has JVM runtime so it can tap into JVM ecosystem (clojure, java, groovy, ...), Rust is well known for it's trademark ownership approach which gives a lot more safety guarantees at compile time.
Rest of the differences can be neglected I believe.

Is remembering essential to coding? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I suppose it's not a specific programming question, but it is a question about programming nonetheless.
While I completely understand all the code that i read in the book that I'm using (I have even figured out an error in the book that I fixed my self, within seconds just by looking at it)there are things in there that I'm sort of remembering without really .. thinking about it.
I guess my question is, is it essential to remember some code, or is it a bad practice?
Again, I'm sorry if this is a waste of time to anyone, I'm only trying to learn as much as I can about programming and instilling good habits is important.
I know that Understanding code is much better, and It's what I did when I was learning objective-c , I literally stopped remembering code and wanted to understand it instead of just remember, and it worked. Now that I'm working with Cocos2D, It sometimes feels like I'm remembering instead of understanding, if that makes any sense.. Although since I know Objective-C now, I understand the code, but the order in which it is written.. I'm sort of relying on memory..

What goes in a good tag message? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
There are plenty of resources on the web on how to write good commit messages, and it isn’t really all that hard. I’d like to know what makes up a good tag message though. Simply citing the summary lines of all commits since the previous tag is probably not really useful. What do you deem a ‘quality’ tag message?
The only thing that I'd call a 'quality tag' would have to be fairly complete. Generally, I would consider a good tag to be short, to the point, but also explain exactly what went on, like so:
"Committed the public directory, containing the new logo (logo.png), the new stylesheet (style1.css), and with the javascript that selects checkboxes of parents if their children are checked in a hierarchical structure (checkheir.js), did some code refactoring, made it more readable, and added comments for easier comprehension -John Doe"

Techniques to detect Polymorphic and Metamorphic viruses? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
What techniques can be applied to detect Polymorphic and Metamorphic viruses?
How difficult is to implement these techniques?
Are these techniques being applied in modern day anti-virus softwares?
I thought most of the virus scanners nowadays use sandbox techniques to check for "bad" behavior. Therefore the polymorphic virusses will also be detected.
of course these detection techniques are also known to virus creators, and can easily be bypassed using a bunch of random, unharmfull, code executions before the actual payload.
It's impossiable to detect all known poly/metamorphic bad-code. White lists verification is the only provable technique. It's not always possiable, especially if your infrastructure/computer has not been maintainedd very well. Which is a good reason why signature, heuristic, emulation based detection is still valuable.