POV-Ray : Newsgroups : povray.off-topic : Reflections on employment Server Time
29 Jul 2024 08:22:33 EDT (-0400)
  Reflections on employment (Message 4 to 13 of 53)  
<<< Previous 3 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Orchid Win7 v1
Subject: Re: Reflections on employment
Date: 2 Dec 2012 10:54:49
Message: <50bb79c9$1@news.povray.org>
On 02/12/2012 03:06 PM, Warp wrote:
> Orchid Win7 v1<voi### [at] devnull>  wrote:
>> Here's a challenge - write me a C# function (or even just some
>> psuedocode) which will take a string containing space-delimited positive
>> integers, and return them in ascending order.
>
> If it were C++, I could write a few lines of code that does that

Haskell:

   foobar :: String -> [Int]
   foobar = sort . map read . words


C#:

   public List<Int> foobar(String s)
   {
     string[] words = s.Split(' ');
     List<Int> list = new List<Int>();
     foreach (String word in words) {list.add(int.Parse(word));}
     list.Sort();
     return list;
   }


Not exactly taxing, eh?


Post a reply to this message

From: Warp
Subject: Re: Reflections on employment
Date: 2 Dec 2012 11:11:16
Message: <50bb7da4@news.povray.org>
Orchid Win7 v1 <voi### [at] devnull> wrote:
> 1) You can figure out how to split a string and parse it into integers.

In this particular case I wouldn't split it at all, but parse the ints
directly from the string (which is quite easy to do since they are
whitespace-separated.)

Incidentally, there aren't any "string splitting" functions in C++ per se
(unless you count strtok() as being one.) If you literally need to create
a bunch of substrings from a given strings, there's no easier way than to
simply write the loop explicitly. (As much as it pains me to admit it,
parsing is not the forte of the C++ standard library, and it sometimes can
be a burden.)

In this case, however, it's just easier to parse the ints directly from the
input string, with no splitting or tokenization. (Basically there would be
two ways of doing that: Either use a stringstream, or use std::strtol() in
a loop. With a stringstream you could get fancy and use an input iterator
and call a standard algorithm to read the ints, thus eliding having to write
an explicit loop. If you want efficienty, though, std::strtol() is the
better choice, but it's more low-level.)

> 2) You can sort the result.

I can't imagine a programming language that doesn't offer sorting directly.
Even standard C offers such a function, and that's saying quite a lot.
In most languages it should be a one-liner (except in C, of course.)

If using the standard sorting function is disallowed for the purpose of
the exercise, then it becomes quite an academic question in itself. It
becomes a question of whether it needs to be efficient or short. A simple
insertion sort is a four-liner (I count each main element of the algorithm
as one line of code), but it's slow with large amounts of data. Faster
algorithms are harder to implement.

> > I assume there's an at least as easy way of doing it in C#, but since
> > I don't know the language I would fail the test.

> At this point, we're not even asking for correct class or method names. 
> Just something that looks like vaguely valid C# syntax and has logic 
> which isn't obviously gibberish.

I don't know enough C# to make it even look like it were. Unless C#
resembles a lot C++ (which it probably does.) :)

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: Reflections on employment
Date: 2 Dec 2012 11:21:40
Message: <50bb8014@news.povray.org>
Orchid Win7 v1 <voi### [at] devnull> wrote:
> Haskell:

>    foobar :: String -> [Int]
>    foobar = sort . map read . words


> C#:

>    public List<Int> foobar(String s)
>    {
>      string[] words = s.Split(' ');
>      List<Int> list = new List<Int>();
>      foreach (String word in words) {list.add(int.Parse(word));}
>      list.Sort();
>      return list;
>    }

In C++ I would probably write it like:

    std::vector<int> foobar(const std::string& s)
    {
        std::istringstream is(s);
        std::vector<int> result;
        int value;
        while(is >> value) result.push_back(value);
        std::sort(result.begin(), result.end());
        return result;
    }

-- 
                                                          - Warp


Post a reply to this message

From: Orchid Win7 v1
Subject: Re: Reflections on employment
Date: 2 Dec 2012 15:26:39
Message: <50bbb97f$1@news.povray.org>
On 02/12/2012 04:21 PM, Warp wrote:

> In C++ I would probably write it like:
>
>      std::vector<int>  foobar(const std::string&  s)
>      {
>          std::istringstream is(s);
>          std::vector<int>  result;
>          int value;
>          while(is>>  value) result.push_back(value);
>          std::sort(result.begin(), result.end());
>          return result;
>      }

...and in much less than 25 minutes. Clearly you're better than any of 
the people we've interviewed. (But we knew that.)

It's also conspicuous that, unlike any of the people we interviewed, 
you're currently employed. :-P


Post a reply to this message

From: Orchid Win7 v1
Subject: Re: Reflections on employment
Date: 2 Dec 2012 15:34:04
Message: <50bbbb3c$1@news.povray.org>
On 02/12/2012 04:11 PM, Warp wrote:
> Orchid Win7 v1<voi### [at] devnull>  wrote:
>> 1) You can figure out how to split a string and parse it into integers.
>
> In this particular case I wouldn't split it at all, but parse the ints
> directly from the string (which is quite easy to do since they are
> whitespace-separated.)

Two months of Bash scripting. That means we do this kind of thing all 
the time. It makes me twitch slightly when I think about it too much.

>> 2) You can sort the result.
>
> I can't imagine a programming language that doesn't offer sorting directly.
> Even standard C offers such a function, and that's saying quite a lot.

Like I say, one guy did start trying to write a bubble-sort by hand. (Of 
course, nobody else I work with sees anything wrong with that.) It does 
amuse me that somebody could know what a bubble-sort is, but /not/ know 
how to split a string, parse some integers and sort the result...

Of course, any sane person would use the built-in sorting facilities. 
Off the top of my head, the only languages I can think of that lack such 
a thing are PostScript, Tcl and BASIC. And who the hell would be using 
any of those? (OK, PostScript is used quite a lot - but *not* as a 
general-purpose programming language!)

>> At this point, we're not even asking for correct class or method names.
>> Just something that looks like vaguely valid C# syntax and has logic
>> which isn't obviously gibberish.
>
> I don't know enough C# to make it even look like it were. Unless C#
> resembles a lot C++ (which it probably does.) :)

Well, yeah, like Java it bears a strong superficial resemblance.



It's weird... I'm in a room full of programmers, and I seem to be the 
only person who knows anything at all about computer science. One day my 
boss says to me "I can't believe you don't know who J-Lo is". I replied 
"I can't believe you don't know the difference between a binary search 
tree and a binary heap tree". Every single human in the room stopped 
what they were doing, turned around and stared at me as if I'd just gone 
stark, raving mad. "What the *hell* are you talking about?" was my boss' 
reply.

Sometimes I weep.

Then again, in all honesty, how often do you need to implement a BST by 
yourself? Not very often...


Post a reply to this message

From: Jim Henderson
Subject: Re: Reflections on employment
Date: 2 Dec 2012 15:58:51
Message: <50bbc10b$1@news.povray.org>
On Sun, 02 Dec 2012 12:30:30 +0000, Orchid Win7 v1 wrote:

> It may be too early to say, but the WTF quotient of my new employer
> appears to be significantly lower than my previous one. I mean, there's
> still some minor brokenness there. But it's not like the last bunch of
> losers I worked for, where the company was run by deranged howler
> monkeys.

It's good that you are seeing that what many of us told you for so long 
is in fact true - not all employers are as odd as the one you just 
left. :)

> I have also learned that there's a thing called "Spotify", who's purpose
> appears to be to allow my boss to quickly locate terrible music with
> which to troll us all with. (Or just to replay Gangnam Style for the
> twenty-ninth time today...) Supposedly this is somehow legal. Also, I
> now know the words to The Troll Song.

