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
MachinTrucChose
Jun 25, 2009
So when are we supposed to take a break, baquerd? When we're 60 and it makes financial sense? Then why is it that old people recommend travelling and enjoying life as much as possible while we're young? Do you think they know something you don't?

Edit: I mean cool old people, not people like my immigrant parents.

Adbot
ADBOT LOVES YOU

Paolomania
Apr 26, 2006

baquerd posted:

A year's worth of savings in your mid 20's could literally be a half million dollars or more by retirement if you didn't do your 3 month splurge.

How much will it cost me to buy a few months of being an unencumbered 20-something during my retirement? Oh wait, you can't buy time back.

shrike82
Jun 11, 2005

I took a half year off to travel between graduating college and starting my first job. Easily the best time of my life.

When I switched between my first and second job, I ended up only having 2 weeks of vacation which I regret. If/when I leave my second job, I'm tempted to take a year off. Has anyone done that?

Karanth
Dec 25, 2003
I need to finish Xenogears sometime, damn it.

Paolomania posted:

How much will it cost me to buy a few months of being an unencumbered 20-something during my retirement? Oh wait, you can't buy time back.

No, you can't. You also can't get around this being a thing right now:

Chasiubao posted:

http://money.cnn.com/2010/06/16/news/economy/unemployed_need_not_apply/index.htm

It's appalling, but the general gist is, "Well if they were a quality candidate they would already be employed so clearly :derp:"

Pick your tradeoff, but know what you're getting into either way.

Sab669
Sep 24, 2009

A lot of jobs request you submit sample code from projects you've worked on.

Say you're submitting an application you've developed for personal use and had to intention to publish. It's likely not coded, because you wrote it and understand your conventions / logic.


Should you submit the code just like that, or should you go back and comment it for the new reader? On one hand, I'd say no because it looks weird (in my opinion) to document your own stuff. On the other hand, in the real world you drat well should be commenting your code so maybe they want to see you do comment stuff.

Sab669 fucked around with this message at 00:23 on Aug 17, 2011

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
Anything that you don't plan to delete in the near future should be at least sparsely commented, even if you never intend for anyone else to see it. Just because you understand all the details of the code now doesn't mean you will in six months.

TasteMyHouse
Dec 21, 2006
Comment to document the purposes of your classes / functions. also comment anything "clever" you do (but better yet don't do anything clever)

Mike1o1
Sep 5, 2004
Tiluvas

Sab669 posted:

A lot of jobs request you submit sample code from projects you've worked on.

Say you're submitting an application you've developed for personal use and had to intention to publish. It's likely not coded, because you wrote it and understand your conventions / logic.


Should you submit the code just like that, or should you go back and comment it for the new reader? On one hand, I'd say no because it looks weird (in my opinion) to document your own stuff. On the other hand, in the real world you drat well should be commenting your code so maybe they want to see you do comment stuff.

In my experience, they don't really tend to look too in depth at the code, so something sparsely commented might not be too big of an issue. Hopefully the names of your classes, functions, variables should document themselves.

I've found that they take a look at the code for 10-15 minutes to see at a high level some of your techniques. Do you use inheritance? Are you using interfaces? Do you have unit tests written? They'll find 2 or 3 things about the code to ask you about, so make sure you explain your decisions. Why did you inherit from this class instead of subscribing to an interface? Things like that.

Sab669
Sep 24, 2009

Interesting insight. I do use "self-documenting" variable names as you suggested, in the sense that I don't just use i j and k for everything, but instead have meaningful names for everything.

Suppose it couldn't hurt to toss in some comments on stuff to explain their general purpose though. Now I just need ideas for what to write for sample work :eng99:

Chokes McGee
Aug 7, 2008

This is Urotsuki.
So, I appear to have a dilemma. Hopefully this is the right place to air it.

An old contact of mine called me out of the blue about a position he apparently has open in his company. They're fairly new---about six years now---and they exclusively develop software in-house for other companies, no seat filling onsite, no extended support contracts, etc. The work environment seems "fun", and my contact made it a point to give me the hard sell; for eample, he brought up jobs the company was doing that matched a concern I had aired to him in a conversation almost three years ago, about how what I was doing wasn't really making a difference in people's lives. (The project was for an app to help doctors detect potential child abuse, but I digress.)

On paper, it sounds super exciting, but here lately two things have been bothering me:

1) My "too good to be true" RADAR is pinging like mad, and
2) I already have a job I've been at for about a year.

#2 is what worries me the most, I think. I feel like a horrible traitor getting yanked out from under my current job like that, especially since I'm not really dissatisfied with it, but this could be a dream position. :ohdear:

Allowing that I'm doing due diligence in research and plan on asking a lot of polite questions about future revenues in the interview, has anyone been in this situation before? I know it's just business, but my gut is telling me to slam on the brakes hard, and I don't know if it's justified. Thanks.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Chokes McGee posted:

2) I already have a job I've been at for about a year.

#2 is what worries me the most, I think. I feel like a horrible traitor getting yanked out from under my current job like that, especially since I'm not really dissatisfied with it, but this could be a dream position. :ohdear:

These days, employers generally have no loyalty to their employees. Don't feel obligated to stay out of loyalty to the company. Do what's best for you and your happiness.

Thel
Apr 28, 2010

Chokes McGee posted:

Allowing that I'm doing due diligence in research and plan on asking a lot of polite questions about future revenues in the interview, has anyone been in this situation before? I know it's just business, but my gut is telling me to slam on the brakes hard, and I don't know if it's justified. Thanks.

As Ithaqua said, loyalty doesn't have a dollar value to the modern employer and intangibles only count when sports fans are discussing trades. :colbert:

That said, if you've got cold feet specifically about the job offer, trust your instincts. If he's giving you the hard sell, you have to figure out why - is he just a pushy personality, is he on a financial motive to become a part-time recruiter (or just under pressure from management), or can he see the writing on the wall and is desperately searching for the magic bullet (that's you, by the way) to fix everything?

TLDR: Don't worry about your current job, as long as the offer's better. But make drat sure the offer's better before you burn your bridges.

gariig
Dec 31, 2004
Beaten into submission by my fiance
Pillbug
You could also take a couple of days off and visit the company and see what they do and how they work.

Chokes McGee
Aug 7, 2008

This is Urotsuki.
Thanks, everybody! I'm coming in on late Friday afternoon to take a skill test at their location, so I can nose around the office at that time and see what the atmosphere is like. We'll see where it goes, I guess. :)

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!
Okay, I have a question about a really bizarre phenomenon I've come across when giving interviews. One of the questions we use to ease into CS topics is to ask the candidate to describe a few sorting algorithms that they're familiar with, and then depending on what they say we go from there. Anyway, some ridiculous number like 6 of the last 10 candidates have said 'binary sort.' What the gently caress. That isn't even a thing, or if it is, it's almost certainly not what they meant. Why does everyone keep saying this?

Ensign Expendable
Nov 11, 2008

Lager beer is proof that god loves us
Pillbug
They are probably confusing it with binary search.

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!
Yes, that is what I always figured, but even so, the sheer number of people who say 'binary sort' is baffling. I was just wondering if anyone else has run into this.

baquerd posted:

Ask them to describe it and see what you get. Maybe a tree sort.
Doubtful considering how the rest of these interviews go. It's almost certainly a binary search reference.

baquerd
Jul 2, 2007

by FactsAreUseless

Orzo posted:

Okay, I have a question about a really bizarre phenomenon I've come across when giving interviews. One of the questions we use to ease into CS topics is to ask the candidate to describe a few sorting algorithms that they're familiar with, and then depending on what they say we go from there. Anyway, some ridiculous number like 6 of the last 10 candidates have said 'binary sort.' What the gently caress. That isn't even a thing, or if it is, it's almost certainly not what they meant. Why does everyone keep saying this?

Ask them to describe it and see what you get. Maybe a tree sort. Why are you asking about sorts when if they use anything other than default library sorts 99% of the time they are wrong.

No Safe Word
Feb 26, 2005

Any answer other than Timsort is an automatic reject, handshake, here's the door.

Smugdog Millionaire
Sep 14, 2002

8) Blame Icefrog
Bogosort and bubblesort are the only search algorithms, and I will fight you about it

Eggnogium
Jun 1, 2010

