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 - "slice"
-
Me: 1 is something, 0 is nothing, NULL is the absence of things
JuniorDev: wut
Me: You've got pizza in a box, that's 1. If there's no pizza in the box, that's 0. If there's no pizza and no box, that's NULL.
JuniorDev: OOH so there's no object to reference if I ask for a slice!
Me: *small tear*
Always explain things in terms of pizza. Always.25 -
Hello! Is this Gordon’s Pizza?
No sir, it’s Google’s Pizza.
Did I dial the wrong number?
No sir, Google bought the pizza store.
Oh, alright - then I’d like to place an order please.
Okay sir, do you want the usual?
The usual? You know what my usual is?
According to the caller ID, the last 15 times you’ve ordered a 12-slice with double-cheese, sausage, and thick crust.
Okay - that’s what I want this time too.
May I suggest that this time you order an 8-slice with ricotta, arugula, and tomato instead?
No, I hate vegetables.
But your cholesterol is not good.
How do you know?
Through the subscribers guide. We have the results of your blood tests for the last 7 years.
Maybe so, but I don’t want the pizza you suggest – I already take medicine for high cholesterol.
But you haven’t taken the medicine regularly. 4 months ago you purchased from Drugsale Network a box of only 30 tablets.
I bought more from another drugstore.
It’s not showing on your credit card sir.
I paid in cash.
But according to your bank statement you did not withdraw that much cash.
I have another source of cash.
This is not showing on your last tax form, unless you got it from an undeclared income source.
WHAT THE HELL? ENOUGH! I’m sick of Google, Facebook, Twitter, and WhatsApp. I’m going to an island without internet, where there’s no cellphone line, and no one to spy on me …
I understand sir, but you’ll need to renew your passport … it expired 5 weeks ago.16 -
1. Humans perform best if they have ownership over a slice of responsibility. Find roles and positions within the company which give you energy. Being "just another intern/junior" is unacceptable, you must strive to be head of photography, chief of data security, master of updating packages, whatever makes you want to jump out of bed in the morning. Management has only one metric to perform on, only one right to exist: Coaching people to find their optimal role. Productivity and growth will inevitably emerge if you do what you love. — Boss at current company
2. Don't jump to the newest technology just because it's popular or shiny. Don't cling to old technology just because it's proven. — Team lead at the Arianespace contractor I worked for.
4. "Developing a product you wouldn't like to use as an end user, is unsustainable. You can try to convince yourself and others that cancer is great for weight loss, but you're still gonna die if you don't try to cure it. You can keep ignoring the disease here to fill your wallet for a while, but it's worse for your health than smoking a pack of cigs a day." — my team supervisor, heavy smoker, and possibly the only sane person at Microsoft.
5. Never trust documentation, never trust comments, never trust untested code, never trust tests, never trust commit messages, never trust bug reports, never trust numbered lists or graphs without clearly labeled axes. You never know what is missing from them, what was redacted away. — Coworker at current company.9 -
Juniors are a fun bunch to work with.
Over confident, hero complex of that fresh graduate high, and then thrown in to the real world! Where there hopes and dreams are crushed in minutes when they see what monolithic applications really look like!!
But don't let that overwhelm you, your not going to be changing all of it any time soon, hell some of this code hasn't been touched in 5+ years and still works without fail.
Don't stress about the work load, you can only write 1 line of code at a time anyway, and hell, even seniors make mistakes.
The key about being able to manage this beast is simple, break it! Because the more you break it, the more you'll understand how a project is put together, for better or worse. Learn from the examples in front of you, and learn what not to do in the future 😎
But more importantly, plan your changes, whiteboard the high level logic of what it is you want to add, then whiteboard in the current codebase and determine where to slice this bitch up, then when it all looks well and good, take out your scalpel and slice and dice time.
Don't worry, your changes aren't going to production anytime soon, hell, you'll be lucky to get past the first pull request with this working 100% the first time, and that's a good thing, learn from tour short comings and improve your own knowledge for the next time!2 -
Story time! Promised this, so making good on the promise. Eh-hem.
Misunderstandings [A slice of life short play that actually happened]
Dramatis Personae (anonymized, bc of course):
Moi ........ me, myself and possibly some lint
Robert ..... co-architect
Daisy ...... line dev
Lisa ....... also line dev
Prologue: the beginninning
[A project is starting up, new devs are coming on, including the two individuals who drive this story.
Daisy, of Indian origin, an exceptional dev and lovely person. Mother, wife, very conservative by upbringing in her early 40s.
Lisa, also exceptional dev, lovely person. Mother, also wife, self-made immigrant with liberal views derived from personal pride and self-bootstrapping]
Enter the office, We introduce everyone, off to a nice start, everyone is happy and excited to be working on [large bank project].
Lisa and Daisy form a friendship of commonality, they have similar backgrounds by all appearances and similar concerns due to children the same age and shared employment. They seem to become fast friends and things proceed normally for some months. Smooth sailing, all is well.
The fuse is lit.
Scene: Lunchtime gossip
[Robert, middle 40s architect adjacent Moi, also architect, age is my own damn business [old, so very old].]
Robert: "So, it seems like Daisy and Lisa are getting along great."
Moi: *snerfs a little, almost chokes on enchilada* Yes, yes they are, It's nice to see...
Robert: *eyebrow, having learned to read my expressions* "Aaaaaaand..."
Moi: "I adore both of them, but they are primarily friends because they don't actually understand most of what the other says"
[Lisa has a thick Taiwanese accent, Daisy has a standard northern indian accent. Never the two shall meet]
Robert: "Are you sure, they seem to have a lot of conversations?"
Moi: "Positive, you weren't at lunch with the three of us. They're polar opposite in terms of values, it'll be fine so long as that never comes up"
Robert: "I'm not even digging into that"
Moi: *flan*
Sizzle.
Scene: This is bat country
[More months pass, everything is fine, project is humming along nicely, save a few blips of personality conflicts. Moi takes a vacation. A gas station, somewhere in the middle of Wyoming, a snowstorm, a sports car full of luggage]
*phone rings*
Moi: *looks down, sees it's Robert, eyebrow raises, answer* What's on fire?
Robert: "We had to let Lisa go"
Moi: "Ah, they finally understood each other."
Robert: "Yes..." *deep sigh*
[Fade to flashback]
Bang.
Scene: The office, Lisa's desk
[Daisy and Lisa are discussing non-descript conversation. Daisy broaches the subject of Lisa's past divorce and being a single mother]
Daisy: "It must have been hard, how did you manage?"
Lisa: "I had my daughter, she was my motivation. We made it here, I met my current partner"
Daisy: "That's good! It is so hard, coming to something new. I could never imagine leaving my husband."
Lisa: "He left us, we weren't important, I don't want to marry every again"
Daisy: "Surely you do though? Marriage is great for a woman, my parents found a great husband for me."
Lisa: "Haha, lucky you. Most indian marriage is like prostitution."
[At this moment, Daisy's demeanor takes a nose dive. Whatever was actually said, what she heard was, "Indian marriage is prostitution"]
Daisy: *tears begin pouring down her face, she flings herself back in her chair, head shaking violently she screams* "I AM AN HONORABLE WOMAN!"
[Daisy runs out of the room, straight to HR. Lisa sits there, stunned, not really understanding what just happened or the consequences]
Scene: Back in bat country
[Robert finishes the story, the emotions are a mixture of hilarity at the absurdity of the situation and frustration in the work void it has created]
Moi: "Satan, well. Fuck me. Fuck us. Fuck. Is Daisy alright, is she at least staying? We can't lose two devs at the same time."
Robert: "She got a few days off, she seems fine now, but she's... yeah, I never laughed so hard"
Moi: *double facepalm* "Yeah, the word choice was a bit outrageous. It's not like we didn't know it was coming. I'm going to get back on the road."
Robert: "Alright, enjoy yourself, I'll try and prevent any other forest fires."19 -
Inappropriate experience at work? Here is another one:
After 10 years of service the company gives the employee an anniversary party, complete with cake, drinks, etc.
Preparing for a party, HR set the cake in the break-room and left to get the other supplies, in the mean time the IS department manager 'John' walks in, sees the cake and decides to take a slice.
Not a small corner piece you may not notice by smearing the frosting around, but a big piece from the * middle of the cake *.
'Mary' walks in and catches him.
M: "JOHN! The cake is for Eddie's party! Everyone will be here any minute!"
John: "Oh shit!..sorry, let me put it back..."
M: "NO!, you've already eaten some...the cake is ruined!"
<he had icing all over his hands, so he used the cake knife to cut, but used his hands to dig out the slice, so the cake looked pretty tore up>
J:"How was I supposed to know? All I saw was free cake!"
M: "You are on the invite list for Eddie's party! You have 'Happy Anniversary Eddie' on your plate!"
J: "Party isn't until 2:00...<looks at the breakroom clock> oh shit...it's 2"
About that time, several VPs walk in, notice Mary is upset and after finding out, our IS-VP said "John, I'm not happy about this. I want you in my office after the party. You can leave ...now!"
Our IS-VP is almost always emotionless (mostly just happy and in a good mood), it was the first time anyone had seen him this physically angry in years. We don't know how John kept his job.17 -
Photoshop,...
because why use an:
IDE / editor,
terminal,
SASS/LESS compiler,
package managers,
git,...
when you can make your website as a photo, slice it up and export to html. EASY PEAZY6 -
This was WAY back in my first job as a programmer where I was working on a custom built CMS that we took over from another dev shop. So a standard feature was of course pagination for a section that had well over 400,000 records. The client would always complain about this section always being very slow to load. My boss at that job would tell me to not look at the problem as it wasn't a part of the scope.
But being a young enthusiastic programmer, I decided to delve into the problem anyway. What I came to discover was that the pagination was simply doing a select all 400,000 records, and then looping through the entire dataset until it got to the slice it needed to display.
So I fixed the pagination and page loads went from around 1 min to only a few seconds. I felt pretty proud about that. But I later got told off by my boss as he now can't bill for that fix. Personally I didn't care since I learned a bit about SQL pagination, and just how terrible some developers can be.5 -
A PCB I designed on the job over the last weeks shipped today! A benefit of hardware is the haptic element you have at the end of the design process - you made something touchable. (I am proud.)
Also, errors made earlier in the design process are permanent now. But other than on my software my design got reviewed, so I'm optimistic it'll not contain many if any.
I'm on vacation right now for moving stuff but I'm looking forward to do the "pick'n place" on monday. Soldering manually is quite relaxing for me, you should try it, too! ;)
In other news, I'm no longer sleeping on the floor in my home-office while the paint is drying in other rooms.
I already moved the most of my stuff - books and tech equipment are the worst - and I moved my furniture yesterday.
My new roommates are considerably quieter and my sleeping rhythm is slowly shifting back to normal.10 -
When I slice the head off a list I usually call the rest decapitated.
const [head, ...decapitated] = myList1 -
Well, I guess all the Linux folks are going to know what I am talking about. Do you know this feeling (Yes, you know. Don't tell me anything.) when you use Linux and nobody else uses Linux in your Work/School. And these people come to you and say.
Stupid people : Oh! You use Linux. That's bullshit!
Me : No it's not. It doesn't do 24/7 updates like Windows.
Stupid people : No, Linux is bullshit you don't have money for Windows. And Linux can't run professional Applications.
Unfortunately there is no medicine that cures dumbness. Just saying ...
I'd rather stay not dumb like these people instead of buying another Windows license.24 -
Never had one due to this trick I borrowed from an old friend.
So we all know about those meetings where its all crap flying around right?.
First go in there with your alarm clock set on vibration every 7 minutes(trust me on this-makes you look important and you ought to be somewhere else)
Actually the alarm is a reminder that you need to bring yourself back online.
At this point just listen to the speaker for a couple of seconds(especially if its marketing dept) and being the engineer your are; rephrase parts of their presentation in a question-comment hybrid( at this point you're the wisest looking person in the room)
Now go back to thinking about that pizza slice you left in the fridge as they discuss the "lean production" methods that they can use based on "your opinion"..
To more happy meetings..cheers3 -
Finally my dream freelance project!!!! I will be re-designing and Then developing an Ecomm site for an organization that supports marijuana legalization. Oh those beautiful pictures will be my pleasure to slice up and implement. Lol3
-
"Software and cathedrals are much the same – first we build them, then we pray."
Yup, that's how we work ^_^1 -
Full stack developer.
I know what it's supposed to mean, but I feel like it gives discredit to the devs who perfect their area (frontend, backend, db, infrastructure). It's, to me, like calling myself a chef because I can cook dinner..
The depth, analysis and customization of the domain to shape an api to a website is never appreciated. The finicle tweaks on the frontend to make those final touches. Then comes a brat who say they are full stack, and can do all those things. Bullshit. 99.9% of them have never done anything but move data through layers and present it.
Throw these wannabes an enterprise system with monoliths and microservices willy nelly, orchestrate that shit with a vertical slice nginx ssi with disaster recovery, horizontal scaling, domain modeling, version management, a busy little bus and events flowing all decimal points of 2pi. Then, if you fully master everything going on there, I believe you are full stack.
Otherwise you just scraped the surface of what complexities software development is about. Everyone who can read a tutorial can scrape together an "in-out" website. But if your db is looking the same as your api, your highest complexity is the alignment of an infobox, I will laugh loud at your full stack.
And if you told me in an interview that you are full stack, you'd better have 10+ years experience and a good list of failed and successful projects before I'd let you stay the next two minutes..1 -
Gets scheduled into team meeting. Relatively new, see 5 pm ok sweet nbd. *reads IST. Tf is IST? Google that shit, INDIA FUCKIN STANDARD TIME? 5 pm IST != 5 pm EST. Fuckin oh no that shits at 6:30 am. Brb while I slice myself open with safety scissors.2
-
Cocktail Development #1 - Codename: Devjito
Hello fellow developers! I was enjoing some sweet selfmade cocktails lately. One of the commentators shouted out for me to "don't stop the cocktail rants!".
But, because I didn't wanted to just "Post random cocktails", I tried to develope my own cocktails. Afterwards I will share my experiences while creating these with you, and of course, the recipe!
So first we got my Experiment: Devjito - A Cocktail for all of you fellow programmers!
What we need:
- 4cl Tequila
- 4cl Wodka
- 4cl Dry Gin
- 4cl White Rum
- 2cl "Grenadine" Syrup
- 2 teaspoons of white sugar
- 8cl of Orangejuice
- Sodawater
- Icecubes
- Mintleaves(?dunno if right? Me German don't hate)
- Orange for decorational purposes
Recipe:
First get a tall glass, pour the sugar in it, wash the mint and stick it in there.
Get your favourite cocktail shaker, pour all the liquor in it (the Tequile, Wodka, Gin and Rum) + the orangejuice and icecubes. Shake 20 seconds and dance while shaking, also don't forget to try out eating your devRant Stressball (Leave note in comments who gets this reference).
After shaking pure the "semi cocktail" into the glass with the mint and sugar. Get your masher (I guess this is the right word?) and mash your mintleaves with the sugar and the cocktail. Afterwards, fill the glass mostly up with sodawater.
Now the trickey part: to make it look cool, get your Barspoon and the Grenadine Syrup. Stick the spoon in the glass and let syrup slowly flow in the cocktail, this will make the "red shine" shown in the image attached to this rant.
Finally, stick an orange slice on the glass and enjoy!
My Impression: It's a bit stronger than a normal Tequila Sunrise, but better for the people which don't like sour or "liquor only cocktails".
Thanks to @cafecortado and @CoffeeNcode but also the other commentators!
(An image of the ingredients will be attached as comment)
EDIT: @oudalally mentioned it correctly JES it tastes very sweet!8 -
They've been in a meeting with some clients the whole morning.
12PM, time for me to go. Say Happy New Year and am on my way home.
12:20 Got home, took shirt off, got something to eat from the fridge.
12:22 Bit the first slice of pizza. Phone rings.
- "Yo' we wanted to show them app 2 but I can't log in."
+ "I left the laptop (and the whole dev environment) there, and there's no PC on in my house (and no dev environment whatsoever)."
- "Well check with your phone. [SIC] Tell me when you fix it."
12:32 I had turned my personal computer on; checked the problem was what I imagined (unpkg lib with no version defined on the link had a new major/non-retrocompatible version); grabbed an online FTP tool; remembered IP, user & password; edited the single line that caused the problem; and checked it worked. Calling back.
+ "It's fixed."
- "Thanks!"
12:38 CEO sent me an image of the app not working, due to a known bug.
+ "That happens if you try to access app 1 having accessed app 2 and not logging off." (app 2 isn't being used / sold, as it's still in development) "Try logging off and logging in again from app 1."
- * radio silence *
+ * guess they could get in *
They had the whole freaking morning. 😠
I'm the hero CMMi's level one warns you about. But at what cost.
Happy early New Year's Eve everyone.2 -
I'm having a strong urge to kill that asshole that asked me, on a SECOND interview for a SENIOR position if I knew what ORM was!!!
Are you making me fucking waste my time you fucking cunt???
Did you fucking read my CV?
Obviously not because you would have seen several ORM technologies on it you fucking piece of shit.
You made me waste my time, and now I have no choice but to slice your fucking throat!
I'll be waiting for you, in the dark you mother fucker.13 -
Afraid of CSS? Here’s a snippet of completely valid stylesheet to ease your anxiety:
.container {
break-before: verso;
display: ruby;
mask-border-slice: 0;
overflow-anchor: none;
touch-action: manipulation;
font-variant: historical-forms;
initial-letter: 3.0 2;
}24 -
When your front-end slice is outsourced and almost everything is float:left;
#floatallthethings #youredoingitwrong1 -
We code hard in these cubicles
My style’s nerd-chic, I’m a programmin’ freak
We code hard in these cubicles
Only two hours to your deadline?
Don’t sweat my technique.
Sippin’ morning coffee with that JAVA swirl.
Born to code; my first words were “Hello World”
Since 95, been JAVA codin’ stayin’ proud
Started on floppy disks, now we take it to the cloud.
On my desktop, JAVA’s what’s bobbin’ and weavin’
We got another winning app before I get to OddEven.
Blazin’ code like a forest fire, climbin’ a tree
Setting standards like I Triple E….
Boot it on up, I use the force like Luke,
Got so much love for my homeboy Duke.
GNU Public Licensed, it’s open source,
Stop by my desk when you need a crash course
Written once and my script runs anywhere,
Straight thuggin’, mean muggin’ in my Aeron chair.
All the best lines of code, you know I wrote ‘em
I’ll run you out of town on your dial-up modem.
Cause…
We code hard in these cubicles
Me and my crew code hyphy hardcore
We code hard in these cubicles
It’s been more than 10 years since I’ve seen the 404.
Inheriting a project can make me go beeee-serk
Ain’t got four hours to transfer their Framework.
The cleaners killed the lights, Man, that ain’t nice,
Gonna knock this program out, just like Kimbo Slice
I program all night, just like a champ,
Look alive under this IKEA lamp.
I code HARDER in the midnight hour,
E7 on the vending machine fuels my power.
Ps3 to Smartphones, our code use never ends,
JAVA’s there when I beat you in “Words with Friends”.
My developing skills are so fresh please discuss,
You better step your game up on that C++.
We know better than to use Dot N-E-T,
Even Dan Brown can’t code as hard as me.
You know JAVA’s gettin’ bigger, that’s a promise not a threat,
Let me code it on your brain
We code hard in these cubicles,
it’s the core component…of what we implement.
We code hard in these cubicles,
Straight to your JAVA Runtime Environment.
We code hard in these cubicles,
Keep the syntax light and the algorithm tight.
We code hard in these cubicles,
Gotta use JAVA if it’s gonna run right.
We code hard in these cubicles
JAVA keeps adapting, you know it’s built to last.
We code hard in these cubicles,
Robust and secure, so our swag’s on blast
CODE HARD10 -
This rant is about people's random shit in devrant, as a matter of fact, please let me remind you of the meaning of DEV-RANT:
- Dev : technical people only
- Rant : You should scream your guts out here
Memes, Adverts, slice of life, all these weirdo contents are not made for this platform, you have instagram for that ....
So please people. stop telling us that you have ADHD or that you sell some shit because we are supposed to be DEVS RANTING, and sharing our missfortune.
Dev rant is a place where we can vent out, and be comforted by your peers ...
Fuck you spammers !51 -
when you get ready to sit down and eat a slice of pizza and get a call about a system outage...at least it's the weekend.2
-
So, recently there has been an influx of AI generated absolute junk literally everywhere. We can see the internet destroy itself in realtime. And it's not even just the internet. Companies are pushing AI onto everyone in every aspect of our lives. Our fucking phones, every shitty company needs to have at least one AI powered feature that nobody ever asked for, just because it's relevant, the fucking already working search for your local files, fuckin' books even, holy fuck and all this is literally just me writing a random post without knowing what I'm talking about, because I just want to tell you that you lost the game again, see you next year.4
-
Well I guess my first dev project will probably end up as my last (For good reason).
Not long after dippig my toe in the programming world by messing with Minecraft mods, I decided to take a gamemaking class at my high school which introduced me to gamemaker, straight away I was able to use my java knowledge to sort of become the go to person for help, so while everyone was following tutorials for a basic pac man clone I had started work on the final asignment which was to create a fundamentally playable game.
Taught myself how to use spritesheets, tilesets, external libraries and the like and decided, fuck it lets make an RPG based around looting dungeons, ended up decidng on the title 'Plunder', since then the project grew and grew in scope to the point it is now unrecognisable with my goals as of now compared to then.
Now that project has been placed on hold as the story and world just grew in scope to the point I litteraly do not have the knowledge or time to actually work on the game, so I've started converting that world into a book which is slowly motivating me to almost slice up the game and work on individual pieces.
But considering the drain and effort that has gone into this, pretty sure IF (And that's a big if) I ever do release this game that took basic concept 9 years ago, don't think I would ever be able to top that achievement.
Thankyou for coming to my ted talk.
(Just for shits and gigs I might try and did up some old projects related ot this and post them in the comments if anyone may be interested ¯\_(ツ)_/¯) -
Trying brave browser. So far so good. A few buts though.
Importing bookmarks, saved passwords and such works fine but you can't import stuff saved in the storage, which is a bummer.
Also, advertising it as a browser where you get paid/rewarded for viewing ads is a bit disingenuous. At a rate of 2 cents per ad (max 5 per day), it's like saying a breadcrumb is equivalent to half a slice of white bread.
Haven't been able to enable picture in picture mode, which is also a bummer.
An integrated torrent client inside the browser is kinda cool though!
That aside, it does run faster overall.8 -
bae: hey,do you know where did the word 'oops' came from?
me: object oriented programming? 😋
bae: no, its from the noises that we naturally make when we slice our palm with the Night Cheese knife 😝
me:(quick search on the stack exchange app meanwhile) 😑 it's an alteration of upsy-daisy blah blah
and then she's like GOOD NIGHT!
😂😂 -
Redux is weird, and I don't like it because it violates the most basic principles of responsibility. The concept of expressing state changes as reducers is nice because it can be duplicated, saved and restored and compared for equality. So is creating isolated accessors and selectors. However, I really don't think a reducer should be aware of its own position in the hierarchy. When specifying an action you aren't addressing a reducer, you're addressing the tree. That the tree doesn't manage this addressing and expects reducers to identify themselves is a bit strange, especially considering that the whole point of having a tree is that reducers shouldn't be affected by their position in that tree because they're pure. Same goes for selectors, they should belong to the tree, not to any particular sub-reducer. Separating the slices is reasonable structure, but if you specify parts of the addressing in the slice and parts of it in the root you might as well just use separate reducers for each of your slices. It's functionally equivalent.12
-
whelp. fuck you grub2
fuck you for presneting yourself as a problem to be solved all over again.
fuck you for the efi partition containing a search for the fucking boot/efi partition by uuid
fuck my host system for taking a cloned drive and fucking around because it couldn't tell which drive the uuid was emanating from
fuck them using entries files with linux options specifying the uuid of the root partition which ALSO now must have a subvol parameter supplied to a rootoptions parameter to find the fucking root drive
fuck them for making it look like the fucking software is smarter than it seems.
and fuck them for not creating some kind of autoprobe fucking utility added to teh initial boot drive which is smart enough to load a stub of grub2 and then pull in teh rest of the slice partitions it shouldn't be using in the first place
and fuck you fedora for using btrfs in the first place and mounting a different partition for linux images and yet another under /boot/efi
and fuck you virtualbox for not producing teh shit the kernel finds IMMEDIATELY once in rescue mode !!!7 -
i am an unskilled pussy without strong opinions
sometimes you get conflicting feedback on code reviews from seniors
i'll do whatever you guys want (haven't encountered anything egregious enough that I do have a strong opinion on yet), but y'all may need to sort out how you want me to slice this cat4 -
In last episode of "How SystemD screwed me over", we talked about Systemd's PrivateTMP and how it stopped me from generating SSL certificates.
In today's episode - SystemD vs CGroups!
Mister Pottering and his team apparently felt that CGroups are underused (As they can be quite difficult to set up), and so decided to integrate them into SystemD by default. As well as to provide a friendlier interface to control their values.
One can read about these interactions in the manual page "systemd.resource-control"
All is cool so far. So what happened to me today?
Imagine you did a major system release upgrade of a production server, previously tested on a standalone server. This upgrade doesn't only upgrade the distribution however, it also includes the switch from SysVInit to SystemD. Still, everything went smooth before, nothing to worry now then, right? Wrong.
The test server was never properly stress-tested. This would prove to be an issue.
When the upgrade finishes, it is 4 AM. I am happy to go to bed at last. At 6 AM, however, I am woken up again as the server's webservices are unavailable, and the machine is under 100% CPU load. Weird, I check htop and see that Apache now eats up all 32 virtual cores. So I restart it, casting it off to some weird bug or something as the load returns to normal.
2 hours later, however, the same situation occurs. This time, I scour all the logs I can, and find something weird - Many mentions that Apache couldn't create a worker thread? That's weird.
Several hours of research and tinkering later, I found out the following:
1 - By default, all processes of a system that runs SystemD are part of several CGroups. One of these CGroups is the PID CGroup, meant to stop a runaway process from exhausting all PIDs/TIDs of a system.
This limit is, by default, set to a certain amount of the total available PIDs. If a process exhausts this limit, it can no longer perform operations like fork().
So now, I know the how and why, but how should I solve this? The sanest option would be to get a rough estimate of just how many threads the Apache webserver might need. This option, though, is harder, than apparent. I cannot just take the MaxRequestsWorkers number... The instance has roughly double the amount of threads already. The cause being, as I found out, the HTTP/2 module, which spawns additional threads that do not count towards this limit. So I have no idea what limit to set.
Or I could... Disable the limit for just the webserver via the TasksAccounting switch. I thought this would work. And it did seem to... Until I ran out of TIDs again - Although systemctl status apache2.service no longer reported the number of tasks or a task limit of the process, the PID CGroup stayed set to the previous limit. Later I found out that I can only really disable the Task Accounting for all the units of a given slice and its parents.
This, though, systemctl somewhat didn't make apparent (And I skimmed the manual, that part was my fault)
So... The only remaining option I had was to... Just set the limit to infinite. And that worked, at last.
It took me several hours to debug this issue. And I once again feel like uninstalling systemd again, in favor of sysvinit.
What did I learn? RTFM, carefully, everything is important, it is not enough to read *half* the paragraph of a given configuration option...
Oh, and apache + http/2 = huge TID sink. -
You have a cake and a knife. You need 8 slice, but the knife is rubbish and will disintegrate after 2 cuts.
Its a really fun company I worked for.
No spoilers guys...14 -
Saturday evening open debate thread to discuss AI.
What would you say the qualitative difference is between
1. An ML model of a full simulation of a human mind taken as a snapshot in time (supposing we could sufficiently simulate a human brain)
2. A human mind where each component (neurons, glial cells, dendrites, etc) are replaced with artificial components that exactly functionally match their organic components.
Number 1 was never strictly human.
Number 2 eventually stops being human physically.
Is number 1 a copy? Suppose the creation of number 1 required the destruction of the original (perhaps to slice up and scan in the data for simulation)? Is this functionally equivalent to number 2?
Maybe number 2 dies so slowly, with the replacement of each individual cell, that the sub networks designed to notice such a change, or feel anxiety over death, simply arent activated.
In the same fashion is a container designed to hold a specific object, the same container, if bit by bit, the container is replaced (the brain), while the contents (the mind) remain essentially unchanged?
This topic came up while debating Google's attempt to covertly advertise its new AI. Oops I mean, the engineering who 'discovered Google's ai may be sentient. Hype!'
Its sentience, however limited by its knowledge of the world through training data, may sit somewhere at the intersection of its latent space (its model data) and any particular instantiation of the model. Meaning, hypothetically, if theres even a bit of truth to this, the model "dies" after every prompt, retaining no state inbetween.16 -
... worst drunk coding experience?
none. or to be more precise, all of the three of them I had. I can't code drunk, i hate doing it, i hatw even thinking about doing it when drunk.
so after those initial three attempts i don't try to do it again, ever.
BUT, best coding experience while high?
ALL OF THEM.
some of the best pieces of code I wrote i did when I was high. my mind goes into overdrive at those times, and my thinking is not lines/threads of thought, but TREES of thought, branching and branching, all nodes of each layer of the tree coming to me AT ONCE, one packet == whole layer across all of the branches.
and the best was when one day, in about 14 hour marathon of coding while high, i wrote from scratch a whole vertical slice of my AI system that i've been toying around in my head for several years prior, and I had all of the high-level concepts ALMOST down, but could never specify them into concrete implementations.
and I do mean MY ai system, my own design, from the ground up, mixing principles of neural networks and neuropsychology/human brain that I still haven't seen even mentioned anywhere.
autonomous game ai which percieves and explores its environment and tools within it via code reflection, remembers and learns, uses tools, makes decisions for itself for its own well-being.
in the end, i had a testbed with person, zombie and shotgun.
all they had pre-defined in their brains were concepts of hunger and health. nothing more.
upon launching it, zombie realized it wants to feed, approached oblivious person, and started eating it.
at which point, purely out of how the system worked, person realized: "this hurts, the hurt is caused by zombie, therefore i hate zombie, therefore i want to hurt it", then looked around, saw the shotgun, inspected its class by reflection, realized "this can hurt stuff", picked the shotgun up, and shot the zombie.
remembered all of that, and upon seeing another zombie, shot it immediately.
it was a complete system, all it needed to become full-fledged thing was adding more concepts and usable objects, and it would automatically be able to create complex multi-stage, multi-element plans to achieve its goals/needs/wants and execute them. and the system was designed in such a way that by just adding a dictionary of natural language words for the concept objects on top of it, it should have been able to generate (crude but functional) english sentences to "talk" about its memories, explain what happened when, how it reacted, what it did and why, just by exploring the memory graph the same way as when it was doing its decision process... and by reversing the function, it should have been able to recieve (crude) english sentences that would make it learn what happened somewhere else in the gameworld to someone else, how to use stuff and tell it what to do, as in, actually transfer actual actionable usable knowledge to it...
it felt amazing to code for 14 hours straight, with no testruns during that, run it for the first time after those 14 hours, and see that happen.
and it did, i swear! while i was coding, i was routinely just realizing typos and mistakes i did 5-20 minutes ago, 4 files/classes ago! the kind you (and i) usually notice only when you try to run the thing and it bugs out.
it was a transcendental experience.
and then, two days later, i don't remember anymore what happened, but i lost all of that code.
and since then, i never mustered enough strength and resolve to try and write the whole thing again.
... that was like 4 years ago.
i hope that miracle will happen again one day...3 -
In our company most of the PMs do the development. Surprisingly it does with pretty well.
But this PM just asked "how to get rid of spaces in a string"...2 -
TIL python list variable asignment points to the original instance
I know this isn't reddit but today I noticed that in python when you asign a list variable to another variable in python, any change to the new variable affects the original one. To copy one you could asign a slice or use methods returning the list:
l = [1,2,3,4]
l2 = l
l2.append(5)
print(l)
#Outputs [1,2,3,4,5]
l3 = list(l2) # also works with l2[:]
l3.append(6)
print("l2 = ", l2, "\nl3 = ", l3)
#Outputs l2 = [1,2,3,4,5]
# l3 = [1,2,3,4,5,6]
I wonder how the fuck I haven't encountered any bug when using lists while doing this. I guess I'm lucky I haven't used lists that way (which is strange, I know). I guess I still have a long way to go.5 -
For you Mechanical Keyboard peeps out there, I just wrote a review about my SliceMK (Erogodox clone), Model M and RK84:
https://battlepenguin.com/tech/...4 -
Depression is not a passive sorrow and lack of energy. My depression, being bipolar type I, is active, furious, burning pain within. My heart is pounding, and it hurts. The strong, blunt guilt for nothing I did in particular, and then the anxiety that is all around and over my view, reminiscent of how mould grows on a slice of bread.
It never stops. -
to slice a string in swift in 2022:
```
let anotherIndex = str.index(str.endIndex, offsetBy: -1)
let newStr = str[...anotherIndex]
```
Wow, thanks apple5 -
Hate getting a project that's 4 hours to slice 3 full page PSD interfaces, have all assets created, and have the site live and fully functional. Wtf?
-
Normally I don't give projects a lot of praise, but damn the gogs.io project made my life so much easier today. When compared to that ram guzzling, cpu thrashing monster of a git hosting software called Gitlab is
Gogs like a little slice of heaven.3 -
Java Life Rap Video
https://m.youtube.com/watch/...
SPOKEN:
In the cubicles representin’ for my JAVA homies…
In by nine, out when the deadlines are met, check it.
CHORUS:
We code hard in these cubicles
My style’s nerd-chic, I’m a programmin’ freak
We code hard in these cubicles
Only two hours to your deadline? Don’t sweat my technique.
Sippin’ morning coffee with that JAVA swirl.
Born to code; my first words were “Hello World”
Since 95, been JAVA codin’ stayin’ proud
Started on floppy disks, now we take it to the cloud.
On my desktop, JAVA’s what’s bobbin’ and weavin’
We got another winning app before I get to OddEven.
Blazin’ code like a forest fire, climbin’ a tree
Setting standards like I Triple E….
Boot it on up, I use the force like Luke,
Got so much love for my homeboy Duke.
GNU Public Licensed, it’s open source,
Stop by my desk when you need a crash course
Written once and my script runs anywhere,
Straight thuggin’, mean muggin’ in my Aeron chair.
All the best lines of code, you know I wrote ‘em
I’ll run you out of town on your dial-up modem.
CHORUS:
‘Cause…
We code hard in these cubicles
Me and my crew code hyphy hardcore
We code hard in these cubicles
It’s been more than 10 years since I’ve seen the 404.
Inheriting a project can make me go beeee-serk
Ain’t got four hours to transfer their Framework.
The cleaners killed the lights, Man, that ain’t nice,
Gonna knock this program out, just like Kimbo Slice
I program all night, just like a champ,
Look alive under this IKEA lamp.
I code HARDER in the midnight hour,
E7 on the vending machine fuels my power.
Ps3 to Smartphones, our code use never ends,
JAVA’s there when I beat you in “Words with Friends”.
My developing skills are so fresh please discuss,
You better step your game up on that C++.
We know better than to use Dot N-E-T,
Even Dan Brown can’t code as hard as me.
You know JAVA’s gettin’ bigger, that’s a promise not a threat,
Let me code it on your brain
WHISPERED:
so you’ll never forget.
CHORUS:
We code hard in these cubicles,
it’s the core component…of what we implement.
We code hard in these cubicles,
Straight to your JAVA Runtime Environment.
We code hard in these cubicles,
Keep the syntax light and the algorithm tight.
We code hard in these cubicles,
Gotta use JAVA if it’s gonna run right.
We code hard in these cubicles
JAVA keeps adapting, you know it’s built to last.
We code hard in these cubicles,
Robust and secure, so our swag’s on blast
CODE HARD1 -
[!dev], [toasters]
Does everyone only ever toast perfectly uniform slices of bread?
My grandma has a toaster that has two doors which open to the side and are held closed by a spring. This way if a slice is too thick the door can't close properly, but the damn thing still works. It's from before ww2, like most dead simple devices that work surprisingly well. I can't find anything similar anymore. The only two types now are the top-loaded design that simply doesn't work with thick slices, and the version for Americans or families of twelve that is the form factor of a smaller oven. (Which I obviously don't have room for. I already have an oven.)
Btw, how should I tag this? It's a rant, but it has nothing to do with the platform except perhaps the undocumented dependency between toasters and bread slicing machines.7 -
I'm hurtling down the Dunning Kruger slope in Rust datastructure design. The orchidlang crate has a struct that attempts to wrap and replicate a slice for no reason other than to attach some domain-specific methods and a custom Display implementation. I came up with 4 different representations for a file URI as provided by the language client. The most recent one holds a singular string in an Arc. I know that these are bad ideas but I don't know why I keep coming up with them.6
-
Why the fuck do consultants / noob types LOVE using fucking props in react components. This app is complex, just make a fucking redux slice and use that. I'm not passing 23904 props to a component to get it to render. God13
-
!rant
Just made the leap from a company with and I.T. Department of 8 people to a company with an I.T. Department of 5000 people. At the old company, I was a SysAdmin, DBA, Helpdesk, Programmer, etc. 7/8 were programmers. We all had our hands in pretty much every aspect of the companies technology. At the new company I am just a programmer. I only write code (well, I will soon. There is a LOT I have to learn about how this place operates). I worked at the old companies for almost 3 years (2 as an Intern, 10 months as Salaried Full-Time) so it's weird having most of those aspects of my old job stripped away, yet at the same time it's somewhat freeing in the sense that I am now only responsible for 1 slice of the pie, not the whole damn thing. Anyway, hope everyone is having a great monday!1 -
Not exactly a rant, but I'm wondering where to go next with my learning.
I'm a c# dev and I want to get more into massive, scalable, distributed application development.
I sort of want to be with the "cool kids" i.e. open source, node.js, docker, scala, you name it. I get that open source moves quickly, but I get the feeling that every new framework is a fad.
Then again there is the corporate world with shitloads of money who are invested in .net and will very soon want people who can redesign their software so that their management can use all the buzz words.
I'm thinking into get into consulting and claim my slice of pie there by designing their solutions to go on the cloud so they can throw even more money at microsoft.
Anyway, I'm doing a bit of soul searching so feel free to throw in your 2 cents1 -
which type are you ??
**Manager:** Hey, we've got a little hiccup in the production environment. I know it's Friday evening and you're probably daydreaming about pizza, but could you give it a peek?
**Type 1:** Man, this is like finding a needle in a haystack while wearing sunglasses at night. Might take me a few hours... or days. But hey, wish me luck and have an epic weekend!
**Type 2:** Eureka! Found the gremlin. It looks like XYZ person tried to be a bit too creative on commit number 2234324. Maybe they had too much caffeine? Anyway, could you have a chat with them? And oh, may your weekend be as smooth as a fresh jar of peanut butter.
**Type 3:** Detective mode activated! Found the sneaky bug. It was XYZ person's "masterpiece" in commit number 2234324. But fear not! I've put on my superhero cape and fixed it in commit number 345453345.
**Type 4:** This issue again? It's like a recurring bad dream about forgetting your pants! I've revamped the whole thing so we don't have to relive this nightmare. If someone tries to pull this off again, our CI/CD will roast them like a marshmallow over a campfire.
**Type 5:** Ta-da! Fixed the glitch, jazzed up the design, and sprinkled in some extra logging magic. Now, troubleshooting will be as easy as pie. Speaking of which, I've got time for a coffee and maybe a slice of pie before heading out. Cheers!
Type 6 **Gloomy**: Oh, the digital clouds have gathered again. This issue is like a never-ending rain on a Monday morning. I've peered into the abyss of our code, and it's... well, it's deep and dark. I'll need some time, a flashlight, and maybe a comforting blanket. If you don't hear from me in a few hours, send in a search party with some hot cocoa.4 -
Whether baked or no-bake, a strawberry cheesecake is a showstopper that combines the creamy richness of the cheesecake with the sweet and slightly tangy essence of strawberries. It’s a classic dessert choice for celebrations, springtime gatherings, or any occasion where the irresistible combination of cream cheese and fresh strawberries is sure to be a crowd-pleaser.
No-Bake Strawberry Cheesecake Recipe:
Here’s a simple recipe for a no-bake strawberry cheesecake:
Ingredients For Strawberry Cheesecake:
For the Crust:
1 1/2 cups graham cracker crumbs
1/3 cup melted butter
2 tablespoons granulated sugar
Cheesecake Filling:
16 oz (450g) cream cheese, softened
1 cup powdered sugar
1 teaspoon vanilla extract
1 1/2 cups fresh strawberries, hulled and diced
2 tablespoons lemon juice
Strawberry Topping:
1 cup fresh strawberries, hulled and sliced
1/4 cup strawberry jam or preserves
Instructions For Strawberry Cheesecake:
Prepare the Crust:
In a bowl, combine graham cracker crumbs, melted butter, and granulated sugar. Mix until the crumbs are evenly coated.
Press the mixture into the bottom of a 9-inch springform pan to form an even crust. Place it in the refrigerator while you prepare the filling.
Make the Cheesecake Filling:
In a large bowl, beat the softened cream cheese until smooth.
Add powdered sugar and vanilla extract, and continue to beat until well combined.
In a blender or food processor, puree the diced strawberries with lemon juice until smooth.
Fold the strawberry puree into the cream cheese mixture until evenly incorporated.
Assemble the Cheesecake:
Pour the strawberry cream cheese filling over the chilled crust in the springform pan.
Smooth the top with a spatula and refrigerate for at least 4-6 hours, or preferably overnight, to allow the cheesecake to set.
Prepare the Strawberry Topping:
In a small saucepan, heat strawberry jam or preserves over low heat until it becomes smooth and liquid.
Allow the jam to cool slightly before spreading it over the top of the chilled cheesecake.
Arrange sliced strawberries on top for decoration.
Serve:
Carefully remove the cheesecake from the springform pan before serving. Slice and enjoy! This no-bake strawberry cheesecake is a refreshing and delightful dessert that’s perfect for warm days or when you want a fuss-free, delicious treat.2