fbpx
Home Blog Page 876

What Is an Operating System?

0
What Is an Operating System?

The computer is one of the most important inventions of the 20th century. Everything seems to run on computers now. Even lightbulbs are smart. But the hardware we think of as the “computer” is nothing without an interface between computer users and the hardware, which is where the operating system comes in.

Ahead, we’ll explain what operating systems do and why they’re important. We’ll also learn about the different types of operating systems. (There are more than just Windows, Mac OSX, Linux, Android, and iOS.) Let’s get started.

Learn something new for free

Why is an operating system important?

An operating system makes software development much easier. Without one, a Software Developer would have to know a lot of details about the hardware that the software will run on and — and possibly have to create a different version of the software for each device.

Each application would have to include a custom user interface for creating windows and managing data. Instead of interacting with the operating system, the application would speak directly to the hardware with machine code (low-level code that handles disk storage, network calls, and other hardware interactions).

You’d need a different code for each Wi-Fi adaptor or disk drive. And if hardware got replaced on the computer, you’d likely have to update every application to account for the change.

Who wants to do all that? Operating systems make it so we don’t have to.

What does an operating system do?

Most operating systems are quite complex and handle a lot of jobs. Here are the most common things an operating system does:

Processor management

An operating system decides which processes use the CPU and how long they get to use them. This is called process scheduling. It uses a traffic controller to keep track of processes, allocates CPU cores to processes, and de-allocates the CPU when the processes are finished.

Memory management

An operating system also manages the memory of a computer or its RAM. It keeps track of the memory to determine how much is being used, allocates memory to a process if there is still RAM available, and frees up the RAM when the process is complete.

Device management

When an operating system is installed, it also comes with drivers to interact with the computer’s hardware. The operating system controls access to the hardware using these drivers with an I/O controller. When a process wants to use hardware like a Wi-Fi adaptor, the operating system allows it to access the device if it is available and handles the input and output between the process and the hardware.

File management

An operating system also comes with a file system that handles all the files and directories on the computer’s hard drives. It keeps track of location, information about creation and modification, and any other metadata related to the file. It defines the file directory structure of the operating system and maps this virtual structure to the physical location of the data on the computer. It also handles and controls access to the files.

Security

An operating system handles the accounts of users who access files and applications on the computer. It makes sure that users can only access files they have created or have been allowed access to from another user. Operating systems also handle the encryption of files for an extra layer of security.

Parts of an operating system

There are two key parts of operating systems — the kernel and the shell.

Kernel

The kernel is the program that is at the core of an operating system. It launches when the computer starts up and is always resident in the memory. The kernel controls all the hardware of the computer and handles interactions between the hardware and any installed software. The kernel handles most of the tasks of the operating system, including:

  • Memory management
  • Process management
  • Device management
  • Input-output management
  • System calls

Shell

The shell is the outer layer of the operating system. It handles the interactions between the user and the kernel.

The shell uses programming languages to control processes, files, and programs in the operating system. A user can interact with the shell using the command line. Applications that run on the computer interact with the operating system through the shell.

Types of operating systems

Although all operating systems have similar functions, quite a few different types are used for various kinds of hardware and use cases.

General-purpose operating systems

General-purpose operating systems are one of the most common types of operating systems. If you have a laptop or desktop computer, you are familiar with this type of system.

These are intended to run a large selection of applications on various hardware configurations and to be installed on all types of laptop and desktop computers. Some common general-purpose operating systems include:

  • Windows: Windows was first released in 1985 by Microsoft. It is now one of the most common operating systems for personal or business use and comes installed on many retail computers.
  • Mac OSX: Mac OSX is an operating system designed and used for Apple laptops and computers. It can’t be installed on a generic computer without a lot of extra work.
  • Unix: Unix was one of the first operating systems created in the 1970s. It is designed to be used by multiple users.
  • Linux: Linux is a free and open-source operating system based on Unix. It is efficient and lightweight and is the most common operating system used for web services.

Mobile operating systems

Mobile operating systems are similar to general-purpose operating systems in that they are designed to run on a variety of hardware. Although there have been many mobile operating systems, the two most common are Android, which is designed for phones built by various manufacturers, and iOS, which is specifically for models of the Apple iPhone.

