Hacker Newsnew | past | comments | ask | show | jobs | submit | tloup's commentslogin

As a software dev I agree, and I've worked on some products I'd deem as a net positive to society. But there is just so much shit software out there.

As a German I wonder what the people where thinking programming VWs TDI system to activate emission controls only during testing, was it worth it? Polluting the environment and peoples lungs for a bit of money? It's not like dev jobs are a rarity in Germany. And yes I'm judgemental about this. And don't get me started on the things that are legal and still a detriment to society.


What were the execs that put a bunch of monkeys in an exhaust gas chamber to prove it was “clean diesel” thinking? Or the ones who signed off on the “Green Police” ad?


They could, but usually you don't want this to happen as an employee. Alternatively the court can force the employer to pay a severance if they regard the working conditions as untenable. An obvious example would be bullying at the workplace. But all of this is only applicable in the case of an unlawful termination.

Mostly if they want to get rid of you they offer you a severance.

It is also much more complicated than I can explain in a single post. For example, you can be fired for working "slowly", but you can't be fired if you are doing your best - even if all your colleagues are faster workers. It mainly depends on if you are doing your best.

E.g. your colleagues are able to dish out 100 pizzas in a typical evening but you only manage to make 50, and your boss wants to fire you. You don't agree and sue him. The court now has to decide if you perform so badly because of something that is "inherent" - which is called a "personenbedingte Kündigung" or in English dismissal on grounds of personal capability, or if it is based on your conduct. A dismissal on grounds of personal capability is usually deemed unlawful, as long as you give your best, if you consistently only manage to make 50 pizzas it seems like it, right? However if you willfully (!) perform badly the dismissal is usually deemed lawful. But, if you e.g. suffer from rheumatism and you can't perform the way you used to but you want to perform better, you just can't anymore it gets a bit complicated: the employer has to make a prognosis on how and if you are able to someday perform better again or if you could do another job. So, usually it is cheaper to offer someone a severance in that case.


Me too, like, you could start one of these agony aunt columns and nobody would notice. Maybe polish it a bit and you are good to go.


I thank you very much for your comment, you summed up my thoughts pretty well.


Am I the only one just googling for this stuff because it's way faster? like, "maximum value in array" gives:

var max = arr.reduce(function(a, b) { return Math.max(a, b); });

which is totally valid for javascript and also pretty neat. I would probably do some funny things with loops instead, wasting time and resources.


That particular question was not supposed to be a trick question. If the answer given in, say, Python was 'max(array),' I would have found the answer acceptable ('max' is an intrinsic function in Python); a better answer would be writing a for-loop. The person facing this question was an applied CS PhD (student at the time) at a Top-3 in Europe with prior working experience (IIRC).


That sounds an awful lot like panic not incompetence.


I didn't realise what it was like to panic in an interview until it happened to me - couldn't write code to detect whether two rectangles were overlapping even though I had been doing graphics programming for 10+ years at that point.

It was a CTO role and I'd just aced a presentation on "How to launch a new product" and I could not context switch to coding mode fast enough.


It happened to me once too, when I was still wet behind the ears, my mind went totally blank, could barely remember my own name. It didn’t help when one of the two men interviewing me said “look, we don’t want bullshitters here”.

I wonder if I’m one of the anecdotes about people in tech who can’t do the basics. That would at least amuse me somewhat.


I appreciate the sympathy, but, in this particular case, the question was part of homework, not on-the-spot pop whiteboarding. To this day, I find this curious. I asked folks at other firms, too, and apparently, this kind of phenomenon is common. Hence, all the damning statistics about the FizzBuzz.


