7 ms·
> This is the best-kept secret of the software engineering profession: engineers hate code. Especially code written by other people. It's why they love working
by JohnFen 3y ago
> This is the best-kept secret of the software engineering profession: engineers hate code. Especially code written by other people. It's why they love working on greenfield projects so much. No code, no maintenance, no headaches!
Except that I've met lots of engineers who were the opposite. They hate greenfield projects and prefer maintaining existing code. I noticed this broad division of personality early in my career. And it's a great thing -- both sorts of engineers are critical to a successful project.
- jrochkind1 3y agoBut do they actually want to read the code on the existing project, or just write new code adding to it? Nothing is universal, but I think often the latter.
- delusional 3y agoI always apply Chesterton's fence when working on existing systems. You don't get to add, remove, or change things before you understand what exists. That discovery is inherently exciting to me.
- bayindirh 3y agoWell, I'm currently trying to reverse engineer something done by an open source SaaS offering, to patch a tool written by another person which works with that part I'm trying to reverse. I just wanted to use the tool without any effort, but I have to understand the interface and patch the tool to make it work again. I'm not complaining. Just wanted to add a data point for the former part of your comment.
- jrochkind1 3y agoAnd you enjoy and prefer this kind of work? OK! I guess occasionally I enjoy this kind of work too, when I'm in an environment with reasonable expectations of how challenging it will be/long it will take, when I have room for it.
- WJW 3y agoDepends on the project and the person I guess. The trust of your manager is tremendously important. N=1 here, but at my current client it took me several hours of staring at a huge SQL query before I understood why it wasn't fast but the client was trusting enough that it was time well spent. I've also has PMs who could barely understand the concept of refactoring at all.
- lylejantzi3rd 3y agoI love rehabbing legacy code. It's like furniture restoration for apps.
- deleted 3y ago[deleted]
- levidos 3y agoI'm one of the persons who loves refactoring existing code. It's much easier to get started than writing something from scratch. I change a few bits, then I get more ideas on how the code can be further improved. I always try to consider the business value - is the a maintainability problem? Does the code need upgrades to reduce tech debt? Etc. Hard to sell this sort of work to PMs who just keep pushing for new features.
- bayindirh 3y agoI think it's a spectrum. For example I like writing new code and designing new things, but I don't hate or dislike my or other people's old code. That code also has been written by a human, and it's disrespectful to approach somebody else's work with this prejudice. It might not be good code, by our standards, but who knows how it was written. Was the author under stress, under time obligations, or happy, or something else? Also, being able to approach somebody else's code and work with it is humbling and deeply educative for me. You get a (free) passage to a wisdom of a person or a group. That's priceless.
- BossingAround 3y ago> That code also has been written by a human, and it's disrespectful to approach somebody else's work with this prejudice. Not only has it been written by a human, but one should also remember that they're missing the context in which the code was written. Was the author stressed about their latest children being born? Fearful of possible layoffs? Under time pressure? Tired? I've definitely written code myself that came to bite me later, and I marveled at how badly written that was. We're all human, which, among others, means that we're all inconsistent to a large degree.
- fragmede 3y agoAlso important is Chesterton's fence and the history lesson when touring existing code. What were the business requirements the first time around that were thrown out the window for version two, but there was no time for refactoring so version three has this known wart that version four tried to refactor but that wasn't complete until version five which had this new feature that needs another refactor.
- j45 3y agoBrilliant summary and the parent comment. Too many developers remain hyper committed to shiny object syndrome, or wanting to relearn lessons of the past as if they are the first to ever lay eyes on it. No code is perfect, and lots can be learned even from a well intentioned approach gone wrong. It’s far easier learning from other folks and their rattlesnake bites instead of insisting of recollecting that baggage yourself, first. Greenfield is still useful, but too often it has to do with preference and interpretation or a lack of willingness to do so.
- WJW 3y agoIndeed! This phenomenon has been a great source of freelancing customers for me. Startups naturally thrive on an early team that loves building new things, but the flip side is that they rarely seem to go back to fix existing stuff. That leaves a gap for people like me, who prefer to take something that works poorly and make it bulletproof. For some reason this quite often seems to involve db access patterns but there's a fair bit of algorithms work too. Usually the "building new things" engineers are quite happy to let me take over the investigation into why the 150 line SQL query is slow, so it's a win-win.
- j45 3y agoStartup teams also aren’t great as they should be at being even slightly kind and thoughtful to their future selves. Understanding greenfield usually means iteration, a small amount of conceptual architecture and organization before dialing into the matrix to go full Neo can go a long, long way. Specifically, it’s easier for startups to create productive new beginners in their codebases.
- elbows 3y agoOut of curiosity, how do you go about finding clients for this kind of work?
- WJW 3y agoMost of my clients were from a local meetup where I eventually got to know most people quite well and they me. It was mostly word-of-mouth where people remembered "Oh! <other startup> had similar problems and WJW solved it for them".
- dfcowell 3y agoThis is a really great point, and it’s awesome when a team strikes the right balance. In my experience these engineers tend to be rarer than the group I talk about in this post, but when you find them they’re worth their weight in gold!
- soneca 3y agoI am one of those who prefer working on existing code. I like making things better, understanding how a code works is thrill, adding new features on existing premises. I am also an amateur fiction writer, and I notice the same thing in it. I like planning, but the first draft writing is a chore to me. An effort to vomit all my ideas as words. Then, I love rewriting. Revisiting what I wrote and improving it, fixing it, perfecting it.
- jtxx 3y agohah humans are interesting! I'm the opposite. I love starting a codebase, I also make music and it's way easier for me to make 100 cool unique sketches live and improvised but not finish anything. it really takes all kinds
- lc9er 3y agoMy favorite musical partnerships have a balance of a starter and (me) a finisher. I really struggle with producing raw material, but am good at revising, reworking, and cutting out fluff and my best writing partners are great at spewing out ideas, most of which are cut. It together, we are able to make something we’re both excited about.
- mrweasel 3y agoI would love to team up with someone like you. Having a person that can start a new code base and not be overwhelmed by the task is a godsend. I'm much more comfortable diving into an existing project and extending it or fixing bug than I am starting something new. Somehow it's just more natural for my brain.
- djangelic 3y agoI'm similar, and I've found AI to help with this. I'm able to guide the AI to write the first draft, then I go in and rewrite it. It's helped remove that frustration at the first draft.
- lolinder 3y ago
- delusional 3y ago[flagged]
- RhodesianHunter 3y agoWhat use is this sort of pedantry? No project is greenfield unless you hand made the silicon?
- delusional 3y agoFair question, I suppose I didn't express myself clearly. Firstly, I'd like to abolish the idea that "greenfield" and existing are somehow opposites. Greenfield projects take on a bunch of existing abstractions and complexities from all the stuff they are built on. Instead, these two terms are actually very similar, "greenfield" projects just chose to throw out one more layer than using the existing system. My argument here is that the dichotomy here is false, and that the two terms are instead a classification of degrees to which you abandon existing abstractions. As I said, I understand that this is what you mean when you say greenfield, I'm not asking you to use different words. I'm asking you to pay notice that this is what you are saying. That you are explicitly not in a "green field" with nothing around you. You've thrown all the furniture out, but the building is still there, the walls are still the same color, and the windows are still overlooking the same parking lot.
- klysm 3y agoOh please. By your definition no greenfield project has ever existed in thousands of years.
- andrewl 3y agoIf you wish to make an apple pie from scratch, you must first invent the universe. Carl Sagan
- wsve 3y agoThis makes no sense to me... Greenfield projects have problems that legacy projects don't (What language to use, what framework to use, where/how to deploy, etc.), and vice versa (How do I design my feature with the existing limitations of the system in mind, do I need to to redesign a part of the existing system to get it to work, etc.). None of that has anything to do with "Time thinking about the problem", nor does either one imply that its questions are easier or harder to answer in all scenarios. They're just very different questions, but some devs prefer dealing with the issues a greenfield project presents.
- lo_zamoyski 3y agoOr someone who does both. 1. Only working on greenfield means you don't want to learn from others or have difficulty doing it. Lots of knowledge is expressed in the code you refuse to read and you need humility and patience with your own ignorance. 2. Only reading code is insufficient as you are not only a scholar of the code base, but a maintainer and developer who must extend and adapt it. Working with a code base is more like a conversation. There's a back and forth, though not symmetrical. (1) is someone who monologues. (2) is an audience member only.
- rco8786 3y agoI’m pretty good at writing code but I consider one of my “superpowers” to be that I also love to read code. I cannot even begin to estimate how this has affected my career and abilities. It’s a task that most seem to dread, but is something that I do for fun.
- austin-cheney 3y agoSure. Of course there are actually software developers out there in the world that read and write code. After all, that's where all this software in the world actually comes from. But for the other 85+% of people in the profession its basically a game of AdLibs. Fill in the blank. That's why there is such heavy reliance on things like frameworks, dependencies, and Invented Here Syndrome (people who don't trust their own or teammates code). That's why you have expert beginners, because you can get really masterful at coloring with crayons. Try to take any of this color by numbers nonsense away and see immediate full on emotional apocalypse. It's not a choice. The number one priority is to retain employment, and if your employer has failed to provide you the preparation or environment necessary to perform with confidence this is what you get.
- Der_Einzige 3y agoThe way that masked language models are trained is nothing more than madlibs. This is how I've always explained it to normies and they get it quite well.
- jacurtis 3y ago> But for the other 85+% of people in the profession its basically a game of AdLibs This is so true. I work at a fairly small organization (~35 devs). Large enough to see roles form but small enough that I can tangibly see everyone's contributions. I work SRE, so I see lots of code from all the teams and ultimately talk to almost all the devs. In our impressive enterprise-level codebase (our SaaS product has average annual subscriptions in the range of $1.5M per customer), there are probably 3 developers that wrote 80% of the codebase. I can name them all and call them up. But I said we have 35 devs in the organization. So what do they do? Mostly little things. Flipping a conditional or making a slightly more explicit test case to fix an unexpected edge case we experienced. Most of these 32 other engineers are solving simple problems, basic refactoring, and so forth. Not too different from the adlib, fill-in-the-blank analogy you provide. Also, to be clear, it isn't like we hired 3 seniors and expect them to write all the code. These are just groups people fall into naturally. The reality is most software engineers have only ever done the adlib style work and have built an entire career around never solving any real problems. They know just enough syntax in a language to solve the little problems and with software, there is a near infinite supply of these little problems.
- dvhh 3y agoBecause a greenfield project would require to do something that software engineer abhors more than writing code: giving time estimates in an "agile" environment.
- zirgs 3y agoThey prefer maintaining existing code until they get a project that's full of legacy stuff and nobody wants to replace it, because it works (most of the time at least).
- parineum 3y agoI think it's a culture thing in SV/VC//startup world and I think that group is very public, outspoken and sure that they speak for everyone. Most if us aren't that but we just continue about our business developing new features and squashing bugs. I like greenfield projects but the choices and freedom they present come with a lot of non-coding and missing infrastructure. A nice brownfield project lets me check in code, see it auto built into the dev environment and have QA feedback the next day.
- antigonemerlin 3y agoI mean, there are badly designed brownfield projects with tight coupling, bad documentation, and, where you have to spend half an hour to figure out why a simple change broke everything. Funnily enough, personally, I can handle badly designed projects as long as I was part of the team designing it. At least then I understand it enough that changing things isn't too much of a pain, and I can pretend my refactors will eventually make the codebase look good (or if that fails, I can write enough documentation to at least mitigate the problem). It's a pain in the ass for new maintainers though. But goddamn, working in a good established project where other people have done the hard work of figuring out non-coding project management stuff is a fricken breeze. No arguments there.
- lapcat 3y agoAm I unusual in enjoying both? Earlier in my career, I was stereotyped as a "maintainer", but now I've been a self-employed indie developer for years, so all of the code is mine. Once your own code gets to be 5 years old or so, it's almost like maintaining someone else's code. It's like, why in the world did I write that before?? I guess my focus has always been on the product and the user experience, so I don't make the code itself central to my work and my identity. The code is not the product.
- YZF 3y agoMost of my early career was "greenfield". I really loved doing that. Sometimes that meant me doing everything. Guess where the buck stops? There's no way to disconnect the final result from the work. Keep in mind though that green field pretty quickly turns into maintenance. You ship something, guess what, there's bugs to fix. You want to add a feature, you have an existing code base. The nice thing is that there's no one else to blame. Is it really hard to add a feature? You (or your team) messed up. Does the quality suck? You (or your team) messed up. Even in well established code bases there can always be "green" new pieces. These are choices to make: should we refactor the code, should we fix the old code, should we rewrite pieces of it. There is no one answer that always works. The problem is when you look at something and your answer is always a rewrite just because you didn't write the original code. I've seen people/team rewrite perfectly good code for no business reason, just because they want to. In terms of code written by others, sometimes that's a thing of beauty, a piece of art. Sometimes it's just garbage. I'm sure we've all seen some code where we go wow, this is incredible. And then we've all seen code where we go wtf. I don't really see the need to dig too deep there, what's great is great and what's garbage is garbage and then a lot is somewhere in the middle. I sometimes look at code I've written in the past and I think it's really great; and sometimes I go wtf. Usually the latter is where I was not familiar enough with the problem space or the code base I was working in. Questions to ask are: does it work? what's the cost of maintenance? Ugly code that works well, doesn't need to be touched, can be fine.
- zeroonetwothree 3y agoI like both types of work. It’s fun to do greenfield projects because of less maintenance and the ability to do it the way you want. But it’s also fun to take something years old that’s barely working and try to gradually improve it while minimizing down time.
- faitswulff 3y agoThis article on makers versus menders highlights the differences between those who prefer greenfield and those who don’t pretty well: https://corgibytes.com/blog/2015/08/14/makers-vs-menders/ https://corgibytes.com/blog/2015/08/14/makers-vs-menders/
- fzeindl 3y agoI like both. Greenfield projects can be pretty boring when there isn't something special about the functionality or a new architecture to try out, but it feels good to spurt out stable features when you know what you are doing. Repairing / fixing / retrofitting an old code base always has it's wonders. I've seen much code in my life that was in a bad shape and my approach for fixing was seldomly the same, it was always tailored to the team and situation. To rephrase from Tolstoy: "Good code bases are all alike, every bad code base is bad in it's own way."
- sanderjd 3y agoYep I have a hard time with a blank page and love the flywheel of incrementally iterating on a working baseline. I didn't realize this until very recently; I think I had internalized "well everyone loves greenfield projects, so I must too".
- scarface_74 3y agoI didn’t realize how unique my circumstances were until I started reading r/experiencedevs. I’ve had 8 jobs over 25 years and over that time, I’ve mostly done green field work, including at my first job out of college. I’m not even sure I have the skillset to modify a huge existing code base. Even at one job where there was a large codebase that I was “modifying”, it was mostly to add new CRUD features to an API or website and I did my own vertical “slice” that didn’t involve modifying existing code.
- astrange 3y agoI like greenfield projects but I also have the problem where a blank page gives me writer's block. Sometimes "like" doesn't go far enough. It seems like this is a good opportunity for LLMs… A related problem is that "maintenance" is conflated with editing code, but IME some languages especially """bug free""" would prefer you rewrite every time you make a change rather than edit things, because the code becomes impossible to understand after it has more than one author.
- Ferret7446 3y agoMy experience is that people who love writing new projects are probably not well suited for it. It means they aren't stressing over the ambiguities and long-term consequences of every single architectural decision, and thus are more likely to produce a project that immediately suffers from many technical issues, such as scaling, performance, ease of monitoring/debugging, ease of extension, ease of onboarding new maintainers, etc. Start your project on the right foot by finding that disgruntled senior engineer and giving them ample time for design and research.
- berniedurfee 3y agoI like greenfield projects, but I love tearing down and refactoring old code to make it better. I also spend a lot of time repairing and maintaining old cars, houses and fixing up stuff to be better and stronger than it was when I found it. It’s very difficult for me to leave well enough alone. If it ain’t broke, it could certainly be better!
- readerbaza 3y agoThose who like greenfields only are probably those "upgraded" to PMs and the reason is they turn green into brown _very_ quickly.