Why would an employer ask for a ‘long’ code sample? [closed]

What would a large project that spanned multiple files and >1000 lines show to an employer that a few individual files and a couple hundred lines couldn’t capture?

3

Reason 1: Is it your own code, or something you copied?

(Mostly) anyone can copy a short piece of code from the internet, explore it, and give it as his own during an interview while being able to explain the code itself.

Doing the same with a large codebase would be difficult, since it would be easily recognized and searchable as one of the an open source projects.

Reason 2: Do you have skills to work on a large codebase?

When you give a link to a large codebase under version control, you show that you actually have the skills required to write a large codebase.

When you give a small piece of code, you are showing just that you was able to write a small piece of code. Would you be able to work on a codebase with thousands of lines?

Reason 3: Have you studied/verified your code enough?

For an interviewer, it would be easy to find an issue in a large codebase¹, and to interview you on it. The interviewer may ask if you are aware of one of those bugs, why didn’t you solve it, and how do you think to be able to solve it now.

Moreover, during an interview, the interviewer can target any smallest part of the codebase, and ask you to explain it in details, to see how well do you know your own code.


¹ Strangely enough, it is not rare to see small (under 100 lines) pieces of code with one or several bugs where the code is not doing what it is expected to do. This applies as well to candidates who are writing that they have +10 years of professional experience and qualify themselves as highly skillful.

4

Gives them a nice chunk of code that they can steal without paying you for when they discard you.

3

I think it is likely that this potential employer wants to see how you would structure a larger application and is looking for whether you made use of good design principles.

You should just politely contact this potential employer and ask them yourself.

1

Writing small pieces of code and stitching them together to form a coherent, bigger whole are two different skill sets entirely.

Asking for bigger pieces of code across several files is a way of testing for the latter. I.e. the employer isn’t simply interested in your “coding skills” but in your architectural skills.

1

it would show you’re likely to hand their code to a competitor if asked to produce a code sample during a job interview.

2

Mostly because of the verbosity of the languages. After all 1000 lines of code in Java/C# especially if over engineered do not allow to cram much functionality inside. So he just have to ask for something big enough to have at least some insight in how you work or think.

2

In response to the comments on # of errors per KLOC, well, it sounds like we all under-estimate the prevalence of latent bugs in commercial software 🙂 In mission-critical systems (like flight traffic control), 1 error per 100 lines of code is considered average [http://history.nasa.gov/sts1/pages/computer.html]. Per the same link, the software used on the Challenger space shuttle had approximately 1 error per 10K lines; that code cost $1,000 per line to develop.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật