اینجا قصد دارم تجربیاتی که چند سال اخیر از مصاحبهها با شرکتهای ایرانی داشتم رو منتشر کنم. اولش خیلی به نظرم مسخره و پوینتلِس میاومد تا این که دیدم همه ما تجربیاتی تو زندگی داریم که پس از پشت سر گذاشتن اونها یا فراموششون میکنیم یا اونقدر جدی نمیگیریم تا بتونیم ازشون استفاده کنیم یا گاهی اصلا امکان فرصت تجربه دوبارهش نیست و شاید اگه با بقیه در میون بذاریم، فقط به اونا میتونیم کمک کنیم و یا همین که آنچه که بر تو گذشته رو مینگاری، به تنهایی کافیست! از روزگاران بسیار دور تا به امروز، این متن بوده که ماندگار بوده و به مثابه زندانیای که هر روز در انفرادی به سر میبره و هیچ امیدی نداره و سعی میکنه روزهاش رو بیاره رو کاغذ و سالها بعد ازش فیلم و سریال میسازند و یادش میکنند، گاهی راه چاره قلمه. مخلص کلام؛ نوشتن تجربیات خوب است.
مینویسم پس هستم!
سعی کردم تا حد ممکن به شکل دقیق، موشکافانه و به دور از غرضورزی و سوگیری، به همراه جزئیات، در مورد مصاحبههایی که داشتم، فارغ از این که چه شرکتیه و چی کار میکنه، فقط نسبت به همون اتفاقاتی که بین من و اونها رخ داده، قضاوت کنم و نظر بدم. از طرفی، دیدم که پلتفرم قوی و درست و حسابیای که مرجع باشه یا حتی مفید باشه و دیتای بهروز داشته باشه، نگاهی منطقی و به دور از احساسات داشته باشه و دید صفر و یکی نداشته باشه، عملا وجود نداره. اشتراک تجربه در سوشالمدیاها نیز به شکل پراکنده و پخش و پلاست و باز هم چیزی که میخواستم رو برآورده نمیکرد. مدتها، قبل این که سرمو رو بالش بذارم، این کرم تو سرم بود تا این که سایت خودمو بالا آوردم و «جابنامه» به وجود اومد. امیدوارم مفید واقع بشه.
نمیدونم شما چی بهش میگی؟ ریفر، کانکشن، رابطه، آشنا، باند یا پارتی. هر چی که هست، خوب یا بد، بخوای یا نخوای، همین است و بس! بقیهش نویزه. حالا یعنی چی؟ شما دنبال کاری و خب میری از یه جا به شرکتایی که نیازمندیاش بهت میخوره، اپلای میکنی که خب باید منتظر باشی.
راه درستش اینه که چهارتا آدم پیدا کنی که تو رو معرفی کنن به شرکتاشون. حالا این آدما میتونن دوست، رفیق، زید، پارتنر، یار، دوستدختر/پسر، زن، شوهر، همسر، نامزد، دوست معمولی، دوست اجتماعی، دوست غیرمعمولی، دوستی بامزایا، دوستی بدونمزایا، دوست با چاشنی سبزیجات دریایی، فامیل، آشنا و هر کی میخوان، باشن، مهم نیست (بدیهیه اگه اون آدم پوزیشن کلفتتری داشته باشه، شانس آفر بالا میره). فقط مهم اینه که داشته باشیشون چرا که به طور کلی، یافتن و انتخاب نیرو برای یک پوزیشن، سخته. زمانبر و همچنین، هزینهبره.
فرض کنید شما حدودا ۲۰تا مصاحبه میرید و بالاخره طبق اصل لانه کبوتری، حداقل یه جا اوکی میشه. ولی از دید شرکت و اون تکلیدی که برای تیمش دو تا نیرو با پوزیشنهای متفاوت نیاز داره نگاه کنید. مثلا یه بکاند و یه فرانتاند. اون باید برای هر پوزیشن ۲۰تا مصاحبه بره رو هم میشه ۴۰تا! تازه این برای دو تا نیروئه. تعداد بیشتر بشه همینجوری کار سختتر میشه. پس پیدا کردن نیرو برای یک شرکت، از کسی که دنبال کاره، سختتره. حالا این که سنجش، عادلانه و درست صورت میگیره رو کاری نداریم که همه اینا جزو سختیای کاره. پس راهحل شرکت چیه؟ این که چند نفر از کارکنان خودش معرفی بشه مثلا n نفر. دیگه میره با همونا مصاحبه میکنه و از خداشه همونا اوکی شن چون هم این که یکی از همکارا اونارو میشناسه بیشتر میتونه کمک کنه به راه افتادنش، هم این که چون با اون آدم در ارتباطه، در یک دایره اجتماعی قرار میگیرن، پس، اوکیه. البته نقدهایی بهش وارده ولی خب بیاین فعلا بگذریم ازش.
پس بیشتر از این که مهارت و دانش رو افزایش بدیم، اگه ارتباطاتمون رو بیشتر کنیم، برندهایم. دانش و مسائل پیرامونش خواه ناخواه باگذشت زمان میاد.
فرای ریفر، دیده شدن و visibility مسئله مهمیست. تواناییهای ما باید دیده بشه. ما تا یه غذایی رو نخوریم، نمیتونیم طعمش رو بچشیم. آدما تا چیزی از ما نبینن، نمیتونن بفهمن که دانشمون چجوریه. پس «ارائه کردن»، واجبه و خوب ارائه کردن، هنره. اگه یه غذا دیزاین خوبی داشته باشه، احتمال میدیم طعمشم خوب باشه یا شانس این که تستش کنیم رو بالا میبره حتی اگه نخوریم! آدما حوصله کندوکاو و گشت و گذار تو محتوا و پروژههامونو ندارن به ویژه در دنیای امروز که متن بیشتر از یه پاراگراف، خارج از حوصلهست. هنر اونجاست که به صورت ساندویچی تواناییهاتو به خورد مخاطب بدی و جذبش کنی، کسی درگیر جزئیات نمیشه خیلی (این حرف در گوشی بود). حالا روشها بسیاره. میشه از گیتهاب، لینکدین، یوتوب، کانال تلگرام، بلاگ و خیلی چیزای دیگه در این راستا استفاده کرد.
احترام و شعور خط قرمزه و فقط یه بار میتونن ردش کنن. توهین به رزومه، چهره، جنسیت، قومیت، باورها و اعتقادات، نگاه بالا به پایین و... در هر زمینهای.
شرکتی که سفته میخواد از بیخ کنسله. یعنی از همون اول که شما میری deal کنی، طرف مقابل با شمشیر نشسته. پس باید تو محیط جنگی کار کنی!
شرکتی که از اولین مصاحبهای که میخواد انجام بده، اصرار به حضوری بودن جلسه داره. آدما کار دارن، زندگی دارن، ممکنه یکی شهر دیگهای باشه، یا محل زندگیش با شرکت، فاصله زیادی داشته باشه و باید کلی هزینه و زمان بذاره بیاد مصاحبهای که نه به داره و نه به باره.
شرکتی که مدت طولانی برای یک پوزیشن در سایتهای کاریابی آگهی داره، ندای یک جای تاکسیک رو میده. یا انقد شرایطش بده که کسی حاضر نمیشه اونجا کار کنه یا هی آدما از اونجا میان بیرون و دوام نمیارن یا انقد بیعرضهست که نمیتونه یه نیرو پیدا کنه.
شرکتی که از چیزی جز ایمیل و لینکدین برای ارتباط استفاده میکنه. مثلا اسمس، واتسپ، تلگرام و... بوی حرفهای نبودن میده. درستش؛ زنگ، ایمیل و لینکدینه.
داشتن بروکراسی و کاغذبازی برای سادهترین کارها به عنوان نمونه کوچک مثلا؛ کاغذ میارن از روش میخونن سوالا رو تیک میزنن. این یعنی؛ شرکتیست بیآب و علف.
شرکتی که ناهار یا بیمه نمیده، کنسله. ناهار و بیمه و حقوق سر وقت و چیزهایی از این قبیل، جزو وظایف یک شرکته نه فیچر. تو آگهیها اینا رو به عنوان فیچر بهتون غالب میکنن. مثل این میمونه من بیام عدم کتککاری و وحشیبازی در محل کار رو یک فیچر بدونم. خب این بدویترین چیزه که باید رعایت بشه حالا یه سریا رعایت نمیکنن فیچر نیس یه چیزی مثل نسبت منفی و صفر مطلقه.
روشن نکردن وبکم در مصاحبه بدون اطلاع دادن از چرایی ماجرا. مصاحبهکننده حداقل باید یه رخی نشون بده، هر چند کوتاه.
داشتن سیستم اضافهکاری و عدم شناور بودن و سیستم تسکمحور، یعنی؛ بردهداری.
عدم وجود نیروی منابع انسانی در شرکت و نداشتن مایندستی برای ایجاد کالچر در شرکت. به عنوان مثال: اچآر به چه درد میخوره ما حواسمون به خودمون هست و از این جور مهملات.
عدم تهیه تجهیزات و لوازم مورد نیاز کار از سمت شرکت. مثلا: خودتون لپتاپ بیارید سیستم نداریم!
سابقه افرادی که در شرکتی کار میکنن، مهمه. از روی همونها میشه فهمید حدودا چه تفکری دارند. رنگ رخساره خبر میدهد از سر درون.
آخ چقدر این کلمه آشناست! همه ما حداقل یه بار تجربهش کردیم. اون دورهای که آدم دنبال کاره، پر از استرس، فشار، کاهش نمایی اعتمادبهنفس، استأصال، تنهایی و حسی حاوی خالی شدنه که نتیجهی پرسیدن سوال تکراریِ «اه چرا نشد؟ چرا نمیشه؟»ئه که تو ذهن رخ میده. هیچ! بله هیچ ربطی هم به دانش فنی نداره. اصلا اینجوری بگم که شما فرض کنید پرفکتید، باز هم ریجکت شدن، رخ میده (اینجا رو ببین). به هزاران دلیلی که دقیقا نمیفهمیم چرا و فقط با حدس و گمان و reverse engineering مصاحبه کشف میکنیم که چرا. پس چاقوی ریجکشن تیزه و گریزی ازش نیست. حتما زخمیت میکنه. این که چطوری زخمو ببندی و دوران نقاهت رو بگذرونی، هنره. چیزی که به نظر من خیلی مهمه، اینه که از اون حال و هوا بیای بیرون و حواست رو پرت کنی، گویی که اصلا اون اتفاق رخ نداده و با دوپامین دیگری، افت سطح دوپامین ناشی از ایمیلهای ریجکتی رو پر کنی. تاثیرگذارترین عوامل، تفریح کردن و گذران وقت با دوستان و دلبندانه. صحبت کردن با دیگری (صرفا فقط صحبت کردن) موجب حس آرامش میشه. هر چی بیشتر با پارتنر یا دوستان (مشخصا اگه پارتنر دارید دوست سگ کی باشه؟ (:) وقت بگذرونید، آرامتر و منطقیتر این مسیر پرفراز و نشیب رو طی میکنید. اگر هم باز آروم نمیشید و مغزتون به فاک میره، یا تنهایید و دوستی ندارید و سینگل بدبختم هستید، اشکالی ندارد، طبیعیست. میتونم این قول رو بهتون بدم که نمیمیرید! همچنین، درست میشه. بله میدونم اگه تو این دوره هستید، نفرتانگیزترین جمله همینه.
ولی خب واقعیته و فراری ازش نیست. تو کامیونیتیِ آدمایی که دنبال کار هستن، هم باشید، چون درد مشترک دارید باهاشون و میتونید تبادل اطلاعات کنید، باز میتونه کمک کنه که فکر نکنید تنهایید و فقط شما هستید که ریجکت میشید. فیلم و سریال دیدن هم خوب است. باعث میشه حدودا یه دو ساعتی (اگه شبی یه فیلم یا یه قسمت سریال ببینید) به چیزی فکر نکنید. نوشتن از حس و حال در لحظه هم میتونه از پرخاش ذهن کم کنه و حتی بعدا خوندنش جالبه میفهمید که چقد تغییر کردید یا چجوری بوده حستون. پس شد:
وقتگذرانی با زید و دوستان (به کلمه زید گیر ندید خیلیم خوبه)
تفریح و سرگرمی (فیلم و سریال)
نوشتن
البته روحیات و مدل آدما فرق داره و نمیشه حکم کلی داد و هر کس باید مدل خودشو پیاده کنه که چجوری حالشو خوب کنه، اما اشتراک تجربه هم چیز بدی نیست و همونطور که ما آدما خیلی باهم فرق داریم، خیلیم شبیهیم.
No. Inheritance means inheriting the properties of the superclass into the base class and is one of the most important concepts in Object-Oriented Programming. Since Golang does not support classes, so inheritance takes place through struct embedding. We cannot directly extend structs but rather use a concept called composition where the struct is used to form other objects. So, you can say there is No Inheritance Concept in Golang.
Why are we able to change python tuple values even though they are immutable? Suppose: (1 times - snapp)
a = 1
b = 2
a, b = b, a
Tuple Packing: When you write a, b = 1, 2 Python is packing the values 1 and 2 into a tuple (1, 2), and then unpacking them into the variables a and b. This is a convenient way to assign multiple variables at once.
a, b = 1, 2
# This is equivalent to:
# temp_tuple = (1, 2)
# a = temp_tuple[0]
# b = temp_tuple[1]
Tuple Unpacking: When you write a, b = b, a Python is creating a tuple (b, a) with the current values of b and a, and then unpacking this tuple back into the variables a and b. This is a common idiom in Python for swapping the values of two variables without needing a temporary variable.
a, b = b, a
# This is equivalent to:
# temp_tuple = (b, a)
# a = temp_tuple[0]
# b = temp_tuple[1]
Why This Works
Immutability of Tuples: The immutability of tuples means that the tuple itself cannot be changed after it is created. However, this doesn't prevent you from creating new tuples or reassigning variables to new tuples.
Variable Reassignment: The operation a, b = b, a involves creating a new tuple and then reassigning the variables a and b to the elements of this new tuple. The original tuple (a, b) is not modified; instead, new tuples are created and the variables are updated to reference these new tuples.
Python is call by reference or call by value? (1 times - narvan)
In Python, the concepts of "call by value" and "call by reference" are often discussed, but Python actually uses a mechanism sometimes referred to as "call by object reference" or "call by assignment" . Here's what this means:
Call by Object Reference
Immutable Objects: When you pass immutable objects (like integers, strings, or tuples) to a function, Python behaves similarly to "call by value." This means that the function receives a copy of the reference to the object, and since the object itself cannot be changed, any modifications within the function do not affect the original object outside the function. For example, if you pass a string to a function and attempt to change it, the original string remains unchanged .
Mutable Objects: When you pass mutable objects (like lists, dictionaries, or sets) to a function, Python allows changes made within the function to affect the original object outside the function. This is because the function receives a reference to the object, and since the object is mutable, modifications are reflected in the original object. This behavior is often likened to "call by reference"
How does python manage memory? Explain python memory management.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
رشته ای از پرانتز باز و پرانتز بسته را در نظر بگیرید. در این رشتهها هر پرانتز باز با یک پرانتز بسته جفت می باشد. مانند:
(())
()()
(())()
ارزیابی هر رشتهای از پرانتز باز و بسته را با قواعد زیر تعریف می کنیم:
۱. اگر رشته فقط و فقط شامل () باشد آنگاه مقدار ارزیابی آن معادل ۱ خواهد بود.
۲. فرض کنید که A , B خود رشته ایی از پرانتز باز و بسته باشد آنگاه مقدار ارزیابی رشته ایی از اتصال آنها در کنار هم معادل مجموع ارزیابی هر دوی آنها خواهد بود. به عنوان مثال:
A = () => Eval(A) = 1
B = () => Eval(B) = 1
AB = ()() => Eval(AB) = Eval(A)+Eval(B) = 1+ 1 = 2
۳. فرض کنید A رشته ای از پرانتز باز و پرانتز بسته باشد آنگاه مقدار رشتهی (A) برابر است با 2 به توان مقدار ارزیابی A. به عنوان مثال:
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))
}
}
مثل دفعه قبل (که چند سال پیش بود) حال نکردم با داستان. اسنپ اینطوری نیست سوالاش (که اگه شرکت خوب در نظر بگیریمش) ادای تک دارن، اما در واقعیت سنتی، کارمندی، دست چندم و مناطق محروم استایل. طبق معمول صحبتی در مورد تجربیات نبود و در طول مصاحبه سوال میکردم یا راهنمایی میخواستم، کابل رو میگرفتن. نه من خوب بودم نه اونا.
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)
اوکی بود خیلی نظر خاصی ندارم. مقداری عجیب بود چنین شرکت نه چندان شناختهشدهای لایوکد داشته باشه. روند مصاحبه هم معرفی بود و حل مسئله. ایمیل ریجکتی هم ندادند.
مصاحبه با خود 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.
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.
به نظر خودم مصاحبه خوبی بود و امید خوبی به اکسپت شدن داشتم. حس میکنم اون سوال ریاضی و آماری رو خوب جواب ندادم ریجکت شد. در هر صورت خودم حس خوبی داشتم و خوب تونستم پرزنت کنم و با مایندست مصاحبهکننده هم خیلی حال کردم. بیشتر دنبال این بود که ببینه خب چی کارا کردی؟ این تجربه هایی که داشتی و اینا چجوری بوده؟ نگاهِ یه ربات استخدام کنم همه چی بلد باشه نداشت.
یک بار تایم مصاحبه رو عوض کردم که خیلی حرفهای برخورد کردن. مصاحبه خوبی بود و خودم از خودم راضی بودم و وقتی لایوکدو زدم دیگه گفتم تمومه کار.
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?
یه سوال الگوریتمی از codewars انتخاب کرده بودن که
این
بود. سرچ کردن هم آزاد بود.
من با استفاده از string و اینها سعی کردم مسئله رو حل کنم و روشی هم که تو ذهنم داشتم اوکی بود و مصاحبهکننده تایید کرد اما یه سری پیشنهاد داد که میتونی از لایبرری استفاده کنی برای ولیدیشن که خب من گفتم نمیدونستم میشه استفاده کرد چون مسائل الگوریتمی جوریه که میخوان بدونن چطور فکر میکنی. یه جاهایی برای تبدیل string به int سرچ کردم. در کل روال بود برام.
قبلش به من نگفتن که لایوکد هم هست و من خیلی شرایط درستی براش نداشتم هر چند که کار دراومد ولی بهتر بود میگفتن.
این مصاحبه با 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 familliar with it (language, tool and etc.), what whould 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?
کاملا جلسه اوکی و روالی بود، سوالا رو بارها شنیده بودم، جوابای خوبی داشتم و اساسی تونستم تفت بدم. قطع و وصلی زیاد داشتیم هم از سمت من هم از سمت مصاحبهکننده نت افتضاح بود ولی خب گذروندیم.
خودتو معرفی کن.
از کجا با ما آشنا شدی؟
به عنوان software engineer چی کارا کردی تو شرکت قبلی؟
چندتا ویژگی مثبتی که تو ctoات دیدی بگو.
چرا از شرکت قبلی اومدی بیرون؟
پس تو تیم کار کردی؟
شده که به نظرت یه روش درستی پیش گرفتی ولی بقیه مخالفت کنن؟ چجوری قانعشون کردی؟
شده با یکی به مشکل بخوری؟ چطوری حلش کردی؟
برنامت برا سال جدید چیه؟
چیا برات خیلی مهمه که اونا باعث میشه یه جا بمونی یا بری؟
چقد طول میکشه که ببینی اونجایی که هستی برای توئه یا نه؟ چقد فرصت میدی؟
مصاحبهها خوب بود به ویژه فنیها که اندازه و درست بود. یک بار بعد مصاحبه اول گفتن حضوری برم برای مصاحبه که من تا حدودی فهمیدم اوکیه قضیه (طبق تجربه بعد یه مصاحبه میگن حضوری بیا یعنی ۸۰ درصد اوکیه) اما اون تایم شرایطم جوری بود که نمیتونستم حضوری فولتایم باشم و به همین دلیل بهشون اطلاع دادم که نمیتونم (برای همینه تایم مصاحبهها انقد فاصله داره و جدای اون دو مورد کنسلی هم بود). بعد از حدود ۴ ماه، دوباره تو لینکدین پیام دادم (میزان پاسخگوییشون تو لینکدین ۱۰/۱۰ بود واقعا) که اگه اوکی هستین من شرایطم اوکیه و خب جلسه ست کردن و فوقع ما وقع. (: تا حدی من سیگنال سبز رو گرفته بودم، هم اون اول هم بعد بازگشت دوباره که خب باحال بود این روند.
ایمیلی که برای مصاحبه فرستاده بودن، بسیار مرتب و منظم و فارسی بود. تمپلیت خوبی برای پیامهای ایمیلشون داشتن. اطلاعاتی بیش از ایمیلهای مصاحبه عادی داشت. حاوی اطلاعات مصاحبهکننده، لینک محصول، اگر نیاز به تغییر مصاحبه باشه با کی باید در میون بذاریم و آیا حتما سیستم نیازه یا نه (که گفته بودن نیاز نیس) و علائم نگارشی هم رعایت شده بود. مصاحبه 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 dosen'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?
این از اون مصاحبههایی بود که خیلی رغبتی به شرکتش نداشتم. محصولشون رو دوست نداشتم. کاری که میکردن اسکرپ دیتا از سوشالمدیاها و فروشش به مشتریان بود. با دیتا خیلی سر و کار داشتن. ولی خب گفتم مصاحبهش رو برم حداقل سوالاشو درمیارم. (: چیز عجیبی از خود مصاحبه ندیدم. صرفا نوشتن چیزی در مصاحبه، یعنی یه برگهای دارن که اونو باید پر کنن ، یعنی؛ بروکراسی دارن و این یعنی؛ بوی شرکت سازمانیطور و خشکی میاد. طبق تجربه عرض میکنم خدمتتون. حتی ریجکت شدنه هم خیلی اذیتم نکرد. یکی دو تا سوال رو خوب جواب ندادم اما در مجموع، به نظرم خوب بودم و بد عمل نکردم. مصاحبهس دیگه کاملا شانسی و رندومه.
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?
این مصاحبه برای وقتیه که تجربه کاری نداشتم و اون پختگی و تفت دادن لازم برای مصاحبه و صحبت از تجربیات کاری گذشته وجود نداشت. یکی دو سوال رو هم خوب بلد نبودم. مثلا اسم همهی لایههای OSI یادم نبود یا design patterns نمیدونستم چیه. اما در کل خوب بود. سوالا هم پیچیدگی خاصی نداشت و آسون بود. فیدبک که خب مثل همه جا یک عمل تعریف نشدهست کاری باهاش نداریم. از نظر hrای، اسنپ به شدت ضعیف و افتضاحه. اصلا تو لول شرکتی که چندین میلیون یوزر داره نیست. اینو خیلی جاها هم شنیدن گفتن ولی ما که با بقیه کار نداریم، اینجا هدف، انتشار تجربهست و آن چیزی که رخ داده. آن چه که من به وضوح دیدم، کند بودن و طولانی بودن پروسه مصاحبهست. طوری که حدودا یک ماه از ارسال رزومه گذشت تا به مصاحبه برسه. دلیل و توجیه این که کاندیداها زیاده که اینطوریه نیز مهمل کلیشهای دیگریست. با تقسیم نیرو و مدیریت درست میشه هندلش کرد. حتی مصاحبههای بعدی که در سالهای دیگه با اسنپ داشتم، این موضوع باز هم دیده شد و آزار داد. به عبارتی؛ در بهترین حالت، از وقتی که رزومه میفرستی تا زمانی که آفر بدن، دو ماه طول میکشه. حالا میتونی متصور باشی بخوره به تایم تعطیلی، حوادث نامترقبه و... که چقد به طول میانجامه.
اول مصاحبه بلوتوث هندزفریم قطع و وصل میشد و یک دقیقه از تایم مورد نظر گذشته بود (دقیقا یک دقیقه!) تا جوین شم که تو این فاصله 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 monolotic? 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 compatibality 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.
مصاحبه خوبی بود. شب قبلش هر چی سوال از مصاحبهها پرسیده بودن رو مرور کردم، تو مصاحبه هم عالی بودم اما دو سوال ریز رو خوب جواب ندادم یکم استرس داشتم ولی به نظرم تاثیرش اونقد نبود. واقعا بسته بودم که میرم اسنپ. یه مرحله به نظرم باید میرفت جلو. از نظر سوالا خوب بود. تقریبا چکیدهای از همه سوالا بود و هر چی که میتونستن، پرسیدن. بعدش که ایمیل ریجکتی اومد، ریپلای زدم فیدبک بدید که چرا. یه طومار فرستادن (تو ژانر میمهای نخوندم) و گفتن که به خاطر پالیسیهای اسنپ و اینا نمیتونیم فیدبک بدیم. چه پالیسیای؟ چه کشکی؟ این پالیسی هم از اون اداهایه که تا از شرکت یکی سوال میکنیم میگه NDA امضا کردم. روشی شیک برای پیچوندن. همیشه فیدبک بخواید، فیدبک گرفتنیه نه دادنی! این که رفتار شرکت رو نسبت به این سوال ببینید خودش خیلی چیزا رو نشون میده وگرنه منم میدونم کسی فیدبک نمیده. انیوی، به جز این مورد عجیب، بقیه چیزا منطقی و معقول بود.
مصاحبه با یک نفر بود.
از هر چی که تو رزومه و گیتهابم بود پرسید. مثلا میپرسید فلان پروژه رو که زدی هدفت چی بوده؟ چه تکنولوژیهایی استفاده کردی و بلاه بلاه بلاه. بعدش روش گوشه رینگ رو انتخاب کرد و با بحث میکروسرویسها انداخت گوشه رینگ. هر چی میگفتم، میگفت خب فلان ایرادو داره. میگفتم trade-off عه میگفت چه چیزی رو چشمپوشی میکنیم که بریم سمتش؟ خلاصه ۷۰ درصد مصاحبه همین بحث بود.
Tell me about yourself.
When will you be graduatd?
What is your plan after you finished university?
HR asked weather we're having a live coding or not? no.
Why did you choose go?
After the interview, what position do you think you want?
حال نکردم. سوالهای مهمل، بیمحتوا و بدون مفهوم زیاد داشت. آخه عقربههای بین ساعت سه و ربع رو میخوای چیکار عزیزم؟ کاربرد آجر رو کجای دلت میخوای بذاری؟ مگه گوگله آخه؟ به خدا گوگلم اینا رو نمیپرسن. همش ادا همش اطوار. جالبه سوال عقربههای ساعت رو جواب دادم تو سوال آجر، سه تا کاربرد بیشتر نتونستم بگم. آخرشم نفهمیدم این چه محصولیه؟ اسنپساپلایه؟ گروسریه؟ مارکته؟ هر بار از یکیشون ایمیل میدادن. آخرش مثل این که snapp market pro بود! فکر کنم ایمیل ریجکتی هم نفرستادن کلا. دو بار هم تایم مصاحبه عوض شد یه بار از سمت من و یه بار از سمت اونا. یه حرف درِ گوشی از من به یادگار داشته باشید، اسنپ، فقط تاکسیش خوبه بقیه چیزاش فقط اسم اسنپ روشونه، اون بلوغ و کیفیت رو ندارند.
سوالات سناریومحور و کنکوری بود. مثلا یه سناریو میگفت که در شرایط x چی کار میکنی؟ و هی از اون سناریو سوالات مختلف درمیاورد. نحوه برخورد و رفتار مصاحبهکننده اوکی بود و یه نفرم بود. نیم ساعت بیشتر از تایم ست شده طول کشید.
Tell me about yourself.
What are the differences between Go and Python? Compare these two languages.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 referencing work in Python, and how does it determine when to clean up references?
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.
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?
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.
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.
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.
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.
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.
Response Generation
After processing, the handler generates an HTTP response, which includes a status code, headers, and the response body (e.g., HTML, JSON).
Returning the Response
The response is sent back through the application server to the web server, which then forwards it back to the client.
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?
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?
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:
We have a query that is too slow, how you try to fast it?
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.
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.
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.
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.
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.
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.
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.
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.
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.
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?
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.
Is the list that holds pointers for rows in the database during indexing a list or another type of data structure?
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?
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.
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.
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.
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.
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.
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.
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?
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?
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.
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?
Use Salted Hashes
What is difference between channel and connection in rabbitMQ?
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?
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:
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?
However, for this specific scenario, the Outbox pattern is indeed an excellent solution. And you can:
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.
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.
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.
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.
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.
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.
Use RabbitMQ in a cluster:
If high availability is crucial, we could set up RabbitMQ in a cluster configuration to minimize downtime.
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.
مصاحبهکننده وبکم رو روشن نکرد. من هم با گوشی اومده بودم تو میت و نمیدونستم اپ گوگل میت باگ داره و هی پرت میشدم بیرون. اولش فکر میکردم مشکل از اوناست بعدا فهمیدم مشکل منه. با چندین بار قطع و وصلی و مصیبت مصاحبه رو ادامه دادیم. درخشان!
خودتو معرفی کن.
چند سال سابقه کار داری؟
وضعیت سربازیت چجوریه؟
دانشگاهت چقد مونده؟
چرا از شرکت قبلی اومدی بیرون؟
قصد مهاجرت داری؟
برنامت برای دو سال آینده چیه؟
دو تا پروژه که با پایتون و جنگو زدی رو بفرست.
یه لیست از لایبرریهای پایتون و ابزارها آماده کرده بود و میپرسید که کار کردی و آشنایی؟ و تیک میزد.
redis
postgres
celery
numpy
pytest
با چه زبانایی کار کردی؟
خودتو تو چند کلمه توصیف کن.
تا حالا شده تو کار خیلی احساس خوبی کنی؟ چی بوده؟
بهترین و بدترین تجربت تو کار؟
تا حالا شده که به نظرت یه چیزی درست باشه ولی باهات مخالفت کنن؟ چیکار کردی؟
تست mbti دادی؟ گفتم آره ولی خیلی اعتقاد ندارم بهش.
آخرین دریافتیت چقد بوده؟
سوالی داری؟ فورا گفتم بله اگه میشه در مورد ساختار تیمها و فضای شرکت توضیح بدین. که گفت درسته گفتم سوالی داری ولی الان یه مصاحبه دیگه شروع میشه (با خنده) و یه توضیح هول هولکی داد که نه من فهمیدم و نه خودش.
دو نفر بودن که یکیشون hr بود و دیگری tech lead. باز هم تصویر hr دیده نمیشد و اون یکی دوستمون قابل رویت بود خداروشکر. خب من اینجا فهمیدم که اون باگ بیرون پرت شدن از منه و بعد چند بار قطع شدن گفتن که زنگ بزنیم پشت تلفن ادامه بدیم مصاحبه رو (تقریبا آخرای مصاحبه بود) که تصمیم درستی بود.
اکنون، در اینجا که هستم، یکی از عجیبترین مصاحبهها رو دارم تجربه میکنم. لیترالی ابوالعجایب! اولش با معرفی کن خودتو شروع شد و هیچ سوال فنیای پرسیده نشد! یعنی طرف مقابل هی میپرسید تست نوشتی؟ اونجایی که کار میکردی چقد تست نوشتی؟ رو چی کار میکردی؟ تاکید شدید رو تست نوشتن داشتن. همچنین میپرسید چقد کد پروداکشن زدی؟ تو چه اسکیلی کار کردی؟ اینجا اسکیل میلیونیه ها. همش منتظر بودم از جنگو یا پایتون سوالاتی بپرسه اما دریغ از یک سوال. قبلش هم گفته بودن یه فایل به عنوان نمونه که با جنگو زدی بفرست. منم تسکی که برای مصاحبه دیجیکالا که با fastapi زده بودم رو فرستادم براشون. طرف میگفت اوکیه ولی چیزی با جنگو نداری؟ تاکید شدید رو فریموورک داشتن. من واقعا بدم میاد تاکید رو ابزار. ابزارها قابل یاد گرفتنن و مدام در حال عوض شدن. تو باید توانایی حل مسئله و میزان یادگیری رو بسنجی. بعد گفت اوکیه حالا اولش اگرم زیاد جنگو نزدی کمکت میکنیم راه بیوفتی ما یکیو میخوایم که تجربه بالایی در جنگو داشته باشه. به طور خلاصه بخوام بگم، حس جایی که درست حسابی باشه رو نمیگرفتم. حس انسجام و مرتب و منظم و منطقی و جای پیشرفت و رشد رو نمیگرفتم. به قول جوونای امروزی وایب بدی میداد خیلی ردفلگ بود.
بعد از چند روز، hr با شماره خودش (پیش شماره 933 داشت) زنگ زد و گفت ما اوکیایم همکاری کنیم و رقم پیشنهادی رو گفت. دیدم خیلی کمه. پرسیدم ناهار و میان وعده چطوره؟ دورکاری؟ گفت ناهار با خودتونه و کار هم کلا حضوریه. گفتم تا یک هفته دیگه بهتون اطلاع میدم. گفت نمیشه زودتر؟ خیلی دیره. گفتم اوکی تا سه چهار روز دیگه میگم بهتون. مقداری اندیشیدم و چرتکه انداختم هر طور حساب کردم دیدم نمیصرفه. پول خورد و خوراک و جا رو بذاری کنار، هیچی نمیمونه. بعد همون چند روزی که مهلت گرفته بودم، به hr اسمس دادم (نمیدونم ملّت مشکلشون با ایمیل چیه) و گفتم به این دلایل نمیتونم همکاری کنم. جواب داد رقم درخواستیتون چقده؟ و در جواب، رنج مورد نظرمو گفتم که بعدش گوستم کرد. میتونست یه پیام بده که ما توانایشو نداریم خیلی ممنون از شما یا همچین چیزی نمیدونم این رفتارای کودکانهی گوستگونه کی میخواد درست بشه تو شرکتا.
این تجربه رو دوست نداشتم گرچه منجر به آفر شد. از نظر میزان سختی و چالش، من چیزی حس نکردم. خیلی راحت و بدون زحمت بود کل فرآیند که خود این، قضیه رو عجیب میکنه. باگ زیاد داشت که خودتون میتونید قضاوت کنید.
یکی از عجیبترین مصاحبههایی بود که داشتم. هم از نظر فنی و هم از نظر مصاحبهکننده و ایضا شرکت و استکش. اولش مصاحبهکننده شروع کرد به توضیح شرکت و استک که با clojure عه و بعدش حتی ازم نخواست خودمو معرفی کنم و مستقیم رفت سراغ طرح یک مسئله. حتی وب کم رو هم باز نکرد که رفتار جالبی نبود حتی میشه گفت توهینآمیزه، اگه میگفت مشکلی داشته که نمیتونه تصویرش رو نشون بده یا هر چی باز قابل هضم بود اما من چنین چیزی ندیدم. و یه ساعت بحث و صحبت در مورد این مسئله بود.
What is the difference between concurrency in python and go?
Waht is event driven architecture?
What is redis datastuctures?
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 & kober?
We want to design a URL shortener system. How would you design it?
این از اون مصاحبههایی بود که به قول خارجیا I bombed it. بعضی از سوالا جوری بود که افتادم گوشه رینگ، خیلی سناریومحور بود. اگه از نیومدن ایمیل ریجکتیشون و پیگیری برای دونستن نتیجه که دنبال ایمیل ریجکتی بودم و آخر فرستادن بگذریم، اتفاق عجیبی رخ نداد.
از اینترنت نمیشد استفاده کرد ولی از مصاحبهکننده میشد سوال کرد. مصاحبه کوتاهی بود که هیچ معرفی و اینام نداشت و دو تا سوال تو گوگل داک نوشته بودن که همون جا کد میزدم. سوالاش و جوابای من، اینا بود:
تابعی بنویسید که عدد 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
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 مهم نیست.
هر دو سوال رو درست زدم. گر چه سوال دوم برای روش بهینهش رو یه مقدار بیشتر فکر کردم چون یه بار زده بودم، داشتم یادم میاوردم و میدونستم باید hash map طور برم جلو. اون ایده فور دوم یه مقدار با زور اومد ذهنم ولی اومد در نهایت، زدم و اوکی هم بود. نت آناستیبلی هم داشتم از شانس ولی یه درصدم فکر نمیکردم ریجکت شه. انتظار اینو داشتم حداقل یه مرحله جلو بره. بعد از چند هفته به hr ایمیل زدم و جوابی نمیداد یه جواب سرسری داد که من الان سیستم پیشم نیس چند روز دیگه خبر میدم. مثل این که ایمیل شرکتیشون نیومده بود و چند روز دنبالشون بودم که بهم بگن ریجکت شدی! بعدش ایمیلو خودش فرستاد. hr نوبی بود خلاصه. سیستم مصاحبهشون اینجوری کار میکنه: ریفر + خفه کردن با الگوریتم. اگر سابقه کاری هم نداشته باشید، ندید کنسلید (احتمالا به جز ریفرا). یه چیز دیگهایم که خیلی از اونایی که اونجا بودن شنیدم، فشار کاری بالا و عدم وجود تعادل بین کار و زندگیه. طوری که از کلمههای برده و حیوانات اهلی دربارش استفاده میکنن. اما پول خوبی میدن. حقوق پیشنهادی که پشت تلفن گفتم، ۵تا گذاشتم رو حقوق خودم و برای اونجا یه ۱۰تام اومدم روش و یه ۵تای دیگم جهت بازه بین این و آن (بکنید از این کارا، حال میده (:) که خب میدونستم مشکل مالی ندارن ولی با این حال گفتم الان تلفنو قطع میکنه! بدین صورت. نمرهای که دادم هم قابل مشاهدهست.
سوالای خوبی پرسیدن که پایه مهندسی نرمافزار داشت نه فریموورک و زبان و ابزار. سوالای دیتابیسی و اون سوال یک میلیون ریکوئست رو خوب جواب ندادم و به نظرم همون فاتحمو خوند. به جز اینا مشکلی تو بقیه موارد نداشتم. فقط یه مورد عجیب دیدم که هنوزم برام خندهداره. بعد مصاحبه حدود چند هفته گذشت و خبری نشد. بوی ریجکتی و گوست شدن میومد قشنگ. اما هرگز همینجوری شل نگیرید، پیگیر باشید و موقع نتیجه هم فیدبک بخواید. فیدبک خواستنیه و گرفتنی کسی فیدبک نمیده باید بگیریش. شرکت خوبیم بود تمام زورمو میخواستم بزنم یه جورایی. تو لینکدین به hr پیام دادم پس چی شد نتیجه مصاحبه ما؟ (حالا اینجوری نه منطقا) فورا بعد چند دقیقه زنگ زد و عذرخواهی و اینا که دیر شده و گفت پوزیشن hold شده و شما هم overqualified شدی سطحتون بالا بوده و تو لول مید هستید و فراتر از جونیورید. خیلی جلوی خندمو نگه داشتم. به نظرم اینجوری گفت که مثلا ناراحت نشم و این حرفا وگرنه من خودم میدونم که سگجونیورم، سابقه کاریم مشخصه خب. البته که مودب و محترم صحبت میکرد. برای شرکتی تو این سطح بعیده. شگفتانگیز!
مصاحبه با دو نفر بود که هر دو فنی بودن. یکیشون خیلی سوالای کمی پرسید و دیگری حضور پررنگتری داشت. قبل مصاحبه، 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 familliar 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 functionallity?
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 consistancy 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?
من خیلی وقت نداشتم برای انجام تسک حتی میخواستم کلا نزنم دیدم حسش نیس زیاده وقت بذارم ممکنه کلا ریجکت شه ولی گفتم دیجیکالاس یهو دیدی اوکی شد. خلاصه سعی کردم از اونجاهایی که بلدم شروع کنم و سه روزه زدم. همه چی داشت تسکشون. مهمترین بخش، قسمت async و back-offاش بود که خوب نزدم ولی بقیه قسمتا رو خیلی تمیز زدم هدفم این بود کد مرتبی باشه و خب مثل این که همون دو قسمت براشون مهم بود. بعد از فرستادن تسک، hr فکر کرده بود وقتش گذشته و اگه پیگیری نمیکردم، مثل این که کلا زنگ نمیزدن بهشون توضیح دادم تاریخ ایمیلا هست تو همون بازه ددلاین فرستادم. موقع زنگ زدن البته عذرخواهی کرد برای اشتباه پیش آمده.
تسک
و
جواب
من.
اولش گفت یه بار بیار بالا و همه قسمتها رو از اول تست کن. مثل register, login و اضافه کردن rssها و بقیه apiهایی که بود. مهمترین نکتهای که بود، همون قسمت back-off و asyncاش بود. که گفت خب اینجوری که زدی میدونی چه مشکلی ایجاد میشه؟ و فهمیدم که اون قسمت امضای آفر بود. بعد گفت راهحلی داری واسش؟ و یه سری سوال هم کرد که فرض کن یه عالمه لینک خراب داشته باشیم چجوری خیلی سریع و بدون خونریزی میتونیم اون خرابها رو تشخصی بدیم و دیگه fetch نکنیم. در مورد دیزاین دیتابیسم یه سری نکات گفته شد که یه جا foreign key استفاده کرده بودم که نیاز نبود. و خب بعد از همه اینا گفت که تمیز کد زدی و معماریت عالیه و تست هم نوشتی اینم خیلی خوبه اما اون قسمتم میزدی تموم بود. ازم فیدبک خواست. گفت به نظرت چجوریه؟ ما همه چیو واضح توضیح داده بودیم؟ نظرت راجع به تسک چی بود؟ حس میکنم با توجه به مصاحبههایی که میریم خیلی خوب نمیزنن این تسکو. در طول مصاحبه هم بسیار مودب و محترمانه برخورد کرد. یه جا وبکم رو قطع کرده بود و در مورد کد نظر میداد و وبکمو روشن کرد گفت من نظرمو میگما حس نکنی دارم میگم کدی که زدی خوب نیس نترسی یه وقت؟ :)
مصاحبه بدی بود. هم خودم خوب نبودم و هم اونها. اولش که hr اومد یه سری توضیحات داد از شرکت و کاراشون که خیلی آشفته بود هی میرفت و میومد. گفت خودتو معرفی کن که خب من داشتم به hr توضیح میدادم چیکار کردم نه یه آدم فنی و عملا نتونستم با کارای فنیم خودمو خوب پرزنت کنم چون اشرافی به موضوع نداشت. یک مقداری هم منتظر نفر سوم شدیم که بیاد. چون نفر اصلی مثل این که نشده بود بیاد و یکی دیگه جاش اومد. کلهم فضا اینجوری بود که مصاحبهها زیادن تند تند بریم تموم شن کار داریم! اون بینظمی رو میتونستم حس کنم. مصاحبه هم زود تموم شد و خب من قشنگ فهمیدم که ریجکت شدم. دو سه روز بعد هم ایمیل ریجکتی رو زدن.
از hr یه سوال پرسیدم (از این سوال فلسفیا که میخوای به hr نشون بدی کت تن کیه) و اون این بود که: بزرگترین چالشی که میتونم حل کنم چیه؟ چی ارزش حساب میشه؟ که خب یه مکثی کرد فهمیدم اصلا نفهمید و یه جوابی داد که داده باشه تیما رو توضیح داد و اهداف شرکتو که خب من با همین سوال فهمیدم فازشونو. این از اون سوالاس که تو خارج باید پرسید ولی خب تو ایرانم میتونی ببینی طرفت چقد حرفهایه.
صفحه رو که شِیر کردم مصاحبهکننده گفت: با vim و tmux میخوای کد بزنی جدی؟ گفتم آره صرفا چندتا فانکشن کوچولو میخوایم بنویسیم دیگه نیازی به IDE نیس. (:
یه چلنج ریز در مورد goroutineها بود. هدف نحوه کار باهاشون و مفهوم چنل و سینتکس کلی go بود. چلنجه این بود که دو تا goroutine داریم و میخوایم از یکی به اون یکی دیتا بفرستیم (با channel) و یه سری پیام نشون بدیم. که خب لابهلاش سوالای مفهومی که اگه goroutineای که تو main وجود داره تموم بشه چه اتفاقی برای بقیه میوفته یا چرا بدون استفاده از sleep بقیه goroutineها نشون داده نمیشدن و سوالاتی از این دست. من هم کانسپت کلی رو میدونستم (همیشه کانسپت مهمه جزئیات داکیومنت داره) که خب waitGroup چیه و اون وقفه برا اینه که اگه روتین اصلی تموم بشه بقیه هم kill میشن. یکم برای پیدا کردن کتابخونههایی مثل rand و waitGroup سرچ کردم برای این که بدونم از کجا import میشن که سرچ هم آزاد بود. در کل اوکی بود با این که از قبل حس میکردم رو concurrency مسلط نیستم. کدی که زدم رو
اینجا
میتونید ببینید و از
اینجا
ران کنید.
من یک بار برای internship با این شرکت مصاحبه کرده بودم که چون حقوق نداشت رد کردم. اصلا در مخیلهام نمیگنجه کار کنی و پول ندن! ربطی به سطح هم نداره چون عدد کم یه بحثه، نداشتن حقوق بحث دیگه. اصلا چیز قابل قبولی نیست. انیوی. بعدها دیدم که پست گذاشتن برای جونیور و دوباره به همون کسی که مصاحبه داشتم، تو لینکدین پیام دادم و گفتم مایل به همکاری هستم گفت اوکیه یه تایم ست کن مصاحبه کنیم که برای این کار از calendly استفاده میکردن. hrای هم نبود و همه کارا رو تکلید (یاseniorشون) انجام میداد. بعدش که اوکی شد و دو روز بعد از مصاحبه با شماره خودش زنگ زد و گفت اوکیای علاقمندی و درسته تجربت زیاد نیس ولی کارو درمیاری. چه عددی مد نظرته؟ منم عددم رو (که خب میخواستم بالاتر از اونجایی که قبلا بودم باشه) رو گفتم و ایشون گفتن که بالاس و خیلی فاصله داره با چیزی که مد نظر ماست و داستان همینجا به پایان میرسه. فکر کنم ناهار هم نداشتن. ناهار وظیفه شرکته. اما امریه داشتن و کاری که میکردن باحال بود.
مصاحبه با دو نفر بود که هر دو فنی بودند. اولش لایوکد بود که از قبل نمیدونستم لایوکد داره بعد لابهلاش و بعدش سوال پرسیده میشد. خیلی سوالات در هم و برهم بود و دلیلشم این بود که هر چی که میگفتم از توش سوال درمیاوردن. مثلا از 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?
Waht 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?
محیطی که باید کد میزدم rustpad.io بود که انتخاب خوبی بود و ران کردن کد هم نبود همون psudo code استایل باید مسئله رو حل میکردم. فکر میکنم نمیشد سرچ کرد. البته مصاحبهکننده هم نمیفهمید اگه سرچ میکردم (به شرط سریع سرچ کردن).
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:
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.
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.
مصاحبه طولانی و طاقتفرسایی بود. سوالایی که پرسیدن به نظرم too much بود. واقعا این مقدار دیپ شدن لازم نیست برای جونیور تازه اونم برای شرکت خشک و سازمانیای مثل همکاران سیستم! یکی از دوستانم بعد از چند ماه برای همین پوزیشن، رفته بود مصاحبه و دقیقا همین سوالا رو پرسیده بودن و نظر اونم با توجه به این که تجربه بیشتری از من داشت، این بود که زیادهرویست. حقوقی که بهشون پیشنهاد دادم، پشماشون ریخت. گفتن منظورت خالصه انقد یا با بیمه و اینا؟ گفتم حقوق رو خالص میگن. این مال اون دورهایه که مصاحبه میرفتم که فقط رقمو ببرم بالا واکنشها رو ببینم، حال میده بکنید از این کارها. در کل خیلی با شرکتای b2b و b2g حال نمیکنم. جاست فور فان بود نتیجهش اصلا برام مهم نبود.
در کل تسک آسونی بود. اما من خیلی با بلاکچین و node آشنا نبودم. این تسک رو هم از یکی از بچههای شرکتمون که خدای بلاکچین بود، پرسیدم حاجی این چیه؟ حالا خودم تو یه جایی کار میکردم که کارش crypto exchange بود ولی بیشتر کار بکاندی میکردم تا بلاکچینی. خلاصه توضیحاتی من باب این مفاهیم داد و گفت چیزی نداره منم یکی دو روز مونده بود، سَمبَلیک کردم. کاملا انتظار میرفت که ریجکت بشه.
خیلی نمیشه نظر داد چون فرآیند مصاحبه خیلی کوتاه بود. تا اونجایی که من پیش رفتم، همه چی خوب و حرفهای بود. شرکت خوبیه، آدمای خلاق و باسوادی اونجا هستن. چنتاشون رو از لینکدین دنبال میکنم. محصول باحالیه اگه شرایطتون میخورد اپلای کنید.
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.
Set up a project to interact with the smart contract. Include necessary dependencies and configurations in the project.
Deploys the smart contract to a local Ethereum test network (e.g., Ganache, Hardhat, Anvil).
Use the ABI and contract address to create an instance of the smart contract.
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>" }
Provide documentation on how to set up and run the project
(Optional) Write unit tests for the API endpoints and smart contract functions.
از نظر سوالا اوکی بود. اما از نظر شرکت و رفتار مصاحبهکننده واقعا ضعیف بود. ناهار و صبحانه هم نداشت. یک حرف درِ گوشی، شرکتی که پول ناهار کارمنداشو نداره، جای خوبی نیست. حین مصاحبه، یه جا گفت هیئت مدیره تماس گرفت جواب بدم وقتی داشت صحبت میکرد صدا مثل این که رو اسپیکر بود برای لحظاتی و یه صدایی میگفت به نظرم این پسره رو بگیریم به اون یکیم بگیم فلان روز بیاد... یه همچین چیزی حالا نمیدونم منظورش من بود یا نه خلاصه بینظم بودن و وایب جای تک رو نمیداد. رسیدیم به جایی که رقم مورد نظر شما چقده؟ من رقم بالایی رو گفتم ولی اونقد هم بالا نبود خیلی از شرکتها اون رقم براشون اوکیه. فارغ از اینها شما یه رقم پیشنهادی دارید یا اوکی میشه یا نه یا طرف رقم دیگهای پیشنهاد میده. دیگه توهین و بیشعوری نداریم. برگشت گفت وااای این رقم زیاده جایی نمیدن اینو ما اگه به جونیور اینو بدیم به سنیور چقد بدیم؟ گفتم شرکتای بزرگ میدن اگه شما نمیدین بحثش جداست. گفت اسنپ یازده و پونصد میده به جونیوراش، اینو گفت داشتم از خنده پاره میشدم حقوق جای فعلی که بودم از اون چیزی که گفت بیشتر بود انگار داشت بچه گول میزد. به همین جا ختم نشد و شروع کرد به توهین کردن که شما در بهترین حالت کارآموزی (که من پوزیشنم جونیور بود) نمیخوام جسارت کنم (ولی جسارت میکند) یه رقمی بگین که باهاتون موافقت بشه و این مهملات. جالبه اول توضیحات، اون قسمت که شوآف شرکت رو میکنند معمولا، گفت ما شعبه زیاد داریم شرکتای مختلف تو کانادام شعبه داریم ولی نمیتونستن چندغاز به یکی پول بدن. خلاصه که شوآف شرکتها رو جدی نگیرید. فقط میخواستم زود تموم شه بزنم بیرون. بعدش یکم بیشتر سرچ کردم ببینم اصلا کیاند اینها؟ رسیدم به اتوخسروانی که همین رو تو گوگل و توییتر سرچ کنید و بخونید، همین. من دیگه قضاوتی ندارم.
What is the difference between concurrency and parallelism?
We have a scenario. We have two goroutine that traverse a slice. One is start from begining and other starts from end. How each goroutine can know other one is in the middle of slice? With cannels.
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?
Waht is method?
What is reciever 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 freamwork 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.
در این مصاحبه به جز من، دو نفر دیگه هم حضور داشتن (هر دو فنی).
مسئله این بود که سه تا endpoint داریم که دارای متودهای post, get و delete است و باید یه وبسرور کوچولو مینوشتم که این سه تا رو هندل میکرد. یه اسلایسی از استرینگ (یا همچین چیزی) رو باید با آیتمهاش بازی میکردم. خوب عمل نکردم و بلند بلند هم فکر نکردم. خیلی سرچ میکردم و خب دیدن که طول میکشه، گفتن نیم ساعت بیشتر وقت میدیم برو بزن بفرست که این عملا یعنی ریجکت. البته واقعا مهم نبود چون یه جا دیگه ۸۰ درصد برام اوکی شده بود.
این مصاحبه بعد از گرفتن آفر از جای دیگری بود و جنبهی جاست فور فان داشت. گر چه به عنوان کارآموز، به نظرم نباید ریجکت میشد اما مهم هم نبود. بیشتر روی OOP فوکوس شده بود تا چیزهای دیگر. سوالهای زرد و لوس از قبیل یه جمله بساز که سه تا کلمه بیربط توش باشه هم رنک رو پایین میاره. در کل میشد که بهتر باشه. نمره ۶ برای این مصاحبه، نمره مناسبیه.
مصاحبه با یک نفر بود که 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 manager بود و دیگری co-founder که خیلی آدم خوش برخورد و کول و مودبی بود.
گپ و گفت دوستانه بود و لابهلاش به شکل روانشناسانهای سوالا رو میپرسیدن. یعنی یه بحثی شکل میگرفت و من توضیح میدادم و به موضوع a اشاره میکردم و مصاحبهکننده از موضوع a سوالایی میکرد یا واکنشی نشون میداد و به نتیجه b که جواب سوال اصلیش بود، میرسید؛ حرفهای و بلد بودن.
چی در مورد نارون میدونی؟
اهل کجایی؟
تهران کجا میخوای بمونی؟ خونه میگیری؟ خوابگاه میمونی؟
اولین تجربه کاریته درسته؟
وضعیت سربازیت چجوریه؟
دانشگاهت چقد مونده؟
قصد مهاجرت داری؟
برنامت برای دو سال آینده چیه؟
اگه روشت درست باشه تو تیم و موافقت نشه باهاش چی کار میکنی؟
تو تیم کار کردی؟
دوستات تو رو به چی میشناسن؟
اخلاق بدات چیاس؟
برای درست کردنشون چه تلاشی کردی؟
خودت دوست داری تو چیا بهتر باشی؟
اگه یکیو ناراحت کنی تو شرکت چطوری حلش میکنی؟
چه آدمایی سختن؟
قبل این که بیای تصورت راجع به اینجا چطوری بود؟ یعنی گفتی میام شرکت چطوریه؟ بچهها چطورین؟ فضا چه شکلیه؟
با جاهای دیگه هم تو پروسه مصاحبه هستی؟
ما انتخاب چندمتیم؟
چی باعث میشه که ما بشیم انتخاب اولت؟
اگه اوکی باشیم کی میتونی بیای؟
آدم متمرکزی هستی؟
تو open office میتونی کار کنی؟
من اگه مدیر مستقیمت باشم چیکار کنم که پشیمون بشی از اومدن به نارون؟
حس میکنم آدمی هستی که self learning بالایی داری درسته؟
یه تسک الگوریتمی فرستادن که فقط یه سوالشو زدم فرستادم. حسش نبود کلا. یه مصاحبه دیگه داشتم اون تایم خیلی وقت نذاشتم روش. تسک رو میتونید از
اینجا
ببینید.
وقتی با من تماس گرفتن، همه چیزایی که لازم بود رو پرسیدن و همه شرایط شرکت رو توضیح دادن. همه چی خوبه به بچهها میرسیم ناهار، حقوق به موقع، بیمه، ریموت، امریه، پروژه سربازی، دورهمی، اتاق بازی، پاداش در هر ماه و فیچرهای شرکت. ۵۰ میلیون سفته هم باید میدادم. بعد از گفتن چنین چیزی عملا شرکت برای من مرد ولی گفتم حالا ببینم به آفر میرسه یا نه و یه سری سوالهای معمول hrای که همه میپرسن در مورد دانشگاه و تکنولوژی و سربازی و اینها مشخص بود از رو کاغذ داره میخونه و تیک میزنه. گفت روند مصاحبه بسته به سطحت، ممکنه متغیر باشه. یا یه مصاحبه فنیه که اوکی میشی یا علاوه بر اون، یه تسک انجام میدی یا بعد اینا یه ماه آزمایشی کار میکنی. که اون یه ماه، حقوق و همه مزایا رو داره. یه مصاحبه هم با مدیرعامله. نظم و انظباط خیلی مهمه برامون، نگاه بالا به پایین نداریم و صحبتهایی با چاشنی شوآف. از این سخنرانیا که تهش باید بگی: «تموم شد؟ خیلی تاثیرگذار بود».
مصاحبه با یه نفر بود و مصاحبهکننده وبکم رو روشن نکرد و چیزی هم دربارهش نگفت. بعدش فهمیدم برای مسائل امنیتی و ایناس!
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.
یه سوال میپرسم صادقانه جواب بدین، این سوال خیلی برای ما مهمه در فرآیند همکار شدنمون. شما در پاسخ به این سوال که امنیت رو دوست دارین، جوابتون مثبت بود اینجا منظور امنیت نرمافزار نبوده در واقع مقصود، کار بر روی پروژههای امنیتی، نظامی و محرمانه بوده. خیلیها دوست دارن تو رزومهشون بگن چه کارهایی کردن یا با سواد فنیشون شوآف کنند. شما اگه بخواید تو این پوزیشن کار کنید نمیتونید این کارها رو بکنید یا بگید رو چه چیزی کار میکنید مثلا کسی که تو اسنپ کار میکنه، میگه رو پروژه مپ بودم و روی فلان الگوریتمها کار میکردم و در لینکدین، همه میتونن ببینن در اینجا چنین چیزی امکانپذیر نیست. یه سریها با روحیاتشون سازگاره و بعضی نه. شما شفاف پاسخ بدین که اوکی هستین با چنین فضایی یا خیر؟ من هم کاملا رک و شفاف گفتم خیر با روحیاتم سازگار نیست و اوکی نیستم.
از نظر سطح مصاحبه، برام ایزی بود، چیز چالشبرانگیزی نداشت.
مزایای شرکت خوب بود ولی خب با فضا و سفته اوکی نبودم. حتی هنوزم نمیدونم فعالیتشون چیه؟ اما قشنگ متوجه شدم که سوال آخر رو میگفتم بله، ریجکت نمیشد یعنی از نظر فنی؛ مشکلی نداشتم.
تسک، خیلی چیز خاصی نداشت اما چون من اون موقع خیلی با این ابزارها کار نکرده بودم، عمیق نبودم روشون. گر چه
پروژه
رو فرستادم که بسیاری از نیازمندیها رو پوشش میداد.
مصاحبههایی که اولش باید تسک بزنی تا به نوعی وارد فرآیند مصاحبه بشی، یه مقدار ستمه. چون شما وقت میذارید اما ممکنه کل زحمتتون هدر بره علاوه بر احتمال ریجکتی، صرفا چون تسکیه که برای هدف خاصیه، نمیتونید به عنوان پروژهای جایی بذارید یا یادگیری جالبی توش داشته باشه. خیلی نمیشه به فرآیند مصاحبه نظر داد فقط میتونم تا همین جایی که تجربه کردم نظر بدم که اگه مسئله کوچک و یا سوال چالشبرانگیز باشه، بهتره. همه اینا سلیقهست و خب مصاحبهکننده هم میخواد فیلتر کنه. ولی از ساید کسی که مصاحبه میکنه نمیخوام نظر بدم، از ساید خودم به نظرم میشه جور دیگری فیلتر کرد.
مصاحبه با دو نفر بود. مدیرعامل و 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.
بعد اولین مصاحبه زنگ زدن که یه جلسه حضوری باید برم. رقم و اینارو صحبت کردیم. مصاحبه نبود خیلی بیشتر توضیح در مورد پروژه و چیزی که روش کار میکردن بود. روی mdm solution کار میکردن (تکنولوژی جالبیه اگه دوست داشتید سرچ کنید) و از یه لایبرری اوپنسورس استفاده میکردن که با گو نوشته شده بود. منو برای این میخواستن که اونو توسعه بدم و داشتن اونو بهم توضیح میدادن. یه ساعتی بهم توضیح دادن که چیه اصلا این لایبرری! شرکت کوچیک و خوبی بود و ناهارم نداشتن انگار البته به من یه ساندویچ کالباس آماده دادن و هر کی ناهار خودشو رو میزش یا تو آشپزخونه میخورد. با تیم یکم آشنا شدم و رفتار CTO هم خیلی کول و صمیمی بود. با پروژهها ور رفتم و خوندم و CTO شماره خودشو بهم داد گفت برو بخون یکم ببین میتونی توسعه بدی؟ هر چی سوال داشتی هم بپرس. بیشتر آشنایی با محیط و تیم بود. بعدش هم خورد به روزهای قطع اینترنت و کلا همه چی رفت رو هوا و خب من خیلی نمیتونستم روش وقت بذارم و نه من پیگیر شدم و نه اونا.
مصاحبه اوکیای بود. یکم به نظرم میشد سوالای فنی بیشتری پرسید ولی خب خیلی سخت نگرفتن و از اون طرف حقوق بالا یا ناهار نداشت و محل شرکت هم اون موقع پشت مصلا بود و جای جالبی نبود. نمره ۷ نمره خوبیه.
در مورد تسک خیلی بحثی نبود چندتا نکته بود که برای بهتر شدنش بیان شد. یکی این که برای تبدیل عدد به فارسی و انگلیسی (همچین چیزی فکر کنم) چرا از لایبرری استفاده کردی؟ خودت میتونستی با string هندل کن ی. یکی دیگه هم استفاده از bare except ها بود. بعدش یه ریپو از گیتهاب معرفی کرد که یک فایل منیجر بود که با go نوشته شده بود. گفت اول اینو clone کن و بیارش بالا. برای استفاده ازش اولش یه پسوورد میخواست که من دهنم صاف شد از تو ریپو پیداش کنم استرس داشتم پس از پا زدنهای بسیار و یکم راهنمایی مصاحبهکننده دیدم تو داک نوشتن. (: بعدش گفت خب موقع استفاده از این ممکنه یه سری فایل به اون دایرکتوری اضافه بشه یا تغییر کنه. یه اسکریپت بنویس که بالا باشه و هر فایلی که تغییر کرد بهمون بگه. سرچ هم آزاد بود. که خب من خیلی زور زدم و دقیقا نمیدونستم چیکار کنم یه چیزایی هم با پایتون نوشتم که نصفه نیمه کار میکرد و مفاهیم async رو هم بلد نبودم و خب کار درنیومد. از دو ساعتهای فرسایشی بود. وسطا مصاحبهکننده محو میشد قطع امید کرده بود. من هم خیلی بلند بلند فکر نمیکردم.
به طور کلی، تجربه خوبی بود و کاملا تسکمحور. یه مقدار سوالای HRای زیادی داشت تو مرحله اول و به شکل روانشناسانهای سوالپیچ شده بودم. مشخص بود هر دو تو کارشون حرفهایان. تو مصاحبه بعد از تسک، خیلی نتونستم خوب عمل کنم و خودم بعدش حس میکردم که کنسله. اما همه مراحل دقیق و مرتب توضیح داده شده بود، چه توضیحات تسک و چه ایمیلهایی که رد و بدل میشد. همه تمپلیت داشت و همه حالتهایی که ممکن بود رخ بده رو، در نظر گرفته بودن که همه اینارو تو سایتشون هم میشد دید و انگلیسی بود. ایمیل فارسی طبق تجربه، برای من مثل code smells عه، بوی بینظمی و ناهماهنگی میده. پیام ریجکت باحالیم فرستادن. نوشته بودن شما جوانید و تواناییهای شما نسبت به سنتون خیلی خوبه اما ما یکی رو گرفتیم که از شما پیرتره و تجربه بیشتری داره.
تسک
رو خوب نزدم و یه چیزی ماسمال کردم فرستادم که زده باشم. ایمیل دادن گفتن فلان جاشو درست کن بفرست چند روزم اضافه وقت دادن که دیگه نفرستادم چون اون تایم خیلی خوب بلد نبودم و بیخیالش شدم.
به نظرم تسکی که فرستادن اندکی سخت بود. یعنی؛ برای مصاحبه یه چالش کوچولو باید باشه. با تسک مشکل دارم کلا. حتی live code رو به تسک ترجیح میدم، تموم میشه میره و سریعترم هست برخلاف عدهی کثیری که ازش میترسن.
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 sepecific challenge with the django migrations?
Have you ever changed the migration files manually for any specific reason?
فرایند هماهنگی خوب بود. مصاحبهکننده خیلی حرفهای و همینطور صمیمانه رفتار کرد و فرهنگ شرکتو توضیح داد و از نظر من خیلی مناسب بود رفتار و جو مصاحبه. میتینگ روی مایکروسافت تیمز بود که چون نسخهٔ لینوکسی نداره با وب وصل شدم و کمی به سختی لود شد. در مجموع جوابهای منم بد نبودن و خودم راضیم. قطعاً ریجکت شدن هم پیش میاد به هر شکلی که بگذره چون عدهٔ زیادی مصاحبه میشن و شرکتهای فیتترینشونو انتخاب میکنن.