Network operating systems

A network operating system is a special kind of OS created to assist in the communication between devices on a local area network or LAN. It provides the functionality needed to understand network protocols and network packets. This type of operating system is used in routers, switches, firewalls, and other networking devices.

Embedded operating systems

Embedded operating systems are used in specialized computers. Devices like ATMs, retail point-of-sale devices, and internet of things devices only do a limited amount of things but must do them accurately. An OS for a machine like these is stripped down to just the basics but is also designed to be resilient and handle errors gracefully so they can remain running in all conditions.

Real-time operating systems

Real-time operating systems are designed for computing devices that interact with the real world using sensors. A common use for them is in industrial control systems, where they react to signals from sensors in an industrial plant and send signals to valves, actuators, and other devices that control a manufacturing process.

Conclusion

Developers deal with operating systems day in and day out. Learning to code means learning how to work with the operating system instead of fighting it.

Our Build Basic Apps with Android course will teach you how to write optimal code for the Android operating system, and our Build iOS Apps with SwiftUI course will teach you how to write code that runs well on the iOS operating system.To write code for other operating systems, like Windows, Mac OSX, or Linux, you can choose a cross-platform programming language course from our course catalog. Popular ones include JavaScript, Python, and Java.

If You Could Change the Laws of Nature, What Would You Change?

0

Would you want to be able to time travel? To be in two places at once? To predict whether someone would laugh at your joke? Share your wildest ideas.

Children and a Year of War

0

On this anniversary of the war in Ukraine, what do you notice and wonder about the lives of young people there?

Word of the Day: ingratiating

0

This word has appeared in 13 articles on NYTimes.com in the past year. Can you use it in a sentence?

What Is CoffeeScript?

0
What Is CoffeeScript?

Between Java, JavaScript, and Mocha — there’s a surprising number of programming languages named after coffee. One language you may not have heard of before? CoffeeScript.

The first stable version of CoffeeScript was published by Jeremy Ashkenas in 2010. It started as a small side project that took off quickly. Even Brendan Eich, the creator of JavaScript, said CoffeeScript was a great idea that should serve as an example for the future of JavaScript. And it was.

Today, CoffeeScript isn’t as popular as it once was — but it did have a massive influence on JavaScript, TypeScript, and many of the front-end development processes we still use today.

Learn something new for free

Why was CoffeeScript created?

In 2010, when the first stable version of CoffeeScript was released, JavaScript development wasn’t the same thing as it is today. JavaScript was just JavaScript. There was no TypeScript, no ES6, and nothing that compiled from another language into JavaScript. There weren’t any front-end frameworks. Well, not until the same developer that created CoffeeScript also created Backbone in 2010. (There was jQuery, but that is not really a framework.)

To tell you the truth, JavaScript wasn’t taken seriously. It was mainly used for dynamic effects on a web page. Front-end developers made things pretty with CSS and added effects with JavaScript, usually using jQuery.

Jeremy Ashkenas thought the language had outstanding features and a lot to offer, and with a few changes, he could improve the language. He created CoffeeScript to bring the excellent features of JavaScript to the forefront and hide the more complex and confusing features by adding “syntactic sugar.” Syntactic sugar is syntax used in a programming language to make it easier to read and use. He also made CoffeeScript so it could be compiled into regular old JavaScript, which wasn’t a new concept, but CoffeeScript made it mainstream.

What was CoffeeScript used for?

CoffeeScript was used wherever JavaScript was used by developers and companies that preferred its syntax. When it started, it was mainly used for back-end development, and many of the articles you will find online will say that it is only for back-end development. That is not entirely true. Once developers set up a suitable workflow for compiling the code for the browser, it also worked well for front-end development.

One of the biggest companies that adopted CoffeeScript was Dropbox. They rewrote all of their front-end code using CoffeeScript in one week in 2012. They believed it fixed many of the problems with syntax in JavaScript. After all, Brendan Eich wrote the original version of the language in only ten days in 1995, and there had been few changes to the language up to that point. JavaScript was evolving too slowly, and CoffeeScript added many useful features.

The development team of the Atom text editor, a tool many developers use to write code, also adopted CoffeeScript, making it the official language of their codebase.

