|
I get it though. If you're trying to concentrate it can be unnerving to be distracted. I do that too... when we need focus then quiet is important.
Jeremy Falcon
|
|
|
|
|
Reminds me of when we went to California to see Disneyland / Sea world etc. One of the things that really got up the missus nose was that Americians would just shove you out of their way (she's quite small, but nimble), saying a very fake "sorry" at the same time.
We were on our way home from a trip to UK where she had just played hockey for New Zealand, and as such, she knows how to trip people up without it looking obvious. Anyhow, she started muttering about the next person who shoved her out of the way, would get it. I managed to convince her not to do it until some big tall american shoved her out of the way with a bit too much force and the customary fake "sorry". He ended up on his face and bleeding, but was very apolegetic as he thought it was all his fault, this time for once, genuine.
|
|
|
|
|
That's why I keep roughly 15,000,000 feet between me and California.
I will admit, however, that they do have bikini-wearing roller skaters, most of whom are female.
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 are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Well, I have mixed feelings about what you said.
First, I am from Brazil, but worked in NY for around two years, going back and forth from Brazil to US in this time period. What I felt was that NYers in general were much "colder" than people in Brazil. But that's ok, different cultures, different way people act towards each other.
I thought though that people sometimes were not polite. Like meeting in the elevator hall Brazilians and myself usually say a simple "Good Morning" greeting. I rarely saw anyone there that would actually do that besides myself and I often wouldn't hear a good morning back.
But, on the other hand, what I don't like about Brazil that I have to force myself into this false interest in someone else's life, otherwise I am seen as unfriendly compared to others here. I hate to demonstrate false interest and I had to start doing it in order to actually get collaboration from others. In that sense I wish Brazil was more like NY, I'd be thankful for that.
In the end I go through the same thing you do, having to hear someone ask how I am and don't even wait for my reply or having a quick chit chat I don't want to have with people I don't care about and I know that don't care about me.
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
Another reason you may have found NY'ers seeming cold is the cultural comfort distance. Each culture has a comfort distance for interaction when speaking/family/friends/business/strangers/not-speaking.
Latin American and Asian countries, for example, often have a much closer comfort distance than US (and largest, apparently, UK).
Thus, at a subconscious level, when in an environment where the distance differs significantly, there can be unintended signals. One steps back (to make their space), giving the impression they're unfriendly, whilst the other moves in (giving the impression of pushy). No conscious intentions. I actually learned to control the impulse - let the other person control the distance. Turns out to be much easier to get friendly.
So, along with the verbal customs (about which I bitch), there's the subconscious "we" and "not we" going on.
Bon Dia -
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 are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
W∴ Balboos wrote: cultural comfort distance.
Nice definition, I actually felt that and adapted through observation (like you said, I started to let the other person control the distance). So, after some time I felt at home.
W∴ Balboos wrote: So, along with the verbal customs (about which I bitch), there's the subconscious "we" and "not we" going on.
Yeah, I hate that too, it's one of the things I liked about NY, had to deal with that a lot less.
On another matter though, I found one curious thing that is fundamentally different from Brazil: I usually observed that groups were easily distinguishable. I would see asians hanging with asians, indians hanging with indians, americans with americans (sometimes racial separation within this group). I found it hard to establish a friendship relationship with americans, so most friends I made were actually europeans (not from GB) and latin americans (another distinguished group) which I believe, now that you said it, matched the cultural comfort distance.
Bom dia
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
Exactly!
If you think hiring a professional is expensive, wait until you hire an amateur! - Red Adair
|
|
|
|
|
You need to review a subject called Transactional Analysis.
What the other person was giving you is called a "Ritual Stroke".
It is a way of saying "I recognize your existence", if you want.
When you reply, you are returning the "ritual stroke", and no response should be expected after that as the "Transaction" is complete.
People would rather get yelled at than be ignored. If you grew up in a densely populated location like New York, that would explain your feelings on this issue, as there would not be enough hours in a lifetime for all of the "Ritual Strokes".
I suggest that if you are working, and the person breaks your concentration, let them know (in a polite manner) and they probably won't bother you again.
Angry old men need recognition, work opportunities, and young girls to flirt with too!
|
|
|
|
|
A greeting is recognition.
A question implies the need for an answer.
As for Transnational Analysis, or any other psych-related Gobble-D-Gook, it's mostly a crock - like a good horoscope: seems to fit well enough to convince (some) to believe it.
A question implies a request for an answer - and just walking on buy (which shows one doesn't care to listen) is rude, thoughtless, and a ritual stroke with sandpaper.
(Have you noticed I've a non-positive bias towards physiological tombs, psychologists, and other charlatans?)
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 are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
W∴ Balboos wrote: From the wise words of Alfred E. Newman: If you have nothing to say, don't say it.
"It is worth repeating at this point the theories that Ford had come up with, on his first encounter with human beings, to account for their peculiar habit of continually stating and restating the very very obvious, as in "It's a nice day," or "You're very tall," or "So this is it, we're going to die."
His first theory was that if human beings didn't keep exercising their lips, their mouths probably shriveled up.
After a few months of observation he had come up with a second theory, which was this--"If human beings don't keep exercising their lips, their brains start working.”
--Douglas Adams
|
|
|
|
|
This reminds me of that Budweiser commercial from a few Superbowls back. The scene was a bar somewhere in NYC, I'm guessing Brooklyn. A guy walks in, the barkeep says "How you doin'?" and the newcomer repeats back, "How you doin'?", goes to a seat. Another guy comes in, and the pleasantries are repeated. Then a third guy with a cowboy hat comes in, but when they barkeep says "How you doin'?" the obviously Southern dude answer "Why, I'm doin' fine, thanks for asking. I just got in today at the airport, and mighty big airport y'all have, and ..." and goes on and on, while the barkeep and other guys look at each other with obvious WTF looks on their faces."
If you think 'goto' is evil, try writing an Assembly program without JMP.
|
|
|
|
|
To hear the latest joke, post your cell # and we'll call you with it @ 11:59pm yer timezone.
Press #2 to opt for the earliest joke at 12:01:01 AM the next day.
|
|
|
|
|
I try to follow the best practices of DRY (don't repeat yourself), "a method does one thing only" (whatever the acronym for that is), and good naming conventions. Sometimes, they conflict. For example, I have a method for a web service that verifies an authentication token something like this:
VerifyToken(IContext context, Guid token)
{
bool ok = token == session.AuthenticationToken;
if (!ok)
{
RespondWithError(context);
}
return ok;
}
So, this method actually does two things -- it verifies the token and calls the error response if authentication fails. Oops -- fails the "do one thing only" test, and not the best name. But why? Because in my web service handlers, of which I have several, I have things like:
Handler(IContext context, RequestData data)
{
if (VerifyToken(context, data.Token) {...happy response...}
}
The idea being, I didn't want to repeat myself with every handler, which would then look like this:
Handler(IContext context, RequestData data)
{
if (VerifyToken(context, data.Token)
{...happy response...}
else
{...not so happy response...}
}
ok, so one best practice suffers to meet more of the goals of the other best practice. And perhaps I'm taking DRY too far.
And of course, this bit me yesterday, because I couldn't figure out why I was getting all sorts of bizarre errors, like connection already closed, content type already set, bytes being sent differs from content length, etc. It was really quite random. Turns out, on a new service call I was adding, I had written the second form (because I forgot that VerifyToken handled a bad token response, and on a bad token, both VerifyToken and my service handler were trying to write to the response stream, and depending on the state, it was already closed, etc., being that the response is handled on a separate thread.
So to help me not make that mistake again, I renamed the method to VerifyAndRespondIfTokenBad .
Then again, you might argue that the router should have handled the token validation for these particular service calls, and indeed, that would truly resolve the DRY issue, as the handler itself wouldn't even need to call VerifyToken as it should be guaranteed to be a valid request by the time it gets to the handler. And I agree, but that'll take more refactoring.
None-the-less, I found it an interesting case study, and in particular, how when thinking through the best practices, while one can come to the ideal solution, various compromises are often made.
And if you are going to complain about how bad Guid authentication is, don't -- these calls are being made between two servers over HTTPS which are running my code, and the likelihood of someone guessing the Guid is pretty darn small, unless there's something I don't know, which is definitely possible!
Marc
Latest Article - Create a Dockerized Python Fiddle Web App
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
You might find AOP (Aspect Oriented Programming) using something like PostSharp useful in cases like these.
modified 18-Jul-17 10:00am.
|
|
|
|
|
Jacquers wrote: ou might find AOP
True, but as a rule I avoid pre/post processors like PostSharp.
Marc
Latest Article - Create a Dockerized Python Fiddle Web App
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
Any specific reason? Because it 'hides' logic?
|
|
|
|
|
Jacquers wrote: Any specific reason? Because it 'hides' logic?
In part, yes. I did a relatively deep dive into AOP, gads, 14 years ago, and basically came to the conclusion that I had to no good use cases for it. The vast majority of examples are related to logging which becomes irrelevant when you use a good messaging architecture which can centralize the logging. Other use cases were arcane, often dealing with post-production code changes, which I found to be an unappetizing solution (maybe it sounded better in 2003). Basically, in every case, I found that AOP is a bandaid where in reality, a better architecture would solve the problem, well, better.
So it surprises me when I read on their site that 10% of Fortune 500 companies use PostSharp -- none of their sample topics sways me with a "oh, this solves a real problem" reaction. Then again, if you have a good use case, I'd definitely love to hear about it!
Marc
Latest Article - Create a Dockerized Python Fiddle Web App
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
It's been years since I used it, but it was for error logging
|
|
|
|
|
Jacquers wrote: but it was for error logging
Hah!
Marc
Latest Article - Create a Dockerized Python Fiddle Web App
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
Marc Clifton wrote: The vast majority of examples are related to logging which becomes irrelevant when you use a good messaging architecture which can centralize the logging
Perhaps we have a different definition of "logging" but what happens when the messaging service itself fails?
|
|
|
|
|
It is clear that your VerifyToken should only do that job. I would write the if and else block, because that is clean code. DRY has to step back.
Another solution is to overload the the VerifyToken function, but it can get weired.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
KarstenK wrote: It is clear that your VerifyToken should only do that job. I would write the if and else block, because that is clean code. DRY has to step back.
On that I agree as well, though I much rather like the idea that all these requests go to a specific pre-route handler that does the validation.
Marc
Latest Article - Create a Dockerized Python Fiddle Web App
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
Name it VerifyTokenX and you are out of Problem
Bruno
modified 19-Jan-21 21:04pm.
|
|
|
|
|
I'm all for the SRP (Single Responsibility Principle, now you know the acronym ), but you can take it too far.
Like my former "technical director" who heard about it from me and then told me how to implement it.
The result was a whole lot of single method classes that, I'll give him that, did only one thing
At some point in your code you just can't help but doing multiple things.
The only thing you can do is to minimize it and when you do multiple things at least make it things that belong together, like checking authentication and returning a response.
It's like "purely functional" languages, like Haskell. At some point they have to have side-effects, but they wrap it in a single function and keep the rest of the application "pure".
|
|
|
|
|
Hmm. For my money, I'd prioritize DRY (Don't Repeat Yourself) and SR (single responsibility) based on which option resulted in less code.
If you've got 100 discrete calls to VerifyToken() that you'd have to add else { error-handling-stuff; } to, I'd leave the error handling where it is.
On the other hand, if you've only got a couple calls to VerifyToken() , but the error handling is different for each case, then obviously you don't want it inside the function.
Software Zen: delete this;
|
|
|
|
|