20
Absorb Knowledge in 30 Seconds | Brain Bytes #2
A domain-specific language is a computer language specialized to a particular application domain. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains.
For example, HTML is a DSL for web pages.
The more lines found in a method, the harder it’s to figure out what the method does.
Move this code to a separate new function and replace the old code with a call to the method.
void printOwing() {
printBanner();
// Print details.
System.out.println("name: " + name);
System.out.println("amount: " + getOutstanding());
}
becomes
void printOwing() {
printBanner();
printDetails(getOutstanding());
}
void printDetails(double outstanding) {
System.out.println("name: " + name);
System.out.println("amount: " + outstanding);
}
Web accessibility is the inclusive practice of ensuring there are no barriers that prevent interaction with, or access to, websites on the World Wide Web by people with physical disabilities, situational disabilities, and socio-economic restrictions on bandwidth and speed.
When sites are correctly designed, developed and edited, generally all users have equal access to information and functionality.
In object-oriented programming, the open–closed principle states "software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification". That is, such an entity can allow its behaviour to be extended without modifying its source code.
In practice: write your code so that you will be able to add new functionality without changing the existing code and preventing situations in which a change to one of your classes also requires you to adapt all depending classes.
Oauth is an authorization protocol. OAuth doesn’t share your password but instead uses authorization tokens to prove an identity between consumers and service providers. For example, you can share some of your Google account information with a third-party provider without giving it your password data.
OAuth is a popular solution for both websites and users because it's more secure than sharing credentials and allows users to utilize services across multiple platforms.
XSS attacks are a type of attack where a malicious script (e.g. Javascript) is injected into a website.
Flaws that allow these attacks to succeed are quite widespread and occur anywhere a web application uses input from a user without validating it.
Remember to always validate your user's input.
Come now and share your knowledge!
Thanks for reading 🙏 ❤️
20