Is CoffeeScript dead?

CoffeeScript as a language is not dead. The latest version is 2.6.1 and was released in October 2021, so it is still being developed, and it is a great language to learn. It will teach you a lot about what you can do with a language that can compile to JavaScript, and build any project that you can in JavaScript with it. You may end up even liking its syntax and preferring it.

But the problem is that learning it won’t help you much in the job market, and you won’t find many developers who know or use the language. If you do find a job requiring knowledge of CoffeeScript, chances are you will work on legacy code or convert the CoffeeScript to either TypeScript or JavaScript.

Currently, you can find some jobs on LinkedIn that mention it, mainly at Dropbox. But even they are converting their CoffeeScript to TypeScript. The Atom team converted their codebase to ES6 JavaScript around the same time.

How JavaScript and TypeScript caught up

The first version of TypeScript was released in October 2012. This language was a superset of JavaScript that Microsoft developed. It changed little about JavaScript, only adding types. This meant JavaScript developers could learn TypeScript quickly and write less error-prone code.

Even Dropbox, one of the biggest proponents of CoffeeScript, saw the advantages of TypeScript. By the end of 2015, TypeScript started getting more attention than CoffeeScript.

Another thing happened in 2015, the ES6 version of JavaScript. While it didn’t adopt the unique syntax of CoffeeScript, it adopted many of the features that developers loved about the language. Over the years, JavaScript has adopted these following features from CoffeeScript:

  • True classes instead of unconventional prototype objects.
  • Arrow functions which made functions less verbose.
  • Using let to define variables.
  • Class inheritance.
  • The in comparison operator.
  • Declaring arrays over multiple lines.
  • String interpolation.

At the time, browsers executed JavaScript differently because JavaScript that worked in one browser didn’t work in another. And very few browsers supported its new ES6 version. But another thing that JavaScript developers learned from CoffeeScript was that you could compile another language to JavaScript.

The Babel JavaScript library was also released around the same time. Babel is a JavaScript compiler that made it possible to write code in the ES6 version and compile it to JavaScript that would be compatible with all browsers. And developers were already familiar with compiling JavaScript after using CoffeeScript and TypeScript. This was a game-changer.

These changes in the JavaScript ecosystem made CoffeeScript a thing of the past, and its adoption started decreasing.

How is CoffeeScript different from JavaScript?

When he developed CoffeeScript, Jeremy Ashkenas drew inspiration from Python, Ruby, and Haskell. The following are some of the current differences:

  • You can name a variable with only the equals sign and don’t have to use var, const, or let.
  • You don’t use semi-colons to end a line.
  • You don’t use curly braces to define code blocks. Instead, you use whitespace (tabs or spaces) like in Python.
  • You can use words instead of symbols for comparison:
    • isnt works for !==
    • is works for ===
    • not works for !
    • and works for &&

There are a few other differences, but over time, JavaScript absorbed many of the features that made CoffeeScript new and different.

What to learn instead of CoffeeScript

While it might be useful to learn CoffeeScript for your own projects, stick with JavaScript if you want to learn a language that is in demand. Our Learn JavaScript course will take you from beginner to JavaScript developer in no time, even if you know nothing about coding.What about TypeScript? It is worth learning, too, because it is in demand and adds the type feature to JavaScript, so you can write more structured code that is less prone to errors. Once you know JavaScript, TypeScript is easy to pick up, and our Learn TypeScript course will teach you what you need to know to be proficient in this language.

What Is Social Engineering?

0
What Is Social Engineering?

You know the scene: You’re waiting patiently in a long line, when someone cuts to the front loudly announcing, “Sorry, but we’re in a hurry!” It happens so fast, and their excuse for cutting the line sounds legit enough that no one calls out their obvious social faux pas. This scenario, though relatively minor, is actually an example of social engineering. 

Broadly speaking, social engineering can be defined as “any act that influences a person to take an action that may or may not be in their best interest.” In information technology, social engineering involves manipulating someone into revealing information (like a password) that could be used by a hacker to attack a network or system. Social engineering tactics are exploited by bad actors in the realm of cybersecurity

Ahead, we’re going to explore the motivations and techniques of some hacking social engineers. But to be extremely clear: We’re in no way condoning or endorsing these acts. Accessing data in a system without authorization is illegal. Being able to spot social engineering tactics is key in preventing them from happening in the future.

Learn something new for free

What do social engineers want?

In one word: access. A person may employ social engineering and a range of other tactics to gain access to a profile within a system they shouldn’t have the ability to access. The most relatable example is a hacker accessing your bank account and using your personal information to steal your money. They might also wish to access entirely private systems like those in hospitals, factories, and warehouses. Their motivations are endless, but hacking has been typically classified into three categories:

  • Black hat – access systems without permission and with malicious intent
  • White hat – access systems with permission to help reveal security vulnerabilities and/or find flaws in engineering
  • Grey hat – access systems without permission, but without the same malicious intent as black hats. Often reveal vulnerabilities, ask for a reward “bug bounty,” seek skill, or crave notoriety.

Any of these kinds of hackers may engage in social engineering to gain the access they are seeking, and access to your profile may not be the ultimate goal. For example, a black hat hacker using social engineering may compromise an email address. Once the email is compromised, they can use it to correspond with other users who may trust that email address and engage with compromised content they’d otherwise never visit. One of those users could have valuable data readily available to be discovered and exploited, and thus an actor with genuinely malicious intent has a vulnerable target and a trustworthy means of communication. Let’s explore some fixed action patterns and how a motivated social engineer can exploit them.

Liking

One of the most powerful tools for social engineers is simply acting polite. Getting people to like you is one of the best skills regardless of your trade.  The absolute best tool for learning this skill, in my opinion, is the book “How to Win Friends and Influence People” by Dale Carnegie. Originally published in 1936 and revised in 1981, it has had a huge effect on people and their careers for nearly a century. This book is highly regarded by sales professionals and executives across all industries for offering a clear-cut explanation of how to engage in positive fixed action patterns with peers. The entire book is endlessly quotable and memorable, but I’d like to just summarize to review just the very first of the six major sections, “Fundamental Techniques in Handling People”:

  1. Don’t criticize, condemn, or complain.
  2. Give honest and sincere appreciation.
  3. Arouse in the other person an eager want.

To establish this sort of rapport over the internet is to have someone completely at your disposal, and the only requirement is being kind. Imagine the havoc that could be wrought with these sorts of communications coming from a compromised email address. A particularly offensive form of this type of social engineering comes in the form of online romance scams — a problem so serious the FBI has a page dedicated to it. Telling someone you like them and getting them to like you back has, regrettably, been weaponized.

Quid pro quo

This phrase is Latin for “something for something.” Quid pro quo is a cornerstone of any meaningful relationship. Essentially, it is the reciprocity between two or more that has been scientifically proven to enhance generosity among the group. But giving and taking is about earning trust. “A bartering arrangement between two parties is an example of a quid pro quo business agreement where one exchanges something for something else of similar value.” The social engineer will seek to establish this quid pro quo relationship without giving up anything of value. They’ll sometimes intentionally use what magicians call a “time delay” to prevent the perception of a bribe or “coming on too strong.”

There are a lot of real-life use cases, but let’s imagine a black hat hacker wants access to some system. They are good with computers, or they wouldn’t be a hacker, so they gather some phone numbers of businesses and start calling those businesses offering to help with their computer – whether those businesses asked for the help or not. It may take 100,000 phone calls or more, but eventually, someone replies that they indeed need help with their computer. No problem for the hacker! They just need the username and password to get started. The “something for something” in this scenario is the help with your computer in exchange for the username and password. Once the social engineer has legitimate access, it’s potentially game over for the business owner.

Baiting

Baiting is similar to natural game and wildlife hunting because some reward is offered to unsuspecting prey. Some of us are old enough to remember the scourge that was pop-ups, and if you don’t, consider yourself lucky. Legitimate and malicious pop-ups alike were so prevalent many machines were rendered unusable in the late 1990s and early 2000s. They’re still around, but the problem today is much better thanks to W3C convention implementations and the evolution of pop-up blocking software.

After the relative abolishment of pop-ups, baiting has largely moved to email. We’ve all experienced the highly suspicious email with the “too good to be true” offer. A more nefarious form of this attack might include “spoofing” — or impersonating an authentic source — like asking for a user to log in but redirecting them to a site that isn’t the intended one. For example, a person could receive an email from “[email protected]” with the title “Your account has been compromised,” and everything in the body appears completely authentic, original, and from Microsoft. The email instructs the reader to click a link to refresh their credentials which takes them to “https://www.microsott.com/account.” You could have paid very close attention to that email, and spoofing has been widely available for a long time to create that legitimate-looking source email address, but the destination URL definitely isn’t Microsoft. Sadly, it’s people with diminished eyesight and unfamiliarity with technology, like the elderly, who often fall for this type of social engineering scam.

Authority

No one wants to get yelled at by their boss! Or, even worse, be the person that inspired a slow, simmering rage within an executive in your organization. This is an extremely powerful fixed action pattern people on the job are particularly susceptible to. Look no further than the infamous Milgram experiment in which test subjects applied what they believed to be larger and more painful electrical jolts to an unwilling victim at the direction of the experiment moderator — the so-called “authority figure” in the room. The same power of persuasion can be manipulated by a motivated individual wishing to engage in social engineering, and they don’t always require the anonymity afforded by the internet.

In this example, a motivated individual could use compromised credentials or the “spoofing” technique discussed above to send some message from a position of authority. They may engage the target using any skills we have discussed or others. For example, by “liking” they could compliment the subordinates’ efforts, use a “time delay” to build trust, potentially offer some reward like “baiting,” and then the target would be fully compromised. Contrarily, the motivated actor posing as an authority might wish to be as quick, direct, and authoritative as possible while relaying commands with negative outcomes as a reprisal. Both techniques ultimately conclude with the acquisition of the access the motivated actor desired as it takes an exceptionally strong-willed person, or some great evidence, to stand up to a supervisor on the job.

Social engineering wrapped up 

It might be easy to feel like everyone on the internet is out to get you or your Facebook friends might be spies, but that is almost certainly not true. The internet is all about large numbers of people, huge collections of data, and scale. Truly, the FAANG companies just won’t do it if it doesn’t scale. The most sophisticated hackers have a similar approach to their target gathering techniques meaning they cast extensive nets to trap the most vulnerable victims. Hence, the reason why we all experience pop-ups and scam emails is because they are scalable solutions that can be broadcast to hundreds of thousands of users at once. Returning to our ‘quid pro quo’ example with the hacker making 100,000 phone calls — remember it only takes one yes and the entire system is compromised.

The first step to preventing yourself from becoming a victim of social engineering is by removing yourself as a potential target. Don’t reveal so much information about your life, family, career, and friendships online so that a hacker might feel empowered to try and use social engineering against you. Another step is to immediately discontinue communication with anyone you even slightly suspect of not being who they say that they are. Do not waste time by sharing your suspicions with them because they probably have a likely explanation if they’re good at social engineering.

Finally, the most convenient and effective tool we currently have at our disposal to thwart great social engineers is two-factor authentication. Like a PIN to your debit card, this feature can be the last and most critical defense of your access to online platforms, and there’s no valid use case in which it is recommended to share it across devices. You’ll have much less to worry about by making smart decisions online, being discerning in your communications, and enabling two-factor authentication. Interested in a career in cybersecurity? Don’t wait! Start here today.

Use these 15 Django Interview Questions to Prepare for Your Next Technical Interview

0
Use these 15 Django Interview Questions to Prepare for Your Next Technical Interview

If you’re looking for career opportunities in web development, learning Django is one way to get your foot in the door. Not only is it a powerful tool for developing scalable web applications, but it’s also a skill hiring managers look for when filling open roles on their web development teams. But before you land your next dream role, you’ll need to get through the interview process.

When it comes to getting ready for the technical interview, any amount of time you spend going over potential questions you might be asked, the better prepared you’ll be. You can do this in a few different ways. You can do a mock interview and have a friend or family member ask you questions in a similar setup to how your real interview will be (for example, if you’ll be interviewing over Zoom, set up your mock interview over Zoom too), or you can practice answering questions out loud on your own. Writing out your answers to typical interview questions can also be good practice if you want to give that a try. 

To help you prepare to answer Django interview questions, here are 15 practice questions and tips on how to answer them.

