moontayle
Golden Squire
- 4,302
- 165
This. This is exactly the code I inherited. It's a wonder it even works.When used improperly you'll get a bastardized half OOP half procedural solution that gains all the burden of OOP and none of the benefit.
This. This is exactly the code I inherited. It's a wonder it even works.When used improperly you'll get a bastardized half OOP half procedural solution that gains all the burden of OOP and none of the benefit.
Improper casing? what chu talking about!!I'd be more concerned about the improper casing.
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.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 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.A better test would be to say "we use X coding style here, can you rewrite this to confirm with my outlandish requirement?"
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 is the difference between array and pointer?
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.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?
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.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.
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.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.