IT/Software career thread: Invert binary trees for dollars.

Noodleface

A Mod Real Quick
37,961
14,509
My manager told me if he sees Java listed as one of the top languages on a persons resume he just throws it away
 

Tenks

Bronze Knight of the Realm
14,163
606
Instant method to not get hired. If someone dropped this on me I would end the interview within minutes.
"At this shop we take much pride in reinventing the wheel!"

I'd never personally get cheeky since I understand the purpose behind these whiteboard interviews but it just feels silly since they solve such stupid problems which are solved elsewhere
 

Tenks

Bronze Knight of the Realm
14,163
606
Or he's one of those elitists who just hurr durrs at Java developers

In other words all of reddit's programming board
 

moontayle

Golden Squire
4,302
165
Well, do you guys program in Java? If not that seems like a pretty sound hiring practice...
That's how I feel. You don't hire a Java developer if you're not looking for a Java developer. But with that being said, it runs the risk of trashing an applicant who has, say, 10 years of Java dev but 5 years of something you're looking for.
 

Obtenor_sl

shitlord
483
0
I didn't say 'Just say .reverse_each' and that's it be snarky at your interview.

The whole point is to say "There's a method in Ruby that handles that and is .reverse_each, and here's how it works and why" and you explain how is it implemented and what were the things the developers had to do. It shows you're familiar with the actual language you'll be using every day, it shows that you don't reinvent the wheel and you actually learned why it was implemented that way.

This is the source for that method:
 

Tripamang

Naxxramas 1.0 Raider
5,233
31,877
We have the "NIH" (not invented here) syndrome where I work. In fact, one of the other developers claimed that we cannot use open source libraries because we would, in turn, have to give away our software for free. Not sure where the hell he got that from.

The point is, though, is there is no way you or your team is going to write something better than what the community already has. Going back to the data structure examples - I'm not going to write my own BST when I know what's already in the Java or .NET library will be way more efficient than anything I can cook up.
They probably think every open source license is GNU.

GNU - You only have to open source the code if you modify their original code. Now what you have to worry about is if you statically link the GNU module/library into you source code, as that triggers a clause in the license that you have to open source everything connected to it now. If you leave it as a compiled module DLL, exe etc without modifying it and not statically linking it, you can use it for free.

Apache/MIT/BSD licenses are true open source and let you do whatever you want.

We don't use anything unless it's the latter and we avoid GNU like the plague. GNU made a lot more sense when the open source movement was starting out as it forced people to open source more of their code and push the movement forward, but I think it's more of a hindrance now than a benefit as open sourcing is quickly becoming the norm.
 

Khane

Got something right about marriage
19,986
13,562
I didn't say 'Just say .reverse_each' and that's it be snarky at your interview.

The whole point is to say "There's a method in Ruby that handles that and is .reverse_each, and here's how it works and why" and you explain how is it implemented and what were the things the developers had to do. It shows you're familiar with the actual language you'll be using every day, it shows that you don't reinvent the wheel and you actually learned why it was implemented that way.

This is the source for that method:
If reversing an array is something that happens often in Ruby and the built in methods are known to not be performant in certain scenarios I can understand asking a question like this. If you'll always use the built in method because it's rock solid and reversing an array isn't something that happens often who cares about how the Ruby developers implemented it or the steps it completes in order to do the array reversal?

There is no reason to know how a built in method is coded unless that built in method has specific flaws that should be accounted for in certain situations.
 

Tenks

