Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Preface

💼
جاب‌نامه

فهرست

دیباچه

اینجا قصد دارم تجربیاتی که چند سال اخیر از مصاحبه‌ها با شرکت‌های ایرانی داشتم رو منتشر کنم. اولش خیلی به نظرم مسخره و پوینت‌لِس می‌اومد تا این که دیدم همه ما تجربیاتی تو زندگی داریم که پس از پشت سر گذاشتن اون‌ها یا فراموش‌شون می‌کنیم یا اون‌قدر جدی نمی‌گیریم تا بتونیم ازشون استفاده کنیم یا گاهی اصلا امکان فرصت تجربه دوباره‌ش نیست و شاید اگه با بقیه در میون بذاریم، فقط به اونا می‌تونیم کمک کنیم و یا همین که آنچه که بر تو گذشته رو می‌نگاری، به تنهایی کافی‌ست! از روزگاران بسیار دور تا به امروز، این متن بوده که ماندگار بوده و به مثابه زندانی‌ای که هر روز در انفرادی به سر می‌بره‌ و هیچ امیدی نداره و سعی می‌کنه روزهاش رو بیاره رو کاغذ و سال‌ها بعد ازش فیلم و سریال می‌سازند و یادش می‌کنند، گاهی راه چاره قلمه. مخلص کلام؛ نوشتن تجربیات خوب است.
می‌نویسم پس هستم!

سعی کردم تا حد ممکن به شکل دقیق، موشکافانه و به دور از غرض‌ورزی و سوگیری، به همراه جزئیات، در مورد مصاحبه‌‌هایی که داشتم، فارغ از این که چه شرکتیه و چی کار می‌کنه، فقط نسبت به همون اتفاقاتی که بین من و اون‌ها رخ داده، قضاوت کنم و نظر بدم. از طرفی، دیدم که پلتفرم قوی و درست و حسابی‌ای که مرجع باشه یا حتی مفید باشه و دیتای به‌روز داشته باشه، نگاهی منطقی و به دور از احساسات داشته باشه و دید صفر و یکی نداشته باشه، عملا وجود نداره. اشتراک تجربه در سوشال‌مدیاها نیز به شکل پراکنده و پخش و پلاست و باز هم چیزی که می‌خواستم رو برآورده نمی‌کرد. مدت‌ها، قبل این که سرمو رو بالش بذارم، این کرم تو سرم بود تا این که سایت خودمو بالا آوردم و «جاب‌نامه» به وجود اومد. امیدوارم مفید واقع بشه.

شرکت‌ها

شرکت‌هایی که در سال ۱۴۰۵ باهاشون مصاحبه داشتم (داغ داغ):

شرکت‌هایی که در سال ۱۴۰۴ باهاشون مصاحبه داشتم:

شرکت‌هایی که در سال ۱۴۰۳ باهاشون مصاحبه داشتم:

شرکت‌هایی که در سال ۱۴۰۲ باهاشون مصاحبه داشتم:

شرکت‌هایی که قبل از ۱۴۰۲ باهاشون مصاحبه داشتم:

مصاحبه‌ها بر اساس ترتیب زمانی از جدید به قدیم مرتب شده‌اند.

مصاحبه‌های دیگران:

Referral

ریفر، میفر، مایکروفر

referral_meme

نمی‌دونم شما چی بهش می‌گی؟ ریفر، کانکشن، رابطه، آشنا، باند یا پارتی. هر چی که هست، خوب یا بد، بخوای یا نخوای، همین است و بس! بقیه‌ش نویزه. حالا یعنی چی؟ شما دنبال کاری و خب می‌ری از یه جا به شرکتایی که نیازمندیاش بهت می‌خوره، اپلای می‌کنی که خب باید منتظر باشی.

راه درستش اینه که چهارتا آدم پیدا کنی که تو رو معرفی کنن به شرکتاشون. حالا این آدما می‌تونن دوست، رفیق، زید، پارتنر، یار، دوست‌دختر/پسر، زن، شوهر، همسر، نامزد، دوست معمولی، دوست اجتماعی، دوست غیرمعمولی، دوستی بامزایا، دوستی بدون‌مزایا، دوست با چاشنی سبزیجات دریایی، فامیل، آشنا و هر کی می‌خوان، باشن، مهم نیست (بدیهیه اگه اون آدم پوزیشن کلفت‌تری داشته باشه، شانس آفر بالا می‌ره). فقط مهم اینه که داشته باشی‌شون چرا که به طور کلی، یافتن و انتخاب نیرو برای یک پوزیشن، سخته. زمان‌بر و همچنین، هزینه‌بره.

فرض کنید شما حدودا ۲۰‌‌تا مصاحبه می‌رید و بالاخره طبق اصل لانه کبوتری، حداقل یه جا اوکی می‌شه. ولی از دید شرکت و اون تک‌لیدی که برای تیمش دو تا نیرو با پوزیشن‌های متفاوت نیاز داره نگاه کنید. مثلا یه بک‌اند و یه فرانت‌اند. اون باید برای هر پوزیشن ۲۰‌تا مصاحبه بره رو هم می‌شه ۴۰تا! تازه این برای دو تا نیروئه. تعداد بیشتر بشه همینجوری کار سخت‌تر می‌شه. پس پیدا کردن نیرو برای یک شرکت، از کسی که دنبال کاره، سخت‌تره. حالا این که سنجش، عادلانه و درست صورت می‌گیره رو کاری نداریم که همه اینا جزو سختیای کاره. پس راه‌حل شرکت چیه؟ این که چند نفر از کارکنان خودش معرفی بشه مثلا n نفر. دیگه می‌ره با همونا مصاحبه می‌کنه و از خداشه همونا اوکی شن چون هم این که یکی از همکارا اونارو می‌شناسه بیشتر می‌تونه کمک کنه به راه افتادنش، هم این که چون با اون آدم در ارتباطه، در یک دایره اجتماعی قرار می‌گیرن، پس، اوکیه. البته نقدهایی بهش وارده ولی خب بیاین فعلا بگذریم ازش. پس بیشتر از این که مهارت و دانش رو افزایش بدیم، اگه ارتباطات‌مون رو بیشتر کنیم، برنده‌ایم. دانش و مسائل پیرامونش خواه ناخواه باگذشت زمان میاد.

فرای ریفر، دیده شدن و visibility مسئله مهمی‌ست. توانایی‌های ما باید دیده بشه. ما تا یه غذایی رو نخوریم، نمی‌تونیم طعمش رو بچشیم. آدما تا چیزی از ما نبینن، نمی‌تونن بفهمن که دانش‌مون چجوریه. پس «ارائه کردن»، واجبه و خوب ارائه کردن، هنره. اگه یه غذا دیزاین خوبی داشته باشه، احتمال می‌دیم طعمشم خوب باشه یا شانس این که تستش کنیم رو بالا می‌بره حتی اگه نخوریم! آدما حوصله کندوکاو و گشت و گذار تو محتوا و پروژه‌هامونو ندارن به ویژه در دنیای امروز که متن بیشتر از یه پاراگراف، خارج از حوصله‌ست. هنر اونجاست که به صورت ساندویچی توانایی‌هاتو به خورد مخاطب بدی و جذبش کنی، کسی درگیر جزئیات نمی‌شه خیلی (این حرف در گوشی بود). حالا روش‌ها بسیاره. می‌شه از گیتهاب، لینکدین، یوتوب، کانال تلگرام، بلاگ و خیلی چیزای دیگه در این راستا استفاده کرد.

visibility image

Red flags

پرچم‌های خونی🚩

blood photo
  • احترام و شعور خط قرمزه و فقط یه بار می‌تونن ردش کنن. توهین به رزومه، چهره، جنسیت، قومیت، باورها و اعتقادات، نگاه بالا به پایین و... در هر زمینه‌ای.

  • شرکتی که سفته می‌خواد از بیخ کنسله. یعنی از همون اول که شما می‌ری deal کنی، طرف مقابل با شمشیر نشسته. پس باید تو محیط جنگی کار کنی!

  • شرکتی که از اولین مصاحبه‌ای که می‌خواد انجام بده، اصرار به حضوری بودن جلسه داره. آدما کار دارن، زندگی دارن، ممکنه یکی شهر دیگه‌ای باشه، یا محل زندگی‌ش با شرکت، فاصله زیادی داشته باشه و باید کلی هزینه و زمان بذاره بیاد مصاحبه‌ای که نه به داره و نه به باره.

  • شرکتی که مدت طولانی برای یک پوزیشن در سایت‌های کاریابی آگهی داره، ندای یک جای تاکسیک رو می‌ده. یا انقد شرایطش بده که کسی حاضر نمی‌شه اونجا کار کنه یا هی آدما از اونجا میان بیرون و دوام نمیارن یا انقد بی‌عرضه‌ست که نمی‌تونه یه نیرو پیدا کنه.

  • شرکتی که از چیزی جز ایمیل و لینکدین برای ارتباط استفاده می‌کنه. مثلا اسمس، واتسپ، تلگرام و... بوی حرفه‌ای نبودن می‌ده. درستش؛ زنگ، ایمیل و لینکدینه.

  • داشتن بروکراسی و کاغذ‌بازی برای ساده‌ترین کارها به عنوان نمونه کوچک مثلا؛ کاغذ میارن از روش می‌خونن سوالا رو تیک می‌زنن. این یعنی؛ شرکتی‌ست بی‌آب و علف‌.

  • gus fring redflag meme
  • شرکتی که ناهار یا بیمه نمی‌ده، کنسله. ناهار و بیمه و حقوق سر وقت و چیزهایی از این قبیل، جزو وظایف یک شرکته نه فیچر. تو آگهی‌ها اینا رو به عنوان فیچر بهتون غالب می‌کنن. مثل این می‌مونه من بیام عدم کتک‌کاری و وحشی‌بازی در محل کار رو یک فیچر بدونم. خب این بدوی‌ترین چیزه که باید رعایت بشه حالا یه سریا رعایت نمی‌کنن فیچر نیس یه چیزی مثل نسبت منفی و صفر مطلقه.

  • روشن نکردن وب‌کم در مصاحبه بدون اطلاع دادن از چرایی ماجرا.
    مصاحبه‌کننده حداقل باید یه رخی نشون بده، هر چند کوتاه.

  • داشتن سیستم اضافه‌کاری و عدم شناور بودن و سیستم‌ تسک‌محور، یعنی؛ برده‌داری.

  • عدم وجود نیروی منابع انسانی در شرکت و نداشتن مایندستی برای ایجاد کالچر در شرکت. به عنوان مثال: اچ‌آر به چه درد می‌خوره ما حواسمون به خودمون هست و از این جور مهملات.

  • عدم تهیه تجهیزات و لوازم مورد نیاز کار از سمت شرکت. مثلا: خودتون لپ‌تاپ بیارید سیستم نداریم!

  • سابقه افرادی که در شرکتی کار می‌کنن، مهمه. از روی همون‌ها می‌شه فهمید حدودا چه تفکری دارند.
    رنگ رخساره خبر میدهد از سر درون.

Rejection

ریجکت، ریجکت، ریجکت...

آخ چقدر این کلمه آشناست! همه ما حداقل یه بار تجربه‌ش کردیم. اون دوره‌ای که آدم دنبال کاره، پر از استرس، فشار، کاهش نمایی اعتماد‌به‌نفس، استأصال، تنهایی و حسی حاوی خالی شدنه که نتیجه‌ی پرسیدن سوال تکراریِ «اه چرا نشد؟ چرا نمی‌شه؟»ئه که تو ذهن رخ می‌ده. هیچ! بله هیچ ربطی هم به دانش فنی نداره. اصلا اینجوری بگم که شما فرض کنید پرفکتید، باز هم ریجکت شدن، رخ می‌ده (این‌جا رو ببین). به هزاران دلیلی که دقیقا نمی‌فهمیم چرا و فقط با حدس و گمان و reverse engineering مصاحبه کشف می‌کنیم که چرا. پس چاقوی ریجکشن تیزه و گریزی ازش نیست. حتما زخمیت می‌کنه. این که چطوری زخمو ببندی و دوران نقاهت رو بگذرونی، هنره. چیزی که به نظر من خیلی مهمه، اینه که از اون حال و هوا بیای بیرون و حواست رو پرت کنی، گویی که اصلا اون اتفاق رخ نداده و با دوپامین دیگری، افت سطح دوپامین ناشی از ایمیل‌های ریجکتی رو پر کنی. تاثیرگذارترین عوامل، تفریح کردن و گذران وقت با دوستان و دل‌بندانه. صحبت کردن با دیگری (صرفا فقط صحبت کردن) موجب حس آرامش می‌شه. هر چی بیشتر با پارتنر یا دوستان (مشخصا اگه پارتنر دارید دوست سگ کی باشه؟ (:) وقت بگذرونید، آرام‌تر و منطقی‌تر این مسیر پرفراز و نشیب رو طی می‌کنید. اگر هم باز آروم نمی‌شید و مغزتون به فاک می‌ره، یا تنهایید و دوستی ندارید و سینگل بدبختم هستید، اشکالی ندارد، طبیعی‌ست. می‌تونم این قول رو بهتون بدم که نمی‌میرید! همچنین، درست می‌شه. بله می‌دونم اگه تو این دوره هستید، نفرت‌انگیزترین جمله همینه. rejection_meme ولی خب واقعیته و فراری ازش نیست. تو کامیونیتیِ آدمایی که دنبال کار هستن، هم باشید، چون درد مشترک دارید باهاشون و می‌تونید تبادل اطلاعات کنید، باز می‌تونه کمک کنه که فکر نکنید تنهایید و فقط شما هستید که ریجکت می‌شید. فیلم و سریال دیدن هم خوب است. باعث می‌شه حدودا یه دو ساعتی (اگه شبی یه فیلم یا یه قسمت سریال ببینید) به چیزی فکر نکنید. نوشتن از حس و حال در لحظه هم می‌تونه از پرخاش ذهن کم کنه و حتی بعدا خوندنش جالبه می‌فهمید که چقد تغییر کردید یا چجوری بوده حس‌تون. پس شد:

  • وقت‌گذرانی با زید و دوستان (به کلمه زید گیر ندید خیلیم خوبه)
  • تفریح و سرگرمی (فیلم و سریال)
  • نوشتن

البته روحیات و مدل آدما فرق داره و نمی‌شه حکم کلی داد و هر کس باید مدل خودشو پیاده کنه که چجوری حالشو خوب کنه، اما اشتراک تجربه‌ هم چیز بدی نیست و همون‌طور که ما آدما خیلی باهم فرق داریم، خیلیم شبیهیم.

Statistically

نگاه آماری


Application Count

این، مربوط به مصاحبه‌های سال ۱۴۰۲ بین بازه آبان تا اسفند (۵ ماه) است. رکورد جالبیه!



از ۲۲ شرکت که به مصاحبه کشیده شده.



نمودار حاصل از ۲۴ شرکتی که اپلای شده و حداقل یک مرحله به جلو رفته.

Clarifying

شفاف‌سازی

اموجی‌ها

EmojiMeaning
📜Resume
📞HR Call
👱🏻‍♀️HR Interview
🔧Technical Interview
Accepted
Rejected
I Rejected
📝Task
⚖️Task Review

Markdown Generator

Jobname Markdown Generator
<!-- Air Datepicker CSS (jsDelivr - v3.6.0) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/air-datepicker@3.6.0/air-datepicker.css">

<style>
    :root {
        --primary: #4361ee;
        --secondary: #3a0ca3;
        --success: #4cc9f0;
        --warning: #f72585;
        --light: #f8f9fa;
        --dark: #212529;
        --gray: #6c757d;
        --border: #dee2e6;
        --card-bg: #ffffff;
        --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        --btn-shadow: 0 6px 12px rgba(16,24,40,0.06);
        --btn-hover-shadow: 0 8px 15px rgba(16,24,40,0.08);
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }

    body {
        font-family: 'Fira Sans', 'Ubuntu Mono', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        line-height: 1.6;
        color: var(--dark);
        background: linear-gradient(135deg, #f5f7fb 0%, #e4e8f0 100%);
        padding: 20px;
        max-width: 1400px;
        margin: 0 auto;
        min-height: 100vh;
    }

    .container { display:flex; flex-direction:column; gap:20px; }

    .form-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
    .full-width { grid-column: 1 / -1; }

    @media (max-width: 992px){ .form-grid { grid-template-columns: 1fr; } }

    header {
        text-align:center; margin-bottom:30px; padding:25px;
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
        color:white; border-radius:12px; box-shadow:var(--shadow); position:relative; overflow:hidden;
    }
    header::before {
        content:""; position:absolute; top:-50%; left:-50%; width:200%; height:200%;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 60%);
        transform: rotate(30deg);
    }

    h1 { font-size:2.4rem; margin-bottom:10px; position:relative; font-weight:bold; }
    .description { font-size:1.1rem; opacity:0.9; max-width:700px; margin:0 auto; position:relative; }

    .card { background-color:var(--card-bg); border-radius:12px; box-shadow:var(--shadow); padding:20px; transition:transform .3s, box-shadow .3s; border:1px solid rgba(0,0,0,0.05); display:flex; flex-direction:column; }
    .card:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }

    .card-title { font-size:1.3rem; margin-bottom:15px; color:var(--primary); border-bottom:2px solid var(--primary); padding-bottom:8px; display:flex; align-items:center; gap:10px; }

    .form-group { margin-bottom:15px; }
    label { display:block; margin-bottom:8px; font-weight:600; color:var(--dark); display:flex; align-items:center; gap:8px; }

    input[type="text"], input[type="url"], input[type="date"], input[type="number"], input[type="time"], select, textarea {
        width:100%; padding:12px; border:1px solid var(--border); border-radius:8px; font-size:16px; transition:all .3s; background-color:var(--light);
    }
    input:focus, select:focus, textarea:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px rgba(67,97,238,0.2); background-color:#fff; }

    .checkbox-group, .radio-group { display:flex; flex-wrap:wrap; gap:10px; margin-top:8px; }
    .checkbox-label, .radio-label { display:flex; align-items:center; gap:8px; cursor:pointer; padding:10px 14px; background-color:var(--light); border-radius:8px; transition:all .3s; flex:1; min-width:120px; font-size:14px; }
    .checkbox-label:hover, .radio-label:hover { background-color:#e9ecef; transform:translateY(-2px); }

    input[type="checkbox"], input[type="radio"] { width:18px; height:18px; }

    .required { color:var(--warning); }

    button { padding:14px 24px; background:linear-gradient(135deg,var(--primary) 0%,var(--secondary) 100%); color:white; border:none; border-radius:8px; cursor:pointer; font-size:16px; font-weight:600; transition:all .3s; display:inline-flex; align-items:center; justify-content:center; gap:10px; box-shadow:var(--shadow); }
    button:hover { transform:translateY(-2px); box-shadow:var(--btn-hover-shadow); }
    button.secondary { background:var(--light); color:var(--dark); border:1px solid var(--border); }
    button.secondary:hover { background:#e2e6ea; }

    .actions { display:flex; gap:15px; flex-wrap:wrap; margin-top:25px; justify-content:center; }

    .preview-container { width:100%; margin-top:20px; }
    .preview { white-space:pre-wrap; background-color:var(--light); padding:20px; border-radius:8px; border:1px solid var(--border); font-family:'Courier New', Courier, monospace; line-height:1.5; transition:all .3s; min-height:300px; max-height:500px; overflow-y:auto; font-size:14px; }
    .preview:hover { box-shadow: inset 0 0 10px rgba(0,0,0,0.1); }

    .field-row { display:flex; gap:15px; }
    .field-row .form-group { flex:1; }

    .score-input { display:flex; align-items:center; gap:15px; }
    .score-input input { width:100px; flex-shrink:0; }
    .score-display { font-weight:bold; padding:8px 16px; border-radius:20px; background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%); color:white; min-width:80px; text-align:center; }

    .toggle-section { margin-top:15px; }
    .toggle-header { display:flex; align-items:center; gap:10px; cursor:pointer; padding:10px; background-color:var(--light); border-radius:8px; transition:all .3s; font-size:14px; }
    .toggle-header:hover { background-color:#e9ecef; }
    .toggle-content { padding:15px; background-color:var(--light); border-radius:0 0 8px 8px; margin-top:-5px; border:1px solid var(--border); border-top:none; display:block; }

    .icon { font-size:18px; width:20px; text-align:center; }
    .success-badge { display:inline-block; padding:6px 12px; background:linear-gradient(135deg,#4caf50 0%,#2e7d32 100%); color:white; border-radius:20px; font-size:14px; margin-left:10px; }

    .time-inputs { display:flex; gap:15px; }
    .time-inputs .form-group { flex:1; }

    /* --- restore previous status / apply way layout --- */
    .status-options, .apply-options {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
    }

    .qa-editor { display:flex; flex-direction:column; gap:12px; }

    .qa-controls { display:flex; justify-content:space-between; align-items:center; gap:12px; }

    .add-qa-btn { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:8px; background:linear-gradient(135deg,#2b6cb0 0%,#2c5282 100%); color:white; border:none; cursor:pointer; font-weight:700; }

    .qa-list { display:flex; flex-direction:column; gap:12px; }

    /* Redesigned QA Card styles (kept scoped) */
    .qa-card {
        background: linear-gradient(180deg,#ffffff,#fbfdff);
        border:1px solid rgba(15,23,42,0.04);
        border-radius:10px;
        padding:12px;
        box-shadow: 0 6px 18px rgba(16,24,40,0.03);
        transition: transform .08s ease, box-shadow .08s ease;
        cursor: grab;
    }
    .qa-card:active { cursor: grabbing; }

    .qa-card.dragging { opacity: 0.45; transform: scale(0.995); }
    .qa-card.drag-over { outline: 2px dashed var(--primary); transform: translateY(6px); }

    .qa-header { display:flex; align-items:center; justify-content:space-between; gap:8px; padding-bottom:8px; border-bottom:1px dashed rgba(0,0,0,0.04); }
    .qa-badge { background:var(--primary); color:#fff; padding:6px 10px; border-radius:8px; font-weight:700; font-size:13px; }
    .qa-title { font-weight:700; font-size:14px; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .qa-controls-inline { display:flex; gap:8px; align-items:center; }

    .qa-body { padding-top:12px; display:flex; flex-direction:column; gap:8px; }
    .compact-row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }

    /* Delete button (small-btn) */
    .small-btn {
      background:#eef4ff;
      color:var(--primary);
      border:1px solid rgba(67,97,238,0.08);
      padding:8px 10px;
      border-radius:8px;
      cursor:pointer;
      font-weight:700;
      display:inline-flex;
      align-items:center;
      height:38px;
      box-shadow: var(--btn-shadow);
      transition: transform .12s ease, box-shadow .12s ease;
    }
    .small-btn[disabled] { opacity:0.45; cursor:not-allowed; }
    .small-btn:hover { transform: translateY(-2px); box-shadow: var(--btn-hover-shadow); }
    .danger { background:#fff4f4; border:1px solid rgba(198,40,40,0.08); color:#c62828; }

    .muted { color:var(--gray); font-size:13px; }

    .air-date-input { position:relative; }

    .email-field-group { display:flex; gap:15px; margin-bottom:15px; }
    .email-field-group .form-group { flex:1; position:relative; }
    .email-field-group .form-group::after {
        content: "OR"; position:absolute; top:50%; right:-25px; transform:translateY(-50%);
        background:var(--light); padding:5px 10px; border-radius:20px; font-size:12px; font-weight:bold; color:var(--gray); z-index:1;
    }
    .email-field-group .form-group:last-child::after { display:none; }

    .email-status-label { display:inline-block; padding:4px 8px; border-radius:4px; font-size:12px; margin-left:5px; }
    .rejection-status { background-color:#ffe6e6; color:#d32f2f; }
    .offer-status { background-color:#e6f7e6; color:#2e7d32; }

    /* New answer-pill style (now matches delete button exactly) */
    .answer-pill {
      display:inline-flex;
      align-items:center;
      justify-content:center;
      gap:8px;
      padding:8px 10px;
      border-radius:8px;
      border:1px solid rgba(198,40,40,0.08);
      background:#fff4f4;
      color:#c62828;
      font-weight:700;
      cursor:pointer;
      user-select:none;
      height:38px;
      box-shadow: var(--btn-shadow);
      transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
      vertical-align: middle;
    }
    .answer-pill .pill-checkbox { display:none; } /* hide native checkbox */
    .answer-pill .pill-text { font-weight:700; font-size:13px; display:inline-block; line-height:1; }
    .answer-pill.checked {
      background: linear-gradient(135deg,#4caf50 0%, #2e7d32 100%);
      border-color: rgba(46,125,50,0.12);
      color:white;
      box-shadow: var(--btn-shadow);
    }
    .answer-pill:hover { transform: translateY(-2px); box-shadow: var(--btn-hover-shadow); }
    .answer-pill:active { transform: translateY(0); }

    /* responsive tweak */
    @media (max-width:640px){
      .qa-header{flex-direction:column;align-items:flex-start;gap:8px}
      .qa-controls-inline{width:100%;justify-content:flex-end}
    }
</style>
Markdown downloaded successfully!
<header>
    <h1>Jobname Markdown Generator</h1>
    <p class="description">Generate markdown files with your content and jobname structure</p>
</header>

<div class="container">
    <div class="form-grid">
        <!-- Company Information -->
        <div class="card">
            <h2 class="card-title"><i class="fas fa-building"></i> Company Information</h2>
            <div class="compact-form">
                <div class="form-group">
                    <label for="companyName"><i class="fas fa-signature"></i> Company Name <span class="required">*</span></label>
                    <input type="text" id="companyName" placeholder="Enter company name">
                </div>
                <div class="form-group">
                    <label for="companySite"><i class="fas fa-globe"></i> Company Website <span class="required">*</span></label>
                    <input type="url" id="companySite" placeholder="https://example.com">
                </div>
                <div class="form-group">
                    <label for="jobTitle"><i class="fas fa-briefcase"></i> Job Title <span class="required">*</span></label>
                    <select id="jobTitle">
                        <option value="Director of Engineering">Director of Engineering</option>
                        <option value="Engineering Manager">Engineering Manager</option>
                        <option value="Technical Lead">Technical Lead</option>
                        <option value="Team Lead">Team Lead</option>
                        <option value="Senior Software Engineer">Senior Software Engineer</option>
                        <option value="Software Engineer" selected>Software Engineer</option>
                        <option value="Junior Software Engineer">Junior Software Engineer</option>
                        <option value="Software Developer">Software Developer</option>
                        <option value="Junior Software Developer">Junior Software Developer</option>
                        <option value="Intern Software Developer">Intern Software Developer</option>
                        <option value="AI Software Engineer">AI Software Engineer</option>
                        <option value="Back-End Developer">Back-End Developer</option>
                        <option value="Back-End Engineer">Back-End Engineer</option>
                        <option value="Front-End Developer">Front-End Developer</option>
                        <option value="Front-End Engineer">Front-End Engineer</option>
                        <option value="Full-Stack Developer">Full-Stack Developer</option>
                        <option value="Python Developer">Python Developer</option>
                        <option value="Senior Python Developer">Senior Python Developer</option>
                        <option value="Go Developer">Go Developer</option>
                        <option value="Golang Developer">Golang Developer</option>
                        <option value="Senior Golang Developer">Senior Golang Developer</option>
                        <option value="Senior Go Developer">Senior Go Developer</option>
                        <option value="Mobile Developer">Mobile Developer</option>
                        <option value="Android Developer">Android Developer</option>
                        <option value="Game Developer">Game Developer</option>
                        <option value="Systems Engineer">Systems Engineer</option>
                        <option value="Systems Administrator">Systems Administrator</option>
                        <option value="Machine Learning Engineer">Machine Learning Engineer</option>
                        <option value="Database Administrator">Database Administrator</option>
                        <option value="Data Analyst">Data Analyst</option>
                        <option value="Data Scientist">Data Scientist</option>
                        <option value="Data Engineer">Data Engineer</option>
                        <option value="Blockchain Developer">Blockchain Developer</option>
                        <option value="Java Developer">Java Developer</option>
                        <option value="Site Reliability Engineer (SRE)">Site Reliability Engineer (SRE)</option>
                        <option value="Web Developer">Web Developer</option>
                        <option value="Computer Systems Analyst">Computer Systems Analyst</option>
                        <option value="Cloud Engineer">Cloud Engineer</option>
                        <option value="DevOps Engineer">DevOps Engineer</option>
                    </select>
                </div>
            </div>
        </div>

        <!-- Interview Timeline -->
        <div class="card">
            <h2 class="card-title"><i class="fas fa-calendar-alt"></i> Interview Timeline</h2>
            <div class="compact-form">
                <div class="field-row">
                    <div class="form-group">
                        <label for="sentResume"><i class="fas fa-paper-plane"></i> Sent Resume</label>
                        <input type="text" id="sentResume" class="air-date-input" value="2023-10-30" placeholder="yyyy/mm/dd">
                    </div>
                    <div class="form-group">
                        <label for="hrCall"><i class="fas fa-phone"></i> HR Call</label>
                        <input type="text" id="hrCall" class="air-date-input" value="2023-11-07" placeholder="yyyy/mm/dd">
                    </div>
                </div>
                <div class="field-row">
                    <div class="form-group">
                        <label for="technicalInterview"><i class="fas fa-laptop-code"></i> Technical Interview</label>
                        <input type="text" id="technicalInterview" class="air-date-input" value="2023-11-12" placeholder="yyyy/mm/dd">
                    </div>
                </div>

                <div class="email-field-group">
                    <div class="form-group">
                        <label for="rejectionEmail"><i class="fas fa-envelope"></i> Rejection Email <span class="email-status-label rejection-status">Rejected</span></label>
                        <input type="text" id="rejectionEmail" class="air-date-input" placeholder="yyyy/mm/dd">
                    </div>
                    <div class="form-group">
                        <label for="offerEmail"><i class="fas fa-envelope"></i> Offer Email <span class="email-status-label offer-status">Offer</span></label>
                        <input type="text" id="offerEmail" class="air-date-input" placeholder="yyyy/mm/dd">
                    </div>
                </div>

                <div class="form-group">
                    <label><i class="fas fa-clock"></i> Interview Duration</label>
                    <div class="time-inputs">
                        <div class="form-group">
                            <label for="hours">Hours</label>
                            <input type="number" id="hours" min="0" max="10" value="1">
                        </div>
                        <div class="form-group">
                            <label for="minutes">Minutes</label>
                            <input type="number" id="minutes" min="0" max="59" value="10">
                        </div>
                    </div>
                    <div class="duration-fix">Note: 0 hours or 0 minutes will not be displayed</div>
                </div>
            </div>
        </div>

        <!-- Application Details -->
        <div class="card">
            <h2 class="card-title"><i class="fas fa-tasks"></i> Application Details</h2>
            <div class="compact-form">
                <div class="form-group">
                    <label><i class="fas fa-list-alt"></i> Status <span class="required">*</span></label>
                    <div class="status-options">
                        <label class="checkbox-label"><input type="checkbox" name="status" value="📜" checked><span class="icon">📜</span> Apply Resume</label>
                        <label class="checkbox-label"><input type="checkbox" name="status" value="📞" checked><span class="icon">📞</span> HR Call</label>
                        <label class="checkbox-label"><input type="checkbox" name="status" value="🔧" checked><span class="icon">🔧</span> Technical</label>
                        <label class="checkbox-label"><input type="checkbox" name="status" value="❌" checked><span class="icon">❌</span> Rejected</label>
                        <label class="checkbox-label"><input type="checkbox" name="status" value="👱🏻‍♀️"><span class="icon">👱🏻‍♀️</span> HR Interview</label>
                        <label class="checkbox-label"><input type="checkbox" name="status" value="✅"><span class="icon">✅</span> Accepted</label>
                        <label class="checkbox-label"><input type="checkbox" name="status" value="📝"><span class="icon">📝</span> Task</label>
                        <label class="checkbox-label"><input type="checkbox" name="status" value="⚖️"><span class="icon">⚖️</span> Code Review</label>
                    </div>
                </div>

                <div class="form-group">
                    <label><i class="fas fa-paper-plane"></i> Apply Way <span class="required">*</span></label>
                    <div class="apply-options">
                        <label class="checkbox-label"><input type="checkbox" name="applyWay" value="Site" checked><i class="fas fa-desktop"></i> Site</label>
                        <label class="checkbox-label"><input type="checkbox" name="applyWay" value="LinkedIn" checked><i class="fab fa-linkedin"></i> LinkedIn</label>
                        <label class="checkbox-label"><input type="checkbox" name="applyWay" value="Refer"><i class="fas fa-user-friends"></i> Refer</label>
                        <label class="checkbox-label"><input type="checkbox" name="applyWay" value="Jobinja"><i class="fas fa-briefcase"></i> Jobinja</label>
                        <label class="checkbox-label"><input type="checkbox" name="applyWay" value="Jobvision"><i class="fas fa-eye"></i> Jobvision</label>
                        <label class="checkbox-label"><input type="checkbox" name="applyWay" value="Quera"><i class="fas fa-code"></i> Quera</label>
                    </div>
                </div>

                <div class="form-group">
                    <label for="interviewPlatform"><i class="fas fa-video"></i> Interview Platform <span class="required">*</span></label>
                    <select id="interviewPlatform"><option value="Google Meet" selected>Google Meet</option><option value="Microsoft Teams">Microsoft Teams</option><option value="Zoom">Zoom</option><option value="In-person">In-person</option><option value="Phone">Phone</option></select>
                </div>

                <div class="form-group">
                    <label for="score"><i class="fas fa-star"></i> Score <span class="required">*</span></label>
                    <div class="score-input">
                        <input type="range" id="score" min="0" max="10" step="0.5" value="5">
                        <div class="score-display">5/10</div>
                    </div>
                </div>
            </div>
        </div>

        <!-- Interview Process -->
        <div class="card interview-process-card">
            <h2 class="card-title"><i class="fas fa-project-diagram"></i> Interview Process</h2>
            <div class="form-group">
                <label for="interviewProcess"><i class="fas fa-code"></i> Mermaid Diagram Code <span class="required">*</span></label>
                <textarea id="interviewProcess" rows="6">flowchart LR
sr(Send Resume) --> hr(HR Call) --> ti(Technical Interview) --rejected--x hri(HR Interview) -.-> o(Offer)</textarea>
            </div>
            <div class="toggle-section">
                <div class="toggle-header"><i class="fas fa-eye"></i><span>Preview Diagram</span></div>
                <div class="toggle-content"><div class="mermaid-preview"><p>Mermaid diagram preview will be displayed here after rendering</p></div></div>
            </div>
        </div>

        <!-- Technical Interview Notes (REDESIGNED, kept only here) -->
        <div class="card full-width">
            <h2 class="card-title"><i class="fas fa-sticky-note"></i> Technical Interview Notes</h2>
            <div class="form-group">
                <label for="qaEditor"><i class="fas fa-edit"></i> Q&A Editor <span class="required">*</span></label>

                <!-- Redesigned QA editor card UI (kept and integrated) -->
                <div class="qa-editor" id="qaEditor">
                    <div class="qa-controls">
                        <div style="font-size:14px; color:var(--gray)">Add questions and optional answers. Drag a card to reorder by mouse.</div>
                        <div style="display:flex; gap:8px;">
                            <button id="addQaBtn" type="button" class="add-qa-btn"><i class="fas fa-plus"></i> Add Q&A</button>
                            <button id="collapseAllBtn" type="button" class="small-btn">Collapse all</button>
                            <button id="expandAllBtn" type="button" class="small-btn">Expand all</button>
                        </div>
                    </div>

                    <div class="qa-list" id="qaList" aria-live="polite"></div>
                </div>

                <!-- Hidden legacy textarea (used to seed initial content) -->
                <textarea id="legacyInterviewNotes" style="display:none">Because I'm unemployed. </textarea>
            </div>
        </div>
    </div>

    <!-- Buttons -->
    <div class="actions">
        <button id="downloadBtn"><i class="fas fa-download"></i> Download Markdown</button>
        <button class="secondary" id="resetBtn"><i class="fas fa-redo"></i> Reset Form</button>
    </div>

    <!-- Preview -->
    <div class="preview-container">
        <div class="card">
            <h2 class="card-title"><i class="fas fa-eye"></i> Preview</h2>
            <div class="preview" id="markdownPreview"></div>
        </div>
    </div>
</div>

<!-- Air Datepicker JS (jsDelivr - v3.6.0) -->
<script src="https://cdn.jsdelivr.net/npm/air-datepicker@3.6.0/air-datepicker.js"></script>

<script type="module">

import mermaid from ‘https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs’;

mermaid.initialize({ startOnLoad: false });

// Helper to render mermaid text into a container async function renderMermaidTo(container, text) { try { if (!container) return; if (!text || !text.trim()) { container.innerHTML = ‘

No mermaid diagram provided.
’; return; }

container.innerHTML = '<div style="opacity:0.7">Rendering diagram...</div>';

const id = 'mermaid-' + Math.random().toString(36).slice(2, 9);
const { svg, bindFunctions } = await mermaid.render(id, text);

container.innerHTML = svg;
if (bindFunctions) bindFunctions(container);

} catch (err) { const message = (err && err.message) ? err.message : String(err); container.innerHTML = <pre style="color:#c62828; white-space:pre-wrap">Mermaid render error:\n${message}</pre>; console.error(‘Mermaid render error:’, err); } }

function debounce(fn, delay = 250) { let t; return (…args) => { clearTimeout(t); t = setTimeout(() => fn(…args), delay); }; }

document.addEventListener(‘DOMContentLoaded’, function() { // DOM elements const companyNameInput = document.getElementById(‘companyName’); const companySiteInput = document.getElementById(‘companySite’); const jobTitleSelect = document.getElementById(‘jobTitle’); const interviewPlatformSelect = document.getElementById(‘interviewPlatform’); const scoreInput = document.getElementById(‘score’) || document.getElementById(‘score’); // safe-get const scoreDisplay = document.querySelector(‘.score-display’); const markdownPreview = document.getElementById(‘markdownPreview’); const notification = document.getElementById(‘notification’); const mermaidContainer = document.querySelector(‘.mermaid-preview’); const mermaidTextarea = document.getElementById(‘interviewProcess’); const rejectionEmailInput = document.getElementById(‘rejectionEmail’); const offerEmailInput = document.getElementById(‘offerEmail’);

// QA redesigned DOM handles
const qaListContainer = document.getElementById('qaList');
const addQaBtn = document.getElementById('addQaBtn');
const collapseAllBtn = document.getElementById('collapseAllBtn');
const expandAllBtn = document.getElementById('expandAllBtn');
const legacyInterviewNotes = document.getElementById('legacyInterviewNotes');

// Debounced mermaid renderer
const debouncedRenderMermaid = debounce((text) => renderMermaidTo(mermaidContainer, text), 200);

// Set default value for platform select
if (interviewPlatformSelect) interviewPlatformSelect.value = "Google Meet";

// QA items store (redesigned card items)
let qaItems = [];
let dragSrcIdx = null; // index of dragged card during drag-drop

// ----------------------------
// Air Datepicker integration (original)
// ----------------------------
function parseDateFromString(s) {
  if (!s) return null;
  s = String(s).trim();
  const sep = s.includes('-') ? '-' : s.includes('/') ? '/' : null;
  if (sep) {
    const parts = s.split(sep).map(p => p.replace(/^0+/, '') || '0');
    if (parts.length >= 3) {
      const y = parseInt(parts[0], 10);
      const m = parseInt(parts[1], 10);
      const d = parseInt(parts[2], 10);
      if (!Number.isNaN(y) && !Number.isNaN(m) && !Number.isNaN(d)) {
        return new Date(y, m - 1, d);
      }
    }
  }
  const dd = new Date(s);
  return isNaN(dd) ? null : dd;
}

const dateIds = ['sentResume', 'hrCall', 'technicalInterview', 'rejectionEmail', 'offerEmail'];
const enLocale = {
  days: ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],
  daysShort: ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],
  daysMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
  months: ['January','February','March','April','May','June','July','August','September','October','November','December'],
  monthsShort: ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
  today: 'Today', clear: 'Clear', dateFormat: 'yyyy/MM/dd', timeFormat: 'hh:mm', firstDay: 1
};

dateIds.forEach(id => {
  const input = document.getElementById(id);
  if (!input) return;
  const parsed = parseDateFromString(input.value);
  new AirDatepicker(`#${id}`, {
    locale: enLocale,
    dateFormat: 'yyyy/MM/dd',
    selectedDates: parsed ? [parsed] : [],
    autoClose: true,
    onSelect: function() {
      input.dispatchEvent(new Event('input', { bubbles: true }));
      input.dispatchEvent(new Event('change', { bubbles: true }));
    }
  });
  input.placeholder = 'yyyy/mm/dd';
});

// ----------------------------
// Redesigned QA UI functions (with drag & drop)
// ----------------------------
function clearDragOverClasses() {
  qaListContainer.querySelectorAll('.qa-card.drag-over').forEach(el => el.classList.remove('drag-over'));
}

function renderQAList() {
    qaListContainer.innerHTML = '';

    if (qaItems.length === 0) {
        const empty = document.createElement('div');
        empty.style.color = 'var(--gray)';
        empty.style.fontStyle = 'italic';
        empty.textContent = 'No Q&A yet. Click "Add Q&A" to create the first question.';
        qaListContainer.appendChild(empty);
        return;
    }

    qaItems.forEach((item, idx) => {
        const card = document.createElement('div');
        card.className = 'qa-card';
        card.setAttribute('data-idx', idx);
        card.draggable = true;

        // drag handlers
        card.addEventListener('dragstart', (e) => {
            dragSrcIdx = idx;
            try { e.dataTransfer.effectAllowed = 'move'; } catch (_) {}
            card.classList.add('dragging');
        });
        card.addEventListener('dragend', (e) => {
            dragSrcIdx = null;
            card.classList.remove('dragging');
            clearDragOverClasses();
        });

        card.addEventListener('dragover', (e) => {
            e.preventDefault();
            // highlight this card as potential drop target
            if (!card.classList.contains('drag-over')) {
                clearDragOverClasses();
                card.classList.add('drag-over');
            }
        });

        card.addEventListener('dragleave', (e) => {
            card.classList.remove('drag-over');
        });

        card.addEventListener('drop', (e) => {
            e.preventDefault();
            card.classList.remove('drag-over');
            const dstIdx = idx;
            if (dragSrcIdx === null || dragSrcIdx === undefined) return;
            if (dragSrcIdx === dstIdx) return;
            const [moved] = qaItems.splice(dragSrcIdx, 1);
            // adjust dstIdx if source was before destination
            let insertAt = dstIdx;
            if (dragSrcIdx < dstIdx) insertAt = dstIdx - 1;
            if (insertAt < 0) insertAt = 0;
            qaItems.splice(insertAt, 0, moved);
            renderQAList();
            updatePreview();
        });

        // header
        const header = document.createElement('div');
        header.className = 'qa-header';

        const left = document.createElement('div');
        left.style.display = 'flex';
        left.style.alignItems = 'center';
        left.style.gap = '12px';
        left.style.minWidth = '0';

        const badge = document.createElement('div');
        badge.className = 'qa-badge';
        badge.textContent = `Q ${idx + 1}`;

        const title = document.createElement('div');
        title.className = 'qa-title';
        const titleText = (item.q || '').trim() || '(Untitled question)';
        title.textContent = titleText;

        left.appendChild(badge);
        left.appendChild(title);

        const right = document.createElement('div');
        right.className = 'qa-controls-inline';

        const collapseBtn = document.createElement('button');
        collapseBtn.type = 'button';
        collapseBtn.className = 'small-btn';
        collapseBtn.title = item.collapsed ? 'Expand' : 'Collapse';
        collapseBtn.innerHTML = item.collapsed ? '<i class="fas fa-chevron-down"></i>' : '<i class="fas fa-chevron-up"></i>';
        collapseBtn.addEventListener('click', () => {
            qaItems[idx].collapsed = !qaItems[idx].collapsed;
            renderQAList();
        });

        right.appendChild(collapseBtn);

        header.appendChild(left);
        header.appendChild(right);

        // body
        const body = document.createElement('div');
        body.className = 'qa-body';
        if (item.collapsed) body.style.display = 'none';

        // question label + textarea
        const qLabel = document.createElement('label');
        qLabel.textContent = 'Question';
        qLabel.htmlFor = `q-${idx}`;

        const qta = document.createElement('textarea');
        qta.id = `q-${idx}`;
        qta.className = 'question-input';
        qta.placeholder = 'Write the question here (single line or short paragraph)';
        qta.value = item.q || '';
        qta.addEventListener('input', (e) => {
            qaItems[idx].q = e.target.value;
            // update header title quickly
            title.textContent = (e.target.value || '').trim() || '(Untitled question)';
            updatePreview();
        });

        // compact controls
        const compactRow = document.createElement('div');
        compactRow.className = 'compact-row';

        // answer-pill (styled like delete button shape but acts as checkbox)
        const answerLabel = document.createElement('label');
        answerLabel.className = 'answer-pill' + (item.hasAnswer ? ' checked' : '');
        answerLabel.title = 'Toggle answer visibility';
        // accessible hidden checkbox inside
        const answerCheckbox = document.createElement('input');
        answerCheckbox.type = 'checkbox';
        answerCheckbox.className = 'pill-checkbox';
        answerCheckbox.checked = !!item.hasAnswer;
        // text span
        const pillText = document.createElement('span');
        pillText.className = 'pill-text';
        pillText.textContent = 'answer?';

        // Clicking label toggles
        answerLabel.addEventListener('click', (e) => {
            // don't trigger drag when clicking pill
            e.preventDefault();
            const newVal = !qaItems[idx].hasAnswer;
            qaItems[idx].hasAnswer = newVal;
            renderQAList();
            updatePreview();
        });

        answerLabel.appendChild(answerCheckbox);
        answerLabel.appendChild(pillText);

        // delete
        const del = document.createElement('button');
        del.type = 'button';
        del.className = 'small-btn danger';
        del.title = 'Delete this Q&A';
        del.innerHTML = '<i class="fas fa-trash"></i>';
        del.addEventListener('click', () => {
            if (!confirm('Delete this question?')) return;
            qaItems.splice(idx, 1);
            renderQAList();
            updatePreview();
        });

        compactRow.appendChild(answerLabel);
        compactRow.appendChild(del);

        // answer textarea (only if hasAnswer)
        const aLabel = document.createElement('label');
        aLabel.textContent = 'Answer (optional)';
        aLabel.htmlFor = `a-${idx}`;

        const ata = document.createElement('textarea');
        ata.id = `a-${idx}`;
        ata.className = 'answer-input';
        ata.placeholder = 'Write the answer here (supports Markdown/HTML)';
        ata.value = item.a || '';
        ata.addEventListener('input', (e) => {
            qaItems[idx].a = e.target.value;
            updatePreview();
        });

        body.appendChild(qLabel);
        body.appendChild(qta);
        body.appendChild(compactRow);

        if (item.hasAnswer) {
            body.appendChild(aLabel);
            body.appendChild(ata);
        }

        card.appendChild(header);
        card.appendChild(body);
        qaListContainer.appendChild(card);
    });

    // allow dropping to the list empty area (append to end)
    qaListContainer.addEventListener('dragover', (e) => {
        e.preventDefault();
    });
    qaListContainer.addEventListener('drop', (e) => {
        e.preventDefault();
        if (dragSrcIdx === null || dragSrcIdx === undefined) return;
        // if dropped on container (not a card), move to end
        const [moved] = qaItems.splice(dragSrcIdx, 1);
        qaItems.push(moved);
        renderQAList();
        updatePreview();
    });
}

function addQA(q = '', a = '', hasAnswer = true) {
    qaItems.push({ q: q || '', a: a || '', hasAnswer: !!hasAnswer, collapsed: false });
    renderQAList();
    // focus new question
    setTimeout(() => {
        const idx = qaItems.length - 1;
        const el = document.getElementById(`q-${idx}`);
        if (el) el.focus();
    }, 0);
    updatePreview();
}

// seed initial QA from legacy textarea
(function seedInitialQA() {
    const raw = legacyInterviewNotes ? legacyInterviewNotes.value.trim() : '';
    if (!raw) {
        addQA('', '', false);
        return;
    }

    const lines = raw.split('\n');
    let firstQuestion = '';
    let answerRemaining = '';

    for (let i = 0; i < lines.length; i++) {
        const l = lines[i].trim();
        if (l.startsWith('- ')) {
            firstQuestion = l.replace(/^-\\s*/, '');
            answerRemaining = lines.slice(i + 1).join('\n');
            break;
        }
    }

    if (!firstQuestion) {
        addQA('Why are you applying for this job?', raw, !!raw);
    } else {
        addQA(firstQuestion, answerRemaining.trim() || '', !!answerRemaining.trim());
    }
})();

// wire add button (fixed)
if (addQaBtn) {
    addQaBtn.addEventListener('click', function (e) {
        e.preventDefault();
        // default new Q to have no answer to keep UI simple, user can toggle
        addQA('', '', false);
    });
}

// collapse / expand all
if (collapseAllBtn) {
    collapseAllBtn.addEventListener('click', function(e) {
        e.preventDefault();
        qaItems.forEach(it => it.collapsed = true);
        renderQAList();
    });
}
if (expandAllBtn) {
    expandAllBtn.addEventListener('click', function(e) {
        e.preventDefault();
        qaItems.forEach(it => it.collapsed = false);
        renderQAList();
    });
}

// Score handling
const scoreEl = document.getElementById('score');
if (scoreEl) {
    scoreEl.addEventListener('input', function() {
        const val = this.value;
        if (scoreDisplay) scoreDisplay.textContent = `${val}/10`;

        const num = parseFloat(val) || 0;
        if (num >= 8) {
            scoreDisplay.style.background = 'linear-gradient(135deg, #4caf50 0%, #2e7d32 100%)';
        } else if (num >= 5) {
            scoreDisplay.style.background = 'linear-gradient(135deg, #ff9800 0%, #ef6c00 100%)';
        } else {
            scoreDisplay.style.background = 'linear-gradient(135deg, #f44336 0%, #c62828 100%)';
        }
        updatePreview();
    });
}

// Update preview when any field changes
document.querySelectorAll('input, select, textarea').forEach(element => {
    element.addEventListener('input', updatePreview);
    element.addEventListener('change', updatePreview);
});

// Toggle sections
const toggleHeaders = document.querySelectorAll('.toggle-header');
toggleHeaders.forEach(header => {
    header.addEventListener('click', function() {
        const content = this.nextElementSibling;
        content.style.display = content.style.display === 'none' ? 'block' : 'none';
        const icon = this.querySelector('i');
        if (icon) { icon.classList.toggle('fa-eye'); icon.classList.toggle('fa-eye-slash'); }
    });
});

// ----------------------------
// Markdown generation (unchanged logic, respects qaItems)
// ----------------------------
function formatDuration(hours, minutes) {
    hours = parseInt(hours) || 0; minutes = parseInt(minutes) || 0;
    if (hours === 0 && minutes === 0) return "Duration not specified";
    let parts = []; if (hours > 0) parts.push(`${hours} hour${hours !== 1 ? 's' : ''}`); if (minutes > 0) parts.push(`${minutes} minute${minutes !== 1 ? 's' : ''}`);
    return parts.join(' & ');
}

function formatDate(dateString) {
    if (!dateString) return 'Date not set';
    if (dateString instanceof Date) {
        const date = dateString;
        return `${date.getFullYear()}/${String(date.getMonth() + 1).padStart(2,'0')}/${String(date.getDate()).padStart(2,'0')}`;
    }
    const parsed = parseDateFromString(dateString);
    if (!parsed) return 'Date not set';
    return `${parsed.getFullYear()}/${String(parsed.getMonth() + 1).padStart(2,'0')}/${String(parsed.getDate()).padStart(2,'0')}`;
}

function generateMarkdown() {
    const companyName = (companyNameInput && companyNameInput.value) || '';
    const companySite = (companySiteInput && companySiteInput.value) || '';
    const jobTitle = (jobTitleSelect && jobTitleSelect.value) || '';

    const statusValues = Array.from(document.querySelectorAll('input[name="status"]:checked')).map(cb=>cb.value).join('');
    const applyWayValues = Array.from(document.querySelectorAll('input[name="applyWay"]:checked')).map(cb=>cb.value).join(' & ');

    const interviewProcess = mermaidTextarea ? mermaidTextarea.value : '';
    const sentResume = document.getElementById('sentResume') ? document.getElementById('sentResume').value : '';
    const hrCall = document.getElementById('hrCall') ? document.getElementById('hrCall').value : '';
    const technicalInterview = document.getElementById('technicalInterview') ? document.getElementById('technicalInterview').value : '';
    const rejectionEmail = document.getElementById('rejectionEmail') ? document.getElementById('rejectionEmail').value : '';
    const offerEmail = document.getElementById('offerEmail') ? document.getElementById('offerEmail').value : '';
    const hours = document.getElementById('hours') ? document.getElementById('hours').value : 0;
    const minutes = document.getElementById('minutes') ? document.getElementById('minutes').value : 0;
    const interviewPlatform = interviewPlatformSelect ? interviewPlatformSelect.value : '';
    const score = document.getElementById('score') ? document.getElementById('score').value : '0';

    const duration = formatDuration(hours, minutes);

    let emailLine = '';
    if (rejectionEmail) emailLine = `- **Rejection Email**<br />${formatDate(rejectionEmail)}`;
    else if (offerEmail) emailLine = `- **Offer Email**<br />${formatDate(offerEmail)}`;
    else emailLine = `- **Response Email**<br />Date not set`;

    const scoreNum = parseFloat(score) || 0;
    let scoreColor = '#4caf50';
    if (scoreNum >= 8) scoreColor = '#4caf50';
    else if (scoreNum >= 5) scoreColor = '#ff9800';
    else scoreColor = '#f44336';
    const scoreHtml = `<mark style="background-color:${scoreColor}; color:#ffffff; padding:4px 8px; border-radius:4px">${scoreNum}/10</mark>`;

    const qaMarkdown = qaItems.map(item => {
        const q = (item.q || '').trim() || 'Question';
        const a = (item.a || '').trim() || '';
        if (!item.hasAnswer || !a) {
            return `- ${q}`;
        } else {
            return `- ${q}
<details>
<summary style="font-size:14px"><b><em>Answer</em></b></summary>
<div style="border:2px dashed #4a5568; padding:12px; border-radius:6px; margin-top:8px;  background-color: rgba(74,85,104,0.15);">

${a}

</div>
</details>`;
        }
    }).join('\n\n');


    return `# [${companyName}](${companySite})\n\n### Status\n#### ${statusValues}\n\n## ${jobTitle}\n\n### Interview Process\n\`\`\`mermaid\n${interviewProcess}\n\`\`\`\n\n### Apply Way\n${applyWayValues}\n\n### Interview Date\n\n- **Sent Resume**<br />${formatDate(sentResume)}\n\n- **HR Call**<br />${formatDate(hrCall)}\n\n- **Technical Interview**<br />${formatDate(technicalInterview)}\n\n${emailLine}\n\n### Interview Duration\n- **Technical Interview**<br />${duration}\n\n### Interview Platform\n${interviewPlatform}\n\n### Technical Interview\n${qaMarkdown}\n\n## Score\n<h4>${scoreHtml}</h4>`;
}

function updatePreview() {
    markdownPreview.textContent = generateMarkdown();
    if (mermaidContainer) {
        const text = mermaidTextarea ? mermaidTextarea.value : '';
        debouncedRenderMermaid(text);
    }
}

function showNotification(message) {
    if (!notification) return;
    notification.innerHTML = `<i class="fas fa-check-circle"></i> ${message}`;
    notification.classList.add('show');
    notification.style.transform = 'translateX(0)';
    notification.style.opacity = '1';
    setTimeout(() => {
        notification.classList.remove('show');
        notification.style.transform = 'translateX(100%)';
        notification.style.opacity = '0';
    }, 3000);
}

// Download button
document.getElementById('downloadBtn').addEventListener('click', function() {
    const markdownContent = generateMarkdown();
    const blob = new Blob([markdownContent], { type: 'text/markdown' });
    const url = URL.createObjectURL(blob);
    const a = document.createElement('a');
    a.href = url;
    const rawName = (companyNameInput && companyNameInput.value || '').trim();
    const slug = rawName ? rawName.toLowerCase().replace(/\s+/g, '-').replace(/[^a-z0-9\-]/g, '') : 'company';
    a.download = `${slug}-interview.md`;
    document.body.appendChild(a);
    a.click();
    document.body.removeChild(a);
    URL.revokeObjectURL(url);
    showNotification('Markdown downloaded successfully!');
});

// Reset button
document.getElementById('resetBtn').addEventListener('click', function() {
    if (confirm('Are you sure you want to reset all fields?')) {
        document.querySelectorAll('input, textarea, select').forEach(element => {
            if (element.type !== 'button') element.value = element.defaultValue;
        });
        document.querySelectorAll('input[type="checkbox"]').forEach(checkbox => checkbox.checked = checkbox.defaultChecked);
        document.querySelectorAll('input[type="radio"]').forEach(radio => radio.checked = radio.defaultChecked);
        if (jobTitleSelect) jobTitleSelect.value = "Software Engineer";
        if (interviewPlatformSelect) interviewPlatformSelect.value = "Google Meet";

        // reset QA items
        qaItems = [];
        (function seedAgain(){
            const raw = legacyInterviewNotes ? legacyInterviewNotes.value.trim() : '';
            if (!raw) { addQA('', '', false); return; }
            const lines = raw.split('\n');
            let firstQuestion = '';
            let answerRemaining = '';
            for (let i = 0; i < lines.length; i++) {
                const l = lines[i].trim();
                if (l.startsWith('- ')) {
                    firstQuestion = l.replace(/^-\\s*/, '');
                    answerRemaining = lines.slice(i + 1).join('\n');
                    break;
                }
            }
            if (!firstQuestion) { addQA('Question 1', raw); } else { addQA(firstQuestion, answerRemaining.trim() || ''); }
        })();

        updatePreview();
        this.innerHTML = '<i class="fas fa-check-circle"></i> Reset';
        setTimeout(() => { this.innerHTML = '<i class="fas fa-redo"></i> Reset Form'; }, 2000);
    }
});

// Initialize
renderQAList();
const scoreInit = document.getElementById('score');
if (scoreInit) scoreInit.dispatchEvent(new Event('input'));
updatePreview();

});

List of all questions

Total questions: 360
Total unique questions: 260

bullshit_everywhere_meme

Python

  • Can we have multiple inheritance in Python? What is the algorithm behind it? (5 times — Digikala, Itoll, Ozone, Snapp (cab 1), Zibal)

    Answer

    Inheritance models an ‘is-a’ relationship and shares behavior via a superclass. Composition models ‘has-a’ and embeds functionality by using other objects. Composition is generally preferred for flexibility and testability.

  • What is decorator? (6 times — 2x Digikala, Exalab, Karnameh, Siz-tel, Sternx)

  • What is the difference between concurrency in python and go? (2 times — Quiz of Kings, Narvan)

  • What is mutable and immutable and why? give me an example for each. (3 times — 2x Exalab, Snapp (cab 2))

  • What is generator? when do we use them? do you use them? (3 times — Exalab, Karnameh, Zibal)

    Answer

    A generator is a function that yields values lazily and returns an iterator. Benefits: low memory usage for large sequences, simple stateful iteration, and easy composition of pipelines. - Introduction to Python Generators

  • What is middleware in django? (2 times — Narvan, Toman Pay)

  • What is python memory management? (2 times — Narvan, Snappshop)

  • What is the difference between is and == in Python? (2 times — Snappshop, Zibal)

    Answer

    The is operator checks for identity. The == operator checks for equality.

        a = [1, 2, 3]
        b = a     # b references the same list as a
        c = a[:]  # c is a new list with the same content as a
    
        print(a is b)  # True, because b is the same object as a
        print(a is c)  # False, because c is a different object
        print(a == c)  # True, because a and c have the same content
    
  • Which function of async in python can run tasks in background? For example we have 4 request and we want send all of it in one time. (1 times — Digikala)

  • What is list comprehension? (1 times — Digikala)

  • What is python data types? and how do you grouping them? (1 times — Exalab)

  • What is coroutine? (1 times — Exalab)

  • What is the difference between set and list? (1 times — Exalab)

  • What is method overriding in python? (1 times — Itoll)

  • What is GIL? (1 times — Narvan)

  • Compare python with C++. (1 times — Snapp (cab 1))

  • Why are we able to change python tuple values even though they are immutable? (1 times — Snapp (cab 2))

  • What are the differences between Go and Python? Compare these two languages. (1 times — Snappshop)

  • How does referencing work in Python, and how does it determine when to clean up references? (1 times — Snappshop)

  • How does a Python project (django or fastapi) start up? How is it run from scratch? (1 times — Snappshop)

  • In Python, how does a request reach our service? (1 times — Snappshop)

  • Tell me about Django request life-cycle. (1 times — Toman Pay)

  • Can you tell what is the usage of UWSGI/Gunicorn? (1 times — Toman Pay)

  • Can You tell what are the migration files in django? (1 times — Toman Pay)

  • What is the difference between a @classmethod and a @staticmethod? When would you use a @classmethod? (1 times — Zibal)

    Answer

    @classmethod receives the class (cls) and is used for alternative constructors or methods that operate on class-level state. @staticmethod has no implicit first argument and is used for utility functions grouped with the class without accessing class or instance state. realpython

  • How do you create private methods in Python? (1 times — Zibal)

    Answer

    Use a single leading underscore _method to indicate ‘internal’ use (convention). Use double leading underscores __method for name-mangling to reduce accidental access from subclasses; note that nothing is truly private. - Python Private Methods Explained

  • Can you explain Django’s architecture? (1 times — Zibal)

    Answer

    Django follows an MTV (Model–Template–View) pattern: Models hold data/ORM; Views handle requests; Templates render presentation. Requests flow through middleware, URL routing sends them to views, which use models/templates; Django runs on WSGI/ASGI. - Understanding Django’s Architecture: The MTV Pattern

  • What are serializers in Django REST Framework (DRF)? (1 times — Zibal)

    Answer

    Django’s serialization framework provides a mechanism for “translating” Django models into other formats. Usually these other formats will be text-based and used for sending Django data over a wire, but it’s possible for a serializer to handle any format (text-based or not). djangoproject

  • What are custom permissions in DRF and how do you implement them? (1 times — Zibal)

    Answer

    Custom permissions encapsulate business authorization rules. Implement them by subclassing rest_framework.permissions.BasePermission and overriding has_permission and/or has_object_permission, then apply to views or viewsets. - DRF Permissions

  • How can use for example 30 core of cpu in production with python? (1 times — Zibal)

    Answer

    In Python, you scale CPU usage by running multiple processes, not threads. In production I usually run Uvicorn behind Gunicorn and configure it with one worker per CPU core—so on a 30-core machine, -w 30 lets the app fully utilize all cores.

        gunicorn app:app -k uvicorn.workers.UvicornWorker -w 30
    
  • Explain call by reference & call by value. (4 times — Hamkaran System, MH Holding, 2x Narvan)

  • What is abc? (1 times — Digikala)

  • We have one dictionary and we have a function that change this dictionary. If function doesn’t return anything, our dictionary changed or not? (1 times — Exalab)

  • Difference between list & set? Which one is faster? (1 times — Itoll)

Go

  • What is channel? (3 times — Autoshenas, Ozone, Siz-tel)

  • What is goroutine? (2 times — Quiz of Kings, Siz-tel)

  • How many goroutines can you create(open)? (2 times — Doctoreto, Metazi)

    Answer

    Millions are possible, limited by memory (heap + per-goroutine stack) and scheduling overhead. GOMAXPROCS controls parallel workers/OS threads (parallelism), not the total goroutine count. Real limit depends on your workload and memory profile. ardanlabs

  • What is OOP concepts that go don’t have it? (3 times — Hamkaran System, Snapp (cab 1), Sternx)

  • What is defer? (2 times — Hamkaran System, Snapp (cab 2))

  • We have a scenario that we have a goroutine and this goroutine wait for other goroutine how do you handle it? waitgroup. (2 times — MH Holding, Ozone)

  • What’s difference between goroutine and thread? (2 times — Cloudzy, 780)

    Answer
  • What is the difference between pointer receivers and value receivers in Go? (1 times — Cloudzy)

    Answer
  • How do you detect memory leaks in Go? (1 times — Cloudzy)

    Answer

    Using the pprof package to profile memory usage and inspect heap allocations. Observing increasing memory usage over time in long-running programs. Running Go’s race detector (go run -race) to catch goroutine leaks that may indirectly cause memory retention. - Memory Leaks in Go

  • What can happen if goroutines are not properly stopped or cleaned up? (1 times — Cloudzy)

    Answer

    If goroutines aren’t properly stopped, they can leak memory, waste CPU, and potentially cause deadlocks or resource exhaustion in the program.

  • Is there a semaphore concept in Go? (1 times — Doctoreto)

    Answer

    Go has no built-in semaphore type, but a counting semaphore is commonly implemented with a buffered channel or a small wrapper around sync primitives. sync provides low-level primitives; higher-level concurrency is often done with channels.

  • If you had to implement Go channels from scratch, how would you design them? (1 times — Doctoreto)

    Answer

    medium

  • How are goroutines blocked and woken up? Who handles that? (1 times — Doctoreto)

    Answer

    The Go runtime scheduler handles blocking/wakeup. Goroutines are parked when they wait on channels, locks, I/O, timers, or syscalls; the runtime keeps them on wait lists and moves them to runnable queues when the event occurs (timer, channel ready, I/O complete), then schedules them onto OS threads.

  • How can you reduce GC pressure in Go? (1 times — Doctoreto)

    Answer

    Reduce allocations and object lifetimes: reuse buffers, pool temporary objects, use sync.Pool for short-lived objects, avoid unnecessary boxing/heap escapes, prefer stack/value types when safe, batch work to reuse memory. Measure with pprof and trace before optimizing. victoriametrics

  • What is memory complexity when go tries to put our slice to another (big one)? (1 times — Hamkaran System)

  • What is the difference between strings in Go and C? (1 times — Hamkaran System)

  • What is rune and size? (1 times — Hamkaran System)

  • What is UTF-8 and difference with ASCII? What is 8 mean? What is UTF-16? (1 times — Hamkaran System)

  • What is method? (2 times — Hamkaran System, MH Holding)

  • How do we use the encapsulation concept in Go? (1 times — Hamkaran System)

  • What is garbage collector? (2 times — Hamkaran System, 780)

    Answer

    Go’s Garbage Collector (GC) is famously simple from a developer’s perspective (you just let variables fall out of scope), but under the hood, it is a highly sophisticated, modern piece of engineering.

    Its primary design goal is low latency, meaning it aims to keep application pause times as short as possible (typically under 500 microseconds), rather than maximizing overall throughput.

    Here is a breakdown of how Go’s GC works.

    1. The Core Algorithm: Tri-Color Mark-and-Sweep

    gc

    Go uses a concurrent tri-color mark-and-sweep algorithm.

    Imagine every object in memory as a node in a giant web, connected by pointers. The GC’s job is to start at “root” pointers (like global variables and local variables on your CPU stacks) and trace this web to find out what is still alive.

    To do this concurrently without stopping your program, it colors objects three ways:

    • White: The object has not been visited yet. (At the end of the cycle, anything still white is garbage).
    • Grey: The object has been visited, but the GC hasn’t yet checked the pointers inside this object to see what they point to. (Think of grey as the “to-do list”).
    • Black: The object has been visited, and all the objects it points to have been successfully marked grey/black. (This object is definitively alive and fully processed).

    The Rule: A black object must never be allowed to point directly to a white object. If that happens, the white object gets lost and becomes a memory leak.

    2. The Lifecycle of a GC Cycle

    A single GC cycle happens in four distinct phases. Two of these require briefly stopping your program (Stop-The-World, or STW), but they are incredibly fast.

    1. Mark Start (STW - very brief): The GC stops the program just long enough to scan the stacks and global variables. It turns everything those roots point to Grey, and turns the roots themselves Black.
    2. Concurrent Marking (No pause): The GC runs on dedicated background threads. It picks a Grey object, looks at the pointers inside it, and turns the objects it points to Grey. Once finished, it turns the original object Black. It repeats this until there are no Grey objects left. Meanwhile, your application is running normally.
    3. Mark Termination (STW - very brief): The GC stops the program again to clean up. It re-scans any stacks that might have changed during the concurrent phase, clears internal GC state, and prepares for the next step.
    4. Concurrent Sweeping (No pause): The GC runs in the background and walks through the memory pages. Any object that is still White is freed up and returned to the memory pool for future use.

    3. The Magic Trick: The Write Barrier

    If your program is running while the GC is coloring things, what happens if your program suddenly changes a pointer?

    For example: What if the GC just turned Object A Black, and then your program changes Object A to point to a brand new White object? This violates the core rule and means the new object would be mistakenly deleted.

    Go solves this using a Write Barrier. The Go compiler secretly injects a tiny piece of code every time your program writes to a pointer. If the GC is currently in the concurrent marking phase, this write barrier intercepts the assignment. It ensures that if a Black object is forced to point to a White object, the White object is immediately turned Grey (added to the to-do list) so it doesn’t get lost.

    Go specifically uses a Hybrid Write Barrier (introduced in Go 1.8) which drastically reduced the length of the STW pauses by simplifying how stack rescanning works.

    4. What Go’s GC Does NOT Do (Common Misconceptions)

    • No Generational GC: Languages like Java or V8 (JavaScript) use “generational” GCs, assuming that most objects die young (created and destroyed in milliseconds). They split the heap into “Young” and “Old” generations. Go does not do this. Go uses a unified heap. Why? Go’s pointer-heavy structures (like slices and maps) and the way Go code is typically written didn’t show a massive “die young” benefit, and a unified heap is much simpler to implement without introducing latency spikes.
    • No Compaction (Moving objects): Many GCs move surviving objects around in memory to pack them tightly together and prevent fragmentation. Go does not move objects. Once an object is allocated at a memory address, it stays there until it dies. This makes Go’s GC much faster and simpler, but it means memory can become fragmented over time.

    5. How to Control It

    By default, Go triggers a GC cycle when the heap size doubles. You can tweak this using environment variables:

    • GOGC: The default is 100 (meaning 100% growth = doubling). If you set GOGC=200, the heap can grow by 300% before a GC triggers (less frequent GC, but higher memory usage). If you set GOGC=50, it triggers after 50% growth (more frequent GC, lower memory footprint).
    • GOMEMLIMIT (Introduced in Go 1.19): This is a hard upper limit on total memory (heap + off-heap + OS overhead). If Go approaches this limit, it will trigger GC as aggressively as possible to try and stay under the ceiling, preventing your app from being killed by the OS’s Out-Of-Memory (OOM) killer.

    bytebytego

  • When should we use panic? (3 times — 3x Hamkaran System)

  • We have service out of here that panics somewhere and we don’t want panic here because here is more important imagine something like rocket system how can handle this? (1 times — Hamkaran System)

  • What is init in Go? How does it work and how does it differ from main? (1 times — Metazi)

    Answer

    go.dev

      `init()` is a special function: `func init()`. It runs automatically after package-level variables are initialized. You can have multiple `init()`s in a package. You cannot call `init()` yourself.
    
      Order: evaluate package vars → run that package’s `init()`s → repeat by dependency order → finally call `main.main()`.
    
      `main()` is the program entry point (`package main`, `func main()`) and runs once after all `init()`s finish.
    
  • If you have multiple goroutines that fetch data from different APIs and you want to gather all results and aggregate them, or wait with a timeout then aggregate, how can you do this? (1 times — Metazi)

    Answer
        package main
    
        import (
            "fmt"
            "sync"
            "time"
        )
    
        type Result struct {
            URL  string
            Body string
            Err  error
        }
    
        func fetch(url string) (string, error) {
            // do actual HTTP call...
            return "data-for-" + url, nil
        }
    
        func fetchPartial(urls []string, timeout time.Duration) map[string]string {
            var wg sync.WaitGroup
            resultsCh := make(chan Result, len(urls))
    
            for _, u := range urls {
                wg.Add(1)
                go func(u string) {
                    defer wg.Done()
                    body, err := fetch(u)
                    resultsCh <- Result{URL: u, Body: body, Err: err}
                }(u)
            }
    
            // close channel when all goroutines are done
            go func() {
                wg.Wait()
                close(resultsCh)
            }()
    
            aggregated := make(map[string]string)
            timeoutCh := time.After(timeout)
    
        Loop:
            for {
                select {
                case r, ok := <-resultsCh:
                    if !ok {
                        break Loop // channel closed, all responses received
                    }
                    if r.Err == nil {
                        aggregated[r.URL] = r.Body
                    } else {
                        // optionally log r.Err
                    }
                case <-timeoutCh:
                    // timeout occurred — stop waiting for more, but goroutines may still be running.
                    // To avoid leaks in real code, pass a context to requests so they cancel.
                    break Loop
                }
            }
            return aggregated
        }
    
        func main() {
            urls := []string{"a", "b", "c"}
            out := fetchPartial(urls, 2*time.Second)
            fmt.Println(out)
        }
    
  • How does Go manage goroutines? (1 times — Metazi)

    Answer

    The runtime scheduler uses three core concepts: G, M, and P.

      - G (goroutine): the user-level unit of concurrency (stack, state, metadata). Goroutines are cheap to create and their stacks grow and shrink as needed.
      - M (machine): an OS thread that actually executes Go code. The runtime creates and reclaims Ms as needed (e.g., to service blocking syscalls).
      - P (processor): a scheduler context that holds a run queue of runnable Gs and scheduling state. Only an M that has an associated P can run Go code. `GOMAXPROCS` controls how many Ps exist (how many goroutines can run in parallel).
    
      How scheduling works (high level):
    
      - Each P has a local run queue of runnable goroutines. When a goroutine becomes runnable it’s pushed to a P’s queue. When a P runs out of work it will steal goroutines from other Ps or pull from a global queue; this provides locality and load balancing.
      - The scheduler chooses a G from a P’s run queue and runs it on the M bound to that P. If that G blocks (channel wait, sleep, blocking syscall), it is parked and another G is scheduled.
    
  • What is generic? (1 times — MH Holding)

  • We have a scenario. We have two goroutine that traverse a slice. One is start from beginning and other starts from end. How each goroutine can know other one is in the middle of slice? With channels. (1 times — MH Holding)

  • What is context in go? (1 times — MH Holding)

  • Is Golang an OOP language? (1 times — Ozone)

  • What is Mutex? (1 times — Ozone)

  • Tell me about go data types. (1 times — Siz-tel)

  • What is difference between channel and connection in rabbitMQ? (1 times — Snappshop)

  • What is init function? (1 times — MH Holding)

  • What is a slice, and what is the difference between a slice and an array? (2 times — Hamkaran System, Siz-tel)

  • What is Promise? (1 times — Kharazmi)

  • What is stack and differences between heap? (1 times — Hamkaran System)

  • What is _ in imported packages? (1 times — Metazi)

    Answer

    _ is the blank identifier. When used in an import like import _ "pkg/path" it means: import the package solely for its side effects (package initialization) but do not bind any name to refer to it in the importing file. The compiler won’t complain about an unused import because the blank identifier intentionally discards the package name.

        import (
            _ "github.com/lib/pq" // register pq as a database/sql driver via its init()
        )
    
      (Aside: `_` is also used to discard values in assignments: `_, ok := m["x"]`.)
    
  • Why use it? If there is no need, should we remove it? Why do people still use it? (1 times — Metazi)

    Answer

    Use them when the package’s init() performs necessary side effects (driver registration, plugin/handler registration, global initialization). If a package has no needed side effects, remove the import.

  • Why write configs in init instead of main? What are the benefits? What are the problems if we write all code in init instead of main? (1 times — Metazi)

    Answer

    Pros: init() runs before main(), so it can prepare package-level state.

      Cons: `init()` cannot accept `context` or return errors, runs during tests, runs before flag/config parsing, and makes shutdown/signal handling hard. Prefer `main()` for orchestration, lifecycle and graceful shutdown.
    
  • Multiple packages each run an init that Printfs the package name. You import them in main, but main() is empty. What is the output? (1 times — Metazi)

    Answer
        // pkg/a/a.go
        package a
    
        import "fmt"
    
        func init() { fmt.Println("init a") }
    
        // pkg/b/b.go
        package b
    
        import "fmt"
    
        func init() { fmt.Println("init b") }
    
        // main.go
        package main
    
        import (
            _ "example.com/project/pkg/a"
            _ "example.com/project/pkg/b"
        )
    
        func main() {} // empty
    
      Important notes about the order:
    
      - Initialization (and therefore the `init()` prints) runs before `main()` is called.
      - The order between packages follows the import dependency graph: if `b` imports `a`, `init a` will always appear before `init b`.
      - If the packages are independent (neither imports the other), the relative order is unspecified — you should not rely on a particular ordering.
      - `main()` being empty produces no additional output.
    
      Output:
    
        init a
        init b
    
  • When you receive a request, how do you read data? How do you unmarshal it? (1 times — MH Holding)

  • What is anonymous function? (1 times — Siz-tel)

  • If we want to know type of var in runtime, how can figure out? (1 times — Siz-tel)

  • What is buffered and unbuffered channel in Go? (1 times — 780)

    Answer
    • Unbuffered (make(chan T)) has zero capacity and requires both sender and receiver to be ready simultaneously—acting as a synchronous handoff.

    • Buffered (make(chan T, n)) has a fixed queue; senders block only when full, receivers block only when empty—acting as an asynchronous mailbox.

      Unbuffered channels guarantee a synchronization point (safe for signaling), while buffered channels decouple goroutines for higher throughput. Use unbuffered by default for simplicity and safety; use buffered only for known bursts or rate-limiting, and never guess the buffer size without benchmarking.

  • What is a worker pool and what are its benefits? (1 times — 780)

    Answer
    • Bounded resource usage — you control exactly how many things run concurrently (e.g., match DB connection pool size).
    • Backpressure — if the queue fills up, producers slow down or block, instead of the system falling over.
    • Reusability — workers aren’t recreated per task, avoiding goroutine/thread spin-up overhead.
    • Easier to reason about — a known, fixed concurrency level makes load testing and capacity planning predictable.
    • Graceful shutdown — you can close the job channel and sync.WaitGroup.Wait() for a clean drain.

Database

  • How do database index columns work? (5 times — Quiz of Kings, Karnameh, Snapp (cab 2), 2x Snappshop)

  • What is ACID? (6 times — 2x Digikala, Karnameh, MH Holding, Zibal, 780)

    Answer
  • Can you list and explain common database isolation levels and the trade-offs between them? (4 times — Doctoreto, 2x Snappshop, 780)

    Answer

    geeksforgeeks Wikipedia

  • What is the difference between SQL and NoSQL? (3 times — Exalab, Siz-tel, Snapp (cab 2))

  • If our query is slow, how would you optimize it? What is your solution for this problem? (3 times — Hamkaran System, Snappshop, Wallex)

  • If you want to design a database, how do you determine which technologies or approaches to use? (3 times — Quiz of Kings, Digikala, 780)

  • When indexing is bad? (2 times — Snapp (cab 2), Snappshop)

  • What is redis data structures? (1 times — Quiz of Kings)

  • Suppose we have a queue and a redis and more requests sent to our web server how can handle to redis. redis can handle just a few requests. What’s your approach to handle scale? (1 times — Quiz of Kings)

  • Why you used Postgres in your company? What’s difference between Postgres and MySQL? (1 times — Autoshenas)

  • What is hash table? (1 times — Cloudzy)

    Answer

    In computer science, a hash table is a data structure that implements an associative array, also called a dictionary or simply map; an associative array is an abstract data type that maps keys to values. A hash table uses a hash function to compute an index, also called a hash code, into an array of buckets or slots, from which the desired value can be found. During lookup, the key is hashed and the resulting hash indicates where the corresponding value is stored. A map implemented by a hash table is called a hash map. wikipedia

  • Suppose we have an application that we sell it to customer. Now we want change the database of that without changing anything on that application because it’s not backward compatible how can we do that? (1 times — DAA)

  • Suppose we have a social media platform, and we want to retrieve all comments of a post. I am using a for statement for this scenario. Is this approach correct? How would you solve this? (1 times — Digikala)

  • If some service failed in microservice or some database broken, which approach can solve that? (1 times — Digikala)

  • What is eventual consistency in the context of databases and distributed systems? (1 times — Doctoreto)

    Answer

    a replication model where updates will propagate and replicas converge eventually (if no new updates), so reads may be stale briefly but become consistent over time. Practical trade-off: higher availability and latency at the cost of short-term anomalies. Wikipedia

  • What is the difference between WHERE and HAVING in SQL? (1 times — Exalab)

  • Have you experienced with mysql? (1 times — Exalab)

  • Scenario: We have some tables about students, courses and student course. (1 times — Itoll)

  • What is Redis? Why it’s fast? (1 times — Itoll)

  • What are transactions in a database? (1 times — Karnameh)

  • What is NoSql? (1 times — Narvan)

  • mongoDB is a NoSql? (1 times — Narvan)

  • What is LEFT OUTER JOIN? (1 times — Narvan)

  • What is redis data types? (1 times — Siz-tel)

  • What is primary key and foreign key in database? And what’s differences? (1 times — Snapp (cab 1))

  • If you have multiple users with the same password, resulting in identical hashes, and you want to ensure that their records in the database are unique, what can you do to make the records unique? (1 times — Snappshop)

  • We have a table with three fields: start time, end time and ID. This is too slow. How do you try to speed it up? (1 times — Snappshop)

  • What is ORM? (1 times — Wallex)

  • Can you example of some tables with one-to-one one-to-many many-to-many many-to-one? (1 times — Wallex)

  • Consider we have some tables and we have fk in each… // TODO (1 times — Wallex)

  • We have a cache for some data in our exchange that we show on the page to users, such as the number of trades, Tether price, etc. When the cached data is cleared, many requests hit the database directly, causing heavy load and potential downtime. How would you fix this problem? (1 times — Wallgold)

    Answer
    1. Primary Defense: The Mutex Lock with Stale Data Fallback

      This is your immediate and most critical fix. It directly stops the herd.

      How it works: When the cache for a key is found to be empty or expired, the first request to notice it acquires a distributed lock (e.g., in Redis). Only this request is permitted to query the database.

      Handling Subsequent Requests: All other concurrent requests for the same data are not sent to the database. Instead, they have two graceful paths:

      Wait Briefly: They can wait for a short, fixed period (e.g., 50-100ms) for the first request to populate the cache.

      Serve Stale Data (Preferred): Even better, the system immediately returns the recently expired (“stale”) data while the cache is being refreshed in the background. This provides the best user experience—fast responses with near-real-time data.

    2. Proactive Mitigation: Prevent Synchronized Expiration

      The thundering herd is often caused by thousands of cache entries expiring at the same moment.

      Jitter: Never set a fixed TTL (Time-To-Live). Instead, add a small, random value (±10%) to the expiration time. This spreads cache regeneration naturally over a window of time, preventing a synchronized stampede.

      Probabilistic Early Refresh: Before a cache entry officially expires, have a small percentage of requests (e.g., 1%) trigger an early refresh in the background. This “warms” the cache proactively, making it highly likely that a fresh value is already in place before the true expiration time.

    3. Architectural Decoupling: Asynchronous Cache Population

      For the ultimate resilience, decouple the user request from the cache regeneration process entirely.

      How it works: A cache miss never triggers a synchronous database call from a user request. Instead, the system always returns stale data or a default and pushes a “cache refresh task” for that key onto a background job queue (e.g., Redis Queue, SQS, Kafka).

      Benefit: User response times become immune to database performance. The background workers can process the refresh tasks at their own pace, and the database load is smoothed out. This is the most robust long-term pattern for high-throughput systems.

  • How does Django ORM address the N+1 query problem? (1 times — Zibal)

    Answer

    Django provides select_related for single-valued relationships and prefetch_related for many-to-many or reverse relations to eager-load related objects and avoid N+1 queries. You should profile queries and use .values() or annotations when appropriate. - Django ORM Performance Tips (YouTube) - Django Database Optimization - Django QuerySets

  • How can you ensure only one instance of your database adapter is created in Python? (1 times — Zibal)

    Answer

    With singleton pattern

  • What is elasticsearch? (1 times — Autoshenas)

  • Can you write query? (1 times — Narvan)

  • We have two queries that are unrelated to each other. How do you run these and combine their data? Do you run one first and then the other or how? (1 times — Snappshop)

  • How do you store money? (1 times — Visiwise)

    Answer

    Never use floating-point types (FLOAT, DOUBLE) for money. Use fixed-point precision:

    NUMERIC vs DECIMAL:

    DatabaseNUMERICDECIMALNotes
    PostgreSQLExact numeric typeAlias for NUMERICSame type, same behavior
    MySQLSynonym for DECIMALStandard SQL typeDECIMAL is preferred
    SQL ServerNot supportedStandard typeUse DECIMAL

    DECIMAL is the SQL standard; NUMERIC is PostgreSQL’s name for the same thing. Both store exact values with no rounding errors. Use DECIMAL for portability across databases.

    Storage for money:

    -- Prices and totals
    DECIMAL(12,2)    -- up to 999,999,999.99
    
    -- Exchange rates (higher precision)
    DECIMAL(18,8)    -- for crypto or FX rates
    
    -- Tax rates
    DECIMAL(5,2)     -- 0.00 to 999.99 percent
    

    In application code:

    from decimal import Decimal, ROUND_HALF_UP
    
    price = Decimal("19.99")
    tax = Decimal("0.0825")
    total = (price * (1 + tax)).quantize(Decimal("0.01"), rounding=ROUND_HALF_UP)
    # total = Decimal("21.64") ✅
    
    # ❌ Never do this
    total = 19.99 * 1.0825  # 21.6387025 — rounding nightmare
    

    Why not FLOAT/DOUBLE:

    0.1 + 0.2 == 0.3       # False!
    0.1 + 0.2               # 0.30000000000000004
    Decimal("0.1") + Decimal("0.2") == Decimal("0.3")  # True ✅
    

    Summary: Use DECIMAL (SQL standard) or NUMERIC (PostgreSQL). Never use FLOAT/DOUBLE for financial data. Always round at the display layer.

  • What is a dirty read? (1 times — 780)

    Answer

    A dirty read is a database error that happens when one transaction reads data changed by another transaction that has not finished or saved yet. If that first transaction cancels or rolls back its changes, the second transaction is left using data that never truly existed.

    • Transaction A changes a value (like lowering item count from 10 to 9) but does not commit/save yet.
    • Transaction B reads that new value (9) right before Transaction A finishes.
    • Transaction A encounters an error and rolls back, resetting the value back to 10.
    • Transaction B base their action on a false number (9), causing a dirty read error.

System Design

  • Microservices vs monolithic? How do you choose it when you want to start a project? (3 times — Snapp (cab 2), Snapp Market Pro, Tabdeal)

    Answer

    I usually start with a monolith and split it into microservices when needed. A monolith is faster to develop, easier to debug, and simpler to deploy and maintain, allowing the team to move quickly in the early stages. As the system grows and requirements such as independent scaling, team autonomy, or clear domain boundaries emerge, I gradually decompose it into microservices. This approach avoids the premature complexity of distributed systems—such as network communication, distributed transactions, and observability challenges—while keeping the architecture scalable.

  • What is event driven architecture? (1 times — Quiz of Kings)

  • We want to design a URL shortener system. How would you design it? (1 times — Quiz of Kings)

  • What is reverse proxy? (1 times — Autoshenas)

  • What would you do if suddenly we receive massive requests? How would you handle it? (1 times — Tabdeal)

  • For displaying a user’s daily Profit & Loss (P&L) in a crypto exchange system, which is more important: Consistency or Availability? Why? (1 times — Tabdeal)

  • What is double spending? (1 times — Tabdeal)

  • One service sent events to other service and retries it and we have 3 events in destination service how can handle it in second service? for example 3 same events of buy order. (1 times — Tabdeal)

  • How can we solve latency between our services in a microservices architecture? How can we protect against data loss? (1 times — Digikala)

  • What is consistency? (2 times — Doctoreto, Tabdeal)

    Answer

    In database systems (ACID), consistency (or correctness) refers to the requirement that any given database transaction must change affected data only in allowed ways. Any data written to the database must be valid according to all defined rules, including constraints, cascades, triggers, and any combination thereof. Wikipedia

    In CAP theorem: Every read receives the most recent write or an error. Consistency means that all clients see the same data at the same time, no matter which node they connect to. For this to happen, whenever data is written to one node, it must be instantly forwarded or replicated to all the other nodes in the system before the write is deemed ‘successful’ Wikipedia

  • What is a matching engine in an exchange? Explain how it works. (1 times — Netbox)

  • What is CAP theorem? (2 times — Snapp (cab 2), 780)

    Answer
  • How do you fix latency in microservices? (1 times — Snapp Market Pro)

  • Imagine a micro-services architecture. we want to follow up a request to have a track of them in the system. How do you suggest to track them. A: My Answer was to add a unique code in the header of the request (1 times — Toman Pay)

  • Writing and inserting data into the matching engine has become a bottleneck and slow for us. How can we solve this? (1 times — Wallex)

  • Suppose we have an e-commerce product (like Digikala) and there’s an issue: when I add one item to my basket, two are added. This happens sometimes. How would you fix this problem? (1 times — Wallgold)

    Answer
    1. Reproduce & observe

      Reproduce in dev with different browsers/devices and slow network.

      Capture request traces (client logs, server logs, request IDs, timestamps) and check analytics for patterns (specific browsers, mobile, retries).

    2. Identify likely causes

      Client: double-click, button not disabled, or UI retry/optimistic update doing a second call.

      Network/client library: automatic retry on timeout/resend.

      Server: non-idempotent endpoint creating two rows due to race conditions or missing uniqueness constraints.

      Message layer: duplicate messages processed twice.

    3. Fixes (short & practical)

      Client: disable add button after first click and debounce UI actions; show clear loading state.

      API: make the operation idempotent — accept an Idempotency-Key (or request id) and store processed keys to ignore duplicates.

      DB: enforce correctness with a uniqueness constraint on (cart_id, product_id) and use an atomic upsert to increment quantity, e.g.

  • We have two microservices. One of them is very slow and some requests time out without receiving a response. How can the other microservice handle this to avoid being affected? (1 times — Wallgold)

    Answer
    • Set a strict downstream timeout and propagate cancellation.

      • Use a circuit breaker to fail fast after repeated timeouts.

      • Retry only idempotent calls with exponential backoff + jitter (limit attempts).

      • Apply bulkheads (separate thread/connection pools) to isolate resources.

      • Provide fallbacks or cached responses where possible.

      • If suitable, make the call async (queue + worker) to decouple user latency.

      • Add metrics/tracing and alert on downstream latency/failure rates.

  • We have a very large, unstructured log file containing Divar chat data (ranging from gigabytes to terabytes). How would you approach detecting bot activity? (1 times — Wallgold)

    Answer
    1. Data Parsing and Structuring Reading File: To read a huge file efficiently, stream it in manageable chunks (e.g., several hundred MB at a time) instead of loading it all into memory. Use memory mapping for faster access when possible, and consider distributed or parallel processing frameworks like Apache Spark if you have large-scale infrastructure. Optimize I/O by tuning buffer sizes and, if applicable, store data in compressed or columnar formats to speed selective reads.

      Log Parsing: First, I’d parse the unstructured logs into a structured format (e.g., JSON or CSV) by extracting key fields such as timestamp, user ID, message content, IP address, and user agent (if available). This can be done using tools like Apache NiFi for data flow, or custom scripts with regular expressions, but for large-scale data, distributed processing is essential.

    2. Feature Engineering (Bot Indicators)

      Why: Bots exhibit patterns like bursty activity, repetition, and anomalies vs. human behavior. Key Features (Computed in Spark for scale):

      • Frequency: Messages per sender per hour/day (bots send 100x human rates).
      • Diversity: Unique receivers per sender (bots spam many).
      • Repetition: Message similarity (e.g., Jaccard or Levenshtein distance across a user’s messages).
      • Timing: Response latency (bots
  • What is middleware? (2 times — MH Holding, Toman Pay)

  • We have a system, and each time we receive an API request, imagine a user gets information. In the result, there are more data. How would you cache that? (1 times — Quiz of Kings)

  • What is DDD? (1 times — Autoshenas)

  • Which tools and mechanisms help keep a system consistent? (1 times — Doctoreto)

    Answer

    Common techniques: distributed consensus (Raft/Paxos), transactional guarantees (ACID), two-phase commit, idempotency + deduplication, transactional outbox and …

  • If you were given a project with slow loading performance, what steps would you take to improve it? (1 times — Kharazmi)

  • Suppose we used other service that has error how can handle it? (1 times — Hamkaran System)

  • In a microservices architecture, if service A depends on service B and a failure occurs mid-request (e.g., user balance is checked in A, then A calls B to deduct from the wallet, but B fails), how do you handle it? (1 times — Visiwise)

    Follow-up: Where does atomicity and rollback happen, and at what level do you solve this?

    Answer

    Where atomicity happens:

    Atomicity is per-service, not cross-service. Each service has its own local transaction. If A commits but B fails, A’s state is already written — you need a pattern to reconcile.

    Solutions by level:

    LevelPatternAtomicity Scope
    DatabaseLocal transactionsSingle service only
    MessagingTransactional OutboxGuarantees event delivery, not instant consistency
    SagaCompensation stepsLogical atomicity via rollback handlers
    APIRetry + idempotencyBest-effort, transient failure recovery

    Transactional Outbox (recommended):

    Service A:
    1. BEGIN TRANSACTION
       - INSERT into orders
       - INSERT into outbox (event: "deduct_wallet")
    2. COMMIT TRANSACTION (atomic — both succeed or both fail)
    3. Outbox poller → Kafka/RabbitMQ
    
    Service B:
    1. Consume message
    2. Idempotency check (event_id)
    3. BEGIN TRANSACTION
       - UPDATE wallet SET balance = balance - amount
       - INSERT into processed_events
    4. COMMIT TRANSACTION
    

    Failure recovery:

    Failure PointRecovery
    A’s DB commit failsFull rollback — no side effects
    A’s outbox poll failsEvent stays in outbox, retried
    B fails to processMessage retried by broker
    B processes twiceIdempotency check rejects duplicate

    Saga (for multi-step flows):

    Order Saga:
      Step 1: Create order      → compensation: cancel order
      Step 2: Deduct wallet     → compensation: refund wallet
      Step 3: Reserve inventory → compensation: release inventory
    
    If Step 3 fails:
      → refund wallet (Step 2 reverse)
      → cancel order (Step 1 reverse)
    

    Key takeaway: Atomicity in microservices is per-service (local DB transactions). Cross-service consistency is achieved through eventual consistency patterns (Saga, Outbox), not distributed transactions (2PC).

  • How do you update a user’s feed when they follow or unfollow someone? (1 times — Netbox)

  • Suppose we have sent a request to a service and an action failed. How can we handle other processes to know that the action has failed and handle them accordingly? (1 times — Ozone)

  • We have an API and we want to add new features on it. How can we handle compatibility with older version? v1 v2 (1 times — Snapp (cab 2))

  • How can we make sure that the codes you said, are unique? A: My answer was using UUID (1 times — Toman Pay)

  • Ok, we made the requests unique. Where can we store them? (1 times — Toman Pay)

  • Can you tell me the software layers that a request goes through in our code, and where it ends up? (1 times — Wallex)

  • Suppose we want to send 1 million notification and need request it to db how u handle it? (1 times — Wallex)

  • When do you use a cache? (1 times — Wallex)

  • Suppose we have a lot of requests and the number of our requests has increased. How do you handle this and manage it? (1 times — Wallex)

  • Think we know the problem is from front-end and we don’t want to deploy new version in front and want to fix it for short time in backend how fix it? (1 times — Wallgold)

    Answer
    1. Fast dedupe/lock in cache (Redis)

      Prevent processing the same “add” twice within a short window (2–5s). Build a dedupe key from stable request factors you have today (authenticated user_id or session_id, product_id, and a hash of the request body / headers). Use SET key value NX PX .

    2. Make DB operation idempotent/atomic (defensive)

      Even with Redis, races or Redis failures can happen. Enforce a DB-level uniqueness + atomic upsert so duplicates can’t create two rows.

    3. Optional: Consumer-side dedupe / idempotency store

      If your API is queue-based or background-processed, store processed request IDs (or the same dedupe key) for a short TTL and ignore duplicates.

    4. Response strategy & UX-friendly behavior

      When duplicate is detected in cache, return a harmless success (200) with current cart state — avoids confusing the frontend.

      If you detect duplicate after DB upsert, return the updated qty (so frontend can reconcile).

    5. Observability & short-term rollout

      Add logging/metric (count of dedupe-hits, Redis failures, db-constraint triggers).

      Feature-flag the change if possible; otherwise deploy in a safe rollout.

      Monitor for false positives (legitimate rapid adds being collapsed) and tune TTL (e.g., 2–5s).

    6. Caveats

      This is a short-term backend mitigation. It can merge legitimate rapid adds (user intentionally clicks twice quickly) — verify acceptable with product.

      Long-term: fix front-end (disable button/debounce + send idempotency key) for best UX.

  • How would you design a project for scale? What challenges might you face at scale? How would you design the data pipeline and scraper at scale? (1 times — Visiwise)

  • Design a mobile top-up system where users can purchase prepaid credit by entering their phone number and selecting a mobile operator. Assume each operator exposes a set of APIs for processing top-ups. Walk through your system design and the end-to-end request flow. (1 times — 780)

    Answer

    Step-by-step

    1. Create the transaction

    Status: pending


    2. Reserve the wallet balance

    • Don’t deduct it yet.
    • Move the amount from available to reserved.

    Status: FundsReserved


    3. Publish TopUpRequested

    The worker processes the request asynchronously.


    4. Call the operator

    If successful:

    • Capture the reservation (permanently deduct the funds).
    • Mark the transaction as Completed.

    If failed:

    • Release the reservation.
    • Mark the transaction as Failed.

    Why reserve instead of deduct immediately?

    Suppose the user has $10 and buys a $10 top-up.

    If you deduct immediately and the operator later returns an error, you must issue a refund, which introduces extra complexity and can fail.

    With reservations:

    • The money is temporarily locked.
    • It can’t be spent twice.
    • If the operator fails, you simply release the reservation.
    • If the operator succeeds, you capture it.

    This is the same pattern used by payment systems (authorization → capture).

  • We get an error when buying a top-up from a third-party operator, for example, a timeout. How would you handle this? (1 times — 780)

    Answer
    Reserve Funds
        │
        ▼
    Call Operator
        │
        ▼
    Timeout
    

    You should not immediately release the reservation because the operator may have successfully processed the top-up but failed to send a response.

    Instead:

    1. Mark the transaction as Pending.
    2. Retry or query the operator’s status API (or wait for a webhook if available).
    3. Only after receiving a definitive success or failure:
    • Capture the reservation on success.
    • Release the reservation on failure.

    This avoids both charging the user without delivering the top-up and giving away a free top-up. This pattern is commonly used in payment and financial systems to ensure consistency across distributed services.

Concurrency

  • What is race condition? (5 times — Quiz of Kings, Hamkaran System, Saraf, 2x Zibal)

    Answer

    A race condition happens when concurrent operations interleave and produce incorrect state. Solve it with mutual exclusion (mutexes) for in-process protection, transactions, locks (pessimistic or optimistic), atomic DB operations, idempotency, or by redesigning to avoid shared mutable state.

  • What is concurrency and parallelism? (4 times — Digikala, Hamkaran System, MH Holding, Siz-tel)

  • What is the difference between multithread and multiprocess? (2 times — Exalab, Snapp (cab 2))

  • What is the difference between multithreading and concurrency? (1 times — Snappshop)

  • What is the difference between a thread and a process? (1 times — Zibal)

    Answer

    Threads share a process memory space (lightweight, require synchronization). Processes have separate memory (safer isolation, heavier IPC). Choose threads for shared-memory, processes for isolation.

  • How can send data between processes? (1 times — Hamkaran System)

Networking

  • What is REST? (3 times — Autoshenas, Phanous, Wallex)

  • What does “stateless” mean in the context of REST? (2 times — Autoshenas, DAA)

  • How can link IP to domain in nginx? (2 times — Autoshenas, MH Holding)

  • Are there any APIs that are not stateless? (1 times — Autoshenas)

  • Valid parentheses (1 times — BitPin)

    Answer
        def check_braces(args: str)-> bool:
            dic = {'(':')', '[':']', '{':'}'}
            stack = []
            for s in args:
                if s in dic:
                    stack.append(s)
                elif stack == [] or dic[stack.pop()] != s:
                    return False
            return stack == []
    
  • Candy (1 times — BitPin)

    Answer
        def student_gift(nums: list):
            ans = [1] * len(nums)
            for i in range(len(nums)):
                for i in range(1, len(nums)):
                    if nums[i] > nums[i - 1]:
                        if ans[i] > ans[i -1]:
                            continue
                        else:
                            ans[i]+= 1
                    elif nums[i] < nums[i-1]:
                        if ans[i] < ans[i -1]:
                            continue
                        else:
                            ans[i-1]+=1
    
                for i in range(len(nums) - 1, 0, -1):
                    if nums[i] > nums[i - 1]:
                        if ans[i] > ans[i -1]:
                            continue
                        else:
                            ans[i]+= 1
                    elif nums[i] < nums[i-1]:
                        if ans[i] < ans[i -1]:
                            continue
                        else:
                            ans[i-1]+=1
    
            return ans
    
    
        students = [18, 14, 10,20]
        students2 = [i for i in range(1, 15)]
        students2.reverse()
        print("test case 1: ", students)
        result = student_gift(students)
        print("answer: ", result)
        print("test case 2: ", students2)
        result = student_gift(students2)
        print("answer: ", result)
    
  • What is restful? (1 times — DAA)

  • What is the difference between gRPC and REST? (1 times — Exalab)

  • Game theory question (pirate game) (1 times — Hermes Capital)

  • Tell me about http protocol. (2 times — 2x Karnameh)

  • What is difference between http and https? (1 times — Karnameh)

  • What is http1 and http2 differences? (1 times — Narvan)

  • When type google.com what’s happening? (1 times — Phanous)

  • What is difference between tcp & udp? (2 times — 2x Phanous)

  • What is OSI model? Say name of 7 layers. (1 times — Snapp (cab 1))

  • two sum (1 times — Yektanet)

Algorithms & Data Structures

  • What is hash collision and how do you resolve it? (2 times — Cloudzy, Hamkaran System)

    Answer
  • What is linked list? (2 times — Itoll, MH Holding)

  • What are the time complexities of search, insert, and delete in a linked list? (1 times — Cloudzy)

    Answer

    Search: O(n) Delete: O(1) Insert: O(1) - Big-O Cheatsheet

  • What is data structure behind map? (1 times — Hamkaran System)

  • Which one is better? linked list or array? (1 times — Itoll)

  • How can delete an item in linked list? (1 times — Itoll)

  • For delete, which one is faster? array or linked list? (1 times — Itoll)

  • What is fastest sorting algorithm? And what’s its time complexity? (1 times — Snapp (cab 1))

  • We want to implement a simple token-bucket algorithm in middleware to rate-limit users? (2 times — Saraf, Zibal)

    Answer

    Run

        package main
    
        import (
            "fmt"
            "time"
        )
    
        type User struct {
            accountID      int64
            capacity       int64
            counter        int64
            refillRate     int64
            lastRefillTime time.Time
        }
    
        func handler(user User, userData map[int64]User) {
            if _, ok := userData[user.accountID]; ok {
                fmt.Println("OK")
                ud := userData[user.accountID]
                if ud.counter >= ud.capacity {
                    fmt.Println(ud.counter)
                    panic("rate limit reached")
                }
                ud.counter++
                fmt.Println(ud.counter)
                elapsTime := time.Now().Unix() - ud.lastRefillTime.Unix()
                ud.counter += elapsTime * ud.refillRate
            } else {
                u := User{accountID: 123, capacity: 10, counter: 0, refillRate: 1}
                userData[u.accountID] = u
            }
            fmt.Println(user.counter, " ", user.capacity, " ", user.refillRate, " ", user.lastRefillTime)
        }
    
        func main() {
            userData := make(map[int64]User, 0)
            newUser := User{accountID: 123, capacity: 10, counter: 0, refillRate: 1, lastRefillTime: time.Now()}
            for i := range 10 {
                fmt.Println("i:", i)
                handler(newUser, userData)
            }
        }
    
  • First question (1 times — BitPin)

    Answer
        in_put = str(input())
        res = in_put.split()
        print(len(res[len(res) - 1]))
    
  • Second question (1 times — BitPin)

    Answer
        def check_2sum(nums: list, k: int) -> tuple | int:
            map_ = {}
            for i in range(len(nums)):
                map_[nums[i]] = i
    
            for i in range(len(nums)):
                target = k - nums[i]
                if target in map_ and map_[target] != i:
                    return i + 1, map_[target] + 1
    
            return -1
    
        n, target = map(int, input().split())
        nums = list(map(int, input().split()))
        res = check_2sum(nums, target)
    
        if res == -1:
            print(res)
        else:
            print(*res)
    
  • Third question (1 times — BitPin)

    Answer
        def longest_palindromic_subsequence(s: str) -> int:
        n = len(s)
        dp = [[0] * n for _ in range(n)]
    
        for i in range(n):
            dp[i][i] = 1
    
        for length in range(2, n + 1):
            for i in range(n - length + 1):
                j = i + length - 1
                if s[i] == s[j]:
                    if length == 2:
                        dp[i][j] = 2
                    else:
                        dp[i][j] = dp[i + 1][j - 1] + 2
                else:
                    dp[i][j] = max(dp[i + 1][j], dp[i][j - 1])
    
        return dp[0][n - 1]
    
        print(longest_palindromic_subsequence(input()))  # Output: 3 # Output: 5
    
  • We have this menu and there are task & subtasks. How you can traverse all items and access to each? (1 times — Sternx)

  • Math question: The market has reached a state where it has fallen 5 units, then after a while, it rises 1 unit, and this pattern has repeated. How can we predict the market for some time ahead (for example, a month)? How can we assess its probability? Do you have a solution? (1 times — Wallex)

  • Implement an LRU Cache in 20 mins. (1 times — Tabdeal)

    Answer (My solution)
    class LRUCache:
        def __init__(self, capacity: int) -> None:
            self.capacity = capacity
            self.cache = {}
            
        def put(self, key: int, value: int):
            if key in self.cache:
                self.cache[key] = value
                self.cache[key] = self.cache.pop(key)
            else:
                if len(self.cache) == self.capacity:
                    del self.cache[next(iter(self.cache))]
                self.cache[key] = value
    
        def get(self, key: int):
            if key not in self.cache:
                return -1
            self.cache[key] = self.cache.pop(key)
            return self.cache[key]
    
        def print_cache(self):
            print(self.cache)
    
    c = LRUCache(3)
    
    c.put(1,1)
    c.put(2,2)
    c.put(3,3)
    c.print_cache()
    c.get(2)
    c.get(1)
    c.print_cache()
    c.put(4,4)
    c.print_cache()
    
  • You have n files (txt) and we want to remove duplicate files. How do you do it? (1 times — 780)

    Answer

    Part 1: Standard Scenario (Sufficient RAM)

    When you have enough RAM, the primary goal is speed. We can leverage in-memory data structures to avoid unnecessary disk I/O.

    The Algorithm

    1. Filter by Size: Iterate through all n files and group them by their file size. If two files have different sizes, they absolutely cannot be duplicates. This eliminates the vast majority of files instantly with zero file-content reading.
    2. Hash the Content: For files that share the same size, read their contents and calculate a cryptographic hash (e.g., SHA-256).
    3. Use a Hash Map: Use an in-memory dictionary/hash map where the Key is the SHA-256 hash and the Value is a list of file paths.
    4. Resolve Duplicates:
      • If you compute a hash and it’s not in the map, add it.
      • If the hash is already in the map, append the current file path to the value list.
    5. Delete: Iterate through your hash map. For every key that has more than one file path in its list, keep the first file and delete the rest.

    Complexity

    • Time Complexity: O(N) where N is the total number of bytes across all files.
    • Space Complexity: O(U) where U is the number of unique files (required to store the hash map and active file handles).
  • OK, you don’t have enough RAM to read the files; you only have 20KB of RAM. What would you do? (1 times — 780)

    Answer

    Part 2: Constrained Scenario (Only 20KB RAM)

    20KB of RAM is extremely restrictive. You cannot hold a standard hash map, nor can you hold a large list of file paths (a 100-character path string for 200 files already exceeds 20KB).

    You must rely entirely on External Sorting and Streaming (Chunking). This approach is similar to how classic Unix tools like fdupes operate under the hood, heavily optimized for disk rather than RAM.

    Step 1: Group by Size using Disk

    Since you cannot hold a map of size -> [files] in RAM, you offload this grouping to disk.

    1. Create a temporary text file (sizes.txt).
    2. Read the directory. For each file, append FileSize|FilePath\n to sizes.txt. (This takes almost zero RAM).
    3. Use an External Sort (e.g., a disk-based merge sort) to sort sizes.txt numerically by the file size. Note: External sort only requires small sequential reads/writes of chunks into your 20KB RAM buffer.
    4. Iterate through the sorted sizes.txt sequentially. Any file with a unique size is immediately marked as “Keep”. Group the paths of files with identical sizes into temporary “candidate lists” on disk.

    Step 2: Progressive Chunking (No Hashing)

    Why no hashing in this scenario? To hash a file, you must process every single byte of the file. If two 10GB files differ in the very first byte, reading and hashing the remaining 10GB is a massive waste of disk I/O.

    Instead, compare the candidate files byte-by-byte in small chunks that fit inside your 20KB RAM limit.

    Assume you have a group of 5 candidate files that are all exactly 1,000,000 bytes long:

    1. Open all 5 file handles simultaneously.
    2. Allocate a small read buffer in your RAM (e.g., a 2KB character array).
    3. Read the first 2KB from File 1 into Buffer A.
    4. Read the first 2KB from File 2 into Buffer B and compare them.
      • If they differ: Close File 2. It is unique. Remove it from the candidate group.
      • If they match: Discard Buffer B, read File 3 into Buffer B, compare against Buffer A, and so on.
    5. RAM Check: Comparing 5 files requires holding one 2KB “master” buffer and one 2KB “comparison” buffer at a time (4KB total). This easily fits in 20KB. (If the candidate group is massive, you might have to compare in sub-groups, but typically, groups of identical sizes are small).
    6. Once you have compared the first 2KB of all candidates, discard the buffers, advance the file pointers, and repeat the process for the next 2KB chunk.
    7. If you reach the End of File (EOF) and multiple files have matched perfectly across all chunks, they are exact duplicates.

    Step 3: Delete

    Keep the first file in the fully matched group, and issue OS-level delete commands for the rest.

  • We have a file with a lot of names. How do you remove duplicate names? (1 times — 780)

    Answer

    In-memory: Stream the file, use a hash set to track seen names, write only first occurrences — O(n) time, O(unique names) memory. In go we can use map.

  • Right! If we don’t want to use memory, how do we solve it? (1 times — 780)

    Answer

    We just must use O(n^2) loop.

DevOps & Infrastructure

  • What is docker & kubernetes? (6 times — Quiz of Kings, 2x Autoshenas, Phanous, Snapp (cab 2), Snappshop)

  • What is the difference between virtual machine and docker? (2 times — Snapp (cab 2), Snappshop)

  • What is EXPOSE in docker? (1 times — Autoshenas)

  • Can you build up a project with docker? (1 times — Autoshenas)

  • What is image in docker? (1 times — MH Holding)

  • What is systemD? (1 times — Narvan)

  • How network models in docker? (1 times — Narvan)

  • What features does Linux have that Docker uses for isolated and separate operating systems and for running multiple isolated operating systems? (1 times — Snappshop)

  • How can we know capacity of disk or directory? what command? (1 times — Narvan)

  • What is CI and CD? and the differences? (1 times — Snapp (cab 2))

  • The pod is not down, but you have an error (for example, error 500). How do you know where it comes from? (1 times — Snappshop)

  • How do you determine if an application is slow, and how do you measure it? (1 times — Snappshop)

Message Brokers & Queues

  • What is event sourcing and CQRS? (1 times — Autoshenas)

  • When do you use queue? (1 times — Tabdeal)

  • When do you use kafka? (1 times — Exalab)

  • What is partition in kafka? (1 times — Exalab)

  • We have two consumers and there are a hundred messages in the queue (RabbitMQ). The first one takes all of them. What should we do so that the second one also receives some? (1 times — Snappshop)

  • What if Our RabbitMQ or Celery Fails? What is your solution not too lose any of the tracking data? (1 times — Toman Pay)

  • What mechanisms do you use to make message processing resilient? (1 times — Doctoreto)

    Answer

    Transactional outbox

  • How to know how many queues do we need? (I didn’t know the answer!) (1 times — Toman Pay)

Testing

  • You mentioned using BDD, how do you write BDD-style tests? (1 times — Cloudzy)

  • You wrote: “I used Test-Driven Development (TDD) to write tests for critical components, ensuring functional accuracy and improving code quality.” How do tests improve code quality? (1 times — Netbox)

  • Is TDD OK? If I say we don’t need to write tests, what’s your reaction in a team? (1 times — Wallex)

  • You mentioned a simulator bot on your resume. How do you use it to test features and load? (The simulator bot acts like real users to validate functionality and performance.) (1 times — Netbox)

  • Is writing tests good or bad, since there usually isn’t enough time to write them? What’s your opinion? (1 times — Netbox)

Git

  • What is git rebase? (2 times — Sternx, Wallex)

  • What is gitflow and workflow? (1 times — Siz-tel)

  • How you fix merge conflict? (1 times — Snappshop)

  • What is difference between git Merge and Rebase? (1 times — Snappshop)

  • What is fast-forward? (1 times — Snappshop)

  • How do you push commits to another branch? (1 times — Zibal)

    Answer

    cherry-pick

Security & Cryptography

  • What is difference between Authentication and Authorization? (1 times — DAA)

  • Someone tries to login our system with brute force approach. What’s your solution to deal with this problem? (1 times — Phanous)

  • What is the difference between hashing and encryption? (1 times — Snappshop)

  • What is difference between RSA and AES? (1 times — Snappshop)

  • What hashing algorithm do you use? (1 times — Snappshop)

  • When we want to know a user authenticated or not for some action, how know that and how we handle that? (1 times — Wallex)

Design Patterns & SOLID

  • What is SOLID? (5 times — Digikala, Itoll, Kharazmi, Snapp (cab 2), Wallex)

  • What is polymorphism? (2 times — Itoll, Snapp (cab 1))

  • What is MVC? (1 times — Digikala)

  • Which part of MVT that we working with data? (1 times — Digikala)

  • What is singleton? (1 times — Digikala)

  • What is dependency inversion? (3 times — 3x Wallex)

  • What is object pool? (1 times — Digikala)

  • What is a design pattern, and which design patterns have you used? (7 times — Digikala, Exalab, Itoll, MH Holding, Snapp (cab 1), Sternx, Wallex)

  • What is DI? (2 times — Digikala, Zibal)

    Answer

    Dependency injection supplies an object’s dependencies from the outside (constructor, setter, or factory) rather than creating them internally; this improves testability, decoupling, and configurability.

  • Why do we use a repository layer in a service? (1 times — Zibal)

    Answer

    A repository abstracts persistence, centralizes queries, and decouples domain logic from storage details — making testing, swapping databases, and enforcing consistency simpler.

OOP

  • What is abstract class? (1 times — Itoll)

  • What is access modifiers? (1 times — Snapp (cab 1))

  • What is interface? (3 times — Itoll, MH Holding, Siz-tel)

  • How can create private methods? (1 times — Digikala)

  • What is data binding? How many types does it have? (1 times — Kharazmi)

  • What is update method? (1 times — Karnameh)

  • Write a base class in C++ that name is Animal then create two child classes of it like Dog and Cat and each of these have Eat method but Eat is different in Dog and Cat. And we create some instance of these classes and put them into an array. How can we do that? What is the type of this array? (1 times — Snapp (cab 1))

gRPC & Communication

  • What are the main benefits of gRPC? (2 times — Doctoreto, Narvan)

    Answer

    High performance (HTTP/2 multiplexing), low latency, built-in streaming (client/server/bi-directional), strongly typed contracts via protobuf and code generation, language polyglot support, and built-in interception hooks (auth, load–balancing). Good for microservices and low-latency RPCs.

  • What is RPC? (1 times — Digikala)

Misc

  • When you prefer use other packages or write your library? (2 times — 2x Autoshenas)
  • What is signal? (1 times — Kharazmi)
  • What is eventEmitter? (1 times — Kharazmi)
  • What are guards in Angular? where have you used them? (1 times — Kharazmi)
  • What is Angular optimization? (1 times — Kharazmi)
  • Have you ever had a weird bug in production even though all your tests passed? How did you fix it? (1 times — Football360)
  • We have 2 mindsets in software engineering. One is “tools, languages and stack is not important, you should solve problems regardless of tools.” and the other one is “tools is important and everyone have to solve problems with tools that know them”. Which mindset do you prefer? (1 times — Ozone)

780

Status

📜📞🔧🔧❌

Interview process

flowchart LR
    sr(Send resume) --> hr(HR call) --> ti(Technical Interview I) --> task(Task)--> ti2(Task Review) --rejected--x hr2(HR Interview) -.-> o(Offer)

Apply Way

jobinja

Interview Date

  • Sent Resume
    1405.04.21

  • HR Call
    1405.04.21

  • Technical InterviewI
    1405.04.28

  • Technical InterviewII
    1405.05.05

  • Rejection Email
    1405.05.10

Interview Duration

  • Technical Interview I
    1 hour

  • Technical InterviewII
    1 hour

Interview Platform

Google Meet

Technical Interview I

  • Tell me about yourself.

  • What’s the difference between a goroutine and an OS thread?

    Answer
  • What is buffered and unbuffered channel in Go?

    Answer
    • Unbuffered (make(chan T)) has zero capacity and requires both sender and receiver to be ready simultaneously—acting as a synchronous handoff.

    • Buffered (make(chan T, n)) has a fixed queue; senders block only when full, receivers block only when empty—acting as an asynchronous mailbox.

      Unbuffered channels guarantee a synchronization point (safe for signaling), while buffered channels decouple goroutines for higher throughput. Use unbuffered by default for simplicity and safety; use buffered only for known bursts or rate-limiting, and never guess the buffer size without benchmarking.

  • What is a worker pool and what are its benefits?

    Answer
    • Bounded resource usage — you control exactly how many things run concurrently (e.g., match DB connection pool size).
    • Backpressure — if the queue fills up, producers slow down or block, instead of the system falling over.
    • Reusability — workers aren’t recreated per task, avoiding goroutine/thread spin-up overhead.
    • Easier to reason about — a known, fixed concurrency level makes load testing and capacity planning predictable.
    • Graceful shutdown — you can close the job channel and sync.WaitGroup.Wait() for a clean drain.
  • How does Go’s garbage collector work?

    Answer

    Go’s Garbage Collector (GC) is famously simple from a developer’s perspective (you just let variables fall out of scope), but under the hood, it is a highly sophisticated, modern piece of engineering.

    Its primary design goal is low latency, meaning it aims to keep application pause times as short as possible (typically under 500 microseconds), rather than maximizing overall throughput.

    Here is a breakdown of how Go’s GC works.

    1. The Core Algorithm: Tri-Color Mark-and-Sweep

    gc

    Go uses a concurrent tri-color mark-and-sweep algorithm.

    Imagine every object in memory as a node in a giant web, connected by pointers. The GC’s job is to start at “root” pointers (like global variables and local variables on your CPU stacks) and trace this web to find out what is still alive.

    To do this concurrently without stopping your program, it colors objects three ways:

    • White: The object has not been visited yet. (At the end of the cycle, anything still white is garbage).
    • Grey: The object has been visited, but the GC hasn’t yet checked the pointers inside this object to see what they point to. (Think of grey as the “to-do list”).
    • Black: The object has been visited, and all the objects it points to have been successfully marked grey/black. (This object is definitively alive and fully processed).

    The Rule: A black object must never be allowed to point directly to a white object. If that happens, the white object gets lost and becomes a memory leak.

    2. The Lifecycle of a GC Cycle

    A single GC cycle happens in four distinct phases. Two of these require briefly stopping your program (Stop-The-World, or STW), but they are incredibly fast.

    1. Mark Start (STW - very brief): The GC stops the program just long enough to scan the stacks and global variables. It turns everything those roots point to Grey, and turns the roots themselves Black.
    2. Concurrent Marking (No pause): The GC runs on dedicated background threads. It picks a Grey object, looks at the pointers inside it, and turns the objects it points to Grey. Once finished, it turns the original object Black. It repeats this until there are no Grey objects left. Meanwhile, your application is running normally.
    3. Mark Termination (STW - very brief): The GC stops the program again to clean up. It re-scans any stacks that might have changed during the concurrent phase, clears internal GC state, and prepares for the next step.
    4. Concurrent Sweeping (No pause): The GC runs in the background and walks through the memory pages. Any object that is still White is freed up and returned to the memory pool for future use.

    3. The Magic Trick: The Write Barrier

    If your program is running while the GC is coloring things, what happens if your program suddenly changes a pointer?

    For example: What if the GC just turned Object A Black, and then your program changes Object A to point to a brand new White object? This violates the core rule and means the new object would be mistakenly deleted.

    Go solves this using a Write Barrier. The Go compiler secretly injects a tiny piece of code every time your program writes to a pointer. If the GC is currently in the concurrent marking phase, this write barrier intercepts the assignment. It ensures that if a Black object is forced to point to a White object, the White object is immediately turned Grey (added to the to-do list) so it doesn’t get lost.

    Go specifically uses a Hybrid Write Barrier (introduced in Go 1.8) which drastically reduced the length of the STW pauses by simplifying how stack rescanning works.

    4. What Go’s GC Does NOT Do (Common Misconceptions)

    • No Generational GC: Languages like Java or V8 (JavaScript) use “generational” GCs, assuming that most objects die young (created and destroyed in milliseconds). They split the heap into “Young” and “Old” generations. Go does not do this. Go uses a unified heap. Why? Go’s pointer-heavy structures (like slices and maps) and the way Go code is typically written didn’t show a massive “die young” benefit, and a unified heap is much simpler to implement without introducing latency spikes.
    • No Compaction (Moving objects): Many GCs move surviving objects around in memory to pack them tightly together and prevent fragmentation. Go does not move objects. Once an object is allocated at a memory address, it stays there until it dies. This makes Go’s GC much faster and simpler, but it means memory can become fragmented over time.

    5. How to Control It

    By default, Go triggers a GC cycle when the heap size doubles. You can tweak this using environment variables:

    • GOGC: The default is 100 (meaning 100% growth = doubling). If you set GOGC=200, the heap can grow by 300% before a GC triggers (less frequent GC, but higher memory usage). If you set GOGC=50, it triggers after 50% growth (more frequent GC, lower memory footprint).
    • GOMEMLIMIT (Introduced in Go 1.19): This is a hard upper limit on total memory (heap + off-heap + OS overhead). If Go approaches this limit, it will trigger GC as aggressively as possible to try and stay under the ceiling, preventing your app from being killed by the OS’s Out-Of-Memory (OOM) killer.

    bytebytego

  • You have n files (txt) and we want to remove duplicate files. How do you do it?

    Answer

    Part 1: Standard Scenario (Sufficient RAM)

    When you have enough RAM, the primary goal is speed. We can leverage in-memory data structures to avoid unnecessary disk I/O.

    The Algorithm

    1. Filter by Size: Iterate through all n files and group them by their file size. If two files have different sizes, they absolutely cannot be duplicates. This eliminates the vast majority of files instantly with zero file-content reading.
    2. Hash the Content: For files that share the same size, read their contents and calculate a cryptographic hash (e.g., SHA-256).
    3. Use a Hash Map: Use an in-memory dictionary/hash map where the Key is the SHA-256 hash and the Value is a list of file paths.
    4. Resolve Duplicates:
      • If you compute a hash and it’s not in the map, add it.
      • If the hash is already in the map, append the current file path to the value list.
    5. Delete: Iterate through your hash map. For every key that has more than one file path in its list, keep the first file and delete the rest.

    Complexity

    • Time Complexity: O(N) where N is the total number of bytes across all files.
    • Space Complexity: O(U) where U is the number of unique files (required to store the hash map and active file handles).
  • OK, you don’t have enough RAM to read the files; you only have 20KB of RAM. What would you do?

    Answer

    Part 2: Constrained Scenario (Only 20KB RAM)

    20KB of RAM is extremely restrictive. You cannot hold a standard hash map, nor can you hold a large list of file paths (a 100-character path string for 200 files already exceeds 20KB).

    You must rely entirely on External Sorting and Streaming (Chunking). This approach is similar to how classic Unix tools like fdupes operate under the hood, heavily optimized for disk rather than RAM.

    Step 1: Group by Size using Disk

    Since you cannot hold a map of size -> [files] in RAM, you offload this grouping to disk.

    1. Create a temporary text file (sizes.txt).
    2. Read the directory. For each file, append FileSize|FilePath\n to sizes.txt. (This takes almost zero RAM).
    3. Use an External Sort (e.g., a disk-based merge sort) to sort sizes.txt numerically by the file size. Note: External sort only requires small sequential reads/writes of chunks into your 20KB RAM buffer.
    4. Iterate through the sorted sizes.txt sequentially. Any file with a unique size is immediately marked as “Keep”. Group the paths of files with identical sizes into temporary “candidate lists” on disk.

    Step 2: Progressive Chunking (No Hashing)

    Why no hashing in this scenario? To hash a file, you must process every single byte of the file. If two 10GB files differ in the very first byte, reading and hashing the remaining 10GB is a massive waste of disk I/O.

    Instead, compare the candidate files byte-by-byte in small chunks that fit inside your 20KB RAM limit.

    Assume you have a group of 5 candidate files that are all exactly 1,000,000 bytes long:

    1. Open all 5 file handles simultaneously.
    2. Allocate a small read buffer in your RAM (e.g., a 2KB character array).
    3. Read the first 2KB from File 1 into Buffer A.
    4. Read the first 2KB from File 2 into Buffer B and compare them.
      • If they differ: Close File 2. It is unique. Remove it from the candidate group.
      • If they match: Discard Buffer B, read File 3 into Buffer B, compare against Buffer A, and so on.
    5. RAM Check: Comparing 5 files requires holding one 2KB “master” buffer and one 2KB “comparison” buffer at a time (4KB total). This easily fits in 20KB. (If the candidate group is massive, you might have to compare in sub-groups, but typically, groups of identical sizes are small).
    6. Once you have compared the first 2KB of all candidates, discard the buffers, advance the file pointers, and repeat the process for the next 2KB chunk.
    7. If you reach the End of File (EOF) and multiple files have matched perfectly across all chunks, they are exact duplicates.

    Step 3: Delete

    Keep the first file in the fully matched group, and issue OS-level delete commands for the rest.

  • We have a file with a lot of names. How do you remove duplicate names?

    Answer

    In-memory: Stream the file, use a hash set to track seen names, write only first occurrences — O(n) time, O(unique names) memory. In go we can use map.

  • Right! If we don’t want to use memory, how do we solve it?

    Answer

    We must use an O(n^2) loop.

  • Design a mobile top-up system where users can purchase prepaid credit by entering their phone number and selecting a mobile operator. Assume each operator exposes a set of APIs for processing top-ups. Walk through your system design and the end-to-end request flow.

    Answer

    Step-by-step

    1. Create the transaction

    Status: pending


    2. Reserve the wallet balance

    • Don’t deduct it yet.
    • Move the amount from available to reserved.

    Status: FundsReserved


    3. Publish TopUpRequested

    The worker processes the request asynchronously.


    4. Call the operator

    If successful:

    • Capture the reservation (permanently deduct the funds).
    • Mark the transaction as Completed.

    If failed:

    • Release the reservation.
    • Mark the transaction as Failed.

    Why reserve instead of deduct immediately?

    Suppose the user has $10 and buys a $10 top-up.

    If you deduct immediately and the operator later returns an error, you must issue a refund, which introduces extra complexity and can fail.

    With reservations:

    • The money is temporarily locked.
    • It can’t be spent twice.
    • If the operator fails, you simply release the reservation.
    • If the operator succeeds, you capture it.

    This is the same pattern used by payment systems (authorization → capture).

  • We get an error when buying a top-up from a third-party operator, for example, a timeout. How would you handle this?

    Answer
    Reserve Funds
        │
        ▼
    Call Operator
        │
        ▼
    Timeout
    

    You should not immediately release the reservation because the operator may have successfully processed the top-up but failed to send a response.

    Instead:

    1. Mark the transaction as Pending.
    2. Retry or query the operator’s status API (or wait for a webhook if available).
    3. Only after receiving a definitive success or failure:
    • Capture the reservation on success.
    • Release the reservation on failure.

    This avoids both charging the user without delivering the top-up and giving away a free top-up. This pattern is commonly used in payment and financial systems to ensure consistency across distributed services.

  • How do you choose a database for this service, SQL or NoSQL?

    Answer

    This product is CP and it’s better to use SQL.

  • What is ACID?

    Answer
  • Say some problems that one of the isolation levels solves.

  • What is a dirty read?

    Answer

    A dirty read is a database error that happens when one transaction reads data changed by another transaction that has not finished or saved yet. If that first transaction cancels or rolls back its changes, the second transaction is left using data that never truly existed.

    • Transaction A changes a value (like lowering item count from 10 to 9) but does not commit/save yet.
    • Transaction B reads that new value (9) right before Transaction A finishes.
    • Transaction A encounters an error and rolls back, resetting the value back to 10.
    • Transaction B base their action on a false number (9), causing a dirty read error.
  • What is the CAP theorem?

    Answer

Technical Interview II (Live code)

You have this code:

    package main

    import "fmt"

    type Account struct {
        ID      string
        Balance float64
    }

    func main() {
        accounts := []Account{
            {"A", 100},
            {"B", 200},
            {"C", 0},
        }

        transactions := []struct {
            from, to string
            amount   float64
        }{
            {"A", "B", 50},
            {"B", "C", 300},
            {"A", "C", 10},
        }

        for _, t := range transactions {
            fromAcc := findAccount(accounts, t.from)
            toAcc := findAccount(accounts, t.to)

            if fromAcc == nil || toAcc == nil {
                fmt.Println("Invalid account")
                continue
            }

            if fromAcc.Balance >= t.amount {
                fromAcc.Balance -= t.amount
                toAcc.Balance += t.amount
                fmt.Println(fromAcc.Balance, toAcc.Balance)
            }
        }

        fmt.Println(accounts)
    }

    func findAccount(accs []Account, id string) *Account {
        for _, a := range accs {
            if a.ID == id {
                return &a
            }
        }
        return nil
    }
  1. What does this code print??
  2. Fix the bug.
  3. Add some validations and return meaningful messages to the user so they know what happened.
  4. We want to improve the performance and process these transactions more efficiently. How would you approach this?
Answer (My solution)

Here and also in playground.

Score

7/10

خیلی آسون و گلابی بود برام هر چند در تلاش بودن که بندازن گوشه رینگ ولی سوالا کاملا تیپیکال بود. نفهمیدم چرا ریجکت کردن.

Tabdeal

Status

📜📞🔧📝❌

Interview process

flowchart LR
    sr(Send resume) --> hr(HR call) --> ti(Technical Interview I) --> ti2(Technical Interview II) --rejected--x hr2(HR Interview) -.-> o(Offer)

Apply Way

jobinja

Interview Date

  • Sent Resume
    1405.03.15

  • HR Call
    1405.02.27

  • Technical Interview
    1405.03.30

  • Task
    1405.03.31

  • Task Interview
    1405.04.06

  • Rejection Email
    1405.04.08

Interview Duration

  • Technical Interview
    1 hour

  • Task
    5 days

  • Task Review
    1 hour

Interview Platform

Google Meet

Technical Interview

  • Tell me about yourself.

  • What is your most challenging experience that you involved with in your work?

  • What would you do if suddenly we receive massive requests? How would you handle it?

    Answer

    If we suddenly receive a massive number of requests, the first thing I’d do is identify the root cause instead of immediately scaling the system. I’d check our monitoring dashboards, logs, and traces to understand whether the spike is caused by legitimate user traffic, a recent deployment, a client bug causing excessive retries, or even malicious traffic.

    Next, I’d identify the bottleneck by looking at metrics such as request latency, error rates, CPU and memory usage, database performance, connection pool utilization, and network traffic.

    Once I know the bottleneck, I’d apply the appropriate solution:

    • If the database is overloaded, I’d reduce the load with Redis or CDN caching, optimize slow queries, or use read replicas for read-heavy workloads.
    • If the application servers are the bottleneck, I’d scale them horizontally behind a load balancer or rely on auto-scaling if it’s configured.
    • If synchronous processing is slowing requests, I’d move non-critical tasks like notifications or analytics to background workers using a message queue.
    • To protect the system from cascading failures, I’d enable rate limiting, circuit breakers, and, if necessary, load shedding.

    After the incident is resolved, I’d perform a postmortem to understand what happened, fix the root cause if it was a bug, review our auto-scaling and capacity planning, and run load tests to ensure we’re better prepared for future traffic spikes.

  • What is Consistency?

    Answer

    In database systems (ACID), consistency (or correctness) refers to the requirement that any given database transaction must change affected data only in allowed ways. Any data written to the database must be valid according to all defined rules, including constraints, cascades, triggers, and any combination thereof. Wikipedia

    In CAP theorem: Every read receives the most recent write or an error. Consistency means that all clients see the same data at the same time, no matter which node they connect to. For this to happen, whenever data is written to one node, it must be instantly forwarded or replicated to all the other nodes in the system before the write is deemed ‘successful’ Wikipedia

  • For displaying a user’s daily Profit & Loss (P&L) in a crypto exchange system, which is more important: Consistency or Availability? Why?

    Answer

    Consistency is usually more important because users expect their P&L to reflect the latest trades, balances, and market positions accurately. Showing stale or inconsistent data can lead to incorrect decisions and loss of trust. In CAP theorem terms, this feature is typically CP-oriented, prioritizing strong consistency over high availability. Techniques such as transactional updates, event ordering, and read-after-write consistency help ensure accurate PnL calculations.

  • What is double spending?

    Answer

    Double-spending is the unauthorized spending of the same money (either digital or conventional) more than once. It happens when someone tries to spend the same money in multiple transactions before the first transaction is fully confirmed.

    Example: Alice has 1 BTC and sends it to Bob. Before the network confirms the transaction, she tries to send the same 1 BTC to Charlie. A properly designed blockchain detects the conflicting transactions and accepts only one of them, preventing the same coin from being spent twice.

  • One service sends events to another service and retries, resulting in 3 duplicate events at the destination service. How can the second service handle this? For example, 3 identical buy order events.

    Answer

    This is the idempotency problem. The solution is to assign a unique ID (UUID or request ID) to each event and have the receiving service track processed IDs. When a duplicate arrives, the service checks the ID, sees it’s already processed, and ignores it. This ensures that processing an event multiple times has the same effect as processing it once.

  • When do you use a queue?

    Answer

    Queues are used in several key scenarios:

    (1) Decoupling — when the producer doesn’t need to wait for the consumer to finish (e.g., sending emails after order placement);

    (2) Buffering — when the producer generates work faster than the consumer can handle (e.g., flash sale orders hitting a slow payment gateway);

    (3) Async processing — when a task is slow but the user needs a fast response (e.g., video transcoding, report generation);

    (4) Reliability — when you need guaranteed delivery with retries and dead-letter queues (e.g., financial transactions);

    (5) Load leveling — spreading work evenly over time instead of processing spikes;

    (6) Fan-out — one event triggering multiple downstream services (e.g., an order event updating inventory, analytics, and notifications simultaneously).

  • When starting a new project, do you prefer a monolithic architecture or a microservices architecture, and why?

    Answer

    I usually start with a monolith and split it into microservices when needed. A monolith is faster to develop, easier to debug, and simpler to deploy and maintain, allowing the team to move quickly in the early stages. As the system grows and requirements such as independent scaling, team autonomy, or clear domain boundaries emerge, I gradually decompose it into microservices. This approach avoids the premature complexity of distributed systems—such as network communication, distributed transactions, and observability challenges—while keeping the architecture scalable.

Math Question:

  • 8 machines in 4 hours do 8 tasks.

  • 20 machines in 10 hours do x tasks?

    Answer

    \[ 8 \times 4 = 32 \text{ machine-hours} \]

    \[ 20 \times 10 = 200 \text{ machine-hours} \]

    \[ \frac{32}{8} = \frac{200}{x} \]

    \[ x = \frac{200 \times 8}{32} \]

    \[ x = 50 \text{ tasks} \]

Live code

  • Implement an LRU Cache in 20 mins.

    Answer (My solution)
    class LRUCache:
        def __init__(self, capacity: int) -> None:
            self.capacity = capacity
            self.cache = {}
            
        def put(self, key: int, value: int):
            if key in self.cache:
                self.cache[key] = value
                self.cache[key] = self.cache.pop(key)
            else:
                if len(self.cache) == self.capacity:
                    del self.cache[next(iter(self.cache))]
                self.cache[key] = value
    
        def get(self, key: int):
            if key not in self.cache:
                return -1
            self.cache[key] = self.cache.pop(key)
            return self.cache[key]
    
        def print_cache(self):
            print(self.cache)
    
    c = LRUCache(3)
    
    c.put(1,1)
    c.put(2,2)
    c.put(3,3)
    c.print_cache()
    c.get(2)
    c.get(1)
    c.print_cache()
    c.put(4,4)
    c.print_cache()
    

این مرحله همه سوالاتو جواب دادم و دیگه حرفی نمونده بود و پشمای طرف ریخته بود طوری که فرداش زنگ زدن برای مرحله بعد، اما چیزی که رو مخم بود بی‌سوادی مصاحبه‌کننده بود مثل یه ربات از رو لیست داشت سوال می‌خوند یه کوچولو هم مانور نمی‌داد رو سوالا که ببینه چقدر تو اون دامین مسلطم صرفا خبرنگاری سوال و جواب. لایوکدم که زدم متوجه نمی‌شد هی می‌گفت دیکشنری رو چی کار کردی هی توضیح می دادم آخر انقد تست کیس مختلف داد گفت آها درست کار می‌کنه!

Task & Code review interview

پس از مصاحبه فنی تسکی فرستادند که می‌تونید از این‌جا ببینید. و همین‌طور جواب من رو.
خود نوع نگارش تسک گویای اینه که چه خبره اون تو! مصاحبه‌کننده به شدت نوب بود و سنیوریتی لازم و سواد کافی برای سنجیدن دیگری رو نداشت فکر کنم کلا ۲-۳ سال سابقه داشت و خوب متوجه کد نشد و وب‌کم رو هم تو این مرحله روشن نکرد. صداها و مکث‌های عجیبی هم میومد انگار چند نفر پشت مانیتور باشن. طبق تحقیقات و ارتباطاتم فهمیدم که بچه‌های تیم رندوم مصاحبه می‌کنن که نشون می‌ده همین‌طوری خیاریه مصاحبه‌ها. سوال‌ها هم یه لیستیه که طوطی‌وار می‌پرسن و خب برای همه هم همونه.

Score

6/10

رقمی بد نبود با یه عدد سه رقمی اوکی بودن یعنی اولش که HR زنگ زد گفتم انقد و گفت خب حالا خبر می‌دیم بهت، رفت با رئیسش (احتمالا) صحبت کرد بعد چند روز مصاحبه ست کردن حالا دیگه نمی‌دونم واقعا اوکی بودن یا تهش به آفر می‌رسید می‌گفتن خب ما ۵۰ بیشتر نمی‌دیم. ولی خب چون پول دارن بنا رو می‌ذاریم رو این که اوکی بودن. در هر صورت اگه فقط پول می‌خواید لقمه راحتیه ولی جای باحال، فکر نکنم!

Visiwise

Status

📜📞🔧🔧👱🏻‍♀️✅🎉

Software Engineer

Interview Process

flowchart LR
  sr(Send Resume) --> hr(HR Call) --> ti(Technical Interview I) --> ti2("Technical Interview II (On-site)") --> hri(HR Interview) --> o(Offer) --accepted :) --> r(("🎉"))

Apply Way

Email & LinkedIn & Jobinja & Jobvision

Interview Date

  • Sent Resume
    1404.08.14

  • HR Call
    1404.09.05

  • Technical Interview I
    1404.09.06

  • Technical Interview II
    1404.09.16

  • HR Interview
    1404.09.24

  • Offer
    1404.10.01

Interview Duration

  • Technical Interview I
    1 hour

  • Technical Interview II
    2 hours

  • HR Interview
    1 hour

Interview Platform

Google Meet

Technical Interview I

  • Tell me about yourself.

  • Why have you left your last company?

  • What’s the number of DAU in your last company?

  • What’s your salary expectation?

  • In a microservices architecture, if service A depends on service B and a failure occurs mid-request (e.g., user balance is checked in A, then A calls B to deduct from the wallet, but B fails), how do you handle it?

    Follow-up: With atomic flows… Where does atomicity and rollback happen, and at what level do you solve this?

    Answer

    Where atomicity happens:

    Atomicity is per-service, not cross-service. Each service has its own local transaction. If A commits but B fails, A’s state is already written — you need a pattern to reconcile.

    Solutions by level:

    LevelPatternAtomicity Scope
    DatabaseLocal transactionsSingle service only
    MessagingTransactional OutboxGuarantees event delivery, not instant consistency
    SagaCompensation stepsLogical atomicity via rollback handlers
    APIRetry + idempotencyBest-effort, transient failure recovery

    Transactional Outbox (recommended):

    Service A:
    1. BEGIN TRANSACTION
       - INSERT into orders
       - INSERT into outbox (event: "deduct_wallet")
    2. COMMIT TRANSACTION (atomic — both succeed or both fail)
    3. Outbox poller → Kafka/RabbitMQ
    
    Service B:
    1. Consume message
    2. Idempotency check (event_id)
    3. BEGIN TRANSACTION
       - UPDATE wallet SET balance = balance - amount
       - INSERT into processed_events
    4. COMMIT TRANSACTION
    

    Failure recovery:

    Failure PointRecovery
    A’s DB commit failsFull rollback — no side effects
    A’s outbox poll failsEvent stays in outbox, retried
    B fails to processMessage retried by broker
    B processes twiceIdempotency check rejects duplicate

    Saga (for multi-step flows):

    Order Saga:
      Step 1: Create order      → compensation: cancel order
      Step 2: Deduct wallet     → compensation: refund wallet
      Step 3: Reserve inventory → compensation: release inventory
    
    If Step 3 fails:
      → refund wallet (Step 2 reverse)
      → cancel order (Step 1 reverse)
    

    Key takeaway: Atomicity in microservices is per-service (local DB transactions). Cross-service consistency is achieved through eventual consistency patterns (Saga, Outbox), not distributed transactions (2PC).

  • Suppose we have an international e-commerce system where users can submit orders. The challenge is calculating taxes and discounts, which vary based on country, time (e.g., Black Friday), and product category (e.g., electronic goods). We must display prices based on the user’s country — for example, someone in the US should see prices in dollars, while someone in the UK should see the same product in British pounds. Additionally, we need to track which user placed which order, with which discount, tax, and currency applied. How would you design a relational database to support this?

    Answer

    Before diving into tables, let me surface assumptions:

    1. Relational DB (PostgreSQL recommended)
    2. Base currency is configurable per product via base_currency_id
    3. Prices can have country-specific overrides
    4. Tax/discount rules are time-bound (start/end dates)
    5. Orders must be immutable snapshots for audit
    6. Exchange rates are versioned, never updated in place

    Schema Design (10 tables):

    -- Reference data ------------------------------------------------------
    
    CREATE TABLE currencies (
        id      SERIAL PRIMARY KEY,
        code    CHAR(3) UNIQUE NOT NULL,     -- 'USD', 'GBP'
        symbol  VARCHAR(5) NOT NULL
    );
    
    CREATE TABLE countries (
        id           SERIAL PRIMARY KEY,
        iso_code     CHAR(2) UNIQUE NOT NULL,
        name         VARCHAR(100) NOT NULL,
        currency_id  INT NOT NULL REFERENCES currencies(id)
    );
    
    -- Versioned FX rates — NEVER update in place, always insert a new row
    CREATE TABLE exchange_rates (
        id                SERIAL PRIMARY KEY,
        from_currency_id  INT NOT NULL REFERENCES currencies(id),
        to_currency_id    INT NOT NULL REFERENCES currencies(id),
        rate              NUMERIC(18,8) NOT NULL,
        effective_date    DATE NOT NULL,
        UNIQUE (from_currency_id, to_currency_id, effective_date)
    );
    
    -- Users ----------------------------------------------------------------
    
    CREATE TABLE users (
        id          SERIAL PRIMARY KEY,
        email       VARCHAR(150) UNIQUE NOT NULL,
        country_id  INT NOT NULL REFERENCES countries(id),
        created_at  TIMESTAMPTZ DEFAULT now()
    );
    
    -- Catalog ----------------------------------------------------------------
    
    CREATE TABLE categories (
        id    SERIAL PRIMARY KEY,
        name  VARCHAR(100) NOT NULL
    );
    
    CREATE TABLE products (
        id                SERIAL PRIMARY KEY,
        name              VARCHAR(200) NOT NULL,
        category_id       INT NOT NULL REFERENCES categories(id),
        base_price        NUMERIC(12,2) NOT NULL,
        base_currency_id  INT NOT NULL REFERENCES currencies(id),
        created_at        TIMESTAMPTZ DEFAULT now()
    );
    
    -- Country-specific STRATEGIC price override (not just FX conversion)
    -- e.g. deliberately pricing lower in an emerging market
    CREATE TABLE product_prices (
        id          SERIAL PRIMARY KEY,
        product_id  INT NOT NULL REFERENCES products(id),
        country_id  INT NOT NULL REFERENCES countries(id),
        price       NUMERIC(12,2) NOT NULL,
        valid_from  DATE NOT NULL,
        valid_to    DATE,
        UNIQUE (product_id, country_id, valid_from)
    );
    
    -- Policy: tax ---------------------------------------------------------
    
    CREATE TABLE tax_rules (
        id            SERIAL PRIMARY KEY,
        country_id    INT NOT NULL REFERENCES countries(id),
        category_id   INT REFERENCES categories(id),   -- NULL = all categories
        rate_percent  NUMERIC(5,2) NOT NULL,
        valid_from    DATE NOT NULL,
        valid_to      DATE
    );
    
    -- Policy: discount ------------------------------------------------------
    
    CREATE TABLE discount_rules (
        id             SERIAL PRIMARY KEY,
        name           VARCHAR(150) NOT NULL,             -- 'Black Friday 2026'
        discount_type  VARCHAR(10) NOT NULL CHECK (discount_type IN ('PERCENT','FIXED','BOGO')),
        value          NUMERIC(12,2) NOT NULL,
        min_purchase   NUMERIC(12,2),                      -- optional threshold
        country_id     INT REFERENCES countries(id),        -- NULL = global
        category_id    INT REFERENCES categories(id),        -- NULL = all categories
        valid_from     TIMESTAMPTZ NOT NULL,
        valid_to       TIMESTAMPTZ NOT NULL
    );
    
    -- Transactional core (immutable once placed) ---------------------------
    
    CREATE TABLE orders (
        id              SERIAL PRIMARY KEY,
        user_id         INT NOT NULL REFERENCES users(id),
        currency_id     INT NOT NULL REFERENCES currencies(id),
        fx_rate_used    NUMERIC(18,8) NOT NULL,       -- snapshot: prevents FX drift on old invoices
        subtotal        NUMERIC(12,2) NOT NULL,
        tax_total       NUMERIC(12,2) NOT NULL,
        discount_total  NUMERIC(12,2) NOT NULL,
        grand_total     NUMERIC(12,2) NOT NULL,
        status          VARCHAR(20) NOT NULL DEFAULT 'PENDING',
        placed_at       TIMESTAMPTZ DEFAULT now()
    );
    
    CREATE TABLE order_items (
        id                        SERIAL PRIMARY KEY,
        order_id                  INT NOT NULL REFERENCES orders(id),
        product_id                INT NOT NULL REFERENCES products(id),
        quantity                  INT NOT NULL CHECK (quantity > 0),
    
        unit_price_snapshot       NUMERIC(12,2) NOT NULL,
    
        tax_rule_id               INT REFERENCES tax_rules(id),        -- traceability
        tax_rate_snapshot         NUMERIC(5,2) NOT NULL,
        tax_amount_snapshot       NUMERIC(12,2) NOT NULL,
    
        discount_rule_id          INT REFERENCES discount_rules(id),   -- traceability, nullable
        discount_amount_snapshot  NUMERIC(12,2) NOT NULL DEFAULT 0,
    
        line_total                NUMERIC(12,2) NOT NULL
    );
    

    Entity-Relationship Diagram:

    erDiagram
        currencies ||--o{ countries : "used by"
        currencies ||--o{ exchange_rates : "from currency"
        currencies ||--o{ exchange_rates : "to currency"
        currencies ||--o{ products : "base currency"
        currencies ||--o{ orders : "order currency"
    
        countries ||--o{ product_prices : "has pricing"
        countries ||--o{ tax_rules : "defines tax"
        countries ||--o{ discount_rules : "defines discount"
        countries ||--o{ users : "resides in"
    
        categories ||--o{ products : "categorizes"
        categories ||--o{ product_prices : "category pricing"
        categories ||--o{ tax_rules : "category tax"
        categories ||--o{ discount_rules : "category discount"
    
        products ||--o{ product_prices : "price overrides"
        products ||--o{ order_items : "sold as"
    
        tax_rules ||--o{ order_items : "traced to"
        discount_rules ||--o{ order_items : "traced to"
    
        users ||--o{ orders : "places"
        orders ||--o{ order_items : "contains"
    
        currencies {
            int id PK
            char(3) code UK "ISO 4217"
            varchar symbol
        }
    
        countries {
            int id PK
            char(2) iso_code UK "ISO 3166-1"
            varchar name
            int currency_id FK
        }
    
        exchange_rates {
            int id PK
            int from_currency_id FK
            int to_currency_id FK
            numeric rate
            date effective_date
        }
    
        users {
            int id PK
            varchar email UK
            int country_id FK
            timestamp created_at
        }
    
        categories {
            int id PK
            varchar name
        }
    
        products {
            int id PK
            varchar name
            int category_id FK
            numeric base_price
            int base_currency_id FK
            timestamp created_at
        }
    
        product_prices {
            int id PK
            int product_id FK
            int country_id FK
            numeric price
            date valid_from
            date valid_to
        }
    
        tax_rules {
            int id PK
            int country_id FK
            int category_id FK "nullable"
            numeric rate_percent
            date valid_from
            date valid_to
        }
    
        discount_rules {
            int id PK
            varchar name
            varchar discount_type "PERCENT|FIXED|BOGO"
            numeric value
            numeric min_purchase
            int country_id FK "nullable"
            int category_id FK "nullable"
            timestamp valid_from
            timestamp valid_to
        }
    
        orders {
            int id PK
            int user_id FK
            int currency_id FK
            numeric fx_rate_used "snapshot"
            numeric subtotal
            numeric tax_total
            numeric discount_total
            numeric grand_total
            varchar status
            timestamp placed_at
        }
    
        order_items {
            int id PK
            int order_id FK
            int product_id FK
            int quantity
            numeric unit_price_snapshot
            int tax_rule_id FK "traceability"
            numeric tax_rate_snapshot
            numeric tax_amount_snapshot
            int discount_rule_id FK "traceability nullable"
            numeric discount_amount_snapshot
            numeric line_total
        }
    

    Price Calculation Flow:

    User (country=GB) views Product X (category=Electronics)
            │
            ▼
    Is there a product_prices override for (Product X, GB)? ──yes──▶ use override price
            │no
            ▼
    base_price × exchange_rates[product.base_currency_id → user.country.currency_id, today]
            │
            ▼
    Resolve active tax_rule: country=GB, category=Electronics (fallback: category IS NULL)
            │
            ▼
    Resolve active discount_rule: country=GB or global, category=Electronics or all,
    today ∈ [valid_from, valid_to], min_purchase satisfied
            │
            ▼
    discount_amount = apply(discount_rule, price)
    tax_amount      = (price - discount_amount) × rate_percent / 100
    line_total      = price - discount_amount + tax_amount
            │
            ▼
    Display in GBP  ──────(user clicks buy)──────▶  INSERT orders
                                                      fx_rate_used = effective_rate
                                                      subtotal, tax_total, discount_total, grand_total
                                                    INSERT order_items
                                                      unit_price_snapshot, tax_rule_id,
                                                      tax_rate_snapshot, tax_amount_snapshot,
                                                      discount_rule_id, discount_amount_snapshot,
                                                      line_total  (all frozen)
    

    Key Design Decisions:

    DecisionRationale
    Currencies as first-class tableDecouples currency metadata (code, symbol) from countries. Multiple countries can share a currency (e.g., EUR in Germany/France).
    Versioned exchange ratesexchange_rates with effective_date — never update in place, always insert new row. Enables historical queries: “What was USD→GBP on 2024-11-25?”
    Snapshot at order timeorder_items stores tax_rule_id, tax_rate_snapshot, tax_amount_snapshot, discount_rule_id, discount_amount_snapshot, line_total. Traceability via FKs + immutable values.
    fx_rate_used in ordersCaptures the exact FX rate at order time. Prevents FX drift on old invoices when rates change.
    Time-bound rulesvalid_from/valid_to on tax_rules and discount_rules enable point-in-time queries.
    Price override tableproduct_prices allows country-specific strategic pricing beyond FX conversion (e.g., emerging market pricing).
    CHECK on discount_typeCHECK (discount_type IN ('PERCENT','FIXED','BOGO')) enforces valid types at DB level.

    Performance Considerations:

    -- Critical indexes
    CREATE INDEX idx_exchange_rates_lookup  ON exchange_rates(from_currency_id, to_currency_id, effective_date DESC);
    CREATE INDEX idx_tax_rules_lookup       ON tax_rules(country_id, category_id, valid_from, valid_to);
    CREATE INDEX idx_discount_rules_lookup  ON discount_rules(country_id, category_id, valid_from, valid_to);
    CREATE INDEX idx_product_prices_lookup  ON product_prices(product_id, country_id, valid_from, valid_to);
    CREATE INDEX idx_orders_user            ON orders(user_id, placed_at);
    CREATE INDEX idx_order_items_order      ON order_items(order_id);
    

    Query example — get active tax rule:

    SELECT rate_percent FROM tax_rules
    WHERE country_id = 1
      AND category_id = 2
      AND valid_from <= CURRENT_DATE
      AND (valid_to IS NULL OR valid_to >= CURRENT_DATE);
    

    Query example — get today’s FX rate:

    SELECT rate FROM exchange_rates
    WHERE from_currency_id = 1   -- USD
      AND to_currency_id = 2     -- GBP
      AND effective_date <= CURRENT_DATE
    ORDER BY effective_date DESC
    LIMIT 1;
    

    Doubt-Driven Review:

    Potential IssueMitigation
    FX rate changes between view and checkoutfx_rate_used snapshot in orders locks the rate at purchase time
    Overlapping discount rulesApplication-level validation; DB UNIQUE constraint on (country_id, category_id, valid_from)
    NULL category_id ambiguitytax_rules.category_id IS NULL means “all categories” — document this clearly
    Currency conversion roundingUse NUMERIC(18,8) for rates, NUMERIC(12,2) for final amounts
    Stale exchange ratesAlways ORDER BY effective_date DESC LIMIT 1; flag rates older than 24h
  • How do you store money?

    Answer

    Never use floating-point types (FLOAT, DOUBLE) for money. Use fixed-point precision:

    NUMERIC vs DECIMAL:

    DatabaseNUMERICDECIMALNotes
    PostgreSQLExact numeric typeAlias for NUMERICSame type, same behavior
    MySQLSynonym for DECIMALStandard SQL typeDECIMAL is preferred
    SQL ServerNot supportedStandard typeUse DECIMAL

    DECIMAL is the SQL standard; NUMERIC is PostgreSQL’s name for the same thing. Both store exact values with no rounding errors. Use DECIMAL for portability across databases.

    Storage for money:

    -- Prices and totals
    DECIMAL(12,2)    -- up to 999,999,999.99
    
    -- Exchange rates (higher precision)
    DECIMAL(18,8)    -- for crypto or FX rates
    
    -- Tax rates
    DECIMAL(5,2)     -- 0.00 to 999.99 percent
    

    In application code:

    from decimal import Decimal, ROUND_HALF_UP
    
    price = Decimal("19.99")
    tax = Decimal("0.0825")
    total = (price * (1 + tax)).quantize(Decimal("0.01"), rounding=ROUND_HALF_UP)
    # total = Decimal("21.64") ✅
    
    # ❌ Never do this
    total = 19.99 * 1.0825  # 21.6387025 — rounding nightmare
    

    Why not FLOAT/DOUBLE:

    0.1 + 0.2 == 0.3       # False!
    0.1 + 0.2               # 0.30000000000000004
    Decimal("0.1") + Decimal("0.2") == Decimal("0.3")  # True ✅
    

    Summary: Use DECIMAL (SQL standard) or NUMERIC (PostgreSQL). Never use FLOAT/DOUBLE for financial data. Always round at the display layer.

Live coding

  • Prefix Sum of Matrix

    My answer
    def matrix(board: list[list]) -> list[list]:
        new_board = []
        for i in range(len(board)):
            rows = []
            for i in range(len(board[0])):
                rows.append(0)
            new_board.append(rows)
    
        for i in range(len(board)):
            for j in range(len(board[0])):
                k = i
                v = j
                new_index = 0
                while k >= 0:
                    while v >= 0:
                        new_index += board[k][v]
                        v-=1
                    v = j
                    k -= 1
                new_board[i][j] = new_index
        return new_board
    
    test = [
        [1, 2, 3],
        [4, 5, 6],
        [7, 8, 9]
    ]
    res = matrix(test)
    print(res)
    
    Answer
    def prefixSum2D(arr):
        # number of rows
        n = len(arr)
    
        # number of columns
        m = len(arr[0])
    
        # Initialize prefix with 0s
        prefix = [[0] * m for _ in range(n)]
    
        # Compute prefix sum matrix
        for i in range(n):
            for j in range(m):
    
                # Start with original value
                prefix[i][j] = arr[i][j]
    
                # Add value from top cell if it exists
                if i > 0:
                    prefix[i][j] += prefix[i - 1][j]
    
                # Add value from left cell if it exists
                if j > 0:
                    prefix[i][j] += prefix[i][j - 1]
    
                # Subtract overlap from top-left diagonal if it exists
                if i > 0 and j > 0:
                    prefix[i][j] -= prefix[i - 1][j - 1]
    
        return prefix
    
    if __name__ == "__main__":
        arr = [
            [1, 2, 3, 4],
            [5, 6, 7, 8],
            [9, 10, 11, 12],
            [13, 14, 15, 16]
        ]
    
        prefix = prefixSum2D(arr)
    
        for row in prefix:
            print(" ".join(map(str, row)))
    

Technical Interview II - Task (On-site)

تسکی به من داده شد (حضوری)، دو ساعت زمان داشتم و از هر ابزاری مانند سرچ، LLM و AI می‌تونستم استفاده کنم. فقط باید درست کار می‌کرد و این که مسئولیت کد نوشته شده با من بود. همون فایل رو دادم AI و یکمی هم وقت تلف کردم الکی که انگار دارم خودم می‌زنم. تسک و پاسخ من.

System Design (Whiteboard design)

After the previous technical interview, they said: “Congratulations, you’ve completed the task. Now let’s scale it.” They asked three questions:

  1. How would you design this project for scale?
  2. What challenges might you face at scale?
  3. How would you design the data pipeline and scraper at scale?

HR Interview

Typical HR obivious questions!

Score

8.5/10

فرآیند مصاحبه (فنی‌ها) خوب بود و سعی شده بود استاندارد باشه و یک مهندس نرم‌افزار خوب رو بسنجه هر چند به نظرم مقداری زیادی بود با توجه به این که شرکت کوچکی بود (ولی خب مشتری خارجی داشت، ساده‌ش کنم برنامه‌نویس ارزون از ایران بگیریم کانادایی پول دربیاریم خودمون) تک‌لیدی هم که باهام مصاحبه می‌کرد آدم خفن و نردی‌ بود، برخورد اوکی و محترمانه‌ای داشت و می‌شد حین مصاحبه هم یاد گرفت ازش. اما در مصاحبه HR وایبی که گرفتم وایب جالبی نبود دو نفر بودن یکی PM (یا PO نمی‌دونم من هیچ‌وقت نفهمیدم اینا رو! مهمم نیست) بود که همه کاره شرکت بود عملا و دیگری HR همیشه در صحنه. فضا، فضای مچ‌گیری بود انگار رفتم پیش ناظم مدرسه هر دو لپ‌تاپ جلوشون بود و هی سوال می‌پرسیدن و مثل تراپیستا یه چیزی یادداشت می‌کردن (گوگله انگار) و سوالا هم که همون تیپیکال‌های معمول که فقط باید از قبل حفظ کرده باشی به همراه خالی‌بندی جواب بااعتمادبه‌نفس بدی که خیلی خوب بودم تو این مورد چون مصاحبه زیاد می‌رم و بافتن راحته برام. ردفلگ قضیه این بود که اینا تو یه آگهی‌ای رنج زده بودن و تو مصاحبه من گفتم یه آفر دارم (و واقعا هم داشتم) و رنجم انقد زدین خودتون با توجه به اون آفرم و رنج خودتون من پیشنهادم این بازه‌س که فکر می‌کنم اوکی باشین hr برگشت گفت چیزه عه نه نه اونو همکارمون اشتباه زده فیلان رنج‌مون اون نیست (با لحنی که از این خبرا نیست داداش!) حالا من نیاز به کار داشتم ولی همون‌جا چند پله سقوط کردن برام.

مدت زیادی نبودم تو شرکت چون خورد به جنگ و قطعی اینترنت و کلا شرکت رفت رو هوا و شروع کرد به لی‌آف و تا می‌تونست نیروهاشو برد اون‌ طرف که بتونه ادامه بده. اما مشاهداتم تو همون بازه رو می‌نویسم. شرکت دودفتری بود یعنی یه حقوق وزارت کاری می‌داد یه حقوق واقعی که اون واقعیه دلاری بود (یعنی رو هم رفته اندازه شرکت خوب ایرانی نمی‌شد مثل اسنپ! و امثالهم) که هر جا گیر می‌کرد و شرایط کشور بهم می‌ریخت اون وزارت کاریه رو می‌داد و دلاری پرپر می‌شد. فضای خود شرکت خوب بود بچه‌ها مشتی و خوب بودن، از نظر فنی هم اوکی بود. از نظر فشار کاری هم چیل و چال بود قشنگ عقربه میومد رو ساعت ۶ همه جلو آسانسور بودن و این خیلی زیبا بود. یه ردفلگ گنده هم که دیدم این بود که پروداکت همه کاره و boss بود. هر چی اون می‌گفت باید اجرا می‌شد حتی دسترسی‌ها و دسترسی مثلا دیتابیس رو پروداکت باید می‌داد!!! طبق تجربه‌ای که داشتم معمولا CTO رئیس بود همیشه ولی این‌جا اون مدلی نبود و خب کدبیس قدیمی رو که دیدم فهمیدم چرا اون‌جوری شده. قشنگ بزن فقط کار کنه و چون کار می‌کنه دست نزن بود.

در کل از خیلی جاها بهتر بود ولی عالی نبود.

Zibal

Status

📜📞🔧📝❌

Senior Python Developer

Interview Process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> ti(Technical Interview) --> task(Task) --rejected--x hri(HR Interview) -.-> o(Offer)

Apply Way

Jobinja

Interview Date

  • Sent Resume
    1404/07/15

  • HR Call
    1404/07/28

  • Technical Interview
    1404/08/03

  • Rejection Email
    1404/08/24

Interview Duration

  • Technical Interview
    1 hour

Interview Platform

Google Meet

Technical Interview

  • Tell me about yourself

  • Do you make decisions on your team, or is there a designated decision-maker?

  • Did you implement the matching engine synchronously or asynchronously? How did you handle race conditions?

  • When you want to learn something new, what is your process (videos, docs, books, etc.)?

  • What is difference between is and == in python?

    Answer

    The is operator checks for identity.
    The == operator checks for equality.

    a = [1, 2, 3]
    b = a     # b references the same list as a
    c = a[:]  # c is a new list with the same content as a
    
    print(a is b)  # True, because b is the same object as a
    print(a is c)  # False, because c is a different object
    print(a == c)  # True, because a and c have the same content
    

  • What is the difference between a @classmethod and a @staticmethod? When would you use a @classmethod?

    Answer

    @classmethod receives the class (cls) and is used for alternative constructors or methods that operate on class-level state. @staticmethod has no implicit first argument and is used for utility functions grouped with the class without accessing class or instance state.
    realpython


  • What is a generator and what are its benefits?

    Answer
    A generator is a function that yields values lazily and returns an iterator. Benefits: low memory usage for large sequences, simple stateful iteration, and easy composition of pipelines.
    https://realpython.com/introduction-to-python-generators/

  • How do you create private methods in Python?

    Answer

    Use a single leading underscore _method to indicate ‘internal’ use (convention). Use double leading underscores __method for name-mangling to reduce accidental access from subclasses; note that nothing is truly private.
    https://www.datacamp.com/tutorial/python-private-methods-explained


  • How does Django ORM address the N+1 query problem?

    Answer

    Django provides select_related for single-valued relationships and prefetch_related for many-to-many or reverse relations to eager-load related objects and avoid N+1 queries. You should profile queries and use .values() or annotations when appropriate.
    https://www.youtube.com/watch?v=zwF5ADW6eKs
    https://docs.djangoproject.com/en/5.2/topics/db/optimization/
    https://docs.djangoproject.com/en/5.2/ref/models/querysets/


  • Can you explain Django’s architecture?

    Answer
    Django follows an MTV (Model–Template–View) pattern: Models hold data/ORM; Views handle requests; Templates render presentation. Requests flow through middleware, URL routing sends them to views, which use models/templates; Django runs on WSGI/ASGI.
    https://dev.to/vincenttommi/2-understanding-djangos-architecture-the-mtv-pattern-1gl

  • Describe the backend architecture you worked on and its layers.

    Answer
    Microservices behind an API gateway, an auth layer, service layer (HTTP/gRPC), business/service layer, repository/data layer, and persistent stores (MySQL/Postgres, Redis). Async work is handled by message brokers and workers; observability uses logs, metrics, and tracing; deployments use Docker + Kubernetes.

  • Why do we use a repository layer in a service?

    Answer
    A repository abstracts persistence, centralizes queries, and decouples domain logic from storage details — making testing, swapping databases, and enforcing consistency simpler.

  • What are serializers in Django REST Framework (DRF)?

    Answer
    Django’s serialization framework provides a mechanism for “translating” Django models into other formats. Usually these other formats will be text-based and used for sending Django data over a wire, but it’s possible for a serializer to handle any format (text-based or not). djangoproject

  • What are custom permissions in DRF and how do you implement them?

    Answer

    Custom permissions encapsulate business authorization rules. Implement them by subclassing rest_framework.permissions.BasePermission and overriding has_permission and/or has_object_permission, then apply to views or viewsets.
    https://www.django-rest-framework.org/api-guide/permissions/


  • How can you ensure only one instance of your database adapter is created in Python?

    Answer
    With singleton pattern

  • How do you track requests and implement rate limiting? At which layers can this be applied?

    Answer
    Track requests with unique request IDs, structured logs, and distributed tracing (OpenTelemetry). Rate limiting can be applied at the edge (CDN, API gateway, reverse proxy), in a middleware layer, or in the application using token-bucket algorithms stored in Redis for shared counters.

  • What’s the difference between inheritance and composition?

    Answer
    Inheritance models an ‘is-a’ relationship and shares behavior via a superclass. Composition models ‘has-a’ and embeds functionality by using other objects. Composition is generally preferred for flexibility and testability.

  • What is dependency injection?

    Answer
    Dependency injection supplies an object’s dependencies from the outside (constructor, setter, or factory) rather than creating them internally; this improves testability, decoupling, and configurability.

  • Which databases have you worked with?

  • What does ACID stand for?

    Answer

  • What is a race condition and how can you solve it?

    Answer
    A race condition happens when concurrent operations interleave and produce incorrect state. Solve it with mutual exclusion (mutexes) for in-process protection, transactions, locks (pessimistic or optimistic), atomic DB operations, idempotency, or by redesigning to avoid shared mutable state.

  • How did you handle race conditions in the matching engine you worked on?

  • What is the difference between a thread and a process?

    Answer
    Threads share a process memory space (lightweight, require synchronization). Processes have separate memory (safer isolation, heavier IPC). Choose threads for shared-memory, processes for isolation.

  • How can use for example 30 core of cpu in production with python?

    Answer
    In Python, you scale CPU usage by running multiple processes, not threads. In production I usually run Uvicorn behind Gunicorn and configure it with one worker per CPU core—so on a 30-core machine, -w 30 lets the app fully utilize all cores.
    gunicorn app:app -k uvicorn.workers.UvicornWorker -w 30
    

  • Have you worked in production or fixed bugs in production?

  • Are you familiar with Uvicorn workers?

    Answer
    Yes — Uvicorn provides worker classes (often used with Gunicorn) to run ASGI apps across multiple processes; understand worker lifecycle, when to scale workers vs async concurrency, and how to supervise them in production.
    https://www.uvicorn.org/deployment/
    https://docs.gunicorn.org/

  • How do you push commits to another branch?

    Answer
    cherry-pick

Task

پس از مصاحبه فنی تسکی فرستادند که می‌تونید از این‌جا ببینید. و همین‌طور جواب من رو.

Score

6.5/10

فرصت ۳ روزه برای این تسک کمه و تنبلی مصاحبه‌کننده در طراحی سنجش رو نشون می‌ده. نیازی به این همه بیل و کلنگ نبود. با این موضوع حال نکردم (اگر چه با مقوله تسک زدن به طور کلی حال نمی‌کنم شما وقت‌ رو می‌ذارید آیا بشود آیا نشود) از طرفی حس کردم اونقدر هم جایی نیست که بتونم چیز یاد بگیرم چون اکثر نیروهاشون جونیور بودند. فید‌بک هم که طبق معمول کسی نمی‌ده. سوالات مرحله اول خوب بود، اون قسمت‌ش رو دوست داشتم.

Saraf

Status

📜📞🔧🔧❌

Back-End Developer

Interview Process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> si(Screening Interview) --> ti(Technical Interview) --rejected--x hri(HR Interview) -.-> o(Offer)

Apply Way

Jobvision

Interview Date

  • Sent Resume
    1404.07.18

  • HR Call
    1404.07.28

  • Screening Interview
    1404.07.30

  • Technical Interview
    1404.08.05

  • Rejection Email
    1404.08.12

Interview Duration

  • Screening Interview
    30 minutes

  • Technical Interview
    1 hour

Interview Platform

Google Meet

Screening Interview

  • Tell me about yourself.

  • Explain what a race condition is in an order-matching / exchange system (for example, in a matching engine). Give concrete examples of how race conditions can occur and describe strategies you would use to prevent or resolve them.

  • How would you design a system that avoids data loss when using a message broker (for example, RabbitMQ)?

Technical Interview (Live Coding)

  • We want to implement a simple token-bucket algorithm in middleware to rate-limit users?

    My Answer Run
    package main
    
    import (
        "fmt"
        "time"
    )
    
    type User struct {
        accountID      int64
        capacity       int64
        counter        int64
        refillRate     int64
        lastRefillTime time.Time
    }
    
    func handler(user User, userData map[int64]User) {
        if _, ok := userData[user.accountID]; ok {
            fmt.Println("OK")
            ud := userData[user.accountID]
            if ud.counter >= ud.capacity {
                fmt.Println(ud.counter)
                panic("rate limit reached")
            }
            ud.counter++
            fmt.Println(ud.counter)
            elapsTime := time.Now().Unix() - ud.lastRefillTime.Unix()
            ud.counter += elapsTime * ud.refillRate
        } else {
            u := User{accountID: 123, capacity: 10, counter: 0, refillRate: 1}
            userData[u.accountID] = u
        }
        fmt.Println(user.counter, " ", user.capacity, " ", user.refillRate, " ", user.lastRefillTime)
    }
    
    func main() {
        userData := make(map[int64]User, 0)
        newUser := User{accountID: 123, capacity: 10, counter: 0, refillRate: 1, lastRefillTime: time.Now()}
        for i := range 10 {
            fmt.Println("i:", i)
            handler(newUser, userData)
        }
    }
    

    این‌جا اشتباهم این بود که مقدار map رو عوض کردم دوباره نذاشتم توش.

    Answer Run
    package main
    
    import (
        "fmt"
        "sync"
        "time"
    )
    
    type User struct {
        accountID      int64
        capacity       int64
        tokens         int64
        refillRate     int64
        lastRefillTime time.Time
        mutex          sync.Mutex
    }
    
    type TokenBucketManager struct {
        users map[int64]*User
        mutex sync.RWMutex
    }
    
    func NewTokenBucketManager() *TokenBucketManager {
        return &TokenBucketManager{
            users: make(map[int64]*User),
        }
    }
    
    func (tm *TokenBucketManager) GetOrCreateUser(accountID int64, capacity, refillRate int64) *User {
        tm.mutex.Lock()
        defer tm.mutex.Unlock()
    
        if user, exists := tm.users[accountID]; exists {
            return user
        }
    
        user := &User{
            accountID:      accountID,
            capacity:       capacity,
            tokens:         capacity, // Start with full bucket
            refillRate:     refillRate,
            lastRefillTime: time.Now(),
        }
        tm.users[accountID] = user
        return user
    }
    
    func (u *User) refill() {
        now := time.Now()
        elapsed := now.Sub(u.lastRefillTime)
    
        // Calculate tokens to add based on elapsed time
        tokensToAdd := int64(elapsed.Seconds()) * u.refillRate
        if tokensToAdd > 0 {
            u.tokens = min(u.tokens+tokensToAdd, u.capacity)
            u.lastRefillTime = now
        }
    }
    
    func (u *User) AllowRequest() {
        u.mutex.Lock()
        defer u.mutex.Unlock()
    
        // Refill tokens based on time elapsed
        u.refill()
    
        // Check if we have at least one token
        if u.tokens > 0 {
            u.tokens--
            fmt.Printf("Request allowed. Tokens remaining: %d\n", u.tokens)
            return
        }
    
        // If no tokens available, panic
        panic("rate limit reached")
    }
    
    func min(a, b int64) int64 {
        if a < b {
            return a
        }
        return b
    }
    
    // Middleware handler function
    func (tm *TokenBucketManager) RateLimitMiddleware(accountID int64) {
        user := tm.GetOrCreateUser(accountID, 10, 1) // capacity=10, refillRate=1 token/sec
        user.AllowRequest()
    }
    
    func main() {
        tokenManager := NewTokenBucketManager()
    
        // Simulate requests with panic recovery
        for i := 0; i < 15; i++ {
            func() {
                defer func() {
                    if r := recover(); r != nil {
                        fmt.Printf("Request %d: %v\n", i+1, r)
                    }
                }()
    
                fmt.Printf("Request %d: ", i+1)
                tokenManager.RateLimitMiddleware(123)
            }()
    
            // Add some delay to see the refill in action
            if i == 9 { // After 10th request, wait to see refill
                fmt.Println("Waiting 2 seconds for token refill...")
                time.Sleep(2 * time.Second)
            } else {
                time.Sleep(100 * time.Millisecond)
            }
        }
    }
    

Score

6/10

در کل خوب بود. استک php داشتن می‌خواستن سوییچ کنن رو go و تیم فلت بود، تعداد بکندها هم ۶ نفر و این یعنی فشار کاری! یه مقدار شاید اگه مسلط‌تر لایوکد رو می‌زدم اوکی می‌شد اما خب خیلی هم شرکتی نبود که براش ناراحت بشم.

Wallgold (Wallex)

Status

📜📞🔧👱🏻‍♀️🔧❌

Full-Stack Developer (Backend focosed)

Interview Process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> ti(Screening Interview) --> hri(HR Interview) --> ti2(Technical Interview) --rejected--x o(Offer)

Apply Way

jobinja

Interview Date

  • Sent Resume
    1404.06.05

  • HR Call
    1404.07.06

  • Screening interview
    1404.07.12

  • HR Interview
    1404.07.14

  • Technical Interview
    1404.07.21

  • Rejection Email
    1404.07.30

Interview Duration

  • Screening interview
    1 hour

  • HR Interview
    30 minutes

  • Technical Interview
    1 hour

Interview Platform

Google Meet

Screening Interview

  • Tell me about yourself

  • Are you a student?

  • Do you have plans to migrate?

  • Are you OK with full-time work??

  • Are you OK with on-call?

  • What are your salary expectations?

HR Interview

  • Tell me about yourself

  • What is your greatest strength?

  • Why do you want to leave your current company?

  • What would make you consider leaving your company, even if the salary is great?

  • What are your salary expectations?

Technical Interview

  • Do you now wallex?

  • Tell me about yourself.

  • We have a cache for some data in our exchange that we show on the page to users, such as the number of trades, Tether price, etc. When the cached data is cleared, many requests hit the database directly, causing heavy load and potential downtime. How would you fix this problem?

    Answer
    1. Primary Defense: The Mutex Lock with Stale Data Fallback

    This is your immediate and most critical fix. It directly stops the herd.

    How it works: When the cache for a key is found to be empty or expired, the first request to notice it acquires a distributed lock (e.g., in Redis). Only this request is permitted to query the database.

    Handling Subsequent Requests: All other concurrent requests for the same data are not sent to the database. Instead, they have two graceful paths:

    Wait Briefly: They can wait for a short, fixed period (e.g., 50-100ms) for the first request to populate the cache.

    Serve Stale Data (Preferred): Even better, the system immediately returns the recently expired (“stale”) data while the cache is being refreshed in the background. This provides the best user experience—fast responses with near-real-time data.

    1. Proactive Mitigation: Prevent Synchronized Expiration

    The thundering herd is often caused by thousands of cache entries expiring at the same moment.

    Jitter: Never set a fixed TTL (Time-To-Live). Instead, add a small, random value (±10%) to the expiration time. This spreads cache regeneration naturally over a window of time, preventing a synchronized stampede.

    Probabilistic Early Refresh: Before a cache entry officially expires, have a small percentage of requests (e.g., 1%) trigger an early refresh in the background. This “warms” the cache proactively, making it highly likely that a fresh value is already in place before the true expiration time.

    1. Architectural Decoupling: Asynchronous Cache Population

    For the ultimate resilience, decouple the user request from the cache regeneration process entirely.

    How it works: A cache miss never triggers a synchronous database call from a user request. Instead, the system always returns stale data or a default and pushes a “cache refresh task” for that key onto a background job queue (e.g., Redis Queue, SQS, Kafka).

    Benefit: User response times become immune to database performance. The background workers can process the refresh tasks at their own pace, and the database load is smoothed out. This is the most robust long-term pattern for high-throughput systems.

  • Suppose we have an e-commerce product (like Digikala) and there’s an issue: when I add one item to my basket, two are added. This happens sometimes. How would you fix this problem?

    Answer
    1. Reproduce & observe

    Reproduce in dev with different browsers/devices and slow network.

    Capture request traces (client logs, server logs, request IDs, timestamps) and check analytics for patterns (specific browsers, mobile, retries).

    1. Identify likely causes

    Client: double-click, button not disabled, or UI retry/optimistic update doing a second call.

    Network/client library: automatic retry on timeout/resend.

    Server: non-idempotent endpoint creating two rows due to race conditions or missing uniqueness constraints.

    Message layer: duplicate messages processed twice.

    1. Fixes (short & practical)

    Client: disable add button after first click and debounce UI actions; show clear loading state.

    API: make the operation idempotent — accept an Idempotency-Key (or request id) and store processed keys to ignore duplicates.

    DB: enforce correctness with a uniqueness constraint on (cart_id, product_id) and use an atomic upsert to increment quantity, e.g.

  • Think we know the problem is from front-end and we don’t want to deploy new version in front and want to fix it for short time in backend how fix it?

    Answer
    1. Fast dedupe/lock in cache (Redis)

    Prevent processing the same “add” twice within a short window (2–5s). Build a dedupe key from stable request factors you have today (authenticated user_id or session_id, product_id, and a hash of the request body / headers). Use SET key value NX PX .

    1. Make DB operation idempotent/atomic (defensive)

    Even with Redis, races or Redis failures can happen. Enforce a DB-level uniqueness + atomic upsert so duplicates can’t create two rows.

    1. Optional: Consumer-side dedupe / idempotency store

    If your API is queue-based or background-processed, store processed request IDs (or the same dedupe key) for a short TTL and ignore duplicates.

    1. Response strategy & UX-friendly behavior

    When duplicate is detected in cache, return a harmless success (200) with current cart state — avoids confusing the frontend.

    If you detect duplicate after DB upsert, return the updated qty (so frontend can reconcile).

    1. Observability & short-term rollout

    Add logging/metric (count of dedupe-hits, Redis failures, db-constraint triggers).

    Feature-flag the change if possible; otherwise deploy in a safe rollout.

    Monitor for false positives (legitimate rapid adds being collapsed) and tune TTL (e.g., 2–5s).

    1. Caveats

    This is a short-term backend mitigation. It can merge legitimate rapid adds (user intentionally clicks twice quickly) — verify acceptable with product.

    Long-term: fix front-end (disable button/debounce + send idempotency key) for best UX.

  • We have two microservices. One of them is very slow and some requests time out without receiving a response. How can the other microservice handle this to avoid being affected?

    Answer
    • Set a strict downstream timeout and propagate cancellation.

    • Use a circuit breaker to fail fast after repeated timeouts.

    • Retry only idempotent calls with exponential backoff + jitter (limit attempts).

    • Apply bulkheads (separate thread/connection pools) to isolate resources.

    • Provide fallbacks or cached responses where possible.

    • If suitable, make the call async (queue + worker) to decouple user latency.

    • Add metrics/tracing and alert on downstream latency/failure rates.

  • We have a very large, unstructured log file containing Divar chat data (ranging from gigabytes to terabytes). How would you approach detecting bot activity?

    Answer
    1. Data Parsing and Structuring Reading File: To read a huge file efficiently, stream it in manageable chunks (e.g., several hundred MB at a time) instead of loading it all into memory. Use memory mapping for faster access when possible, and consider distributed or parallel processing frameworks like Apache Spark if you have large-scale infrastructure. Optimize I/O by tuning buffer sizes and, if applicable, store data in compressed or columnar formats to speed selective reads.

    Log Parsing: First, I’d parse the unstructured logs into a structured format (e.g., JSON or CSV) by extracting key fields such as timestamp, user ID, message content, IP address, and user agent (if available). This can be done using tools like Apache NiFi for data flow, or custom scripts with regular expressions, but for large-scale data, distributed processing is essential.

    1. Feature Engineering (Bot Indicators)

    Why: Bots exhibit patterns like bursty activity, repetition, and anomalies vs. human behavior. Key Features (Computed in Spark for scale):

    • Frequency: Messages per sender per hour/day (bots send 100x human rates).
    • Diversity: Unique receivers per sender (bots spam many).
    • Repetition: Message similarity (e.g., Jaccard or Levenshtein distance across a user’s messages).
    • Timing: Response latency (bots <1s), session duration (bots 24/7).
    • Content: Keyword scores (e.g., URLs, spam phrases like “urgent deal”, “transfer money”). Use NLP for entropy (low for scripted bots).
    • Graph: Sender-receiver graph density (bots form hubs).
    • Aggregates: Group by sender_id, compute stats like avg_response_time, msg_count, unique_msgs_ratio = unique_messages / total_messages.
  • What are your salary expectations?

  • Any questions?

Score

9/10

سوالات زیبایی پرسیده شد و نگاه مهندسی نرم‌افزار و حل مسئله داشت. به طور کلی راضی بودم منم اوکی بودم هر چند یکی از سوالا رو نتونستم خوب جواب بدم.

BitPin

Status

📜📞📝🔧🔧❌

Software Engineer - Backend

Interview Process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> task(Algorithmic task) --> ti("Technical Interview I
(On-site)") --> ti2("Technical Interview II
(On-site)")--rejected--x ti3("Technical Interview III
(On-site)")-.-> hri(HR Interview) -.-> o(Offer)

Apply Way

Site & Jobinja

Interview Date

  • Sent Resume
    1404.02.03

  • HR Call
    1404.01.18

  • Task
    1404.02.07

  • Technical Interview I (On-site)
    1404.06.24

  • Technical Interview II (On-site)
    1404.07.19

  • Rejection Email
    1404.07.22

Interview Duration

  • Technical Interview I
    1 hour & 30 minutes

  • Technical Interview II
    1 hour & 30 minutes

Interview Platform

In-person

Task

به طور کلی فرآیند مصاحبه‌شون الگوریتمی سگیه به علاوه سیستم دیزاین. سوال‌ها رو هم باید کامل بزنید تا قبول شید ذات الگوریتم همینه. مرحله اول زنگ می‌زنن یه لینک quera می‌فرستن که سه تا سواله و باید اونا رو حل کنید تا برسید مرحله بعدی. من دادم gpt و آپلود کردم درست بودن. ممکنه جواب‌ها بهینه نباشن اما کار می‌کنن.

  • First question

    Answer
    in_put = str(input())
    res = in_put.split()
    print(len(res[len(res) - 1]))
    

  • Second question

    Answer
    def check_2sum(nums: list, k: int) -> tuple | int:
        map_ = {}
        for i in range(len(nums)):
            map_[nums[i]] = i
    
        for i in range(len(nums)):
            target = k - nums[i]
            if target in map_ and map_[target] != i:
                return i + 1, map_[target] + 1
    
        return -1
    
    
    n, target = map(int, input().split())
    nums = list(map(int, input().split()))
    res = check_2sum(nums, target)
    
    if res == -1:
        print(res)
    else:
        print(*res)
    

  • Third question

    Answer
    def longest_palindromic_subsequence(s: str) -> int:
    n = len(s)
    dp = [[0] * n for _ in range(n)]
    
    for i in range(n):
        dp[i][i] = 1
    
    for length in range(2, n + 1):
        for i in range(n - length + 1):
            j = i + length - 1
            if s[i] == s[j]:
                if length == 2:
                    dp[i][j] = 2
                else:
                    dp[i][j] = dp[i + 1][j - 1] + 2
            else:
                dp[i][j] = max(dp[i + 1][j], dp[i][j - 1])
    
    return dp[0][n - 1]
    
    print(longest_palindromic_subsequence(input()))  # Output: 3 # Output: 5
    

Technical Interview I (Live Coding)

  • Tell me about yourself

  • Write some test cases for this code:

    def func(x: int):
        if x <= 0: 
            x += 2
    
        if x == 2:
            x = 100
    
        return x
    
    Answer
    InputExplanationExpected Output
    -3-3 + 2 = -1-1
    -2-2 + 2 = 00
    -1-1 + 2 = 11
    00 + 2 = 2 → x == 2 → 100100
    1no change1
    2x == 2 → 100100
    3no change3

  • Valid parentheses

    در ابتدا این سوال با وجود صرفا پرانتز مطرح شد و مصاحبه‌کننده بهم گفت رو تخته راه‌حلی که دارم رو بنویسم و اومدم کدش رو بزنم، گفت خب حالا جوری پیاده کن که بقیه کاراکترها (براکت و کروشه) هم هستن. این سوال رو بلد بودم و زدم و اوکی بود.

    Answer
    def check_braces(args: str)-> bool:
        dic = {'(':')', '[':']', '{':'}'}
        stack = []
        for s in args:
            if s in dic:
                stack.append(s)
            elif stack == [] or dic[stack.pop()] != s:
                return False
        return stack == []
    

    سپس ازم خواسته شد حالتی که فقط پرانتز داریم رو بهینه‌تر کنم و بدون استفاده از حافظه حل کنم و من این‌طوری نوشتم:

    Answer
    def check_braces2(args: str)-> bool:
        counter = 0
        for s in args:
            if s == '(':
                counter += 1
            else:
                if counter == 0:
                    return False
                counter -= 1
        return counter == 0
    

    سپس ازم خواسته شد ورودی رو از stdin بگیرم و پس از زدن Enter جواب نشون داده بشه و اجازه سرچ برای این قسمت رو هم داشتم و در نهایت شد همچین چیزی:

    Answer
    from sys import stdin
    
    def check_braces(args: str)-> bool:
            dic = {'(':')', '[':']', '{':'}'}
            stack = []
            for s in args:
                if s in dic:
                    stack.append(s)
                elif stack == [] or dic[stack.pop()] != s:
                    return False
            return stack == []
    
    
    def check_braces2(args: str)-> bool:
        counter = 0
        for s in args:
            if s == '(':
                counter += 1
            else:
                if counter == 0:
                    return False
                counter -=1
        return counter == 0
    
    
    def process():
        for line in stdin:
            print(check_braces(line.strip()))
    
    def process2():
        for line in stdin:
            print(check_braces2(line.strip()))
    
    # process()
    process2()
    

در آخر ازم پرسیده شد دوست داری فرآیند مصاحبه رو سریع‌تر طی کنیم؟ آیا عجله داری که سریع‌تر طی بشه؟ منم گفتم بله خوشحال می‌شم.

Technical Interview II (Live Coding)

  • Tell me about yourself.

  • Candy

    مصاحبه‌کننده آدم بسیار باتجربه و مودب و خوش‌برخوردی بود. و مثل مصاحبه‌کننده مرحله اول گفت راه‌حلم رو توضیح بدم رو تخته بعد پیاده کنم. من سوال رو قبلا ندیده بودم و شک داشتم به جوابم و خیلی طول کشید تا حل کنم و هی به باگ می‌خوردم. حس می‌کنم سر همین، خوب نبودم. تفاوتی که سوال با ورژن لیتکدی داشت، این بود که خروجی باید در یک لیست به تعداد لیست ورودی، تعداد candyهای هر کس رو نشون می‌داد.

    My Answer
    def student_gift(nums: list):
        ans = [1] * len(nums)
        for i in range(len(nums)):
            for i in range(1, len(nums)):
                if nums[i] > nums[i - 1]:
                    if ans[i] > ans[i -1]:
                        continue
                    else:
                        ans[i]+= 1
                elif nums[i] < nums[i-1]:
                    if ans[i] < ans[i -1]:
                        continue
                    else:
                        ans[i-1]+=1
    
            for i in range(len(nums) - 1, 0, -1):
                if nums[i] > nums[i - 1]:
                    if ans[i] > ans[i -1]:
                        continue
                    else:
                        ans[i]+= 1
                elif nums[i] < nums[i-1]:
                    if ans[i] < ans[i -1]:
                        continue
                    else:
                        ans[i-1]+=1
    
        return ans
    
    
    students = [18, 14, 10,20]
    students2 = [i for i in range(1, 15)]
    students2.reverse()
    print("test case 1: ", students)
    result = student_gift(students)
    print("answer: ", result)
    print("test case 2: ", students2)
    result = student_gift(students2)
    print("answer: ", result)
    

    خودم با این کد حال نکردم. قشنگ انگار رو دراگ زده شده.


    Leetcode Answer
    def candy(ratings):
        n = len(ratings)
        cnt = 0
        candies = [1] * n
        for i in range(1, n):
            if ratings[i] > ratings[i - 1]:
                candies[i] = candies[i - 1] + 1
        for i in range(n - 1, 0, -1):
            if ratings[i - 1] > ratings[i]:
                candies[i - 1] = max(candies[i] + 1, candies[i - 1])
            cnt += candies[i - 1]
        return cnt + candies[n - 1]
    

    link

Score

7.5/10

سخت‌ترین مصاحبه و بهترین عملکردم (به نسبت سختی موجود) بود. در کل با این مصاحبه‌های سخت و فرسایشی حال نمی‌کنم چون که یه کشور در کنج خاورمیانه زیر سایه جنگ و تحریم و با حقوق در نهایت هزار دلاری رو چه به الگوریتم و این اداها آخر؟ حالا از این گذشته که خودم نسبتا توش خوب بودم و به نظرم می‌شد رفت مرحله‌ی بعدی و مقداری دردم آمد چون بسیار نزدیک بود، مورد دیگری که خیلی رو مخم بود، حضوری بودن مصاحبه‌ها بود. هر دفعه باید بلند می‌شدم می‌رفتم اون سر جهان (سعادت آباد). به جز این موارد در کل شرکت خوب و ادایی‌ایه و جای خوبیه برای کار کردن و پول درآوردن.

Metazi

Status

📜📞🔧❌

Back-End Developer

Interview Process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> ti(Technical Interview) --rejected--x hri(HR Interview) -.-> o(Offer)

Apply Way

Jobvision

Interview Date

  • Sent Resume
    1404/07/01

  • HR Call
    1404/07/06

  • Technical Interview
    1404/07/07

  • Rejection Email
    1404/07/08

Interview Duration

  • Technical Interview
    45 minutes

Interview Platform

Google Meet

Technical Interview

  • Tell me about yourself.

  • What is init in Go? How does it work and how does it differ from main?

    Answer

    go.dev

    init() is a special function: func init(). It runs automatically after package-level variables are initialized. You can have multiple init()s in a package. You cannot call init() yourself.

    Order: evaluate package vars → run that package’s init()s → repeat by dependency order → finally call main.main().

    main() is the program entry point (package main, func main()) and runs once after all init()s finish.

  • What is _ in imported packages?

    Answer

    _ is the blank identifier. When used in an import like import _ "pkg/path" it means: import the package solely for its side effects (package initialization) but do not bind any name to refer to it in the importing file. The compiler won’t complain about an unused import because the blank identifier intentionally discards the package name.

    import (
        _ "github.com/lib/pq" // register pq as a database/sql driver via its init()
    )
    

    (Aside: _ is also used to discard values in assignments: _, ok := m["x"].)

  • Why use it? If there is no need, should we remove it? Why do people still use it?

    Answer

    Use them when the package’s init() performs necessary side effects (driver registration, plugin/handler registration, global initialization). If a package has no needed side effects, remove the import.

  • Why write configs in init instead of main? What are the benefits? What are the problems if we write all code in init instead of main?

    Answer

    Pros: init() runs before main(), so it can prepare package-level state.

    Cons: init() cannot accept context or return errors, runs during tests, runs before flag/config parsing, and makes shutdown/signal handling hard. Prefer main() for orchestration, lifecycle and graceful shutdown.

  • Multiple packages each run an init that Printfs the package name. You import them in main, but main() is empty. What is the output?

    Answer
    // pkg/a/a.go
    package a
    
    import "fmt"
    
    func init() { fmt.Println("init a") }
    
    // pkg/b/b.go
    package b
    
    import "fmt"
    
    func init() { fmt.Println("init b") }
    
    // main.go
    package main
    
    import (
        _ "example.com/project/pkg/a"
        _ "example.com/project/pkg/b"
    )
    
    func main() {} // empty
    

    Important notes about the order:

    • Initialization (and therefore the init() prints) runs before main() is called.
    • The order between packages follows the import dependency graph: if b imports a, init a will always appear before init b.
    • If the packages are independent (neither imports the other), the relative order is unspecified — you should not rely on a particular ordering.
    • main() being empty produces no additional output.

    Output:

    init a
    init b
    
  • If you have multiple goroutines that fetch data from different APIs and you want to gather all results and aggregate them, or wait with a timeout then aggregate, how can you do this?

    Answer
    package main
    
    import (
        "fmt"
        "sync"
        "time"
    )
    
    type Result struct {
        URL  string
        Body string
        Err  error
    }
    
    func fetch(url string) (string, error) {
        // do actual HTTP call...
        return "data-for-" + url, nil
    }
    
    func fetchPartial(urls []string, timeout time.Duration) map[string]string {
        var wg sync.WaitGroup
        resultsCh := make(chan Result, len(urls))
    
        for _, u := range urls {
            wg.Add(1)
            go func(u string) {
                defer wg.Done()
                body, err := fetch(u)
                resultsCh <- Result{URL: u, Body: body, Err: err}
            }(u)
        }
    
        // close channel when all goroutines are done
        go func() {
            wg.Wait()
            close(resultsCh)
        }()
    
        aggregated := make(map[string]string)
        timeoutCh := time.After(timeout)
    
    Loop:
        for {
            select {
            case r, ok := <-resultsCh:
                if !ok {
                    break Loop // channel closed, all responses received
                }
                if r.Err == nil {
                    aggregated[r.URL] = r.Body
                } else {
                    // optionally log r.Err
                }
            case <-timeoutCh:
                // timeout occurred — stop waiting for more, but goroutines may still be running.
                // To avoid leaks in real code, pass a context to requests so they cancel.
                break Loop
            }
        }
        return aggregated
    }
    
    func main() {
        urls := []string{"a", "b", "c"}
        out := fetchPartial(urls, 2*time.Second)
        fmt.Println(out)
    }
    
  • If you run main.go, how many goroutines are initialized?

    Answer

    At least one main goroutine plus several runtime goroutines (GC, timers, netpoller). You commonly see 2–4 at startup, but exact number varies. GOMAXPROCS controls parallelism (Ps), not total goroutine count.

  • How does Go manage goroutines?

    Answer

    The runtime scheduler uses three core concepts: G, M, and P.

    • G (goroutine): the user-level unit of concurrency (stack, state, metadata). Goroutines are cheap to create and their stacks grow and shrink as needed.
    • M (machine): an OS thread that actually executes Go code. The runtime creates and reclaims Ms as needed (e.g., to service blocking syscalls).
    • P (processor): a scheduler context that holds a run queue of runnable Gs and scheduling state. Only an M that has an associated P can run Go code. GOMAXPROCS controls how many Ps exist (how many goroutines can run in parallel).

    How scheduling works (high level):

    • Each P has a local run queue of runnable goroutines. When a goroutine becomes runnable it’s pushed to a P’s queue. When a P runs out of work it will steal goroutines from other Ps or pull from a global queue; this provides locality and load balancing.
    • The scheduler chooses a G from a P’s run queue and runs it on the M bound to that P. If that G blocks (channel wait, sleep, blocking syscall), it is parked and another G is scheduled.

Score

6/10

Netbox

Status

📜📞🔧📝❌

Back-End Developer

Interview Process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> ti(Technical Interview) --> task(Task) --rejected--x hri(HR Interview) -.-> o(Offer)

Apply Way

LinkedIn

Interview Date

  • Sent Resume
    1404/06/12

  • HR Call
    1404/06/23

  • Technical Interview
    1404/06/26

  • Rejection Email
    1404/07/13

Interview Duration

  • Technical Interview
    1 hour & 30 minutes

  • Task Deadline
    7 days

Interview Platform

Google Meet

Technical Interview

  • Tell me about yourself.

  • Describe your experience and your tech stack.

  • What product scale and daily active users (DAU) have you worked with?

  • How do you update a user’s feed when they follow or unfollow someone?

  • What is a matching engine in an exchange? Explain how it works.

  • You mentioned a simulator bot on your resume. How do you use it to test features and load? (The simulator bot acts like real users to validate functionality and performance.)

  • You wrote: “I used Test-Driven Development (TDD) to write tests for critical components, ensuring functional accuracy and improving code quality.” How do tests improve code quality?

  • Is writing tests good or bad, since there usually isn’t enough time to write them? What’s your opinion?

  • Are you okay doing work where you can’t see the impact or tasks you think are pointless? How do you handle those situations?

  • How much do you contribute outside your scope? For example, do you raise product or design concerns with PMs when you think something can be improved?

Task

پس از مصاحبه فنی تسکی فرستادند که ۷ روز مهلت داشت. می‌تونید از این‌جا ببینید. و همین‌طور جواب من رو.

Score

8/10

شرکت کوچک و خوبی بود و فضای سالمی داشت (حداقل این‌طور به نظر می‌رسید) اما خیلی جایی نبود که بشه پول خوبی گرفت. من تسک رو خیلی خوب نزدم؛ به طوری که حرف و حدیثی باقی نمونه چون خیلی جنگو بلد نبودم اما سعی خودم رو کردم. فکر کنم ناهار هم داشتن (ناهار مهمه خدایی!).

Malltina

Status

📜📞🔧❌

Senior Software Engineer (python)

Interview Process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> ti("Technical Interview
(Live code)") --rejected--x hri(HR Interview) -.-> o(Offer)

Apply Way

Jobinja

Interview Date

  • Sent Resume
    1404.05.12

  • HR Call
    1404.05.21

  • Technical Interview
    1404.05.22

  • Response Email
    not get any rejection Email

Interview Duration

  • Technical Interview
    1 hour & 30 minutes

Interview Platform

Google Meet

Technical Interview

  • Tell us about yourself.

Live code

Write a function to calculate pow(x, n).

My answer
import sys

def pow(x: float, n: int) -> float:
    res = 1
    if n == 0:
        return res
    while n > 0:
        if n % 2 == 1:
            res *= x
        x *=x
        n >>= 1
    return res

x = 10000
n = 20000
ans = pow(x, n)
print(ans)

Score

6/10

اوکی بود خیلی نظر خاصی ندارم. مقداری عجیب بود چنین شرکت نه چندان شناخته‌شده‌ای لایوکد داشته باشه. روند مصاحبه هم معرفی بود و حل مسئله. ایمیل ریجکتی هم ندادند.

hamkaran system

Status

📜📞🔧❌

Go Developer

Interview Process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> ti("Technical Interview
(live code)") --rejected--x hri(HR Interview) -.-> o(Offer)

Apply Way

Jobinja

Interview Date

  • Sent Resume
    2025/07/21

  • HR Call
    2025/07/28

  • Technical Interview
    2025/08/02

  • Rejection Email
    2025/08/04

Interview Duration

  • Technical Interview
    1 hour & 30 minutes

Interview Platform

Google Meet

Technical Interview

  • Tell us about yourself.

Live code

رشته ای از پرانتز باز و پرانتز بسته را در نظر بگیرید. در این رشته‌ها هر پرانتز باز با یک پرانتز بسته جفت می باشد. مانند:

(())
()()
(())()

ارزیابی هر رشته‌ای از پرانتز باز و بسته را با قواعد زیر تعریف می کنیم:

۱. اگر رشته فقط و فقط شامل () باشد آنگاه مقدار ارزیابی آن معادل ۱ خواهد بود.

۲. فرض کنید که A , ‌B خود رشته ایی از پرانتز باز و بسته باشد آنگاه مقدار ارزیابی رشته ایی از اتصال آنها در کنار هم معادل مجموع ارزیابی هر دوی آنها خواهد بود. به عنوان مثال:

A = ()    =>    Eval(A) = 1
B = ()    =>    Eval(B) = 1

AB = ()()   =>    Eval(AB) = Eval(A)+Eval(B) = 1+ 1 = 2

۳. فرض کنید A رشته ای از پرانتز باز و پرانتز بسته باشد آنگاه مقدار رشته‌ی (A) برابر است با 2 به توان مقدار ارزیابی A. به عنوان مثال:

A = ()()()    =>   Eval(A) = 3
B = (A)      =>    Eval(B) = 2 ^ Eval(A) = 2 ^ 3 = 8

سوال: تابعی بنویسید که به عنوان ورودی رشته ایی از پرانتز باز و پرانتز بسته دریافت می کند و به عنوان خروجی مقدار ارزیابی آن را بر می گرداند. مثال:

()  => 1
()() => 2
(()) => 2
(()()) => 4
()(())() =>4

این سوال رو نتونستم حل کنم.

Answer (GPT) (Also in playground)
package main

import (
	"fmt"
	"log"
	"math"
)

// Eval computes the value of a balanced parentheses string based on rules:
// 1. "()" evaluates to 1
// 2. Concatenation AB evaluates to Eval(A) + Eval(B)
// 3. Wrapping (A) evaluates to 2^Eval(A)
func Eval(s string) int {
	// stack of ints; use -1 as marker for '('
	stack := []int{}

	for _, ch := range s {
		switch ch {
		case '(':
			// push marker
			stack = append(stack, -1)

		case ')':
			// check top of stack
			top := stack[len(stack)-1]
			if top == -1 {
				// it's "()": pop marker and push 1
				stack = stack[:len(stack)-1]
				stack = append(stack, 1)
			} else {
				// sum all values until marker
				sum := 0
				for len(stack) > 0 && stack[len(stack)-1] != -1 {
					sum += stack[len(stack)-1]
					stack = stack[:len(stack)-1]
				}
				// pop the marker
				if len(stack) == 0 {
					log.Fatal("invalid parentheses string")
				}
				stack = stack[:len(stack)-1]

				// compute 2^sum and push
				val := int(math.Pow(2, float64(sum)))
				stack = append(stack, val)
			}
		}
	}

	// final result is sum of stack
	result := 0
	for _, v := range stack {
		result += v
	}
	return result
}

func main() {
	tests := []string{"()", "()()", "(())", "(()())", "()(())()"}
	for _, t := range tests {
		fmt.Printf("%s => %d\n", t, Eval(t))
	}
}

Score

4/10

مثل دفعه قبل (که چند سال پیش بود) حال نکردم با داستان. اسنپ اینطوری نیست سوالاش (که اگه شرکت خوب در نظر بگیریمش) ادای تک دارن، اما در واقعیت سنتی، کارمندی، دست چندم و مناطق محروم استایل. طبق معمول صحبتی در مورد تجربیات نبود و در طول مصاحبه سوال می‌کردم یا راهنمایی می‌خواستم، کابل رو می‌گرفتن. نه من خوب بودم نه اونا.

doctoreto | دکترتو

Status

📜📞🔧❌

Senior Back-End Developer (Golang)

Interview Process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> ti(Technical Interview) --rejected--x hri(HR Interview) -.-> o(Offer)

Apply Way

Jobinja & Jobvision

Interview Date

  • Sent Resume
    1404.04.09

  • HR Call
    1404.04.10

  • Technical Interview
    1404.04.11

  • Rejection Email
    1404.04.23

Interview Duration

  • Technical Interview
    1 hour

Interview Platform

Google Meet

Technical Interview

  • Tell me about the main challenges you faced in your recent roles.

  • Describe a time when a component (for example, a matching engine) crashed or showed inconsistent behavior involving a message broker. How did you diagnose the problem, fix it, and ensure no data was lost?

  • What mechanisms do you use to make message processing resilient?

    Answer

  • How did you implement the transactional outbox pattern in your system? Explain how it works and how it guarantees reliable message delivery and data consistency.

  • Do you have experience with database operations such as backups, replication, clustering, failover, and recovery?

  • Which monitoring and observability tools have you used (metrics, tracing, logs)? Describe how you use them to find and diagnose bugs.

  • When you work with logging, what things do you consider important and what best practices do you use?

    Answer
    Priorities: signal-to-noise (avoid spammy logs), structured logs (JSON), consistent schema, correlation/request IDs, accurate timestamps, proper log levels, redact sensitive data, centralized collection, retention & sampling, and cheap canonical log lines for each request. elastic

  • What is eventual consistency in the context of databases and distributed systems?

    Answer
    a replication model where updates will propagate and replicas converge eventually (if no new updates), so reads may be stale briefly but become consistent over time. Practical trade-off: higher availability and latency at the cost of short-term anomalies. Wikipedia

  • What is consistency?

    Answer

    In database systems (ACID), consistency (or correctness) refers to the requirement that any given database transaction must change affected data only in allowed ways. Any data written to the database must be valid according to all defined rules, including constraints, cascades, triggers, and any combination thereof. Wikipedia

    In CAP theorem: Every read receives the most recent write or an error. Consistency means that all clients see the same data at the same time, no matter which node they connect to. For this to happen, whenever data is written to one node, it must be instantly forwarded or replicated to all the other nodes in the system before the write is deemed ‘successful’ Wikipedia

  • Which tools and mechanisms help keep a system consistent?

    Answer
    Common techniques: distributed consensus (Raft/Paxos), transactional guarantees (ACID), two-phase commit, idempotency + deduplication, transactional outbox and ...

  • Can you list and explain common database isolation levels and the trade-offs between them?

    Answer

  • Have you taken a course or done projects on concurrent/parallel systems?

  • Is there a semaphore concept in Go?

    Answer
    Go has no built-in semaphore type, but a counting semaphore is commonly implemented with a buffered channel or a small wrapper around sync primitives. sync provides low-level primitives; higher-level concurrency is often done with channels.

  • If you had to implement Go channels from scratch, how would you design them?

    Answer

  • How are goroutines blocked and woken up? Who handles that?

    Answer
    The Go runtime scheduler handles blocking/wakeup. Goroutines are parked when they wait on channels, locks, I/O, timers, or syscalls; the runtime keeps them on wait lists and moves them to runnable queues when the event occurs (timer, channel ready, I/O complete), then schedules them onto OS threads.

  • How many goroutines can you create(open)?

    Answer
    Millions are possible, limited by memory (heap + per-goroutine stack) and scheduling overhead. GOMAXPROCS controls parallel workers/OS threads (parallelism), not the total goroutine count. Real limit depends on your workload and memory profile. ardanlabs

  • Have you heard the term garbage collection pressure? What causes it and when does the GC react?

    Answer
    Yes. GC pressure = conditions that make the garbage collector run frequently or do much work (many short-lived allocations, large heap growth, many reachable objects). The runtime triggers GC based on heap growth/threshold heuristics; more allocations → faster heap growth → earlier collections. godev

  • How can you reduce GC pressure in Go?

    Answer
    Reduce allocations and object lifetimes: reuse buffers, pool temporary objects, use sync.Pool for short-lived objects, avoid unnecessary boxing/heap escapes, prefer stack/value types when safe, batch work to reuse memory. Measure with pprof and trace before optimizing. victoriametrics

  • Have you used object pools such as sync.Pool?

  • What are the main benefits of gRPC?

    Answer
    High performance (HTTP/2 multiplexing), low latency, built-in streaming (client/server/bi-directional), strongly typed contracts via protobuf and code generation, language polyglot support, and built-in interception hooks (auth, load–balancing). Good for microservices and low-latency RPCs.

  • Any questions?

بیشتر سوالا از رزومه‌م بود و کارهایی که کرده بودم.

Score

8/10

مصاحبه خوبی بود و مصاحبه‌کننده بسیار مودب و باتجربه بود. ردفلگی ندیدم. انتظار رفتن به مرحله بعد رو داشتم.

football360

Status

📜📞🔧❌

Software Engineer

Interview Process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> ti(Technical Interview I) --rejected--x ti2(Technical Interview II) --> ti3(Technical Interview III) --> hri(HR Interview) -.-> o(Offer)

Apply Way

Jobinja

Interview Date

  • Sent Resume
    Date not set

  • HR Call
    1404.03.10

  • Technical Interview
    1404.03.11

  • Response Email
    Not Sent

Interview Duration

  • Technical Interview
    1 hour

Interview Platform

Google Meet

Technical Interview

  • Tell me about yourself.

  • How you worked with debezium, what kind of problem you solved with it?

  • Have you ever had a weird bug in production even though all your tests passed? How did you fix it?

  • How do you keep yourself up to date with new technologies and learn new things?

  • How did you learn Go? Did you learn it at work or by yourself?

  • Suppose we have a slow API or want to improve its performance. How would you fix it? Have you ever had an experience like that?

  • When you start a new project, how do you decide which technologies to use? How do you choose which technology or tool is the best fit for your project?

  • Have you ever used gRPC with Django?

  • Any questions?

Score

7/10

مصاحبه کوتاهی بود بیشتر آشنایی با تجربیات بود، استک‌شون گو/پایتون بود تیم کوچکی داشتن و فول‌ریموت بودن. فکر کنم به خاطر رقم ریجکت شدم و ایمیل ریجکتی هم نزدند.

Cloudzy | ابرناک

Status

📜📞🔧📝👱🏻‍♀️❌

Back-End Developer

Interview Process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> ti(Technical Interview) --> task(Task) --> hri(HR Interview) --rejected--x o(Offer)

Apply Way

Jobinja

Interview Date

  • Sent Resume
    Date not set

  • HR Call
    1404.02.24

  • Technical Interview
    1404.02.28

  • Rejection Email
    1404.03.13

Interview Duration

  • Technical Interview
    30 minutes

  • Task Deadline
    3 days

  • HR Interview
    1 hour

Interview Platform

Google Meet

Technical Interview

  • Tell me about yourself.

  • Have you worked with Node.js?!

  • What’s your birth year?!

  • If a git conflict occurs in our project, how can you determine whether it happens on the client-side or server-side? For example, during a git pull or git push, where do conflicts typically occur, and how would you handle them? Also, when you run git diff, does it operate on the client-side or server-side?

    Answer
    Git conflicts always occur on the client-side during a merge. For example, if your local branch is behind the remote, a git pull may produce conflicts that you need to resolve locally. A git push can be rejected if the remote has new commits, but the actual conflict still happens when you merge locally. To resolve conflicts, you manually edit the conflicting files, stage them, and commit the merge. git diff is also a client-side operation—it shows differences in your local repository and does not access the server.

  • What is hash table?

    Answer

    In computer science, a hash table is a data structure that implements an associative array, also called a dictionary or simply map; an associative array is an abstract data type that maps keys to values. A hash table uses a hash function to compute an index, also called a hash code, into an array of buckets or slots, from which the desired value can be found. During lookup, the key is hashed and the resulting hash indicates where the corresponding value is stored. A map implemented by a hash table is called a hash map. wikipedia


  • What is hash collision and how do you resolve it?

    Answer

    https://www.youtube.com/watch?v=kNheXzNOcm4&t=251s

  • What are the time complexities of search, insert, and delete in a linked list?

    Answer

    Search: O(n) Delete: O(1) Insert: O(1) https://www.bigocheatsheet.com/

  • Are you familiar with Scrum?

  • In Scrum, who is responsible for managing the process and addressing impediments when a task takes longer than expected (e.g., Product Owner, Scrum Master, or the development team)?

  • What tools or frameworks do you use for unit testing in Go?

  • You mentioned using BDD, how do you write BDD-style tests?

  • What’s difference between goroutine and thread?

    Answer

    https://www.geeksforgeeks.org/go-language/golang-goroutine-vs-thread/

  • What is the difference between pointer receivers and value receivers in Go?

    Answer

    https://www.bogotobogo.com/GoLang/GoLang_Receiver_Value_vs_Pointer.php

  • How do you detect memory leaks in Go?

    Answer

    Using the pprof package to profile memory usage and inspect heap allocations. Observing increasing memory usage over time in long-running programs. Running Go’s race detector (go run -race) to catch goroutine leaks that may indirectly cause memory retention. https://dev.to/gkampitakis/memory-leaks-in-go-3pcn

  • What can happen if goroutines are not properly stopped or cleaned up?

    Answer
    If goroutines aren’t properly stopped, they can leak memory, waste CPU, and potentially cause deadlocks or resource exhaustion in the program.
  • Any questions?

مصاحبه‌کننده در آخر فیدبک داد و گفت خوشم اومده ازت. (:

Task

پس از مصاحبه فنی تسکی فرستادند که می‌تونید از این‌جا ببینید. و همین‌طور جواب من رو.

HR Interview

مصاحبه با دو نفر بود مدیرعامل و دستیارش! از این جلسه‌های گپ و گفت دوستانه! (متنفرم از این قسمت با این که راحت‌ترین قسمت هر مصاحبه‌ست برام). طی یه ساعت حرف زدن، حتی یه بار هم حرفی از حقوق و عدد و رقم نشد. سوال‌ها کاملاً اچ‌آری، کلیشه‌ای و قابل‌پیش‌بینی بود. از شرکت‌شون چیزای جالبی نشنیدم (می‌تونید سرچ کنید و بخونید) حتی اگه ردفلگ‌ها رو بذاریم کنار، چیزی نبود که بگم «وای چه جای خفنی!» ولی چیزی که واقعاً تو ذوقم زد رفتار مدیرعامل بود؛ یه وایب بالا به پایینی داشت، یه جوری که انگار خیلی تو دنیای تک و واقعیت تیم فنی نیست، پرت بود. همون‌جا تقریباً برام قطعی شد که دوست ندارم اونجا کار کنم. از اون به بعد سعی کردم خیلی نرم و مودب، ولی یه‌جوری رفتار کنم که اونا هم حال نکنن با من (: که اگه قراره رد بشه، از سمت اونا باشه نه من. از بیرون هم که نگاه می‌کردی، تیم‌شون پر از جونیور بود، حقوق کم، کار زیاد، همون ترکیب کلاسیک «بیای رشد کنی ولی بسوزی».

Score

4/10

mori

Status

📜📞🔧⚖️❌

AI Software Engineer - Full Stack

Interview Process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> Task(Task) --> tr(Task Review) --rejected--x hri(HR Interview) -.-> o(Offer)

Apply Way

LinkedIn & Quera

Interview Date

  • Sent Resume
    1403.08.09

  • HR Call
    1403.08.23

  • Task
    1403.08.23

  • Task Review
    1403.09.04

  • Rejection Email
    1403.09.16

Interview Duration

  • Task Deadline
    3 days

  • Task Review
    1 hour

Interview Platform

Google Meet

Task

در ابتدا تسکی فرستادند که سنگین بود و عملا گفته بودند سایت ما رو بزن (: که می‌تونید از این‌جا یا این‌جا ببینید. و همین‌طور جواب من رو. با توجه به سنگینی تسک (چون فرانت هم داشت و یه سری تکنولوژی‌ها که کار نکرده بودم) ازشون خواستم یه مقدار وقت بیشتر بدن و پرسیدن چقد زمان می‌خوای و دو روز رو قبول کردن.

Task Review

مصاحبه با دو نفر بود.

  • Tell us about yourself.

  • Tell me about the main challenges you faced in your recent roles.

  • What’s the serializable isolation level in a database?

  • How many people were on your team?

  • What were the average/peak DAU for the systems you worked on?

  • What are you interested in, and what direction do you want your career to go (like personal roadmap)?

  • Why are you interested in Go? What made you pick it up?

  • Describe the task you worked on, and then we’ll tell you a feature to add to it.

  • What technologies were you already familiar with on this project, and which ones did you learn?

  • Feature for previous task (live code): We want to sell our code as a service to companies using tokens.
    For example: 4 companies can use our search service for their own products.

  • Any questions?

Score

8.5/10

پروداکت باحالی دارن و تونستن به بازارهای بیرون از ایران هم راه پیدا کنن dori پروداکت اون‌وری‌شونه، از نکات جالب این که پوزیشن فول‌ریموت بود. تیم کوچیک و خیلی خفن و مشتی‌ای هم دارن، خیلی دوست داشتم باهاشون کارکنم. در نهایت نتیجه رو این‌جوری اعلام کردن «از بین حدودا 140 نفری که برای ما اپلای کردند شما بین 6 نفر اصلی گزینه ما بودید که یعنی ما به توانایی شما معتقد بودیم. از جهت فیدبک دادن در راستای وقتی که گذاشتید از دلایل اصلی این تصمیم این بود که طبق بنچمارک های ما که شامل موارد مختلفی بود شما در تسک و آنلاین کدینگ نفر 5ام شدید.» این‌جاست که باید اموجی بغض گذاشت.

wallex

Status

📜📞🔧❌

Senior Python developer

Interview process

flowchart LR
    sr(Send resume) --> hr(HR call) --> ti(Technical Interview) --rejected--x hri(HR Interview) -.-> o(Offer)

Apply Way

Site

Interview Date

  • Sent Resume
    1403.06.03

  • HR Call
    1403.06.09

  • Technical Interview
    1403.06.24 AT 11 AM

  • Rejection Email
    1403.06.27

Interview Duration

  • Technical Interview
    40 minutes

Interview Platform

Google Meet

Technical Interview

مصاحبه با خود CTO بود البته تو ایمیل گفته بودن که نفر دیگری هم هست ولی تو مصاحبه گفت نتونست بیاد و عذرخواهی کرد. بسیار آدم خفن و خوش‌برخورد و کولی بود. یه جوری بود که استرس نداشتی و خیلی صمیمی و دوستانه بود گفت‌وگو. سوالات هم غالبا از رزومه و تجربه کاری خودم بود. خبری از سوالات کنکوری و کانفیگی و الگوریتمی و این خزعبلات نبود بیشتر در مورد معماری و کانسپت سوال شد.

  • Do you know wallex?

  • Tell me about yourself.

  • You said that you were responsible for developing the matching engine at the company. How do you scale a matching engine?

    We can use an engine per market or use concurrency algorithms like L-Max.

  • Writing and inserting data into the matching engine has become a bottleneck and slow for us. How can we solve this?

    We can avoid performing the write operation inside the matching engine and have it handle only the matching. We can send the matched orders to the database via a message broker and perform the write operation there (outside of the matching engine).

  • Suppose we have a lot of requests and the number of our requests has increased. How do you handle this and manage it?

    Load balancing and an API gateway.

  • We want to extract trading volumes based on daily, monthly, and yearly data. We have several rows that contain transactions, and our sum query is slow. How will you solve this problem?

    We have 3 tables for daily, monthly, and yearly data. At the end of each day, we can sum all trades and insert one integer into the daily table. Then, for the monthly total, we just have 30 integers to sum from the daily table, and for the yearly total, we have just 12 integers to sum for one year.

    After SUMming daily volumes from transactions table (or sth like that), insert them into the daily table.

    daily
    +----+---------+---------------------+
    | ID | volume  | created_at          |
    +----+---------+---------------------+
    | 1  | 3450000 | 2024-09-21 16:54:41 |
    +----+---------+---------------------+
    ...
    +----+---------+---------------------+
    | 30 | 3450000 | 2024-09-21 16:54:41 |
    +----+---------+---------------------+
    

    Then we SUM the last 30 rows of the daily table and insert them into the monthly table.

    monthly
    +----+-----------+---------------------+
    | ID | volume    | created_at          |
    +----+-----------+---------------------+
    | 1  | 103500000 | 2024-09-21 16:54:41 |
    +----+-----------+---------------------+
    ...
    +----+-----------+---------------------+
    | 12 | 103500000 | 2024-09-21 16:54:41 |
    +----+-----------+---------------------+
    

    Then we SUM the last 12 rows of the monthly table and insert them into the yearly table.

    yearly
    +----+------------+---------------------+
    | ID | volume     | created_at          |
    +----+------------+---------------------+
    | 1  | 1242000000 | 2024-09-21 16:54:41 |
    +----+------------+---------------------+
    

    (volume amount is not important here)

  • Math question: The market has reached a state where it has fallen 5 units, then after a while, it rises 1 unit, and this pattern has repeated. How can we predict the market for some time ahead (for example, a month)? How can we assess its probability? Do you have a solution?

    Analyze historical data. Calculate the frequency of these events in your dataset to estimate initial probabilities. And you can use calculate probabilities.

  • You wrote in your resume that you worked with Kuber. How much do you know about it?

    Kubernetes is an open-source container orchestration platform designed to automate the deployment, scaling, and management of containerized applications. To the extent that I could bring it up, take it down, check to see what’s down.

  • Did you write the Kuber files yourselves?

    No, the DevOps team wrote them. We only wrote the config maps.

  • You said that you also played a role in designing the system. What did you do?

    I refactored several services here and completely rewrote some of them from scratch because we wanted to migrate from PHP to Go, and these went directly into production.

  • Why do you want to leave (your current job) and why did you leave your previous place?

  • What is important to you in work and the work environment?

    Culture and a friendly environment, respect, transparency and honesty, and having a plan.

  • When you and your teammate have different ideas about how to tackle a problem, how do you work together to find a solution? What if they really push for their approach, even though you feel yours makes more sense?

    I try to convince them with reasons. If they are not convinced, I talk to the tech lead and let them make the decision, as the final word comes from the tech lead.

  • Why is your tech lead the decision-maker?

    Because they have experience.

  • Is it just experience?

    No, they also have responsibilities.

  • What salary range do you have in mind?

  • Any questions?

    I want to know about your teams, your company, your state, and things like these.

Score

9/10

به نظر خودم مصاحبه خوبی بود و امید خوبی به اکسپت شدن داشتم. حس می‌کنم اون سوال ریاضی و آماری رو خوب جواب ندادم ریجکت شد. در هر صورت خودم حس خوبی داشتم و خوب تونستم پرزنت کنم و با مایندست مصاحبه‌کننده هم خیلی حال کردم. بیشتر دنبال این بود که ببینه خب چی کارا کردی؟ این تجربه هایی که داشتی و اینا چجوری بوده؟ نگاهِ یه ربات استخدام کنم همه چی بلد باشه نداشت.

ozone social

Status

📜📞🔧🔧👱🏻‍♀️✅

Go developer

Interview Process

flowchart LR
    sr(Send resume) --> hr(HR call) --> ti1(1st Technical Interview) --> ti2(2nd Technical Interview) --> hri(HR Interview) --> o(Offer) --accepted :) --> r((" "))

Apply Way

Linkedin

Interview Date

  • Sent Resume
    1402.08.13

  • HR Call
    1402.08.16

  • 1st Technical Interview
    1402.08.20 AT 11:30 AM

  • 2nd Technical Interview
    1402.12.09 AT 6 PM

  • HR Interview
    1402.12.19 12 PM

  • Offer
    1402.12.26

Interview Duration

  • 1st Technical Interview
    1 hour

  • 2nd Technical Interview
    30 minutes

  • HR Interview
    30 minutes

1st Technical Interview

یک بار تایم مصاحبه رو عوض کردم که خیلی حرفه‌ای برخورد کردن. مصاحبه خوبی بود و خودم از خودم راضی بودم و وقتی لایوکدو زدم دیگه گفتم تمومه کار.

  • Tell me about yourself.

  • How much experience do you have with Go?

  • Is Golang an OOP language?

  • Go has inheritance concept?

  • What is Mutex?

  • Suppose we have sent a request to a service and an action failed. How can we handle other processes to know that the action has failed and handle them accordingly?

  • What is channel?

  • What is waitgroup?

  • Do you have you experience with RabbitMQ?

  • Any questions?

Live code

یه سوال الگوریتمی از codewars انتخاب کرده بودن که این بود. سرچ کردن هم آزاد بود.
من با استفاده از string و این‌ها سعی کردم مسئله رو حل کنم و روشی هم که تو ذهنم داشتم اوکی بود و مصاحبه‌‌کننده تایید کرد اما یه سری پیشنهاد داد که می‌تونی از لایبرری استفاده کنی برای ولیدیشن که خب من گفتم نمی‌دونستم می‌شه استفاده کرد چون مسائل الگوریتمی جوریه که می‌خوان بدونن چطور فکر می‌کنی. یه جاهایی برای تبدیل string به int سرچ کردم. در کل روال بود برام.

قبلش به من نگفتن که لایوکد هم هست و من خیلی شرایط درستی براش نداشتم هر چند که کار دراومد ولی بهتر بود می‌گفتن.

2nd Technical Interview

این مصاحبه با VP of engineering بود. خیلی مصاحبه خوبی بود و سوالات مهندس نرم‌افزاری پرسیده شد که در مورد نوع نگرش به مسائل بود. مصاحبه‌کننده بسیار خوش‌برخورد، مودب و کول بود. یک بار جلسه رو کنسل کرده بود و بابت اون عذرخواهی کرد. در مورد رزومه‌م گفت من رزومه رو کلی دیدم فقط یه جا کار کرده بودی که این دلیل بر کم بودن توانایی‌هات نیست... حرفه‌ای بود.

  • I know your background briefly. Tell me more about it.

  • How long were you there (last company)?

  • What is your uni major?

  • We have 2 mindsets in software engineering. One is “tools, languages and stack is not important, you should solve problems regardless of tools.” and the other one is “tools is important and everyone have to solve problems with tools that know them”. Which mindset do you prefer?

  • If a task is difficult or not familiar with it (language, tool and etc.), what would be your approach? Would you face it or not?

  • Which part of the codebase do you write unit test for it?

  • How do you found a bug in system. How you write test?

  • If you want to write test, how you start? Starting with easy part, important part or hard part?

  • Do you know redis? What did you do with it?

  • Do you living alone? Sorry this is personal question: Are you single or married?

  • What is your plan for new year?

  • Talking about salary.

  • Any questions?

HR Interview

کاملا جلسه اوکی و روالی بود، سوالا رو بارها شنیده بودم، جوابای خوبی داشتم و اساسی تونستم تفت بدم. قطع و وصلی زیاد داشتیم هم از سمت من هم از سمت مصاحبه‌کننده نت افتضاح بود ولی خب گذروندیم.

  • خودتو معرفی کن.
  • از کجا با ما آشنا شدی؟
  • به عنوان software engineer چی کارا کردی تو شرکت قبلی؟
  • چندتا ویژگی مثبتی که تو ctoات دیدی بگو.
  • چرا از شرکت قبلی اومدی بیرون؟
  • پس تو تیم کار کردی؟
  • شده که به نظرت یه روش درستی پیش گرفتی ولی بقیه مخالفت کنن؟ چجوری قانعشون کردی؟
  • شده با یکی به مشکل بخوری؟ چطوری حلش کردی؟
  • برنامت برا سال جدید چیه؟
  • چیا برات خیلی مهمه که اونا باعث می‌شه یه جا بمونی یا بری؟
  • چقد طول می‌کشه که ببینی اونجایی که هستی برای توئه یا نه؟ چقد فرصت می‌دی؟
  • تهران تنها زندگی می‌کردی؟ یا اشتراکی؟
  • سوالی داری؟

Score

8/10

مصاحبه‌ها خوب بود به ویژه فنی‌ها که اندازه و درست بود. یک بار بعد مصاحبه اول گفتن حضوری برم برای مصاحبه که من تا حدودی فهمیدم اوکیه قضیه (طبق تجربه بعد یه مصاحبه می‌گن حضوری بیا یعنی ۸۰ درصد اوکیه) اما اون تایم شرایطم جوری بود که نمی‌تونستم حضوری فول‌تایم باشم و به همین دلیل بهشون اطلاع دادم که نمی‌تونم (برای همینه تایم مصاحبه‌ها انقد فاصله داره و جدای اون دو مورد کنسلی هم بود). بعد از حدود ۴ ماه، دوباره تو لینکدین پیام دادم (میزان پاسخ‌گویی‌شون تو لینکدین ۱۰/۱۰ بود واقعا) که اگه اوکی هستین من شرایطم اوکیه و خب جلسه ست کردن و فوقع ما وقع. (: تا حدی من سیگنال سبز رو گرفته بودم، هم اون اول هم بعد بازگشت دوباره که خب باحال بود این روند.

exalab

Status

📜📞🔧❌

Python Developer (crawl)

Interview process

flowchart LR
    sr(Send resume) --> hr(HR call) --> ti(Technical Interview) --rejected--x hri(HR Interview) -.-> o(Offer)

Apply Way

jobinja

Interview Date

  • Sent Resume
    1402.06.24

  • HR Call
    1402.11.23

  • Technical Interview
    1402.11.25 AT 12 PM

  • Rejection Email
    1402.12.08

Interview Duration

  • Technical Interview
    30 minutes

Interview Platform

Google Meet

Technical Interview

ایمیلی که برای مصاحبه فرستاده بودن، بسیار مرتب و منظم و فارسی بود. تمپلیت خوبی برای پیام‌های ایمیل‌شون داشتن. اطلاعاتی بیش از ایمیل‌های مصاحبه عادی داشت. حاوی اطلاعات مصاحبه‌کننده، لینک محصول، اگر نیاز به تغییر مصاحبه باشه با کی باید در میون بذاریم و آیا حتما سیستم نیازه یا نه (که گفته بودن نیاز نیس) و علائم نگارشی هم رعایت شده بود. مصاحبه one-on-one بود. مصاحبه‌کننده، آدم به شدت متین و مودّب و حرفه‌ای‌ای بود. چند دقیقه دیر جوین شد به میت و عذرخواهی کرد. داخل مصاحبه مطالبی رو یادداشت می‌کرد که باعث می‌شد به دوربین نگاه نکنه که گفت من باید یه سری مطالب رو از مصاحبه بنویسم و منتقل کنم اگه به دوربین نگاه نمی‌کنم بی‌احترامی برداشت نشه. مقداری هم شبیه آقا استالمن بود از جهت استایل، سیس و چهره.

  • Tell me about yourself.

  • What is python data types? and how do you grouping them?

  • What is mutable and immutable and why? give me an example for each.

  • We have one dictionary and we have a function that change this dictionary. If function doesn’t return anything, our dictionary changed or not?

  • What is references relationship with mutable and immutable? have relationship between this?

  • What is decorator? and where do you use it? do you write decorator?

  • What is the difference between multithread and multiprocess?

  • What is coroutine?

  • What is the difference between gRPC and REST?

  • What is the difference between set and list?

  • What is generator? when do we use them? do you use them?

  • What is the difference between SQL and NoSQL?

  • When do you use kafka?

  • What is design patterns and where you used it?

  • Where do you used REDIS?

  • What is partition in kafka?

  • Do you have any experience with pure SQL coding?

  • What is the difference between WHERE and HAVING in SQL?

  • Have you experienced with mysql?

  • Have you had any experience with mongoDB?

  • How you implemented gRPC in past company?

  • Have you had any experience about scraping?

  • Are you familiar with these technologies?

    • docker
    • kafka
    • numpy
    • sqlalchemy
    • scrapio TODO: add other
  • Any questions?

Score

6/10

این از اون مصاحبه‌هایی بود که خیلی رغبتی به شرکتش نداشتم. محصول‌شون رو دوست نداشتم. کاری که می‌کردن اسکرپ دیتا از سوشال‌مدیاها و فروشش به مشتریان بود. با دیتا خیلی سر و کار داشتن. ولی خب گفتم مصاحبه‌ش رو برم حداقل سوالاشو درمیارم. (: چیز عجیبی از خود مصاحبه ندیدم. صرفا نوشتن چیزی در مصاحبه، یعنی یه برگه‌ای دارن که اونو باید پر کنن ، یعنی؛ بروکراسی دارن و این یعنی؛ بوی شرکت سازمانی‌طور و خشکی میاد. طبق تجربه عرض می‌کنم خدمت‌تون. حتی ریجکت شدنه هم خیلی اذیتم نکرد. یکی دو تا سوال رو خوب جواب ندادم اما در مجموع، به نظرم خوب بودم و بد عمل نکردم. مصاحبه‌س دیگه کاملا شانسی و رندومه.

Snapp

snapp

Status

📜📞🔧❌

Software Engineer (Golang/Python) - Map

Interview process

flowchart LR
    sr(Send resume) --> hr(HR call) --> ti1(1st Technical Interview) --rejected--x  ti2(2nd Technical Interview) -.-> hri(HR Interview) -.-> o(Offer)

Apply way

Site

Interview date

  • Sent Resume
    1400.06.24

  • HR Call
    1400.07.19

  • Technical Interview
    1400.07.20 AT 3 PM

  • Rejection Email
    1400.07.26

Interview duration

  • Technical Interview
    30 minutes

1st Technical Interview

  • Tell me about yourself.

  • Which languages do you know?

  • What is your best project?

  • Compare python with C++.

  • What is OOP? What are the benefits and concept.

  • What is access modifiers?

  • What is polymorphism?

  • What is inheritance?

  • Write a base class in C++ that name is Animal then create two child classes of it like Dog and Cat and each of these have Eat method but Eat is different in Dog and Cat. And we create some instance of these classes and put them into an array. How can we do that? What is the type of this array?

  • What is primary key and foreign key in database? And what’s differences?

  • What is design patterns?

  • What is OSI model? Say name of 7 layers.

  • What is fastest sorting algorithm? And what’s its time complexity?

  • Any questions?

Score

7/10

این مصاحبه برای وقتیه که تجربه کاری نداشتم و اون پختگی و تفت دادن لازم برای مصاحبه و صحبت از تجربیات کاری گذشته وجود نداشت. یکی دو سوال رو هم خوب بلد نبودم. مثلا اسم همه‌ی لایه‌های OSI یادم نبود یا design patterns نمی‌دونستم چیه. اما در کل خوب بود. سوالا هم پیچیدگی خاصی نداشت و آسون بود. فیدبک که خب مثل همه جا یک عمل تعریف نشده‌ست کاری باهاش نداریم. از نظر hrای، اسنپ به شدت ضعیف و افتضاحه. اصلا تو لول شرکتی که چندین میلیون یوزر داره نیست. اینو خیلی جاها هم شنیدن گفتن ولی ما که با بقیه کار نداریم، این‌جا هدف، انتشار تجربه‌ست و آن چیزی که رخ داده. آن چه که من به وضوح دیدم، کند بودن و طولانی بودن پروسه مصاحبه‌ست. طوری که حدودا یک ماه از ارسال رزومه گذشت تا به مصاحبه برسه. دلیل و توجیه این که کاندیداها زیاده که اینطوریه نیز مهمل کلیشه‌ای دیگری‌ست. با تقسیم نیرو و مدیریت درست می‌شه هندلش کرد. حتی مصاحبه‌های بعدی که در سال‌های دیگه با اسنپ داشتم، این موضوع باز هم دیده شد و آزار داد. به عبارتی؛ در بهترین حالت، از وقتی که رزومه می‌فرستی تا زمانی که آفر بدن، دو ماه طول می‌کشه. حالا می‌تونی متصور باشی بخوره به تایم تعطیلی، حوادث نامترقبه و... که چقد به طول می‌انجامه.

snapp

Status

📜📞🔧❌

Software Engineer (Golang)

Interview process

flowchart LR
    sr(Send resume) --> hr(HR call) --> ti1(1st Technical Interview) --rejected--x  ti2(2nd Technical Interview) -.-> hri(HR Interview) -.-> o(Offer)

Apply Way

Site

Interview Date

  • Sent Resume
    1402.10.22 (IDK really)

  • HR Call
    1402.11.08

  • Technical Interview
    1402.11.14 AT 12 PM

  • Rejection Email
    1402.11.18

Interview Duration

  • Technical Interview
    1 hour & 30 minutes

Interview Platform

Skype

1st Technical Interview

اول مصاحبه بلوتوث هندزفریم قطع و وصل می‌شد و یک دقیقه از تایم مورد نظر گذشته بود (دقیقا یک دقیقه!) تا جوین شم که تو این فاصله HR زنگ زد و علت را جویا شد! و مشکل رو توضیح دادم.
مصاحبه با دونفر بود که هر دو فنی بودن.

  • Tell us about yourself.

  • How do you know a project, code or codebase is good? What’s your parameters to determine?

  • What is SOLID? tell us about 2 of them.

  • What is CI and CD? and the differences?

  • What is the difference between virtual machine and docker?

  • Have you ever Dockerized a golang project?

  • How we can optimize docker image size? What parameters its depends on?

  • Which docker command do we use to know if container is up or down? idk i think docker ps

  • Do you have any experience with Kuber?

  • What is index in database? Answer: I said if don’t know it or overuse is, is bad.

  • When indexing is bad?

  • Microservices vs monolithic? How do you choose it when you want to start a project?

  • Do you know what semantic versioning is?

  • SQL vs NoSQL

  • What is CAP theory?

  • We have an API and we want to add new features on it. How can we handle compatibility with older version? v1 v2

  • Difference between multiprocess and multithread?

  • What is mutable and immutable?

  • Why are we able to change python tuple values even though they are immutable?

  • How you ever optimized a query? What’s your approach to improve a query? and i said my answer is correct? not an exact answer u can use explain…

  • Do you know what is memory leak? How golang handle it?

  • What is defer? and give me an example of its usage.

Score

8/10

مصاحبه خوبی بود. شب قبلش هر چی سوال از مصاحبه‌ها پرسیده بودن رو مرور کردم، تو مصاحبه هم عالی بودم اما دو سوال ریز رو خوب جواب ندادم یکم استرس داشتم ولی به نظرم تاثیرش اونقد نبود. واقعا بسته بودم که می‌رم اسنپ. یه مرحله به نظرم باید می‌رفت جلو. از نظر سوالا خوب بود. تقریبا چکیده‌ای از همه سوالا بود و هر چی که می‌تونستن، پرسیدن. بعدش که ایمیل ریجکتی اومد، ریپلای زدم فیدبک بدید که چرا. یه طومار فرستادن (تو ژانر میم‌های نخوندم) و گفتن که به خاطر پالیسی‌های اسنپ و اینا نمی‌تونیم فیدبک بدیم. چه پالیسی‌ای؟ چه کشکی؟ این پالیسی‌ هم از اون اداهایه که تا از شرکت یکی سوال می‌کنیم می‌گه NDA امضا کردم. روشی شیک برای پیچوندن. همیشه فیدبک بخواید، فیدبک گرفتنیه نه دادنی! این که رفتار شرکت رو نسبت به این سوال ببینید خودش خیلی چیزا رو نشون می‌ده وگرنه منم می‌دونم کسی فیدبک نمی‌ده. انی‌وی، به جز این مورد عجیب، بقیه چیزا منطقی و معقول بود.

Snapp Market Pro

Status

📜📞🔧❌

Software Engineer

Interview process

flowchart LR
    sr(Send resume) --> hr(HR call) --> ti1(Technical Interview) --rejected--x  ti2(Live Code) -.-> hri(HR Interview) -.-> o(Offer)

Apply Way

Site & Linkedin

Interview Date

  • Sent Resume
    1401.10.02

  • HR Call
    1401.10.09

  • Technical Interview
    1401.10.19 AT 5 PM

Interview Duration

  • Technical Interview
    About 30 minutes

Interview Platform

Skype

HR Call

  • دانشجو هستین؟
  • وضعیت سربازی‌تون چطوریه؟
  • قبلا با ونچرهای اسنپ مصاحبه داشتین؟ کی بوده؟
  • فامیل درجه یک دارید که تو اسنپ باشه؟

Technical Interview

مصاحبه با یک نفر بود.
از هر چی که تو رزومه و گیتهابم بود پرسید. مثلا می‌پرسید فلان پروژه رو که زدی هدفت چی بوده؟ چه تکنولوژی‌هایی استفاده کردی و بلاه بلاه بلاه. بعدش روش گوشه رینگ رو انتخاب کرد و با بحث میکروسرویس‌ها انداخت گوشه رینگ. هر چی می‌گفتم، می‌گفت خب فلان ایرادو داره. می‌گفتم trade-off عه می‌گفت چه چیزی رو چشم‌پوشی می‌کنیم که بریم سمتش؟ خلاصه ۷۰ درصد مصاحبه همین بحث بود.

  • Tell me about yourself.

  • When will you be graduated?

  • What is your plan after you finished university?

  • HR asked whether we’re having a live coding or not? no.

  • Why did you choose go?

  • After the interview, what position do you think you want?

  • Microservices vs monolithic

  • How do you fix latency in microservices?

  • What subject did you like in college?

  • What angle do the clock hands make at 3:15?

  • What is 13 usage of brick?!

  • Our stack is php, are you OK with php?

Score

5.5/10

حال نکردم. سوال‌های مهمل، بی‌محتوا و بدون مفهوم زیاد داشت. آخه عقربه‌های بین ساعت سه و ربع رو می‌خوای چیکار عزیزم؟ کاربرد آجر رو کجای دلت می‌خوای بذاری؟ مگه گوگله آخه؟ به خدا گوگلم اینا رو نمی‌پرسن. همش ادا همش اطوار. جالبه سوال عقربه‌های ساعت رو جواب دادم تو سوال آجر، سه تا کاربرد بیش‌تر نتونستم بگم. آخرشم نفهمیدم این چه محصولیه؟ اسنپ‌ساپلایه؟ گروسریه؟ مارکته؟ هر بار از یکی‌شون ایمیل می‌دادن. آخرش مثل این‌ که snapp market pro بود! فکر کنم ایمیل ریجکتی هم نفرستادن کلا. دو بار هم تایم مصاحبه عوض شد یه بار از سمت من و یه بار از سمت اونا. یه حرف درِ گوشی از من به یادگار داشته باشید، اسنپ، فقط تاکسی‌ش خوبه بقیه‌ چیزاش فقط اسم اسنپ روشونه، اون بلوغ و کیفیت رو ندارند.

snappshop

Status

📜📞🔧❌

Senior Software Engineer (Golang)

Interview process

flowchart LR
    sr(Send resume) --> hr(HR call) --> ti1(1st Technical Interview) --rejected--x  ti2(2nd Technical Interview) -.-> hri(HR Interview) -.-> o(Offer)

Apply Way

Jobinja

Interview Date

  • Sent Resume
    1403.06.03

  • HR Call
    1403.06.09

  • Technical Interview
    1403.06.10 AT 3 PM

  • Rejection Email
    1403.06.20

Interview Duration

  • Technical Interview
    1 hour & 30 minutes

Interview Platform

Skype

1st Technical Interview

سوالات سناریومحور و کنکوری بود. مثلا یه سناریو می‌گفت که در شرایط x چی کار می‌کنی؟ و هی از اون سناریو سوالات مختلف درمیاورد. نحوه برخورد و رفتار مصاحبه‌کننده اوکی بود و یه نفرم بود. نیم ساعت بیشتر از تایم ست شده طول کشید.

  • Tell me about yourself.

  • What are the differences between Go and Python? Compare these two languages.

    Answer
    1. Performance
      Go: Go is a compiled language, meaning the code is directly translated into machine code, which results in faster execution times. It is designed for high-performance tasks, making it suitable for building high-performance systems, networking applications, and cloud-native services.
      Python: Python is an interpreted language, which means it’s slower than Go due to the overhead of the interpreter. However, Python’s performance can be enhanced by using external libraries or tools like Cython or PyPy.
    2. Concurrency
      Go: Go has built-in support for concurrency through goroutines and channels. Its concurrency model is one of the key reasons developers choose Go, as it simplifies writing concurrent programs and is ideal for systems with heavy multitasking.
      Python: Python supports concurrency with threads and multiprocessing, but its Global Interpreter Lock (GIL) can be a bottleneck for CPU-bound tasks. Concurrency in Python can be more complex compared to Go.
    3. Ease of Learning and Syntax
      Go: Go has a simple and straightforward syntax, but it can feel more restrictive. Its simplicity is part of the language’s design, making it easier to understand for beginners, but it may require more boilerplate code.
      Python: Python is known for its clean, readable, and concise syntax. It’s often recommended as a first programming language because of its simplicity and ease of learning, making it very popular for scripting, automation, and rapid application development.
    4. Use Cases
      Go: Go is optimized for backend systems, microservices, cloud infrastructure, and networking applications. It is widely used by companies like Google, Docker, and Kubernetes for building scalable, concurrent systems.
      Python: Python excels in a wide range of areas, including web development (with frameworks like Django and Flask), data science, artificial intelligence, automation, and scripting. Its large ecosystem of libraries makes it a popular choice for scientific computing and data analysis.
    5. Ecosystem and Libraries
      Go: Go’s ecosystem is still growing, but it has a strong focus on performance and concurrency. The language has a standard library that’s robust for network programming, but it has fewer third-party libraries compared to Python. Python: Python has a massive ecosystem with a rich set of libraries and frameworks for virtually every domain, including data science (NumPy, Pandas), machine learning (TensorFlow, PyTorch), web development, and more. Python’s ecosystem is one of its greatest strengths.
    6. Development Speed
      Go: Go is designed to be simple and efficient, but it often requires more boilerplate code, which can slow down initial development compared to dynamic languages like Python.
      Python: Python’s dynamic nature and extensive libraries allow for faster prototyping and development. It’s ideal for startups and projects where time-to-market is critical.
    7. Memory Management
      Go: Go has built-in garbage collection, but it is designed with manual optimizations to handle memory more efficiently than typical garbage-collected languages.
      Python: Python also uses garbage collection, but its memory management is slower, making it less suitable for performance-critical tasks without optimization.
    8. Error Handling
      Go: Go has explicit error handling using multiple return values. This approach can be verbose but forces developers to handle errors explicitly, leading to more robust code.
      Python: Python uses exceptions for error handling, which makes the code cleaner and easier to follow. However, it may encourage developers to overlook error cases until runtime.
    9. Typing
      Go: Go is statically typed, meaning types are checked at compile time. This adds safety, as many errors are caught before the program runs.
      Python: Python is dynamically typed, making development faster and more flexible but also introducing the potential for runtime errors due to type issues.
    10. Community and Support
      Go: Go has a growing community, especially in cloud and infrastructure-related fields. It has strong backing from Google and is seeing increasing adoption.
      Python: Python has one of the largest and most active programming communities, with extensive support for various use cases. Its community-driven development ensures frequent updates and improvements.
  • How does memory management work in Go and Python?

    Answer

    In python:
    realpython

  • How does referencing work in Python, and how does it determine when to clean up references?

    Answer

    In Python, variables reference objects, and the language uses reference counting to manage memory. When an object’s reference count reaches zero (i.e., no variables point to it), the memory is freed. Additionally, Python has a garbage collector to handle circular references that reference counting can’t clean up. Cleanup happens automatically when reference counts drop or during periodic garbage collection.

    geekflare
    towardsdatascience

    python ref count
  • How does a Python project (django or fastapi) start up? How is it run from scratch?

  • In Python, how does a request reach our service?

    Answer
    1. Client Request
      A client (such as a web browser or an API client) sends an HTTP request to your service. This request includes information such as the HTTP method (GET, POST, etc.), headers, and any payload data.
    2. Web Server
      The request first reaches a web server (like Nginx or Apache) that is configured to listen for incoming HTTP requests. The web server may handle static files and forward dynamic requests to your Python application.
    3. Application Server
      The web server forwards the request to the application server, which runs your Python application. This can be done using WSGI (Web Server Gateway Interface) for frameworks like Flask or Django, or ASGI (Asynchronous Server Gateway Interface) for frameworks like FastAPI.
    4. Framework Routing
      Once the request reaches your Python application, the web framework processes it. The framework matches the incoming request’s URL and method to the defined routes (or endpoints) in your application.
    5. Request Handling
      The matched route handler (a function or method) is executed. This handler processes the request, which may involve: Validating input data. Interacting with a database or other services. Performing business logic. Preparing a response.
    6. Response Generation
      After processing, the handler generates an HTTP response, which includes a status code, headers, and the response body (e.g., HTML, JSON).
    7. Returning the Response
      The response is sent back through the application server to the web server, which then forwards it back to the client.
    8. Client Receives Response
      Finally, the client receives the response and can process it accordingly, such as rendering a webpage or displaying data.
  • What is the difference between is and == in Python?

    Answer

    The is operator checks for identity.
    The == operator checks for equality.

    a = [1, 2, 3]
    b = a     # b references the same list as a
    c = a[:]  # c is a new list with the same content as a
    
    print(a is b)  # True, because b is the same object as a
    print(a is c)  # False, because c is a different object
    print(a == c)  # True, because a and c have the same content
    
  • We have two queries that are unrelated to each other. How do you run these and combine their data? Do you run one first and then the other or how?

    Answer

    Sequential Execution:
    Run the first query, then the second, and combine the results. This is the simplest approach but may not be the most efficient.

    Asynchronous Execution in Python: This allows you to start both queries without waiting for the first to complete. Example:

    import asyncio
    
    async def run_query1():
        # Query 1 logic here
        pass
    
    async def run_query2():
        # Query 2 logic here
        pass
    
    async def main():
        results = await asyncio.gather(run_query1(), run_query2())
        # Combine results here
    
    asyncio.run(main())
    

    Goroutines in Go: Example:

    func runQuery1(ch chan<- Result) {
        // Query 1 logic here
        ch <- result1
    }
    
    func runQuery2(ch chan<- Result) {
        // Query 2 logic here
        ch <- result2
    }
    
    func main() {
        ch := make(chan Result, 2)
        go runQuery1(ch)
        go runQuery2(ch)
    
        result1 := <-ch
        result2 := <-ch
        // Combine results here
    }
    
  • We have a query that is too slow, how you try to fast it?

    Answer
    1. Analyze the Query Execution Plan
      Use EXPLAIN: Run the query with the EXPLAIN command (or EXPLAIN ANALYZE for more detailed output) to understand how the database engine executes the query. This will provide insights into which indexes are being used, join methods, and where potential bottlenecks lie. Identify Slow Operations: Look for operations that have high costs, such as full table scans, large sorts, or expensive joins.

    2. Optimize Index Usage
      Create Indexes: Ensure that appropriate indexes are in place for columns used in WHERE, JOIN, ORDER BY, and GROUP BY clauses. Review Existing Indexes: Check if existing indexes are being utilized effectively. Sometimes, redundant or unused indexes can slow down write operations. Consider Composite Indexes: If multiple columns are frequently queried together, consider creating composite indexes.

    3. Rewrite the Query
      Simplify the Query: Break down complex queries into simpler sub-queries or Common Table Expressions (CTEs) to improve readability and performance. *Avoid SELECT : Instead of selecting all columns, specify only the columns you need. This reduces the amount of data processed and transferred. Use EXISTS Instead of IN: If applicable, using EXISTS can be faster than IN for subqueries, especially when dealing with large datasets.

    4. Optimize Joins
      Check Join Conditions: Ensure that join conditions are using indexed columns. Limit the Number of Joins: If possible, reduce the number of joins or rearrange them to optimize performance. Use INNER JOIN Instead of OUTER JOIN: If you don’t need all rows from both tables, prefer INNER JOIN as it can be more efficient.

    5. Use Query Caching
      Enable Query Caching: If your database supports it, enable query caching for frequently executed queries. This can significantly reduce execution time for repeated queries.

    6. Partition Large Tables
      Table Partitioning: For very large tables, consider partitioning them based on certain criteria (e.g., date ranges). This can improve query performance by limiting the amount of data scanned.

    7. Optimize Database Configuration
      Tune Database Settings: Review and optimize database configuration settings such as memory allocation, cache sizes, and connection limits based on your workload.

    8. Monitor and Analyze Performance
      Use Monitoring Tools: Employ database monitoring tools to track query performance over time and identify trends or recurring issues. Log Slow Queries: Enable slow query logging to capture queries that exceed a certain execution time, allowing you to focus on optimizing the most problematic queries.

    9. Consider Denormalization
      Denormalization: In some cases, denormalizing the database schema (i.e., combining tables) can improve performance for read-heavy applications, at the cost of increased complexity for write operations.

    10. Review Application Logic
      Optimize Application Code: Sometimes, the issue may not be with the query itself but with how it is called from the application. Review the application logic to ensure that it is making efficient use of database queries.

  • Do you know ACID? What is A?

    Answer

    Atomicity in ACID refers to the property that ensures a series of operations within a transaction are completed fully or not at all. If any part of the transaction fails, the entire transaction is rolled back, maintaining data integrity.

  • What is index in database?

    Answer
  • Is the list that holds pointers for rows in the database during indexing a list or another type of data structure?

    Answer

    No. Common data structures used for indexing are B-Trees, Hash Tables, Bitmap Indexes and Inverted Indexes.

  • Why shouldn’t we index all columns? Doesn’t it become faster?

    Answer
    1. Increased Storage Requirements
      While having more space might seem beneficial, each index consumes additional disk space. For large databases, this can lead to significant storage overhead, especially if many indexes are created on various columns that may not be frequently queried.

    2. Slower Write Operations
      Every time a record is inserted, updated, or deleted, all associated indexes must also be updated. This can slow down write operations considerably. For databases with high transaction volumes, the overhead of maintaining numerous indexes can lead to performance bottlenecks.

    3. Index Maintenance Overhead
      Indexes require regular maintenance to ensure they remain efficient. Over time, as data is modified, indexes can become fragmented, which can degrade performance. This maintenance can be resource-intensive, requiring additional processing time and effort.

    4. Diminished Query Performance
      While indexes are designed to speed up read operations, having too many can lead to confusion for the query optimizer. The optimizer may struggle to determine which index to use for a given query, potentially leading to suboptimal execution plans and slower performance.

    5. Complexity in Query Optimization
      With many indexes, the complexity of the query optimization process increases. The database management system (DBMS) must evaluate multiple indexes to determine the most efficient way to execute a query. This can lead to longer planning times and may not always result in the best performance.

    6. Reduced Performance for Certain Queries
      Some queries may not benefit from additional indexes, particularly those that involve complex joins or aggregations. In such cases, the overhead of maintaining multiple indexes can outweigh the performance benefits, leading to slower overall query execution.

  • What is database isolation level?

    Answer
  • What level is the isolation level of your company’s database?

  • The pod is not down, but you have an error (for example, error 500). How do you know where it comes from?

    Answer

    With Sentry.

  • How do you determine if an application is slow, and how do you measure it?

    Answer

    With Grafana.

  • What is the difference between multithreading and concurrency?

    Answer
  • What is Docker?

    Answer
  • What is the difference between Docker and VMs?

    Answer

    Virtualization Approach
    VMs virtualize the hardware, running a complete operating system on top of virtual hardware. Each VM has its own OS, libraries, and applications.
    Docker uses containerization, running applications in isolated user-space instances called containers. Containers share the host OS kernel and libraries.

    Resource Usage
    VMs have higher overhead as each VM runs a full OS. They consume more memory and disk space.
    Docker containers are more lightweight as they share the host OS. They start faster and have lower resource usage.

    Portability
    VMs are portable across different hardware and cloud environments.
    Docker containers are highly portable as they package the application with its dependencies. They can run consistently across different environments.

    Isolation
    VMs provide strong isolation between the host and guest OS.
    Docker provides process-level isolation between containers, but less isolation compared to VMs.

  • What features does Linux have that Docker uses for isolated and separate operating systems and for running multiple isolated operating systems?

    Answer

    Namespaces
    Purpose: Namespaces provide isolation for system resources, allowing Docker containers to have their own view of the system.
    Types: Docker uses several types of namespaces, including:
    PID Namespace: Isolates process IDs, so processes in containers do not see processes in other containers or the host.
    Network Namespace: Provides each container with its own network stack, including IP addresses and routing tables.
    Mount Namespace: Allows containers to have their own filesystem views, enabling them to mount different filesystems without affecting the host.

    Control Groups (cgroups):
    Purpose: Cgroups limit and prioritize the resource usage (CPU, memory, I/O, etc.) of containers.
    Functionality: This ensures that one container cannot exhaust the resources of the host, providing a way to manage resource allocation among multiple containers.
    Union File Systems:
    Purpose: Union file systems allow Docker to create a layered file system, where images can share common layers.
    Benefits: This reduces disk space usage and improves efficiency, as multiple containers can share the same underlying image layers while maintaining their own changes.

  • What is the difference between hashing and encryption?

    Answer

    Hashing
    Purpose: Hashing is primarily used for data integrity verification. It creates a fixed-size string (hash) from input data of any size, allowing for quick comparisons to verify that the data has not changed.
    One-Way Function: Hashing is a one-way process, meaning that it is not designed to be reversible. Once data is hashed, it cannot be converted back to its original form.
    Deterministic: The same input will always produce the same hash output, which is useful for checking data integrity.
    Common Algorithms: Examples of hashing algorithms include SHA-256, MD5, and SHA-1.
    Use Cases: Hashing is commonly used in password storage, data integrity checks, and digital signatures.

    Encryption
    Purpose: Encryption is used to protect data confidentiality. It transforms readable data (plaintext) into an unreadable format (ciphertext) to prevent unauthorized access.
    Two-Way Function: Encryption is a reversible process. Encrypted data can be decrypted back to its original form using a key.
    Key-Based: Encryption relies on keys for both the encryption and decryption processes. Different keys can produce different ciphertexts from the same plaintext.
    Common Algorithms: Examples of encryption algorithms include AES (Advanced Encryption Standard), RSA, and DES (Data Encryption Standard).
    Use Cases: Encryption is used in secure communications, data protection, and secure storage solutions.

  • What hashing algorithm do you use?

    Answer

    SHA256

  • What is difference between RSA and AES?

    Answer
  • If you have multiple users with the same password, resulting in identical hashes, and you want to ensure that their records in the database are unique, what can you do to make the records unique?

    Answer

    Use Salted Hashes

  • What is difference between channel and connection in rabbitMQ?

    Answer
  • We have a table with three fields: start time, end time and ID. This is too slow. How do you try to speed it up?

    Answer
  • We have two consumers and there are a hundred messages in the queue (RabbitMQ). The first one takes all of them. What should we do so that the second one also receives some?

    Answer
    rabbitmq consumers

    Ensure that your consumers are configured to use fair dispatch. This means that RabbitMQ will distribute messages more evenly between consumers. You can achieve this by setting the prefetch count to a lower value, which allows each consumer to receive a limited number of messages at a time. For example: python:

    channel.basic_qos(prefetch_count=1)
    

    rabbitmq

  • We execute a query for successful user transactions and send a message to RabbitMQ to trigger an SMS. What do you do if RabbitMQ is down?

    Answer

    However, for this specific scenario, the Outbox pattern is indeed an excellent solution.
    And you can:

    1. Implement a retry mechanism:
      We can use a library like Spring Retry to automatically retry sending the message to RabbitMQ after a short delay. This can help handle temporary network issues or brief RabbitMQ outages.
    2. Use a local queue or database:
      If RabbitMQ is unreachable, we can store the messages in a local queue or database table. A background job can then periodically attempt to resend these messages to RabbitMQ once it’s back online.
    3. Circuit breaker pattern:
      Implement a circuit breaker (like Hystrix) to prevent repeated failed attempts to reach RabbitMQ, which could overload our system or RabbitMQ when it comes back online.
    4. Fallback mechanism:
      Have a backup notification system in place. For example, we could directly call an SMS API if RabbitMQ remains unavailable after several retry attempts.
    5. Logging and monitoring:
      Ensure all failed attempts are logged for later analysis. We should also implement alerts to notify our operations team of RabbitMQ downtime.
    6. Message persistence:
      Store critical messages to disk before attempting to send them to RabbitMQ. This ensures no data is lost even if our application crashes.
    7. Use RabbitMQ in a cluster:
      If high availability is crucial, we could set up RabbitMQ in a cluster configuration to minimize downtime.
    8. Implement a dead letter queue:
      Messages that repeatedly fail to be published can be moved to a dead letter queue for later manual processing or investigation.
  • How you fix merge conflict?

  • What is difference between git Merge and Rebase?

    Answer
  • What is fast-forward?

    Answer
  • What was your git flow at your previous company?

  • Any questions?

    Answer

    I want to know about your teams, your company, your state, and things like these.

Score

7/10

همان‌طور که سنگ بزرگ نشانه نزدنه، سوالات زیاد در مصاحبه هم نشانه ریجکتی. سوالات خوب بود ولی تو ماچ بود.

Snapp Shop

Status

📜📞🔧

Front-End Developer

Interview Process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> ti(Technical Interview)

Apply Way

Jobinja

Interview Date

  • Sent Resume
    2026/05/26

  • HR Call
    2026/06/17

  • Technical Interview
    2026/06/21

  • Response Email
    Date not set

Interview Duration

  • Technical Interview
    40 minutes

Interview Platform

Google Meet

Technical Interview

  • Can you briefly introduce yourself?

  • If your tech lead asked you to implement something in the project that isn’t considered a best practice, and they said, “I know it’s not ideal, but just do it for now because we’re under time pressure,” what would you do?

  • If you were reviewing a teammate’s pull request and noticed they had implemented something incorrectly, how would you handle it?

  • Suppose the Product Manager assigns you a task and expects it to be completed by the end of the week, giving you only three days. After analyzing it, you realize it will take at least two weeks. What would you do? Would you accept the deadline? And if they said, “We’ll assign more people to help you,” would that solve the problem?

  • What’s the most serious bug you’ve ever deployed to production?

  • How did you react after realizing you had deployed a bug to production? What was your internal thought process?

  • If you had a disagreement with a teammate about a technical decision, how would you resolve it?

  • Imagine you’re designing a framework or development approach for a small team of three developers, with the goal of delivering features quickly while maintaining good quality. What would you choose, and why?

  • Explanation of the next stage:

You’ll receive a project along with its documentation. Your task is to review the codebase, identify areas that need improvement, document your suggestions, and implement fixes for three of those improvements.

Score

6/10

ابتدای مصاحبه بهم گفته شد که هیچ کدوم از این سوال ها جواب درست یا غلط ندارن و صرفا طرز فکر شما و نوع حل مسئله‌تون رو می‌سنجیم. مصاحبه با تک لید بود و توی تماس بهم گفته شد که مصاحبه تکنیکال خواهد بود اما هیچ کدوم از سوالات واقعا تکنیکال به حساب نمیومدن و بیشتر مرتبط با کالچر سازمانی بود. در انتها هم در مورد مکان سازمان، تیم ها، تیمی که قراره بهش اضافه بشم و مرحله ی بعد که یه پروژه ارسال می شه تا هم نکاتی که باعث می شه بهبود پیدا کنه رو داکیومنت کنم هم سه موردش رو فیکس کنم و زیپ شده ارسال کنم. اما فایلی برای من ارسال نشد و ایمیل ریجکت هم دریافت نکردم! که معنیش همون ریجکته.

cpol

Status

📜📞👱🏻‍♀️🔧❎

Back-End developer (Django)

Interview Process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> hri(HR Interview) --> ti(Technical Interview) --> o(Offer) --rejected--> r((" "))

Apply Way

jobinja

Interview Date

  • Sent Resume
    1402.10.21

  • HR Call
    1402.10.26

  • HR Interview
    1402.10.27 11 AM

  • Technical Interview
    1402.11.02 11 AM

  • Offer
    1402.11.07

Interview Duration

  • HR Interview
    About 30 minutes

  • Technical Interview
    About 40 minutes

Interview Platform

Google Meet

HR Interview

تیپیکال سوالای hrای!

مصاحبه‌کننده وب‌کم رو روشن نکرد. من هم با گوشی اومده بودم تو میت و نمی‌دونستم اپ گوگل میت باگ داره و هی پرت می‌شدم بیرون. اولش فکر می‌کردم مشکل از اوناست بعدا فهمیدم مشکل منه. با چندین بار قطع و وصلی و مصیبت مصاحبه رو ادامه دادیم. درخشان!

  • خودتو معرفی کن.
  • چند سال سابقه کار داری؟
  • وضعیت سربازیت چجوریه؟
  • دانشگاهت چقد مونده؟
  • چرا از شرکت قبلی اومدی بیرون؟
  • قصد مهاجرت داری؟
  • برنامت برای دو سال آینده چیه؟
  • دو تا پروژه که با پایتون و جنگو زدی رو بفرست.
  • یه لیست از لایبرری‌های پایتون و ابزارها آماده کرده بود و می‌پرسید که کار کردی و آشنایی؟ و تیک می‌زد.
    • redis
    • postgres
    • celery
    • numpy
    • pytest
  • با چه زبانایی کار کردی؟
  • خودتو تو چند کلمه توصیف کن.
  • تا حالا شده تو کار خیلی احساس خوبی کنی؟ چی بوده؟
  • بهترین و بدترین تجربت تو کار؟
  • تا حالا شده که به نظرت یه چیزی درست باشه ولی باهات مخالفت کنن؟ چیکار کردی؟
  • تست mbti دادی؟ گفتم آره ولی خیلی اعتقاد ندارم بهش.
  • آخرین دریافتیت چقد بوده؟
  • سوالی داری؟ فورا گفتم بله اگه می‌شه در مورد ساختار تیم‌ها و فضای شرکت توضیح بدین. که گفت درسته گفتم سوالی داری ولی الان یه مصاحبه دیگه شروع می‌شه (با خنده) و یه توضیح هول هولکی داد که نه من فهمیدم و نه خودش.

Technical interview

دو نفر بودن که یکیشون hr بود و دیگری tech lead. باز هم تصویر hr دیده نمی‌شد و اون یکی دوست‌مون قابل رویت بود خداروشکر. خب من اینجا فهمیدم که اون باگ بیرون پرت شدن از منه و بعد چند بار قطع شدن گفتن که زنگ بزنیم پشت تلفن ادامه بدیم مصاحبه رو (تقریبا آخرای مصاحبه بود) که تصمیم درستی بود.

اکنون، در اینجا که هستم، یکی از عجیب‌ترین مصاحبه‌ها رو دارم تجربه می‌کنم. لیترالی ابوالعجایب! اولش با معرفی کن خودتو شروع شد و هیچ سوال فنی‌ای پرسیده نشد! یعنی طرف مقابل هی می‌پرسید تست نوشتی؟ اونجایی که کار می‌کردی چقد تست نوشتی؟ رو چی کار می‌کردی؟ تاکید شدید رو تست نوشتن داشتن. همچنین می‌پرسید چقد کد پروداکشن زدی؟ تو چه اسکیلی کار کردی؟ اینجا اسکیل میلیونیه ها. همش منتظر بودم از جنگو یا پایتون سوالاتی بپرسه اما دریغ از یک سوال. قبلش هم گفته بودن یه فایل به عنوان نمونه که با جنگو زدی بفرست. منم تسکی که برای مصاحبه دیجی‌کالا که با fastapi زده بودم رو فرستادم براشون. طرف می‌گفت اوکیه ولی چیزی با جنگو نداری؟ تاکید شدید رو فریموورک داشتن. من واقعا بدم میاد تاکید رو ابزار. ابزارها قابل یاد گرفتنن و مدام در حال عوض شدن. تو باید توانایی حل مسئله و میزان یادگیری رو بسنجی. بعد گفت اوکیه حالا اولش اگرم زیاد جنگو نزدی کمکت می‌کنیم راه بیوفتی ما یکیو می‌خوایم که تجربه بالایی در جنگو داشته باشه. به طور خلاصه بخوام بگم، حس جایی که درست حسابی باشه رو نمی‌گرفتم. حس انسجام و مرتب و منظم و منطقی و جای پیشرفت و رشد رو نمی‌گرفتم. به قول جوونای امروزی وایب بدی می‌داد خیلی ردفلگ بود.

Offer

بعد از چند روز، hr با شماره خودش (پیش شماره 933 داشت) زنگ زد و گفت ما اوکی‌ایم همکاری کنیم و رقم پیشنهادی رو گفت. دیدم خیلی کمه. پرسیدم ناهار و میان وعده چطوره؟ دورکاری؟ گفت ناهار با خودتونه و کار هم کلا حضوریه. گفتم تا یک هفته دیگه بهتون اطلاع می‌دم. گفت نمی‌شه زودتر؟ خیلی دیره. گفتم اوکی تا سه چهار روز دیگه می‌گم بهتون. مقداری اندیشیدم و چرتکه انداختم هر طور حساب کردم دیدم نمی‌صرفه. پول خورد و خوراک و جا رو بذاری کنار، هیچی نمی‌مونه. بعد همون چند روزی که مهلت گرفته بودم، به hr اسمس دادم (نمی‌دونم ملّت مشکل‌شون با ایمیل چیه) و گفتم به این دلایل نمی‌تونم همکاری کنم. جواب داد رقم درخواستیتون چقده؟ و در جواب، رنج مورد نظرمو گفتم که بعدش گوستم کرد. می‌تونست یه پیام بده که ما توانایشو نداریم خیلی ممنون از شما یا همچین چیزی نمی‌دونم این رفتارای کودکانه‌ی گوست‌گونه کی‌‌ می‌خواد درست بشه تو شرکتا.

Score

4/10


این تجربه رو دوست نداشتم گرچه منجر به آفر شد. از نظر میزان سختی و چالش، من چیزی حس نکردم. خیلی راحت و بدون زحمت بود کل فرآیند که خود این، قضیه رو عجیب می‌کنه. باگ زیاد داشت که خودتون می‌تونید قضاوت کنید.

hermes capital

Status

📜📞🔧❌

Software Engineer

Interview process

flowchart LR
    sr(Send resume) --> hr(HR call) --> ti(Technical Interview) --rejected--x hri(HR Interview) -.-> o(Offer)

Apply way

jobinja

Interview date

  • Sent Resume
    1402.10.04

  • HR Call
    1402.10.04

  • Technical Interview
    1402.10.09 AT 5 PM

  • Rejection Email
    1402.10.13

Interview duration

  • Technical Interview
    About 1 hour

Interview Platform

Google Meet

Technical interview

یکی از عجیب‌ترین مصاحبه‌هایی بود که داشتم. هم از نظر فنی و هم از نظر مصاحبه‌کننده و ایضا شرکت و استکش. اولش مصاحبه‌کننده شروع کرد به توضیح شرکت و استک که با clojure عه و بعدش حتی ازم نخواست خودمو معرفی کنم و مستقیم رفت سراغ طرح یک مسئله. حتی وب کم رو هم باز نکرد که رفتار جالبی نبود حتی می‌شه گفت توهین‌آمیزه، اگه می‌گفت مشکلی داشته که نمی‌تونه تصویرش رو نشون بده یا هر چی باز قابل هضم بود اما من چنین چیزی ندیدم. و یه ساعت بحث و صحبت در مورد این مسئله بود.

Score

5/10

Quiz of Kings

Status

📜📞🔧❌

BackEnd Developer (Go)

Interview process

flowchart LR
    sr(Send resume) --> hr(HR call)
    hr(HR call) --> ti(Technical Interview) --rejected--x hri(HR Interview) -.-> o(Offer)

Apply Way

jobinja

Interview Date

  • Sent Resume
    IDK

  • HR Call
    1402.09.12

  • Technical Interview
    1402.09.13 AT 4 PM

  • Rejection Letter
    1402.09.28

Interview Duration

  • Technical Interview
    1 hour

Interview Platform

Google Meet

Technical Interview

مصاحبه با یک نفر بود.

  • Why Go?

  • What is goroutine?

  • What is race condition?

  • What is the difference between concurrency in python and go?

  • What is event driven architecture?

  • What is redis data structures?

  • Suppose we have a queue and a redis and more requests sent to our web server how can handle to redis. redis can handle just a few requests. What’s your approach to handle scale?

  • We have a system, and each time we receive an API request, imagine a user gets information. In the result, there are more data. How would you cache that?

  • How do database index columns work?

  • If you want to design a database, how do you determine which technologies or approaches to use?

  • What is docker & kubernetes?

  • We want to design a URL shortener system. How would you design it?

Score

7/10

این از اون مصاحبه‌هایی بود که به قول خارجیا I bombed it. بعضی از سوالا جوری بود که افتادم گوشه رینگ، خیلی سناریومحور بود. اگه از نیومدن ایمیل ریجکتی‌شون و پیگیری برای دونستن نتیجه که دنبال ایمیل ریجکتی بودم و آخر فرستادن بگذریم، اتفاق عجیبی رخ نداد.

yektanet

Status

📜📞🔧❌

Software Engineer

Interview process

flowchart LR
    sr(Send resume) --> hr(HR call) --> ti1(1st Technical Interview) --rejected--x ti2("2nd Technical Interview (On-site)") -.-> hri(HR Interview) -.-> o(Offer)

Apply way

Site & jobinja

Interview Date

  • Sent Resume
    1402.08.05

  • HR Call
    1402.08.27

  • Technical Interview
    1402.08.30 AT 4 PM

  • Rejection Email
    1402.09.15

Interview Duration

30 minutes

Interview Platform

Google Meet

HR Call

اچ‌آر زنگ زد یه ۱۵ دقیقه‌ای حرف زدیم. داشت رزومه رو دابل‌چک می‌کرد و هر چی که نوشته بودم رو می‌خوند و یه علامت سوال می‌ذاشت جلوش.

  • دانشگاهت فلان جا بوده؟
  • شرکت قبلیت اینجا بوده؟
  • چرا دراومدی؟
  • حقوقت اونجا چقد بوده و اینجا پیشنهادت چقده؟
  • شرایط کار حضوری دارید؟
  • سربازیت در چه وضعیه؟
  • قصد مهاجرت داری؟
  • یک ماه فرآیند مصاحبه طول می‌کشه اوکی‌ای؟
  • بعدش شروع کرد به توضیح دادن فرآیند مصاحبه که مصاحبه اول تکنیکاله و الگوریتمی و آنلاین، مصاحبه دوم هم تکنیکاله و حضوری و مصاحبه سوم HR

Technical Interview

Live code

از اینترنت نمی‌شد استفاده کرد ولی از مصاحبه‌کننده می‌شد سوال کرد.
مصاحبه کوتاهی بود که هیچ معرفی و اینام نداشت و دو تا سوال تو گوگل داک نوشته بودن که همون جا کد میزدم. سوالاش و جوابای من، اینا بود:

  • تابعی بنویسید که عدد n را ورودی بگیرد. اگر عدد به 15 بخش‌پذیر بود، عبارت FizzBuzz، اگربه 3 بخش‌پذیر بود، عبارت Fizz و اگر به 5 بخش‌پذیر بود، عبارت Buzz را چاپ کند.
def check_buzz(n: int) -> str | None:
    if n % 15 == 0:
        return "FizzBuzz"
    if n % 3 == 0:
        return "Fizz"
    if n % 5 == 0:
        return "Buzz"
    return None

My first answer with o(n ^ 2)

def check_2sum(nums: list, k: int) -> tuple:
    index = 0
    for item in nums:
        for item_2 in nums[index +1:]:
            if item_2 + item == k:
                return item, item_2
        index +=1

My second answer with O(n)

def check_2sum(nums: list, k: int) -> tuple:
    map_ = {}
    for i in range(len(nums)):
        map_[nums[i]] = i

    for i in range(len(nums)):
        target = k - nums[i]
        if target in map_ and map_[target] != i:
            return nums[i], nums[map_[target]]

Best answer (one loop)

def twosum(nums: list[int], target: int) -> list[int]:
    num_map = {}  # Hash table to store number and its index
    for i, num in enumerate(nums):
        complement = target - num  # Find the complement
        if complement in num_map:
            return [num_map[complement], i]  # Return indices of complement and current number
        num_map[num] = i  # Store the number with its index

قسمت return رو فکر کنم اشتباه نوشتم به نظرم i نوشته بودم جای nums[i]. حالا خیلی مهم نیس منطق و روش درسته و خودشونم گفته بودن syntax مهم نیست.

Score

5/10

هر دو سوال رو درست زدم. گر چه سوال دوم برای روش بهینه‌ش رو یه مقدار بیشتر فکر کردم چون یه بار زده بودم، داشتم یادم میاوردم و می‌دونستم باید hash map طور برم جلو. اون ایده فور دوم یه مقدار با زور اومد ذهنم ولی اومد در نهایت، زدم و اوکی هم بود. نت آن‌استیبلی هم داشتم از شانس ولی یه درصدم فکر نمی‌کردم ریجکت شه. انتظار اینو داشتم حداقل یه مرحله جلو بره. بعد از چند هفته به hr ایمیل زدم و جوابی نمی‌داد یه جواب سرسری داد که من الان سیستم پیشم نیس چند روز دیگه خبر می‌دم. مثل این که ایمیل شرکتی‌شون نیومده بود و چند روز دنبال‌شون بودم که بهم بگن ریجکت شدی! بعدش ایمیلو خودش فرستاد. hr نوبی بود خلاصه. سیستم مصاحبه‌شون اینجوری کار می‌کنه: ریفر +‌ خفه کردن با الگوریتم. اگر سابقه کاری هم نداشته باشید، ندید کنسلید (احتمالا به جز ریفرا). یه چیز دیگه‌ایم که خیلی از اونایی که اونجا بودن شنیدم، فشار کاری بالا و عدم وجود تعادل بین کار و زندگیه. طوری که از کلمه‌های برده و حیوانات اهلی دربارش استفاده می‌کنن. اما پول خوبی می‌دن. حقوق پیشنهادی که پشت تلفن گفتم، ۵تا گذاشتم رو حقوق خودم و برای اونجا یه ۱۰تام اومدم روش و یه ۵تای دیگم جهت بازه بین این و آن (بکنید از این کارا، حال می‌ده (:) که خب می‌دونستم مشکل مالی ندارن ولی با این حال گفتم الان تلفنو قطع می‌کنه! بدین صورت. نمره‌ای که دادم هم قابل مشاهده‌ست.

wallex

Status

📜📞🔧❌

Junior Backend Developer

Interview process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> ti(Technical Interview) --rejected--x hri(HR Interview) -.-> o(Offer)

Apply way

Site & Linkedin & Refer :)

Interview date

  • Sent Resume
    1402.08.08

  • HR Call
    1402.08.16

  • Technical Interview
    1402.08.21 AT 1 PM

  • Rejection Email
    1402.09.11

Interview duration

  • Technical Interview
    1 hour & 10 minutes

Interview Platform

Google Meet

Technical Interview

مصاحبه با دو نفر بود که هر دو فنی بودن.

  • Tell us about yourself.

  • Can you tell me the software layers that a request goes through in our code, and where it ends up?

  • What is ORM?

  • What is REST?

  • Suppose we want to send 1 million notification and need request it to db how do you handle it?

  • When we want to know a user authenticated or not for some action, how know that and how we handle that?

  • Can you example of some tables with one-to-one one-to-many many-to-many many-to-one?

  • Consider we have some tables and we have fk in each… // TODO

  • What is design pattern? Why is it good?

  • What is SOLID?

  • What is dependency inversion?

  • Example dependency inversion in real world.

  • Example dependency inversion in code. interface go ro gofram

  • When do you use a cache?

  • Is TDD OK? If I say we don’t need to write tests, what’s your reaction in a team?

  • Have you ever experienced the joy of writing a test that fixes a bug and makes you happy?

  • What languages Are you familiar with?

  • Are you OK with php? Our stack is php.

  • What disturbs you at work?

  • What are your main reasons for wanting to work at a different company?

  • What was your git flow at your previous company? Why did you not choose to rebase instead of merging the master branch with your task branch

  • Any question? what is your team structure

Score

8/10

سوالای خوبی پرسیدن که پایه مهندسی نرم‌افزار داشت نه فریموورک و زبان و ابزار. سوالای دیتابیسی و اون سوال یک میلیون ریکوئست رو خوب جواب ندادم و به نظرم همون فاتحمو خوند. به جز اینا مشکلی تو بقیه موارد نداشتم. فقط یه مورد عجیب دیدم که هنوزم برام خنده‌داره. بعد مصاحبه حدود چند هفته گذشت و خبری نشد. بوی ریجکتی و گوست شدن میومد قشنگ. اما هرگز همینجوری شل نگیرید، پیگیر باشید و موقع نتیجه هم فیدبک بخواید. فیدبک خواستنیه و گرفتنی کسی فیدبک نمی‌ده باید بگیریش. شرکت خوبیم بود تمام زورمو می‌خواستم بزنم یه جورایی. تو لینکدین به hr پیام دادم پس چی شد نتیجه مصاحبه ما؟ (حالا اینجوری نه منطقا) فورا بعد چند دقیقه زنگ زد و عذرخواهی و اینا که دیر شده و گفت پوزیشن hold شده و شما هم overqualified شدی سطح‌تون بالا بوده و تو لول مید هستید و فراتر از جونیورید. خیلی جلوی خندمو نگه داشتم. به نظرم اینجوری گفت که مثلا ناراحت نشم و این حرفا وگرنه من خودم می‌دونم که سگ‌جونیورم، سابقه کاریم مشخصه خب. البته که مودب و محترم صحبت می‌کرد. برای شرکتی تو این سطح بعیده. شگفت‌انگیز!

digikala(digicloud)

Status

📜📞🔧📝⚖️❌

Python Engineer (Digicloud)

Interview process

flowchart LR
    sr(Send resume) --> hr(HR Call) --> ti1(Technical Interview) --> t(Task) --> ti2(Task Review) -- rejected --x hri(HR Interview) -.-> o(Offer)

Apply Way

jobinja & site

Interview Date

  • Sent Resume
    1402.08.02

  • HR Call
    1402.08.09

  • Technical Interview
    1402.08.15 AT 4 PM

  • Task
    They sent 1402.08.23
    I sent 1402.08.29

  • Task Review
    1402.09.08 AT 1 PM

  • Rejection Letter
    1402.09.28

Interview Duration

  • Technical Interview
    1 hour

  • Task
    1 week

  • Task Review
    30 minutes

Interview Platform

Skype

Technical Interview

مصاحبه با دو نفر بود که هر دو فنی بودن. یکی‌شون خیلی سوالای کمی پرسید و دیگری حضور پررنگ‌تری داشت. قبل مصاحبه، hr که پروسه رو توضیح داد، از لایوکد هم حرف زد امّا خبری از لایوکد و الگوریتم نبود. مصاحبه‌کننده بسیار خوش‌برخورد، مودب و باحوصله بود. خوب گوش می‌کرد، استرس نمی‌داد و باعث می‌شد ریلکس باشی. ذهنش هم خیلی مرتب و منسجم بود. سوالات درهم و میکسی از هر شاخه نمی‌پرسید. مثلا در مورد پایتون می‌پرسید بعد می‌گفت خب دیگه سوالام از این بخش تموم شد بریم در مورد دیتابیس حرف بزنیم بعد سوالای دیتابیس رو مطرح می‌کرد بعد می‌گفت به نظرم کافیه بریم در مورد معماری و میکروسرویس صحبت کنیم. این خیلی برام جالب بود که ذهن منظمی داره و step by step جلو می‌ره. ممکن بود یه سوالایی بپرسه که فراتر باشه بعدش می‌گفت نگران نباش اگه خیلی باهاش آشنا نیستی انتظار نمی‌ره که بدونی و جزو مصاحبه نبود صرفا خواستم ببینم باهاش آشنایی داری یا نه. در کل حال کردم با مصاحبه چون یادگیری داشت توش و تقریبا هر چی که می‌تونستن، پرسیدن.

  • Tell us about yourself.

  • What is SOLID?

  • What is DI?

  • What is MVC?

  • Which part of MVT that we working with data?

  • What is abc?

  • How can create private methods?

  • Can we have multiple inheritance in Python? What is the algorithm behind it?

  • What is a design pattern, and which design patterns have you used?

  • What is singleton?

  • What is object pool?

  • What is microservice? Are you familiar with that?

  • How did you implement microservice architecture in your past company?

  • How should we design a database in microservice architecture?

  • How can we solve latency between our services in a microservices architecture? How can we protect against data loss?

  • Do you know saga roll-back mechanism? (this is not about interview question just asking)

  • What is RPC?

  • What is decorator?

  • What feature of python that help decorator functionality?

  • What is concurrency and parallelism?

  • Have you ever written async project? Which problem you solved with that?

  • Which function of async in python can run tasks in background? For example we have 4 request and we want send all of it in one time.

  • What is list comprehension?

  • Suppose we have a social media platform, and we want to retrieve all comments of a post. I am using a for statement for this scenario. Is this approach correct? How would you solve this?

          Answer : We use JOIN with tables

این سوال با کلمه for آدمو به اشتباه میندازه. خودشونم گفتن همه این سوالو اشتباه جواب دادن و گمراه شدن در صورتی که ساده‌ست.

  • If some service failed in microservice or some database broken, which approach can solve that?

  • How much do you work for DevOps stuffs?

  • What is ACID?

  • Can you example about consistency issue in work?

  • Which SQL engines support ACID?

  • What was your Git workflow in the last company?

  • If you think something is correct and your tech-lead thinks not, how you deal with it?

  • If you had a problem with someone in work, how you solve that?

  • If you had a problem with your tech-lead, how you solve that?

  • Think your problem with your tech-lead is very extreme and worst case. What’s your approach?

  • Any questions?

          My answer:

فرض کنید همه چی خوب پیش رفت و من رو اکسپت کردین و اومدم تو تیم‌تون. چی باعث می‌شه که بعد یه سال فکر کنید انتخاب‌تون خوب بوده؟

          They response:

به نظرم پیگیر بودن و تلاش برای یادگیری و نظم خیلی مهمه و ارتباط داشتن. اینا چیزاییه که می‌تونه باعث پیشرفت فردی و حتی تیمی بشه.

  • Can you share feedback about the interview that would help us improve?

Task

من خیلی وقت نداشتم برای انجام تسک حتی می‌خواستم کلا نزنم دیدم حسش نیس زیاده وقت بذارم ممکنه کلا ریجکت شه ولی گفتم دیجی‌کالاس یهو دیدی اوکی شد. خلاصه سعی کردم از اون‌جاهایی که بلدم شروع کنم و سه روزه زدم. همه چی داشت تسک‌شون. مهم‌ترین بخش، قسمت async و back-offاش بود که خوب نزدم ولی بقیه قسمتا رو خیلی تمیز زدم هدفم این بود کد مرتبی باشه و خب مثل این که همون دو قسمت براشون مهم بود. بعد از فرستادن تسک، hr فکر کرده بود وقتش گذشته و اگه پیگیری نمی‌کردم، مثل این که کلا زنگ نمی‌زدن بهشون توضیح دادم تاریخ ایمیلا هست تو همون بازه ددلاین فرستادم. موقع زنگ زدن البته عذرخواهی کرد برای اشتباه پیش آمده.
تسک و جواب من.

Task Review

اولش گفت یه بار بیار بالا و همه قسمت‌ها رو از اول تست کن. مثل register, login و اضافه کردن rssها و بقیه apiهایی که بود. مهم‌ترین نکته‌ای که بود، همون قسمت back-off و asyncاش بود. که گفت خب اینجوری که زدی می‌دونی چه مشکلی ایجاد می‌شه؟ و فهمیدم که اون قسمت امضای آفر بود. بعد گفت راه‌حلی داری واسش؟ و یه سری سوال هم کرد که فرض کن یه عالمه لینک خراب داشته باشیم چجوری خیلی سریع و بدون خون‌ریزی می‌تونیم اون خراب‌ها رو تشخصی بدیم و دیگه fetch نکنیم. در مورد دیزاین دیتابیسم یه سری نکات گفته شد که یه جا foreign key استفاده کرده بودم که نیاز نبود. و خب بعد از همه اینا گفت که تمیز کد زدی و معماریت عالیه و تست هم نوشتی اینم خیلی خوبه اما اون قسمتم می‌زدی تموم بود. ازم فیدبک خواست. گفت به نظرت چجوریه؟ ما همه چیو واضح توضیح داده بودیم؟ نظرت راجع به تسک چی بود؟ حس می‌کنم با توجه به مصاحبه‌هایی که می‌ریم خیلی خوب نمی‌زنن این تسکو. در طول مصاحبه هم بسیار مودب و محترمانه برخورد کرد. یه جا وب‌کم رو قطع کرده بود و در مورد کد نظر می‌داد و وب‌کمو روشن کرد گفت من نظرمو می‌گما حس نکنی دارم می‌گم کدی که زدی خوب نیس نترسی یه وقت؟ :)

Score

9/10

تجربه حرفه‌ای و خوبی بود.

karnameh

Status

📜📞🔧👱🏻‍♀️❌

Backend developer (python-django)

Interview process

flowchart LR
    sr(Send resume) --> hr(HR call)
    hr(HR call) --> ti1(Technical Interview) --rejected--x hri(HR Interview) -.-> o(Offer)

Apply Way

jobinja & site

Interview Date

  • Sent Resume
    1402.08.07

  • HR Call
    1402.08.10

  • Technical Interview
    1402.08.13
    یک بار تایم رو عوض کردم

  • Rejection Letter
    1402.09.16

Interview Duration

  • Technical Interview
    About 20 minutes!

Interview Platform

Google Meet

Technical Interview

دو نفر بودن یکی hr و دیگری فنی.

  • Tell me about yourself.

  • Tell me about http protocol.

  • Why did you leave your last job?

  • How long were you in your last company?

  • Can you say some http methods?

  • What is update method?

  • Do you know http status codes? What is 200, 401, 404, 500?

  • Do you know 300 range status codes?

  • What is difference between http and https?

  • Which technologies are you most familiar with?

  • How long have you been experienced with Django?

  • What is decorator?

  • What are generators?

  • What is the last version of python you worked with?

  • What databases do you know?

  • For what purposes did you use Redis in your work?

  • What is indexing? and why is bad when use a lot?

  • What are transactions in a database?

  • What is ACID?

  • Any questions?

Score

6/10

مصاحبه بدی بود. هم خودم خوب نبودم و هم اون‌ها. اولش که hr اومد یه سری توضیحات داد از شرکت و کاراشون که خیلی آشفته بود هی می‌رفت و میومد. گفت خودتو معرفی کن که خب من داشتم به hr توضیح می‌دادم چیکار کردم نه یه آدم فنی و عملا نتونستم با کارای فنیم خودمو خوب پرزنت کنم چون اشرافی به موضوع نداشت. یک مقداری هم منتظر نفر سوم شدیم که بیاد. چون نفر اصلی مثل این که نشده بود بیاد و یکی دیگه جاش اومد. کلهم فضا اینجوری بود که مصاحبه‌ها زیادن تند تند بریم تموم شن کار داریم! اون بی‌نظمی رو می‌تونستم حس کنم. مصاحبه هم زود تموم شد و خب من قشنگ فهمیدم که ریجکت شدم. دو سه روز بعد هم ایمیل ریجکتی رو زدن.

از hr یه سوال پرسیدم (از این سوال فلسفیا که می‌خوای به hr نشون بدی کت تن کیه) و اون این بود که: بزرگ‌ترین چالشی که می‌تونم حل کنم چیه؟ چی ارزش حساب می‌شه؟ که خب یه مکثی کرد فهمیدم اصلا نفهمید و یه جوابی داد که داده باشه تیما رو توضیح داد و اهداف شرکتو که خب من با همین سوال فهمیدم فازشونو. این از اون سوالاس که تو خارج باید پرسید ولی خب تو ایرانم می‌تونی ببینی طرفت چقد حرفه‌ایه.

siz-tel

siz-tel

Status

📜📞🔧❎

Golang Internship

Interview process

flowchart LR
    sr(Send resume) --> hr(Call) --> ti1(Technical Interview) --> o(Offer) --rejected--> r((" "))

Apply way

Linkedin

Interview duration

1 hour

Technical Interview

  • Tell me about yourself.

  • What is python decorator?

  • Why go?

  • Do you written test in your company?

TODO

Score

6/10

برای این پوزیشن باید سه ماه مفتی کار می‌کردی که خب من به همین دلیل ریجکت کردم وگرنه اوکی بود.

siz-tel

Status

📜📞🔧❎

Junior Golang Developer

Interview process

flowchart LR
    sr(Send resume) --> hr(Call) --> ti(Technical Interview) --> o(Offer) --rejected--> r((" "))

Apply way

Linkedin

Interview Date

  • Sent Resume
    1402.08.30

  • Technical Interview
    1402.09.04 AT 12 PM

  • Offer
    1402.09.06

Interview Duration

1 hour & 15 minutes

Technical Interview

  • Why go? Tell me about go and features.

  • Tell me about go data types.

  • Difference between array and slice?

  • Difference between SQL and NoSQL databases? Which one is faster?

  • When we are using message brokers?

  • What use did you have of message brokers in your past company?

  • What is redis data types?

  • What is goroutine?

  • What is channel?

  • What is interface?

  • What is anonymous function?

  • If we want to know type of var in runtime, how can figure out?

  • Difference between concurrency and parallelism?

  • What is gitflow and workflow?

Live code

صفحه رو که شِیر کردم مصاحبه‌کننده گفت: با vim و tmux می‌خوای کد بزنی جدی؟ گفتم آره صرفا چندتا فانکشن کوچولو می‌خوایم بنویسیم دیگه نیازی به IDE نیس. (: یه چلنج ریز در مورد goroutineها بود. هدف نحوه کار باهاشون و مفهوم چنل و سینتکس کلی go بود. چلنجه این بود که دو تا goroutine داریم و می‌خوایم از یکی به اون یکی دیتا بفرستیم (با channel) و یه سری پیام نشون بدیم. که خب لابه‌لاش سوالای مفهومی که اگه goroutineای که تو main وجود داره تموم بشه چه اتفاقی برای بقیه میوفته یا چرا بدون استفاده از sleep بقیه goroutineها نشون داده نمی‌شدن و سوالاتی از این دست. من هم کانسپت کلی رو می‌دونستم (همیشه کانسپت مهمه جزئیات داکیومنت داره) که خب waitGroup چیه و اون وقفه برا اینه که اگه روتین اصلی تموم بشه بقیه هم kill می‌شن. یکم برای پیدا کردن کتابخونه‌هایی مثل rand و waitGroup سرچ کردم برای این که بدونم از کجا import می‌شن که سرچ هم آزاد بود. در کل اوکی بود با این که از قبل حس می‌کردم رو concurrency مسلط نیستم. کدی که زدم رو این‌جا می‌تونید ببینید و از این‌جا ران کنید.

Score

8/10

من یک بار برای internship با این شرکت مصاحبه کرده بودم که چون حقوق نداشت رد کردم. اصلا در مخیله‌ام نمی‌گنجه کار کنی و پول ندن! ربطی به سطح هم نداره چون عدد کم یه بحثه، نداشتن حقوق بحث دیگه. اصلا چیز قابل قبولی نیست. انی‌وی. بعدها دیدم که پست گذاشتن برای جونیور و دوباره به همون کسی که مصاحبه داشتم، تو لینکدین پیام دادم و گفتم مایل به همکاری هستم گفت اوکیه یه تایم ست کن مصاحبه کنیم که برای این کار از calendly استفاده می‌کردن. hrای هم نبود و همه کارا رو تک‌لید (یاseniorشون) انجام می‌داد. بعدش که اوکی شد و دو روز بعد از مصاحبه با شماره خودش زنگ زد و گفت اوکی‌ای علاقمندی و درسته تجربت زیاد نیس ولی کارو درمیاری. چه عددی مد نظرته؟ منم عددم رو (که خب می‌خواستم بالاتر از اونجایی که قبلا بودم باشه)‌ رو گفتم و ایشون گفتن که بالاس و خیلی فاصله داره با چیزی که مد نظر ماست و داستان همین‌جا به پایان می‌رسه. فکر کنم ناهار هم نداشتن. ناهار وظیفه شرکته. اما امریه داشتن و کاری که می‌کردن باحال بود.

System group

Status

📜📞🔧❌

Golang Developer

Interview process

flowchart LR
    sr(Send resume) --> hr(HR call) --> ti1(1st Technical Interview) --rejected--x ti2(2nd Technical Interview) -.-> hri(HR Interview) -.-> o(Offer)

Apply way

jobinja

Interview date

  • Sent Resume
    1402.03.00

  • HR Call
    1402.03.24

  • Technical Interview
    1402.03.24 AT 9 AM

  • Rejection Letter
    1402.03.27

Interview duration

1 hour and 30 minutes

Interview Platform

Skyroom

Technical Interview

مصاحبه با دو نفر بود که هر دو فنی بودند. اولش لایوکد بود که از قبل نمی‌دونستم لایوکد داره بعد لابه‌لاش و بعدش سوال پرسیده می‌شد. خیلی سوالات در هم و برهم بود و دلیلشم این بود که هر چی که می‌گفتم از توش سوال درمیاوردن. مثلا از stringها تو go می‌رفتیم تو خود utf-8 یا از مفهوم stack می‌رفتیم به اون شاخه که تو گو چجوریه تو هیپ چجوریه بقیه زبانا چجورین و این شکلی. مینداختن گوشه رینگ و هر چیزی که تونستن، پرسیدن.

  • Tell us about yourself.

  • What is your contributions?

  • What is your salary expectation?

  • Your knowledge about database is the level of a database administrator?

  • If our query is slow, how would you optimize it? What is your solution for this problem?

  • Do you have an interest in frontend development?!

از این سوال مشخصه می‌خوان مثل برده از نیرو کار بکشن.
فرانت بزن بک بزن دواپسم بزن و از یک نیرو به اندازه چندتا نیرو کار بکشن.

  • What is a slice, and what is the difference between a slice and an array?

  • What is memory complexity when go tries to put our slice to another (big one)?
    Answer: use tahlil sarshekan This link is all about slice.

  • What is the difference between strings in Go and C?

  • What is rune and size?

  • What is UTF-8 and difference with ASCII? What is 8 mean? What is UTF-16?

  • What is methods in go?

  • What is data structure behind map?

  • What is collision and how hash map handle it?

  • What is OOP concepts that go don’t have it?

  • How do we use the encapsulation concept in Go?

  • What is garbage collector?

  • What is stack and differences between heap?

  • Do you have experience with asynchronous or parallelism concepts?

  • What is the difference between concurrency & parallelism?

  • How can send data between processes?

  • Explain call by reference & call by value.

  • What is a race condition, and how can it be handled?

  • Suppose we used other service that has error how can handle it?

  • When should we use panic?

  • It is reliable recovering a panic?

  • Why try catch is bad idea and what is go approach for this?

  • We have service out of here that panics somewhere and we don’t want panic here because here is more important imagine something like rocket system how can handle this?

  • Do you know busy waiting?

  • What is defer?

  • What is your feedback?

Live code

محیطی که باید کد می‌زدم rustpad.io بود که انتخاب خوبی بود و ران کردن کد هم نبود همون psudo code استایل باید مسئله رو حل می‌کردم. فکر می‌کنم نمی‌شد سرچ کرد. البته مصاحبه‌کننده هم نمی‌فهمید اگه سرچ می‌کردم (به شرط سریع سرچ کردن).

Problem 1

Find the most repeated item in this array [1,4,7,4,3,8,4]. return item and repeated time.

My answer:

func getMostRepeatedNum(nums []int) (int, int) {
	numMap := make(map[int]int, len(nums))
	maxCount, maxNum := 0, 0
	for _, i := range nums {
    		numMap[i]++
    		if numMap[i] > maxCount {
        		maxCount = numMap[i]
        		maxNum = i
    		}
	}
	return maxNum, maxCount
}

You can run it here.
What is complexity of your code (time & memory)?

Problem 2

This code runs or fails? & Why? What is zero value of struct?

type a struct {
	B a
}

Answer:

According here; If it’s a value, then the zero value would be another Category, and you would have initialized, zero-value Categories all the way down until you overflow the stack. With a pointer, the zero value will just be nil.
It can handle with pointer:

type a struct {
	B *a
}

This link is good. And this.

Problem 3

We have a linked list. Write a function to create string with this linked list. First char is A. I can’t remember the question is this or not. But sth like that.

type MyString struct {
	Char rune
	Next *MyString
}

func CreateString(s MyString) string {
	// write sulotion
}

//otherPackage
myString := MyString{
	char = 'A',
}

My answer (It's not complete):

func CreateString(s MyString) string {
	result := string(s.char)
	for s.next != nil {
    		result += s.char
    		s = s.next
	}
	return result
}

Problem 4

Write a function to check if slice is nil, return error otherwise, change first value then return that.

My answer:

func changeArray(a []int) ([]int, error) {
	if a == nil {
		return nil, errors.New("Error: Array is empty")
	}
	a[0] = 5
	return a, nil
}

You can run it here.

Problem 5

Suppose we have these tables.

student
id   name
-----------
1	amir
2	reza
3	mostafa

courses
id  title
---------
1   math
2   art
3   data structure

studentCourse
id   studentRef	     courseRef		grade
----------------------------------------------
1 	1          	2       	12
1 	2          	1       	18
1 	1          	3       	8

1 - Write a query shows students, course and grade like this:

amir art 12
reza math 18
mostafa dataStructure 8

2 - Write a query shows each student average grade.

Score

5/10

مصاحبه طولانی و طاقت‌فرسایی بود. سوالایی که پرسیدن به نظرم too much بود. واقعا این مقدار دیپ شدن لازم نیست برای جونیور تازه اونم برای شرکت خشک و سازمانی‌ای مثل همکاران سیستم! یکی از دوستانم بعد از چند ماه برای همین پوزیشن، رفته بود مصاحبه و دقیقا همین سوالا رو پرسیده بودن و نظر اونم با توجه به این که تجربه بیشتری از من داشت، این بود که زیاده‌روی‌ست. حقوقی که بهشون پیشنهاد دادم، پشماشون ریخت. گفتن منظورت خالصه انقد یا با بیمه و اینا؟ گفتم حقوق رو خالص می‌گن. این مال اون دوره‌ایه که مصاحبه می‌رفتم که فقط رقمو ببرم بالا واکنش‌ها رو ببینم، حال می‌ده بکنید از این کارها. در کل خیلی با شرکتای b2b و b2g حال نمی‌کنم. جاست فور فان بود نتیجه‌ش اصلا برام مهم نبود.

bitex

Status

📜📝❌

Backend/Blockchain Engineer

Interview process

flowchart LR
    sr(Send resume) --> task(Task) --rejected--x ti(Technical Interview) -.-> hri(HR Interview) -.-> o(Offer)

Apply way

Linkedin

Interview date

  • Sent Resume
    1402.02.27

  • Task
    They sent 1402.02.27
    I sent 1402.03.03

  • Rejection Email
    1402.03.06

Interview duration

  • Task
    1 week

Task

لینک تسک (یا این‌جا ) و جواب من.

در کل تسک آسونی بود. اما من خیلی با بلاکچین و node آشنا نبودم. این تسک رو هم از یکی از بچه‌های شرکت‌مون که خدای بلاکچین بود، پرسیدم حاجی این چیه؟ حالا خودم تو یه جایی کار می‌کردم که کارش crypto exchange بود ولی بیشتر کار بک‌اندی می‌کردم تا بلاکچینی. خلاصه توضیحاتی من باب این مفاهیم داد و گفت چیزی نداره منم یکی دو روز مونده بود، سَمبَلیک کردم. کاملا انتظار می‌رفت که ریجکت بشه.

Score

8/10

خیلی نمی‌شه نظر داد چون فرآیند مصاحبه خیلی کوتاه بود. تا اونجایی که من پیش رفتم، همه چی خوب و حرفه‌ای بود. شرکت خوبیه، آدمای خلاق و باسوادی اونجا هستن. چنتاشون رو از لینکدین دنبال می‌کنم. محصول باحالیه اگه شرایط‌تون می‌خورد اپلای کنید.

Interview Assignment for Backend/Blockchain Engineer

Objective:

Design and implement an API that allows users to store key-value pairs in a smart contract and retrieve values by providing the corresponding keys.

Requirements:

  1. Write a smart contract in Solidity that can store key-value pairs and retrieve values using keys. The smart contract should have functions for setting key-value pairs and getting values by keys. Both key and values are integers.

  2. Set up a project to interact with the smart contract. Include necessary dependencies and configurations in the project.

  3. Deploys the smart contract to a local Ethereum test network (e.g., Ganache, Hardhat, Anvil).

  4. Use the ABI and contract address to create an instance of the smart contract.

  5. Design and implement the API with the following endpoints:
  • POST /store: Stores a key-value pair in the smart contract. Request Body: { "key": "<key>", "value": "<value>" } Response: { “success”: true, “message”: “Key-value pair stored successfully.” }

  • GET /retrieve?key=<key>: Retrieves the value corresponding to the provided key from the smart contract. Response: { "key": "<key>", "value": "<value>" }

  1. Provide documentation on how to set up and run the project

  2. (Optional) Write unit tests for the API endpoints and smart contract functions.

autoshenas

Status

📜📞🔧❌

Backend Developer (Go)

Interview process

flowchart LR
    sr(Send resume) --> hr(HR Call) --> ti(Technical Interview) -- rejected --x hri(HR Interview) -.-> o(Offer)

Apply Way

jobinja

Interview Date

  • Sent Resume
    1402.02.22

  • HR Call
    1402.02.25

  • Technical Interview
    1402.02.27 AT 1:15 PM

  • Rejection Letter
    Ghosting

Interview Duration

  • Technical Interview
    About 45 minutes

Interview Platform

Google Meet

Technical Interview

  • Do you know what we are doing?

  • Are you student?

  • When you graduate?

  • Are you OK with On-site?

  • Tell me about yourself.

  • How much did you work with Go?

  • Which projects you worked with Go?

  • What is microservices? And what is your experience of it?

  • What is event sourcing and CQRS?

  • What is elasticsearch?

  • Do you worked with kafka or message brokers?

  • What is DDD?

  • What is channel?

  • What is REST?

  • What does “stateless” mean in the context of REST?

  • Are there any APIs that are not stateless?

  • Do you familiar with NoSQL?

  • Are you familiar with Postgres?

  • Why you used Postgres in your company? What’s difference between Postgres and MySQL?

  • What is reverse proxy?

  • How can link IP to domain in nginx?

  • Are you familiar with DevOps stuffs? linux, docker, kuber and etc.

  • What is docker?

  • What is EXPOSE in docker?

  • Can you build up a project with docker?

  • What is docker compose?

  • When you prefer use other packages or write your library?

  • When you want to write a web server with go, what library and functions do you used?

  • When are you available to start with us?

  • What is your salary expectation?

Score

3/10

از نظر سوالا اوکی بود. اما از نظر شرکت و رفتار مصاحبه‌کننده واقعا ضعیف بود. ناهار و صبحانه هم نداشت. یک حرف درِ گوشی، شرکتی که پول ناهار کارمنداشو نداره، جای خوبی نیست. حین مصاحبه، یه جا گفت هیئت مدیره تماس گرفت جواب بدم وقتی داشت صحبت می‌کرد صدا مثل این که رو اسپیکر بود برای لحظاتی و یه صدایی می‌گفت به نظرم این پسره رو بگیریم به اون یکیم بگیم فلان روز بیاد... یه همچین چیزی حالا نمی‌دونم منظورش من بود یا نه خلاصه بی‌نظم بودن و وایب جای تک رو نمی‌داد. رسیدیم به جایی که رقم مورد نظر شما چقده؟ من رقم بالایی رو گفتم ولی اونقد هم بالا نبود خیلی از شرکت‌ها اون رقم براشون اوکیه. فارغ از این‌ها شما یه رقم پیشنهادی دارید یا اوکی می‌شه یا نه یا طرف رقم دیگه‌ای پیشنهاد می‌ده. دیگه توهین و بی‌شعوری نداریم. برگشت گفت وااای این رقم زیاده جایی نمی‌دن اینو ما اگه به جونیور اینو بدیم به سنیور چقد بدیم؟ گفتم شرکتای بزرگ می‌دن اگه شما نمی‌دین بحثش جداست. گفت اسنپ یازده و پونصد می‌ده به جونیوراش، اینو گفت داشتم از خنده پاره می‌شدم حقوق جای فعلی که بودم از اون چیزی که گفت بیشتر بود انگار داشت بچه گول می‌زد. به همین جا ختم نشد و شروع کرد به توهین کردن که شما در بهترین حالت کارآموزی (که من پوزیشنم جونیور بود) نمی‌خوام جسارت کنم (ولی جسارت می‌کند) یه رقمی بگین که باهاتون موافقت بشه و این مهملات. جالبه اول توضیحات، اون قسمت که شوآف شرکت رو می‌کنند معمولا، گفت ما شعبه زیاد داریم شرکتای مختلف تو کانادام شعبه داریم ولی نمی‌تونستن چندغاز به یکی پول بدن. خلاصه که شوآف شرکت‌ها رو جدی نگیرید. فقط می‌خواستم زود تموم شه بزنم بیرون. بعدش یکم بیشتر سرچ کردم ببینم اصلا کی‌اند این‌ها؟ رسیدم به اتوخسروانی که همین رو تو گوگل و توییتر سرچ کنید و بخونید، همین. من دیگه قضاوتی ندارم.

mhholding - doki app

Status

📜📞🔧🔧❌

Senior Golang Developer

Interview process

flowchart LR
    sr(Send resume) --> hr(HR call) --> ti(1st Technical Interview) --> ti2(2nd Technical Interview) --rejected--x hri(HR Interview) -.-> o(Offer)

Apply way

jobinja

Interview date

  • Sent Resume
    1401.10.24

  • HR Call
    1401.10.25

  • 1st Technical Interview
    1401.10.27 At 5 PM

  • 2nd Technical Interview
    1401.11.03 At 3 PM

  • Rejection Letter
    1401.11.05

Interview duration

  • 1st Technical Interview
    1 hour

  • 2nd Technical Interview
    1 hour & 30 minutes

Interview Platform

Google Meet

1st Technical Interview

مصاحبه با یک نفر بود.

  • Tell me about yourself.

  • You don’t have any job experience?

  • Do you have on-site work conditions?

  • What is generic?

  • What is the difference between concurrency and parallelism?

  • We have a scenario. We have two goroutine that traverse a slice. One is start from beginning and other starts from end. How each goroutine can know other one is in the middle of slice? With channels.

  • We have a scenario that we have a goroutine and this goroutine wait for other goroutine how do you handle it? waitgroup.

  • What is interface?

  • What is method?

  • What is receiver function and when we use pass by reference (pointer) on it?

  • What is linked list?

  • What is image in docker?

  • What is ACID?

  • What is nginx?

  • Are you familiar with queues and event-buses?

  • Do you know abstract factory design pattern?

  • What go framework you are familiar with?

  • When you receive a request, how do you read data? How do you unmarshal it?

  • What is middleware?

  • What is context in go?

  • What is init function?

  • What databases have you worked with?

  • What is your salary expectation? Write the number in chat.

2nd Technical Interview

Live code

در این مصاحبه به جز من، دو نفر دیگه هم حضور داشتن (هر دو فنی).
مسئله این بود که سه تا endpoint داریم که دارای متودهای post, get و delete است و باید یه وب‌سرور کوچولو می‌نوشتم که این سه تا رو هندل می‌کرد. یه اسلایسی از استرینگ (یا همچین چیزی) رو باید با آیتم‌هاش بازی می‌کردم.
خوب عمل نکردم و بلند بلند هم فکر نکردم. خیلی سرچ می‌کردم و خب دیدن که طول می‌کشه، گفتن نیم ساعت بیشتر وقت می‌دیم برو بزن بفرست که این عملا یعنی ریجکت. البته واقعا مهم نبود چون یه جا دیگه ۸۰ درصد برام اوکی شده بود.

Score

7/10

مصاحبه خوبی بود.
ایزی بود برام با این که مرحله دوم رو تسلط نداشتم ولی نمی‌شد گفت سخت. برخورد و اینا هم چیز عجیبی ندیدم.

itoll

Status

📜📞🔧❌

Software Engineer - Internship

Interview process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> ti(Technical Interview) --rejected--x hri(HR Interview) -.-> o(Offer)

Apply way

E-mail (:

Interview date

  • Sent Resume
    1401.10.04

  • HR Call
    1401.11.08

  • Technical Interview
    1401.11.09 AT 4 PM

Interview duration

  • Technical Interview
    About 45 minutes

Technical interview

مصاحبه با یک نفر بود.

  • Tell me about yourself.

  • You don’t have any job experience?

  • When you start programming?

  • What projects you worked with django & flask?

  • Do you know OOP rules?

  • What is inheritance?

  • What is interface?

  • What is abstract class?

  • What is polymorphism?

  • What is method overriding in python?

  • What is design pattern?

  • What is SOLID?

  • Difference between list & set? Which one is faster?

  • What is linked list?

  • Which one is better? linked list or array?

  • How can delete an item in linked list?

  • For delete, which one is faster? array or linked list?

  • Are you familiar with database?

  • Scenario: We have some tables about students, courses and student course.

    1. Write a query to show average of each student.
    2. Write a query to show max average.
    3. How can find second max average?
    4. How can find item before min average?
  • What is Redis? Why it’s fast?

  • Are you familiar with git? Can you resolve conflicts?

  • What is the hardest project you have worked on?

  • What does a good work environment look like?

  • If you have a problem with someone, how do you solve it?

  • Are you a creative person?

  • Give me a sentence with these three words: green hat, cat and wizard

  • Do you negotiating with other companies?

  • Any questions?

Score

6/10

این مصاحبه بعد از گرفتن آفر از جای دیگری بود و جنبه‌ی جاست فور فان داشت. گر چه به عنوان کارآموز، به نظرم نباید ریجکت می‌شد اما مهم هم نبود. بیشتر روی OOP فوکوس شده بود تا چیزهای دیگر. سوال‌های زرد و لوس از قبیل یه جمله بساز که سه تا کلمه بی‌ربط توش باشه هم رنک رو پایین میاره. در کل می‌شد که بهتر باشه. نمره ۶ برای این مصاحبه، نمره مناسبیه.

narvan

invex

Status

📜📞🔧👱🏻‍♀️✅

Python developer

Interview process

flowchart LR
    sr(Send resume) --> hr(HR call) --> ti1(Technical Interview) --> hri("HR Interview (On-site)") --> o(Offer) --accepted--> r((" "))

Apply Way

jobinja & Quera

Interview Date

  • Sent Resume
    1401.10.

  • HR Call
    1401.10.19

  • Technical Interview
    1401.10.20 AT 12 PM

  • HR Interview (On-site)
    1401.11.04 AT 1 PM

  • Offer
    1401.11.05

Interview Duration

  • Technical Interview
    1 hour

  • HR Interview
    1 hour

Interview Platform

Google Meet

Technical Interview

مصاحبه با یک نفر بود که CTO شرکت بود. لابه‌لای سوالات فنی، سوالات شخصی پرسیده می‌شد و خیلی سریع هم در حال یادداشت بود این سرعت استرس می‌داد. بعدا که رفتم شرکت دیدم مثلا تو یه روز با ده نفر مصاحبه می‌کنه و دلیلش اونه.

  • Tell me about yourself.

  • What is systemD?

  • How can we know capacity of disk or directory? what command?

  • What is your OS?

  • How much experience do you have with Django?

  • What is middleware in django?

  • What is your typing speed?

  • Do you like golang or python and why?

  • Do you familiar with docker?

  • How network models in docker?

  • What is http1 and http2 differences?

  • Python is call by reference or call by value?

  • What is call by reference and value?

  • What is gRPC?

  • What are differences between python async and go concurrency?

  • What databases have you worked with?

  • What is NoSql?

  • mongoDB is a NoSql?

  • Can you write query?

  • What is LEFT OUTER JOIN?

  • What is GIL?

  • What is python memory management?

جواب چند سوالو گفتم نمی‌دونم و بعدش حس کردم خب به خاطر اونا ریجکته که نشد. (:

HR Interview (On-site)

دو نفر بودن که یکی HR manager بود و دیگری co-founder که خیلی آدم خوش برخورد و کول و مودبی بود. گپ و گفت دوستانه بود و لابه‌لاش به شکل روانشناسانه‌ای سوالا رو می‌پرسیدن. یعنی یه بحثی شکل می‌گرفت و من توضیح می‌دادم و به موضوع a اشاره می‌کردم و مصاحبه‌کننده از موضوع a سوالایی می‌کرد یا واکنشی نشون می‌داد و به نتیجه b که جواب سوال اصلیش بود، می‌رسید؛ حرفه‌ای و بلد بودن.

  • چی در مورد نارون می‌دونی؟
  • اهل کجایی؟
  • تهران کجا می‌خوای بمونی؟ خونه می‌گیری؟ خوابگاه می‌مونی؟
  • اولین تجربه کاریته درسته؟
  • وضعیت سربازیت چجوریه؟
  • دانشگاهت چقد مونده؟
  • قصد مهاجرت داری؟
  • برنامت برای دو سال آینده چیه؟
  • اگه روشت درست باشه تو تیم و موافقت نشه باهاش چی کار می‌کنی؟
  • تو تیم کار کردی؟
  • دوستات تو رو به چی می‌شناسن؟
  • اخلاق بدات چیاس؟
  • برای درست کردنشون چه تلاشی کردی؟
  • خودت دوست داری تو چیا بهتر باشی؟
  • اگه یکیو ناراحت کنی تو شرکت چطوری حلش می‌کنی؟
  • چه آدمایی سختن؟
  • قبل این که بیای تصورت راجع به اینجا چطوری بود؟
    یعنی گفتی میام شرکت چطوریه؟ بچه‌ها چطورین؟ فضا چه شکلیه؟
  • با جاهای دیگه هم تو پروسه مصاحبه هستی؟
  • ما انتخاب چندمتیم؟
  • چی باعث می‌شه که ما بشیم انتخاب اولت؟
  • اگه اوکی باشیم کی می‌تونی بیای؟
  • آدم متمرکزی هستی؟
  • تو open office می‌تونی کار کنی؟
  • من اگه مدیر مستقیمت باشم چیکار کنم که پشیمون بشی از اومدن به نارون؟
  • حس می‌کنم آدمی هستی که self learning بالایی داری درسته؟
  • چی شد که دانشگات انقد طولانی شد؟
  • حقوق مد نظرت؟
  • ناهار خوردی؟ ناهار اگه می‌خوری هست. بله.

Offer

روز بعد مصاحبه، آفر رو فرستادن. من از وقتی که گفتن مرحله دوم حضوری بیا، سیگنال مثبتو گرفتم فهمیدم اوکیه قضیه.

Score

8/10

شرکت خوبیه فرهنگ خوبی داره برای شروع خوبه.

sahmeto

Status

📜📞📝❌

Back-End developer (python)

Interview process

flowchart LR
    sr(Send resume) --> hr(HR Call) --> t(Task) -- rejected --> ti1(Technical Interview) -.-> hri(HR Interview) -.-> o(Offer)

Apply Way

jobinja

Interview Date

  • Sent Resume
    1401.10.15

  • HR Call
    1401.10.24

  • Task
    1401.10.26

Interview Duration

  • Task
    1 week (I think)

Task

یه تسک الگوریتمی فرستادن که فقط یه سوالشو زدم فرستادم. حسش نبود کلا. یه مصاحبه دیگه داشتم اون تایم خیلی وقت نذاشتم روش. تسک رو می‌تونید از این‌جا ببینید.

Score

6/10

Dade Afzar Arman (daa)

Status

📜📞🔧❎

Backend Developer (C)

Interview process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> ti(Technical Interview) --rejected--x hri(HR Interview) -.-> o(Offer)

Apply Way

Linkedin (Hiring)

Interview Date

  • Sent Resume
    1401.09.19

  • HR Call (Skype voice chat)
    1401.09.20

  • Technical Interview
    1401.09.23 AT 4 PM

  • Rejection Letter
    1401.10.07

Interview Duration

  • HR Call
    30 minutes!

  • Technical Interview
    30 minutes

Interview Platform

Skype

HR Call

وقتی با من تماس گرفتن، همه چیزایی که لازم بود رو پرسیدن و همه شرایط شرکت رو توضیح دادن. همه چی خوبه به بچه‌ها می‌رسیم ناهار، حقوق به موقع، بیمه، ریموت، امریه، پروژه سربازی، دورهمی، اتاق بازی، پاداش در هر ماه و فیچرهای شرکت. ۵۰ میلیون سفته هم باید می‌دادم. بعد از گفتن چنین چیزی عملا شرکت برای من مرد ولی گفتم حالا ببینم به آفر می‌رسه یا نه و یه سری سوال‌های معمول hrای که همه می‌پرسن در مورد دانشگاه و تکنولوژی و سربازی و این‌ها مشخص بود از رو کاغذ داره می‌خونه و تیک می‌زنه. گفت روند مصاحبه بسته به سطحت، ممکنه متغیر باشه. یا یه مصاحبه فنیه که اوکی می‌شی یا علاوه بر اون، یه تسک انجام می‌دی یا بعد اینا یه ماه آزمایشی کار می‌کنی. که اون یه ماه، حقوق و همه مزایا رو داره. یه مصاحبه هم با مدیرعامله. نظم و انظباط خیلی مهمه برامون، نگاه بالا به پایین نداریم و صحبت‌هایی با چاشنی شوآف. از این سخنرانیا که تهش باید بگی: «تموم شد؟ خیلی تاثیرگذار بود».

  • چند سالتونه؟
  • دانشجو هستین؟
  • کجا سکونت دارید؟
  • وضعیت سربازی‌تون به چه صورته؟
  • قصد مهاجرت دارید؟
  • با کار حضوری و فول‌تایم اوکی هستین؟
  • برنامه‌تون برای ۵ سال آینده چیه؟
  • تجربه‌ کاری‌تون چقدره؟
  • انتظارتون از شرکت خوب چیه؟
  • با شرکت‌های دیگه هم در حال مذاکره‌ای؟
  • چه زبان‌هایی کار کردین؟
  • با C کار کردین؟ یا دوست دارین که یاد بگیرین؟
  • به امنیت علاقه دارین؟
  • زبانت چطوره؟
  • از کی می‌تونی کار کنی؟

Technical Interview

مصاحبه با یه نفر بود و مصاحبه‌کننده وب‌کم رو روشن نکرد و چیزی هم درباره‌ش نگفت.
بعدش فهمیدم برای مسائل امنیتی و ایناس!

  • Tell me about yourself.

  • At what level do you see yourself? I’m junior.

  • What do you mean about “junior”? Explain more.

  • Are you self-learn person?

  • What technologies are you familiar with?

  • What are your favorite technologies, and do you want to work with them?

  • Are you familiar with django?

  • What is difference between Authentication and Authorization?

  • Suppose we have an application that we sell it to customer. Now we want change the database of that without changing anything on that application because it’s not backward compatible how can we do that?

  • Are you familiar with Database? ORM or SQL?

  • What is restful?

  • What does ‘stateless’ mean in the context of REST?

  • What is your opinion about test?

  • Are you familiar with linux?

  • What is your OS?

  • Are you familiar with redis?

  • Are you familiar with mongoDB?

  • Do you like working with C?

  • Do you like security stuffs? Not security in software, that’s about job.

  • یه سوال می‌پرسم صادقانه جواب بدین، این سوال خیلی برای ما مهمه در فرآیند همکار شدن‌مون. شما در پاسخ به این سوال که امنیت رو دوست دارین، جواب‌تون مثبت بود اینجا منظور امنیت نرم‌افزار نبوده در واقع مقصود، کار بر روی پروژه‌های امنیتی، نظامی و محرمانه بوده. خیلی‌ها دوست دارن تو رزومه‌شون بگن چه کارهایی کردن یا با سواد فنی‌شون شوآف کنند. شما اگه بخواید تو این پوزیشن کار کنید نمی‌تونید این کارها رو بکنید یا بگید رو چه چیزی کار می‌کنید مثلا کسی که تو اسنپ کار می‌کنه، می‌گه رو پروژه مپ بودم و روی فلان الگوریتم‌ها کار می‌کردم و در لینکدین، همه می‌تونن ببینن در این‌جا چنین چیزی امکان‌پذیر نیست. یه سری‌ها با روحیات‌شون سازگاره و بعضی نه. شما شفاف پاسخ بدین که اوکی هستین با چنین فضایی یا خیر؟ من هم کاملا رک و شفاف گفتم خیر با روحیاتم سازگار نیست و اوکی نیستم.

از نظر سطح مصاحبه، برام ایزی بود، چیز چالش‌برانگیزی نداشت.

Score

5/10

مزایای شرکت خوب بود ولی خب با فضا و سفته اوکی نبودم. حتی هنوزم نمی‌دونم فعالیت‌شون چیه؟ اما قشنگ متوجه شدم که سوال آخر رو می‌گفتم بله، ریجکت نمی‌شد یعنی از نظر فنی؛ مشکلی نداشتم.

hamravesh

Status

📜📞📝❌

Interview process

flowchart LR
    sr(Send resume) --> hr(HR call) --> task(Technical Task) --rejected--x  ti(Technical Interview) -.-> hri(HR Interview) -.-> o(Offer)

Apply Way

Site & jobinja

Interview Date

  • Send Resume
    IDK

  • HR Call
    1401.08.25

  • Sent Task
    1401.08.26

Interview Duration

  • Task
    1 week

Task

تسک، خیلی چیز خاصی نداشت اما چون من اون موقع خیلی با این ابزارها کار نکرده بودم، عمیق نبودم روشون. گر چه پروژه رو فرستادم که بسیاری از نیازمندی‌ها رو پوشش می‌داد.

Score

6/10

مصاحبه‌هایی که اولش باید تسک بزنی تا به نوعی وارد فرآیند مصاحبه بشی، یه مقدار ستمه. چون شما وقت می‌ذارید اما ممکنه کل زحمت‌تون هدر بره علاوه بر احتمال ریجکتی، صرفا چون تسکیه که برای هدف خاصیه، نمی‌تونید به عنوان پروژه‌ای جایی بذارید یا یادگیری جالبی توش داشته باشه. خیلی نمی‌شه به فرآیند مصاحبه نظر داد فقط می‌تونم تا همین جایی که تجربه کردم نظر بدم که اگه مسئله کوچک و یا سوال‌ چالش‌برانگیز باشه، بهتره. همه اینا سلیقه‌ست و خب مصاحبه‌کننده هم می‌خواد فیلتر کنه. ولی از ساید کسی که مصاحبه می‌کنه نمی‌خوام نظر بدم، از ساید خودم به نظرم می‌شه جور دیگری فیلتر کرد.

sternx

Status

📜📞🔧👱🏻‍♀️❎

Senior Golang developer

Interview process

flowchart LR
    sr(Send resume) --> hr(HR call) --> ti1(Technical Interview) --> os(On-site Interview) --> o(Offer) --rejected--> r((" "))

Apply way

jobinja

Interview Duration

  • 1st Technical Interview
    About 45 minutes
  • 2nd Technical Interview
    6 hours

1st Technical Interview

مصاحبه با دو نفر بود. مدیرعامل و CTO. اول مصاحبه CTO در مورد کامتریبیوت‌های گیتهابم سوال کرد و خیلی جذب شده بود به کانتریبیوتم رو یکی از پروژه‌های گوگل. چون با پروژه اوپن‌سورس کار داشتن، به نظرشون من مناسب بودم.

  • Tell me about yourself.

  • Are you graduated?

  • Do you have any job experience or have you made any money from programming?

  • You contributed multiple repositories in GitHub and one of them is for Google.
    Can you explain that?

  • Go doesn’t have classes and is not based on OOP principles. Can you explain that?

  • Are you familiar with design patterns?

  • What is decorator in python?

  • We have this menu and there are task & subtasks. How you can traverse all items and access to each?

          My answer: With graph. it's a tree and with BFS & DFS, we can traverse it.

  • What do you know about git?

  • What is git rebase?

  • What’s your salary suggestion?

2nd Interview (On-site)

بعد اولین مصاحبه زنگ زدن که یه جلسه حضوری باید برم. رقم و اینارو صحبت کردیم. مصاحبه نبود خیلی بیشتر توضیح در مورد پروژه و چیزی که روش کار می‌کردن بود. روی mdm solution کار می‌کردن (تکنولوژی جالبیه اگه دوست داشتید سرچ کنید) و از یه لایبرری اوپن‌سورس استفاده می‌کردن که با گو نوشته شده بود. منو برای این می‌خواستن که اونو توسعه بدم و داشتن اونو بهم توضیح می‌دادن. یه ساعتی بهم توضیح دادن که چیه اصلا این لایبرری! شرکت کوچیک و خوبی بود و ناهارم نداشتن انگار البته به من یه ساندویچ کالباس آماده دادن و هر کی ناهار خودشو رو میزش یا تو آشپزخونه می‌خورد. با تیم یکم آشنا شدم و رفتار CTO هم خیلی کول و صمیمی بود. با پروژه‌ها ور رفتم و خوندم و CTO شماره خودشو بهم داد گفت برو بخون یکم ببین می‌تونی توسعه بدی؟ هر چی سوال داشتی هم بپرس. بیشتر آشنایی با محیط و تیم بود. بعدش هم خورد به روزهای قطع اینترنت و کلا همه چی رفت رو هوا و خب من خیلی نمی‌تونستم روش وقت بذارم و نه من پیگیر شدم و نه اونا.

Score

7/10

مصاحبه اوکی‌ای بود. یکم به نظرم می‌شد سوالای فنی بیشتری پرسید ولی خب خیلی سخت نگرفتن و از اون طرف حقوق بالا یا ناهار نداشت و محل شرکت هم اون موقع پشت مصلا بود و جای جالبی نبود. نمره ۷ نمره خوبیه.

phanous

Status

📜📞🔧📝⚖️❌

Software Engineer

Interview process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> ti(HR & Technical Interview) --> task(Task) --> tr(Task Review)--rejected--x o(Offer)

Apply way

Linkedin

Interview date

  • Sent Resume
    1400.07.08

  • HR Call
    1400.08.04

TODO: they said we have two Interview and set two of them once

  • HR & Technical Interview
    1400.08.09 AT 11 AM

  • Task
    1400.08.12 & I sent 1400.08.16

  • Task Review & Live code
    1400.08.22 AT 11 AM

  • Rejection Email
    1400.09.14

Interview duration

  • HR & Technical Interview
    1 hour

  • Task
    6 days

  • Task Review & Live code
    2 hours

Interview Platform

gharar.ir

HR & Technical Interview

مصاحبه با دو نفر بود که یکی HR بود و دیگری فنی. لابه‌لای سوالای hrای اون یکی دوستمون میومد سوالای فنی می‌پرسید.

  • ما رو می‌شناسی؟ می‌دونی چیکار می‌کنیم؟
  • از خودت بگو.
  • پلنت برای چند سال آینده چیه؟
  • تو تیم کار کردی؟
  • شده تو تیم با یکی به مشکل بخوری؟ چطوری حلش کردی؟
  • چی باعث می‌شه از شرکت ما بری؟
  • چندتا از ویژگی‌های خوبت رو بگو. چیزایی که بهش افتخار می‌کنی.
  • از چی خیلی بدت میاد و آزارت می ده؟

Technical Questions

  • What is REST? And stands for?

  • When type google.com what’s happening?

  • What is Docker?

  • Someone tries to login our system with brute force approach. What’s your solution to deal with this problem?

  • What is threads and parallel in cpp or python which libraries do you work with in?

  • What open source project is you like to contribute?

  • What is difference between tcp & udp?

  • Web2 by dafult is on tcp or udp?

Task

تسک ساده‌ای بود و ۴ روزه زدم. به خوبی نیازمندی‌های خواسته شده رو پوشش می‌داد.

Task Review & Live code

در مورد تسک خیلی بحثی نبود چندتا نکته بود که برای بهتر شدنش بیان شد. یکی این که برای تبدیل عدد به فارسی و انگلیسی (همچین چیزی فکر کنم) چرا از لایبرری استفاده کردی؟ خودت می‌تونستی با string هندل کن ی. یکی دیگه هم استفاده از bare except ها بود. بعدش یه ریپو از گیتهاب معرفی کرد که یک فایل منیجر بود که با go نوشته شده بود. گفت اول اینو clone کن و بیارش بالا. برای استفاده ازش اولش یه پسوورد می‌خواست که من دهنم صاف شد از تو ریپو پیداش کنم استرس داشتم پس از پا زدن‌های بسیار و یکم راهنمایی مصاحبه‌کننده دیدم تو داک نوشتن. (: بعدش گفت خب موقع استفاده از این ممکنه یه سری فایل به اون دایرکتوری اضافه بشه یا تغییر کنه. یه اسکریپت بنویس که بالا باشه و هر فایلی که تغییر کرد بهمون بگه. سرچ هم آزاد بود. که خب من خیلی زور زدم و دقیقا نمی‌دونستم چیکار کنم یه چیزایی هم با پایتون نوشتم که نصفه نیمه کار می‌کرد و مفاهیم async رو هم بلد نبودم و خب کار درنیومد. از دو ساعت‌های فرسایشی بود. وسطا مصاحبه‌کننده محو می‌شد قطع امید کرده بود. من هم خیلی بلند بلند فکر نمی‌کردم.

Score

8/10

به طور کلی، تجربه خوبی بود و کاملا تسک‌محور. یه مقدار سوالای HRای زیادی داشت تو مرحله اول و به شکل روانشناسانه‌ای سوال‌پیچ شده بودم. مشخص بود هر دو تو کارشون حرفه‌ای‌ان. تو مصاحبه بعد از تسک، خیلی نتونستم خوب عمل کنم و خودم بعدش حس می‌کردم که کنسله. اما همه مراحل دقیق و مرتب توضیح داده شده بود، چه توضیحات تسک و چه ایمیل‌هایی که رد و بدل می‌شد. همه تمپلیت‌ داشت و همه حالت‌هایی که ممکن بود رخ بده رو، در نظر گرفته بودن که همه اینارو تو سایت‌شون هم می‌شد دید و انگلیسی بود. ایمیل فارسی طبق تجربه، برای من مثل code smells عه، بوی بی‌نظمی و ناهماهنگی می‌ده. پیام ریجکت‌ باحالیم فرستادن. نوشته بودن شما جوانید و توانایی‌های شما نسبت به سنتون خیلی خوبه اما ما یکی رو گرفتیم که از شما پیرتره و تجربه بیشتری داره.

graph

Status

📜📞👱🏻‍♀️📝❌

C++ developer

Interview process

flowchart LR
    sr(Send resume) --> hr(HR Call) --> hri(HR Interview) --> task(Technical Task) --rejected--x ti(Technical Interview) -.-> o(Offer)

Apply way

Linkedin

Interview date

  • Sent Resume
    1400.07.08

  • HR Call
    1400.07.10

  • HR Interview
    1400.07.12 AT 3 PM

  • Task
    1400.07.14

Interview duration

  • HR Interview
    30 minutes

  • Task
    1 week

Interview Platform

Google Meet

HR Interview

  • خودت رو معرفی کن.
  • ترم چندی؟ دانشگاهت چقد مونده؟
  • اهل کجایی؟
  • قصد مهاجرت اگه نداری بگو.
  • پنج سال آینده خودتو کجا می‌بینی؟
  • حقوق مدنظرت؟

Task

تسک رو خوب نزدم و یه چیزی ماسمال کردم فرستادم که زده باشم. ایمیل دادن گفتن فلان جاشو درست کن بفرست چند روزم اضافه وقت دادن که دیگه نفرستادم چون اون تایم خیلی خوب بلد نبودم و بیخیالش شدم.

Score

6.5/10

به نظرم تسکی که فرستادن اندکی سخت بود. یعنی؛ برای مصاحبه یه چالش کوچولو باید باشه. با تسک مشکل دارم کلا. حتی live code رو به تسک ترجیح می‌دم، تموم می‌شه می‌ره و سریع‌ترم هست برخلاف عده‌ی کثیری که ازش می‌ترسن.

gharar

Status

📜📞🔧❌

Software Engineer Internship

Interview process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> ti(Technical Interview) --rejected--x hri(HR Interview) -.-> o(Offer)

Apply way

Site

Interview date

  • Sent Resume
    1400.06.31

  • HR Call
    1400.07.07

  • Technical Interview
    1400.07.11 AT 2 PM

  • Rejection Email
    1400.07.27

Interview duration

  • Technical Interview
    About 1 hour

Interview Platform

gharar

Technical Interview

  • Tell us about yourself. // TODO

Score

7/10

Toman

Status

📜📞🔧❌

Senior Backend Developer (Python/Django)

Interview process

flowchart LR
    sr(Send resume) --> hr(HR call) --> ti1(1st Technical Interview) --rejected--x  ti2(2nd Technical Interview) -.-> hri(HR Interview) -.-> o(Offer)

Apply way

Refer

Interview Date

  • HR Call
    1403.03.27

  • Technical Interview
    1403.03.30

  • Rejection Email
    1403.04.02

Interview Duration

  • Technical Interview
    1 Hour and 30 minutes

Interview Platform

Microsoft Teams

1st Technical Interview

  • Interviewer Told about himself and The culture in Toman.

  • Tell me about yourself and your experience.

  • Tell me about Django request life-cycle.

  • In which order django middlewares work

  • Is the order of middlewares are same when processing response compare to processing requests?

  • Can you tell what is the usage of UWSGI/Gunicorn?

  • Imagine a micro-services architecture. we want to follow up a request to have a track of them in the system. How do you suggest to track them. A: My Answer was to add a unique code in the header of the request

  • How can we make sure that the codes you said, are unique? A: My answer was using UUID

  • Ok, we made the requests unique. Where can we store them?

  • How queues in a message broker works? Are they working simultaneously?

  • How to know how many queues do we need? (I didn’t know the answer!)

  • What if Our RabbitMQ or Celery Fails? What is your solution not too lose any of the tracking data?

  • Can You tell what are the migration files in django?

  • Did you have any specific challenge with the django migrations?

  • Have you ever changed the migration files manually for any specific reason?

  • Do you have any other question?

Score

9/10

فرایند هماهنگی خوب بود. مصاحبه‌کننده خیلی حرفه‌ای و همینطور صمیمانه رفتار کرد و فرهنگ شرکتو توضیح داد و از نظر من خیلی مناسب بود رفتار و جو مصاحبه. میتینگ روی مایکروسافت تیمز بود که چون نسخهٔ لینوکسی نداره با وب وصل شدم و کمی به سختی لود شد. در مجموع جواب‌های منم بد نبودن و خودم راضیم. قطعاً ریجکت شدن هم پیش میاد به هر شکلی که بگذره چون عدهٔ زیادی مصاحبه می‌شن و شرکت‌های فیت‌ترینشونو انتخاب می‌کنن.

DP Kharazmi (Saderat Bank)

Status

📜📞🔧✅

Front-End Developer

Interview Process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> ti(Technical Interview) --Accepted--> o(Offer)

Apply Way

Refer

Interview Date

  • Sent Resume
    2025/08/17

  • HR Call
    2025/08/31

  • Technical Interview
    2025/09/06

  • Offer Email
    2025/09/14

Interview Duration

  • Technical Interview
    20 minutes

Interview Platform

In-person

Technical Interview

  • Tell us about yourself.

  • Why did you leave previous job?

  • Are you able to work with React?

  • What’s your expected salary?

  • Explain about the challenge you faced at work and how you solved it?

  • What is data binding? How many types does it have?

  • What is signal?

  • Can you explain the SOLID principle?

  • What is eventEmitter?

  • What are guards in Angular? where have you used them?

  • What is Angular optimization?

  • If you were given a project with slow loading performance, what steps would you take to improve it?

  • What is Promise?

  • What do you know about Git workflow?

Score

4/10

به رزومه‌ای که دستشون می‌رسه چه به صورت ریفرال چه جابینجا توجهی ندارن و شما مجدد باید فرم پر کنید. فضای کار مشابه سایر سازمان‌های دولتیه و برای ورود نیاز به برگه‌ی ورود هست. مجدد فرم مشخصات پر می کنید و مصاحبه کننده هم مدیر فنی بود که با یک کاغذ تو دستش که تیک می‌زد مصاحبه رو شروع کرد. کل مصاحبه کوتاه بود و سوالات عمومی بود که می شد از انگولار پرسید. بیشتر تایم مصاحبه به توضیح درمورد قوانین گذشت. در کل خود مصاحبه سادست و چیزی هم طبیعتا بهتون اضافه نمی‌کنه. سوء پیشینه و آزمایش اعتیاد مهم تر از سطح مهارت بود و با وجود ۱۳۰ تا برنامه نویس توضیحات پروژه جالب بنظر نمیومد.

Postex

Status

📜📞🔧❌👱🏻‍♀️✅

Front-End Developer

Interview Process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> ti(Technical Interview) --rejected--x hri(HR Interview) -.-> o(Offer)

Apply Way

LinkedIn

Interview Date

  • Sent Resume
    2026/06/19

  • HR Call
    2026/06/20

  • Technical Interview
    2026/06/22

  • Offer Email
    2026/06/29

Interview Duration

  • Technical Interview
    1 hour & 45 minutes

Interview Platform

In-person

Technical Interview

  • Could you introduce yourself?

  • Can you tell me about the most recent Next.js project you worked on? How did you improve its accessibility?

  • Have you worked with TanStack Query? Do you prefer using it over fetching data manually? Why?

  • If you had to choose between the Fetch API and Axios, which one would you pick, and why?

  • What are Promises in JavaScript, and why do we use them?

  • Imagine you have four console.log() statements: two synchronous logs one after another, one inside a Promise, and one inside setTimeout(…, 0). In what order would they be printed, and why?

  • Where would you store an authentication token: Local Storage or Cookies? Why?

  • How have you implemented JWT-based authentication in your previous projects? Can you walk me through the authentication flow?

  • What’s the difference between throttling and debouncing? When would you use each one?

  • If multiple API requests are sent one after another, how would you make sure an older request doesn’t overwrite the result of a newer one if it finishes later?

  • What’s the most recent technical challenge you faced in your code, and how did you solve it?

  • Suppose there’s a bug in production that you can’t reproduce locally. How would you investigate and fix it?

  • How do you identify whether a React component is re-rendering too often, and how would you optimize it?

  • Why might a useEffect end up in an infinite loop? What are the common causes?

Score

6.5/10

سوالات فنی خیلی تیپیکال بودن و اگه چندبار مصاحبه های فرانت رو رفته باشید ویژه برای React/Next تقریبا تکراری ان. مصاحبه بی جهت خیلی طولانی بود اما فضای دوستانه‌ی خوبی داشت. با این‌که زیر مجموعه‌ی دات وان بودن، از نظر مالی خیلی منعطف نبودن و ۵۰ تومن براشون زیاد بود. دو مرحله مصاحبه فنی و یک مرحله HR داشت که خیلی جالب نبود چون مواردی و مطرح کرد تحت اسم همدلی که بیشتر معنیش آچار فرانسه بودن توی شرکت بود و حدودا طی ده روز آفر داد.

Busnet

Status

📜📞🔧❌

Front-End Developer

Interview Process

flowchart LR
    sr(Send Resume) --> hr(HR Call) --> ti(Technical Interview) --rejected--x hri(HR Interview) -.-> o(Offer)

Apply Way

Jobinja

Interview Date

  • Sent Resume
    2026/05/16

  • HR Call
    2026/05/31

  • Technical Interview
    2026/06/03

  • Rejection Email
    2026/06/10

Interview Duration

  • Technical Interview
    30 minutes

Interview Platform

In-person

Technical Interview

  • Could you introduce yourself?

  • Have you worked with state management libraries? Which ones have you used?

  • Have you used the App Router in Next.js, or did you use the Pages Router?

  • Are you comfortable working with TanStack Query?

Score

1/10

باس نت درواقع اسپین آف همون شرکت سفیر سیر رضاست که برای اتوبوس رانیه. محل مصاحبه دوتا ساختمون قدیمی شبیه ترمینال جنوب بود و سه چهاربار جابجا شدم تا به مدیرفنی برسم. همه تقریبا کارآموزن و حقوقی دریافت نمی کنن یا حقوق پایه وزارت کار دریافت می کنن. مصاحبه ی فنی ای عملا وجود نداشت و کلا سه تا سوال پرسیده شد و به واحد مسکونی مدیرعامل ارجاع دادن و یه سری اطلاعات شخصی از قبیل کدملی و نام پدر و آدرس سکونت مدیرعامل ازم گرفت!!! و مصاحبه اصلا حرفه ای نبود. همه ی اتاق ها هم با دوربین مانیتور می شد. در نهایت بعد از یک هفته پیامک دادن و اطلاع دادن که over-qualified ام و نمی تونیم همکاری داشته باشیم!!!

Contributors