Humor Random Comments Thread

I had a shower-thought. Tell me how stupid it is.

In programming, I get tired of typing out
Code:
var > a && var < b
and
Code:
var < a || var > b

I want to abbreviate this.

Proposed syntax:
Code:
var >< a:b
checks if var is between a and b
Code:
var <> a:b
checks if var is outside of the range a to b

further fun:
Code:
var >=< a:b
and
Code:
var <=> a:b
could be the same as the above checks but inclusive of a and b

If only one end of the range is to be inclusive, then you do it the old way without these new comparison operators.

Is this somehow stupid? Is it already a thing in some language? Is it possible to implement in popular languages? I know that C++ allows operator overloading, but I don't know if that includes making up new comparison operators. I suppose it would be best done in some preprocessor/macro way.
 
Why not write "var | interval" and define an operator like: template<T> bool operator | (T , interval<T>)...

Yes, its nasty. But should work out. But I personally prefer something like:

if (isIn(a, var, b)) because it is the solution of the least surprise.
 
On one hand, built-in operators are great for simplifying basic code, but on the other, they're still yet another language-specific thing the programmer has to remember.
 
On one hand, built-in operators are great for simplifying basic code, but on the other, they're still yet another language-specific thing the programmer has to remember.

Is that not what documentation is for?
 
Is that not what documentation is for?

There is still a principle of the least surprise. You should always design your software in the sense, that it is only rarely surprising the programmer to be different than expected. The less you need to refer to the documentation, the better.
 
The less you need to refer to the documentation, the better.

As a HD engineer that can be remotely working on anything from Citrix to CRM to weird purchased proprietary programs at the drop of a hat, I can both fervently acknowledge and yet at the same time completely despise this statement. :lol:
 
This can't end well...
rKoQ8gl.jpg
 
I just saw someone describe asociality as "unhealthy". Why? I'm just not an outgoing person who actively seeks out friendships.
 
Last edited:
I just saw someone describe asociality as "unhealthy". Why? I'm just not an outgoing person who actively seeks out friendships.

Since many diseases spread in places where many humans come together, yes, it is a bit hard to believe. :lol:

But there is also another part of health, the mental health - trust me: You need to be around people from time to time. Just make sure they are the right people. ;)

Especially since social skills are extremely important in life and you don't learn them in 5 minutes when you need them.
 
It's not like I'm living in the mountains, though.

I mean, I'm probably going to be fine living with dormmates, or working with other people (eventually/hopefully). But I'd rather stay inside than try to meet new people.
 
Last edited:
I mean, I'm probably going to be fine living with dormmates, or working with other people (eventually/hopefully). But I'd rather stay inside than go to some party, or try to meet new people.

Living with roommates is harder than it sounds sometimes. ;)

Just sayin
 
Last edited:
Just found out the hard way that BSCCO, the superconductive ceramic, is quite fragile.
Dammit.
 
Just found out the hard way that BSCCO, the superconductive ceramic, is quite fragile.
Dammit.

For the love of :probe:, please tell me that this is being discovered in the construction phase of your latest mad science project, and not while it's in use. :uhh:
 
It's not like I'm living in the mountains, though.

I mean, I'm probably going to be fine living with dormmates, or working with other people (eventually/hopefully). But I'd rather stay inside than try to meet new people.

There is just one problem: If you are going to take your future job serious, you are going to meet new people. You will even meet people you will not like and who actually don't like you - and you will have to handle it. And everyday, you will also meet your true inner self and be forced to get through the day with that bastard (Which I personally find much harder. For example, its easier to notice how angry other people are, than to notice how angry you are yourself in a critical situation).

So. Believe me, I am also a pretty introvert. I also don't like to party with everyone. I feel stressed among masses of humans (Buying shoes gets me a heartbeat rate like a fighter pilot :rofl: ) - but still: I have learned very quickly that the days of the young talented programmer hidden in the dark, calm basement are over. And you will have the same choice: Stay an unsecure teenager for the rest of your life - or grow with your challenges.

And I really recommend the latter, because it is really depressing if everyday stays the same day with different artificial aroma.
 
For the love of :probe:, please tell me that this is being discovered in the construction phase of your latest mad science project, and not while it's in use. :uhh:

You know, the real danger isn't Putin, it's just Artlav messing about in his basement on the weekends.

Doctorates kill, people.
 
Back
Top