Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "operator"
-
It happened! It finally happened.
I got to use the XOR operator today, for the first time in my 10 years of development.
Now I feel complete. I am senior developer now!9 -
So there is this girl who was trying to be cute and wrote a mock C code for me :
She wrote :
If(existence=disapointment)
printf("kill self");
else
printf("what else??");
And without hesitating I told her that her code had a fault in it and it would always print "kill self" no matter what the level of disappointment is. And asked her to fix it.
The way she fixed it was probably best described as the situation when you have no idea what you are doing and you don't try to understand either. (or was simply passive aggressive) :
If(existence=disapointment)
printf("kill self");
else
printf("kill self");
Honestly though I hope she was being passive aggressive because boy do I pity people who confuse between '=' and '=='12 -
Dev: why should I develop windows phone apps. Almost nobody uses this kind of shit.
Customer: Why should I use a fucking windows phone. The windows app store is as empty as a ghost town.31 -
I still believe more people would use the voice assistant if they replaced "Okay Google" with "Operator".6
-
I actually hate this job, seems like there's not a single project with decent code abstraction. Everything is a fucking spaghetti like:
```
// we only care about e-mail fields, which are odd
isValid(index) {
if(!(index%2)) {
return true;
}
...
}
```
Like MOTHERFUCKER, WHAT BUSINESS RULE DOES THIS SHITCODE REFLECTS?!?! WHY CAN'T YOU SHITHEADS WRITE PROPER BUSINESS ABSTRACTION RATHER THAN JUST COLLEGE-GRADUATE QUALITY SHITCODE.
FUCKING KILL ME ALREADY I SHOULD HAVE INSTEAD BECAME A PSYCHIC CAUSE I'M SURELY GOOD AT GUESSING WHAT THE FUCKING FUCK THIS FUCKING FUCKCODE INTENDS TO ACHIEVE.
AND YOU CALL YOURSELF TOP-NOTCH DEV CAUSE THIS IS JAVASCRIPT... YOU KNOW WHAT, SHITHEADS LIKE YOU, WHO DON'T KNOW SHIT OTHER THAN GLOBALLING EVERY FUCKING NPM LOCAL PACKAGE IS WHY GOOD ENGINEER LIKE US GET SHIT FROM PHPEPSI ZENDFRAMESHIT FUCKHEADS DEVS.
DO YOU THINK YOUR COMMENT WAS HELPFUL??? DO I LOOK LIKE A BUSINESS GRADUATE FUCKTARD WHO DOESN'T KNOW WHAT THE FUCK THE MODULE OPERATOR IS??? I WANT TO KNOW WHY YOU WROTE THAT SHITFUCK INSTEAD OF WHAT IT DOES; THE REASON I'M READING YOUR POORLY WRITTEN MODULE OPERATOR SOAP-OPERA IN THE FIRST PLACE IS CAUSE I KNOW WHAT IT'S DOING, IT'S BREAKING SHIT.
OH AND ONE MORE THING, FUCK YOU FUCK FUCK FUCKSHIT SHITFUCK FUCk11 -
I challenged my girlfriend (and myself) for the FizzBuzz thingy. I did it in js (because I suck at js) and she in Java. I never saw such a way to write FizzBuzz. Turns out she forgot there is a thing called modulo operator.
I know there are more elegant ways to solve it! Feel free to post your favorites.46 -
I just invented a new JavaScript operator. It's named "plus with wings", and it's used to sum to numbers without ambiguity or any need of type conversion, for example:
3 -+- "2" // 5
"2.1" -+- "4" // 6.1
"-1.1" -+- "" // -1.1
So, from now, you won't have to wonder anymore what type is that variable.
Tested on all browsers25 -
What?!?
There is an ^= operator in Java for booleans. I have been programming in Java for 4 years now and never knew this. Like b ^= true will flip b.
Mind blown; this is the greatest thing ever14 -
So, continuing the story, in reverse order, on the warship and its domain setup...
One day, the CO told me that we needed to set up a proper "network". Until now, the "network" was just an old Telcom switch, and an online HDD. No DHCP, no nothing. The computers dropped to the default 169.254.0.0/16 link local block of addresses, the HDD was open to all, cute stuff. I do some research and present to him a few options. To start things off, and to show them that a proper setup is better and more functional, I set up a linux server on one old PC.
The CO is reluctant to approve of the money needed (as I have written before, budget constraints in the military is the stuff of nightmares, people there expect proper setups with two toothpicks and a rubber band). So, I employ the very principles I learned from the holy book Bastard Operator From Hell: terrorizing with intimidating-looking things. I show him the linux server, green letters over black font, ngrep -x running (it spooks many people to be shown that). After some techno-babble I got approval for a proper rack server and new PCs. Then came the hard part: convincing him to ditch the old Telcom switch in favour of a new CISCO Catalyst one.
Three hours of non-stop barrage. Long papers of NATO specifications on security standards. Subliminal threats on security compromises. God, I never knew I would have to stoop so low. How little did I know that after that...
Came the horrors of user support.
Moral of the story: an old greek saying says "even a saint needs terrorizing". Keep that in mind.4 -
For my fellow javascript devs:
var floored = 12.68 | 0;
Is much faster than:
var floored = Math.floor(12.68);
And in both cases floored === 12
#JustJavascriptThings ¯\_(ツ)_/¯
Source: http://stackoverflow.com/questions/...
Performance test: https://measurethat.net/Benchmarks/...5 -
That'd be Linux for sure. I love how it allows its operator to do anything they please, without any lockdown or nannying. How I own the piece of software (given copyright compliance of course), rather than being just (temporarily) licensed to use it. How I can customize it into whatever shape I want. How it allows pretty much anyone to contribute. And redistribution! Yes, the hundreds if not thousands of distributions and appliances that use it! Simply amazing.1
-
Show your programming knowledge! Using the images on the left, click or tap on the one that represents the 'increment operator'11
-
Kotlin: I don't have ternary operator, it's bad for readability
Swift: I removed ++ and --, cause they are old fashioned
Dart: *screams*23 -
!dev
Train operator: "Dear Valued Passanger: GET THE FUCK OUT OF THE DOOR OR LEAVE MY TRAIN."
At least it was what he'd like to say, based on his voice :/rant pissed train operator failed attitude you can't hide your feelings train what you really want to say3 -
Why is the ternary operator such a hated thing? I constantly hear people saying it's less readable, confusing, etc.
I think it's a beautiful, useful, and important operator and I use it constantly wherever readability won't be much affected.
How can you justify a repetitive if/else structure over a ternary, given that you're sure you're not going to put anything else in the ifs?
Whatever happened to DRY?
Whatever happened to KISS?
If those guidelines are what you code by, what's the excuse not to use it?
Because you can't read it as well? Familiarity breeds comprehension and legibility, my dudes.15 -
My first poem for programmer girl 😘😘😘
My life is incomplete without you,
You are semicolon of my life
You are my increment operator,
you make my value increases
I am username and you are my password,
without you No one can access me
You are my initializer,
without you my life would point to nothing (NULL or “0”)
If I were a function you must be my parameter,
Because I will always need you
Can you be my private variable?
I want to be only one who can access you
You are my compiler,
My life wouldn’t start without you
You are my loop condition ,
I keep coming back to you
My love to you is like recursive function,
It will never ends & Will never enter into infinite loop
Forever and Ever10 -
A few weeks ago a client called me. His application contains a lot of data, including email addresses (local part and domain stored separately in SQL database). The application can filter data based on the domain part of the addresses. He ask me why sub.example.com is not included when he asked the application for example.com. I said: No problem, I can add this feature to the application, but the process will take a longer.
Client: No problem, please add this ASAP.
So, the next day I changed some of the SQL queries to lookup using the LIKE operator.
After a week the client called again: The process is really slow, how can this be?
Me: Well, you asked me to filter the subdomains as well. Before, the application could easily find all the domains (SQL index), but now it has to compare all the domains to check if it ends with the domain you are looking for.
Client: Okay, but why is it a lot slower than before?
Me: Do you have a dictionary in your office?
<Client search for a dictionary, came back with one>
Me: give me the definition of the word "time"
<Client gives definition of time>
Me: Give me the definition of all words ending with "time"
Client: But, ...
Never heard from him again on this issues :-P5 -
Just spoke with another teams developer. (She's using Java)
Her: so we get a json object from your service, I want an array
Me: well that's not what you said in the specs... And it's not hard since it's just a Map
Her: what Map? It's JSonObject I need an Array
Me: give me the library your using..
Her: here...
I Google the documentation and methods and paste the link and the methods to use:
-length (she also wanted count)
-toJsonArray
This ain't JS, just use the . operator and go thru all the methods' docs... Or learn to use Google8 -
I was searching through StackOverflow when I found this guy:
He is using a "dot operator" in LINQ at the end of the Query
Example:
a.Where().
Select();
Not
a.Where()
.Select();
How barbaric2 -
During my first-ever technical interview, the interviewer asked me "Do you know the FizzBuzz problem?"
"Uhh, not really." (I was just thinking ok this problem has a name, must be some algorithm problem)
"So the problem is basically to give you the numbers 1 to 100, if the number is divisible by 3, print 'Fizz', if divisible by 5, print 'Buzz', if divisible by 3 and 5, print 'FizzBuzz'. For other numbers just print out the number itself."
After hearing the problem, I felt so many ideas popping out of my stressed brain.
I thought for a bit and said "ok, so if the digit sum of a number is a multiple of 3, then the number is divisible by 3, and if the last digit is either 0 or 5, it's divisible by 5."
Then I started to code out my solution until the interviewer said "there's an easier solution. Can you think of it?"
This stressed me out even more.
I thought for a bit and said "well, starting from 3, keep a counter that records how many iterations are done after 3. When the counter hits 3, that number would be divisible by 3 for sure. Should I try this solution?"
The interviewer said "Sure." So I started again.
However, I struggled for about another 3min until I realized this solution is a lot harder to implement. The interviewer probably saw my struggle too.
This was the point where he stepped in and asked me "Ummmm there's an easy way of solving this. Have you heard of the MODULO OPERATOR?"
In sheer embarrassment, I finished the code in 30s.
Of course, there was no further question after this, and I felt the need to seriously reevaluate my intelligence afterwards.15 -
!dev && rant
I just saw this video about car insurance and how they're essentially legal fraud. As I'm looking to get a driver's license and get myself a secondhand car, I looked what the costs actually are for mandatory car insurance that gets people so worked up...
€400 per fucking year?! And many companies that get well into the €1000?!!!! No surprise that people get so worked up about it! The budget of my entire fucking car would be only around €2000!!!!
Guess I'll be looking into building an electric bike then.. money grabbing corporate motherfuckers! And what for.. only because the average driver is a clueless operator of a killing machine?! FUCK THIS SHIT!!! 🤬15 -
Ruby’s fanciness bit me in the butt today. It’s pretty rare, but often confusing AF when it happens.
array = [1, 2, 3, 4, 5, 6, 7]
array.count +1 +2
# => 1
What the fuck?
array.count +1 +2 +3
# => 1
What the fuck?
+1 +2 +3
# => 6
Okay.
(array.count +1 +2 +3)
# => 1
What the fuck?
(7 +1 +2 +3)
# => 13
Okay...
array.count + 1 + 2 + 3
# => 13
Alright, so spaces matter here...?
((array.count) +1 +2 +3)
# => 13
But not here!? ... Oh. I think I know what’s going on.
Array#count
Returns the number of elements. If an argument is given, counts the number of elements which equal it using ==
Well fuck me.
Ruby is seeing `array.count(+1+2+3)` instead of `array.count()+1+2+3` since `+1` is a value, not an operator followed by a value as is the case with `+ 1`.
Now, why was I using +1 +2 instead of adding some spaces like I normally would? So they would match what was in the comment next to them for easier reference. Heh.
Future dev, I did this for you! So this is all your fault. :|36 -
Near the end of a massive (1,000 user bridgeline) conference call today:
[ P = presenter, RCn = random caller n ]
P: ...so, does anyone have any other questions they'd like to---
RC1: Hey! Yeah, I'm still on this STUPID call right now... I dunno, we've been in here for like 30 minutes already - The guy came by the house to talk about it, but I couldn't get off this STUPID call - I think they said it would be around 800 dollars...
[ P, RC1, RC2, RC3, RC4 all overlapping ]
P: Um, we can hear you-
RC2: Dude, mute your phone!
RC3: As the presenter, you can mute that guy from the web UI-
P: Yeah, I can't find him in the attendee list; it's so long-
RC3: -Right-click on his name and select "mute line"-
P: I know how, but I can't find him on the list.
RC3: Find him on the attendance list on the right side-
P: [ louder and louder ] Yes, I know - but I can't find him in the list-
RC4: Should someone call an operator?
RC1: -so I figured we'll probably need to call Jerry and see what he says. I'll call him if I can ever get off this ridiculous, STUPID call - They are all talking at once on there now and no one can understand anything!
[ This went on for about 5 solid minutes, finally ending with... ]
RC1: I'm just going to drop this STUPID call and call Jerry for us. This thing was a total waste of time. [ boop-beep ]
[ long pause ]
P: OK, so now that is over, does anyone have any questions they'd like to discuss?
[ At least 10 people un-mute and overlap questions ]
#ConferenceCallProblems
Above everything else, the funniest part to me was his repeated, over-the-top insistence on how "STUPID" the call was.
#TellUsHowYouReallyFeel1 -
SWIFT!!!!! I understand that you're a relatively new language so I forgave you for all of your wrong doings..BUT WHAT THE FINGER IS THIS SHIT YOU HAVE IMPLEMENTED IN YOUR STRING DATATYPE? WHY THE FUCK CAN'T YOU FORM A CHARACTER FROM AN EMPTY STRING? AND WHAT THE ACTUAL FUCK HAPPENED TO THE SUBSCRIPT OPERATOR? WHY NOT JUST ADOPT THE "\0" AS OTHER LANGUAGES? But NOOOOO...We're Apple we'll not adopt it..I WAS UNDER THE IMPRESSION THAT STUPIDITY AND LUCK OF INNOVATION RAN IN THE IPHONE TEAM BUT APPARENTLY ITS EVERYWHERE..Its annoying because the String datatype is one of the most common and basic data types so the last thing you expect is this shit..APPLE........SERIOUSLY AND SINCERELY FUCK OFF4
-
Earlier I signed up on this forum called NulledBB. Basically some hacker skiddie forum that had a dump of an archive I wanted, unfortunately behind a paywall which I didn't want to bother with.
On signup I noticed that I couldn't use my domain as an email address, as I usually do (the domain is a catch-all which means that mail addresses can be made up for each service I sign up to on the fly, super useful). They did expose the regex that they accepted email as however, which included something along the lines of "@live.*".
So I figured, why not register a subdomain live.nixmagic.com real quick and put that into the mail servers? Didn't take too long and that's what I eventually went with, and registered as somepissedoffsysop@live.nixmagic.com (which I have no trouble putting on a public forum as you'll see in a minute).
Still didn't manage to get that archive I wanted but I figured, fuck it. It's a throwaway account anyway. But eventually that email address started to receive spam. Stupid motherfucker of a forum operator with his Kali skidmachine probably leaked it.
Usually I just blacklist the email address in SpamAssassin by adding an additional spam score of 100 to email sent to such addresses. But in that case it didn't even sit on the main domain, thanks to that stupid regex block from earlier... 😏
*Logs into my domain admin panel*
*Le rm on the live.nixmagic.com record*
Null routed entirely.. nulled, if you will! 🙃3 -
Hoozay! I'm now starting to become an adult! (or atleast, that's what they expect of me)
myAge:
.long 19
main:
push rbp
mov rbp, rsp
mov eax, DWORD PTR myAge[rip]
add eax, 1
mov DWORD PTR myAge[rip], eax
mov eax, DWORD PTR myAge[rip]
mov esi, eax
mov edi, OFFSET FLAT:_ZSt4cout
call std::basic_ostream<char, std::char_traits<char> >::operator<<(int)
mov eax, 0
pop rbp
ret
__static_initialization_and_destruction_0(int, int):
push rbp
mov rbp, rsp
sub rsp, 16
mov DWORD PTR [rbp-4], edi
mov DWORD PTR [rbp-8], esi
cmp DWORD PTR [rbp-4], 1
jne .L5
cmp DWORD PTR [rbp-8], 65535
jne .L5
mov edi, OFFSET FLAT:_ZStL8__ioinit
call std::ios_base::Init::Init() [complete object constructor]
mov edx, OFFSET FLAT:__dso_handle
mov esi, OFFSET FLAT:_ZStL8__ioinit
mov edi, OFFSET FLAT:_ZNSt8ios_base4InitD1Ev
call __cxa_atexit
.L5:
nop
leave
ret
_GLOBAL__sub_I_myAge:
push rbp
mov rbp, rsp
mov esi, 65535
mov edi, 1
call __static_initialization_and_destruction_0(int, int)
pop rbp
ret12 -
Saw a lot of posts on social media recently where people highlight a specific quote/sentence from a book/ebook and post it's picture online.
It only I could do the same with the killer ass functions I wrote, or the fifth degree nested ternary operator line of code I wrote that makes the whole component work and is the most beautiful thing I've ever seen. -
Continuation of https://devrant.com/rants/642962/...
You are the decryption key to my encryption,
No one can access my heart except you.
You are the loop in my life,
I always keep coming back to you.
You are my nodemon,
You are always watching over me.
You are the / to everything I do,
Am nothing without you and I will always preserve you.
You are my increment operator,
You add value to my life.
To be continued 😉3 -
This week in Programming Language appreciation: the multiplication operator in Python. You can use it on strings and arrays for incredible ease of use. For a horizontal line in a terminal?
print("-" * 30)
Very helpful, and I have used it a lot. And I miss it in other languages.15 -
!rant
Today was a lot. I heard water outside and some shouting, come to find out the upstairs neighbor’s pipe burst. Spent the next hour or two collecting as much water as possible in the coolers we have to try to move it to the storm drain and protect the downstairs neighbor’s apartment. You'd be amazed how much water can fish out of a broken pipe.
Spent a nice hour or two chatting with the downstairs neighbor after they asked what happened (having just realized the water was shut off and having missed all the activity).
Was just settling down from that when I heard a kid screaming for help and panicked shouting. Come to find out my favorite neighbor is unresponsive and can't breathe and her kids are all panicked and waiting for the ambulance. The 911 operator is trying to give them instructions but they're too panicked to listen. I get them to move her onto the floor, then finally get the oldest to do chest compressions until the ambulance shows up. The paramedics managed to get her back, she was breathing on her own and talking, and take her to the hospital but it took a long time to get there. Hugged the heck out of everyone who seemed like they needed it and tried to say comforting shit that it seemed like they needed to hear.
I haven't felt this emotionally tapped out in a long-ass time.7 -
Years ago I used to work a guvmant site. They had really strict security rules for internet and how you spent your time. Makes sense considering what that site did. I was a support engineer for some of their process control equipment.
I was approached by an operator supervisor to install dvd player software on a business machine (non process related). Basically just a general purpose PC with no function other than time cards and general office use. I was fine with the request, but the reason was for watching movies during a holiday period by the operators. Not for anything official. So I made some noise about my dislike of this request feigning moral superiority. But the supervisor swore up and down it was for "training" dvds.
So I wrote a simple windows script. The script basically popped up a window that said:
"Security has detected unauthorized media inserted into this machine. Please state the reason for this infraction." It provided a dialog to enter a justification. After you entered the justification it said: "Security has been contacted and your user logged. You will be contacted shortly."
This script was then attached to the supervisors Start folder so it ran when he, and only he logged in. We made sure the "training" video (some movie) was already inserted at this point.
He logged in. He just about shit his pants when reading this. He promptly logged and left the building to walk somewhere else in the site. We called him and let him know it was a gag. His response: That son of a bitch Demolishun!2 -
After investigation, I'm just refreshing my os and hoping I can reconfigure work applications. Feel bad, but help desk friends are getting me the software to install and are helping me out on a day off.
Wasn't the application like I thought. It was the useless update that won't install and therefore can't be rolled back but is still getting in the way of my work, therefore they can all daisy chain their dicks together in the sane manner little kids make daisy crowns, and then have a steamroller head towards them with faulty brakes (steamroller operator is innocent in this scenario, he jumps out safely).
I'm planning on calling Microsoft in the morning to tell them what I think of them at the moment. But I'm too angry to form words that don't sound petty and childish. I'm open to suggestions.2 -
Coming back here after years to rant about... myself.
TLDR: I fucked up and now have to call a thousand people as a dev, I'm not even getting paid for it and they all get crazy about a random ID that got assigned to them, so now I want to throw away all my electronics and become a skilift operator.
Stupid me deployed a project shortly before we have the largest amount of orders in the year. (Like 90% of yearly orders in a couple minutes cause they are sold out fast and people wait to order first)
I got this horrible legacy "plain self written framework php" project which I tried to upgrade state of the art.
There was one piece missing to upgrade everything and nicely deploy it to some fresh new servers which can handle the high load which peaks at the time orders open.
So I did it the day before orders open and... everything worked well! Nothing crashed.
I wrote my client to wait a little before he confirms the orders, since after confirmation each of the people who ordered will receive an email where they can choose a unique number which they'll receive as a sticker with the order.
Since it's an event my client is promoting, people will meet each other wearing those unique stickers and being able to identify each other online and in person with this number.
Suddenly my clients call me that "customers are complaining about that there is something wrong"
Turned out he confirmed all orders straight away and that part of the application which makes the number unique was broken on the update.
So everyone could chose any number (also taken ones) as his "unique" number.
In my panic, I told my client "It's my mistake, I'll deal with it of course and call the affected people in my free time, since it's my mistake you don't have to pay for it". (it's my largest client by far, am a freelancer)
Realizing when people can chose any number it'll not be a few ones who have the same, it's like almost everyone did chose "69", "1", "420", "88 (a scary amount of people)",... (with 69 being the number being chosen by most people btw, even more then "1")
So now I have to call about a thousand people telling them a new random ID will be assigned to them. I thought of course about mailing them, wrote a script that deals with the issue automatically, and FUCKED IT UP TOO so everyone is confused and the only way to deal with it is by a call basically.
And while I'm sitting here now for 2 days straight calling people in my free time about their random ID will have to change, I realized that some people are quite crazy about random ID's.
I'm talking about yelling and threatening because "is it too much to ask for a working website when ordering this expensive product".
I hate my life right now and am getting quite serious about throwing all my electronic devices away and become a skilift operator instead. Fuck the higher pay, it's not worth the shit, I wanna have only responsibility about one button to press while watching people fall on their face.5 -
I work in a contract position and reviewed the code of a senior engineer recently. Regretfully I can't provide context to preserve anonymity.
He wrote awful JavaScript;
- handled a single DOM element with 2 different frontend libraries
- used the logical operator && to 'chain' two methods (it didn't work) instead of returning a boolean value,
- broke everything down into minute detail (a comment box had 7 components!),
- API calls were made for every component update instead of maintaining local component state where it made sense, which meant UI updates were slow,
- animated EVERYTHING, which made my Firefox on Xubuntu i7 64bit with 16GB RAM beg for mercy.
I had a rough couple of months with interviews, with 2nd stage technical interviewers throwing impossible tasks at me.
Example:
1. Create an online Python code editor with Javascript which can compile Python bytecode,
2. Use Mesos and Kafka to create real time architecture for Tensorflow with a Javascript frontend in 1 day. (I asked, and wasn't allowed to use Kubernetes or serverless architecture),
3. Hack a website from the browser's address bar using parameters ( what?!! ),
Obviously, the next time I meet a 'senior', I'm going to tell him talk is cheap;
'SHOW ME YOUR CODE.'3 -
We all know you can't "learn x programming language in a day" without travelling to the Arctic and catching a day that last half a year.
But what's the worst language to try and learn in a day?
I vote c++. Manual memory management, multiple inheritance, static compilation, operator overloading, and generally non-human syntax ( Like std::cout << "This is how you print!" << std::endl; ) make it a difficult one to attempt in a day.26 -
Why do people like hiring managers at companies seem to think that because you are paid to code you spend your spare time coding?
You don't expect a surgeon to operate all day then go home and randomly start cutting people up, so don't expect a code surgeon to spend all day coding to go clock off the start hacking away at shit either!10 -
A project manager, a computer programmer and a computer operator are driving down the road when the car they are in here a flat tire. three men try to solve the problem
the project manager said: let's catch a cab and in ten minutes we will reach out destination.
the computer programmer said: we have drivers guide.I can easily replace the flat tire and continue our drive.
commuter operator said: first of all turnoff the engine and turn it on again. may be it will fix the problem.
suddenly a Microsoft engineer passed by and said: try to close all windows, get off the car, and then get on and try again. -
Was so confused what the new walrus operator did. Why don't the docs give a simple comparison example like this?5
-
I'm having a DAY.
it's like I'm trying to "2+2=4" and hitting "unknown operator =", figure that out, get "22" back, fix that, then math service is down, redeploy math service, wait 30 minutes, that's up, get "out of numbers" exception, turns out a dependency updated and now I have to register what "2" means, fix that, FINALLY get 2+2 to evaluate, I get 5. Figure that out, get 4! 4!!! FINALLY. Push it. Get 55 on the server. Gets 4 on my machine, getting some random 55 from the server.5 -
Oh boy, kotlin and its world of statics and lambdas are glorious 💗💗💗
I just finished this attendence counter app i have been working on for last 4 days.its quite simple so i tried to add as much constraints as possible:
-Good practices and minimal warningy
-Room database
-Viewmodel and livedata
-constraint layout
-everything in kotlin
Although i already have worked with room and livedata previously but i dont even have a hello world experience in kotlin . However it doesn't felt that bad tho for a newbie
Every code here is so small . Synthetic binding? Love at first sight.Although at some places its irritating , not having ?: Operator or its ugly 'when' logic, but overall its Awesome!!7 -
The first time you try to google what an operator does by using the symbol in the search bar because you don't know the name for it.2
-
This.
Not the worst but almost all of us (including me) handle strings like fucking morons.
If the input doesn't need to be an exact match we use a explicit comparison operator, when the input should explicitly match we do a loose comparison operator.
I'll format the crap out of a number, convert it, validate decimal places, check for float rounding hell, give it a absolute value and return it correctly formatted for the users locale but half the time I forget to trim their input. 🤦♂
Like I said - just a tad fucking moronic isn't it?3 -
When you finally understand how a RxJava operator works in different multithreaded scenarios after hours of trial and error...3
-
Hey guys...
So...
Today was my first day in a Molding Company (CNC operator)... IT was fine, I barely could hold on physically but I did it :D In less than two weeks I'll be operating my 3 new machines like a PRO.
But that's not the full story... I came home, my dad calls me, and has a mold drawn on paper (2D) for me to model in 3D and print... lol.
I'm proud, not just because I got a new job at first try, now just because my dad asks me to build stuff, but Also because my dad is a DIY guy with lotssss of experience... And now he's the one asking for help, opinions, how to do something...2 -
The project which I took over from the previous team had exactly 1576 usages of an operator which I've never seen before after 10+ years of working in PHP.
Curiosity lead me to the php.net site to see what kind of advanced magic this operator does - only to discover that it's an error suppressing operator (@). They've simply used it as a default method for solving bugs and removing errors from the logs.4 -
>be me, working at IBM as CC operator
>onboarding freeze, people leaving team, not enough operators
>take extra workload to sustain monitoring
>no raise
>team gets merged with other CC team(different customers)
>take over of developing full workload automation project
>no raise
>sick coworker, have to take more extra workload to cover monitoring
>get tiny raise
>coworker gets the same raise for only one extra workload
>be expected to do both programming and monitoring for the little salary
>too autistic to quit
>too autistic to confront my mamager with this
What do, devRant?5 -
So, I'm a veteran. I served in the Army as an information system operator/analyst. Glorified help desk, set up some equipment in the field, a few other small things. But I can make fun of vets, other branches, and those serving. I've paid my dues, and they're OK with it. Hell, they all do it too. But you have to be a vet or currently serving.
I feel like that with tech too. My buddies and I call each other geeks/nerds all the time. I get annoyed (read as pissed off) when someone from the outside does it.
I got an email from a recruiter that said something along the lines of "..basically a bunch of really smart nerds building software..." What the actual fuck? Go eat an entire bag of dicks, and choke on every single one.12 -
Already have it.
CNC operator.
I wanted to be cnc programmer but for now I'll have to work with the machines.
And I love it...
Making steel pieces with a 0.01mm precision...
Preparing the tools...
Operating the machine...
That's why I'm doing my own... For over 3 years (no money to finish yet hehe).
Also, got unemployed so I made a 3D drawing formation.
Now I can design, program and machine a full mold.
To bad company owners in my country (Portugal) like slave work... And I'm not accepting jobs for the minimum wage or I would be employed already.2 -
I just found out that my partner writes his increment operators with a space between the variable and the operator.
i ++;
anybody else do that because he's changed parts of our code to include the space and it's frustrating7 -
I want the pipeline-operator in JavaScript. I want it now!
... But then I mostly work with Vue.js (because it's awesome) in the last time and I somehow miss vanilla JavaScript. Life is cruel.4 -
I once interviewed for a role at Bank of America. The interview process started off well enough, the main guy asked some general questions about career history and future goals. Then it was off to the technical interviewers. The first guy was fine. Asked appropriate questions which he clearly understood the answers to.
The next guy up, however, was what I like to call an aggressive moron. After looking at my resume, he said I see you listed C++. To which I said, yes I have about 7 years of experience in it but I've mostly been using python for the past few years so I might be a bit rusty. Great he said, can you write me a function that returns an array?
After I finished he looked at my code, grinned and said that won't work. Your variable is out of scope.
(For non C programmers, returning a local variable that's not passable by value doesn't work because the local var is destroyed once the function exits. Thus I did what you're supposed to do, allocate the memory manually and then returned a pointer to it)
After a quick double take and verifying that my code did work, I asked, um can you explain why that doesn't work as I'm pretty sure it does.
The guy then attempted to explain the concept of variable scope to me. After he finished I said, yes which is why I allocated the memory manually using the new operator, which persists after the function exits.
Einstein then stared really hard at my code for maybe 10 to 15 seconds. Then finally looked up said ok fine, but now you have a memory leak so your code is still wrong.
Considering a memory leak is by definition an application level bug, I just said fine, any more questions?4 -
Every day skynet withers closer to existence.
"
The lethal autonomous weapons systems were programmed to attack targets without requiring data connectivity between the operator and the munition: in effect, a true ‘fire, forget and find’ capability.
"
https://businessinsider.com/killer-...15 -
Be a fellow who's distracted af. You just had a presentation in another city. You're driving home and a light lits up saying you need gas. You stop at the petrol station, pour in some gas, grab a cop of joe while you're at it, pay and leave. You're 15minutes away from the gas stop already and an unknown number is calling you. You pick it up. A male voice says
Voice: "hello, this is police. Did you just leave a gas stop 15 minutes ago?"
You: *wtf, what the fuck did I do now!* "yes, I sure did."
Voice: "you forgot to pay for the fuel"
you: *oh shit, he's right! I remember now - I only paid for the coffee! Shit! I'm in trouble now. *
"oh.. Right, you're right, I forgot... I'll turn around and come back to pay
Voice: "wait, don't rush, I may be able to help you. I'll call you back, keep your phone close" *hangs up*
5 minutes later phone rings again.
Voice: "can you pull over, please? Here's a phone number of that gas stop. Give them a call, I'm sure you'll sort it our. Have a nice day!" *hangs up*
you call that number. A woman picks up.
You: "hello, I forgot to pay you for the gas, gimme a few minutes - I'll turn around and get back to you"
Operator: "do not worry, I think I can help you! You can pay for it at your home town if you like, but I'm afraid they might not be working today. But they will tomorrow! Would that be OK for you?"
you: "umm, yeah, of course! It's my fault - anything is OK for me!"
operator: "ooorrr.. I could pay for you now and you would pay me back. Would that work? Here's my bank account, I'll pay for you when you send me those 50 something €"
a fantasy story? Made up story? Bed time stories? Dysney movie plot? Phishing? Canada?
No. This is Lithuania :) believe it or not, this is a true story, and there are more like this one.
Respect to the police!12 -
So normally I go with a super-conservative error handler that logs errors, and exit the process on even the tinyest/smallest error.
Regardless or project/cms/framework I always to this to prevent myself from installing spaghetti plugins or writing unstable code.
Also because I don't want any code to just soldier on if a variable wasn't defined properly, or likewise.
But today I had to write this little fucker into my error handler, to support the error surpressing operator '@'
Appearently prestashop was developed by a group of senseless moronic fuckwits,
and hteir piece of horseshit software doesn't even work if it isn't allowed to surpress errors.
What was the fucking imbeciles thinking when requiring such lunatic behaviour... -
Automation always fascinated me. Not only it looks and behaves like a life form, it also can perform billions of calculations without making a single mistake while I can’t even multiply double-digit numbers with my double-digit IQ.
If you pick the right components, you can make an immortal, perfect machine that can do its job for centuries, even millennia without a single mistake. There is nothing else on earth that can do this.
There is a robot surgeon and its hands never shake. It’s just flawless. If it fucks up, there is only you to blame, the flawed, pathetic operator.
And now it’s time to remember that it was just a 40s technology all along. And now it’s time to remember that now there is machine learning. A whole new perspective isn’t it. All the mistakes that machines make are sitting in front of the monitors.
No wonder I decided to be an engineer.17 -
Dude what the fuck with C#'s code style?
Pascal case variable names and classes? Don't we do this so we can differentiate between variables and classes??
Newline between parentheses and brackets?
Retarded auto get/ set methods that serve no purpose than to make code difficult to read and debug?
And after all that shit, string, which is a class, has a lowercase s and is treated as if a primitive?
I really have no idea why this language is so widely praised. The only thing I like about it is that it's the only major bytecode language that has operator overloading and reference parameters.19 -
The developer who thinks they are so elite because they make their code hard for anyone else on the team to understand. Especially when they have access to operator overloading.
self <- ~~~cgr3 -
I'm currently volunteering as a student assistant at my school, and today I've gotten the same question 20x. What question do you ask: "Why doesn't ^ return the power of the 2 numbers?"
It turns out that last week they've had a Math class from a new teacher (no programming experience) who said that if you want the power of 2 numbers you have to use the ^ operator...
If you don't know how to program, please don't teach it!5 -
Came across a method in the code base that returns a boolean.
It uses a ternary operator which returns true if the result is true and false.. you guessed it... if the result is false.
WHY NOT JUST RETURN THE FUCKING RESULT!!!
What. The. F#%#....2 -
So node developers. Can anyone explain to me what the hell the "=>" operator is? Because I cannot find anything about it online.15
-
So I've been working as an operator in IBM for a year now. Two months after my onboard our team got an onboarding freeze. Since then more than a half of the team left and more are supposed to go, soo there is a problem covering all the workload. I volunteered to take 4th customers workload (out of 4 customers our team supports) because I already knew most of the work that is done there.
At a one-to-one meeting with my manager I asked for a little raise, because I have the 4th customer, I take other peoples shift anytime they need to take a free day, I update the documentation regularly, I write scripts for coworkers for installing software/automating what can be automated (and I'm the youngest here...) bla bla, telling him that I think I do a lot for the team and I deserve it. He told me that he would rather take away one of the customers workload. I rolled my eyes and went with it.
Two days later this asshole gave a raise to a guy, who was onboarding with me, because he wanted to motivate him. That very same day he told us that it seems like two customers are going to merge into one workload.
I'm so pissed because of this. I do my best all the time so I can get promoted to 2nd level linux team (I'm kinda one foot there) but the freeze is still preventing me to go. I'm already so tired of dealing with the bullshit of customer not knowing their own infrastructure, shitstorms of tickets during changes after level 2 didn't set maintenance mode again, repairing coworkers linux boxes because they don't know better and I'm so pissed at this un-initiative dickhead of a manager that gives a raise to lazy people. -
Ecma International, the organization in charge of managing the ECMAScript standard, has published the most recent version of the JavaScript language. ECMAScript 2016 (ES7 or JavaScript 7th Edition in the old naming scheme) comes with very few new features. The most important is that JavaScript developers will finally get a "raise to the power" operator, which was mysteriously left out of the standard for 20 years. The operator is **... It will also become much easier to search for data in a JavaScript array with Array.prototype.includes(), but support for async functions (initially announced for ES2016), has been deferred until next year's release. "From now on, expect smaller changelogs from the ECMAScript team," reports Softpedia, "since this was the plan set out last year. Fewer breaking changes means more time to migrate code, instead of having to rewrite entire applications, as developers did when the mammoth ES6 release came out last year."1
-
God I fucking hate Javascript.
- unknown operator
- type coercion
- sorting always works alphabetically (lmao)
- literally started as a joke
why can't it be normal and predictable, or at least mildly comfortable to use?24 -
C++ is a spiritual language.
I am getting the feeling of being a saint,
my mind seems to be in a whole new dimension,
My soul seemed to be out of my body for a few minutes,
and I can feel a sparkling elixir flowing throughout my body.
All these, after I grasp concepts such as functors, operator overloading, and container adaptors in C++3 -
Is anyone else super annoyed that rust doesn’t have an increment operator??? Why did they get rid of it????12
-
!rant Eeeeeeeeee!!!! The interpreter can now handle floats and integers! And accept the power operator! And modulo! (Sorry, absurdly excited)2
-
Has anyone here paid for a font? I'm thinking about dropping $200.00 for the Operator Mono font, I use Fira Code but that cursive typeface is SOOO FANCY.7
-
!rant is a logic operator, right? As in NOT rant. So why do I so often see them on actual rants?
And for that matter, who cares? If there's a [Read More] tag, you'll click if you want, regardless.
Why is this a thing?8 -
In highschool, I was looking around for schools and universities at which I would start my student career. I went to a grad school one day, to see what it was like to be a student there. The first class I visited was programming for embedded systems. We got the assignment to write Java code to control a boom barrier. The teacher had written the template. And I kid you not, the template had a method of around 20 lines of code - without comments - with the purpose of carrying out a logical OR operation. An operation that literally can be done using an operator in Java: |
Why oh why do they let these people teach, with the result that the students will get used to these bad practises...5 -
After doing crazy SCSS nesting for around 800 lines split between 8 partial imports, I just found out about the ampersand operator. Time to refactor I guess.
-
Well... this is to demonstrate that GPT is not smart as most of people think. There is no coalescing operator in python13
-
that moment when you have to use the 'or' operator and don't know for that moment if you are in c#, vb, sql or php..
-
Forgot headphones, noticed coworkers conversation...
If null coalescing operator (??) returns right on null, why doesn't !! Do the opposite?
- boolean beat ya to it.1 -
Embedded app design resources?
We have a device that is currently controlled through buttons and knobs. We are rethinking this design. We want to have a mix of buttons and knobs and in addition have a touchscreen. The controls must be redundant. So if we turn off the touch screen it must be able to control everything.
Does anyone know of any design resources for non-touchscreen embedded control?
I have been looking into how gaming console controls work. I like how they have the idea of controlling the game vs breaking the 4th wall. We have a similar constraint as we want the operator focused on what they are controlling and not the controls or even sometimes the screen. So immersion is definitely a concept for us. I have been toying with the idea of adding a d-pad for some controls. We have not solidified the hardware controls yet. That is still up to me to come up with some ideas to make it more intuitive.13 -
Me: Calling [emergency number in my country] : Hi, can you connect me to police in [my city + district]?
Operator: No, but I will connect you to country-wide police cetral, please wait... "
LIKE WHAT THE FUCK2 -
I don't really get it why my co-male dev does not like ternary operator as a shorthand operator for if/else statements.15
-
Unlike the built-in ** operator, math.pow() converts both its arguments to type float. Use ** or the built-in pow() function for computing exact integer powers.
Well who knew?
source: python docs3 -
teach meta language concepts: what is an operator, literal, constant, statment, control flow. the recursive nature of staments. then go into objects/methods vs structs/procedures. then teach some java. then go into reflection concepts. then use reflection for something simple. then teach a bit of perl. then let them build something in python. Anyone who can pass through that will know how to Program in whatever you give him/her.
I wish my teachers talked about the meta programing, instead on focusing on the minutia. -
Vodafone India is so shit omfg
Run npm install, ERROR json parse error due to ssl exception
Run pip install, again ssl exception
Run gradle build, again ssl exception!!!
Now everytime i gotta make a new project or install a dependency in anything, i have to pray to the blood god that cache contains a valid/uncorrupted package dependency or else ill have to nuke cache and borrow internet from someone else.
Once i port it to some other operator, i am gonna incinerate this mf sim.12 -
- They had an error in production
- Almost one year without looking in this codebase
- Last backend dev in the building
- 1h debugging and reading the Stack Trace
- Had a feeling, and changed the place of a single asterisk (groovy's spread operator in the wrong place)
- Now everything is working, our PM is happy, and the client didn't even noticed
- Probably the shortest commit I've ever done
It was a good day :D -
Oh! no There is more than 10 level of nesting conditions in if else statements. I can not refactor it but It needs to add more nest there. I will only add switch statements or ternary operator for the deeper nesting conditions.4
-
Can some drone operator please end my suffering existence?
I just got on a bus from Berlin to Munich (8h trip) and apperantly some fuckwits thought it was a great idea to destroy the GOD DAMN FREE WIFI. ONLY DRUNK ASSHATS COULD BE SO STUPID. I need a podcast to sleep well but since I already used up my mobile data volume, I'm stuck in here, surrounded by idiots and lost to the world.4 -
Well this isn't the first time I tell how I got my burn out, but since is the week topic...
I work in a molding company as a cnc operator (should already be a programmer).
My section boss and the company boss (not the owner) are people that got their place trough time in the company and don't know how to deal with people.
So I'll try to resume 3 years of history:
I joined the company while finishing the cnc course (1 year left), I talk to much, I'm smart and like to explain stuff and correct people. The company boss only has 4th grade and tryed to make me flunk class.
First I had to do extra hours, till I flunked.
Then I threatened to call the authorities, so I started working from 6 am to 5 pm and class till 11...
4 hours sleep a nighty for months
After that I started having health problems, when I was taken to the hospital after I pass out I as diagnosed with the burn out, been trying to recover since, while the fukers only did worst stuff, treated me like a dog and such.
I never made the complaint because the owners are owsome people, the kind who gives a lot to help the ones in need and make campaigns to help the poor. Now there are 6 complains again the company (last I've heard). And why? Because there was no consequences after what they have done all that shit to me, they started to do the same to others... Others that have no reason like me to hold back and not fuck the company...
The owners were building a second company to expand...
Were...2 -
I love pipes in R. Really wish more mainstream languages would adopt that *looking at you python, nodejs-tc39, rust, cpp*
Just something about doing
data %>% group_by(age) %>% summarize ( count= n() ) %>% print
As oppose to
print(summarize (group_by(data, age), count=n()) )18 -
Spent like 24h trying to figure out why the system does not work. It turns out I forgot to put ternary operator into parentheses. :///10
-
~rant
Hey did you know there is a neat operator called "tadpole"?
-~x = x+1 (tadpole swimming towards x)
~-x = x-1 (swimming away)
https://blogs.msdn.microsoft.com/ol...2 -
Maybe people have not been around a long time here. But this JS bashing has been going on for half a decade. I honestly don't care about the merits of the language. It does what I need it to for my work. If I need more performance I drop to the C++ anyway. I like a lot of the functionality especially for arrays/lists. I love the ... operator for dynamic lists. It is very useful in the my GUI work. As a scripting language it is pretty nice.
But know this, the bashings will continue until morale improves...12 -
According to people here, ternary operators. I don't care what I'm doing, if I can use a ternary operator instead of an if, get ready for it!
I guess implicit brackets on conditionals and for loops if it's a single line. Anything that saves me typing boilerplate, but it's still readable, I'm gonna do it.1 -
One of biggest epiphanies came through this fundamental critique in SICP of the assignment operator. Through years of imperative programming it seems so innocent, doesn't it? But that you lose referential transparency, run into the alias problem and fundamental difficulty to determine object equality (or of their instances) - that was kind of eye opening considering all the pain I had already experienced with state in concurrency.
(It led me so far to think it's an ontological issue, that even in the discrete computing universe we have not come so much further than Zenon's paradoxa on change.)6 -
Aha, more c++ knowledge. An implementation of a List (already provided by vector).
Lots of learning here, including use of the placement new operator, which is required for containers like this because if you just use the normal new operator, the buffer will construct a million items.
Also, the buffer is of type char*, not of type T, which really confused me in the beginning.
Lastly, with placement new, you need to call destructors yourself.
Interesting stuff.1 -
Error reporting was flooded with failed database connection connections with me being baffled what was causing it.
Yeah, fucking network operator didn't tell us anything about maintenance work. Fuck you, too. -
What's the WORST commonly used language to use for server side web development? By this, I mean which is LEAST fit for the job, not which one do you hate the most.
I vote Java. It's lack of creature comforts like operator overloading and it's verbose and strict nature are in direct contrast with the free-form nature of the web. At least C# lets you do some crazy stuff.32 -
I think the walrus operator (:=) in the new python version 3.8 should've been integrated with the assignment operator. I don't think it needs a special name as it just makes it more complex than it is; a damn assignment statement in the middle of an expression.4
-
How to write crappy code, intermediate level:
Smuggle a hidden OR operator into a longer(300+ chars) logical expression full of ANDs. The best placement is somewhere in the middle. And keep it all in ONE line - at all costs.
#truestory1 -
designrant / As a prepress media designer who study part time interaction design on fridays, I'm fucked. Every agency in switzerland is searching like crazy for Senior UX Interaction Designer. Because of that, they wont hire me as junior, until i have my degree as interaction designer. And printshops won't hire me because of my study. They say I'm overqualified as a prepress operator. fml! :-/undefined interaction designer design print ineedajob fml switzerland printisdoomed outdatedmindset businesslike20yearsago6
-
My team lead thinks using a double Not operator in javascript is too confusing and not readable.
Opinions?23 -
Yesterday at my career progression chat my manager told me that to showcase more seniority I would need to "stop moving the needle by myself and become a multiplier".
So in order to progress I need to change from being a sewing machine to a mathematical operator??!!?!?
Thanks, that's very fucking helpful.17 -
Update from the hackathon:
We decided to create a co-op game where you there is an agent on the field who has to reach an objective, while the operator guides him toward the exit on each level and opens/closes the remotely controlled doors for the agent. We want to add enemies that somehow will try to kill the agent, but we'll see what we manage to do. 🙄
Now I'm currently trying to sleep, but: Went to sleep at 2:15 and I have barely slept 2 fucking hours. Now it's 6:56. Still trying to sleep, but my brain is a cunt. 😲4 -
My last search for a job...
Very bad.
I'm a cnc operator with 3d modeling formation.... As a specialized job I should be getting at least 50% over the Portuguese minimum wage (wich is only 650€)...
I asked only 50€ above minimum wage over 10 interviews or more and no one accepted it....
The fashion in Portuguese companies now (most of them) is to pay minimum wages... Even if I already invested 3 years of my life in formation... Basicly the same as an engenheir (not the same requirements, I know).
Ended up accepting minimum wage on my current job.3 -
Does anyone else obsess over coding fonts every once in a while?
Why is operator mono $200 per machine 😭12 -
Mixing up 1 comparison operator, fucking up the whole outcome of a script..
Be careful with your && and || guys!2 -
Built my first App - the BOFH returns
So I started to learn programming about 7 weeks ago, learned some Java, immersed myself in git and then via a friend got introduced to android studio. To get some practice I decided to code my own app, and what better way than to create a quote generator for the funny and creative error messages as seen in The Bastard Operator from Hell. Now I wrote the thing, started adding a feature and before I know it, it works and I'm contacting the original author, if I may publish it to the playstore.
Io and behold: Merely 32 hours after the idea had sparked, in an act of spontaneous madness I've pubished my first app.
This was an absolutely electrifying experience and a huge feeling of success to me, to see my own creation on my homescreen.
Sorry for annoying you with this antirant, but I just had to get this out!
Btw here's the link if anyone is interested:
https://play.google.com/store/apps/...
Constructive critisism is appreciated!1 -
For the first time in 20 years I used and xor operator.
I wrote in line of code instead of two.
How uses the xor operator?7 -
C++ overloaded operators are so cringe. They think they're being so clever with their pipes and the path concatenation being a "/" character but you're just making one of the most ugly languages on the market even uglier. Fuck C++ and its operator overloading fetish.20
-
In my country there is exactly one (1) mobile operator to choose from, Ålcom. The line hardly ever breaks - provided that you keep your phone calls under a minute or so.9
-
ARRAY LIKE OBJECTS
Long story short, i am fiddling a bit around with javascripts, a json object a php script created and encountered "array-like" objects. I tried to use .forEach and discovered it doesnt work on those.
Easy easy, there is always Array.from()..just..it doesnt work, well it does work for one subset called ['data'] which contains the actual rows i generate a table from, but for the ['meta'] part of the json object it just returns a length 0 object..me no understanderino
at least something cheered me up when researching, it was an article with the quote: "Finally, the spread operator. It’s a fantastic way to convert Array-like objects into honest-to-God arrays."
I like honest-to-God arrays..or in my case honest to Fortuna..doesnt solve my problem though2 -
Been programming one language or another since the 90s. So I have been exposed to a lot of things and worked on a lot of different systems. However I have never heard of Fizz Buzz before. I heard it was something they use to test people's programming skills during an interview. I figured I better look it up in case I get asked this during an interview. Of course I found a nice explanation on wikipedia:
https://en.wikipedia.org/wiki/...
I was shocked. This is being used to test programmers for competency? This is so trivial a non programmer could write the pseudocode to solve this problem. Is the bar really this low?
I remember I didn't want to pay for the C programming class in college. So I bought a book on C++ and read it cover to cover and wrote a bit of code. I then tested out of the C course (didn't know C was much different than C++ then, I started with Pascal). I didn't do that great on the written test. However for the coding test I easily passed that. I formatted the text in nice rows and columns using the modulus operator. The instructor said: "I have never seen anybody make it look this nice." Then I was shocked because that is "just how you do it".
It just seems to me that if fizz buzz is hard, then this may not be the right field for you. Am I egotistical in that opinion? None of this programming stuff has ever been particularly difficult for me.2 -
So. I'm a hobby pythonist. I like it a lot, so when a problem occured at my workplace I offered to my boss that I could write something. I don't know what happened, but at the end we agreed that the best way would be to use excel and write the engine in VBA. So, I spend two and a half days to learn the basics and start to write some code to show him a demo version of my idea. At the end of the last day I gave it up. IT HURTS!!!!!! After python it'so dumb and the syntax is so painful... Finally in the last half day I wrote the whole piece of @&*^ in python. I hope it'll be good enough. I don't want to use VBA again. I'm a cnc operator/programmer and I don't have enough time to learn it. It's bad?3
-
Null-propagation operator and null coalesce all in one line makes me tingly.
return registryKey.GetValue("foo")?.ToString()??"bar"; -
Anyone here have any experience with PHP? I've never really used it myself and don't really want to, but I do look at things like http://phpsadness.com/ from time to time.
These complaints range from "fairly minor" (some stuff like function names/args and some syntsx complaints) to "how is this language even used" (segfaults in a scripting language, broken things like "create_function", comparisons and ternanry operator).
Of course, i don't program in PHP so i don't know how bad any of this actually is.
Anyone actually use PHP or did use it previously?19 -
!rant
So thanks for whoever pointed out my mistake with the “!” operator.
I tried to be devcool but i failed ;) but im allgood now!
Getting to the topic:
After scanning people's opinion here i have decided to learn C.
I have done js react and html css for the last year and have an okay grasp on it but i want to learn more.
Mainly:
-security
-network
-memory and ressources
Im a noob ant ive only scratched the surface. Im gonna be soon working on databases and backend java to master the functioning of a backoffice with its API and the handling of form and crud automisation (i probably am not using all the right words. I am learning and being told what to do).
Am i helping myself with C and if so any tutorial advice or good teaching resource that could be advised to me.
Thanks ;)6 -
So, the other day, I was working in Unity, and trying to find the complement of a byte number. That is, 255 - myByte. So, I write this :
Byte newByte = 255 - myByte;
And it says that it can't convert from a byte to an int. Okay... So, I do this:
Byte newByte = byte.MaxValue - myByte;
And still, it errors the same thing. So, a quick google search proves that no matter what, the subtraction operator returns an int. WHAT IS WRONG WITH C#? That is the dumbest thing ever!4 -
So first rant, here goes weirdness, and also lengthy rant
So in my company we have the hr and accounting managed by the same person which also deals with all things employee related and she had a need for a way to extract a birthday from, what is in our country the personal identification number, things go great i get a formula that performs parts of the magic up to the point where the first digit of the number dictates the gender and century to be used when forming the full year, mind you only the last two digits of the year are in plain within the id number so i thy a number of ideas. After bashing around google sheets for a while ( i've got open office installed and formulas don't export well to the excel that person uses but google sheets does so i built it there).
First idea : make a few conditionals to check for the value so we have 1 and 2 for 19th century, 3 and 4 for 18th century , 5 and 6 for 20th so i go ahead and write my conditions and they fail, all evaluates to false, it cascades through the else variants up to the last one so i'm wondering if the "if" itself doesn't support the or operator, seems it does, next i think it's the bloody condition written wrong so i reevaluate my logic in php in a test script, it works as intended, then i think ok not the right function called, let's see the docs, docs confirm i'm doing it right but what was wrong was the way i was getting that first number, using left seems to produce a string although the base thing is a number, now i start searching how i can cast it, like you would normaly do when the data type is fried, value function appears to be the solution but it isn't working....now i'm thinking "ok so i have a value and different things to print out so let's look for a switch, maybe it can understand that" switch function found under the form of choice, i get it sorted but am stuck wondering why the heck was the if and value combination not working.
Simple answer to that : value doesn't work well with function results, a known bug listed by someone in a comment, a comment i have failed to read for about 45 minutes of trying to understand.
All in all it worked well for the person asking for it so it's nice. -
We had to code a logical operator in my computer science class in high school. Because it was a low level course we were given 2 hours to complete the assignment.
During the same time I started being interested in ML so I decided to build a simple feed forward neural network. The guy next to me looked at my like I'm a wizard for the rest of the semester. It felt great!2 -
No network in mobile due to bankruptcy of an Telecom Operator and people think that I could help because I am good with computers instead of going to fucking retailers of other Operators who could adopt the number.1
-
During my first-ever technical interview, the interviewer asked me "Do you know the FizzBuzz problem?"
"Uhh, not really." (I was just thinking ok this problem has a name, must be some algorithm problem)
"So the problem is basically to give you the numbers 1 to 100, if the number is divisible by 3, print 'Fizz', if divisible by 5, print 'Buzz', if divisible by 3 and 5, print 'FizzBuzz'. For other numbers just print out the number itself."
After hearing the problem, I felt so many ideas popping out of my stressed brain.
I thought for a bit and said "ok, so if the digit sum of a number is a multiple of 3, then the number is divisible by 3, and if the last digit is either 0 or 5, it's divisible by 5."
Then I started to code out my solution until the interviewer said "there's an easier solution. Can you think of it?"
This stressed me out even more.
I thought for a bit and said "well, starting from 3, keep a counter that records how many iterations are done after 3. When the counter hits 3, that number would be divisible by 3 for sure. Should I try this solution?"
The interviewer said "Sure." So I started again.
However, I struggled for about another 3min until I realized this solution is a lot harder to implement. The interviewer probably saw my struggle too.
This was the point where he stepped in and asked me "Ummmm there's an easy way of solving this. Have you heard of the MODULO OPERATOR?"
In sheer embarrassment, I finished the code in 30s.
Of course, there was no further question after this, and I felt the need to seriously reevaluate my intelligence afterwards.11 -
Captain America: Winter Soldier
Thug officer: "Deploy Algorithm"
Me as random operator: "Like all of them? At once? There are tens of thousands running on this thing" -
#storytime
Soon I'll start moving to a new place on the 16th and I wanted to change my address at the Internet provider (T).
go to provider website (T) reading that I need to call them...
CALL (T): .... Automatic answering machine.. ... longer than normal, covid19, 30 minutes later:
Operator: Hi moving, yes.. When? we send you an email with details to send Mechanic.
Next day: waking up. clicking mail on my phone in bed half sleepy. select 15th. next. next. next. accept. done.
Me happy :) .... One hour later realizing I said 15th.. and it should be 25... FUCK!!! Me Mad! Knowing what's going to happen...
Click link in mail to change date. You need to call (E).
CALL (E) : ... Automatic answering machine.. ... longer than normal, covid19, 1 hour later.... Give up..
CALL (E)(2): ... Automatic answering machine.. ... longer than normal, covid19, 1.2 hour later.... Give up..
Next day CALL (E)(3): ... Automatic answering machine.. ... longer than normal, covid19, 45 minutes later....
Operator: Hi, yes we can move to date 21. you need to call (R) to change fiber mechanic I'll patch you trough
CALL (T) : ... Automatic answering machine.. ... longer than normal, covid19, 30 minutes later....
Operator: You need to call (K) Here is the number 123456789..
CALL (K): ... Automatic answering machine.. ... longer than normal, covid19, 20 minutes later
Operator: This department (R) can not be reached by phone we will call you back.
Next day:
Incoming call from (K). Because you are moving to a new house you do not need (R). have a nice day.
Have a nice day to you too calm and friendly.
hopefully I won't be without internet for a couple of days...1 -
My company never used unit tests. And i would love to educate but i do not know how to unit test properly. I always en up with: if i want to properly test all ins and outs of this class's + operator. I need to add checks for positive number, negative numbers, nan, infinites, nulls etc. Etc. It needs so many tests for something so stupidly simple, that i don't see a way to motivate people to use it.
Am i missing something? Is there a guideline for "ok coverage"? Is testing just that much work and is that why nobody cares until it is too late?
I have been reading a book about working with legacy code. But still i got no answers. Halp!7 -
The worst programming mistake I ever did was a using if($true =0) instead of if($true==0) for a betting platform. Due to the assignment operator fault it meant that everyone won irrespective of if they had lost the bet. But thank God I identified the glitch within 5 minutes though it caused quite a damage.3
-
Found an article where two fonts were combined to achieve an awesome looking effect for vscode, The fonts were Fira Code + Operator Mono
Tried to download Operator Mono but...13 -
C is love, C is life.
Great language.
I genuinely don't get why so many people are struggling with pointers, considering it's a pretty straightforward concept. I understand that they can be complex in simplicity, but the concept itself is much easier to understand than say, references in OOP languages(despite being the same thing under the hood).
I mean it's just a number like any other number, except that number is treated as a memory address, and the star(* - dereference operator) just takes a value, goes to the memory address that is the value, and takes a value from there.
I feel like most explanations and tutorials just try to over complicate it for no reason.27 -
I've only just discovered the C comma operator. I don't know how I completely missed it for so long.2
-
Today I've read this line of code:
$like === true ? $operator = "LIKE" : $operator = "=";
Should I be angry, sad or disappointed?
That was written by a person who I tought could code.6 -
I started working for a startup as Server Administrator/ System Integrator beside university to get some dollars with easy work and nice people.
((I Know two of the C*Os so I got a had feeling with this. Besides the upcoming story I'm still really happy with my position and career chances here. God bless my Department which has the most funny/rude guys, love you.))
tl;dr:
Guy fakes his Skillset and fuckup whole department, can´t do most of his basic tasks. I had my first and hopefully last interaction with this bastard.
Heres how everything started:
I was more and more involved in the leading processes and decisions.
Heard about a story where and why the whole dev-department was kicked out of his position because they were crappy developers. And cant just believe the stories they told me about the former Dev-Lead
Now I met the former "Development Lead"
I was brought in because we in the IT wondered why he would like to share his local machine password with colleges. After some questions he came out with the Reason.
He is doing home-office for some days a week now and wants his colleges to be able to start his "software". (already confused by that)
The "better IT-guy" in me offered help for automatic deployment CI/CD stuff so that they can use it as an inhouse service.
BIG OOF incoming:
"The code is not in git because I wanted to clean it up before"
"My IDE is the only place where my PHP crap work is running"
"The 'PHP-software' is to complex for this"
My Lead and I were completely speechless,
I understand the decision to kick this "dev-Lead" from the lead position down to a code monkey/ script kid.
Now I´m thinking about getting my Hands on the Lead position after my exams because if such bastards with no clue about basic stuff, no clue about leading, no clue about ci/cd, no clue about generic software stuff get the job I would easily be the "good IT-guy" with more responsibility/ skill.
Now I sit here, hate people that fake their skills and set back work of colleges for multiple months and never asked for help or advice.
And the little "Bastard Operator from Hell" in my just wants to delete all his files, emails account during a migration to completely demotivate the person who failed to be responsible for a team nor their projects.rant ci/cd php administrator startup script-kid i hate people unskilled skill faker lead developer devops5 -
iOS development: When Google didn't realise that you trying to start a serious development question dealing with the keyword "swift" and anoying Taylor Swift searchRequestBombs it. Anytime.
Hey Google come on, I'm interested in serious answers and not that kind of celeb rubbish bullshit 😡
And what the hell about Kim Kardashian ist that your kind of interpretation of objective-c or?1 -
So... Working alone in a hollyday, at night .
Turning mill operator.
Started working here 2 months ago.
Had to stop a machine. They like to work by brute force here, so a tool is braking on every piece I try to make...
Might just go home early.
I know what the problem is and how to solve it, but I'm new here, I'm not going to tell the engenheir how these very expensive machines should operate.
Problem is: cutting tool should cut at most 1mm per passage, they program only one passage so its cutting maybe 10mm each time.
I just had to change a few parameters in the variables for cutting depth... But they will never learn while operators solve that problem behind the boss back. So machine is resting.
Also have no more pieces to work in the other machines... They don't pay well, so 4 people left just last month for better jobs and now there isn't enough workers to keep production.
Why do people still use 1940's methods in today's companies?2 -
May I ask why every language I've seen other than pascal has an in place ++ increment operator and fucking python does not ?27
-
After the fun I had with the XEN Orchestrator UI ( https://devrant.com/rants/2554182/ ) I build an exporter that normalizes XEN / Proxmox API output and writes it into a nice spreadsheet.
Took PHP 7.4 for a spin. Sweet jesus, lot of nice stuff.
Been nearly a year since I did something larger than small scripts in PHP, but felt really at home again.
The type hinting and arrow functions made writing the exporter a breeze.
DTOs with typed properties spared me quite a bit of headache when normalizing the different APIs...
Utilizing *sort with fn arrow function is a pretty nice and concise one liner with the spaceship operator.
And I have now a nice spreadsheet...
Thanks at the PHP folks.1 -
I just wanted to transfer my domain from domain operator dns to other dns provider.
Now I lost control over my domain and it redirects to those fuckers website.
I thought fuck them, this is their last fuck up so decided to transfer domains from this piece of shit provider to any other.
It turned out you need to send request using post office or visit their office by yourself to get EEC (authinfo) code
Their office is 300km away but cause it’s fucking faster and more reliable then waiting a month for their mail with fucking numbers I will go and do it next week.
Let the fucking hell begin.
I hope those motherfuckers would food poison and shit themselves into their beds till end of their fucking life.
Fuck those fuckers.6 -
Stack overflow is full of useless assholes, like I asked a specific question about a problem I am having that is similar to another problem that exists but it is not the same at all in terms of how to fix and instead of helping I’ve got 2 downvotes on it and a comment linking me to a completely unrelated stylistic based question based on something I SAID I HAD ALREADY TRIED CHANGING IN MY QUESTION!!! Here’s my question btw in case anyone can help here before I smash up my laptop 😑:
I have a piece of code in which I am trying to read in words which have been categorised using a number and then placed in a text file in the following format "word-number-" with a new line for each word. However, despite not mixing cin>> and getline and having tried a number of methods I still cannot get it working.
So far I have attempted using a cin.ignore() call to clear any '\n' char's from the buffer, as well as checking if the file is opening in the first place (it is), and using the >> operator instead throughout my code however I could not get that working either. When I place the get line call inside the condition of the while loop, the while loop doesn't run, however when I make the while loop condition a .eof() call it will run once however when I try to print the text that has been read from the getline call it just prints a blank line.
if(file.is_open()){
while(!file.eof()){
getline(file, text, '-');
count++;
cout<<count<<endl;
cout<<text<<endl;
if(count%2 == 1){
wordBuff = text;
}else if(count%2 == 0){
if(stoi(text) == wordClass){
wordList.push_back(wordBuff);
}
}
}
file.close();
}
While I recognise there are a lot of other questions on this out there I cannot seem to get any of their solutions to work and the vast number being related to people mixing the >> operator and getline doesn't help, so any tips or solutions will be of great help -
x = 10
while (x --> 0) // While X goes to Zero
{
print(x);
}
// Output: 9876543210
"Goes to" is the funniest operator, also it works in almost any language XD4 -
That moment when you settle for Consolas, after trying 13 diff mono fonts, because you need ClearType so that Office apps don't suck...bye bye Operator Mono...Incosolata...Input... *snif* *snif*10
-
What's your opinion on functional shortcuts and 'hacks' in many languages, like map/reduce/filter, ternary operator, lambdas,inner/anonymous classes?
Imo they can make development faster and more efficent but they make the code very unreadable, especially if someone else has to read it, Therefore I try to use them only when it's appropriate. My dev friends use them too much and it makes reading their code a hellish experience, especially in Javascript with Rx.3 -
Why do people put the asterisk in pointer types right before the name, thus having it separated from the type? This doesn't really make sense to me, since in this case it isn't a runtime operator but a part of the type definition.2
-
In my country, in almost any company, bank, even major telecommunication companies you'll find that their systems are down at least very frequently.
I'm currently standing in front of a Vodafone booth (they provide mobile communication and are an ISP), their system is down and the operator said to wait an hour.
What's more horrid about this is that these systems are built by fellow software engineers in my country. It sure says a lot about us, unfortunately.4 -
When you hear a conversation where a developer tries to explain difference between JavaScript spread operator and an ellipsis to a random person they walked past.
20min now... (Ellipsis is intentional here) -
Suppose you made a tool for your STL that throws compile-time errors when trying to copy references, so your pointers remain tidy.
Suppose also that the language has a a turing-complete preprocessor that can be used to throw useful errors.
Then WHY THE FUCK DOES UNIQUE_PTR NOT OVERRIDE THE DEFAULT ERRORS WHICH TELL ME NOTHING ABOUT WHAT I FUCKED UP BUT PRETEND UNIQUE_PTR IS AT FAULT FOR NOT DEFINING "OPERATOR=" ? -
The most excited I was about my code was when I shrunk a bunch of easy if-else statements to a couple of lines using ternary operator. It wasn't groud breaking but it was the first time I felt like a programmer writing nice code.
-
I learnt to code in python when I was 8.
I learnt the very basics and moved on to other languages.
My first creation was a kind of text based nuclear missile silo operator simulator.
It was mostly just a shit ton of if statements, God I wish I knew about switches. You just kind of input commands like 'open doors','set co-ords ##:##' and 'launch missile ##' and a dozen other little things like that. Was a fun project. -
It's nice that more and more languages are introducing async/await syntax, but by the example of Rust in particular I'm starting to wonder why we don't instead introduce this syntax for monads in general?
We could have a keyword (say, `bind`) which unwraps a value from any monad provided that the return value of the function is wrapped in the same monad. The ? operator does something a little similar, and I'll be intrigued whether it can actually be implemented for monads other than Result and Option once GATs are stabilized. In particular in the case of Rust, it would be possible to create a reference counting monad for heap-bound management of objects derived from references.9 -
Quick JS tip
If you want to split a string into characters, you can use the ES6 spread operator
If you have
const name = 'react-dev'
You can just spread it like this:
const charsInName = [...name]5 -
Me, every time I get the chance the use PHPs most overdue function, or the null coalescing operator (??). Every little bit helps :)3
-
so
?. <- optional chaining
?? <- nullish coalescing
? <- conditional/ternary operator
dunno why, I can't seem to remember optional chaining off the top of my head.8 -
!rant
PHP guys, your equivalent to the dot operator looks weird to me with no whitespace, anybody else spaces out their arrows like this?13 -
You gotta love PHP:
<?php
$bool = true && false;
var_dump($bool); // false, that's expected
$bool = true and false;
var_dump($bool); // true, ouch!
Source: http://php.net/manual/de/...
http://php.net/manual/de/...3 -
Try to upload ipa archive to iTunes. Service is interrupted. Again. Fuck you apple! I was trying to upload that fuck for six damn u punk ass times. Why apple? Fuck you! I'll put the archive on a stick an ram it right into your ass you shitty fuck! JUST TAKE MY BINARY RIGHT NOW!
Don't take it to serious. I'm okay 😎 -
can option pls override or operator
this is stupid
say no to
let branch = branch.unwrap_or(config.branch.unwrap_or("something".to_string()));
say yes to
let branch = branch || config.branch || "something".to_string();6 -
So, I have been offered two jobs at the same company (big, global corp)
1. RPA coordinator or operator or business analyst. Completely new to me, they're happy with my background enough so that I could learn on the job. RPA is new in this place and they're creating team from scratch.
2. Member of IT security team where most of my work would be split between things that interest me greatly - vulnerabilities, fixing them and pen testing.
I'm not sure what to pick, really.
Option 1 seems to be way more future proof and seems like a lifetime opportunity to get into something relatively new, potentially more ££ down the road.
Option 2 is what I already spent some time learning and I have quite a big interest in. I've always been less of a programmer and more of an admin/sec guy.
Tbh before option 1 called me yesterday I thought that option 2 is a dream job for me. Now I'm all in doubt.12 -
nothing new, just another rant about php...
php, PHP, Php, whatever is written, wherever is piled, I hate this thing, in every stack.
stuff that works only according how php itself is compiled, globals superglobals and turbo-globals everywhere, == is not transitive, comparisons are non-deterministic, ?: is freaking left associative, utility functions that returns sometimes -1, sometimes null, sometimes are void, each with different style of usage and naming, lowercase/under_score/camelCase/PascalCase, numbers are 32bit on 32bit cpus and 64bit on 64bit cpus, a ton of silent failing stuff that doesn't warn you, references are actually aliases, nothing has a determined type except references, abuse of mega-global static vars and funcs, you can cast to int in a language where int doesn't even exists, 25236 ways to import/require/include for every different subcase, @ operator, :: parsed to T_PAAMAYIM_NEKUDOTAYIM for no reason in stack traces, you don't know who can throw stuff, fatal errors are sometimes catchable according to nobody knows, closed-over vars are passed as functions unless you use &, functions calls that don't match args signature don't fail, classes are not object and you can refer them only by string name, builtin underlying types cannot be wrapped, subclasses can't override parents' private methods, no overload for equality or ordering, -1 is a valid index for array and doesn't fail, funcs are not data nor objects when clojures instead are objects, there's no way to distinguish between a random string and a function 'reference', php.ini, documentation with comments and flame wars on the side, becomes case sensitive/insensitive according to the filesystem when line break instead is determined according to php.ini, it's freaking sloooooow...
enough. i'm tired of this crap.
it's almost weekend! 🍻1 -
"The data types ntext and ntext are incompatible in the equal to operator."
Thanks SQL Server, really helpful.7 -
I enjoy reading the arcane language of devs, although I haven't a fucking clue what you're talking about. It's the instinctive rise and fall of emotion that I find gripping.
There's one thing I may be better at than most of you; since 1967's first episode of "Time Tunnel," I have been enamoured of RMS Titanic. So, two things. Today is the birthday of Jack Phillips, the senior wireless operator who lost his life the night of the sinking. There's a memorial garden in his birthplace, Godalming, Surrey, UK. The second is my recent immersion in enhancing images. I'm attaching a work in progress of RMS Titanic sailing past the Isle of Wight on her maiden voyage. Stay dry lol.4 -
Where has the Fira code font been all my life? It's epic and free.
Nearly spent £150 on the operator font.4 -
How hard should it be to create a functioning webpage with readable text that works in Microsoft Edge? (garbled pricing info at a swedish operator called Vimla)2
-
Shell scripting is one big fucking pain in the ass !
Why the fuck is it so syntax sensetive!!
Cant you even fucking consider a space between a variable and a operator by yourself ?1 -
My boss is a very smart man, but sometimes he's superstitious as hell. He cannot trust context.list.find() in c# to accept null values, despite that being a thing forever. He's certain that it will break in a future entity framework update, so we have all these duplicate if statements all over our site.
If(blah == null){ //stuff}
Thing thing = context.things.find(blah);
If(thing == null){//stuff}
It kills me a little each time, but I guess he could be worse. I'm glad that he's finally trusting the null conditional operator, because it's a fucking lifesaver for duplicate code!3 -
gulp started throwing premature close on useref:dist yesterday
said it was on a dependency
spent whole afternoon checking gulp issues and reviewing dependencies
as it turns out, it was nothing even remotely related to the error message
it was a spread operator used to merge objects
why must the Lord test me like that -
FFS Kotlin, did you completely forget to mention how to create an object in js or did you seriously not think about the usage of the `new` operator when writing that compiler.
I just wanted to use that glorious when statement for my discord bot. Not to mention that retarded tutorial with incredible gaps and cyclic references and now this. -
Really weird number.
Most probably its marketing call from the telecom operator that revolutionized the tele industry in my country by providing free 4G services asking to subscribe to their service.
Sorry, but i can't afford you.. :/
I'll have to let you go..
Thanks for the last 8 months of free services.3 -
I'm working as a cnc operator. I've ask for some txt files, cos I wanted to write a small help to the job management. He said it's ok, but he can't gove me the files, cos there is some problem with the system, he'll have to call the IT department. When he clicked to the file, notepad popped up instead of wordpad and it messed up the outlook of the text. So when I've changed the default applicaton to all txt files to wordpad, he looked at me like I would be Mr. Robot...
-
Ok, which datacenter do I have to set fire to, in order to stop these FUCKING PROMOTIONAL SMS MESSAGES THAT I KEEP GETTING FROM MY FUCKING PHONE OPERATOR??
NOW I'M GETTING PUSH MESSAGES TOO?!? BURN IN HELL YOU FUCKING FUCKS!
I WILL BUILD A FUCKING ARSENAL OF FUCKING ROCKETS AND I'LL SHOVE THEM UP YOUR SHITTY ASS AND BLOW YOU UP IN SO MANY PIECES THAT EVEN AVOGADRO WON'T BE ABLE TO COUNT HOW MANY WILL BE LEFT OF YOU.
AND SPOILER ALERT: I ALREADY KNOW HOW TO BUILD ROCKETS, SO YOU BETTER START RUNNING4 -
I used to code in the cab where the train operators drove the trains pretty frequently. I've also coded in an airplane hanger that was turned into a train factory, but it was less exciting then you'd think.
At the time I was working for a train company so it wasn't weird. I got pretty used to it. We weren't allowed to code in the same cab if the operator was driving the train, so I'd sometimes pop into the spare can because their seats are really comfy.5 -
I have a very basic question regarding strings in Java..I am not getting the clear explanation any where..
1. When the string is created with new operator, will it be stored only on heap or on both heap and string pool??
2. When I create a string like
s1="123";
s2=s1+"5";
What would happen at the second step??
a. will it put 1235 in the string literal pool??
b.Will it create a new string 5 in the literal pool??
please answer buddies.4 -
Looking at Rust's preliminary fn trait model (basically the function call operator) and I don't get one thing:
Why is the argument tuple a generic type parameter and not an associated type? It would've been so easy to ensure consistency in the position that Rust doesn't have overloads. A trait can be implemented for any number of generic type parameter values, but an implementation may only have a single type for each association.3 -
I would have wanted to bring up SICP again, with the great big warning about the evil assignment operator and state and all the troubles that ensue (just think: concurrency).
But in a way, nothing has really come up from this or my attempts to dig deeper into "everything is a file/object" (Unix, smalltalk), neither from formal languages or the Curry-Howard correspondence. - Maybe there's just nothing, no firm bottom ground to discover. Like the physicists going for their world formula, but instead of a grand, beautiful symmetry that explains everything, we face a shattered world of (incompatible) theories, that is ever so more complex and chaotic through our theories applied to it. There may not be a Platonic ideal world of ideas, but rather partial constructs explaining some particular perceptions.
Similarly the one perfect programming language to rule them all, the perfect abstraction, pattern is probably just another prepubertal fantasy to be sunk.
So maybe instead of seeking the perfect epiphany, we should go for something quite different: the nagging, brooding uneasiness that something is wrong there, that there's something to be fixed... that even negative feeling would propel us to search further, not to stay in whatever is touted as the real thing.
Such irritations I found with Pieter Hintjens' writings. For example when he actively engaged in conspiracy theories. And I'm still not sure, if he just went off the cliff or he's even right alluding that these theories are an act of sanity, a self-defence against the hidden evil mights. I just don't know. Anything. -
When you spend an entire week tracking down a bug and it turns out that the bug was caused by someone using the equals operator instead of strcpy.
-
What’s a practical use case of the ES6 spread operator? I’m pretty fresh and would just like to see a real world example where you would need to destructure some array values and apply them to function Params.3
-
Posted a ranted, wanted to modify it a little, had to reload few times before the network of my lousy cell phone operator get the message trough just to find out that getting back online and editing post took more than 5 minutes!
-
Guys it's stupid but how do you get motivated for coding ? I'm actually learning C++, it's my first programming language but it's hard to continue, I love coding and making games but I'm a real newbie and I'm 90% of the time completely lost, I've made 1 shitty game but it's from a tutorial, and for c++ I'm still stuck with overloaded operator.
I'm sorry for my awful english but it's not my mother tongue. Do you have something advices ? For example stopping completely playing videogame ? Thx ;)6 -
using System;
using System.Text;
using System.Text.Encodings;
//Bitwise XOR operator is represented by ^. It performs bitwise XOR operation on the corresponding bits of two operands. If the corresponding bits are same, the result is 0. If the corresponding bits are different, the result is 1.
//If the operands are of type bool, the bitwise XOR operation is equivalent to logical XOR operation between them.
using System.Text.Unicode;
using System.Windows;
using System.IO;
namespace Encryption2plzWOrk
{
class Program
{
static void Main(string[] args)
{
//random is basically a second sepret key for RSA exhanges I know there probaley is a better way to do this please tell me in github comments.//
Random r = new Random();
int random = r.Next(2000000,500000000);
int privatekey = 0;
int publickey = 0;
string privateKeyString = Console.ReadLine();
byte[] bytes3 = Encoding.ASCII.GetBytes(privateKeyString);
foreach(byte b in bytes3)
{
privatekey = b + privatekey;
}
int permutations = random/ 10000;
if(privatekey < 256)
{
while(permutations > 0)
{
foreach (byte b in bytes3)
{
privatekey = privatekey + (privatekey ^ permutations)*20;
}
}
}
publickey = privatekey*random;
Console.WriteLine("your public key is {0}",publickey);
}
}
}
would this be considerd ok HOBBYIST encryption and if not how would I do a slow improvment I used bitwise to edit bits so thats a check :D12 -
Gone are the days where i was pissed of at the shitty and expensive internet service.
Today I'm subscribed to a mobile data that is actually unlimited and throttle free with speed ~ 8 Mbps ( pretty good compared to other options) for mere $18 for 30 days. On top of that, i get 1 GB 4G data everyday from second operator.
It is all getting wasted because i don't get time to watch or play things i download.
Nowadays i find myself downloading just because i can...1 -
People hate on Python a lot. I just used the Python ternary operator for the first time. I found it easier to read than the C++ ternary operator:
0 if i==0 else 2 if i==segmentMax-1 else 1
vs
i==0 ? 0 : i==segmentMax-1 ? 2 : 1
I think Python did a good job in this case.18 -
So here the function that does same thing as new operator in javascript:
// we define our function Person that assigns properties to THIS that points to some object
const Person = function(name, lastName) {
this.name = name;
this.lastName = lastName;
}
// in Person prototype property we define our functions
Person.prototype.getName = function() {
return this.name;
}
Person.prototype.getLastName = function() {
return this.lastName;
}
// function that simulates new operator
// first argument is a function that would act as constructor
// second argument is an arguments that would be passed to constructor
function New(func, ...args) {
// with Object.create() we create a new object and assign [[__proto__]] from "func" prototype property
let object = Object.create(func.prototype);
// here we're calling "func" with THIS pointing to object
func.apply(object, args);
// then we return it
return object;
}
let person = New(Person, "Name", "LastName");
console.dir(person);
// so this is how prototype OOP works in javascript6 -
"Robot, let us pray! Can and should robots have religious functions? An ethical exploration of religious robots" by Anna Puzio.
"With approximately 20 religious robots worldwide, religious robotics is still in its early stages (Balle 2022). However, there are already some notable examples of religious robots, and with advancing technology, it is expected that their numbers will increase. Here is a brief overview: BlessU-2, a German robot, delivers blessings in various languages (Löffler et al. 2021, p. 575). SanTO (the Sanctified Theomorphic Operator) (Trovato et al. 2019) takes on the appearance of a Christian Catholic saint and recites sacred texts while accompanying the faithful in prayer. It also serves as a companion with psychological functions, contributing to the well-being of individuals, particularly the elderly (Löffler et al. 2021, p. 573; Trovato et al. 2021, p. 545). Celeste, resembling a Catholic angel, provides spiritual guidance through prayer and prints personalized Bible verses. Meanwhile, Mindar, a robot priest in Japan, embodies the Buddhist teacher, Kannon Bodhisattva, and conducts Zen ceremonies at the temple (Smith 2022, p. ch. 5; Klein 2019). The monk robot, Xi’aner, follows visitors around the temple, responds to their inquiries about Buddhism and plays Buddhist music. It is also available as a chatbot with which you can communicate over online messenger services. Xi’aner is designed with the purpose of promoting Buddhism in China (Trovato et al. 2021, p. 544; Löffler et al. 2021, p. 573). Consequently, it is perceived not as a threat to religious teachings but rather as a means of contributing to the dissemination of Buddhism (Löffler et al. 2021, p. 573). Moreover, in Japan, the humanoid robot Pepper is utilized in Buddhist funerals because it is cheaper than a human priest. It also broadcasts the ceremony over the internet for those who are unable to attend (ibid.). Michael Arnold et al. (2021) delve into the deployment of Carl, Pepper, and the robot dog, Aibo, in funeral settings."
https://link.springer.com/article/...3 -
I swear to god, getting Chumsky to do my bidding has almost taken longer than writing a parser by hand. I'm not looking for operator precedence, I'm not looking for complicated rules or anything, the main part of my language is literally just S-expressions, with some top level bells and whistles.
I don't even have a working lexer yet because I wanted to use this piece of shit library which usually matches the fewest possible characters to parse significant newlines but the Padded combinator takes as much whitespace at the end as it can find, and a host of other atomics don't actually adhere to the library's lazy principle in their procedural implementation. I've had enough. I'm going to bed, and tomorrow I'm writing tickets.
Actually, I'll probably also write PRs because I actually want the fixes to exist and not just complain about the problems, but I also really want to complain before I get started on that because I spent about two weeks just on this bullshit.3 -
I am wondering how phone operator company can make such thing go on production for live users? Seems like dev has used three times for loop when balance is checked 😐
-
Why does the TSQL BETWEEN operator include the first and last value in the results when filtering on numbers, but only includes the first value and not the last for dates?3
-
So for a question on Codeforces, I got the basic logic right, but for one particular test case, the input is a huge number of 250 digits. But the most unsigned long long int can handle is 19 digits. So I used double instead of int, but that makes me lose precision. And I also cannot use the % operator (modulo) which is int only. How do I get around this ?2
-
I read the whole documentation of Mongo Atlas Search and I still don't know if there is operator "greater than" for strings. I'm trying to implement my own "search_after" in the query because sort+skip is not a good idea and every time I google for a feature I end up in a forum where a PM says "Coming soon, we will prioritize this" and I know that things don't work like that1
-
i can never understand the theme behind kotlin.
THEY DON'T HAVE A FUCKING TERNARY OPERATOR!!![?:]
Like before realizing this, i thought yeah jetbrains has decided to make android development a privileged hobby and non beginner friendly , so its now creating an encoding like language, in the false theme of " reducing code size"
But now they remove WORLDWIDE KNOWN, OPTIMIZED , EASY TO READ AND USE AND UNDERSTAND FEATURE of ternary operator and replacing it with less powerful but same looking elvis operator.( and stating that using if else for that is a better option)
Like why? if your goal is to make a shitty encoding language that makes everything shorter and most of the things optional, why remove the already efficient if else encoder?
God knows when this stupid language is going to stop my brain from getting blasted11 -
What's the minimal feature set that can make a language as ornamented as JS into a comfortable REPL?
Should I write a full parser or should I try to patch my way around with regex?
It will have to interface a lot with JS so it has to be able to manage JS datastructures in some fashion, which means that I can't just make a whole new command line with its own programs.
My current plan:
Some delimiter (probably a semicolon) will take the output of a command and inject it in the next in case you decide halfway through a line to do some more processing, It also awaits promises and does some other nice stuff to make controlling such pipelines easy. I have an elaborate system in mind to decide where a value must be injected to make the line valid so in most cases you don't even have to indicate it. JS has beautifully simple syntax rules so I have a lot of technical balance to burn before I start building technical debt.
I have some ideas for automatic parentheses and commas in function calls. I realize while using a command line you do not want to tap shift often. My main idea here is that two names or values in js are always joined by an operator so the first missing operator is a call and following missing operators are commas until the end of line. This has lots of nasty edge cases though, like that no argument expression can begin with a unary operator or a bracket of any shape. You can always prepend a comma but it's cognitive load.
Anyway, do you have any suggestion or warning besides "js bad" which I know but it's the most popular sandboxable language and has a massive existing set of libraries which I kinda need.3 -
Why we don't write dereference operator while priting string(format specifiers is %s).
For example: char arr[5]={"char"};
printf("%s",arr);//print char.
If we write like printf("%s",*arr);//compile time error.1