My story: Years ago I went across country (ok it's UK!) for a position with an education startup. It was an all-day-er. The morning went well I aced the in person stuff, we gelled. Then I started to realise why I was there. Was I risking my marriage by taking a cross country position? Is the CEO just a bit too full of himself? What don't I trust about the product manager?

At the end is a hands on leet-code test. I cannot for the life of me remember what it was about. I do remember writing a function to replace 'abs', and realising that my brain was not even in the same county.

Yeah. People fail for all sorts of reasons. But when it's odd, maybe it is them. But beware. Maybe it's you.

I am glad I flunked hard in Bristol. I think I would have hated it. But then if I was a rubbish coder I would say that too.


Proctored homework? If not, I don't understand how he couldn't come up with a solution at all.


You can speculate but anyway there are all kinds of reasons a person can fail to do something that they are in fact capable of doing.

Sometimes people who have DECADES of walking experience just... fall.


No need to waste any time: Math.max(...arr)

Even when I know how to do something, I look it up just in case. Sometimes there's a cleaner approach, or I learn that I don't fully understand the problem.


In this case if you look it up on MDN you'll see that Math.max(...arr) isn't recommended for large arrays (ask me how I know)


I would suspect that. How do you know?

(this sort of discussion is what I'd love to see in a tech interview)


You're not the only one, but it's the equivalent of walking round a foreign country with a phrasebook versus being fluent in the native language. In this case, for example, you seem unaware that reduce is just doing a funny thing with a loop and won't be faster, but you've been seduced by shorter looking code because it looks more clever. There is, in fact, value in the reduce method but it's nothing to do with speed or efficiency (it's because it's declarative). But if this were Python, and the reduce was a call to numpy, then it would be about speed and efficiency. The point of doing stuff like leetcode is (or should be) to test real understanding of the technology, not an ability to copy/paste from StackOverflow.


But if you can grind these what's the point then? All I'm doing at work is building glorified crud apps. I'm sure it's what many, many software engineers are doing. Not all, but many. My understanding of e.g. Django is much more important to my daily work than being able to come up with the fastest way to find a maximum value in an array.


Nobody said anything about the fastest way to find a maximum value in an array. The comment you were replying to was just about finding a maximum value in an array. Idiomatic usage would presumably be a bonus but anything not ridiculously inefficient would be fine. This is absolutely something that someone building a CRUD app should know how to do without StackOverflow.


Sure, in a real world scenario you would Google the most efficient/elegant way to get the max item in an array. However in an interview situation, the interviewer is usually expecting a language agnostic approach, i.e. using loops.


That's my point, those questions are pointless. They don't show anything meaningful besides someones ability to learn a lot by heart. I mean, just based on the fact that someone asked if it was necessary to grind leetcode questions shows that you cannot gain any meaningful insight by asking questions like that.


Actually having to google something so basic makes your experience suspect. That's almost as bad as having to google for loop syntax in a language you say you know.


I have ADHD, I'm glad I can remember to not put the underwear on my head instead of where it belongs. Of course I can't remember how a for loop looks like, that's why some nice people invented code completion.


First, thank you to share so directly. HN is stronger for anecdata like this.

Let us assume that you are a competent worker that other firms want to hire. What is the best way to find people like you and to test/interview people with ADHD?

To be clear, I do not have ADHD, so I have no personal experience with this important topic.


I think homework would be fine, it really depends on the person. You can find people with ADHD who would crush these questions and others who wouldn't.

Personally... I had another profession before and was never asked anything during interviews. They just assumed I was capable because I had a degree, work experience and references. So I'm not quite sure where that even is coming from, it's unheard of in other professions.


Some companies want you to describe your solution, or say pseudo code is fine. But not every company will be completely honest about how much they actually do penalize for improper syntax.


You made two mistakes: You optimise prematurely and your assumption is incorrect.

Premature optimisation:

In most cases the performance would not matter. Instead of optimising for performance you should optimise for readability. IMHO IFs and FORs are way more readable in any context than any language specific methods like REDUCE and MAX.

Incorrect optimisation:

At least in modern browsers, simple IFs and FORs are the most optimised methods of doing anything. See for instance https://leanylabs.com/blog/js-forEach-map-reduce-vs-for-for_... (Operations per second, higher is better).


Conversely if I saw someone use a for loop (especially one with mutation) where a trivial usage higher order function existed, and I was giving a “leetcode” interview (which I refuse to do), I would take it as a signal that there is an important missing concept if it were not corrected when prompted.

The idea that “reduce” is language specific is frankly mind boggling. It’s no more language specific than a loop.


I am talking about my own time and resources, not those of a computer - say, it might take ~one hour to come up with a solution for problem x. It might very well be not the best solution either, just the one that works okay (we've all been there). Or I could look up what other people have done in 2 minutes - say I'm comparing solutions too, that would make it 10 minutes. That's 50 minutes of work I can spend elsewhere. Much more efficient.


I see. I completely agree.


Thank you for the nice exchange and learning opportunity though :)


As someone who prefers constructs like map, reduce, etc to loops this is a key example of why it’s important to a) ask why the candidate went that route and have a conversation about pros and cons and b) recognize that this is one of those no right answer opinion things and not hold it against them if they think different than you

Mind you I’m talking in general and now in browser specifically


Explicit loops are only more readable in languages that suck.


Well, the thread is about Javascript...

I take the exception that on this case in particular, the reduce is much more readable than a loop. Javascript isn't completely on the "anything non-imperative could as well be in machine code" league, but has plenty of problems that appear when you try to write other kinds of declarative code.


I'd go with `Math.max(...arr)` personally. Math.max is a variadic function, no need to add a reduce into the mix.


That implicitly calls Function.prototype.apply(), which will fail if given more arguments than an implementation-specific limit (https://stackoverflow.com/questions/22747068/is-there-a-max-...). Looping with reduce() avoids that restriction.


No, you are definitely not. But some insecure interviewer might feel this is an enormous red flag to be doing so.


>In Germany a device is considered alright if it has a CE printed on it and maybe some other numbers.

No. I'm a software engineer for clinical studies and medical devices and this is not true for any medical device, which includes antigen tests, at all. Also these tests had a time limited special permit which ran out a few months ago, which is why they were able to be sold. here is a FAQ about antigen tests: https://www.bfarm.de/DE/Medizinprodukte/_FAQ/Antigen-Tests/f...

>Die Neubewertung hat ergeben, dass ein gravierender Versorgungsengpass und damit das Interesse des Gesundheitsschutzes an einer Sonderzulassung entsprechender Tests nach § 11 Abs. 1 MPG durch das BfArM nicht mehr besteht. Diese Bewertung wird ab dem 15. Juli 2021 für die Antragsbewertung aller laufenden und neu eingehenden Anträge nach § 11 Abs. 1 MPG zugrunde gelegt.



It's because it is. The money they get from intubating and all care required covers the cost and makes a little profit, but there is no reason at all why they would do that to a person that doesn't need it. It takes a heavy toll on the doctors and nurses too. If a hospital director would run rampant and tell docs to willy nilly intubate someone it would be all over the news and doctors wouldn't agree to it either (they are in very short supply in Germany and wouldn't bother putting their reputation on the line).

You also have to be aware that around 25% of all Germans are in one way or another prone to believe in conspiracy theories, e.g. great reset and so on. Sadly I only have a German source on this, but this was a major point of discussion in the long running "Mitte Studie" which is one of the best and most rigorous studies about Germans and their political beliefs.


You probably mean steamed to death. if you blanch them, they mostly taste really good. of course, don't blanch potatos or something like that - but broccoli is a good example. Most people cook them until they are soft, but a short blanch is usually enough.


They certainly meant steamed to something. Blanching isn't steaming.


As a German I don't understand what you mean? Unions are always political, and leftist/socialist by nature. You can't separate politics and economics. And of course they are about solidarity, what else would give them the strength to strike for better working conditions?


They also destroy your clothes faster even if they are meant to be put in the dryer. All the stuff that's in the filter? Yeah, that's not actually useless lint, that was part of the fabric of your clothes. Clothes line is much better, also it doesn't cost you much, it rarely breaks, uses no energy. To me it's not inferior at all.


...if you have easy access to one, that is, which of course is often not the case if you live in an apartment.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: