your company has money for no one above mid-level engineers to be actually building the product?
Solitary, poor, nasty, brutish and short
your company has money for no one above mid-level engineers to be actually building the product?
rules aren’t there to be enforced, they’re there so that when you break them you take a second to think about why.
deleted by creator
tldr - you’ll just have to do the conversions in your head now because it’s useful to know where the sun is at different points on the earth when trying to communicate across those points.
the fact that the acronym for Coordinated Lunar Time is LTC tells you everything you need to know about how this will work.
throw new SameJokeException();
How does the latter not reasonably imply the former?
I’m not dumb and I write shit code all the time. Bad code only implies that the author is dumb if you assume only dumb people can make mistakes.
yeah, PascalCase is the worst
puts me in mind of the old guru meditation error messages that popped up in the stone knives and bearskins era of computing.
this, but doubly so with Eve. You’ll notice that we often skip over Cindy and Dave and go right to Eve, so often that I don’t even know off the top of my head whether Charlie and Deandra are the conventional names for persons 3 and 4 in this construct. That’s because this construct is used a lot when talking about secure communications and the convention is that “evil” “eavesdropping” Eve is the person trying to destroy, intercept or alter the communication between Alice and Bob. Her role is built into her name.
it’s only dumb til it works
blog updates seem to be signed by someone named Dinnerbone
ɐɯ I ʇɥᴉuʞᴉuƃ oɟ ʇɥǝ ɹᴉƃɥʇ pᴉuuǝɹqouǝ ɥǝɹǝ¿
select only what you need and use limit
you don’t know the structure of the contacts table, and do you really want christmas gifts to only go to the first x number of nice people?
update contacts set name = ‘Grinch’ where name = ‘FellowHuman’;
well, there’s confusion, paranoia, agitation and so many others…
our biggest client prefers data as Jason so we swapped half of our database to that
the app I work with currently stores json as the only column in a sql table and it hurts me so very much. like watching someone pick up a screwdriver and try to bash a nail in with the handle.
Enhance
manager in code review
theresYourProblem.jpg
`//Get CustomerInfo from CustomerRepository by Customer ID or else throw an CustomerNotFoundException
public CustomerInfo getById(String customerId) {
return customerRepository.getById(customerId).orElseThrow(new CustomerNotFoundException());
}`
This is the kind of pointless comment I see in my codebase all the time. Best I can tell, a couple of my coworkers like to plan out their code using comments, then backfill in the actual executable code. That’s fine, but they leave the comments in when they add no value.
` public static LocalDate parseEndDateFromString(String dateString) {
try {
String[] split = dateString.split("-");
//In order to get the last day of the desired month, we go to the first day of the next month, account for rollover, then subtract one day
int month = Integer.parseInt(split[0]) == 12 ? 1 : Integer.parseInt(split[0]) + 1;
return LocalDate.of(Integer.parseInt(split[1]), month, 1).minusDays(1);
} catch (Exception e) {
throw new RuntimeException("Invalid date format - must be MM-YYYY");
}
}`
Stuff like this, otoh, is where comments are useful. The required format is obvious from the error message, the param and return from the method signature, the only part that requires a comment is the fiddly logic of accounting for the edge case where month == 12 and the rationale behind how we determine the last day of the month. As a rule, comments are for why something is being done, if it’s not obvious, and for magic numbers. Code should tell you what code does.
edit: can anyone spot the bug that I introduced with that parseEndDateFromString() method?
not my experience at all across 3 separate companies. Ime senior engineers are the highest level that still spends most of the day heads down most days, and that’s why I’m gonna stick it out at this level as long as I can.