terminology

Testing software: fake vs stub

老子叫甜甜 提交于 2019-11-29 06:10:42
问题 There are quite a few written about stub vs mocks, but I can't see the real difference between fake and stub. Can anyone put some light on it? 回答1: I assume you are referring to the terminology as introduced by Meszaros. Martin Fowler does also mentions them regularly. I think he explains the difference pretty well in that article. Nevertheless, I'll try again in my own words :) A Fake is closer to a real-world implementation than a stub. Stubs contain basically hard-coded responses to an

Is metaprogramming a subset of reflection?

你说的曾经没有我的故事 提交于 2019-11-29 06:00:26
问题 I used to think that metaprogramming involved modifying the program, and (as do some answers to What is reflection and why is it useful? ) that reflection merely consisted of introspection of a program. However, the reflection tag wiki says Reflection is the process by which a program can observe and modify its own structure and behavior at runtime. Reflection is the process by which a program can perform introspection. This introspection usually involves the ability to observe and modify its

What is spaghetti code? [closed]

空扰寡人 提交于 2019-11-29 05:29:48
Can you post a short example of real, overdone spaghetti code, possibly saying what it does? Can you show me a little debugger's nightmare? I don't mean IOCCC code, that is science fiction. I mean real life examples that happened to you... Update The focus has changed from "post some spaghetti code" to "what is exactly spaghetti code?". From a historical perspective, the current choices seem to be: old Fortran code using computed gotos massively old Cobol code using the ALTER statement To me, a more modern example of spaghetti code is when you have 20 dlls and every DLL references each other

API vs Toolkit vs Framework vs Library

风格不统一 提交于 2019-11-29 03:59:19
My question is very simple, and I want a clear answer with a simple example. What's the main difference between API, Toolkit, Framework, and Library? This has always been my understanding, you will no doubt see differing opinions on the subject: API (Application Programming Interface) - Allows you to use code in an already functional application in a stand-alone fasion. Framework - Code that gives you base classes and interfaces for a certain task/application type, usually in the form of a design pattern. (Though not always) Library - Related code that can be swapped in and out at will to

Immutable and pass by value

ぐ巨炮叔叔 提交于 2019-11-29 03:04:38
问题 I have the following code which has a mutable Person class, String and a method to modify the instances of String and Person class Person{ int a = 8; public int getA() { return a; } public void setA(int a) { this.a = a; } @Override public String toString() { return "Person [a=" + a + "]"; } } -- public class TestMutable { public static void main(String[] args) { Person p = new Person(); p.setA(34); String s = "bar"; modifyObject(s, p); //Call to modify objects System.out.println(s); System

Why are Asynchronous processes not called Synchronous?

对着背影说爱祢 提交于 2019-11-29 02:28:23
问题 So I'm a little confused by this terminology. Everyone refers to "Asynchronous" computing as running different processes on seperate threads, which gives the illusion that these processes are running at the same time. This is not the definition of the word asynchronous. a⋅syn⋅chro⋅nous –adjective 1. not occurring at the same time. 2. (of a computer or other electrical machine) having each operation started only after the preceding operation is completed. What am I not understanding here? 回答1:

What is meant by framework, programming language and scripting language?

对着背影说爱祢 提交于 2019-11-29 02:28:20
问题 What is meant by framework, programming language and scripting language? 回答1: I think Daniel Pryden's points are excellent - I voted him up. I'd just like to add a couple of minor additions. Programming languages, like C and C++, used to have a compiling and linking step that rendered the source code into a machine-language form that was run by the operating system. Scripting languages, like the Unix Bourne, Korn, and C shell, were not compiled or linked like C and C++. (Thanks to Daniel

What's the difference between safe, regular and atomic registers?

ぃ、小莉子 提交于 2019-11-29 02:22:18
问题 Can anyone provide exhaustive explanation, please? I'm diving into concurrent programming and met those registers while trying to understand consensus. From Lamport's "On interprocess communication": ...a regular register is atomic if two successive reads that overlap the same write cannot obtain the new then the old value... . Assume, that first comes thread0.write(0) - with no overlapping. Basically, one can say using Lamports definition that thread1 can read first 1 and then 0 again, if

What is a multibyte character set?

≡放荡痞女 提交于 2019-11-29 02:14:44
问题 Does the term multibyte refer to a charset whose characters can - but don't have to be - wider than 1 byte, (e.g. UTF-8) or does it refer to character sets which are in any case wider than 1 byte (e.g. UTF-16) ? In other words: What is meant if anybody talks about multibyte character sets? 回答1: The term is ambiguous, but in my internationalization work, we typically avoided the term "multibyte character sets" to refer to Unicode-based encodings. Generally, we used the term only for legacy

What does SCM stand for? [closed]

寵の児 提交于 2019-11-29 01:46:40
问题 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 6 years ago . In the software world, it seems that SCM is an unfortunately overloaded acronym. It can mean:- Source Code Management Software Configuration Management Which one of these is the dominant term? Do they mean the same thing? To me Source Code Management is essentially synonymous