Bronze Knight of the Realm
14,163
606
I did have a fun issue last week where Mahout's built in XmlInputFormat (an input format for Hadoop Map/Reduce jobs) wasn't working correctly. I decided to just delve into the source to figure out what the heck was going on. Turns out it was XmlInputFormat only in name because literally all it did was scan for your start tag then scan for your end tag and ship that along to the Mapper. I somewhat expected some sort of actual XML parsing (which I wasn't sure how that would work in the Hadoop ecosphere but I figured people smarter than myself got it done.) So I sent in my configuration my start tag was "<startTag>" and end tag was "</startTag>." But in my actual document I had "<startTag xmlns....>" So after reading the code I found out I could make it work by simply chopping off the closing bracket in startTag since it didn't really give a damn if it was well formed or structured XML anyways.
 

Cad

scientia potentia est
<Bronze Donator>
24,573
45,659
Instant method to not get hired. If someone dropped this on me I would end the interview within minutes.
Would gladly not be hired at a place hiring a java dev who gives the quickest/easiest to read java way to do a problem and thinks there's something wrong with that.

Or if you are doing C++, and someone uses the various C++ frameworks to answer a question, thats great! If you want to ask them to implement the framework, follow up with that. Utilizing 100% bug free and perfect frameworks is the BEST answer. If you want the underlying implementation ask for it. Don't be an elitist douche.
 

Noodleface

A Mod Real Quick
37,961
14,509
One of my interviewers made me step through assembly code for him. You could tell he did it because I put assembly on my resume and he wanted to catch me in a lie. Well I must've done fine because I got hired.

Once hired I noticed they don't write anything in assembly at all.. so kind of a douche move.
 

Lendarios

Trump's Staff
<Gold Donor>
19,360
-17,424
My opinion in terms of the parameters and naming and styles.
They are like assholes, everyone has one and we all think only the other guys' stink.
However some assholes are bigger than others. And if you make a product you have the right to ask for the convention that you want. On that term microsoft asshole is > than the rest.

If you are programming on the .Net framework, you should use
Naming Guidelines

Which stipulate that if you use m_ for an internal member, you should be raped by a spike blunt object. The same should happen to you if you are using gXXX as a indicator for something global. To start if you have something global YOU HAVE SOMETHING ALREADY WRONG!

Now I don't know how about Java or Android standards, or who sets them, but the final word is with them.

Now its ok to go against the standards just because, you want to be contrarian, or frankly just don't like them. Just understand that it is very valid counterargument to say, "I like it because Microsoft made it and they say so."

So for Tuco, get rid of that m_ crap. just name your parameter different than your internal values.
 

Vinen

God is dead
2,783
490
Would gladly not be hired at a place hiring a java dev who gives the quickest/easiest to read java way to do a problem and thinks there's something wrong with that.

Or if you are doing C++, and someone uses the various C++ frameworks to answer a question, thats great! If you want to ask them to implement the framework, follow up with that. Utilizing 100% bug free and perfect frameworks is the BEST answer. If you want the underlying implementation ask for it. Don't be an elitist douche.
I had misread the initial statement as someone trying to due a "cute" implementation rather then something practical.
The other major concern is that if a library isn't built in there is an actual cost to distributing it. (Memory/Performance)

While yes, a 3rd party library may solve the problem. The best answer isn't to add another library to your products requirements.
 

Obtenor_sl

shitlord
483
0
Would gladly not be hired at a place hiring a java dev who gives the quickest/easiest to read java way to do a problem and thinks there's something wrong with that.

Or if you are doing C++, and someone uses the various C++ frameworks to answer a question, thats great! If you want to ask them to implement the framework, follow up with that. Utilizing 100% bug free and perfect frameworks is the BEST answer. If you want the underlying implementation ask for it. Don't be an elitist douche.
THIS is the point I'm trying to make.

Asking people to solve a problem "reverse an array" can have many valid answers. You can go and create your own method, or you can say "This language has all these utility methods, one of this is reverse array and this is how it's implemented" shows to ME that not only can you explain how reversing an array works but also that you are knowledgeable and familiar with a language/api/framework. Also that while you might not be afraid of implementing your own you're more than comfortable using a particular implementation in a language that probably runs in a much better time (O complexities and all) and where proper testing has been done.
 

Cad

scientia potentia est
<Bronze Donator>
24,573
45,659
I had misread the initial statement as someone trying to due a "cute" implementation rather then something practical.
The other major concern is that if a library isn't built in there is an actual cost to distributing it. (Memory/Performance)

While yes, a 3rd party library may solve the problem. The best answer isn't to add another library to your products requirements.
So are you implying that the Collections library isn't built in to Java now?
 

Tenks

Bronze Knight of the Realm
14,163
606
Asking people to solve a problem "reverse an array" can have many valid answers.
Which is why many of these "implement this" questions are not 100% about your actual end-product algorithm. Many of them are to see if you're comfortable clarifying requirements, asking questions and not just coding away without a complete picture of where you'll end. So if someone says "reverse an array" things should be asked like "How often will this be used?" "On what kind of machine will this be used?" "Does this function have an SLA or any other requirements to respond in a given time window?" "How large will the array be? Is it statically sized?"

Depending on those answers can modify how you implement that underlying code. Like what if they were so ambiguous with the question and they say "Oh yeah the Array is always just 2 elements."

Well shit suddenly you don't need a whole lot of code to do that