|
David O'Neil wrote: have you ever used protected and private inheritance?
All the time. Public is for the public parts of the interface to the class. The others are for the internal implementation details -- the parts we want to be free to rewrite and refactor without consequence. In my experience, a bigger public interface to a class means tighter coupling over time since other developers don't have to think very carefully about how their usage tightens the coupling, so they don't and just go ahead and use it.
5G -- more lies faster.
|
|
|
|
|
That is a great response, that makes me see things in a new light! Thanks! It is especially helpful breaking free from the 'aggregation/inheritance' argument, that never really made any sense to me since private inheritance is NOT aggregation!
|
|
|
|
|
Generally speaking, they are part of the encapsulation of function of your class - gating the interface is what I call it.
With that said, I live in the embedded world where so little code re-use occurs (other than cut/paste), OOD is routinely ignored.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
|
"The best of life is the simple things..."
|
|
|
|
|
Dim light bulbs or bright light bulbs - Watts the difference?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
That one's so bad it's shocking! I just may end up needing an IV to get through this.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
There are some witty answers lumen in the future. Fluorescent, or better, two, I'd say you have gotten your two cents worth in.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Management vs. Engineering?
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
OriginalGriff wrote: Dim light bulbs or bright light bulbs - Watts the difference?
Neh! It's cost.
|
|
|
|
|
Watt LED you to post this?
If you can't laugh at yourself - ask me and I will do it for you.
|
|
|
|
|
Wire you asking?
This question induces resistance in me.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
Ohm, maybe you should conduct yourself a little better...
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- Never argue with a fool. Onlookers may not be able to tell the difference. Mark Twain
|
|
|
|
|
Questions like this make me incandescent - Joule have to ask somebody else.
|
|
|
|
|
Does anyone else think coding interviews are fundamentally broken? So like, literally I've been doing this (programming) my whole life. We can all go through our accolades I'm sure, but suffice it to say I've done some things over the years to help rebuild departments in large corporations to garner the attention of regional VPs, etc. as we all have. But, I say this because, two days ago, I had an interview with Unnamed Company That Rhymes With Acelook. Don't get me wrong, they were super friendly, and it was a great chat. But I was asked questions like...
Are you comfortable with writing APIs on the backend?
That's a generic question, so of course I say sure. To me this indicates the interviewer doesn't realize the best way to interview. No real probing... just questions like that. Ok, cool. Still was a great, super friendly chat. But, then the tech portion of it came up. I was asked this...
Ok fine... I get how this game works. So, let's get cracking. The first solution I start with used two arrays. Cool, no biggie. But then the interviewer asked for me to do it in-place. Ok, fine. So, I write some code that is like a bubble sort that brute forced it (ie, nested loops). We all know that it sucks to have nested loops. Anyway, the interview was cut short and that was that. I look up the "official" solution online, and it's no better than my first attempt. In fact, my first attempt was quicker due to only one loop. The one I linked to was using two loops that just weren't nested.
So, not only did my original solution avoid two loops (using more memory though), but I found a more elegant solution online and I just know if that interview wasn't cut short I could've tried something like this the third go-round...
void moveZeroes(vector<int>& nums) {
for (int lastNonZeroFoundAt = 0, cur = 0; cur < nums.size(); cur++) {
if (nums[cur] != 0) {
swap(nums[lastNonZeroFoundAt++], nums[cur]);
}
}
}
But since I didn't try something like this first, I got passed on.
Does anyone else think that's a fundamentally broken way to find a good programmer? Let's be real... once you get the job how often to you spend your day doing algorithms for a typical LOB app? Never. No questions about how well you handle problems, how do you deal with other developers, how do you scale, etc. Not to sound sour, but to reduce a 25 year professional to that... something is wrong with the industry. Imagine hiring a lawyer and turning him down because you Googled something online that's obscure and never used.
Anyone else agree this is fundamentally broken?
[Edit] This is not a bash management or people that conduct interviews type post. My recruiter was fantastic. The interviewer was friendly and knowledgeable. I'm just pointing out the broken process we all put ourselves through. [/Edit]
Jeremy Falcon
modified 24-Sep-20 7:59am.
|
|
|
|
|
My extension to an old saw: "Those that cannot do teach." If that's too hard, there's always Management.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
lol, I worked at a community college and that adage is soo true. Those who can do, Those who cannot do teach, those who cannot teach manage, those who cannot manage sell, those who cannot sell. Well there is always politics and law.
To err is human to really mess up you need a computer
|
|
|
|
|
I should say I've been in management before. I'm not anti-PHB. I've hired people. I've managed people. I love business folks. More developers need to mature and learn the perspective of managers. And yes, there are those managers who seek to do nothing but manage and boss people around that should never be hired. But, there are a ton of great ones out there that used to be devs, etc. Anyway, my recruiter was nothing short of superb here. The interview was super great and friendly. It's just fundamentally broken in the way we go about it.
Jeremy Falcon
modified 23-Sep-20 9:09am.
|
|
|
|
|
My "boss" - at the director's level, is great. Works hard and really knows his stuff (DBA). I'd give it better than even money that, were he able to avoid prison he'd exterminate most of his peers (and above).
Some do, in fact, earn their way to management. From my observation, whether in private sector or government (and even social organizations) there are those who want to get to the top - and they're the ones who common sense promotes that one least wants to get there.
Remember - management is an entire curriculum at most universities. There's little to expect from that since the paradigms are style-driven. Add in some acronyms and made-up words and you have a cult of . . . . well, read Dilbert [^] some more.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
W∴ Balboos, GHB wrote: well, read Dilbert [^] some more.
That link is sooooo true.
Jeremy Falcon
|
|
|
|
|
That's a link I've bookmarked and visit daily.
(hint hint hint)
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
I flunked a job as Java instructor during a phone interview, because I had been teaching C++ and briefly got a small point mixed up between the languages, something I would have quickly corrected, if I had actually been coding an example.
|
|
|
|
|
Of course it's broken - HR doesn't know anything about the job, so they tend to rely on things like automated scanners that look for the magic keywords in the resume. Then once you've managed to pass through that first filter, the next level of the challenge is getting past the human part of the HR process, where someone who has no idea what you do decides whether or not to pass you on to the actual person/people who needs the job done. Even when you get to that step, there's a fair chance that the manager you talk to doesn't really know what they need, depending on their background and, to some extent, how long it's been since they actually did any coding. And for the high profile darlings of the stock market, as you noted, it's then on to some test totally unrelated to the day-to-day duties you'd actually be performing. It's only when you've passed all of those ridiculous barriers to entry that you might (but only might!) talk to someone who actually knows what the job entails and may be competent to judge whether or not your skills would be a good fit.
How else would I wind up as a VB.Net programmer and Excel VBA macro writer when my previous experience was 40+ years of first Fortran and then C in a succession of Unix/Ultrix/Linux environments? And I still tease them about the wisdom of hiring a then 62 year old programmer to replace the 65 year old guy who was retiring!
|
|
|
|
|
RDM Jr wrote: And I still tease them about the wisdom of hiring a then 62 year old programmer to replace the 65 year old guy who was retiring!
Well, if they didn't hire people your age, they could be accused of age discrimination.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Hey, are you my alter ego? 8)
I've just thought, maybe old programmers never die, they just become VBA devs...
Like you, I started with FORTRAN; then Algol68, Algol60, Pascal, assembler, C, C++, Java, PHP and a few others; now HTML5/CSS/JS, SQL, Python and VBA (Access).
By the time I reach 70, will I be reduced to Scratch?
HA HA Bonk!
|
|
|
|
|