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
Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

Subjunctive posted:

Reflection isn't inherently horrible.
Obviously not, but to use it to expose methods like that…

Adbot
ADBOT LOVES YOU

HFX
Nov 29, 2004
Speaking of Java horrors today:

code:
  public static String getVerifiedString(final Object docValue) {
    if (docValue != null) {
      return (String) docValue;
    }
    return null;
  }

Mogomra
Nov 5, 2005

simply having a wonderful time

necrotic posted:

Not to mention that wasn't variable variables. Variable variables are things like:

PHP code:
$poop = 'gently caress';
$$poop = 'dick';
$gently caress == 'dick';

That's a feature. :colbert:

Munkeymon
Aug 14, 2003

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



ohgodwhat posted:

I would love to hear about the bad interviews I'm sure some of you have had. :)

"I like PHP more than C because you don't have to declare the variables."

That was the other guy they were interviewing for the position. Guess who got the offer :smuggo:

1337JiveTurkey posted:

C'mon it's the 21st century, obviously it's a @Inject @EnterpriseAsFuck Provider<ProblemFactory>

That's my fault for not keeping up with the state of Java, I guess

Munkeymon fucked around with this message at 21:04 on Jul 24, 2014

canis minor
May 4, 2011

necrotic posted:

Not to mention that wasn't variable variables. Variable variables are things like:

PHP code:
$poop = 'gently caress';
$$poop = 'dick';
$gently caress == 'dick';

If you use it purely as ${$var} then it's quite awful.

If you use it as $object->{$var} then yes, there're legitimate uses for it. Sorry, it's been a long day and I just looked at http://php.net/manual/en/language.variables.variable.php

Sagacity posted:

Obviously not, but to use it to expose methods like that…

I wouldn't use it to expose all methods...

EAT THE EGGS RICOLA
May 29, 2008

Munkeymon posted:

"I like PHP more than C because you don't have to declare the variables."

That was the other guy they were interviewing for the position. Guess who got the offer :smuggo:

I think I would walk out if I showed up to an interview and there were multiple candidates there.

Azerban
Oct 28, 2003



EAT THE EGGS RICOLA posted:

I think I would walk out if I showed up to an interview and there were multiple candidates there.

yeah that's tacky as poo poo

spread them out by an hour, gently caress

Westie
May 30, 2013



Baboon Simulator

Subjunctive posted:

Reflection isn't inherently horrible.

I love PHP's reflection capabilities, makes things so much cleaner.

But then again, my custom framework turns all controllers/routers into closures irrespective of what they are (functions, methods, closures) and executes them as a closure.

Perhaps I'm the horror?

Munkeymon
Aug 14, 2003

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



Azerban posted:

yeah that's tacky as poo poo

spread them out by an hour, gently caress

I'm under the impression that that's pretty normal in the corporate world, especially for a junior position? It also makes sense to me because it was a multi-round interview, so the interviewees and interviewers were all occupied for the same length of time and the interviewers get a more direct comparison between the candidates that way.

Soricidus
Oct 21, 2010
freedom-hating statist shill

Westie posted:

I love PHP...

Perhaps I'm the horror?
Don't worry, it's not terminal. You can beat this. We're all rooting for you.

Westie
May 30, 2013



Baboon Simulator

Soricidus posted:

Don't worry, it's not terminal. You can beat this. We're all rooting for you.

Well, what else is there?

Eleeleth
Jun 21, 2009

Damn, that is one suave eel.

Westie posted:

Well, what else is there?

Literally anything else.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang




Java code:
while (true) {
  try {
    MainApplicationFactory.create().getInstance().run();
  } catch (Throwable t) {
    // lol who cares
  }
}

shrughes
Oct 11, 2008

(call/cc call/cc)

necrotic posted:

We had one guy come in and say "I'm not writing any code, you have my resume" after we asked him to write a basic algorithm (flatten an array or something similar).

The real horror is that you didn't ask him to write code on the phone screen.

FamDav
Mar 29, 2008

Munkeymon posted:

I'm under the impression that that's pretty normal in the corporate world, especially for a junior position?

Nope

ShadowHawk
Jun 25, 2000

CERTIFIED PRE OWNED TESLA OWNER

EAT THE EGGS RICOLA posted:

I think I would walk out if I showed up to an interview and there were multiple candidates there.
Err what if the overachieving dude after you showed up really early?

BigRedDot
Mar 6, 2008

ShadowHawk posted:

Err what if the overachieving dude after you showed up really early?

Their problem? That's no reason to start a group interview.

ShadowHawk
Jun 25, 2000

CERTIFIED PRE OWNED TESLA OWNER

BigRedDot posted:

Their problem? That's no reason to start a group interview.
I may have been misinterpreting what "other candidate was there" meant.

