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
TheBlackVegetable
Oct 29, 2006

CPColin posted:

java.util.Collections.reverse(list) :smug: no I refuse to explain how that method works

This is the correct answer though, right? What was required?

Adbot
ADBOT LOVES YOU

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

leper khan posted:

Though for string reversal explicitly I can make a pretty good guess.
Only for fixed-length encodings.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

TheBlackVegetable posted:

This is the correct answer though, right? What was required?

Demonstrating an understanding of how simple data structures, pointers/ references, and recursion works.

CPColin
Sep 9, 2003

Big ol' smile.
Yeah, if you gave that answer, they'd probably ask you to pretend that function doesn't exist and do it by hand.

a foolish pianist
May 6, 2007

(bi)cyclic mutation

Yeah, seems like a simple question to get you to talk through some different strategies for repeating processes, recursion vs. iteration.

Or just a way to avoid bothering with a 4-hour interview for someone who can't think of an algorithm to reverse a loving list, jesus.

TheBlackVegetable
Oct 29, 2006

Volmarias posted:

Demonstrating an understanding of how simple data structures, pointers/ references, and recursion works.

Yeah, I was joking a bit, and I have seen people struggle with Fizz-Buzz (because they immediately over- engineered it), I just wish interviews could come up with slightly more useful ways of demonstrating that stuff than things that will hardly arise during the development of their legacy CRUD app.

Clanpot Shake
Aug 10, 2006
shake shake!

TheBlackVegetable posted:

Yeah, I was joking a bit, and I have seen people struggle with Fizz-Buzz (because they immediately over- engineered it), I just wish interviews could come up with slightly more useful ways of demonstrating that stuff than things that will hardly arise during the development of their legacy CRUD app.

Did somebody say over-engineered fizzbuzz?

geeves
Sep 16, 2004


:stonk:

Space Kablooey
May 6, 2009


Holy poo poo they have a domain now.

Ghost of Reagan Past
Oct 7, 2003

rock and roll fun
I see that and raise you this

ChickenWing
Jul 22, 2010

:v:

CPColin posted:

Yeah, if you gave that answer, they'd probably ask you to pretend that function doesn't exist and do it by hand.


a foolish pianist posted:

Yeah, seems like a simple question to get you to talk through some different strategies for repeating processes, recursion vs. iteration.

Or just a way to avoid bothering with a 4-hour interview for someone who can't think of an algorithm to reverse a loving list, jesus.

Yes on both counts. We don't care that you can regurgitate library methods, we want to see you reason your way through a simple problem and be able to discuss it.


this continues to be among my favourite things on the internet

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Oh my god some of the pull requests

https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition/pull/271
https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition/pull/234

also the fact that they take PRs

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
The worst thing about working in this industry is that I see the value in the over engineering here.

geeves
Sep 16, 2004


The second one is my company at the moment (we're switching from maven to gradle and several people have said, why bother removing maven?)

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
The issues, too.

https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition/issues/297

Gildiss
Aug 24, 2010

Grimey Drawer
Another gem in the ESLinting mines.


code:

function(a,b){
    return (((typeof a.lastName === 'string' ? a.lastName.toUpperCase() : '') < (typeof b.lastName === 'string' ? b.lastName.toUpperCase) : '')) ? -1 : (((typeof a.lastName === 'string' ? a.lastName.toUpperCase() : '') > (typeof b.lastName === 'string' ? b.lastName.toUpperCase) : '')) ? 1 : 0));
}

Just because you can do something doesn't mean you should.

E: lol the blame shows this as being from one of the contracting teams tech leads.

Gildiss fucked around with this message at 20:30 on Jul 19, 2017

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Gildiss posted:

Another gem in the ESLinting mines.


code:

function(a,b){
    return 
(
  (
    (typeof a.lastName === 'string' ? a.lastName.toUpperCase() : '') <
    (typeof b.lastName === 'string' ? b.lastName.toUpperCase) : '')
  ) ? -1 : (
   (
    (typeof a.lastName === 'string' ? a.lastName.toUpperCase() : '') >
    (typeof b.lastName === 'string' ? b.lastName.toUpperCase) : ''
   ) ? 1 : 0
  )
);
}

Just because you can do something doesn't mean you should.

E: lol the blame shows this as being from one of the contracting teams tech leads.

I had to expand that to see what was even going on on mobile. That said, this feels like a minor horror. A slight refactor and you're on your way.

Unless the incorrect parenthesis for the toUpper call was intentional, in which case, yikes.

Rubellavator
Aug 16, 2007


I thought this whole repo was a parody

KoRMaK
Jul 31, 2012



Good code is stable maintainable code. Maintainable code is code that is obvious, and not clever. Clever is a novelty and will cost me hours of debugging later when theres a loving problem with it.

Eggnogium
Jun 1, 2010

Never give an inch! Hnnnghhhhhh!

Rubellavator posted:

I thought this whole repo was a parody

It is.

smackfu
Jun 7, 2004

I spent a good chunk of today writing unit tests for Spring configuration classes to improve our code coverage numbers. AMA.

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

New client, two weeks in and I submitted a PR.
Feedback received after a 3 day wait: "yeah, we don't do feature branches. If you think it is good enough, you just push to develop and we'll review it there."

Today I did a refresh of develop and merged it / rebased it with my local working branch. A bunch of merge conflicts later, the build was broken and complaining about dependencies.
One git blame later the dev told me: "it works on my machine."
"Did you upload your changes to nexus?"
"... I did now!"

But nooo, who needs feature branches and PR's? They just slow down our advanced development processes. Now that I am scrutinizing everything in my role as QA dev, it comes out there is lots of sloppy coding.

Looking forward to my summer holidays and we'll see what happens after that.

CPColin
Sep 9, 2003

Big ol' smile.

Keetron posted:

But nooo, who needs feature branches and PR's? They just slow down our advanced development processes.

This is the reasoning the designer of the Ceylon language uses when people call him out for committing broken, half-implemented changes straight to master. He whines that, if he had to do stuff in branches and do pull requests, it would slow him down. Meanwhile, everybody catches all these problems after he's committed that would have been spotted immediately, had he used a PR.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.
I'm sure it feels like it slows you down, but you can't sprint a marathon.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Keetron posted:

New client, two weeks in and I submitted a PR.
Feedback received after a 3 day wait: "yeah, we don't do feature branches. If you think it is good enough, you just push to develop and we'll review it there."

Today I did a refresh of develop and merged it / rebased it with my local working branch. A bunch of merge conflicts later, the build was broken and complaining about dependencies.
One git blame later the dev told me: "it works on my machine."
"Did you upload your changes to nexus?"
"... I did now!"

But nooo, who needs feature branches and PR's? They just slow down our advanced development processes. Now that I am scrutinizing everything in my role as QA dev, it comes out there is lots of sloppy coding.

Looking forward to my summer holidays and we'll see what happens after that.

:murder:

This is the workflow of someone who isn't used to having coworkers and/or used atomic locking.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Volmarias posted:

:murder:

This is the workflow of someone who isn't used to having coworkers and/or used atomic locking.

I don't usually work with others on projects, and feature branches still save me from myself.

KoRMaK
Jul 31, 2012



I had to have an hour long convo about how PRs and their documentation help bring clarity and stability to what would otherwise be chaos

"but they slow me down"

ugh yea, sure for a moment but its a loving investment into the future you numbskull. think about how much they will slow you down in the future and how disruptive the bugs will be that result from your poo poo

KoRMaK
Jul 31, 2012



leper khan posted:

I don't usually work with others on projects, and feature branches still save me from myself.

Very true, I do it with my hobby projects too where its just me drunk coding

Really, really, really helps drunk me

lifg
Dec 4, 2000
<this tag left blank>
Muldoon

KoRMaK posted:

"but they slow me down"

So does version control, dev environments, testing, release tagging, security, compiler warnings, passwords, locking your car door, wiping your rear end, and bathing.

Che Delilas
Nov 23, 2009
FREE TIBET WEED

lifg posted:

So does version control, dev environments, testing, release tagging, security, compiler warnings, passwords, locking your car door, wiping your rear end, and bathing.

Ask me about my revolutionary 10-step plan to speed up your whole life!

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
[mashes random keys on keyboard as quickly as his fingers will move]

BUT LOOK HOW MUCH MORE PRODUCTIVE I AM

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

smackfu posted:

I spent a good chunk of today writing unit tests for Spring configuration classes to improve our code coverage numbers. AMA.

Have you politely explained that code coverage is meaningless yet?

necrobobsledder
Mar 21, 2005
Lay down your soul to the gods rock 'n roll
Nap Ghost
Code coverage based around heuristics like functional complexity and known problem patterns similar to how FindBugs works is not useless. Basing around lines of code, however, is.

Also, I hope you enjoyed the land of bytecode injection and annotations-as-configuration. You also probably got the most out of code coverage by injecting values along the entire property resolution order of package resources and command line params than by exercising your configuration values themselves.

necrobobsledder fucked around with this message at 23:04 on Jul 20, 2017

baquerd
Jul 2, 2007

by FactsAreUseless

New Yorp New Yorp posted:

Have you politely explained that code coverage is meaningless yet?

At a previous position, I just told my manager we'd get him whatever numbers he needed. I then created a class with 10k loc and 100% coverage that did nothing and wasn't connected to anything. His bosses loved the code coverage numbers our team consistently delivered.

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

baquerd posted:

At a previous position, I just told my manager we'd get him whatever numbers he needed. I then created a class with 10k loc and 100% coverage that did nothing and wasn't connected to anything. His bosses loved the code coverage numbers our team consistently delivered.

There was one tool I tested for doing C++ code coverage where if you instrumented a templated function, the code coverage would count for every instantiation of the template - e.g. for

code:
template<typename T>
void f(T s)
{
...
}
Every single type passed in would be considered more lines of covered code.

So you could effectively make the code coverage whatever you wanted just through a bunch of macros.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

New Yorp New Yorp posted:

Have you politely explained that code coverage is meaningless yet?

Is it really? It's a bad thing if management mandates an arbitrarily amount--especially if they mandate 100%--but there are good reasons to run coverage metrics. If a file has 0% coverage, then the code in there is a risk or it's completely dead code. Either case is worth addressing to some extent.

Doom Mathematic
Sep 2, 2008
Enforcing 100% coverage can theoretically encourage people to hammer badly-structured spaghetti code into a more sensible, testable shapes.

On the other hand, people who cheerfully write very difficult-to-cover code are exactly the people who also cheerfully write individual unit tests eight times as long as the unit under test, so, the problem of "how to make bad coders produce good code" remains a mystery.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
Code coverage as a tool for finding code that you forgot to test is useful. Code coverage as a tool for forcing other people to do things is not.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
Goodhart's Law

Adbot
ADBOT LOVES YOU

Iverron
May 13, 2012

Oh my god open offices are the worst why does anyone willingly do this?

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