Learn something new for free

1. What is Django?

To kick off an interview, it’s common for the interviewee to ask a couple ice-breaker questions to help you calm your nerves a bit before the harder questions are asked. These questions can usually be answered quickly, and they’re considered “easy” questions. 

In your answer to this ice-breaker question, you can mention that Django is an open-source web framework used for creating Python-based web applications. It was first publicly released in 2005 and named after Django Reinhardt, an influential 20th-century jazz guitarist.

Django is behind some of the most popular websites and web applications in the world, including Mozilla, Instagram, Bitbucket, and Nextdoor. However, since Django remains open-source, no single company fully controls how Django is developed. Instead, Django is maintained by the non-profit Django Software Foundation.

2. What are the big differences between Django and Flask?

Both Django and Flask are Python frameworks that help developers create web applications, but that’s about where the similarities end.

Django is a full-stack framework that adopts the “batteries-included” approach. It comes with everything you need to quickly develop a web application, including administration management, security features, and support for a variety of web content. Django is the preferred framework for large, complex projects that require high functionality and special features.

Flask, on the other hand, is a lightweight option. There are fewer features compared to Django, but that makes it easier for developers to get a small-scale web application up and running quickly. Since Flask is unopinionated, it’s up to the developer to make a lot of the decisions on how the application should run and what it should look like. Flask is the better framework for small-scale web application projects that don’t need the full feature set provided by Django.

Check out our in-depth article to learn more about Django vs. Flask and when to use each framework.

3. What are some of the major features of Django?

When answering this question you could weave in details from projects you’ve worked on in the past where you’ve incorporated these features. This is a great way to bring up some of your past work that you’re proud of, and if you have a project that’s related to one the company is currently working on — that’s even better. Some of the main features of Django you could consider discussing are templating, admin interface, object-relational mapping (ORM), testing framework, form handling, and session management and role-based permissions.

4. What are the biggest advantages of Django?

Django is one of the most popular web development frameworks today, and that’s because it offers developers and companies so many advantages. You could talk about Django’s “batteries-included” approach that provides everything you need to develop a full web application in your answer to this question. You could also mention how Django is written in Python, which is a flexible and widely used programming language, and how it’s compatible with major operating systems and most databases. Another advantage you can discuss is Django’s security features and administrative tools, as well as its extensive documentation and support community.

5. Is Django opinionated?

Developers tend to describe web frameworks as either “opinionated” or “unopinionated.” Opinionated frameworks are designed so that it’s easy to solve a specific problem but are less flexible at solving other problems. Unopinionated frameworks offer a lot more flexibility but offer fewer built-in tools.

Django is considered to be “somewhat opinionated.” In other words, Django comes with a set of components and tools to handle most web development tasks. But developers can often choose between multiple options in Django or add in support for their own preferred tools.

6. What files are created when you start a Django project?

When you initiate a Django project, the following files are created:

  • manage.py: a module that provides commands for editing and interacting with the project
  • _init_.py: an empty file indicating that the current directory contains a Python project
  • settings.py: the current project settings
  • urls.py: the project URLs
  • wsgi.py: the entry point for web servers to connect to and interact with the Django project

7. How does the Django architecture work?

Django follows the Model View Template (MVT) architecture pattern. It consists of models that describe your data structure and database scheme, views that retrieve data from the models, perform calculations on the data, and control what people can see, and templates that control how data is presented to someone, including which views to display and how to format them.

8. What is a Django model?

Django models are Python classes that describe the project data, each attribute in a Django model corresponds to a specific field in the database. These models are abstractions — in other words, they automatically perform a lot of the tedious, complex tasks required to execute a single operation. For example, if you want to populate your model with the information contained in a database, Django will automatically perform all the SQL queries that are needed.

9. What is a Django view?

A Django view function is a special type of Python function that accepts a web request as input and outputs a particular web response. It takes what’s in the Django template file — usually from HTML, CSS, or javascript — and renders a web page.

Examples of Django view responses include HTML web page contents, an image, an XML document, or a redirect — essentially, anything that a web browser can render.

10. What’s in a Django template?

