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 - "one-liners"
-
I taught my 9yo sister to SSH from my Arch Linux system to an Ubuntu system, she was amazed to see terminal and Firefox launching remotely. Next I taught her to murder and eat all the memory (I love Linux, as Batman, one should also know the weaknesses). Now she can rm rf / --no-preserve-root and the forkbomb. She's amazed at the power of one liners. Will be teaching her python as she grew fond of my Raspberry Pi zero w with blinkt and phat DAC, making rainbows and playing songs via mpg123.
I made her use play with Makey Makey when it first came out but it isn't as interesting. Drop your suggestions which could be good for her learning phase?13 -
Aren't lambda expressions just the most frustrating thing sometimes? But how can you not love them when they get the job done in one-liners? 😍2
-
to the guy who writes indented IF statements all one liners and brackets removed
please fuck yourself6 -
Day 1 at internship:
Manager: Can you get this RFID tracking system working? We have the full source we just need it installed.
Me: Sure thing, shouldn't take too long if it's a working system.
Me: (opens VS project)
Code is a sprawling abyss devoid of any intelligible structure, commented with broken one-liners which serve only to annotate method names.
In Mandarin.
For the record the system was broken, took me several weeks to track down all the issues.4 -
i once had a manager that would fuss at every little detail.
front end had to be pixel perfect on every freaking device he could find and the backend being over documented that one liners needed a bloody comment.
//is it true?
if( true ) {
}
anything needing more then 5-10 minutes to work out required several meetings to discuss every tiny aspect in detail.
drove me insane and glad i left!2 -
This new WhatsApp status page is weird ....I miss the one liners that I used to give as status...
Does anyone feel the same?6 -
• Plan out everything by taking notes on the rough functionality of the project and how it could be done in a preferably simple way
• Writing code, but documentating it while doing so
• Also trying to write clean code so it can be more easily built upon
• Also keeping everything simple. If I'm using nasty, unreadable one-liners because of efficiency advantages, I'm putting a comment there for what could alternatively be used + explaining it
• Abandon it because side projects never get done1 -
Marketing Director uses the website's blog as his personal social media platform and posts weird one-liners which should have been social media posts.
Refuses to acknowledge content quality is a problem and insists I make the SEO better by doing some stuff with the code.
I can do what I can, technically speaking, but your poor quality content will still drag the entire thing down, asshole.
A blog is not a social media platform, dude.2 -
I've seen a lot of shitty code. REALLY shitty code...but this. Calling this shitty would be a compliment, so I'm not sure what to call it. The following is copied straight from his source code, which I'm tasked with finding a production logic bug in. The original composer of this masterpiece of one-line clusterfucks is no longer with the company of course, so his pile of shit is now my problem. The program is littered with stuff like this.
if(((FrontLowerLeft.X > tempPack.FrontLowerLeft.X && FrontLowerLeft.X < tempPack.FrontLowerLeft.X + tempPack.Dimensions.Width) || (FrontLowerLeft.X + Dimensions.Width > tempPack.FrontLowerLeft.X && FrontLowerLeft.X + Dimensions.Width < tempPack.FrontLowerLeft.X + tempPack.Dimensions.Width) || (tempPack.FrontLowerLeft.X > FrontLowerLeft.X && tempPack.FrontLowerLeft.X < FrontLowerLeft.X + Dimensions.Width) || (tempPack.FrontLowerLeft.X + tempPack.Dimensions.Width > FrontLowerLeft.X && tempPack.FrontLowerLeft.X + tempPack.Dimensions.Width < FrontLowerLeft.X + Dimensions.Width) || (tempPack.FrontLowerLeft.X == FrontLowerLeft.X && tempPack.Dimensions.Width == Dimensions.Width)) && ((FrontLowerLeft.Y > tempPack.FrontLowerLeft.Y && FrontLowerLeft.Y < tempPack.FrontLowerLeft.Y + tempPack.Dimensions.Height) || (FrontLowerLeft.Y + Dimensions.Height > tempPack.FrontLowerLeft.Y && FrontLowerLeft.Y + Dimensions.Height < tempPack.FrontLowerLeft.Y + tempPack.Dimensions.Height) || (tempPack.FrontLowerLeft.Y > FrontLowerLeft.Y && tempPack.FrontLowerLeft.Y < FrontLowerLeft.Y + Dimensions.Height) || (tempPack.FrontLowerLeft.Y + tempPack.Dimensions.Height > FrontLowerLeft.Y && tempPack.FrontLowerLeft.Y + tempPack.Dimensions.Height < FrontLowerLeft.Y + Dimensions.Height) || (tempPack.FrontLowerLeft.Y == FrontLowerLeft.Y && tempPack.Dimensions.Height == Dimensions.Height)) && ((FrontLowerLeft.Z > tempPack.FrontLowerLeft.Z && FrontLowerLeft.Z < tempPack.FrontLowerLeft.Z + tempPack.Dimensions.Depth) || (FrontLowerLeft.Z + Dimensions.Depth > tempPack.FrontLowerLeft.Z && FrontLowerLeft.Z + Dimensions.Depth < tempPack.FrontLowerLeft.Z + tempPack.Dimensions.Depth) || (tempPack.FrontLowerLeft.Z > FrontLowerLeft.Z && tempPack.FrontLowerLeft.Z < FrontLowerLeft.Z + Dimensions.Depth) || (tempPack.FrontLowerLeft.Z + tempPack.Dimensions.Depth > FrontLowerLeft.Z && tempPack.FrontLowerLeft.Z + tempPack.Dimensions.Depth < FrontLowerLeft.Z + Dimensions.Depth) || (tempPack.FrontLowerLeft.Z == FrontLowerLeft.Z && tempPack.Dimensions.Depth == Dimensions.Depth)))
{
//code that did stuff
//removed for "clarity"
}7 -
The programming things I've seen in code of my uni mates..
Once seen, cannot be unseen.
- 40 if's in 10 lines of code (including one-liners) for a mineswepper game
- looping through a table of a known size using while loop and an 'i' variable
- copying same line of code 70 times but with different arguments, rather than making a for loop (literally counting down from 70 to 0)
- while loop that divides float by 2 until it's n < 1 to see if the number is even (as if it would even work)
..future engineers
PS. What are the things you've been disgusted by while in uni? I'm talking about code of your collegues specifically, I'm also attaching code of my friend that he sent me to "debug", I've replaced it with simple formula and a 2D distance math, about 4 lines of code.6 -
Hey fastlane!
Great tool and all, but your documentation is at 🤡 levels, I need to read 20+ pages to get a full overview and understanding. So far I've had to read a dozen plus blogs and stackoverflow posts to find hidden flows (authentication first to do this, etc. etc. etc.)
Don't market your tool as "reducing complexity & saving time" and showing one-liners in the docs when in reality there are lots of hidden steps and NOT one-liners!!!!!!
This is why everyone complains it takes 1-2 days to just get a freaking pipeline working!!!!🤡 -
Me 2 cents on python:
Cheers on python for enforcing indentation for the sake of readability.
Fuck devs for writing a fucking function in one line or 200char.
Also fuck type less one liners even more.rant fuck python tabs vs spaces typewriter fuck developers python fuck this shit indentation readability4 -
var icon = (s.viewOnly ? 'red.png' : !s.pickup ? 'blue.png' : s.hoursPoint ? 'orange.png' : 'red.png')1
-
So in grade 11 (2 years ago),i had to do something called "job shadowing".basically you choose a profession and you go to a workplace. My cousin (who's in the same SAP industry)got me into this SAP development place.there were like quite a few "developers" but mostly business analysts.they made me learn this (in my oppinion) absolute shit language called ABAP which I found to be mostly glorified SQL . First I had to just create a small program which I did in like a few minutes after my mentor taught me the basic commands but you have to learn alot of module numbers and other shit.and guess what ,I remember I had to end one liners with a damn full stop,seriously fucking irritating.
So,worst dev technology I've worked with ever is SAP.Bad thing is my cousin and my uncle are really trying to take me into that bullshit SAP shit of theirs but I always refuse.will never step my foot into a SAP development job ever.3 -
in this takehome challenge: let's see how much we can over-fucking-complicate every single thing. You want one selectors (that could just be one-liners) stacked on top of MORE one liner selectors? you got it!
you want sagas with fucking wierd ass syntax that can be replaced with i don't know, BUILT IN JAVASCRIPT??!!? you got it!
oh yeah, and with all this complexity, not a single line is written with TypeScript...
...i can't remember the last time i fucking had to write the characters 'propTypes' on a react project
what the hell is this, 2015?
it's absolutely mind exploding mind boggling how these orgs operate
double the work, double the time, double the cost
but what do i know? i'm just a 🤡 -
We love getting one-liners assuming we have a whole lot of extra background knowledge when we ask questions4
-
Another first world mimimi but still an obstacle when just wanting to get work done quickly. I don't know what's more annoying: the multi-line pasted styles that used to be useful one-liners, or the fact that the top search result for this issue was closed/locked without even linking to the appropriate Chromium bugreport?! People report that's fixed, but the fix did not land in Vivaldi yet. Maybe I should consider using Firefox as my default browser again.1
-
A beautiful but fundamentally flawed Rust one-liner I found in my own code during refactoring today:
iter.size_hint().1.map_or_else(Vec::new, Vec::with_capacity)random size_hint.1 gets _really big_ sometimes rust allocate maximum possible memory needed one-liners14 -
How can a novel emerging challenger software (written in Rust) take me 4 hours to install (still ongoing)?
Today I have decided to give Pijul a go. Pijul describes itself as a theory-sound alternative to Git, which I have wanted to get away from for a while now, due to various reasons -- many of which I saw Pijul advertise to have solved on design level.
So I set away a day to learn Pijul, today. Well, 4 hours after I sat down -- after a number of hilariously wonky failures of "Rust ecosystem" to do the right thing as I had to install Rust with some shell one-liners those insane wizards recommend for installation process (all in the name of "stability but not stagnation") -- Pijul has now been installing with the blasted `cargo` for an hour now (that's after 3 hours of getting to the point where `cargo install pijul` stopped exploding in my face) -- telling me I only have 40 crates more to install. Are they throttling me, perhaps? I don't care -- I should have been installing Pijul from a repository in accordance with my Linux distribution, or -- at worst -- download a BLOODY COMPILED PROGRAM IMAGE.
What is it with the hipster developers today? Everything they get of tools, they subsume and churn out intricate complexities the likes of which we hadn't seen yesterday. Tell me fellow developers who think installation of your software has to require three and a half novel "installation solutions" to which I can't be arsed to be made privy -- do you think your life today is easier than, I don't know -- wrangling with a Makefile and a C compiler (which today thankfully can do rather good job of standards compliance)?
I mean I wouldn't mind Pijul being written in Rust -- but it turns out Rust's advertised elegancy in practice is wrapped in so much "giftwrap" I feel like what desire I had to learn Rust myself, I'll stear well clear.
Here's an advice for developers in general -- an advice continiously ignored for decades -- stop blowing your original scope of delivery in auxilary packages you think you need to reinvent just because you can or because your mom is out of town! For programming languages like Rust this most certainly entails NOT writing your own package manager, with its own package delivery mechanism that has its own configuration file format and virtual machine to configure dependency resolution or what have you!
You wanted to write a programming language that has novel features you think we need? Fine -- write one and stop there. Watch it grow, and watch people who are busy working on other parts (scopes) of software to integrate your offer.
What a shitshow. Stop smuggling alternative package managers, installers, and discombulators with your actual product -- I only want the latter, I don't want the rest of your damn piping, walls, roof and a cathedral on top of it!
Don't be that guy starting with a pin, and ending up with a fucking diorama miniature of a pig farm in Netherlands. Jesus.7