- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I think the point is more that the instances of design patterns are language-specific but the concept of design patterns isn't. The GoF patterns can be applied in both C++ and Java without many issues because the languages are fundamentally extremely similar, but some of them can't exist in other languages, or are so integrated in the language and trivial/logical to use that they don't deserve the name of "patterns". Likewise, other languages have other design patterns that just wouldn't apply (or even be thinkable) in C++ or Java e.g. the concept of "Monads" in pure functional programming language can easily be seen as a design pattern, and just wouldn't make sense in Java.
Admin
Oh, I absolutely agree. Another example would be continuation passing in Lisp or Scheme, which just can't be done in most languages, including Java. But I was reacting to what I perceived as the earlier poster's implication that the concept of design patterns wouldn't apply to ML or Scheme. The Strategy pattern would be very natural in a functional language, and the State pattern could be used in a sense in pretty much any language, but even if you see it as strictly an OO thing it could be used in CLOS or Ocaml, if not pure ML. I think the Visitor pattern might be one that would be so simple and obvious in a functional language that it would hardly be worthy of being glorified with the title of "design pattern", but I'm not sure -- I've only messed with functional programming in my spare time, and never built anything significant with it.
Actually, on that note, I must admit that I've never quite "gotten" Monads. That's Haskell, right? Wouldn't monads (and even my example of continuation passing) be more of just a feature of the language, and something that could be used as a building block in a design pattern, but not actually a design pattern in its own right? Just curious.
Admin
I'll have to admit that the last time I tried to grok it, my brain broke before I managed to full grasp the concept, but from what I understood:
Admin
Nah!
There's actually only 6² possible ways to connect two hubs:
Hub A bottom -> Hub B top (the standard way)
Hub A left side -> Hub B top
...
Hub A right side -> Hub B backside
...
Hub B bottom -> Hub A top
Use super glue if you want to make sure connection really sticks.... ;o)
/E
Admin
I've heard a few variants on question 1 (fruit, animal, etc.), and people always seem to think it's a really dumb question. Well, it is, but that certainly doesn't mean the person asking it is dumb.
The interviewer doesn't care what fruit you answer with. It's not like they have a big list of fruits, along with what each one says about your personality and programming ability. 'Course not. What the interviewer really wants to know is "How do you respond to dumb questions?" or possibly "How full of shit are you?"
In an interview, this is important. If you're the kind of guy who can talk at length about what kind of fruit best describes you, and even work all the latest industry buzzwords into your answer, the interviewer knows you're full of shit. If you get agitated and start talking about how that's such a stupid question, the interviewer knows you get agitated easily and likely won't work well as part of a team. If you make a joke like "beer nut", that says something about you too.
You see? Sometimes the only way to get an honest answer out of someone (try asking an interviewee how full of shit they are) is to not tell them what the question really is. A great example of this is the fruit question itself, since once you know what the question is for, it won't really "work" on you anymore.
"What kind of fruit are you" is one of my favourite interview questions too. Not because it's dumb, but because it's so clever.
Admin
You know that Sun did not claim that Java 5 was the first language with type polymorphism so please don't make such an absurd accusation. Sun can call its language features whatever it wants to, and I wouldn't be surprised if the name itself originated outside Sun.
What may not have fully occurred to you is that whatever language you use, with whatever snazzy features, it all ends up as machine code. So when a programmer says a language is unusable because it doesn't provide objects or reflection or exception handling, what he usually means is that he's not quite smart enough to either implement those things for himself or make do without them. If formal education teaches anything, it should teach how to get by in those situations.
Admin
Can also point out that the question didn't specify which _operation_ was being
asked about - everyone has just assumed we are talking about lookup, but in
some applications insertion and deletion might also be critical.
Admin
Another reason not to get certified.... It might come up in a background check ... http://thedailywtf.com/emoticons/emotion-1.gif
Admin
from the spolsky test -- always make sure you ask your interviewees to do something technical (be it right code, configure a router, whatever).
http://www.joelonsoftware.com/articles/fog0000000043.html
would you let a magician do your kids birthday party without asking him to do some tricks first?
it amazes me how many tech interviews I've seen where the interviewee doesn't have to perform.
Admin
Guessing "Gene Wirchenko Fan Club"...
Admin
Correct way to convert an object to a string...
Object :) = new Object();
String a = new String(:)); // or
String b = :).toString();
Admin
There is only ONE way to connect two hubs together.
ONE port on A.
ONE port on B.
and ONE crossover cable used.
We'll be here all day trying to work out the mathematical possibilities of getting a simple task done. That's why the guy was fired in the first place!
Admin
They ended up using a wireless bridge, right?
Admin
There's a lot here that's disingenuous - and pretty boldly so, considering that mister r's actual first post and its actual first responses are just a few pages back.
I'd analyze in detail, but I've been tired all day and have a headache at the moment. Respond if you care, and maybe I'll feel better by then.
Admin
Except for speaking English, it would seem :)
Admin
Presuming you are well educated, you are proof that idiots come both from educated backgrounds and "uneducated" backgrounds.
As Napoleon Dynamite would say, "Idiots!"
Admin
The difference is that everybody gets the chance to get educated and earn a lot of money. Paying afterwards (if you earn less, you have to pay less taxes, approx 20%) works fine for me, but I couldn't have afforded paying my education in advance.