Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
elite_garbage_man
Apr 3, 2010
I THINK THAT "PRIMA DONNA" IS "PRE-MADONNA". I MAY BE ILLITERATE.

barkbell posted:

i suck at programming I cant believe someone hired me lol

club dues are to be paid the first of the month

Adbot
ADBOT LOVES YOU

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

Nomnom Cookie posted:

i'm not, but how could that possibly matter

you seem to care a lot about letting lovely code slide when you are providing it as a product

Nomnom Cookie
Aug 30, 2009



CRIP EATIN BREAD posted:

you seem to care a lot about letting lovely code slide when you are providing it as a product

that isn’t at all what I’ve been talking about but it’s mildly interesting that you think it is

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Nomnom Cookie posted:

that isn’t at all what I’ve been talking about but it’s mildly interesting that you think it is

I like that you're providing criticism in a polite and effusive way in this thread, giving an example to everyone of how Crip's direct approach is actually much better overall.

Nomnom Cookie
Aug 30, 2009



Jabor posted:

I like that you're providing criticism in a polite and effusive way in this thread, giving an example to everyone of how Crip's direct approach is actually much better overall.

i mean, if telling people not to be assholes actually worked then i guess you'd have a point. but it doesn't work and the only purpose served is my own enjoyment

Qtotonibudinibudet
Nov 7, 2011



Omich poluyobok, skazhi ty narkoman? ya prosto tozhe gde to tam zhivu, mogli by vmeste uyobyvat' narkotiki

CPColin posted:

Sure, but this is a vendor we're talking about here, so gently caress 'em

problem is, on the vendor end, the people you're being an rear end in a top hat to are quite possibly already keenly aware of the issue, the hosed up dev process that led to it, and the futility of trying to get it fixed. you're the latest in a long string of customers who've encountered the issue, gotten (rightfully) upset, and taken out their frustrations on the first support rep they come across. these people will then dutifully go and raise the issue with engineering again, who will ignore the 5000 customer reports attached in favor of focusing development effort on shiny new features either dreamed up by marketing or declared critical to landing some sale (where, inevitably, the requester is some middle management goon that has no idea how to solve their problems effectively and demands something that doesn't actually solve the problem, which will be implemented and then never used because it's garbage).

more succinctly, the lovely product is a result of broader vendor dysfunction. yelling at whoever takes your tickets probably isn't going to fix this, it's just going to make that person feel lovely. blast the company on social media instead. write a detailed takedown of why they're poo poo and submit it to hn. this circumvents the insulating layer of the vendor's middle management who toss customer complaints in the trash while presenting a rosy picture to senior execs in hopes of bullshitting their way up the corporate ladder.

this is maybe not the case here--it looks like this is custom development of some sort, probably by a smaller shop that cares less about social media. in that case, fire them and find a new dev shop. if your management isn't willing to pay for a competent dev shop, idk, accept that you're going to get poo poo work and piss in your boss' coffee. yelling at bottom-barrel contractors isn't going to make them better programmers either: there's a reason they haven't left for a better shop.

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
the problem is that its hardware, and nobody offers this particular device for what we need.

in the end, ill keep sending mean emails with the exact instructions showing them how to fix their bullshit until they do. i don't give a gently caress about them, i just want to ship the new hardware so someone who needs to rely on it doesnt die in the field.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
where I could say "hi this doesn’t work please fix it here is a suggested fix" I instead say "dear incompetent dipshits this won’t work gently caress you copy and paste this you utter imbeciles" because I am a professional

floatman
Mar 17, 2009
If you're nasty enough on all your pull request reviews whenever there's poo poo code sooner or later you won't see any poo poo code to review because people will go around you in the PR process and the poo poo code will go straight into the repo without you knowing until it bites you on the rear end one day.

Soricidus
Oct 21, 2010
freedom-hating statist shill
lol if your code review comments are distinguishable from your yosposting

:negative: and :psyduck: are to be used liberally and without further explanation

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
i added both of those to both slack and our phabricator setup

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
also added a web hook so replying "poo poo sucks" in response to PR notifications in slack auto rejects them

Progressive JPEG
Feb 19, 2003

if something needs fixing in a PR i usually point it out in the form of a question

like "it looks like this code doing X will conflict with the other code doing Y at line 219, is that expected?"

sometimes they actually have a reason for it to be that way, but usually not

but in either case putting it as a question turns it into something for them to investigate and see if something is actually an issue

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER


floatman posted:

If you're nasty enough on all your pull request reviews whenever there's poo poo code sooner or later you won't see any poo poo code to review because people will go around you in the PR process and the poo poo code will go straight into the repo without you knowing until it bites you on the rear end one day.

just lol if you don't have tight control of codeowners

Qtotonibudinibudet
Nov 7, 2011



Omich poluyobok, skazhi ty narkoman? ya prosto tozhe gde to tam zhivu, mogli by vmeste uyobyvat' narkotiki
my code review story:

there is a function. under certain conditions, it throws an exception, fatally interrupting request processing. we understand the cases where it does so quite well, and know that it only does so when it's not possible to provide the data the function should return because it doesn't and can't possibly exist (e.g. trying to get the sales tax paid before anything has been purchased).

our application reasonably cannot do anything in this scenario, but the impact of doing nothing is minor. ultimately, we lose some diagnostic data because we can't know if a user requested we provide it, and the tradeoff for collecting it anyway is additional latency across the board. the diagnostic data we lose almost never matters--most of the diagnostic data we care about is generated later. furthermore, not handling the exception in any fashion means that EVERY SINGLE loving REQUEST FAILS if you enable the diagnostic data feature.

in response to our having released a feature that would break everything our product is supposed to do if users enabled it, i proposed a hotfix that would wrap the function in a try-catch, discard the errors, and assume a negative result. this was accompanied by some comments explaining the failure case and why we basically didn't care about any more complex error handling.

enter pedant. pedant is a very 10x engineer type who implemented this feature, railroaded it through code review, and then hosed off to another department before it saw any use in the wild. to his credit, the feature is invaluable in some situations, and it probably wouldn't have been implemented without his volunteering (because our product managers can't comprehend why "diagnostic capabilities" or "stability" might be desirable for infrastructure software). but i digress.

pedant is vehemently opposed to exceptions as control flow. this is an anti-pattern. an affront to god. never mind that we basically know exactly when these exceptions can occur or, even if we don't, that we basically don't care because losing diagnostic data is ALWAYS preferable to interrupting the entire request. it's simply not acceptable, not even as a stopgap: if we put a simple fix in place now, what incentive do we have to implement that absolute most perfect possible fix in the future? it simply won't do. keep in mind that said pedant originally did this as a side project, and has since moved to another department, so there's realistically no incentive for anyone to do anything with this codebase, since nobody will ever want to take on additional work in the form of "fix someone else's half-baked MVP" and engineering management has no interest in prioritizing maintenance work ever.

the try-catch is ultimately replaced with an explicit enumeration of the known failure conditions, which is currently functionally equivalent despite being more verbose and contingent on third-party libraries never introducing new failure conditions. this satisfies pedant, the PR is merged, and everyone is happy because they can no longer bring down half their production network by enabling diagnostics.

anyway, two months later im tracking down a bug in the same feature (again, wholly written by pedant). turns out we handle one failure case but not something that immediately proceeds from it. the first part of the failure case is handled by a try-catch that discards all errors without further action, and there isn't even a comment as to why.

redleader
Aug 18, 2005

Engage according to operational parameters

barkbell posted:

i suck at programming I cant believe someone hired me lol

Xarn
Jun 26, 2015
That ending :discourse:

redleader
Aug 18, 2005

Engage according to operational parameters

Jabor posted:

I like that you're providing criticism in a polite and effusive way in this thread, giving an example to everyone of how Crip's direct approach is actually much better overall.

please respect the opinions of the alpha 10x engineer CRIP EATIN BREAD

Soricidus
Oct 21, 2010
freedom-hating statist shill
reminder that the value of x in “10x developer” has an upper bound of 0.1, and no lower bound

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice

Cold on a Cob posted:

this is policy at my job

1 commit per pr and 1 pr per work item

idgaf and do multiple commits anyway

delayed reply but i didn't mention the best part - all commits are named after the jira item with no context whatsoever

so "PROJ-123: <Title of item in Jira>" for example

so i will generally have three or four commits with the same commit message lol

(we have a field in jira where you're supposed to write a summary of your changes but nobody ever does)

Platystemon
Feb 13, 2012

BREADS
Parsing the FAA’s wind forecasts:

Wind direction and speed get a four‐digit block.

The first two are magnetic azimuth, in tens of degrees. The latter two are speed in knots.

Wind ten degrees west of south at ninety‐nine knots would be 1999.

But wait! What if the wind speed crosses a hundred knots?

I’m glad you asked.

In that case, you subtract a hundred from the wind speed and add fifty to wind direction.

Let’s say the wind direction is still the same, and now it’s a hundred and sixty‐nine knots. Now it’s denoted with 6969.

Wind data can also be encountered six‐digit groups. Surely this must be giving three digits to each component, right?

Wrong. The wind digits are unchanged. Temperature just got appended to it. 696969 is wind ten degrees west of south, blowing a hundred and sixty‐nine knots, with ambient air temperature of sixty‐nine degrees Celsius.

Sixty‐nine degrees Celsius is an unreasonably high temperature. You’d never see it in a real forecast. Except you might, because negative sixty‐nine degrees can be seen at altitude.

That raises the question “how are negative and positive temperatures differentiated?”

Oh. That’s easy. Negative temperatures have a minus sign in front of them. So that 696969 should really be 6969-69.

…except when it isn’t, because the preface to the forecast informed you that all temperatures above FL240 were below zero so they would be omitting all the signs.



What a sensible system.

e: Swapped with Alaska’s chart that has at least one sixty‐nine temperature in it. If there were any positive temperatures, they have plus signs, as seen below in the chart for Colorado and nearby states.

Platystemon fucked around with this message at 15:28 on Dec 19, 2019

mystes
May 31, 2006

Platystemon posted:

Parsing the FAA’s wind forecasts:

Wind direction and speed get a four‐digit block.

The first two are magnetic azimuth, in tens of degrees. The latter two are speed in knots.

Wind ten degrees west of south at ninety‐nine knots would be 1999.

But wait! What if the wind speed crosses a hundred knots?

I’m glad you asked.

In that case, you subtract a hundred from the wind speed and add fifty to wind direction.

Let’s say the wind direction is still the same, and now it’s a hundred and sixty‐nine knots. Now it’s denoted with 6969.

Wind data can also be encountered six‐digit groups. Surely this must be giving three digits to each component, right?

Wrong. The wind digits are unchanged. Temperature just got appended to it. 696969 is wind ten degrees west of south, blowing a hundred and sixty‐nine knots, with ambient air temperature of sixty‐nine degrees Celsius.

Sixty‐nine degrees Celsius is an unreasonably high temperature. You’d never see it in a real forecast. Except you might, because negative sixty‐nine degrees can be seen at altitude.

That raises the question “how are negative and positive temperatures differentiated?”

Oh. That’s easy. Negative temperatures have a minus sign in front of them. So that 696969 should really be 6969-69.

…except when it isn’t, because the preface to the forecast informed you that all temperatures above FL240 were below zero so they would be omitting all the signs.



What a sensible system.
Man, Advent of Code is really annoying this year.

But seriously, I feel like everything was like that before people started using xml/json/protobuf, because inevitably everyone will try to stuff the data in as few bits as possible even if it's a total waste of time.

mystes fucked around with this message at 15:14 on Dec 19, 2019

Platystemon
Feb 13, 2012

BREADS
It fits in seventy sixty‐nine columns, which I suppose is something nice.

Through the extremely scientific approach of Googling "TEMPS NEG ABV 18000" and "TEMPS NEG ABV 30000", I learned that the formatting breakpoint does appear to stay at the same place.

e: OBOE

Platystemon fucked around with this message at 15:44 on Dec 19, 2019

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


gently caress I can't remember why I started refactoring this instance method into a static one

Edit: no wait I remember it was because I wanted to add one bool to the goddamn class and the pile of poo poo fart.Get() process used hard coded references to column ids in a data reader so you could only ever append columns with zero logical ordering

Powerful Two-Hander fucked around with this message at 18:06 on Dec 19, 2019

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.
because it doesn't depend on any instance data?

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


prisoner of waffles posted:

because it doesn't depend on any instance data?

this is another hangover of someone's obsession with having every single class be populated by calling a get method on its own instance.

you couldn't just return new fart(ID), you had to instance a fart, set the id property (no constructors either) and then call the get method

i hate it and it doesn't work well with Dapper. also bonus points for the property names not always matching with the column names in any logical manner

jesus WEP
Oct 17, 2004


Powerful Two-Hander posted:

this is another hangover of someone's obsession with having every single class be populated by calling a get method on its own instance.

you couldn't just return new fart(ID), you had to instance a fart, set the id property (no constructors either) and then call the get method

i hate it and it doesn't work well with Dapper. also bonus points for the property names not always matching with the column names in any logical manner
i don't understand what this means and i can't figure out if it's because i'm dumb or what you're describing is dumb

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


jesus WEP posted:

i don't understand what this means and i can't figure out if it's because i'm dumb or what you're describing is dumb

it's all of the above

basically everything with this class had been implemented like this:

code:

int id =1234;

var butt = new Butt() ;
butt.id = id ;

butt.get();

return butt;


but oh no we need to use these objects a lot in the controller and that's a lot of boilerplate, I know let's just add a generic protected butt and use it so that the get method and others can be called whenever we need it! sure hope you never forget which butt you're using or you might get a load of unpopulated properties and null reference errors!

leftist heap
Feb 28, 2013

Fun Shoe
wait what

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.
wait what
in the butt

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

Powerful Two-Hander posted:

it's all of the above

basically everything with this class had been implemented like this:

code:
int id =1234;

var butt = new Butt() ;
butt.id = id ;

butt.get();

return butt;

but oh no we need to use these objects a lot in the controller and that's a lot of boilerplate, I know let's just add a generic protected butt and use it so that the get method and others can be called whenever we need it! sure hope you never forget which butt you're using or you might get a load of unpopulated properties and null reference errors!

wtf does butt.get() actually do? It's pulling values from a DataReader and populating the butt props? Oh I think I get it, this was someone's bright idea to abstract away database queries by making them side effects of .get()?

Yeah, sounds bad, OP.

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


Finster Dexter posted:

wtf does butt.get() actually do? It's pulling values from a DataReader and populating the butt props? Oh I think I get it, this was someone's bright idea to abstract away database queries by making them side effects of .get()?

Yeah, sounds bad, OP.

bingo

it's confusing as gently caress to deal with

jesus WEP
Oct 17, 2004


Powerful Two-Hander posted:

bingo

it's confusing as gently caress to deal with
yeah that’s loving terrible

honestly if i saw a class had a parameterless instance method just called “get” i’d expect it to return itself for some reason. like idk why you would want that but i think that would be the sensible expectation

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


jesus WEP posted:

yeah that’s loving terrible

honestly if i saw a class had a parameterless instance method just called “get” i’d expect it to return itself for some reason. like idk why you would want that but i think that would be the sensible expectation

i know what you mean, it's like it's internally consistent but just consistent at being bad

Soricidus
Oct 21, 2010
freedom-hating statist shill
today’s bug turned out to be because java has both FileNotFoundException and NoSuchFileException, and of course some things throw one and some things throw the other and neither is a subclass of the other and you have to just know which bits of the standard library use each.

I know why things ended up this way but it’s still a terrible place to have ended up

Shaggar
Apr 26, 2006

Powerful Two-Hander posted:

it's all of the above

basically everything with this class had been implemented like this:

code:
int id =1234;

var butt = new Butt() ;
butt.id = id ;

butt.get();

return butt;

but oh no we need to use these objects a lot in the controller and that's a lot of boilerplate, I know let's just add a generic protected butt and use it so that the get method and others can be called whenever we need it! sure hope you never forget which butt you're using or you might get a load of unpopulated properties and null reference errors!

this is basically how entity framework works and its the loving worst thing ever.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
it's like "i thought about lazy evaluation but then decided to say gently caress it"

leftist heap
Feb 28, 2013

Fun Shoe
don’t roll your own lovely orm

Bloody
Mar 3, 2013

Powerful Two-Hander posted:

it's all of the above

basically everything with this class had been implemented like this:

code:
int id =1234;

var butt = new Butt() ;
butt.id = id ;

butt.get();

return butt;

but oh no we need to use these objects a lot in the controller and that's a lot of boilerplate, I know let's just add a generic protected butt and use it so that the get method and others can be called whenever we need it! sure hope you never forget which butt you're using or you might get a load of unpopulated properties and null reference errors!

holy poo poo what the gently caress I hate this so much

Adbot
ADBOT LOVES YOU

matti
Mar 31, 2019

Soricidus posted:

that’s probably ok if that’s the license you want!

for a short license like that with a bunch of variations you should really consider putting the license text in every file though to avoid any risk of ambiguity. your ide should have features to manage it for you (so you don’t have to copy-paste or update things by hand in a bunch of places) and to hide that kind of boilerplate by default (so you don’t have to stare at it every time you open a file) at which point it’s basically transparent and not nasty at all.

ah see but i'm a moron and use vi

i'll probably just bite the bullet and use the lawyer vetted option just to make it easier for any potential packagers

matti fucked around with this message at 00:58 on Dec 20, 2019

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply