Details
-
AboutProgrammer putting the gay into gaymdev
-
Skillsc++, rust
-
LocationNSW Australia
-
Github
Joined devRant on 3/17/2019
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
-
Tooday
Movie sucks
Games sucks
Most programmers sucks
Buying a house sucks
Try to get a grocery under 200$ for nothing sucks
Have child with no future other then capitalisme sucks
Friends that don't take any news in 8 years sucks
Have a girlfriend that don't sucks sucks
Buying pricey shit and thinking i will survive at least 10 years and broke after 3 years with warranty sucks
All social platforms sucks ( other then devrant)
Working for a shit salairy and doing everyone jobs sucks
Lossing mind about idiots in our world sucks
My english sucks
You sucks
My water heater sucks
My landlord sucks
My budget sucks
My old 16 years old bike i use to go work sucks
Government sucks
House builder sucks at 80%
Bank fuck you everytime sucks
Taxes for any service sucks
Medical system in canada sucks
Educational system in canada sucks
Goes on each day i realize something sucks...12 -
StackOverflow locked my account. I'm hoping someone here might be kind enough to help me with a bash script I'm "bashing" my head with. Actually, it's zsh on MacOS if it makes any difference.
I have an input file. Four lines. No blank lines. Each of the four lines has two strings of text delimited by a tab. Each string on either side of the tab is either one word with no spaces or a bunch of words with spaces. Like this (using <tab> as a placeholder here on Devrant for where the tab actually is)
ABC<tab>DEF
GHI<tab>jkl mno pq
RST<tab>UV
wx<tab>Yz
I need to open and read the file, separate them into key-value pairs, and put them into an array for processing. I have this script to do that:
# Get input arguments
search_string_file="$1"
file_path="$2"
# Read search strings and corresponding names from the file and store in arrays
search_strings=()
search_names=()
# Read search strings and corresponding names from the file and store in arrays
while IFS= read -r line || [[ -n "$line" ]]; do
echo "Line: $line"
search_string=$(echo "$line" | awk -F'\t' '{print $1}')
name=$(echo "$line" | awk -F'\t' '{print $2}')
search_strings+=("$search_string")
search_names+=("$name")
done < "$search_string_file"
# Debug: Print the entire array of search strings
echo "Search strings array:"
for (( i=0; i<${#search_strings[@]}; i++ )); do
echo "[$i] ${search_strings[$i]} -- ${search_names[$i]}"
done
However, in the output, I get the following:
Line: ABC<tab>DEF
Line: GHI<tab>jkl mno pq
Line: RST<tab>UV
Line: wx<tab>Yz
Search strings array:
[0] --
[1] ABC -- DEF
[2] GHI -- jkl mno pq
[3] RST -- UV
That's it. I seem to be off by one because that last line...
Line: wx<tab>Yz
never gets added to the array. What I need it to be is:
[0] ABC -- DEF
[1] GHI -- jkl mno pq
[2] RST -- UV
[3] wx -- Yz
What am I doing wrong here?
Thanks.17 -
*clicks sign in button in Outlook*
"Hang on a moment while we sign you out....
...You signed out of your account"
me: this is literally the exact opposite of what I wanted you to do!3 -
Why use a standard tab width when we can all have our own unique preferences? Let's make it a surprise party every time we open a file. I just love adjusting my editor settings for every repo. Keeps me on my toes!2
-
ChatGPT and similar thing. Sooner or later people will get enough of the novelty and such systems will remain only as some niche tools, unless something extraordinary happens.12
-
>Be me
>Notice cute girl in college
>Won't work because reptilian brain too stupid
>Girl needs help studying C
>Teach her C because I'm an idiot
>She turns out to be a bigger idiot, and has problems grasping FizzBuzz problems
>Thoroughly turned off
>Help her get 80% in semester end exam
>Breathe a sigh of relief, get back to usual schedule
>Girl admits to liking me
>Said that girl and I are not on similar wavelengths
>Girl asks me if I think she's stupid, and now is angry with me
>What did I do?17 -
I just wondered that big celebrities and politicians don't even have the freedom to fart whenever they want. Imagine, Putin holding his farts in, while he's discussing some important matter in his office.
It's a tragedy of fame.4 -
Considering most IDEs can autocomplete basic things like function names, would it be beneficial (for learning purposes at least) that a language avoids ENTIRELY any abbreviations?
For example, let's take some of C's printf family.
Instead of fprintf, printf and sprintf, the new function names would be something like print_formatted_to_filestream, print_formatted and print_formatted_to_string respectively.15 -
I don't get attention from single women at the gym, But I catch some moms staring at me from a distance.
It's a weird phase I'm going through.19 -
Fuck today and fuck every piece of shit manager and non-dev coworker that thinks they contribute anything meaningful besides being a fucking idiot and making things complicated. I hope my team, except for the other devs, jumps off a bridge into a valley of dicks and spikes. I hope my client tells them to personally fuck themselves for being such a useless waste of space. Fuck off and die cunts.1
-
I explained last week in great detail to a new team member of a dev team (yeah hire or fire part 2) why it is an extremely bad idea to do proactive error handling somewhere down in the stack...
Example
Controller -> Business/Application Logic -> Infrastructure Layer
(shortened)
Now in the infrastructure layer we have a cache that caches an http rest call to another service.
One should not implement retry or some other proactive error handling down in the cache / infra stack, instead propagate the error to the upper layer(s) like application / business logic.
Let them decide what's the course of action, so ...
1) no error is swallowed
2) no unintended side effects like latency spikes / hickups due to retries or similar techniques happens
3) one can actually understand what the services do - behaviour should either be configured explicitly or passed down as a programmed choice from the upper layer... Not randomly implemented in some services.
The explanation was long and I thought ... Well let's call the recruit like the Gremlin he is... Gizmo got the message.
Today Gizmo presented a new solution.
The solution was to log and swallow all exceptions and just return null everywhere.
Yay... Gizmo. You won the Oscar for bad choices TM.
Thx for not asking whether that brain fart made any sense and wasting 5 days with implementing the worst of it all.6 -
Manager: These estimates are wrong
Me: Why?
M: These shouldn't take too long
Me: Well you asked me to make those while I was busy with the mess design did.
Jr frontend: Manager is right. They shouldn't take too long.
*me knowing jr doesn't know the system nor coding standards*
Jr: I'll fix mine to get a more accurate estimation. Do you want me to do yours?
* Me thinking f*ck no*
Me: Just do yours.
M: Ok. Then we are settled.
He just wanted me to fit a 10 week project into 6 weeks while I carry the Jr and was complaining I didnt do it well.
Fml5 -
- I say the project is shit and it'll be hell for everyone involved
- Management says we'll do it anyway
- Project keeps being hell for everyone involved
- Management reprimands the team for letting hell consume us
- I (again) point out the project is hell itself
- Management maintains it's our fault
- I am Tired™️7 -
"Java and C++ Spring Boot and Angular Ansible Jenkins Azure Hosting"
nice, a stack for boomers lost in the 2000s
stop it. just stop it.
"Some other tech buzzwords we use"... yeah, "typescript" and "big query" are not "tech buzzwords" they're literally the names of languages and/or tools
tell me you're an HR rube without telling me you're an HR rube
😩😩😩 <- love this one, literally called "weary face"4 -
Love the topic, and I have multiple.
We were designing a frontend for a new application and we were using University lingo for the text placeholders. I forgot to remove one section in which the text stated "You are looking to enroll in the University of Deez Nuts", on another section I left "Click here cuh". Our manager at the time liked the design so much, but forgot to check for spelling or texts and as such sent the demo to our entire department. Everyone saw it, and while they all found it funny it could have seriously gone wrong. Thankfully our department VP had a pretty good sense of humor.....dude also knew exactly who it was from the start.
On another application, a director, who is a friend, asked for multiple items on a request form, during testing, I added text in Spanish (I am in Texas, but Spanish is pretty well known and spoken in the state) saying "Que bien chinga <Name of the Director>" which roughly translates to "<Name of the Director> is being annoyong" (but in a very Mexican spanish way)
I neglected to consider that the dude was probably viewing the admin board and checking the items as they were being added to the system and he called me not even 3 minutes later saying "You know I can see what you add right??"
All in all, I was pretty lucky because in any other places I would have been severely reprimanded :P
There are many more, but these came at the top of my head as the better ones. -
TL:DR: I'm terminally addicted to Tea.
I have been drinking tea twice every day since 6th grade. I'm almost 30 years old now.
One day I decided to quit tea altogether. And at 6 PM that same day, I started to lose color from my eyes. The whole world turned black and white.
At about 7:30 PM, severe depression kicked in and I started questioning why the hell I wanna keep on living and not end it all.
At that point I ran to the kitchen and made tea and drank it. 2 mins after that I started to see colors again and the depression went away.
It's kind of funny now that I look back at it.19 -
Got out of bed, went to toilet to take a piss and as i was finishing pissing my eyesight got blurry, i felt dizzy, losing energy and then i just woke up laying on the floor without remembering anything what happened. I fucking passed out. My head hurts cause i hit it on something during fall. Fuck off. I have enough problems already and the least problem i need is a health problem now11
-
- Sign up to a new platform.
- Get asked to set a new password for it.
- Ah, I don't have time to think about a new password cuz I can't rely on my hamster equivalent brain to remember it.
- Same password it is, that I've been using for the past decade for every other platform.15