• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/29

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

29 Cards in this Set

  • Front
  • Back

What's the difference between Float, Double, and Decimal?

Precision, mainly.

Float: 32 bits
Double: 64 bits
Decimal: 128 bits

Decimal is up to 20x slower in tests, but used for financial mathematical operations because of its greater precision and therefore higher degree of accuracy.

Decimals also allow trailing zeros, where Float and Double cut them off.

S in SOLID

Single Responsibility

O in SOLID

Open/Closed Principle

L in SOLID

Liskov Substitution Principle

I in SOLID

Interface Segregation

D in SOLID

Dependency Inversion

How do you force a typed number to be float, double, or decimal?

The added character trailing the number:




float: 10.02F


double: 10.02D


decimal: 10.02M

What's the difference between a CLUSTERED and NONCLUSTERED index?

A CLUSTERED index forces the table rows to be physically stored on disk in a particular order. As a result, there can only be one clustered index per table. This will affect write times to the table because the data must be arranged properly according to the index. It can increase the speed of a specific read strategy.




A NONCLUSTERED index is one with pointers to the actual table data. As a result, it does not care how the data is physically stored. This makes it possible to have multiple nonclustered indexes per table.

What is Dynamic Typing?

The engine figures out the data types of variables during execution, such as JavaScript.




var age = 5;


var pi = 3.14;

What is Static Typing?

The compiler is told ahead of time in code, the data to be expected for each variable, such as C#, Java, C++, etc.




int age = 5;


double pi = 3.14;

What are Primitive Types?

Variables whose types represent a single value, that is, not an object.




examples:




5


3.14


"This is a primitive type in JavaScript"

What are the Primitive Types in JavaScript?

undefined


null


boolean


string


number


symbol (es6)

What is Infix Notation?

Operators are placed between two parameters (most human readable).




3 + 4

What is Prefix Notation?

Operators are placed before two parameters.




+ 3 4

What is Postfix Notation?

Operators are placed after two parameters.




3 4 +

What Associativity is the = operator?




(JavaScript, C#, Java)

Right-to-left.

var b = 5;


var c = 6;




b = c;




(b equals 6)

What Associativity is the * operator?




(JavaScript, C#, Java)

Left-to-right.




(3+1) * (3-2)

3+1 will get calculated first, and then 3-2. Then, they will be multiplied together.

What is Coercion?

Converting a value from one type to another.

JavaScript examples:
-----------------------
var a = 1 + '2';
console.log(a);

output: 12 (1 was coerced to '1').
-----------------------


1 == "1"



output: true (1 was coerced to "1")
-----------------------
console.log(3 < 2 < 1);

output: true (< is Left-to-Right precedence, 3 < 2 is false, then false < 1 is true, because false is coerced to 0).

What is NaN in JavaScript?

Not-A-Number




kind of a primitive type, it results in an unsuccessful coercion operation.

In JavaScript, what's the difference between the operators == and ===?

== is the Equality operator. It will coerce the values on either side of it if needed before comparing.


=== is the Strict Equality operator. It does not try to coerce the values on each side of it. Strictly checks equality of the same type.

How do you set a default value for a variable in JavaScript (prior to ecma6)?

function greet(name) {


name = name || "Bob";

console.log(name);


}

This works because || returns true/false, yes, but it will return the value itself that equates to true, not just true/false.

What is Computed Member Access in JavaScript?

var person = new Object();



person["firstname"] = "David";



(The [ and ] on an object, accessing the referenced value)

What is the Member Access operator in JavaScript?

The dot after an object:



person.firstname;



The dot is a built in operator that accesses properties/functions on an object.

Object Literal in JavaScript

A shorthand version of new Object() denoted by {}.



var person = {};

First Class Functions (JavaScript)

Everything you can do with other types, you can also do with functions.



i.e. assign them to variables, pass them around, create them on the fly.

What does mutable mean?

Can be changed:




var a = 5;




a = 4;

What does immutable mean?

Cannot be changed:




public const int age = 5;




age = 4; <--- not allowed, constant

What is Aspect-Oriented Programming (AOP)?

A programming paradigm that aims to increase modularity by allowing the separation of crosscutting concerns.

What is an example of a crosscutting concern?

Logging, for example. It does not apply to a particular layer, it applies to the whole application.