Live data from Hacker News

Absolute truths I unlearned as junior developer (2019)

monicalent.com

231–240 of 269 posts

Re: Absolute truths I unlearned as junior developer (2019)

#231
post #65

Earlier quoted context omitted.

I can almost guarantee you that any codebase with a "Player" class that looks anything like your example is a very poor codebase. It shows me they just didn't know where to start, so they started by throwing everything in there. Abstractions are always about the consumer of the abstraction, not the implementer. No consumer needs everything in "Player", so it's a terrible abstraction, and it's not just a data type or…

> They're about what you need I've no experience with game dev, but in other areas of development what you need is often not known ahead of time (which I believe the parent is trying to say). Operating under those conditions makes the Position abstraction somewhat arbitrary (until it's obvious it's needed by other parts of the system). Aggressive refactoring and robust testing are necessary when operating under these…

> what you need is often not known ahead of time

Well that's kind of the point of software engineering, isn't it? Actually typing code is only a small part of software engineering, and if you don't know what you need yet, then you're probably not ready to write code. That doesn't mean you're not being a productive software engineer! It just means you're still working toward that point.

I could be more clear about "what you need" actually means. Let's say I sit down to (A) prove the four-color theorem, which says that no more than 4 colors are needed to color in a 2D map with no two adjacent regions having the same color; (B) write a function to color a map using as few colors as possible. Before I can start on the meat of it, I have to decide exactly what I mean by "map". Anything that (A) relies on my proof or (B) calls my function is going to need to turn their data into the kind of "map" I'm working with.

Oh, I know what a map is: it's an ArcGIS Pro 10.7 Geodatabase with a Polygon layer! Hand me one of those and I'll assign a 32-bit ARGB value to each polygon. What? You don't have ArcGIS Pro 10.7? Well, sucks to be you. Obviously it has to be that, since I need insert esoteric proprietary feature in order to color it.

Hmm, well, okay, maybe I don't need every feature of ArcGIS Pro 10.7 Geodatabase Polygon layers. In fact, I really just need a list of regions and how they're connected. Do I need literally every wiggle-waggle of every border between each region? Well, not really ... in fact all I really need to know is which ones touch, and which ones don't. In fact, it turns out what I need is a Planar Graph. It probably shouldn't have any loops (nodes connected to themselves) either. A loopless planar graph. If you hand me one of those, I can color it for you -- in fact, I'll just assign each node 1 through (up to) 4 to represent the colors, and you can do whatever you want with that information, rather than me picking the actual ARGB values for you.

The reason I associated it with a math proof is because it's more clear in that case that reducing the preconditions on the objects you accept increases the power of your proof. Proving something interesting about all multiples of 5 is less powerful than proving it about all integers, and less powerful than proving it about all elements of an Abelian Group, etc. Writing your code to work on any loopless planar graph is much more powerful than writing it to only work on .

And we settled on "loopless planar graph" not because we had a bunch of graphs lying around -- we probably didn't! We probably actually had a map representation we've used elsewhere. We settled on "loopless planar graph" because that is the minimal possible description of the objects we can run our code on. That's what I mean by "what we need to do our job". That is the birth of an abstraction.

Re: Absolute truths I unlearned as junior developer (2019)

#232
post #67
post #9

For me, it was that I thought that being a good programmer was that I write clean code with enough abstraction and indirection to make it future proof. Boy I was wrong. Unless you’re doing the same thing you’ve done for years, you can’t tell the future. And just when your unnecessary abstraction is wrong, this the reason why we’re talking about tech debt in the first place. Because nobody wants to touch it. Unfortuna…

