Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Basics (Retired) Introducing JavaScript Review Introducing JavaScript

Andy tran
Andy tran
7,112 Points

Thousands of lines of codes in some websites like Amazon and Target and other websites

I see thousands of lines of codes, which I recognize some of them from what I have learned so far, by a view-page-source option in big sites like Amazon and Target and other sites, and I am pretty new to web development. My question is are those lines of codes done by a whole team, a group of developers, or just by an individual? Do we have to know how to write thousands of lines of codes like that to be able to get hired by future employers? I want to pursue this career and really want to get to know it

5 Answers

This is a really fun question, so I'll take a shot at answering it. I've worked on several websites for some very large companies with lines of codes in the tens of thousands.

For most of these projects there are teams of people. It might be a team of 2-3 people, and as large as 20 or more people. When working on a team like that, tasks are split out across however many people there are. You might be responsible for the content and marketing pages, while another group is responsible for product display pages or even the functionality that takes and processes a payment.

Depending on how new the product/business is, you might already have a lot of code to start with. Some projects re-use design components across multiple websites. A lot of teams also have common utilities and functionalities that can be used whenever necessary, things like account validation, error handling, come to mind.

As far as if you need to be able to write tens of thousands of lines of code, I think what matters most is how well you work with other people. When you are on a team, no matter how small, you need the ability to communicate. Successful projects always have a good team that communicates well behind them.

Some of the most productive days we have are when we write two or three lines of code. I know I've personally seen hours in a day wasted on a solution that results in more bugs and ends up getting thrown out. That's pretty par for the course so don't worry about needing to write a tone of code, quality > quantity.

Steven Parker
Steven Parker
231,269 Points

I think you can count on major websites with thousands of code lines having been developed by a team, and not all at once. I'm sure the site was originally much more simple, and features were added from time to time.

It would still be good to develop a skill set that would allow you to be able to work on any part of such code, so you could handle any specific assignment.

Andy tran
Andy tran
7,112 Points

Many thanks to your answer

Stuart Wright
Stuart Wright
41,120 Points

For companies that size, their code bases will have been written by a large team, over a long period of time.

It's also worth noting that when you right-click 'view source', what you see hasn't actually all been written in one file. It will have been generated by a server side program consisting of multiple components, which generate the correct HTML based on several different parameters. You definitely shouldn't be put off by what you see in the source files - no individual developer would be expected to build something as complex as Amazon on their own. Most likely what would happen if you were hired by such a company, would be that you are asked to work on some specific feature, which is a much more manageable undertaking.

Kevin Becerra
Kevin Becerra
14,243 Points

Most likely that code was written by a team. For big companies and even smaller ones that code is done by a team. That code is gradually written over time and made better through the development process. Team members code is reviewed by a group of people, they are given comments and feedback on it when they turn it in or commit the code. Everyone has a task to complete in which they carefully plan out how they will write the code. It can be overwhelming at first but you'll learn that most people don't just sit down and start writing hundreds of lines of code at a time. You have to understand even in the treehouse videos the lessons they are doing is something they planned out and figured out a way in which they will be able to achieve what they want.

Just keep at it and don't get discouraged by that. Learn the basics, improve your skills, and by doing this consistently you can make this your career.

Andy tran
Andy tran
7,112 Points

Thanks for you answer

Ben Reynolds
Ben Reynolds
35,170 Points

Not only are large-scale projects normally divided into tasks for separate teams, they're sometimes built by more than one company. For example a business might split up the majority of their website project amongst their own staff and then outsource the e-commerce component to a developer who specializes in that area.

This is where following coding conventions becomes really important. It can be easy as a beginner to miss the point of using camel case here, pascal case there, "is" or "has" in front of booleans, etc. These things help make the intent of your code clear and can save a ton of headaches when separate groups of developers have to review and update each other's code.