Never give an inch! Hnnnghhhhhh!
Sleepsort :colbert:

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!
I'm waiting for the candidate that says quantum bogosort. That's a hire.

Wait is this the LC thread

TasteMyHouse
Dec 21, 2006

Orzo posted:

I'm waiting for the candidate that says quantum bogosort. That's a hire.

Wait is this the LC thread

Hahahaha I'd never heard of this, so I'm posting it for those who also hadn't:
http://www.mathnews.uwaterloo.ca/Issues/mn11103/QuantumBogoSort.php

TasteMyHouse fucked around with this message at 17:45 on Aug 19, 2011

Edison was a dick
Apr 3, 2010

direct current :roboluv: only
I'd be tempted to say Intelligent design sort

qntm
Jun 17, 2009
I'm depressed to say that the joke sorting algorithms (bogosort, quantum bogosort, sleepsort) are the only ones I can remember very well

Safe and Secure!
Jun 14, 2008

OFFICIAL SA THREAD RUINER
SPRING 2013
Honestly, though, I think that sleepsort is really cool. Other sorting methods rely on the relationships between the items being sorted in order to compare them. Sleepsort considers each item by itself.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Orzo posted:

Okay, I have a question about a really bizarre phenomenon I've come across when giving interviews. One of the questions we use to ease into CS topics is to ask the candidate to describe a few sorting algorithms that they're familiar with, and then depending on what they say we go from there. Anyway, some ridiculous number like 6 of the last 10 candidates have said 'binary sort.' What the gently caress. That isn't even a thing, or if it is, it's almost certainly not what they meant. Why does everyone keep saying this?

Did they have CS backgrounds? I remember a little about sorting algorithms from my college days, but I haven't had to actually implement a sort since then. At this point, if you asked me "how does a quicksort work?" I'd just shrug. Something involving partitioning.

Chokes McGee
Aug 7, 2008

This is Urotsuki.

Ithaqua posted:

At this point, if you asked me "how does a quicksort work?" I'd just shrug.

List<string> test = new List<string>();
test.Sort();

:haw:

TasteMyHouse
Dec 21, 2006

Ithaqua posted:

Did they have CS backgrounds? I remember a little about sorting algorithms from my college days, but I haven't had to actually implement a sort since then. At this point, if you asked me "how does a quicksort work?" I'd just shrug. Something involving partitioning.

the details of the partitioning often escape me but the basic concept (pick a pivot, put numbers smaller than the pivot on one side, numbers larger than the pivot on the other, recurse) is simple enough to remember

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!
Yes, we only ask that question to people with CS backgrounds. Basically it's a one of a few questions to prove that you actually have a CS background. You don't need to know the implementation details, but you should be able to name either quicksort or mergesort as a fast algorithm and bubble sort as a slow algorithm. I agree that knowing the actual implementation doesn't really say much about the candidate, although I'm not going to lie, mentally I'd count it for bonus points.

Eggnogium
Jun 1, 2010

Never give an inch! Hnnnghhhhhh!
I first saw Sleepsort as an interview question actually. It was given as an anonymous function with non-descriptive variable names and the interviewee had to say what it does and find the bugs in it.

I think a good question for gauging basic familiarity with sorting algorithms would be to ask what the primary difference is between Mergesort and Quicksort.

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!

Eggnogium posted:

I first saw Sleepsort as an interview question actually. It was given as an anonymous function with non-descriptive variable names and the interviewee had to say what it does and find the bugs in it.

I think a good question for gauging basic familiarity with sorting algorithms would be to ask what the primary difference is between Mergesort and Quicksort.
I wouldn't expect anyone who has had a real job for a number of years to remember that. If they were straight out of school, maybe.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug
I'd never heard of the Sleepsort before tonight. Evil genius.

Here's my 5 minute C# implementation!

code:
    class Program
    {
        static readonly List<int> sortedNums = new List<int>();
        static void Main()
        {
            var nums = new List<int> {3,4,1,2,10,9,5,7,12,15,20,30,22,6};
            nums.ForEach(num=>new Thread(i=>
                                             {
                                                 Thread.Sleep((int)i * 50);
                                                 lock(sortedNums) sortedNums.Add((int)i);
                                             }).Start(num));
            while(sortedNums.Count<nums.Count){}
            sortedNums.ForEach(Console.WriteLine);
        }   
    }