Spotify is great, subscribed recently myself - very large catalog of 
music, not all of it is as annoying as Gangnam Style or "other terrible 
music."

And yes, it is legal - you pay a monthly fee and get access to what's in 
their catalog.  Think Netflix or Lovefilm for music.

Jim


Post a reply to this message

From: Orchid Win7 v1
Subject: Re: Reflections on employment
Date: 2 Dec 2012 16:40:53
Message: <50bbcae5$1@news.povray.org>
>> It may be too early to say, but the WTF quotient of my new employer
>> appears to be significantly lower than my previous one. I mean, there's
>> still some minor brokenness there. But it's not like the last bunch of
>> losers I worked for, where the company was run by deranged howler
>> monkeys.
>
> It's good that you are seeing that what many of us told you for so long
> is in fact true - not all employers are as odd as the one you just
> left. :)

Or rather, I had assumed that I was working for *the only* broken 
company. But now it appears that each company is broken, it's just a 
question of how seriously or trivially.

> Spotify is great, subscribed recently myself - very large catalog of
> music, not all of it is as annoying as Gangnam Style or "other terrible
> music."

I think my boss just likes trolling people, BTH. ;-)

> And yes, it is legal - you pay a monthly fee and get access to what's in
> their catalog.

But not Pink Floyd or The Beatles, apparently... And yet, at the same 
time, unknown bands like The Senti-Mentals are there. Very odd.

> Think Netflix or Lovefilm for music.

Ah yes - two other services that I don't yet understand...


Post a reply to this message

From: John VanSickle
Subject: Re: Reflections on employment
Date: 2 Dec 2012 21:17:22
Message: <50bc0bb2@news.povray.org>
On 12/2/2012 6:30 AM, Orchid Win7 v1 wrote:

> (Some statistics: At my last place, I brought a cake, and with 23 people
> in the building, the cake lasted 3 days. A brought a similar cake to my
> current place of work, and it vanished in UNDER THREE HOURS. Less than
> 10 people work here.)

A plague of locusts descends upon everything left in our coffee bar. 
Except for the bacon-flavored jelly beans.  Those lasted a while.

> Of course, The Real WTF is hiring. With unemployment at historic record
> levels, we literally cannot find *anybody* with the skill-set we need.
> Personally I find this baffling. The market must be /flooded/ with
> experienced programmers, and yet we keep interviewing people who can't
> program their way out of a paper bag.

What I noticed that that when the dot-com bubble crashed, a whole lot of 
firms became very selective in their hiring.  They wanted people who had 
experience with a specific environment or database.

> We have yet to interview anybody who can actually accomplish this
> Herculean task. My personal favourite is the guy who, 25 minutes into
> the task (??!), decided to add a comment explaining what the function
> does. Because, hey, if you can't work out how to write the code, at
> least look like you know how to type, amIright?

My company asked about the languages I knew, but I don't recall them 
testing knowledge of specific languages during the testing for the job.

> Of course, I've seen first-hand that there are *a lot* of people who
> can't program, and never will. But I would have thought that with an
> ocean of people looking for work, it shouldn't be too hard to find the
> minority who can. I WAS WRONG! >_<

The hard part is finding people who like coding enough that they won't 
get tired of a 40-hour week spent coding, and who are actually good 
enough at it that their code is worth hiring them for.

Regards,
John


Post a reply to this message

From: Orchid Win7 v1
Subject: Re: Reflections on employment
Date: 3 Dec 2012 03:49:19
Message: <50bc678f$1@news.povray.org>
On 03/12/2012 02:17 AM, John VanSickle wrote:
> What I noticed that that when the dot-com bubble crashed, a whole lot of
> firms became very selective in their hiring. They wanted people who had
> experience with a specific environment or database.

Ah, so /that/ is where that came from? "Yes, I've been programming for 
20 years, writing code morning, noon and night, in half a dozen 
radically dissimilar languages. But no, I haven't actually used the one 
specific one you're asking about. Can I still be hired?" Most places 
immediately say no.