A Django template is a text file and can create any text-based format such as XML, HTML, and CSV. When the template is evaluated in Django, variables in the template are replaced with values, while tags control the logic flow of the template.

11. What’s the difference between a Django project and a Django app?

A Django app is a single web application that was created for a specific purpose, such as storing employee records or processing payments. A Django project is a collection of apps that in combination provide a full range of services and functions of a website(e.g. being able to both store employee records and process payments). 

Don’t hesitate to use examples from your past work in your answer to this question. This is a great way to bring up your work while also answering the question.

12. What kinds of databases does Django support?

Django officially supports MySQL, PostgreSQL, MariaDB, Oracle, and SQLite.

NoSQL functionality is also available through third-party packages such as MongoDB partnered with PyMongo.

13. What are the inheritance styles in Django?

There are three types of possible inheritance styles in Django. The abstract base class is for referring to the parent class for information or fields to be used in the child class. The multi-table inheritance is used when you’re sub-classing an existing model and want a separate database table for each model. Lastly, proxy models are for when you only want to change how the model behaves in Python without changing the model fields.

14. How do you set up a static file in Django?

To set up static files in Django, generally, the following steps are required to set up the project:

  1. Confirm that django.contrib.staticfiles is included within the installed apps
  2. A static URL must be defined in the settings file
  3. Within the project templates, template tags are used to create the relative paths for each file
  4. All the relevant static files should be added to the project in a folder labeled ‘static’

Additionally, to deploy static files in production, there are several steps required that varies relative to the infrastructure used to serve the project.

15. How can you protect other people from editing objects in Django?

Django includes a ModelAdmin class, which provides customization hooks that you can use to control whether and how other people view or edit admin objects. To change permissions, use the get_queryset() and has_change_permission() methods.

More Django interview prep

Looking for a refresher on any of these topics? You can get a comprehensive review of Django in our course Build Python Web Apps with Django. This course covers templates, data, views, forms, accounts and authentication, and deploying in Django. Also, check out our courses on Python if you’re looking to review the basics or take your coding skills up a notch.

For more interview advice, check out our guide to acing the technical interview, as well as our tips on answering behavioral interview questions. If you’re asked to do a whiteboard interview at some point during the hiring process, here are tips to help you do your best during the whiteboard interview

Before interview day, it’s also a good idea to go through your technical portfolio one last time so you can remind yourself of any details you want to bring up during your interview. Get more interview and job-hunting tips at our Career Center.And if you’re looking for ways to learn new skills or expand on your existing ones, check out our course catalog.

How Much Do You Know About Italy?

0
How Much Do You Know About Italy?

Can you find Italy on a map? What else do you know about this European nation with 59 million people?

GUEST POST: Memorable Feedback: Lessons from Cognitive Psychology in Encoding

0
GUEST POST: Memorable Feedback: Lessons from Cognitive Psychology in Encoding

1. Atkinson, R. C., & Shiffrin, R. M. (1968). Chapter: Human memory: A proposed system and its control processes. In Spence, K. W., & Spence, J. T. The psychology of learning and motivation (Volume 2). New York: Academic Press. pp. 89–195.

2. Craik, F. I. M., & Lockhart, R. S. (1972). Levels of processing: A framework for memory research. Journal of Verbal Learning and Verbal Behavior, 11(6), 671–684. https://doi.org/10.1016/s0022-5371(72)80001-x

3. Sweller, J. (1988). Cognitive Load During Problem Solving: Effects on Learning. Cognitive Science. 12 (2): 257–285. 

4. Demb, J., Desmond, J., Wagner, A., Vaidya, C., Glover, G., & Gabrieli, J. (1995). Semantic encoding and retrieval in the left inferior prefrontal cortex: a functional MRI study of task difficulty and process specificity. The Journal of Neuroscience, 15(9), 5870–5878. https://doi.org/10.1523/jneurosci.15-09-05870.1995

5. Shute, V. J. (2008). Focus on Formative Feedback. Review of Educational Research, 78(1), 153–189. https://doi.org/10.3102/0034654307313795

6. Brookhart, S. M. (2017). How to give effective feedback to your students. ASCD.

7. Wiliam, D., & Leahy, S. (2015). Embedding formative assessment: practical techniques for K-12 classrooms. Learning Sciences International.