Viva prep · Real questions · Student experiences Enroll in Bootcamp

Proctor workspace

Proctor Level3_41

Share your experience Add your viva experience here
10 Questions
3 Sets
0 Topics
0 Reviews

Student reviews

No student reviews for this proctor yet.

Approved viva sets

Download all
  1. 1
    What are vue lifecycles and which all you used?
    Times asked 4
  2. 2
    If you want to change the database from sqlite to any other, what all changes should be made in the code?
    Times asked 2
  1. 1
    What are vue lifecycles and which all you used?
    Times asked 4
    Official solution

    SimpleLifecycle = component ki zindagi ke stages. API call tab jab DOM ready ho — mounted.

    created: instance bani, this data, DOM nahi. mounted/onMounted: page pe aa gaya — fetch, Chart.js, setInterval.
    updated: data change ke baad. unmounted: cleanup (clearInterval) warna memory leak.

    Dashboards onMounted isliye: canvas/API tab valid. created mein $el nahi.

    Composition: onMounted(() => {}) setup ke andar.

    Example

    export default {
      async mounted() {
        const r = await fetch('/api/venues')
        this.venues = await r.json()
      }
    }

    Project example: Venues.vue mounted fetch list. Clock component unmounted pe interval clear.

    Viva tipcreated: data setup, DOM nahi. mounted/onMounted: $el mil gaya — fetch yahi. Dashboards isliye onMounted use karti hain.

  2. 2
    Explain how 'watch' works in vue and where you used it.
    Times asked 1
    Official solution

    SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.

    Viva tipFunction signature + 3-4 important lines + edge case.

  3. 3
    If you want to change the database from sqlite to any other, what all changes should be made in the code?
    Times asked 2
    Official solution

    SimpleSQLite file-based DB — setup easy, MAD1 ke liye perfect. Production heavy traffic pe Postgres better.

    Example

    SQLALCHEMY_DATABASE_URI = 'sqlite:///app.db'
  4. 4
    What is the need of virtual environment?
    Times asked 3
    Official solution

    SimpleVirtualenv isolated Python env — project deps system Python ko nahi bigaadte.

    Example

    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
  1. 1
    What are Vue lifecycle hooks, and which ones did you use?
    Times asked 1
    Official solution

    SimpleLifecycle = component ki zindagi ke stages. API call tab jab DOM ready ho — mounted.

    created: instance bani, this data, DOM nahi. mounted/onMounted: page pe aa gaya — fetch, Chart.js, setInterval.
    updated: data change ke baad. unmounted: cleanup (clearInterval) warna memory leak.

    Dashboards onMounted isliye: canvas/API tab valid. created mein $el nahi.

    Composition: onMounted(() => {}) setup ke andar.

    Example

    export default {
      async mounted() {
        const r = await fetch('/api/venues')
        this.venues = await r.json()
      }
    }

    Project example: Venues.vue mounted fetch list. Clock component unmounted pe interval clear.

    Viva tipcreated: data setup, DOM nahi. mounted/onMounted: $el mil gaya — fetch yahi. Dashboards isliye onMounted use karti hain.

  2. 2
    Explain how watch works in Vue and where you used it.
    Times asked 1
    Official solution

    Simplewatch = 'jab yeh badle tab yeh karo'. Computed nahi, kyunki return value nahi, kaam hai.

    deep: true objects. immediate: true first run. Composition watch().

    Search, $route.params.id load user.

    Component = reusable UI block (Navbar, Card). Props parent→child data, emit child→parent event. Slots parent HTML inner content.

    computed cache + reactive derive (filtered list). watch side-effect (query change pe API). methods events. ref() primitive, reactive() object. Vuex/Pinia global store; localStorage persist, store nahi.

    SFC: template + script + style ek .vue file. Parent-child exam favourite: list parent, row child :item + @delete.

    Example

    watch(() => route.params.id, (id) => loadUser(id))

    Project example: watch query debounce 300ms search API. Nahi use to 'computed kaafi'.

  3. 3
    If you want to change the database from SQLite to another database (e.g., MySQL/PostgreSQL), what changes would you make in the code?
    Times asked 1
    Official solution

    SimpleURI badlo, types BOOLEAN, migrations, dump/load. Models almost same.

    SQLite to Postgres. Production gunicorn+hosted Redis.

    ORM objects ko tables se map karta hai — raw SQL kam. SQLAlchemy MAD2 default.

    class User(db.Model) + Column + relationship. query.filter_by / db.session.get. Fayda: portable SQLite→Postgres, injection se safer. Nuksaan: N+1, complex SQL.

    SQLite file, zero server — course friendly. Postgres scale. Relationships: FK, backref, lazy/joinedload, cascade on delete. Constraints unique/not null integrity.

    Bookings source of truth DB, Redis cache copy.

    Example

    SQLALCHEMY_DATABASE_URI = 'postgresql://user:pass@localhost/mad2'

    Project example: SQLALCHEMY_DATABASE_URI postgresql://...

    Viva tipProduction: Postgres + gunicorn + Redis hosted. SQLite file locking 10k users pe nahi.

  4. 4
    What is the need for a virtual environment?
    Times asked 1
    Official solution

    Simplevenv isolated Python packages. system Python safe. requirements.txt freeze.

    Need virtual environment. Node not inside it.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: .venv pip install -r.

Maintaine By Lazy IITians Team + IITM BS students Regualr for More data you have