Как иметь дело с неподходящим [закрытым] управлением

При этом учитывается только 2030 год или любой год < 2019. По крайней мере, так говорит вопрос. (Я подозреваю, что там что-то нечеткое.)

Это выбирает один ряд на id, с последним годом первым.

SELECT DISTINCT ON (id) *
FROM   tbl
ORDER  BY id, year DESC
WHERE (year = 2030 OR year < 2019);

Если может быть несколько строк с одним и тем же (id, year), вам нужен тай-брейк.
Об этом и дополнительных подробностях для DISTINCT ON:

6
задан lothar 7 May 2009 в 22:22
поделиться

7 ответов

Regarding the code review, I would say make them happy. Name and space things the way they like. Focus your time on better design, of course, and enjoy the ADA reminiscing, it still can give you some background of where things are today and how they got there.

In other words, don't take that part too seriously. Worry about what is important to getting the job done. The job in this case is making those that matter feel you made a positive contribution to the project.

Regarding Log4j, I would just suggest a different framework. Either the built in JDK logging (can't complain about that, it is a built in API) or something like SLF, which lets you plug in whatever you want (including your own, I guess, which you can then throw away and replace with something real when they realize it was a mistake, and you only have to change the classpath).

Now there will be times where it is important. In that case, make it sound as much as possible that it is their idea. For example, on the logging, state that there are many logging frameworks out there that represent a lot of lines of code, and you were wondering if there are other ways to leverage that work for this project, and then let them "figure out" the solution.

There will be times when you have to push something as your idea - there will be no other way. In that case stick to the evidence, martial allies as much as possible by keeping relationships with those that do have influence in good standing, and realize that every battle you fight, you lose position, even if you win (perhaps especially if you win).

11
ответ дан 10 December 2019 в 02:52
поделиться

I'd recommend approaching your concerns as 'suggestions'. Make a suggestion and ask for their opinion on it, that way they feel as if they are still in control even though you've planted the seed and are directing the conversation.

Regardless of how long you have been with an organization, you are there and you are there for a reason (they hired you for your input). Find your voice and how to best approach your team members with suggestions and/or concerns. This is a crucial part of being a team member and will increase your value.

3
ответ дан 10 December 2019 в 02:52
поделиться

Get a good formatter and create you method names this which they cannot complain about then your discussion can move onto real issues.

Some people cannot get over these little details during reviews, so you need to make it a non-issue.

1
ответ дан 10 December 2019 в 02:52
поделиться

Ваша работа должна заслужить доверие, прежде чем вас будут слушать. Так что да, делайте то, что рекомендуют другие, и убедитесь, что соблюдаются неважные законы о форматировании. Но также выполняйте такую ​​качественную работу, что они не могут игнорировать или маргинализировать вас. Постарайтесь направить их так, чтобы они думали, что идеи исходят от них.

1
ответ дан 10 December 2019 в 02:52
поделиться

I disagree with the recommendation of another logging framework besides log4j. Citing an old review, without any kind of personal experience, should not win the day here.

However, there might be a way to turn this to your advantage. If you agree and recommend the logging built into the JDK or Apache Commons logging, you'll find that both are quite similar and can actually use log4j as their underlying implementation.

If your adversary isn't paying much attention, you may win points for giving in and avoiding a bike shed argument and STILL get what you want.

0
ответ дан 10 December 2019 в 02:52
поделиться

Мой гость, ты ошибаешься. Неправильно с самого начала.

Снова мой гость: не стесняйтесь ПРИНИМАТЬ реакцию на возражения!

Возможно, вы пройдете это звание: новичок.

Примечание: руководство - наши работодатели. Они платят нам столько, сколько мы можем им помочь. Если они не хотят вас, вы ошибаетесь - и они правы, поскольку мы говорим о деньгах. Если ваше право только на вашу книгу, у вас проблема ...

-9
ответ дан 10 December 2019 в 02:52
поделиться

Respect your elders I say! :)

Really though, just remember that a lot of these gray beards were probably programming while you were in diapers. That doesn't make them experts in the latest technologies, but it should at least earn your respect. And sometimes if you can find a way to look past all the hemming and hawing and "back in my day" stuff, you can pick up some pearls of wisdom from those old dogs!

Now from the programming perspective, looks like Yishai has it right. It should be pretty easy to conform to the coding styles they want, and once you've made them happy you can run with the code the way you want.

And if you have to present a counter opinion, back it up. If you want to use something like log4j, talk about SPECIFIC projects in your past where you've used it and it worked fine, and offer to help anyone get past any problems they have with it, etc. etc.

Remember, while you look at the old gray beards as not knowing how to do some cool new programming, they probably see you as a young whipper snappers with a lot of crazy ideas out to change the world. An ounce of patience will get you a pound of respect.

1
ответ дан 10 December 2019 в 02:52
поделиться
Другие вопросы по тегам:

Похожие вопросы: