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
Xarn
Jun 26, 2015
I am probably gonna have to institute something similar.

Linux dev breaking build on Windows I can live with, thats what CI is for. Linux dev breaking build on Linux in super obvious way and still pushing that commit, I cannot. :v:

Adbot
ADBOT LOVES YOU

Xarn
Jun 26, 2015
I've spent enough time working on OSS projects to know that idiots will come and ask for help with unrelated stuff, and it doesn't matter where they are from.


I start twitching involuntarily upon mentions of Indian offshoring anyway :shrug:

Xarn
Jun 26, 2015

fantastic in plastic posted:

I think there's good points to most of those things, at least in the abstract.

Asking one question at a time is a good idea in general, because otherwise you risk overwhelming the other person.

From frequenting the general IT threads, I have a less charitable interpretation for the first advice:

One question per email, because average email user is somehow only capable of sending one answer in one email. Sometimes you even get a "yes" in response to multiple open-ended questions. :shrug:


Anyway, when used well, the other parts of the advice is pretty sane if you filter out insane bossman.

"Word it like he's not very bright" -- If you are communicating with someone on the outside, he does not know your jargon, he does not have your multiple years of context on the problem and so on. We are regularly giving similar advice when presenting a paper at a conference: "If you think your presentation is insulting the intelligence of your audience, dumb it down again, the absolute majority of them has not just spent X years working on the topic."

"don't ever list options" -- If you have multiple options beyond simple yes/no, listing them can lead to analysis paralysis and anchoring the answer. Maybe if you didn't provide options, the customers would come up with something saner and nicer.

As fantastic in plastic said, no reason not to be friendly though

Xarn
Jun 26, 2015

rt4 posted:

I don't really think codes of conduct are a good way to handle it (I prefer unapologetic surprise bans) but you've got to set a standard of behavior somehow or you end up with Twitter.

This is my problem with CoC: I feel like way too many people think "This project does not have CoC, its internal culture is poo poo" versus "This project has adopted CoC, all is good with the world", forgetting that the actually important part is enforcement of the rules. Without moderation, no amount of CoC can help.

Xarn
Jun 26, 2015

Shirec posted:

Speaking of Git, my team (almost entirely my boss) let branches get entirely out of hand, with what we were creating branches from, what production was, how old master is, and how insanely many branches we have (I think around 30?)

Now my boss is freaking out because a unit test is failing sporadically and is making us re-build all the work we did last week so we can get a clean sprint branch for master. We already knew some of the unit tests were borked and needed to be re-done, but lord.

He’s acting like he didn’t know any of this was happening either, he constantly says (when things go wrong) that he can’t be that down in the details and doesn’t know it if we don’t bring it up

edit: make that 50-60 branches

code:
$ git branch | wc -l
47
I am really about deleting local branches when I don't need them anymore :v:

Xarn
Jun 26, 2015
:suicide:

Xarn
Jun 26, 2015

Shirec posted:

Again, I might be being unfair

lol, no you aren't

Xarn
Jun 26, 2015
Our current coverage is ~97%, and we have our CI set to reject commits that would either decrease the coverage by more than 1%, or commits that are less than 90% tested.

Xarn
Jun 26, 2015
Why what?

But yeah, we are doing research into master-key systems solver and we don't have to deal with too much boilerplate, at least compared to lines that do things.

Xarn
Jun 26, 2015

strange posted:

"Why is it mandated to such a high%?" as a genuine question. Most projects I've joined struggle to get anywhere near that.

The answer to a project that has <70% is pretty easy:

:yikes:

Remember that if you have a ton of trivial data holders, you can just exclude those from coverage if it comes that far. (Or don't give them setters/getters and make those fields public, as god intended)

Xarn
Jun 26, 2015
I should try that, right now I just bin those emails.

Xarn
Jun 26, 2015

Xarn
Jun 26, 2015

Bongo Bill posted:

The investors want someone who will lie to them - and I stress that any attempt to forecast the timeline of an immature project farther than a few weeks is a lie - and you are going to set yourself up for abuse if you agree to become that person.

That reminds me, we gave a week-to-week plan for the next year and a half recently, on something that is in the process of being actively researched :suicide:

Xarn
Jun 26, 2015
There is a reason why the testing framework I maintain can report failure when there were no asserts run :v:

Xarn
Jun 26, 2015
There is not much to do once you start assuming malicious intent :shrug:

Xarn
Jun 26, 2015

Murrah posted:

The app is a PHP Symfony app

Found your problem :v:

Murrah posted:

There are no automated tests or anything like that

Murrah posted:

and I just instinctively felt like I was at risk of introducing several bugs for every change I was making

Murrah posted:

Im just left with the sinking feeling that there will certainly be more bugs and some that won't get discovered until production.

You can pretty much bet on it. And as to whether it will be held against you, that depends on the culture at your company... I wanna say no, because they should understand that PHP app without any test is a crazy minefield, but then, they weren't smart enough not to have a PHP app without tests :shrug:

Xarn
Jun 26, 2015

Ape Fist posted:

If you're working with Ligatures turned on, are you even a real developer?

FTFY

Xarn
Jun 26, 2015

Ape Fist posted:

You are a hiring manager whose also a dev. You can hire one of these people:

Person 1: Has a strong grasp of theory, understands software design concepts quickly, but spends an above average amount of time on stack because they tend to forget syntax things. As a result their code is sometimes untidy, an not ideally optimized.

Person 2: Is extremely good at syntactical recollection, writes clean and efficient code which compiles nicely most times through repetition, but absolutely can't grasp design structures or really any of the theory outside the 'local scope' of what he's working on.

Is there a person 3 with managerial skills?

Xarn
Jun 26, 2015

Pedestrian Xing posted:

I've written for platforms that don't support any sort of testing and it's horrible. I'm very pro testing, I just don't like writing pointless ones to get coverage back to X% because another dev wrote a 400 line function with no coverage for the third time this sprint.

How did it get into master? Are you one of those shops that don't do reviews before merge? :suicide:

Fundamentally, coverage is there to help guide people acting in good faith. If you have programmers who act in bad faith, just loving fire them.

Xarn
Jun 26, 2015

Protocol7 posted:

Unless you work at my company where it can take weeks to hire a candidate (and the candidates usually find another position while they wait), so they don't fire any of the programmers they do have, even if they are grossly incompetent.

I have never seen such poorly formatted and clearly copy-pasted from StackOverflow style code in a production application until I worked with some of the developers on my scrum team. But beyond raising my concerns in a code review and talking to my manager about it, I can't really do anything else.

Until an eventual bug is filed in the code and I get to refactor it, of course.

In good news they gave me two 10+ percent raises this year, which makes it a lot easier to deal with the BS, since now I can afford more whiskey.

Well then, don't work there :v:

Seriously though, if I am interviewing and the company doesn't have a good answer to "do you have a CI and what are you criteria for failing a commit/merging a PR", I keep looking.

Xarn
Jun 26, 2015
Arbitrary nesting you say? Well I have something for you :v:
https://github.com/catchorg/Catch2/blob/master/docs/tutorial.md#test-cases-and-sections

Xarn
Jun 26, 2015
No vacations, duh.

Xarn
Jun 26, 2015

Faith For Two posted:

He also doesn't like how any of the C++ testing frameworks work so I'm rolling my own. I thought google test would meet all our requirements but he doesn't like working with xml our json output.

Sorry for your loss.

Xarn
Jun 26, 2015
That's quite the name + content combo

Xarn
Jun 26, 2015

Kevin Mitnick P.E. posted:

Things that matter, in order:

  1. Documentation
  2. Functionality
  3. Consistency
  4. Correctness

Things that don't matter:

  • URL structure
  • Signalling errors in the status code or response body
  • Content type
  • HTTP verbs lining up with semantics


Assuming the documentation is up to snuff, this is a good API.

How does it feel to be so wrong? :v:

Xarn
Jun 26, 2015
Returning

code:
200 OK

{ status : lol gently caress you, wrong auth }
should be a stabbable offense.

Same goes for POSTing to a GetFoo endpoint to get information about Foo and other "well documented" stupidities.

Xarn
Jun 26, 2015

Protocol7 posted:

I got a recruiter email with the subject "Alexa, find me a Jedi Master level software engineer".

I typically just ignore recruiters, but in this case I was almost going to reply and tell them to gently caress off with that cringy bullshit. It turns out, though, that it was from an actual Amazon recruiter looking for people to work on Alexa, so it kind of makes sense. I kind of laughed after I realized that.

I categorically refuse to work with people who think that these are cool.

Xarn
Jun 26, 2015

Subjunctive posted:

Wait, pagerank was ML? What decision changed over time? I haven’t read the paper in a while (and AIUI Google’s ranking has never actually been what’s in the paper), but I recall it being a deterministic algorithm independent of previous inputs.

Which part of that do you think is incompatible with ML?

Xarn
Jun 26, 2015
Are you from the right in group?

Xarn
Jun 26, 2015
For real though, so far about half of the people we've interviewed at new job could use a class that taught them how to deal with stress. We don't have particularly high-stress interview process (no whiteboarding, we chat about your previous work experience and ask for some details on those), but still about half of the people are all frozen up at the beginning.

Xarn
Jun 26, 2015
Nah, organizations usually have a lot of documentation.

There is one set of documentation in the confluence, one in the dokuwiki, one in the repository and the last one of them was updated years ago :suicide:

Xarn
Jun 26, 2015

Volmarias posted:

If you don't have a code review system in TYOOL 2019 you need to find a different employer
This.


There are definitely changes we don't review, but I can't imagine not having a review process for non-trivial changes.

Xarn
Jun 26, 2015
I am not saying you shouldn't test your changes before yoloing them into prod (WTF????), but yes, fixing spelling of poo poo in logs does not need review.

Xarn
Jun 26, 2015
There are edge cases where merging buggy code is ok, but please do not merge it without a set of tests that shows exactly when it fails, and add a documentation of why it is ok for it to fail like that.

Xarn
Jun 26, 2015
Goddamn, where do you keep finding these terrible jobs?

Xarn
Jun 26, 2015

Pollyanna posted:

Thankfully I’m not really the one that has to deal with that mess. I’m just taking over during the holiday week. But if they want to put me in that position permanently...hell naw.

I originally made that post as a response to your normal day job :v:

Xarn
Jun 26, 2015
:hmmyes:

Xarn
Jun 26, 2015

Pedestrian Xing posted:

The pre-commit checker doesn't stop this but it does stop me from pushing anyone else's commits so I can't even restore all the missing work. This is a recurring issue with a few developers. Nothing like coming in in the morning and seeing a week's worth of work gone.

Recurring? RECURRING?

You need to either fire them or murder them.

Xarn
Jun 26, 2015

necrobobsledder posted:

I’ve accidentally force pushed to a shared branch because I was in the “can force push to master” users. Thankfully I didn’t regularly gc and was able to recover from the reflog but our Jenkins jobs went nuts for a while and I had to clean up our environments as code from a month ago was pushed to our dev and staging environments. This is why production pushes should always be tag-based rather than HEAD based at smaller scale of teams where ACLs can be pretty loose.

--force-with-lease motherfuckers

Adbot
ADBOT LOVES YOU

Xarn
Jun 26, 2015

vonnegutt posted:

I try to do this as well, and I find it works best when the work is well-defined and straightforward. Other times, it starts well and then turns into 'wip refactoring' ... 'wip undoing refactoring' ... 'wip try again' ... 'wip ugh' and then several 'fix tests' or 'tidy' commits at the end. I find this is especially the case when doing things like upgrading frameworks or deployments. Not every task can be broken into a orderly progression of commits. Further complicating matters, in order to work out things like CI pipelines, sometimes you need to commit just to trigger some post-commit action.

Still, I totally agree that doing one giant commit for each PR is a nightmare.

I find it exceedingly rare to end up in situation where I cannot make good commits even after I am done with the work.

E.g. right now, I am hacking in a prototype of functionality we will need in September, and as it turns out, it is a lot more involved feature than it seemed at first look. This has led to multiple commits along the lines of "WIP: first scaffolding for Butts feature", and "completely refactoring Butts", but I know I can rebase and combine these into a coherent story at the end. There are also some commits that I will split off into separate independent PR, because they improve the code independently of the Butts feature, and they are complete and well-defined too.

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