Mogomra
Nov 5, 2005

simply having a wonderful time

Westie posted:

I love PHP's reflection capabilities, makes things so much cleaner.

But then again, my custom framework turns all controllers/routers into closures irrespective of what they are (functions, methods, closures) and executes them as a closure.

Perhaps I'm the horror?

You can't just say that and not post code. Is it on Github or Bitbucket or something? Come on.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



ShadowHawk posted:

I may have been misinterpreting what "other candidate was there" meant.

Presumably the other candidate was there for the next/prior interview. Assuming he arrived at whatever time they agreed on, that means they are going over/under time. Implies a lack of realistic planning. Better not work there, their poo poo is outta control.

QuarkJets
Sep 8, 2008

EAT THE EGGS RICOLA posted:

I think I would walk out if I showed up to an interview and there were multiple candidates there.

Azerban posted:

yeah that's tacky as poo poo

spread them out by an hour, gently caress

Strategy for getting hired: get a few of your friends to masquerade as interview candidates and hang around outside of the building all day. Have them strike up conversations with people who look like they're there for a job interview, saying things like "yeah they gave us the wrong time to show up and it sounds like they're running late, too"

TheresaJayne
Jul 1, 2011

necrotic posted:

We had one guy come in and say "I'm not writing any code, you have my resume" after we asked him to write a basic algorithm (flatten an array or something similar).

I must agree though its annoying, They have seen your resume and all the companies you have worked for as a developer (about 10 in my case) and they have verification of your Oracle OCA SE7 certificate and they still want to see you write "FIZZ BUZZ" in a TDD way.

and then make you work a 9 month probation because "Thats what probation is for... To see if you can actually do the job"

<rant> SO WHY DID I HAVE TO PROVE I COULD DO THE JOB IN THE FIRST PLACE.... </rant>

ShadowHawk
Jun 25, 2000

CERTIFIED PRE OWNED TESLA OWNER

Snapchat A Titty posted:

Presumably the other candidate was there for the next/prior interview. Assuming he arrived at whatever time they agreed on, that means they are going over/under time. Implies a lack of realistic planning. Better not work there, their poo poo is outta control.
I'm not sure that's a good assumption. People show up early for job interviews all the time. Another candidate arriving early is not your (or the company's) fault.

het
Nov 14, 2002

A dark black past
is my most valued
possession

TheresaJayne posted:

and then make you work a 9 month probation because "Thats what probation is for... To see if you can actually do the job"

<rant> SO WHY DID I HAVE TO PROVE I COULD DO THE JOB IN THE FIRST PLACE.... </rant>
I mean, it's because interviews are brief and can be deceptive. We've definitely had hires where they seemed to interview well but ultimately couldn't back it up. That said, I think the probation thing is more about taking advantage of the employees wherever the company can, but I don't think the concept is entirely unfounded.

edit: obviously if we hire someone who isn't what we thought, that's a failure of hiring processes, and they should be improved, but a failsafe in that situation is worth having

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

TheresaJayne posted:

I must agree though its annoying, They have seen your resume and all the companies you have worked for as a developer (about 10 in my case) and they have verification of your Oracle OCA SE7 certificate and they still want to see you write "FIZZ BUZZ" in a TDD way.

and then make you work a 9 month probation because "Thats what probation is for... To see if you can actually do the job"

<rant> SO WHY DID I HAVE TO PROVE I COULD DO THE JOB IN THE FIRST PLACE.... </rant>

Have you never encountered or heard about a hire that ended up being totally unqualified? There are people who can fart their way through school and years of work and come out with a 3.5+ GPA and a nice looking resume, while not being able to code/problem solve their way out of a paper bag. Coding interviews are a sanity check on your credentials, along with probationary periods (though 9 months sounds excessive?).

TheresaJayne
Jul 1, 2011

ultramiraculous posted:

Have you never encountered or heard about a hire that ended up being totally unqualified? There are people who can fart their way through school and years of work and come out with a 3.5+ GPA and a nice looking resume, while not being able to code/problem solve their way out of a paper bag. Coding interviews are a sanity check on your credentials, along with probationary periods (though 9 months sounds excessive?).

The company had a large Call Center operation and everyone in the company was subject to the 9 month ruling.

I personally also had a 3 month probation as well because i hadnt been doing .NET for a bit.
(I passed that at the end of Month 1 because it was obvious i could do the job. )

Unfortunately I went on holiday for a week and when i came back the Lead Dev had quit, the Senior Dev also had quit, and 3 of the other devs had quit, and the Dev Manager was leaving....

I was not allowed into the office and just taken to an external area and given all my stuff and told - you don't have a job here bye.

Westie
May 30, 2013



Baboon Simulator

TheresaJayne posted:

Unfortunately I went on holiday for a week and when i came back the Lead Dev had quit, the Senior Dev also had quit, and 3 of the other devs had quit, and the Dev Manager was leaving....

I was not allowed into the office and just taken to an external area and given all my stuff and told - you don't have a job here bye.

:allears: Your ex-employers sound nice.

Nothing wrong with PHP btw, it's just most people's first language learned, therefore an entire internet of poo poo examples exist.

zergstain
Dec 15, 2005

eithedog posted:

If you use it purely as ${$var} then it's quite awful.

If you use it as $object->{$var} then yes, there're legitimate uses for it. Sorry, it's been a long day and I just looked at http://php.net/manual/en/language.variables.variable.php


I wouldn't use it to expose all methods...

The question was specifically about the $$gently caress variety. I didn't realize that $gently caress->$poo poo was also a variable variable.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Westie posted:


Nothing wrong with PHP btw, it's just most people's first language learned, therefore an entire internet of poo poo examples exist.

I take it you haven't been reading this thread very long.

Munkeymon
Aug 14, 2003

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



Snapchat A Titty posted:

Presumably the other candidate was there for the next/prior interview. Assuming he arrived at whatever time they agreed on, that means they are going over/under time. Implies a lack of realistic planning. Better not work there, their poo poo is outta control.

No, we interviewed at the same time, talking to different people most of the time. They stuck us in the same room to get presented at about what the company did and then walked around and looked at the general office environment. After that, we had separate technical interviews and there may have been multiple rounds of technical interview but I don't remember all that well because this was 6+ years ago.

hobbesmaster
Jan 28, 2008

Westie posted:

:allears: Your ex-employers sound nice.

Nothing wrong with PHP btw, it's just most people's first language learned, therefore an entire internet of poo poo examples exist.

http://php.net/manual/en/types.comparisons.php

karms
Jan 22, 2006

by Nyc_Tattoo
Yam Slacker

Westie posted:

:allears: Your ex-employers sound nice.

Nothing wrong with PHP btw, it's just most people's first language learned, therefore an entire internet of poo poo examples exist.

don't throw steak in the lions den, son

necrotic
Aug 2, 2005
I owe my brother big time for this!
e: nevermind

canis minor
May 4, 2011

zergstain posted:

The question was specifically about the $$gently caress variety. I didn't realize that $gently caress->$poo poo was also a variable variable.

Don't know either - don't really use the $$var. I guess $obj->{$var} is a variable attribute and $obj->{$method}() is variable method, but them being labeled under variable variables in PHP documentation confused me a little, sorry.

The only usage of $$var I've seen is in smarty modifiers, for example:

code:
foreach($params as $_key => $_val) {
        switch ($_key) {
            case 'file':
            case 'height':
            case 'width':
            case 'dpi':
            case 'path_prefix':
            case 'basedir':
                $$_key = $_val;
                break; 
but why would you do that, when you can safely access the variables by $params['width'] - I guess it saves you typing these 10 characters...

Mogomra
Nov 5, 2005

simply having a wonderful time
RE: $$var talk

I've seen it used to write a function that you can either pass arguments to or an array with all the arguments in it.

php:
<?
function fuckingIdiotsUseThis ($first = "foo", $second = "bar", $third = "baz") {
  if (is_array($first)) {
    foreach ($first as $key => $val) {
      if (in_array($key, array( "first", "second", "third" )))
        $$key = $val;
    }
  }

  // Go on and do more stupid poo poo with just the expected paramters
}
?>
Of course, you should probably use extract() instead, but :shrug:

IT BEGINS
Jan 15, 2009

I don't know how to make analogies

Mogomra posted:

Of course, you should probably use extract() instead, but :shrug:

Or just be sane and have one drat signature for the functions instead of some crazy variable poo poo.

Also gently caress extract into the next universe.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
The 1600 line bash script is too complex, so lets put a 1000 line wrapper written in perl in front of it :downsbravo:

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

IT BEGINS posted:

Also gently caress extract into the next universe.

Yeah. I was saying in another thread that I sit near some people who are working on the PHP language specification. I have no idea how they are ever sober, but talking about extract is guaranteed to get a pen thrown my way.

Content:

>: cat /etc/redhat-release
CentOS release 5.2 (Final)
>: timeout 5 false && echo 'wtf'
wtf

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Westie posted:

Nothing wrong with PHP btw, it's just most people's first language learned, therefore an entire internet of poo poo examples exist.

http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

Adbot
ADBOT LOVES YOU

necrotic
Aug 2, 2005
I owe my brother big time for this!

Holy poo poo, you can really stop right here

quote:

It’s not transitive. "foo" == TRUE, and "foo" == 0… but, of course, TRUE != 0.

I had forgotten how utterly horrible PHP is.

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