> My company asked about the languages I knew, but I don't recall them
> testing knowledge of specific languages during the testing for the job.

Several of the people we tested claim to have many, many years of C# 
experience. And yet none of them could write trivial programs like 
sorting integers or counting words or printing prime numbers.

> The hard part is finding people who like coding enough that they won't
> get tired of a 40-hour week spent coding, and who are actually good
> enough at it that their code is worth hiring them for.

IMHO, there are two kinds of coders:

The ones who go to college, take a Java course because they think 
there's money in it, learn the bare minimum to pass, get a job, and then 
completely stop learning. They write code from 9 to 5, go home and stop 
thinking about coding. /Everybody/ I went to uni with seemingly fell 
into that category. They all /hated/ coding, but it was on the syllabus, 
and they believed there was big money to be made with it.

On the other hand, there are people like me. I presume that doesn't 
require much further description. There are people who actually /like/ 
coding, are passionate about it, and voluntarily do it all day just for 
the /fun/ of it.

The latter are the people you want to hire.

One of the interview questions we use is "what hardware is in your PC?" 
If you're a computer enthusiast, you quite probably built your own PC, 
and even if you didn't, you'll almost certainly know if it's an Intel 
Core 2 or an AMD Athlon or whatever, how much RAM is has, and so forth. 
It's really very, very easy to tell the difference between somebody 
who's memorised a list and somebody who knows what they're talking about.

Knowing what hardware you have is of course in no way directly relevant 
to the job - but it's a nice way to gauge how much computer knowledge 
somebody has.


Post a reply to this message

From: scott
Subject: Re: Reflections on employment
Date: 3 Dec 2012 03:50:57
Message: <50bc67f1$1@news.povray.org>
> Of course, The Real WTF is hiring. With unemployment at historic record
> levels, we literally cannot find *anybody* with the skill-set we need.
> Personally I find this baffling. The market must be /flooded/ with
> experienced programmers, and yet we keep interviewing people who can't
> program their way out of a paper bag.

Hehe welcome to the real world. We have exactly the same problems with 
hiring Engineers. Can you describe what this circuit does? No, ok what 
about this one? No, ok what does this *component* do ... ermmm not 
exactly, have you every used an oscilloscope? No, ok we'll be in touch, 
thanks bye.

> Here's a challenge - write me a C# function (or even just some
> psuedocode) which will take a string containing space-delimited positive
> integers, and return them in ascending order.

I would have written almost exactly the same as you posted, but would 
have probably written this line instead (no reason other than I didn't 
know Int.Parse existed, and I don't normally use {} for single line 
loops...).

foreach (String word in words)
     list.add(Convert.ToInt32(word));

> We're using an online site where we can watch people type while we're on
> the phone to them, so save wasting our time with face-to-face
> interviews. Apparently the last guy we interviewed, the guys could hear
> typing but not see anything on the screen, and then suddenly big chunks
> of text would appear... It's /almost/ as if the guy was desperately
> Googling the code while he was on the phone.

Or typing it into the IDE then copying & pasting over, that's what I 
would probably do, as I pretty much rely on the auto-complete stuff to 
get code right first time (or even remember the method names correctly).

> Of course, I've seen first-hand that there are *a lot* of people who
> can't program, and never will. But I would have thought that with an
> ocean of people looking for work, it shouldn't be too hard to find the
> minority who can. I WAS WRONG! >_<

 From what was discussed here before (sorry don't remember who with) it 
seems recruitment agencies for software are very poor compared to ones 
for engineering for some reason. Seems like there is a market for a 
decent software recruitment agency that actually employs people who know 
a tiny bit how to program so can weed out people like you describe.

Also as a software company you should be able to knock up a quick 
website that has programming exercises (like the one above) that the 
candidate has to fill in within a set time, design them so you can't 
just google the answer. Send the link to people with a unique login 
before you even invite them to interview...


Post a reply to this message

<<< Previous 3 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.