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

Tenks

Bronze Knight of the Realm
14,163
607
Ah you're right. Sorry I've never written .NET professionally so I didn't know they used Pascal case.
 

Citz

Silver Squire
180
8
OOP, inheritance, overloading is just easy to use.
On an interview a non CS person, who was versed on procedural, gave the following answer.
"I don't see a problem with having a method signature been "
vs
I recomemded, not hiring.
I'm with Cad on this one. Sure, the second option looks nicer in your intellisense but writing method names like the first option is not enough for me to not hire. I would be more interested in the actual implementation where they actually re-use GetItemPrice(Item item) in the other two methods with no copy/pasta.
 

Khane

Got something right about marriage
20,314
13,959
"Improper Casing". Comments like that make me roll my eyes. Who gives a shit if it's Pascal, Camel, whatever. You can read English right? Like you won't know if it's a method or a variable unless you case it a certain way. Give me a break.

And when you're using an IDE overloaded methods are better than creating separate methods for each different type of call, even if the underlying code is the same. You can just type in the name and cycle through each overloaded method and see all the various ways you can call/use it rather than trying to hunt down different names for similar method calls.
 

Noodleface

A Mod Real Quick
38,244
15,029
A better test would be to say "we use X coding style here, can you rewrite this to confirm with my outlandish requirement?"
 

Lendarios

Trump's Staff
<Gold Donor>
19,360
-17,424
A better test would be to say "we use X coding style here, can you rewrite this to confirm with my outlandish requirement?"
I'm a big follower, maybe to a fault of appeal to authority, when it comes to programming. If Microsoft, does something, and Sun does the same, and you don't want to use that, well, i really don't want to deal with your work.
 

moontayle

Golden Squire
4,302
165
Friday-Meme-Damn-09.jpg
 

Noodleface

A Mod Real Quick
38,244
15,029
Agreed for C, and some of them are really elementary.

No interviewer is going to ask me what the structure of a for loop is
 

Deathwing

<Bronze Donator>
16,717
7,731
Stumbled upon this one in a C link:

What is the difference between array and pointer?
What a stupid comparison. Is this supposed to teach that an array is just a pointer to a contiguous block of memory? It seems like a really disjointed question.


What's the difference between a zebra and the sun?
 

moontayle

Golden Squire
4,302
165
One of the Java questions is about the difference between Vector and ArrayList. Vectors were effectively replaced in Java 1.5 and their use is not recommended as a result. I didn't even know about them until I ran into its use in the code I inherited as it was never taught in any of my Java courses.
 

Deathwing

<Bronze Donator>
16,717
7,731
That's what one of the things I love about Python, your containers are basic:

dictionary(hash map in other languages, usually)
set
tuple
list

No queues, vectors, dequeues, arrays, arraylists, 100 variations of hashes and/or maps, etc. Pick your container and make sure your algorithm isn't shit, which is likely where more performance is lost than making sure you have the exactly correct container.
 

Tenks

Bronze Knight of the Realm
14,163
607
Stumbled upon this one in a C link:



What a stupid comparison. Is this supposed to teach that an array is just a pointer to a contiguous block of memory? It seems like a really disjointed question.


What's the difference between a zebra and the sun?
Maybe he is asking why you need to return a pointer from a function instead of being able to return the array? I assume C has that limitation since C++ has it at least.
 

Tenks

Bronze Knight of the Realm
14,163
607
That's what one of the things I love about Python, your containers are basic:

dictionary(hash map in other languages, usually)
set
tuple
list

No queues, vectors, dequeues, arrays, arraylists, 100 variations of hashes and/or maps, etc. Pick your container and make sure your algorithm isn't shit, which is likely where more performance is lost than making sure you have the exactly correct container.
You're mostly just complaining about Java having a ton of implementations of their basic Collection interfaces... Like mostly you'll just define your List as an ArrayList but sometimes you need something different. Granted Queues and Dequeues are different interfaces but they ascend to the same Queue interface. But it is nice knowing that you have a HashMap but sometimes you do actually need a sorted Map and Java already gives you a TreeMap for that occurrence. Just because Java gives you a ton of implementations doesn't make it bad it just gives you generic stuff (ArrayList, HashMap, LinkedList) but it can also give you more specific and granular implementations if required by your spec.

Vectors are thread-safe where ArrayLists are not thread-safe. Usually you don't want to pay that cost so you will use an ArrayList 999/1000 but sometimes Vectors fit their niche. Though since Java added the java.util.concurrent package in (I think?) 5 it is pretty much wholly deprecated.
 

moontayle

Golden Squire
4,302
165
It's not there in the official documentation from Oracle but Google has a note to just use CopyOnWriteArrayList class instead of Vectors in the Android docs.

It's one of the reasons I know the previous dev was a Java developer first and foremost. They keep telling me she was an Android developer but the code I'm working with doesn't back it up. There's zero adherence to the activity lifecycle.
 

Tenks

Bronze Knight of the Realm
14,163
607
It's not there in the official documentation from Oracle but Google has a note to just use CopyOnWriteArrayList class instead of Vectors in the Android docs.
Yeah thats the ArrayList inside the concurrent package which gives you thread safe Collections. Like I said Vector is pretty much completely deprecated since those collections came out. But Java being Java supports so much backwards compatibility I doubt Vector is going anywhere.
 

moontayle

Golden Squire
4,302
165
Pretty much. Google apparently doesn't give any fucks. They outright ripped the Apache network library out of 6.0 after deprecating it in 5.0.