New Yorp New Yorp fucked around with this message at 05:47 on Aug 20, 2011

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Orzo posted:

I wouldn't expect anyone who has had a real job for a number of years to remember that. If they were straight out of school, maybe.

There's actually an important semantic difference; it's one of the few things that make it important to understand sorting algorithms even when you don't need to implement them.

shrughes
Oct 11, 2008

(call/cc call/cc)

Orzo posted:

I wouldn't expect anyone who has had a real job for a number of years to remember that. If they were straight out of school, maybe.

There are, however, real jobs where you do need to be familiar with that kind of stuff in your day-to-day work.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Eggnogium posted:

I think a good question for gauging basic familiarity with sorting algorithms would be to ask what the primary difference is between Mergesort and Quicksort.

"Primary" seems like an odd qualifier to give there, as sometimes stability is most relevant while other times worst-case runtime would be.

shrughes
Oct 11, 2008

(call/cc call/cc)

Orzo posted:

I wouldn't expect anyone who has had a real job for a number of years to remember that. If they were straight out of school, maybe.

I'd consider it a severe mark against a person even after years away from school not to know what quick sort and merge sort are, if they had once known. It means they didn't find sorting algorithms interesting enough, or data structures and algorithms in general interesting enough, for them to remember anything about them. They're the quintessential O(n log n) sorting algorithms! If a person can't remember how they work, what can they remember? What a vector is? How to write foreach loop? How link list get insert? Do these people just have a table of knowledge mapping operations of the Java standard library to their big O running times?

Edit: Of course there are plenty of good developers who don't know this who majored in physics or whatever.

Eggnogium
Jun 1, 2010

Never give an inch! Hnnnghhhhhh!

pokeyman posted:

"Primary" seems like an odd qualifier to give there, as sometimes stability is most relevant while other times worst-case runtime would be.

But to describe a difference you have to address both those. That doesn't preclude the fact that either can be the most critical in different contexts.

Anyways, I should have qualified: I meant primary implementation difference, as in with Quicksort the actual comparisons and swaps are done on the way down the stack whereas with Mergesort they are done on the way up.

shrughes posted:

I'd consider it a severe mark against a person even after years away from school not to know what quick sort and merge sort are, if they had once known. It means they didn't find sorting algorithms interesting enough, or data structures and algorithms in general interesting enough, for them to remember anything about them. They're the quintessential O(n log n) sorting algorithms! If a person can't remember how they work, what can they remember? What a vector is? How to write foreach loop? How link list get insert? Do these people just have a table of knowledge mapping operations of the Java standard library to their big O running times?

I disagree that you can equate sorting algorithms with those other concepts. Vectors, loops, and linked lists are all pretty intuitive concepts once you have seen and used them. Not to mention it is much more important to understand their details for day-to-day programming than it is to remember the gooey details of Mergesort.

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!

shrughes posted:

There are, however, real jobs where you do need to be familiar with that kind of stuff in your day-to-day work.
Uh, I know that, but that has no bearing on what I said. The point remains that I wouldn't expect anyone by default to remember.

shrughes posted:

I'd consider it a severe mark against a person even after years away from school not to know what quick sort and merge sort are, if they had once known. It means they didn't find sorting algorithms interesting enough, or data structures and algorithms in general interesting enough, for them to remember anything about them. They're the quintessential O(n log n) sorting algorithms! If a person can't remember how they work, what can they remember? What a vector is? How to write foreach loop? How link list get insert? Do these people just have a table of knowledge mapping operations of the Java standard library to their big O running times?

Edit: Of course there are plenty of good developers who don't know this who majored in physics or whatever.
First of all, the topic was whether the knew the difference between
merge sort and quicksort, not just to be able to name them as O(n lg n) algorithms. Although I personally love data structures and algorithms and could rattle that stuff off despite rarely using any of it for 6 years, there is a lot more to working in the software industry than remembering sorting algorithms, like how to write good code.

Also can you not reply to single posts twice? There is an 'edit' button, you know.

Adbot
ADBOT LOVES YOU

TasteMyHouse
Dec 21, 2006
Quicksort isn't O(n*log n). It's O(n2)

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