Probably unpopular/heretic sub-opinion: if given a chance to change the past, I’d rather NOT read books like TAOUP and other books on the same shelf. Or at least wouldn’t take them close to the heart. Because instead of collecting my own experience and fitting it to my projects, I’ve invested heavily in these patterns and rules and “gems” and built something in me that I now have to destroy with advanced therapy (not…

In the course of my career I've learned a simple rule for processing programming wisdom. I don't follow any programming principle or practice unless:

- I have seen value from it firsthand, or

- I'm working alongside somebody who says they have seen value from it firsthand, or

- I've read something that has persuaded me of the likely benefit, and I'm curious to see if I can figure out how to realize it in a real project, as an experiment.

The obvious upside of this is that I don't get ripped off by useless bullshit. I can't tell you how much "best practices" programming "wisdom" I ignored that later disappeared without a trace, completely unmourned, like ashtrays on airplanes.

But it also saves you from doing good stuff wrong, or good stuff in the wrong context. A principle or practice may be amazingly effective, but if you don't understand it, you likely won't get much benefit from it. And very often if you don't understand something, it's because you've never seen a context in which it makes sense. If you try it out, you should try it as a conscious experiment, and drop it if you can't make it pay for itself. Don't keep doing it out of a sense of duty, or a feeling that "good programmers do this."

I'll never be entirely sure if something is 100% bullshit, or if I've never seen the right context for it, or if I'm just to stupid to understand it. I have finally, thanks to my first time working in an OO monolith in a dynamically typed language, for the first time after more than twenty years in the industry, understood what some of the old OO design ideas are about. It's a shame that my initial exposure to those ideas was through many years of watching people misapply them to create unnecessary mess in Java services.

Maybe I'm wrong about a lot of other things. Maybe someday I'll be working on a project and a light bulb will go off in my head: "Oh my God, so THIS is what dependency injection is good for!" I can't know if that will happen, but I do know that I won't spend the rest of my career setting up dependency injection on every single project I work on just because other people regard it as a prudent and mature thing to do.

Re: Absolute truths I unlearned as junior developer (2019)

#233
post #212

Earlier quoted context omitted.

Consider the manager who tries to put in a couple hours a week helping with filing (as in, organizing paper files). Let's say the filing system is very busy and constantly evolving to meet new needs. Odds are they're just going to mess things up and annoy the people who do it as a major component of their job. Now, it may still be worth it, to keep the manager somewhat aware of how workers are doing their jobs, but i…

Exactly. I've been a manager for a while and don't do much day to day hands on keyboard coding. I'm still able to help, sometimes quite a bit, but it depends on what the problem is. If someone on the team is struggling with the gnarly domain specific application logic portions, I will usually direct them to a more senior teammate. I'm more likely to add confusion than reduce it. I'm not in those weeds enough to know…

Not exactly - there are about three things in play

1. You cannot alter a company with code in the way you can with written words. If we split the compmay-as-a-machine and company-as-people-operating-(in)-the-machine and compmay-as-people-adjusting-the-machine then the difference is more stark.

a company as a machine does run on written (and often unwritten) policies that humans adhere to. More and more now there is code doing the actual machine but but it is rare if ever it is a whole piece - maybe there are whole companies totally automated but so doubt it.

As such a big important part of being a manager - changing the machine to be more efficient - is just not (yet) possible with code. but when it is, managers will talk code and write code.

2. I am not sure where to go with the filing part. Yes in many companies there are so many jobs to get done that anyone getting their hands in and automating anything is a huge help. That person would be making a part of the company-as-machine. good. presumably they would do it ten hours a week to a professional standard.

is it the best way to organise things. No - again torvalds had hierarchical arrangement and hardly ever write code - but that belies the reams of code he wrote as examples, discussion documents, strawman and just test code.

Manager should be writing test frameworks or tools to build the documentation in Japan or whatever

3. The whole "pointing people at someone else who is expert". scream bottleneck to me. Screams that people are in silos, there is not enough brown bag lunches ot other ways to discover / get repeatedly told about how other areas of codebase work.

4. things like weird bugs and effects of the tech stack are great - exactly the sort of thing to put in a code review. Or a code review of reviews (which I think is another good managerial practise)

Re: Absolute truths I unlearned as junior developer (2019)

#234
post #206
post #80

Earlier quoted context omitted.

> If that is going poorly, more communication is required That is like saying "if your program is performing poorly, more code is required".

I meant something more along the line of "if your code is ill-optimized, you gotta throw more CPU time at it".

Well, do you think that works?

When you do that, what's going to happen is the developers are going to think they can get away with making it even more inefficient. Not intentionally, of course, but the signal you're sending them is "it's fine if it's slow, we'll throw more compute at it" and that's the condition they will be solving around.

So the next time they choose between flashy feature and fixing a performance problem, they will create the flashy feature. "We can let the hardware acquisition people deal with performance."

It might even look like it works, at first. You get features out quickly and the thing runs almost acceptably.

But then months or years later, you're spending a shitton of compute on performing something that could be done with a couple of pizza boxes. And everyone is saying "well it's too late to change now, everything is designed around a HPC assumption."

And now you're stuck bleeding money on things you shouldn't have needed.

If I sound sore it's because I have lived through it too many times.

You should never, ever solve the immediate problem without looking at what long-term reinforcing feedback loops you're setting up in the process.

Re: Absolute truths I unlearned as junior developer (2019)

#235
post #229

Earlier quoted context omitted.

It's still baffling to me how short avg tenure for SWE is, in general. I feel that after a year, maybe, is when I finally start getting the lay of the land, meet some people, start understanding more of the domain and can start causing impact worthy of my paycheck. I'm now at 3.3 years at my current gig and I'm feeling like I have superpowers, if that makes sense. I think it takes time to be in a position to really d…

It really depends. In my experience, after about 2 years in a specific role you will start to develop expertise in your specific organization and tech stack rather than generalist capabilities. There are good reasons to stay after that (you love the team, could work in the domain forever, getting tons of growth opportunities/raises etc.), but you should understand the tradeoff. You may be trading off learning how to…

As long as you'll be staying young, forever, you're sorted, bouncing around.

I have been around long enough to watch others that have bounced around, suddenly hit the "Boomer Wall," where they get ghosted by recruiters.

It's very sudden, and quite jarring. Absolutely terrifying. I hit it, but it wasn't the same shock as others have felt, because I hadn't been job-hopping.

Make sure to save a nest egg, folks. I did, and that's why I'm in a fairly enviable position (if you count surviving being treated as radioactive by tech recruiters as "enviable").

Re: Absolute truths I unlearned as junior developer (2019)

#236
post #195

Earlier quoted context omitted.

> I can almost guarantee you that any codebase with a "Player" class that looks anything like your example is a very poor codebase. It shows me they just didn't know where to start, so they started by throwing everything in there. And then there is Unreal Engine 5's ACharacter class[0] :-P. I recommend checking the superclasses too. [0] https://docs.unrealengine.com/5.0/en-US/API/Runtime/Engine/G...

First off, I'll say that popular frameworks optimize for being popular, which usually means they let inexperienced people make cool things quickly. This necessarily involves tradeoffs that end up being "walls" to more experienced coders. It's very very hard to let inexperienced people make cool things quickly without restricting power-coders. So "Unreal does it" doesn't necessarily mean it's the right choice for grea…

I wholly agree with you and your commentary here is one of the most profound things I've read about software engineering in a long time. But, to play devil's advocate,

> I'm guessing it's just because that is the combination that they found helps inexperienced coders make cool things quickly

Is not "making cool things quickly" the essence of enterprise programming? Sure, you can make the cleanest, most perfectly abstracted code for yourself when the requirements are well-defined and unchanging, but that's not the environment you find in business. One might contend that such a combination is the optimum for enterprise programming/making cool things quickly.

Re: Absolute truths I unlearned as junior developer (2019)

#237
post #71

Earlier quoted context omitted.

Its all fine and dandy, but expect ppl will be willing to do this kind of work if you pay them few salaries worth of money. If you want senior developer that will work as an architect, team lead, product manager etc. (S)He better make 400k per year or more.

It seems like you assume, that they are tasked more than usual, but in reality this the way we want to work, because it's simply better. There are many seniors on the team, so it's not like one is expected to fully cover multiple roles. It just means that you aren't bound to single. We have nearly zero rotation within senior staff, and some actually came back from other companies, sometimes due to pure frustration wi…

> About 400k (USD I assume) - where I live you could easily get really nice house with that in less than a year, with zero mortgage and without limiting your daily spending too much.

That's not the way to think about it when looking at leveraged assets. A house where you live.

> I'm happy for you if you have ability to earn that, but with such expectations and altitude - no wonder US corps are so eager to outsource to our side of the pond :-)

Are they? Last time I looked there was a lot of Europeans looking to move to America, but the reverse was exceedingly rare.

Re: Absolute truths I unlearned as junior developer (2019)

#238

> Things like indendetation, formatting, naming – god forbid you did it differently than I would have. I agree with chilling out about this when it's a human making the changes...except now that we have autoformatters we can actually be more pedantic about this than ever before :) If the autoformatter doesn't agree with what you wrote, bam, red CI. > Everyone writes tests A big thing I've learned over the years is th…

I don’t get what you mean about autoformatters. For me they run on save so it’s pretty hard to get errors from them. And I found the big advantage was not caring about formatting at all. I could write a long line and have everything rearranged and indented with a keystroke, and I didn’t need to worry about eg maintaining vertical alignment in the code or whatever.

The idea is that you run them on save, but you also run them again in CI in a "fail if you would've made changes" mode, so that if someone has their editor misconfigured or edits text with cat or whatever you still force them to run the formatter somehow before they can land their PR.

Re: Absolute truths I unlearned as junior developer (2019)

#239
post #195

Earlier quoted context omitted.

> I can almost guarantee you that any codebase with a "Player" class that looks anything like your example is a very poor codebase. It shows me they just didn't know where to start, so they started by throwing everything in there. And then there is Unreal Engine 5's ACharacter class[0] :-P. I recommend checking the superclasses too. [0] https://docs.unrealengine.com/5.0/en-US/API/Runtime/Engine/G...

First off, I'll say that popular frameworks optimize for being popular, which usually means they let inexperienced people make cool things quickly. This necessarily involves tradeoffs that end up being "walls" to more experienced coders. It's very very hard to let inexperienced people make cool things quickly without restricting power-coders. So "Unreal does it" doesn't necessarily mean it's the right choice for grea…

I don’t disagree with anything you’ve said, but just to the specific narrow example of UE’s ACharacter: there’s nothing stopping you using APawn as your “player” and composing the collision, mesh, movement and functionality as you please - in fact, I suspect the majority of people using Unreal Engine for anything other than toy projects would do just that. I think the “pre-composed” ACharacter exists mainly to help with quick prototyping.

Re: Absolute truths I unlearned as junior developer (2019)

#240
post #228

Earlier quoted context omitted.

I start with containers, even if we're deploying single binaries. Local repo of the prod environment is incredibly useful when you inevitably need it. GitHub actions/Gitlab CI build containers out of the box, and deploy to ecs/kubernetes/digitalocean/whatever straight out of the box. I can set up a CD pipeline on a fresh project to AWS with github actions in about 15 minutes that I will never need to touch again unti…

What's your bill like? Or I guess it depends on each person's interest in the cost but yeah. Maybe it doesn't have to be expensive if you do it from a "raw" way.

"it depends", but mostly I don't care, it's a rounding error compared to developer time. Digitalocean lets you deploy containers onto app service so you could do it for $5/month there. On AWS you can do it for about $15.

> Maybe it doesn't have to be expensive if you do it from a "raw" way.

If you look at straight $$$ cost sure, but the moment you take any development time into consideration you want to build on abstractions. Sure I could run docker on ec2 on a t2 micro behind the free tier, but if it takes me half a day to set up and I make $50k/year, it will take almost a year of it being free to pay off the cost of running it in fargate. _This_ is where AWS saves you money, not on buying compute from ec2.

Post reply on HN