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 - "nested"
-
Colleague: "Python is slow..too much slow."
Then I look at the code:
Eight nested for loops, inside two of them, two function calls and three list comprehension. That function has 2 nested loops and two "objects.all()" Django method, plus a list comprehension too..
Yep, Python is slow.20 -
Me: *uses HashMap* for a problem to count some elements*
Lecturer: why are you using HashMap?
Me: it's the best way of solving the problem
Lecturer: I haven't explicitly taught you what a HashMap is so why are you using it?
Me: Because I learn outside of what university teaches me
Lecturer: there's another way to do this
Me: enlighten me
Lecturer: iterate through the array using a nested for loop and count as you go along
Me: why the hell would I want to do that? That literally decreases the efficiency of my program by alot
GG lecturer telling me it's a better idea of making my O(n) runtime into an O(n^2) instead of complimenting my code.
Seriously what the fuck is up with the fucking education system. Since when was it okay to teach students how to completely fuck your code up and promote ways of making your code so inefficient?33 -
Whenever I find a good github project I go straight for the "utils" folder to see if I can steal anything useful5
-
TABLE BASED WEB DESIGN
I was surprised there were no rants about this topic before I realized it was more than a decade back 😳
We've never had it better! So to help add a little perspective for all those ranting about what is unarguably the golden age for web developers... let me fill you in on web dev in the late 90's;
JavaScript was a joke. No seriously! - I once got laughed out of the room for suggesting we try use it for more than disabling a button - (I wanted to check out the new XHR request thingy [read AJAX]).
HTML was simple and purely a markup language (with the exception of the marquee tag). The tags were basically just p,ul,ol,h*,form inputs,img and table and html took 10 minutes to learn. Any style was inline and equally crude - anything that wasn't crude could not be trusted and probably wouldn't render at all in most browsers (never mind render correctly).
There were rumors of a style TAG and something called a cascading style sheet which were received with much skepticism since it went against the old ways and any time saved would be lost writing multiple [IE version specific] style sheets for each browser just to get it to work - so we simply didn't.
No CSS meant the only tags you had to work with to create a structured layout were br, hr and table... so naturally EVERYTHING was in nested tables! JS callback hell can't touch this! - it was not uncommon to have 50+ nested tables all with inline style in a single page which would be edited without any dev tools or linting.
You would spend 30 minutes scanning td tags until your eyes bled to find something, make a change, ftp the file to the server, reload the web page and then spend 10 minutes staring at the devastation on your screen convinced you broke
the internet before spotting an un-closed td tag with your bloodshot eyes.
Tables were not just a silver bullet - they were the ONLY bullet and were in the wild west!
Q: Want an inline form or to align your inputs left?
A: Duh table!
Q: Want a border with round-corners, a shadow or blur?
A: That's easy! Your gonna want to put that table in the center cell of another table then crop a image of the border into 6 smaller images to put in the surrounding cells... oh and then spend 10 minutes fucking with mystical attributes like cell-padding and valign to get them flush.
...But hey at least on the bright-side vertically & horizontally centering stuff was a breeze!22 -
Mac: Hello welcome please sign in
Dev: Fair enough
Mac: Oh you haven’t signed in in awhile please get get verification from other device
Dev: kk
Mac: Oh you don’t have a dev account, please sign in on this website
Dev: Hm.
Mac: In order to sign up for a dev account you need to download this app
Dev: ???
Mac: Are you sure you want to open this app you just downloaded?
Dev: Sigh.
Mac: In order to sign up for a dev account on this app you need to sign into it
Dev: For the love of god
Mac: Ok now you can build with Xcode.
Xcode: No you can’t. You have to sign in
Dev: fuck sakes.
Mac: Are you sure you want Xcode to access files on your computer?
Dev: …Yup
Xcode: Signing in isn’t enough you have to select the fact you are signed in a dropdown nested 3 menus deep.
Dev: God damn.
Xcode: Build failed please sign in to phone as well.
Phone: New sign in detected, please verify with alternative device.
Dev: Jesus.
Xcode: Build success! Pushing to iPhone.
Dev: Finally.
Xcode: Unknown error occurred. Please go to support.apple.com for help. :)
Dev: …20 -
I need to render point clouds in OpenGL for a project I'm working on. The problem is it just becomes too damn slow when the point cloud size increases. So I'm trying to use LOD methods and nested octrees to speed things up. Also, I need to render text too in my OpenGL scene. So now I'm stuck trying to show proper labels using Qt and OpenGL which is completely pissing me off by the way. And I'm not doing the actual speeding up thing I was working on earlier on and before that I was working on the actual function of my program. So I'm now deviated from the deviation.
Fuck my brain.4 -
Please for the love of god name your variables in a sensible way! How the FUCK am I supposed to read your shitcode if you decide to write 6 (!!!) nested loops with variables each named by exactly one character. With no comments whatsoever!
I would rather crack password hashes than this nonsense.13 -
Manager: 'Please remove this checkbox from that page.'
Me: 'Sure thing, it was stupid anyway. Just gimme a couple of minutes.'
Legacy code: 'LOL the checkbox is wired to everything else and if you simply remove it the backend will shit itself. There is several hundred lines of inline Javascript in the HTML template with some Thymeleaf stuff managing the form data or just are there to make the code less readable. The controller for the page is a bit more than a thousand lines of spaghetti, no easy way to find where is that specific data necessary and where can be easily removed. Class variables declared between methods, dozens of nested if statements checking shit in every method and the data is passed through like half a dozen other classes. Good luck with that!'
Me: '💩.'5 -
We have a new developer working in our office. He is fairly new, which is understandable, so he asks for help regularly(which I actually appreciate). This time however, he asked for help, and every step of the way argued it. He said he needed help making a small circle(it's just an indicator on a table).
I told him if there is a mat-icon it would be simple, but if not it would still be pretty simple with CSS. He argued that those two options seem messy. I pointed out they are extremely clean actually, and showed him how it was only about 4 lines of css. and 1 if there was a material icon. He agreed it was pretty easy, and then went with a complicated way to have green or red. I let him know that was really trivial, and even gave him the exact code he needed for it(at this point, he could have copy and pasted, adjusted the conditional to the name of his variable, and be done).
He proceeds to take 3 more days to complete this task, making a new component for a colored circle, using templates and nested css in the html, and hard coding the color as opposed to using the material colors we use site wide. All in all 100+ lines of code. And he felt my solution with fewer than 10 lines was messy.14 -
Going to forums asking for help as to why my nested for loop wasn't working correctly after the first loop only to realise I was using the variable i for both loops...
Felt like an absolute twat4 -
Listen. Use invariants. If you can do
if(!x) {
return foo;
}
...rest of function logic...
Instead of
if(x) {
...some long branch with more tests...
} else {
return foo;
}
Please do. It's so much easier to read when all of your conditions are tested in a line at the top instead of nested 8 layers deep in if-else blocks.
Thanks14 -
Hello, I just want to let you know I'm working on a 15 year old product and it is currently in production.
It uses Angular.js and one of the earliest versions of React.js. I cannot use ES6, we don't have Babel, no JSX syntax, no CSS preprocessor. No webpack.
I must support browser since IE6 with an ES3 syntax. (luckily I got some some polyfills for an ES5 syntax)
When I build a component I have to call React.createClass and React.createElement.
The render() function is basically a nested pile of React.createElement.
There is no documentation for this product, no tests, no anything.
I had to reverse engineer it in order to understand how it works.
The code base uses mixed programming styles and naming conventions, plus thousands of little js files.
Oh and obviously no hot reload, every time I make a change I have to restart everything.
Please, send help.
I'm in danger.
Sincerely,
An underpaid developer
....
I'm not crying, you are crying...19 -
Most hated language features?
PL/SQL:
• it exists
XSLT:
• it also exists
PHP:
• it still exists.
VB:
• Significant parentheses: `subName` calls the subroutine, and `subName()` calls the subroutine and gets a return value. If you use the wrong invocation, it yells at you. Why!?
• For reasons unknown, you can only have `sleep` appear once per codebase. (So put it in a function!)
Ruby:
• It’s bloody easy to write code with absolute shit performance, and it kind of feels encouraged because of just how easy Ruby makes everything. Less critical thinking means worse performance, and Ruby’s blissful elegance encourages mental laziness.
• Minor: You cannot pass a hash as the first method parameter without enclosing it in parentheses, ex:`method({key: value})`. This is due to the ambiguous case between passing a hash argument and a (curly) block/proc (`method {|args| code}`). This could be remedied pretty easily with a little bit of look ahead.
• Minor: There is no `elsif` for `unless` (a negated if). Why? No reason given.
Python:
• no block endings, so nested code can be extremely difficult to follow.
Bash:
• The freaking syntax oh god why.
All languages:
• rand vs rand() vs Rand vs Rand() vs rnd vs RND vs random() vs random vs randInt() vs Math.random() vs Math.randInt() vs ...18 -
As a Java developer, reasons to kill other programmers:
- static mutable variables
- WRITING to static mutable variables
- API call with Framework X didn't work. Add Framework Y along with X and try that. Wrap X in try/catch statement. Catch block fires framework Y.
- six, seven, ten levels of nested code. Zero thought put in organization
- 6K LOC Java files
- spring (singleton? Maybe) object assigning values in static mutable (see pt.1)
- a couple of unit tests in code base that no longer work. Zero unit tests in new code
- unit testing disabled in CI pipeline
- empty catch blocks
- pass mutable data between threads. Modify in various places concurrently.3 -
I'M SO PROUD, I WROTE A FULLY-FUNCTIONAL JSON PARSER!
I used some data from the devRant API to test it :D
(There's a lot of useful tests in the devRant API like empty arrays, mixed arrays and objects, and nested objects)
Here's the devRant feed with one rant, parsed by Lua!
You can see the type of data (automatically parsed) before the name of the data, and you can see nested data represented by indentation.
The whole thing is about 200 lines of code, and as far as I can tell, is fully-featured.24 -
Manager: I like nested ifs
Dev: They can be difficult to maintain
Manager: No they aren’t I write them all the time!
Dev: Have you ever maintained one?
Manager: No, I don’t do code maintenance. I don’t have time for it.5 -
So I tried to start learning Spring 5
How the fuck do you guys do it? Holy shit.
30 seconds in:
"Spring really isn't hard, you start with this request handler interacting with a view parser..."
Alright, sounds good
2 minutes in:
"So in order to use SpringResponseDriverActionHandlerServiceRequesterService you'll need to import com.org.java.spring.util.driver.comagain.request.response.request.drivers and include this 37 level deep nested XML property and finally extend this abstract class and implement it over an iterable list with this specific annotation aaaaaaand.... Done"
> Hello, world!
"See, spring is easy!"11 -
Interviewer: Here is the interview challenge. Tell me what the expected output is. You have 5 minutes.
** 100 line class with 4 async methods that contain if/thens nested 4 layers deep that call each other and log things to the console
Dev: Ok wow this is a bit of a maze to work through but I’ll try my best.
** 1 minute later of reading through the code
Interviewer: One minute has elapsed. There is now 4 minutes remaining.
Dev: Actually could you please not interject with time updates like that while I’m reading code? It makes the challenge harder than necessary. Just letting me know when the time is up would be fine.
Interviewer: Ok.
** ~2 minutes later trying to comb through this spaghetti mess
Interviewer: What do you think are you getting close to figuring it out?
Dev: …5 -
Turns out apple doesn't allow apps that use GPS on iPads without a GPS module. Decent idea, 100% undocumented. One stack overflow answer, zero upvotes.1
-
I fucking hate HTML forms! Especially representing bloody nested objects within them!
Fighting with html forms has taken at least 80% of my time over the past three features. Why can't I just do this via API? It would be soo much freaking simpler! ugh.
But today.
Today is not going to be a good day.
I not only get to expand a complicated vanilla form with with one nested object today, I get to expand it to include three nested objects. Normally this wouldn't be a problem because it's just moving elements around, but two of those nested objects need to be broken up and combined into three+ segments each. I have no idea how to even approach this.
ugh.17 -
Fuck project setups that
- Have huge nested enterprise folder structures like Java
- Use tons of shell scripts / makefiles
- Have every config file in the root folder
- Don't tell me what I need / how to build
I know some of these can't really be changed easily, but fuck this cluttery mess!25 -
The title doesn't promise too much: eclipse indeed has multiple problems. I've never seen this kind of "nested exception" before :-D4
-
Ticket : "I have a blank page when I load this page"
I open the script (php), I see at least 7 nested foreach loop starting with a 2600+ long array. I spot the buggy loop. I mark the ticket "may need refactoring". I go drink a beer with colleagues. -
Why is it so important to some people to claim that "HTML and CSS are not programming languages"? I get it, you're a REAL programmer working with arrays, maybe tuples, objects and possibly direct memory management. Who the fuck has a right to call themselves a programmer for writing some brain dead markup or poorly designed selectors, right? Who fucking cares for semantic tags or nested selectors?
Just think for a few seconds about when you were taking your first baby steps to becoming the GOD ROCKING MEMORY HANDLER THAT WRITES _REAL_ CODE that you are today, and how good it felt to be able to create something that appeared on your screen. It felt pretty awesome, yeah?
Now imagine if someone much more experienced than you told you "You're not a real programmer, that is not real programming. You should see what I do, I do real programming".
I think you get it. Why spend your energy spreading bad vibes when you could spend it on something more productive. Like reading up on the new CSS4 specs ;)18 -
1. My senior told me that my code is crashing.
2. I check the code and told him that it is not my doing. As there was lots of nested if-else as I prefer to keep a variable and update it in if conditions. Like a filters rather than trees with branches. What I say, I knew my coding style.
3. Then he show me my git commit and I am having existential crises.
Am I missing days? How can I? I mean was I abducted and in mean time some alien took my place and they placed this memory of me coding?
Ah! man I think I am possessed by some inexperienced developer. I seriously need some fucked up crash to exorcise him.3 -
Objective c is the ugliest most esoteric programming language there is and it has no place in modern development.6
-
Having to review an offshore C++ codebase made in Romania that the company I worked for they bought to control a wifi module on a complex RF mobile tech device that I can't legally give more details on.
If I could legally post this masterpiece, or should I say masterpiece-of-shit, all of you C++ dev would instantly get AIDS and all the existing types of cancer upon browsing it for 2 minutes.
It's laughably bad and unmaintainable. One of my colleague called it "the perfect example of human obfuscation" and it fits perfectly.
Think of a 100k LoC main function with nested loops and ifs with random sleep values, 1000 values of hardcoded 32 bits arrays declared globally in the first 10k lines for unknown reasons. Comments in Romanian mixed with english. Somehow, this shit works by some miracle.
The worst intern you can think of, while being piss drunk, could do better and it's no joke.5 -
I have previously seen this in a production code base. The same code base included nested if statements (20+ conditions)...
If (condition == false) {
return false;
} else if (condition == true) {
return true;
}11 -
I know it's not done yet but OOOOOH boy I'm proud already.
Writing a JSON parser in Lua and MMMM it can parse arrays! It converts to valid Lua types, respects the different quotation marks, works with nested objects, and even is fault-tolerant to a degree (ignoring most invalid syntax)
Here's the JSON array I wrote to test, the call to my function, and another call to another function I wrote to pretty print the result. You can see the types are correctly parsed, and the indentation shows the nested structure! (You can see the auto-key re-start at 1)
Very proud. Just gotta make it work for key/value objects (curly bracket bois) and I'm golden! (Easier said than done. Also it's 3am so fuck, dude)15 -
A lot of phrases we use in software would make awesome alternative-rock band names.
- Integer Overflow
- Curly Braces
- Recursion
- Callback Hell
- Daemon Processes
- Nested Loop
- Regular Expressions
Source: Twitter2 -
In honor of Erwin Schrodinger's birthday I may or may not kill a cat. For the love of God nobody ask me which.5
-
My special edition $130 mouse finally arrived. It takes it's place as the most pretencious thing I own20
-
Refactoring nested ifs.
I'm not a pro but I despise working with nested ifs. It's hard to debug and read.
If you cant chunk the if using method, i think you can use ifs like this:
If(){return}
If() {return}
Not like this:
If() {
If() {
If() {
}
}
}
😠😠😤🙅😢8 -
!rant
!!pride
I tried finding a gem that would give me a nice, simple diff between two hashes, and also report any missing keys between them. (In an effort to reduce the ridiculous number of update api calls sent out at work.)
I found a few gems that give way too complicated diffs, and they're all several hundred lines long. One of them even writes the diff out in freaking html with colors and everything. it's crazy. Several of the simpler ones don't even support nesting, and another only diffs strings. I found a few possibly-okay choices, but their output is crazy long, and they are none too short, either.
Also, only a few of them support missing keys (since hashes in Ruby return `nil` by default for non-defined keys), which would lead to false negatives.
So... I wrote my own.
It supports diffing anything with anything else, and recurses into anything enumerable. It also supports missing keys/indexes, mixed n-level nesting, missing branches, nil vs "nil" with obvious output, comparing mixed types, empty objects, etc. Returns a simple [a,b] diff array for simple objects, or for nested objects: a flat hash with full paths (like "[key][subkey][12][sub-subkey]") as top-level keys and the diff arrays as values. Tiny output. Took 36 lines and a little over an hour.
I'm pretty happy with myself. 😁6 -
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. -
I am much too tired to go into details, probably because I left the office at 11:15pm, but I finally finished a feature. It doesn't even sound like a particularly large or complicated feature. It sounds like a simple, 1-2 day feature until you look at it closely.
It took me an entire fucking week. and all the while I was coaching a junior dev who had just picked up Rails and was building something very similar.
It's the model, controller, and UI for creating a parent object along with 0-n child objects, with default children suggestions, a fancy ui including the ability to dynamically add/remove children via buttons. and have the entire happy family save nicely and atomically on the backend. Plus a detailed-but-simple listing for non-technicals including some absolutely nontrivial css acrobatics.
After getting about 90% of everything built and working and beautiful, I learned that Rails does quite a bit of this for you, through `accepts_nested_params_for :collection`. But that requires very specific form input namespacing, and building that out correctly is flipping difficult. It's not like I could find good examples anywhere, either. I looked for hours. I finally found a rails tutorial vide linked from a comment on a SO answer from five years ago, and mashed its oversimplified and dated examples with the newer documentation, and worked around the issues that of course arose from that disasterous paring.
like.
I needed to store a template of the child object markup somewhere, yeah? The video had me trying to store all of the markup in a `data-fields=" "` attrib. wth? I tried storing it as a string and injecting it into javascript, but that didn't work either. parsing errors! yay! good job, you two.
So I ended up storing the markup (rendered from a rails partial) in an html comment of all things, and pulling the markup out of the comment and gsubbing its IDs on document load. This has the annoying effect of preventing me from using html comments in that partial (not that i really use them anyway, but.)
Just.
Every step of the way on building this was another mountain climb.
* singular vs plural naming and routing, and named routes. and dealing with issues arising from existing incorrect pluralization.
* reverse polymorphic relation (child -> x parent)
* The testing suite is incompatible with the new rails6. There is no fix. None. I checked. Nope. Not happening.
* Rails6 randomly and constantly crashes and/or caches random things (including arbitrary code changes) in development mode (and only development mode) when working with multiple databases.
* nested form builders
* styling a fucking checkbox
* Making that checkbox (rather, its label and container div) into a sexy animated slider
* passing data and locals to and between partials
* misleading documentation
* building the partials to be self-contained and reusable
* coercing form builders into namespacing nested html inputs the way Rails expects
* input namespacing redux, now with nested form builders too!
* Figuring out how to generate markup for an empty child when I'm no longer rendering the children myself
* Figuring out where the fuck to put the blank child template markup so it's accessible, has the right namespacing, and is not submitted with everything else
* Figuring out how the fuck to read an html comment with JS
* nested strong params
* nested strong params
* nested fucking strong params
* caching parsed children's data on parent when the whole thing is bloody atomic.
* Converting datetimes from/to milliseconds on save/load
* CSS and bootstrap collisions
* CSS and bootstrap stupidity
* Reinventing the entire multi-child / nested params / atomic creating/updating/deleting feature on my own before discovering Rails can do that for you.
Just.
I am so glad it's working.
I don't even feel relieved. I just feel exhausted.
But it's done.
finally.
and it's done well. It's all self-contained and reusable, it's easy to read, has separate styling and reusable partials, etc. It's a two line copy/paste drop-in for any other model that needs it. Two lines and it just works, and even tells you if you screwed up.
I'm incredibly proud of everything that went into this.
But mostly I'm just incredibly tired.
Time for some well-deserved sleep.7 -
Dev: Ok refactor this following block of code to make it more readable/maintainable while still ensuring the tests pass
*** Block is an absolute mess of nested ternaries, poorly named functions, single letter variables and outdated comments. An underhand pitch if there ever was one ***
Interview Candidate: Why would you refactor code if the tests are already passing?
Dev: …… NEXT.7 -
FUCK
Have you ever worked with people that constantly asks you what to do? People who are in the same spot as you, I mean.
- Hey, you should start debugging this while I finish this menu
+ So what's failing?
- I don't know man, but there's a bug
+ But where?
- You should look for it, I'm trying to link this to the controller
+ How can you not know?
- Do you know?
+ Where should I look for it? Here?
- ...
(One crappy solution after) + Here it is, I'm moving to something else
- ...11 -
The other day, I customer of ours asked me to try to improve the performance of an application of his in a particular method. The method in question taking more than 5 minutes.
I took a look at what it did in the profiler, and it shocked me. More than 100k selects to the database, to retrieve 116 records...
I took a look at the code... Scores of selects in nested loops inside other nested loops inside of... That seemed normal to them...
At the end after we improved it's performance it took 3 seconds...
What shocks me the most is that the customer is a developer himself, really knowledgeable and has an order of magnitude more experience than I do. Am I too anti "worthless database round-trips"? Is that normal? :S1 -
So I've got a recursive function that calls a recursive function that has a nested recursive function inside it.2
-
TL;DR: At a house party, on my Phone, via shitty German mobile network using the GitLab website's plain text editor. Thanks to CI/CD my changes to the code were easily tested and deployed to the server.
It was for a college project and someone had a bug in his 600+ lines function that was nested like hell. At least 7 levels deep. Told him before I went to that party it's probably a redefined counter variable but he wouldn't have it as he was sure it was an error with the business logic. Told him to simplify the code then but he wouldn't do that either because "the code/logic is too complex to be simplified"... Yeah... what a dipshit...
Nonetheless I went to the party and He kept debugging. At some point he called me and asked me to help him the following day. Knowing that the code had to be fixed anyways I agreed.
I also knew I wouldn't be much of a help the next day due to side effects of the party, so I tried looking at this shitshow of a function on my phone. Oh did I mention it was PHP, yet? Yeah... About 30 minutes and a beer later I found the bug and of course it was a redefined counter variable... My respect for him as a dev was already crumbling but it died completely during that evening2 -
Basically: Shoutout to my dad!
My dad's not an engineer or anything. But he likes building PCs and has a bunch of tech at home.
Well, thanks to him, I had a PC very early on, and of course, I did the typical skiddie stuff it, aka "fake batch virus haha funny" and playing Minecraft.
Well, at some point, after tinkering with mods to enhance the quality of gameplay, I found the ultimate mod: Macro / Keybind Mod.
This mod allows you to bind stuff to keybinds, such as commands or chat messages, or... Macros.
This mod has a custom macro language. (Hint: This is where the fun begins)
Another mod I used was AutoSwitch. However, that mod required a "core mod" (aka library installed in a dumb way). I thought, "why do I install 2 mods to get 1 thing? dumb", and made an ugly macro with lots of nested if-elses, which perfectly emulated AutoSwitch behavior for the Minecraft version I was on.
Yup, I basically got rid of 2 jar files in my mods folder by making my own ugly macro.
The fact that I recreated something in an obscure language, having not even coded any program before, made me grow interest into actual programming languages.3 -
Me: yo DEV2 parse this string into a hashmap. Use regex, 2 rows of code are enough for the job
DEV2: implemented 40 rows of switch/if cases into nested for loop.
Please kill me 🔫🔫🔫🔫🔫🔫🇮🇹3 -
My friend left his project work and I undertook it. Contained a mysterious folder named " open only when you get frustrated".
When the time came, I opened it and saw a text file along with a folder. The text file says, "Blame the predecessor for the code", and the folder was named, "open only when you get frustrated next time".
When the time came, it contained yet another text file along with a folder. The text file says, "Blame the project owner", and the folder says, "open only when you seriously get frustrated".
Finally, the time came, the folder contained only one text file, and to my surprise, there wasn't any folder. The text file says, "TIME TO MAKE THREE NESTED FOLDERS".1 -
This is kinda the silliest thing ever but...
In a class with a computer lab, one of the other people who uses the same desktop as me started taking screenshots at exactly 1:11. I followed suit and started taking screenshots at 11:11. I still have no idea who they are...
Now is almost the end of the year, and I really want to know who they are if only for the satisfaction, so I was thinking and came up with a solution that would take minimal social interaction. I wrote a Python script to take a screenshot every eight seconds and hid it on the computer, running. It saves the screenshots to a folder that is nested in another one, so the likelihood of someone finding out about this is pretty low. So anyways next class day I'm going to sift through the screenshots and find out who this is and probably some stuff about them given that I get to see over an hour of their computer activity. Fun stuff!
TL;DR I'm using Python to stalk kids at my school...5 -
Clicks "Exploitation and Enumeration" category.
Clicks "Python (HARD)" challenge.
"What is a key that passes the code?"
Opens Python file and sees one line of nested lambda expressions spanning 1,846 characters (no spaces)
*Cries*8 -
New web devs don't know the struggle of using spacer.gif, nested table layouts, and vibrant "web friendly" colors out of requirement.5
-
I FINALLY comprehend list comprehensions.
I can write an unlimited amount of nested loops on a single line and make other less experienced people hate me for fun and profit.
Also learned about map() #I hate it#, zip(which is awesome), and the utility of lambdas (they're okay).
Enumerate is pretty nifty too, only thing I lose is setting the initial value of the iterator index.15 -
Saw a question on SO asking why foreach was slow with big data.
The code provided was 6 nested foreachs (basically a cartesian product between an array of arrays, and 4 other arrays).
Inside, a select query and an "update or create" operation.
"But why is foreach so slow?"4 -
Just purchased a new house and was looking for a new ISP. Found a local ISP that is still offering dial up services and "Professional Website Design". Their website was obviously pre-web 2.0 all static nested tables and sliced images.4
-
It was my first month as a driver developer fresh out of grad school, at a semiconductor company. There was an elusive memory alignment bug that had eluded the experts on the team. Of course, they had to assign it to me.
I was looking at the code where alignment was being calculated for nested structures case. I saw something funny: "size_t(object)". I asked the expert where it should have been "sizeof(object)". And, sure enough it was!!
I was super-thrilled to have fixed a bug in my first month, which had troubled the team for a long time! ^_^6 -
I'm usually nice to people and try to look for the best in them... but this one time one of my colleagues gave me a code to review that, something about trees, can't remember, and the function was hammering the databases with 3 nested cycles, that's when I could no longer just watch. I was kinda mean on him that day, but as a result he did fix the problem and was really happy and I sensed a bit proud of himself as well.
Long story short, I believe he's not a software dev anymore. Kinda shame, I liked the guy, but he seemed enthusiastic of his new job and that is all that really matters in the end1 -
When the fuck will people learn to handle errors as soon as possible and return early? I have been reading the some code all day and the amount of nested:
```
if(okay) {
... 200 lines of code
} else {
throw
}
```
is frustrating. the indentation is sometimes 6-7 tabs deep...6 -
Yet another funny bug for your iPhone friends. Oh Apple...
"The vulnerability can be exploited by loading an HTML page that uses specially crafted CSS code. The CSS code isn't very complex and tries to apply a CSS effect known as backdrop-filter to a series of nested page segments (DIVs)."
https://zdnet.com/article/...7 -
I never thought clean architecture concepts and low complicity, maintainable, readable, robust style of software was going to be such a difficult concept to get across seasoned engineers on my team... You’d think they would understand how their current style isn’t portable, nor reusable, and a pain in the ass to maintain. Compared to what I was proposing.
I even walked them thru one of projects I rewrote.. and the biggest complaint was too many files to maintain.. coming from the guy who literally puts everything in main.c and almost the entire application in the main function....
Arguing with me telling me “main is the application... it’s where all the application code goes... if you don’t put your entire application in main.. then you are doing it wrong.. wtf else would main be for then..”....
Dude ... main is just the default entry point from the linker/startup assembly file... fucken name it bananas it will still work.. it’s just a god damn entry point.
Trying to reiterate to him to stop arrow head programming / enormous nested ifs is unacceptable...
Also trying to explain to him, his code is a good “get it working” first draft system.... but for production it should be refactored for maintainability.
Uggghhhh these “veteran” engineers think because nobody has challenged their ways their style is they proper style.... and don’t understand how their code doesn’t meet certain audit-able standards .
You’d also think the resent software audit would have shed some light..... noooo to them the auditor “doesn’t know what he’s talking about” ... BULLSHIT!9 -
first real program was an 8x8 maze game on my ti-83+ calculator. wrote all as nested ifs, and if you took one wrong turn it'd run out of memory3
-
My loop checked a variable, then the next 5 nested loops checked it again, then started over. It was a hard coded variable I forgot about.
I just made my code OCD -
In C# you can open as many scopes wherever you want at whatever time you please. Nested within themselves, doesn't matter.
Use this to fuck with the other developers on your team. Fence off their evil code behind a thousand curly braces!
Or maybe jazz up your indentation, give the code a nice and bouncy flow!20 -
The good thing about these latest sourcetree updates is I finally am forced to learn git command line.
-
While I prefer tabs over spaces for indentation, I usually don't mind using spaces as this is often decided project-wide(or even company-wide) by powers out of my reach and the people also normally decide to intend by the reasonable 4 spaces.
However, now I am working on a project with 2 spaces indentation and oh boy, what a pain it is to write any nested code.. am I really the only one with this problem?12 -
I really do like Flutter/Dart but I just cannot be the only who thinks that the way to create several nested components/widgets is even close to somewhat readable, what the fu** Google.6
-
What is it with certain colleagues who "wanna write C, not C++"
Motherfucker if I see another malloc in the code I will physically asssault you.
Like damn we're failing to teach people C++ badly when a newcomer from university, who had 2 semesters of "C++" doesn't even understand RAII.
And how in gods name do software engineers with *decades* of experience get so stuck on old technologies?
Like I've seen them write 3 nested try-catch to make sure a delete is called or some mutex is unlocked....
If youre in the position of teaching others C++, please stop teaching C first.25 -
My definition of hell?
Being forced to debug nested callbacks abusing global variables & closures generated from from reflection...6 -
I need a way to explain to a coworker that nesting if statements beyond 3-4 is too much and needs to be re thought out. The dude is the biggest arrow head programmer I’ve ever seen. And he claims nothing is wrong with it, it works.. so what’s the problem.
Since we follow the rule of only one return per function he claims it’s the only way to accomplish the stuff he’s doing.. like if blah function passes... if blah function passss if blah functions passes do this then if blah functions
The if statements arnt just checking some variable conditions.. the conditions are checking returns of functions at each nested level the condition, executes a different function and thus checked for success.
Uggh I just don’t know how to explain to him it’s shit and needs to be re designed
Any ideas??20 -
so... 9 years ago we had this super awesome codebase. 1 file, complete logic COPIED to be used in ui and service/daemon. I scrolled to the middle of the file and there was no source. it was out of bounds of my monitor to the right because of nested ifs. ok... what the fuck!! the worst part: I had to implement a new FEATURE into this mess. 2 days. I said it would not work as expected because the feature was not thought through. but project said let's gooooo! ok there I was, a junior with an impossible to implement feature and a codebase from hell. I've implemented something, all night long. next day it was the problem of the consultants. they called me, I told them why it's impossible that this would ever work, they understood and talked to the customer. he accepted the solution. WTF?! anyway, in those days I thought about quitting developing software as my daily job....4
-
HTML & CSS.
To me they just feel wrong.
I have been working with them for a little over 20 years now, and it feels like very little has improved. Sure we learned to make things look a bit nicer, we got new tags and properties, but the syntax is still horrible.
The fact that both are replaced by other imperfect languages (haml, jade, less, sass, etc) is just a confirmation that their paradigms are about as fucked up and impossible to exterminate as cobol.
Which points at another problem: browsers, and how slow the web upgrade cycle is — adding native support for nested style definitions in css, or replacing html with a json document seems like a trivial problem, if it weren't for the dozens of browsers and the excruciating pace at which they can adopt standards.8 -
React router is shit
I have never seen more retarded library.
Not only those suckers change the 100% of the API every fucking update for no reason, also they have the most fucked up documentation ever.
No search in the docs!!! Fucking bullshit examples with no such easy things like how to create nested routes.
Please, stop using this piece of shit, I'm tired of working with this fucking abomination. Hope they will delete their shit repo one day.22 -
How much does a syntax of a language impact ur opinion of it and wether you'll want to use/learn it?
Some languages I look at and it just looks like an unreadable mess, i dont even bother with. Avoided nodejs up until i didnt have to deal with 100 nested callbacks...10 -
Today on "You're wasting your life by not writing typescript"
Union types
The value with redux, among other things, is incredible3 -
a friend of mine and me developed a mmorpg years ago on friday nights and we were learning a lot of sql on the way. for a tidy nested query that sped everything massively up i got a sudden kiss on the cheek at 5am. best reward ever.1
-
Reverse engineering an applications internal object model and creating an database model for it...
The reason: Several versions of application exist, each deliver flat data by rest. The data is a complete potpourri of several different entities. *yaaaay*
Eg. an example fictional call (real call and data would get me in trouble I think....)
get_fiscal_report returning the fiscal data for _several_ companies, the companies _subsidiaries_ and the respective _segments_ for a _year_ with a key value enumeration.
So it's an happy fuck up of N:N associative data that usually would be a hierarchical relationship...
Year - Company
Each Company has subsidiaries
Each Company subsidiary has segments
Each segment has a fixed enumeration of keys
Each key has then the monetary value (e.g. 'operating_income' - 155_000 US-$)
Example is made up, but my data contains exactly such a lovely nested hierarchical data flattened and misnamed to a point where it's close to garbage.
Yaaaay.
I had now 6 days of untucking this mess to a usable database representation...
Sprinkling Unique Keys everywhere...
Running persist script...
Getting exceptions...
Changing associations...
Running persist script...
Screaming.
Changing associations...
Violently cursing.
Running persist script.
Starting sacrificing interns...
6 days.
I need a new brain and a format of my soul.
-.-
Reverse engineering proprietary software is really an morbid adventure.1 -
Trying to work with an API that has no response object (it just returns empty arrays if something breaks) and it's JSON is not key-value.. just a bunch of dynamic nested values. just wow.3
-
Today in some onboarding meeting i was laughing my ass off.
We were setting up the development machines that we got from the client to work on via citrix.
You guys probably know, that when you put your npm projects too nested into your filesystem, that packages randomly start not behaving because of too long file names or path names and stuff like that. That seems to be a problem with all OS (to be fair i havent actively looked for a solution, but it happened to me on Windis and Linux, so i'm just assuming here)
but even more so for some packages on Windis, when the project is not running on the same fucking drive letter than where your OS is running on. Like... wtf?
Had two UI5 projects pulled, both of them on D:. The first npm install went through flawlessly, the second one has a number of random errors, me and the other dev didn't know what they were. So what i suggested is to move this project onto C: and try it again. Turns out that was exactly it. Et voila, npm install ran through without any hiccups..6 -
When you're looking at someone's web design because you think it looks cool and then you find out they've used nested tables for everything 😁7
-
Currently reading through a long GitHub issue thread. For some reason people started quoting the entire message they are replying to.
The last post has 9 nested messages and the quote section is 1600 pixels tall. Who needs @mentions anyways.5 -
I have had it with this wack-ass code, with its spaghetti-looking call tree, nonsensical variable naming, comments a screen-height long and as clear as mud mixed with diarrhea, conditions incomprehensible enough to make kafka depressed, and condtions nested deeper than a goddamn ant colony.
In fact, it has more levels of indentation than one of those stupid iceberg memes - the top is pretty and barely afloat while the rest of it is a fat mess all the way down that only serves to sink your motherfucking hopes and dreams.
AAAAAAAAAAAAAAAA2 -
Fuck NodeJS. I don't want you to be asynchronous sometimes. My gahwd I need like 3 deep nested loops just to get you to make a request and compile a damn JSON of requests.
I'm learning Golang goodbye forever node.15 -
Alright since I have to deal with this shit in my part time job I really have to ask.
What is the WORST form of abusing CSV you have ever witnessed?
I for one have to deal with something like this:
foo,1,2,3,4,5
0,2,4,3,2,1
0,5,6,4,3,1
bar,,,,,
foobar,,,,,
foo can either be foo, or a numeric value
if it is foo, the first number after the foo dictates how many times the content between this foo and the next bar is going to be repeated. Mind you, this can be nested:
foo,1,,,,
1,2,3,4,5,6
foo,10,,,,
6,5,4,3,2,1,
bar,,,,,
1,2,3,4,5,6
bar,,,,,
foobar,,,,,
foobar means the file ends.
Now since this isn't quite enough, there's also SIX DIFFERENT FLAVOURS OF THIS FILE. Each of them having different columns.
I really need to know - is it me, or is this format simply utterly stupid? I was always taught (and fuck, we always did it this way) that CSV was simply a means to store flat and simple data. Meanwhile when I explain my struggle I get a shrug and "Just parse it, its just csv!!"
To top it off, I can not use the flavours of these files interchangably. Each and everyone of them contains different data so I essentially have to parse the same crap in different ways.
OK this really needed to get outta the system6 -
C(++) macros will be the death of me
I sure do love working with code that was written when I was in elementary school, with all the glory of nested macros and ## to deduct type names
Love that8 -
$a = 1;
$b = 2;
echo ($a < $b) ? ($a > $b) ? 'This is totally fine' : ($a < $b) ? 'This is not ok!' : 'Perfect' : 'No problem here';
Why do people do this?!
(And I mean nested ternary ifs, not coding in PHP :P)16 -
JSF: Yeah, we make it so can focus on what's important and you never have to write HTML or CSS like those lowly web developers.
Also JSF: You can't nest <h:form> components because nested forms are invalid HTML. Oh, that breaks the composite component you were trying to use? Ha, fuck off.
Primefaces: You know how you can just provide an ID and OverlayPanel will open on its own? Well, for a Dialog, the API is completely different. Here's a glob of JavaScript in an onclick event.
I swear this entire thing was regurgitated by a murder of seagulls.1 -
In flutter , there’s something called TextButton.icon. Which render a button look like this :
(👍🏼 Like Button)
But there’s this tiny twat decided to use countless of nested column in a nested row and containers just to create a fucking button! This particular class contains 1438 lines of code! Most of the code are redundant and nested fucking shit.
I want to punch this guy so hard but I do not intend to start a ww3 with china.
That means I have no choice but refactor it as I implement a feature requested by the product team, every components break. It is like a land mine field here. One changes , the entire application crash.
So there are useless mother fucking Sherlock fucking holmes kept telling me that “don’t worry about refactoring now , just complete the task.” , like seriously “how in the name of mother fucking god of all arseholes can I complete my task when I can’t change even one component?”
These people are fucking genius. Their intelligence resurrected Einstein and made him die the second time.3 -
Please who the fuck wrote sql query with 6 nested select queries as 1 giant view. Literally 6 paranteses. Garbage 30 year old legacy codebase Please fuck off i now understand why nobody wants to work on this bullshit15
-
Oh no...
A <FlatList> as a DIRECT child of a <ScrollView>... I mean, I'll give you the benefit of the doubt if you forgot or it was buried in a nested component... but... it's just sitting right in front of you on the same exact component... it's like, did you even test this once and see the warnings?
God these 'affordable' devs truly aren't actually worth it.
They really aren't.
You spend just as much time fixing their clownish mess as you get for "saving money" with their cheap rates.
Another day, another clown dollar in clowntown...
SHEESH3 -
Time for a full refactor. Everyone can go home for three days while I unfuck every page and pattern.
-
Why the heck would you allow (or need) nested block comments? Imo this is a major design flaw in the kotlin linter.
I always use /*... //*/ so I can remove the comment starter w/o having to remove the comment end, but kotlin just starts a second, nested comment there.
Java, C, Cpp, C#, JS,... Not one of these uses nested block comments. I think jetbrains was just lazy?
I mean, I know why such stuff happens. I also developed DSLs in MPS, but there sure are ways to go around such things..7 -
When your supposedly Senior PHP developer argues with you that an HTML table can't be nested inside another HTML table 😱2
-
Me, consulting for a huge entertainment company:
Why do you guys have a 500 line method? And why is half of it so nested that it's indented half way across the screen?
Them: Oh, that was written by the best dev on our team. He holds a PhD.
🙃 so thats what kind of skill a PhD gets you these days?5 -
Colleague asked me to look at his eCommerce search filtering system as the customer was complaining it was slow taking 5-6 seconds to find results.
Delving into the code deeper, I discovered he was querying the results, sticking them in an array and then sub querying the results looking at all the combinations.
On top of that each sub query looked at the database fields using "DESCRIBE" to then search them each time it found a pair!
The total query count for one page search was 14,512!!!
Why oh Why? One SQL query could of done all that in one go.
I look at other code bits he's done and he's very good in other areas. I just don't get how sometimes a good developer can make such a weird decision? It's almost as if he wanted to make it as complex as possible.6 -
' "productivity" software':
trying to format a document in Word / Libre Office,
text defaults to some condensed serif font,
any at-sign, "http" or "www" automatically generates a hyperlink in an ink-blue color,
formatting and alignment of lines or paragraphs causes unrelated other elements to change unless you make sure to use tables, tables, and nested tables everywhere like it's Netscape 20032 -
I had the oppertunity to join a non profit organization to help them automate stuff instead of serving the army. One of their core applications got rewritten like a year ago from a terrible and very old Symfony stack to Laravel / React.
The guys who were in charge for the rewrite didn't really adapt the mindset of either MVC for Laravel nor the component idea behind React. There are a few controllers in the backend, but they sometimes have functions defined which would clearly belong in a model or service class. They rarely defined relationships on models, instead they're joining the tables together for the same effect. The frontend rendering mostly happens in for loops over the returned array from the API instead of breaking things down into little components. This ends in components which have sometimes over 1000 lines with super-nested logic in it.
But I did find my favorite piece of code today in of the controllers. Some many questions ...6 -
Was going through old photos from university time and...I present to you the result of deadline + lack of sleep + boredom + shitty university project because somebody decided that CS folks needed to learn webdev in old ASP.NET.
Yes that is one query. I wrote the entire thing out as a string in my C# program in one go and tested it by running it from the program. Must've worked properly because I got them grades so eh. I recall I had one nested seven levels too (this is just 5) but I can't find a photo of it. These two queries did all the business logic. Yeah.
Apologies for the poor quality photo of the screen, I don't have the code so no screenshot, this is just from my photos archive4 -
Meeting at 'Derp & Co', the topic was what data model should send the back-end to frontend & app via API calls:
- Coworker: 'we should send the data structured like this for reasons'.
- Me: 'Yeah, this nested object.object.object should do the trick for the front end, but this will be a pain in the ass to convert to POJOs. Why not use something like idk better structure?'
<Mad/intrigued faces>
- CoworkerS: 'Why you need to use POJOs?'
- Me: <More Mad> 'cause I work with java in android... and we have/need/like objects?
<Captain Obvious left the room>
- CoworkerS: 'Oh yeah, well... we can do it the way you say'.
Why you need Objects... what is the next?
- Git? For what? Did not have the usb key from day one?2 -
Actual production code:
while(1):
//A few lines of code here with a conditional break.
while(1):
//More code.
Have you ever just had nested infinite loops...4 -
I swear to god "old school" C++ devs are menace to humanity
Why yes let's make this one line long function, that could even be constexpr, and make it a macro.
Why the fuck not, let's make compiler errors worse by foregoing any type checking. Let's throw away namespacing as well, great.
Fuck you.
I shouldn't have to dig through 4 levels of nested macros just cause "muh performance" and "we've always done it like that".
Shit yourself.8 -
This is so annoying, I had 9 diff. jobs the past 2 years and this is my 10th and if this doesn't change I might reconsider my options again.
I came to work at a company that pays me like a Junior and treats me as an intern. My 20yo "boss" who acts as a project owner/lead dev doesn't want to learn anything new and sees any improvement as a waste of money. The problem is he thinks hes a great programmer but he doesn't know shit. Im mainly working on the Laravel installation because "I claimed I know Laravel". And its absolute garbage. They haven't used a single Laravel features besides routes and everything else is vanilla PHP. They write for loops that loop through $_REQUEST to remove a single character. Write 100 deep nested ifs and they abuse Elasticsearch to the point ES crashes because the program is using 1000 deep multidimensional arrays. Its only a webshop...
Everytime I try to make a suggestion like making the master branch protected, doing code reviews etc etc I get shut down because they are autistic and don't want anything to change.9 -
I just dealt with a 3 nested "if" statements in SQL. There is no indentation so I am quite frustrated since each "if" spans up to 2-30 lines.
I now understand why Python white space is significant3 -
TIL Github renders markdown YAML frontmatter as nested markdown tables! Awesome as lightweight structured data documentation tool2
-
Passing variables by reference in nested functions using PHP.
If you miss an ampersand your afternoon is very long.
😝😝😝😝😝4 -
Please, stop using `i`, `j` and `k` in loops... specially if they are nested, help the fellow programmer after you29
-
When you have sextuply-nested sub queries, can we at least acknowledge the POSSIBILITY that there MIGHT be a better way??1
-
Little bit of background I've been a front end developer for the past eight years not a good one but I get by. Last 4 working with consulting firms for fortune 500 clients. Big projects big plans big structure, following someone else's lead and just knowing the basics of code reviewing, git flow, code deployment and everything else... life happens and i end up as a front end developer for a big company not tech related that wants to depend less from consultants and do more in house dev. Seems a pretty straightforward project front in angular. Back on python doing queries to a database with sql server. I finish the on-boarding and after two weeks finally get access to the repos. Worst spaghetti code I've ever seen. Seems like someone took a vanilla script project from 10 years ago and push it into an angular tutorial project. Commented code, no comments for the code, deprecated functions still there, no use of typescript nested ifs hell. I try to do my job doing new features do comments clean up a bit. Senior developers get annoyed6
-
During my first semester of CS we were mostly using MatLab for basal scripting - assigning variables, learning about scope, that type of thing. I was excited to start learning programming but wanted to actually make something rather than reversing arrays and incrementing counters for weeks.
I discovered the image() function which takes a float[][] matrix and displays it as an image. I generated my arrays of random numbers and made a simple nested loop where I iterated over each element, averaging it with its neighbours, and - it worked on the first run! I made a freaking noise and blur filter!
That rush of planning it out, making it, and seeing it work I think is my main drive in coding. All the hours of undefined-but-they-are-tho import paths and mystery segfaults are worth it once there is that moment of "it lives!". -
Unpopular opinion.
TOML sucks
* it does not claim to care about indentation but it actually does
* nested datastructures are a nightmare, especially 'inline' for 'readability'
* oh fuck me everything must be "double quotes"
* booleans always lowercase, there is no "truthy" here.
* Tables are not intuitive at all.
And all this from working with it first time because I had the silly idea to modernize a python project to use pyproject.toml
Oh and don't get me started on pyproject.toml files. The documentation sucks!6 -
So at work, there is this class/model thing that's for storing translated strings. It also supports n-level nested macros, cascading lookup (e->d->c->b->a->blank), and I've added transforms too. The code is a bloody mess and very inefficient (legendary dev's code), but it's useful.
You call methods with a symbol representing one of the strings, and it does... whatever you ask, like return text, booleans, expand macros and submacros, pass in data to interpolate, etc.
But I just learned something today.
Its `.html` method... doesn't support html. In fact, calling it strips out all html, takes whatever is left, and attempts to convert that back into html. Because that makes so much sense. So, if you have an html string? Don't call html on it.
Also, macros use the same <angle brackets> as html tags, and macro expansion eats unknown macros, so... you can't mix html and macros, meaning you cannot inject values into your markup. That's a freaking joy to work around. (You end up writing a parser every time.)
So no, if you have an html string, you need to get the raw data out and handle it yourself. Don't reach for that shiny .html method; it'll just ruin your day.
It's the little things that make my day so terribly long.rant it really isn't so bad principle of most surprise poor design but it could be ever so much better8 -
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!1 -
Today on "fuck Firefox": elements with display: inline and position: relative completely mess up z-index and nested fixed / absolute positioned elements. It's a known bug, it has open issues on bugzilla since 2005, but still no fix. IE 8 can get it right, but not Firefox...9
-
An anti-rant: I just made some code and out of nowhere it suddenly had an awesome feature that I didn't even program. No, not a euphemism for "bug", an actual feature.
Here's the story: A few months ago I made a shortcut for "System.out.println(…)" called "print(…)". Then I developed it further to also print arrays as "[1,2,3]", lists as "{1,2,3}", work with nested arrays and lists and accept multiple arguments.
Today I wanted to expand the list printing feature, which previously only worked for ArrayLists, to all types of List. That caused a few problems, but eventually I got it to work. Then I also wanted to expand it to all instances of Collection. As a first step, I replaced the two references to "List" with "Collection" and magically, no error message. So I tested it with this code:
HashMap<Integer, String> map = new HashMap<>();
map.put(1, "1");
map.put(2, "");
map.put(3, "a");
print(map);
And magic happened! The output was:
{1=1, 2=, 3=a}
That's awesome! I didn't even think yet about how I wanted to display key-value pairs, but Java already gave me the perfect solution. Now the next puzzle is where the space after the comma comes from, because I didn't program that in either.
I feel a bit like a character in "The subtle knife", who writes a barebones program to communicate with sentient elementary particles (believe me, it makes sense in context) and suddenly there's text alignment on the left and right, without that character having programmed any alignment.4 -
10 years ago my bosses came to me: Make a few adjustments to the logic of this website. Should be a quick thing they said. Got a zip file later. Hundreds of php files. Inside, thousands of lines of the best PHP/HTML Spaghetti I've ever seen. No CSS though, but lots of nested table layouts. The best part: everything was in french, content, comments, varnames. The original dev didn't use includes for the most repetitive stuff, even db credentials were copied in every file. Took me a week.
Two weeks later: Change that and that please....
We decided to write everything from scratch then. -
I've worked with few incompetent people till now, but one guy who stands out is my peer who is a "Lead Developer".
First of all he knows nothing!! Even Jon Snow knows something, but this guy knows absolutely nothing. And on top of that he has a hard ass attitude. Never sticks to coding standards, pushes unwanted configuration files to Git, uses too many nested loops even when not even a single one is required.
And when I suggest him something, he starts giving these lame ass reasons and tries to avoid my comments. Then I say, "good luck with that buddy" and move on!!1 -
Pretty late for week 86, but I just remembered my first paid freelancing web dev work.
While not my worst experience, it was a pretty horrible task given to me...
I was helping someone implement a new design on a pretty outdated (visually and technically) PHP site.
I was getting paid crap. The guy wouldn’t even let me look at the HTML, let alone touch it, so definitely no PHP work, either...
Literally the only code I was allowed to write was CSS. So, I’m supposed to be restyling, but I can’t change the structure at all, or even ADD CSS SELECTORS.
Fine, I’ll just make your site fragile as fuck by using nested relative selectors.
#main:nth-child(3) > div > div > div > button
As if that wasn’t bad enough, there were some pages...I shit you not...that had A DOZEN LEVELS OF NESTED TABLES.
WHY. DEAR GOD WHY.
For a simple checkout page.
So, on some pages I was literally trying to access elements through relative selectors, nested within levels and levels of tables. FFS
Needless to say, I did not work for him for long. Even if I wanted to deal with that crap, my time is much more valuable than what I was being paid. -
Seems to me that shitty youtube shorts "explaining" basic programming concepts via shitty JavaScript snippets.
Yesterday I've seen dude basically badly explain/demonstrate currying, on such a contrived example that it didn't explain WHY would you ever want to use it, and apparently without being aware that's what it's called, and using like 5 nested/chained ternaries.7 -
Have you ever copy the the data from the console in chrome?
Means the data you print by using console.log().
There is a sure way to copy the data from the chrome console. Even there is many nested objects.
I love that feature of chrome.2 -
The real life of me as a trainee developer:
New system works locally but fails to work in production and dev.
Proceeds at futile attempts to debug for hours to find out that my connection strings in the transforms were nested inside logging. -
So i have been learning c++ for more than 2 years now and i the most useful thing that i have ever created is command rine program in Windows that iterates over all the files on a drive and deletes those with a specified extension. So yeah life is pretty bummed up right now.
So i was thinking why not start by contributing to some of the open source projects.
Therefore i went onto github to find something to work with. However the list gontained either projects in languages other than c++ ( i have been trying to learn those) or based on machine learning.
So i thought why not get on devrant and find some people who are willing to work on some projects with me and in the process teach me some stuff. Therefore here i am asking you guys to collaborate with me as i am now sick and tired of making stupid patterns using nested loops.
PS: I am now 18 and in second semester of college pursuing a b.tech in cse5 -
So I'm on orders for the Marine Corps, and this one guy thinks he's a programmer because he made a "program" in excel for dispatching our equipment. He's complaining that he's just fixing bugs. I take a look at his VBA code and see literally 1000 lines of if statements bundled into one function. (Or I think they're referred to as sub routines in VBA - it's been a while since I worked with it).
I try to give him some tips and pointers since he's literally just manually checking. Each. F'ing. Cell and a million nested if statements. Tried giving tips on making reusable code, and he has the cojones to tell me he knows what he's doing and doesn't need my "help". Granted I'm higher ranking than him and he also answers in a disrespectful manner.
End rant. -
Anyone who formats their code manually is a fuck there I said it.
Also stop using a tool that has no contextual understanding of your code. You're wasting more so much fucking time trying to guess shit that an ide would automatically know and doing stuff that an ide would automatically do.4 -
kinda sick of my friends giving me super basic advice when I mention my mess of 3d printer files
'group similar things together'
'have folders for main projects with nested sub projects'
'put the slicer project file with the stl files for the specific model'
I'm not fucking 5 I've lived long enough to have some level of basic common sense.
Worst part is they forget we've had this conversation and next time I even mention my files they bring up the exact same fucking comments EVERY damn time8 -
My biggest influence on coding style is working with other people's code. I know the temptation to write "clever" code and I've been (and probably still occasionally am) guilty of it myself, but it's not until you have to debug someones oneliner iterator which has !(i-j) as the stop condition that you start to appreciate dumb, boring, obvious code.
If having a series of if checks in a long list makes it readable, keep it that way. If it makes it more readable to rewrite it into a nested switchcase with a couple of ternary bits, go ahead. Just don't spend half a day wrapping it up into two layers of abstraction that will require an onboarding process for the rest of the team.2 -
Today I've implemented two custom annotation and two validators for those annotations (Java). It's a huge nested object so it's not as easy as I thought to begin with. That pretty much the only thing I've been doing today, and I feel like I've added absolutely no value to the company and feels a bit ashamed not to have done it faster when I look back at how simple it actually was. Makes me wanna choke myself...
-
My lovely team and I inherited a legacy app written in Angular 14.
We love it when we get fucked by Pajeets like this.
We love tons of `any`-s in the codebase.
We love unreadable code with 5 levels of nested ternary operators.
We love the lack of a README on how to actually build/start the app.
We love the outdated dependencies.
And we absolutely love it when you use a paid package that costs $1755.4 -
I fucking suck at SQL and that's hurting my performance as a supposed backend developer :D
All the cool nested queries and whatnot, it just flies over my head, I need to learn it better, any tips on study resources?6 -
No your nested if statements dont make an ai the same way logging into a txt is not machine learning2
-
string action = day == "Monday" ? "Go to work" : "Friday" ? "Netflix & chill" : "Saturday" ? "Sleep all day" : "Sunday" ? "Get ready again for Monday" : "Code from 9-5";
I wrote nested ternary operators before and I swear I'd only use shorter conditions like the one below. 😳
string action = isTired == true ? "Get some sleep" : "Drink more coffee";5 -
Started out with python, while meaning to learn javascript.
I am now competent in python. Im still not sure how it happened.
Started python because I got tired with doing repetative calculations by hand. I think I had like a phobia of problem solving with nested loops. any time I thought a problem would require nesting, especially more than one nested loop, I would just avoid doing it, or end up doing it by hand.
Wrote so many goddamn loops though in the process of exploring graphs, doing things by hand seems like a nuisance. Thinking in loops has its own zen or something.
Now I just need to get over my fear of json-based CLI-enabled configuration-over-convention.1 -
There was a big hairy ball of SW mud from another project that a poor coworker had to "reuse". Only that it was impossible because there was no documentation, shit was partly auto-generated with mysterious Excel tables, and the actual code was just as bad. No APIs and nothing, just hacking shit into globals, several nested state machines that were overriding each other's states, and with global side effects. WTF.
Two devs took a look at it - minimum 8 weeks. Schedule was some days, and PM insisted that it was "already working". But the worst thing was that the dev in charge had been looking for another job anyway and quit, so the whole clusterfuck suddenly was on my desk.
The code was so awful that I could only bear it with both eyes closed, so I instead read the spec of this project closely. Turned out that it didn't actually demand this feature, only a small subset of what the ball of mud was supposed to achieve - which I was able to implement from scratch within a day, plus another one for documentation. Phew. -
My code works.
Well, it should, but not like this.
I've set some datas to a nested form, saved by a variable named 'stat1', however the code won't work unless I use a variable named 'fields'. Not 'stat1'. I'm only 24 years old and I already feel too old for this shit.3 -
I've now spent 4 hours trying to understand this piece of shit stored procedure.
3475 lines of pure shit with 3 levels down nested sub-selects.
FML!1 -
Brought to you from the 5000+ line Java file. Contained within the 1500 line method. I bring you the following pattern. Let's guess all the ways we could've done this better?
- Streams
- For loop
- Iterator
What gets really fun is when this you get this pattern doubly nested so you have a random i's and j's floating all over the place.
Note: this isn't ancient code it was developed about 3 months ago.
[Code has been lightly anonymized]5 -
Why in the fuck are twilios typings so spread out and tucked away in a hundred folders? I have 8 separate imports to deeply nested directories (whose path includes fucking api version numbers) and at the end of each path are generic garbage interfaces. Autocomplete suggestions show handfuls of identical interfaces and types, and autosuggest for import paths is cut off because the paths are too long. To make it worse, they’re cut off at exactly the name of the directory for the actual resource I’m trying to get types for. It shouldn’t be this fucking hard, twilio.2
-
Life of an Oracle Developer ... Day {I've lost bloody count now}
Task: Optimise a 236 line cursor consisting of 7 SQL SELECTS and unions, 39 joins and nested sub queries galore.
"YAYYY" said no one ever ...3 -
People in SO be like: "I don't understand why I'm not getting any answers. All I want to do is to twist this ORM to do something it doesn't support and I haven't even explained the nature of the models and nested relationships in the question"3
-
That moment where you see code of someone who riddles their code with nested if-else and if-elseif statements.
I don't remember writing an else statement for years. It almost always can be avoided (and the rare cases where it makes sense I prefer the switch statement).
Yet I never grasp why people do:
```
if(someCondition) {
// huge nested code block
} else {
throw new Error();
}
```
Instead of
```
if (!someCondition) {
throw new Error();
}
// continue in the normal scope
```
And then we have experts that like doing:
```
if(someCondition) {
if (bar) {
$foo = 'narf';
} else {
$foo = 'poit';
}
// huge code block
if($foo == 'narf') {
if(yetAntherCondition) {
// huge code block
} else {
throw new Error();
}
// huge code block
} else {
throw new Error();
}
} else {
throw new Error();
}
```
Help!
If ever was to design a programming language, I'd forbid the `else` and `elseif` keywords. I have yet to find an instance where I could not replace some `else` by either a guard or an early return or introducing some polymorphism.1 -
Company Infrastructure Team: We are doing away with proprietary libraries and using standard Java instead.
Also Company Infrastructure Team: Here have a fuck ton of new proprietary libraries with dozens of nested dependencies. Oh we don’t use Maven by the way because we are fucking idiots. -
Fucking mongo, fucking nested documents in nested documents that need to be filtered. I'm either really fucking dumb, the query is hard or both.8
-
Spent 7 straight hours today crafting the most complex table valued function (including 6 nested scalar value functions as helpers) I've ever attempted, about 3 hours to go tomorrow.
My eyes and brain hurt.2 -
Someone tell me should I just give up because I'm stupid and simple shit escapes me or tell me bro calm the fuck down the guy is full of shit...
Dude says he can't verify 3rd statement in a nested IF - elseif logic because the third check for a false condition is the True condition in the first 2 statements.
So
If (mode) = manual and then
Data(g) /= Status1
Or else Data(g) = Invalid
Then
Do this thing that sounds cool
Elsif
Data(g) = Status1
And then Data(g) /= Invalid
Then
Do something else equally cool
Elsif (mode) /= manual
and then Data(g) /= Invalid
and then Data(g) /= Status1
Then
Do some less cool stuff
end if4 -
I don't know what to do because union and sum types both totally suck but I need them for my scripting language
Union types are fun and intuitive because they can be used with type refinement but they're not hierarchical thus bad for generics.
Sum types (or tagged unions) are great because they're hierarchical and can be nested properly but they need ugly type matching constructs.
The positive thing is I'm not making a systems language anymore so I only wanna jump of a bridge every second day5 -
!rant
Before I left my other company I was in the midst of finishing one project and I was ansious to finish everything to leave as a rockstar. Now, one of my js scripts brought a huge and long json response that had many nested items and arrays and whatnot. Instead of properly destructuring or finding a particular piece that went similarly to "status": "Verify input"(that was nested unser a shitload of items) i did the unspeakable......i stringified the whole object and just used indexOf.
I still feel guilty over it...but it works :P thing is, if it returns that it means that the user entered an invalid status into the app (it was an inventory application) but it works :P
Oh well. Mind you they thought it was going to take months and I finished in 1 week so yay. -
This is probably a standard pattern/algorithm, but I feel pretty good about myself figuring this out.
I was doing a programming challenge and found myself with 2 lists of integer points (x,y). I needed to see where the points converged and identify those locations. Of course I started with a brute force approach and did nested loops to find these locations. This was taking WAY TOO LONG. These lists were 200K each. So checking with naive looping is 200K * 200K operations. Which is a lot.
Then I thought, well I am checking equality, so I will create a third map. The index to the map will be the point, and the data will be an integer. I then go through each list once incrementing the integer for each point that exists in each respective list. Any point with a value greater than 1 is a point convergence.
Like I said, this has got to be a standard thing, so can someone tell me what algorithm this is? I am not sure how to search for this.
I am fuzzy on complexity notation but I think the complexity started at n^2 and was reduced to n. Each list is cycled over once.4 -
nested ternary operators
like/dislike?
I used to hate them cuz I would have to break them apart just to understand them, but now I use ternary operators so much, nesting at least one level is ok for me.
but i'm the only person that reads my code, what's the concensus.. nesting one level bad?
I wouldn't want someone reviewing my code if they couldn't wrap their head around a simple ternary, so if only myself or people more experienced than myself will ever read them, then fuck it, i'm using them10 -
People in this discussion will refer to my classmates doing their project we were allowed to choose like 3 months ago and back then I already told them they won't ever manage to make it work in time.
People: "yo could you help real fast"
Me: "aaah not again but okay why not"
People: "here's the code"
Me: "the fuck is this? What is it supposed to do?"
People: "ummm it should doooo eeeerrr... Like this and .... Yeah we don't know. The output should look like that but it doesn't"
Me: "the fuck did you even try to do. That'll never work. And I told you the same thing like 3 months ago when you just chose the project. Just go and use some random math lib you find"
People: "kkkk"
Their code seriously made no sense at all. Parsing substring within like 5 nested loops and like 20vars called "s1" and "theString" and what not. -
Has to fix a bug in our old products web interface, how did I ever put up with it. In some places it has 7 nested iframes. It is also some of the worst code I have ever seen, no user input is sanitised plus there is no structure to the code, try looking for a CDs element without going into chrome dev tools is impossible as there are 52 separate CSS files1
-
Don't you ever try to translate code from one language to another. Instead grasp the problem and write the solution in the other language itself. You don't want to sit there for hours thinking if hashmaps are a good fit for phps nested arrays.1
-
Too many people seem to think that "goto" in C is the worst thing you could do. It's an abomination, never use it! (Not something I've seen here per se, just generally around)
Challenge:
Break out of a loop inside a loop without using goto, and make it look pretty. Seriously, I don't think it can be done, and goto just makes it so clean!7 -
To the people that mistake i and j in nested loops: Have you considered giving these different names?18
-
I just found a 4-level nested switch case in our code base.
and the best part .. they are all empty!! -
FUUUUUUUCK
I just spent an hour debugging a Vuex model due to a fucking error with nested mutability. Wtf... -
Does anyone actually fucking know how certs and provisioning profiles work for large iOS teams without using the cancerous auto provision checkbox? Are we all just fucking it up all the time??3
-
If you want a laugh, take a look at the source code on indeed.co.uk https://indeed.co.uk Its a mixture of shit tables nested in divs, absolute positioning. its shocking. They are a big recruitment site in the UK.
-
2 days (actually about 4 hours) of battling a stupid CSS grid arrange that wouldn't behave.
Turns out 1fr (aka fill parent) works unless the child is another grid. In that case it forgets and just stretches the freaking parent as if there was no rule whatsoever.
If you have problems with CSS grids, consider trying flattening the markup...3 -
Php suxx asss. I`m at my second php dev job and I recommend all newcomers to stay away. Both projects were full of shiat developed by people with no technical background before. The current project I work on is just a bunch of nested if else like 10-15 blocks and after you finish booom there s another block of ifs . The fucking code looks like a wave. There were also some files named like file1.. file15 . Fml4
-
Why Android uses so many quirky features in Java, like inner and anonymous classes, callbacks and nested generics?
I searched everywhere for the reason but can't find why, only how.
I rarely use these features outside of Android development.4 -
Dear Python linters, why can't any of you implement some actual linting features? Like, say, consistent use of single or double quotes? Or dict() vs {}? How about indenting nested function calls? Forcing list / set / dict literals as multiline? Trailing commas?
And while I'm at it, why can't you handle dependencies properly? Say, separating linter & linter plugins from the remaining dependencies in a way where I don't have to manually remove them from the requirements lockfile every time?3 -
I was always interested in computers. My dad was a big computer geek and a programmer to boot. Usually had a couple old PCs in the basement to play with.
In middle school, I took tech ed and we made simple web sites with html and css. I remember the struggle of nested tables.
In high school, I couldn't fit any CS into my schedule. But someone gave me a learning to code book in ruby. I loved it, and have been hooked ever since. -
I literally can't believe that your project even runs without this technology I just learned about yesterday
-
Okay so I'm one of those developers who haven't moved to constraint layouts yet. I've been working on heavily nested layouts (for obvious reasons) and the gravity chooses to kill the fun every time :))2
-
-we have a huge nested object to represent this functionality.
- just save it in the DB under "settingsx" column as a stirng. No need for different columns
We had to parse it multiple times in the client and the server.
After a year in the company, I've managed to convince the team leader to move to json object at least2 -
Hey devRant! Long time no see
I recently landed a job as a java developer so that's amazing
Still getting my head around the company's codebase, and holy fuck its huge.
I was taught best oop practices and patterns in CS class, but seeing them implemented in such a huge project is kinda pisssing me off: every single thing in the code has dozens of classes that call and implement each other, I spend half my time spamming the "open declaration" shortcut in a futile attempt to understand how the pieces fit together.
Sometimes I wish they had stuck to implementing everything in a handful of files, instead of the jungle of nested packages and references I got :pensive:
Oh well at least most thing are documented :shrug:
I kinda get y some people despise java for being so verbose and forcing strict pop on the programmer XD4 -
Daylight Savings Time.
Europe switches to DST this month and specs are broken because of Ruby's DateTime which isn't DST-aware so it generates invalid dates and can't do date math properly. Losing a couple days to refactoring horrendous code that uses *nested* Timecop.freeze, mixtures of Time, Date, and DateTime, math and parsing revolving around the end of the month.
Death to DateTime and death to DST.1 -
Yesterday I was struggling with a chunk of code with 4 foreaches that form a 4x nested array based on different conditions that was written not by mex and today i decided to find and replace the variables as a single item to compare to the result that it spits out. So much easier to understand! Yesterday I was questioning life
-
I thought nested list comprehensions in haskell were hard.
Until I tried to make a non fixed footer that stays on the bottom.2 -
Phps love of nested arrays is similar to that of structured programing and goto statements. You will do a lot of backtracking in both of them to see where things start. God bless PHP.3
-
Working with dildos-for-brain people! I asked how to achieve something and if I got an answer it stated: never saw something like that implemented before (It really means that people here just copy/paste shit and use iterative development method until they nab the solution)!!!
Really? I just asked to have nested XML structure, it's been around since early 90'!
I have new weekend project - polish my CV and get the fuck out of here. When it feels like you are smartest in the room and for every question for help people just throw you random answers not related to question at all it is not worth staying there.
Also using outdated XML server CMS that ceased its support, documentation is shoddy and internet never heard of it - only relevant google search leads to the CMS website. Good luck! Good fucking luck!
This shit went overboard so many times and I decided that this is the last time. I have 2 more fucks to give and those are for me! -
Exercise do the pyramid of * and I looked up how to do it but so many people are able to do it without looking it up I dont know why shit to do with nested for loops makes me feel so dumb.
I know it's not a big deal to not know how to do every single thing but I'm always even stuck on the smallest exercises that apparently more people can do than not. Like how am I supposed to have thought about that or figured that out. How am I supposed to learn all this shit. Like for example just look up a list of basic exercises and I cant do any of them. I'm not good at this and its stressing me out because how will I get better or hell even a job if I cant solve these simple problems? How am I supposed to get better at solving these simple problems? I cant just keep looking at the fucking solution because that wont stick or teach me anything
Most stupid thing to rant about by far4 -
Why, Google? WHY?
My wife was annoyed, that her android image gallery showed the images she has sent via telegram, but not the ones, that she had received.
Stupidity no. 1: telegram puts received pictures into Pictures/Telegram on the internal memory. It seems like the default gallery apps don't take nested image-containing directories. As Pictures only contained the default Sony dummy images I moved them away.
Stupidity no. 2: both the receiving and sending image directory of Telegram is named "Telegram" and guess what... Android does not like that. Only the first ist shown (sent images).
Stupidity no. 3: to work around that, I installed the emulated shell to make a symlink named "Telegram-Received". Aaaand that requires root access.
Goddammit Google! She just wants to see our couple selfies that I sent her in her gallery!6 -
Last week I had a meeting to get us all on the same page for today's prep meeting... Tomorrow we have the actual meeting to be followed two hours later by the meeting review meeting... Culminating in decisions that drive the direction of a set of upcoming meetings... Which will all have prep meetings and some have further review meetings...
I'm so excited...2 -
Curse windows nested folder path length and filename limit...can create it no problem but try to move or rename and the path is too long...
ARRRGGG!1 -
I'm working again with blue prism on a very very old SAP website. A hundred thousand nested iframes with a hundred thousand nested tables.
Please kill me, I long for the sweet embrace of death5 -
Working with nested arrays in MongoDb!! Who would have thought it would be such a pain to update data in nested arrays in a database! So frustrated!!!!
-
That realization that you have a memory leak that invalidates all of your previous performance testing1
-
In our class we have one subject where we take notes on one shared Google docs document. To be honest, this may be the worst "teamwork" that I every had to deal with.
• Simply copying the stuff from the blackboard:
• Missing context
• document consists of keywords and occasional sentences
• These fucking deep nested lists
• No quality control whatsoever
--> nobody fucking cares
• What, nobody made notes for this point?
• Any attempt to speak up result in me being scolded
• Be me, the only one not shopping on amazon instead of taking notes
• Wtf does this mean, where's the context
• one line of code without needed context code
No quality, no Motivation, no better alternatives, no fun. -
So, i have that assignment about docker stuff. nifty piece of software i must say.
anyways im installing docker software on windows bc im thinking if i have something that gives me at least the correct structure and some skeletal syntax i will have a faster grasp of the thing. expecting some sort of high level ide but end up instead with what looks like a blank window, with the only obvious choice being sign into some bullshit i dont need. but thats another story
my point is:
when installing the thing it prompted me to install WSL2. which i supposedly am not supposed to have because my cpu doesnt support intel virtualisation. but being impatient (thats why i came to look for an assisted solution), i pursued the installation.
lo and behold: i end up with a shell prompt at the root of a linux filesystem!
i ran 2 or 3 muscle-memory commands and closed the prompt, i was in docker stuff up to the neck.
later on, when i go back to my project, in a virtual machine its sluggish af and screams at me that amd-v is not supported because of something something nested pages (will look up later how that one works).
dont have time to explore it some more yet, and especially experiment or even barely look at this glorious mess because i have something barely working and no time to have it fail.
but this story definitely left me perplexed.
and also : you can run WSL2 on an fx83508 -
So I'm working on a snippet of JS to generate widgets for a custom data dashboard at the moment, in a project where I've been paired with a junior "developer" (he's more of a junior script monkey though), which is just plain painful...
Recently he wrote up a long message bitching about how my library API keeps changing, making it impossible for him to get any of his work done.. This particular message even made references to "writing his own widget library" and "stabbing me in the eye".
It's currently at version 0.1.0-ALPHA, just by the way. Major version 0 mother fucker.
Anyways, one of my colleagues stepped in the other day to try help him with the front-end stuff, which finally helped me get the feedback I was asking for. At which point we found out he's still currently working off a build I gave him 4 fucking weeks back.
Honestly though, I'd both love and hate to see him try make a library to do this: pull data from a non-standards company data API, parse said data from unnamed number arrays nested up to 4 levels deep, then morph that data into one of four different charts or one of five made up of custom markup.
All he has to do is create a UI to configure and present my widgets, but he can't even figure out how to integrate dependency management into his front-end project.
O.o
OMG. Can I stab him?? Pretty please?1 -
Now where do i start. Hmm. Oh. How about a mountain of nested ifs. Or, super god codes. How about some unreadable variable names.
-
I just realised I have 1TB of MS OneDrive Cloud space lying around unused. DAMNNN!!!
Just yesterday, I was thinking of backing up all my content to cloud (because just in case and past experiences of losing data).
I did a quick fact check and figured that I have ~450 GB of unbacked data.
After quick calculations, I came to a number of how many Google accounts I'll need for 15 GB per account of drive space.
Today, I was playing around with my Microsoft Developer account and saw OneDrive. I thought let's check how much free space does MS Dev subscription offers.
It showed 1024 GB. FUCK! My balls dropped.
Now here's what I did...
I have a local drive of 500 GB, which holds all the unbacked data. Now I setup my local OneDrive there and put everything into OneDrive.
And then, I moved my local Google Drive into OneDrive. A nested setup for important stuff.
So this way, less important stuff is backed up on cloud and accessible everywhere.
And more important stuff gets synced on Google Drive and OneDrive, both.
Did I do the right and sensible thing with this kind of setup?
MS Developer subscription says they expire it in 90 days but until today, they have auto renewed it always.
I still have ~500 GB of space which can be consumed.
Also, overall MS ecosystem seems much better to me than Google. Moreover, MS allows custom domain mapping which Google doesn't.
Let's see how can I entirely migrate to MS ecosystem in near future.18 -
TL;DR: Brainfuck & Abstraction is so cool!
One of my dreams is to make a Mandelbrot Fractal with Brainfuck as the one on Rosetta Code.
I'm too lazy... So i'm writing a Compiler for Brainfuck.
At now i have 900 line of Python code and the operation VAR, SET, ADD, SUB, MUL with nested operation compatibility, IF, ELSE, ENDIF...
Probably i will doing it fast directly with BF but damn if abstraction is so cool!!4 -
I know that when a deadline is present, things like cyclomatic complexity might be something that is a left aside. But I hate so much having to troubleshoot a method with 15 levels deep of nested if, try-catch, loops... Fuck!3
-
I got a new Drupal project to maintain. (🤬🤬🤬)
So I'm looking at the content and noticed raw HTML inside the content area. I first thought, the client is using a wysiwyg editor.. But no. It's worse.
He is transforming a XML with XSLT to HTML and copy & paste everything. The result are nested <html><body> tags and everything breaks.
Just because drupal is to hard to work with. I will burn everything and install WordPress 🤯🤬🤬🤬2 -
Goddamnit, I've been rumaging around a CMS -generated site (not wordpress) for a friend in devtools.(to suggest improvements) I don't have much experience with CMS, but why is there so much fucking useless nested markup everywhere that has to go down the line. A simple paragraph has at least 6x nesting, a nav is "centered" by having a millionenty billionety divs on each side, there was even a span element for a single character inside a <p>.
What a fucking mess.5 -
spending 2 hours to split LookAt rotation between two nested transforms where parent was supposed to only recieve the vertical axis rotation and the child the horizontal axis rotation. (unity3d)
still haven't solved it btw, because my nerves and the deadline of the project i needed it for both ran out and i'm still sick to my stomach at the thought of going back to it to solve it because of how trivial it should be and how insanely was i battling with it.4 -
Ugh, fuck man. I had planned an extremely general function for printing a truth table for a given proposition for a course, with a little functional programming thrown in. Instead, we are just supposed to show all 2^8 possible truth tables for 3 variables. That's eight nested loops with a hardcoded string that you inject the 8 values in.
I feel so disappointed1 -
There's a special place in hell for JS people using `.then()` and `.catch()` instead of simply `await func()`.
Why have 5 lines of code with an await, when instead you can have 5 nested `.then` callbacks.
And yes I know there are some cases where async/await isn't applicable, but that's rather rare25 -
I am unlucky, because electricity in my area just goes down just before I hit the cltr+s....
I am unlucky, because the last person get the product before is goes out of stock is the person just standing in front my me in queue.....
I am unlucky, because my water tank run out of water not just before I go to bath but in the middle of my bath.....
But Still I think I am lucky because I can loop in one line in python, and the nested loop also.......2 -
On the newer side of web development. Using CSS Grid with some flexbox. Any idea on why my 768px media query styles are overwriting my 320px styles?
I was breaking into modules but moved everything to a single css file until I figure out what causes the issue. The mobile styles are at top and I started the medium breakpoint below the initial styles.
Designed it mobile first if that makes a difference. Should the media queries be nested?13 -
I hate the feeling of realizing the problem you face has not been posted on stackover, or any forum for that matter.
However, when you manage to solve it, you feel like a badass
Thanks Microsoft/Nvidia for not accounting for nested parenthesis in your batch file -
Question.js
How do I create a simple store for state management. I don't want to use redux. I achieved most of things I wanted I'm kinda stuck at something. Here say the store
obj = { attr1 : { some : { nested : ["json"] } } }
I used setter in es6 to avoid writing to attr1 after attr1 is set.
My dilemma here is how do I freeze the nested object being changed? I tried various ways arround Object.freeze. it didn't work. I'm looking for some way I can do it? Or someone can help me understand redux or vuex without going through all of their code. -
Nested CSS declarations without using SASS or similar.
Fewer Javascript frameworks. We have enough.
Spending caps on AWS so I can mess around without worrying about going bankrupt. -
If you think laravel is easy, try to modify your json response in a way that's not too nested.
Not all language have built-in null-checking capabilities. We have a hard time in the front-end to do null checking if there are any nested(level 3 or more) JSON Response.2 -
Confluence WYSIWYG-editor shall burn in a thousand hells. This thing pretends to be smart, yet all its autoformatting achieves is to enrage me. I don't remember dropping so many f-bombs in such a short time frame.
I hoped to ease to the pain by writing markdown, yet I can only write markdown in a new insert markup window which does not even comprehend nested lists. And don't get me started that it wants to push its Confluence Wiki syntax first. Why does it need to reinvent the wheel?
Why can't I disable the WYSIWYG feel of it and just write plain old markdown?
Confluence, you are part of the problem!
I rather keep the documetnation inside the git repostory inside of md files. But no, confluence shall be our source of soon to be outdated documentation.
Sigh. -
possibly my first !rant
Any Clojure programmers around? I started learning it seriously the other day and I have to say Im hooked. Im pretty new to functional programming and so far Im really liking it. It amazes me how much functionality you can produce from 2-3 nested function calls.2 -
Saturday morning, trying to set up an automated testing environment on my own since at the workplace it's not considered something useful and time should be spent on other stuff. Yay.
Been there another couple of times, both times failed due to poor, overcomplicated architecture that makes use of DI in the very places it shouldn't (and vice versa)... but then I finally found where the DB access is configured and thought "well, let's try tomorrow to automate this bitch".
...turns out, the db access object is injected indeed, but... from a static, deeply nested configuration file, that's referenced EVERYWHERE and embedded in the project core dll.
So basically I can't use a mock DB without changing it in the original config and recompiling the actual project I'm testing, not the test project itself. WTF?!
Or maybe I'm missing something... god, I hope it's me missing something here.
I hope so much to be wrong...1 -
I'm trying. I'm really trying to understand you Dagger 2. But every time I read articles, look at source code and just try to understand how your magic works, I end up copy pasting the sample code. And then I don't know what I even did ffs.
Maybe it's so damn hard for me because I don't understand Dependency injection? But I think I do... What can I do to understand you? Please tell me?
Especially when my use case requires nested fragments and isn't just that typical inject fragment to activity sample...
And now I have to fill in all of the injected fields in my integration tests by hand because I can't figure out how to fucking make you piece of shit do the motherflipping injection!! Fuck.
I need painkillers... My head starts hurting1 -
I guess I'll just trouble shoot this controller for an hour or so before I check the file-tree and find out that I'm editing a stale file of the same name in the root instead of the nested file...
-
Reading the source of a message queue system I'm planning on extending.
I don't see myself as a rockstar programmer or anything but the construction of arrays from hash tables, sorting those arrays and then a nested for loop to find matches really irks me. Luckily not on the critical message processing path but the stats collection thread. There are mutexes in play though that would probably delay processing a little bit when stats are collected. -
What's the deepest nested iframe you've ever worked on. Has anyone done work on an ifrane within an iframe with in an iframe?4
-
When they say 'Write comments!' and you are like:
// Do necessary operations
I have been refractoring a project with a SHITTONE of comments like this and a FUCKLOAD of nested if statements. And then this commes along:
$user2 = User.find($user->id);
WHO WRITES THIS STUFF? I am never working on a cheap project from India again.3 -
I way under-quoted this custom CMS.
I thought ContentBuilder.js was going to be a better plugin. Documentation is lacking, I've run into a couple bugs, and the thing looks like it was built 10 years ago with iframes for image uploads...Ugh.
On top of that, I didn't realize how much work certain things would be like the drag and drop menu builder. Yea....it took 4 different plugins to find one that works well with nested items.
I'd say I'm 60% through and need to be 90%. I'll probably start cutting corners unfortunately :(2 -
Y’all wouldn’t happen to have some handy mental model for remembering how to iterate through input without being an idiot about it, would you?
Referring to problems like having to get all possible substrings from a given string, etc.
Wishful thinking on my part, probably, but I figure it doesn’t hurt to ask. <39 -
Writing down some general frustration.
softwareDevelopmentIndustry.pace = true ? manager.rush(employee) : fictionalLand.takeItEasy();
Stack trace: most recent call last
StressException occurred at line 1: employee too stressed
.keepPushing()
.manager.push(employee)
.industry.demand()
Later on:
StressOverloadException:
nested exception is: PaceIndexOutOfBounds10 -
Just spent half a day trying to figure out why the hell were my automation scrips not running.
"There was an exception but the IE JS engine didn't return any error message"
Very helpful
Turns out the dropdowns that looked the same weren't the same. There was a different table for each selected radio button that was getting displayed and the dev tools didn't reflect that in real time.
I managed to notice after spending a while in table hell (we're talking 4-levels deep nested tables)1 -
typescript is shit.
I have never seen such a stupid bug in other languages.
https://stackblitz.com/edit/...
Apparently, there is no way to do type narrowing in a nested object without using enum12 -
!rant
I just found out that if you have a list of lists in C#, you can use a LINQ statement and specify indices inside the lambda instead of nested ForEaches.
This code is giving me the vapors7 -
Is there anything like React Context or Unix envvars in any functional language?
Not global mutable state, but variables with a global identity that I can set to a value for the duration of a function call to influence the behavior of all deeply nested functions that reference the same variable without having to acknowledge them.13 -
I see a lot of articles/posts about the difficult of CSS.
Finding it hard to maintain, or resulting in spaghetti code.
Is this a common occurrence?
Whilst I've come across it in a few projects before, I wouldn't say it's a regular.
Now a lot of our sites are built on CMS' (Umbraco), but here's my approach.
I'll style the generic elements first across all pages
User generated content is usually in its own CSS class (for nested targeting, e.g. ul/ol tags)
Then I'll give each Document Type (post type/page type) it's own body class and apply specific styling to that page where needed.
Hopefully that's of help to some of you. I'm interested to hear your approaches to it! :)5 -
Tries to automate login with vb using I.E...
Gets stuck because login page is a hive of nested iframes with deep nested tags without defined names
FML -
In JS/Node, is there a performance and memory cost to nested functions?
I.e.
function handle(req, res)
{
var x = 5, y = 10;
function add() { return x + y; }
function multi() { return x*y; }
res.send(add() + multi());
}
As opposed to taking out the 2 functions and making them accept x,y as parameters.6 -
Ugh, retrieving specific data fields nested within several arrays and objects in Javascript/Json jacks me up every fucking time!!!
Anyone ever fuck with the MapQuest geolocation/geoqueries api??
I'm trying to retrieve the lat/lng values out of responses generated from submitted address strings, and it's nested about 8 json layers deep.
I feel like I'm overthinking this?
I can access the values in my web console, and can reach them after using the console to assign them to a temp var, but can't get to the values from my actual js code. Only when I run some business logic from the console.
Here's a shitty example of me explaining the tree:
[{...}]
0:
locations: Array(3)
0:
latLng:
lat: <data here>
lng: <data here)1 -
Clean code is the biggest bullshit in software development history. Oris it agile/scrum? Can’t decide yet.
Note: A new contender arrives with anti-nested coding cult. You hide your deep nested logic away from main logic block, so it is easier to maintain… Said probably by someone who never coded serious software.4 -
Use simple working code of an if statement and reject bad data with an error.
Get the same result but through properly using springs nested path errors. But it doesn't work so now you need to spend hours in debug hell through spring framework code for something that should be easy, is blocking another team, because I have no idea how to do my fucking job.1 -
Changed the nodejs template engine because i though its unable to parse nested object. After the second engine had the same error i checked the properties of the mongoose "populated" object and its mongooses fault.. wasted 4-5 hours of debugging just because of a missleading console.log ... FUCK!1
-
Dafuck is that swiftUI, already hate reactjs to the bones, and now here we go again, i must code those nested views hell and predict the data channels.
This is killing agile programming bigtime1 -
There are exactly zero developer driven features in osx, sans the terminal. Can anyone disagree? It is the least developer friendly os there is.1
-
I had to start over learning SQL when I faced the JSON functions of PostgreSQL during a try and error period to get nested json_agg in one query.. I'am too old for that low level stuff! 🤨
-
Building a Web dashboard. Stats a day tiles etc.
Boss wants to write sql stored procedures to populate tiles.
Azure dB returns tile list, that maps to angular directive names, use nested angular directive that auto compiles a directive by name, then that directives controller calls a sql query which returns the name of the query to call to receive data, formats the data into charts or lists, builds the tile, places it into a gridster tile array and redirects to new tile pages by UI router state names.
I... I think I have gone too far. What have I done. -
Rant/question:
httpDoSmth1().subscribe(x =>
...then(y =>
httpDoSmth2(x).subscribe(z =>
//do smth with z
return z
)
)
)
Isn't this (not my code) callback hell all over again? The 2. http call expects results from the 1. http call. I feel like this could be solved cleaner using async await/switchMap/etc. ... but not like this.13 -
MySejahtera is not a good appliaction at all! They just use Sqlite or Shared Preferences in the app for keeping the data local. (Just local?) As soon as you clear cache or data, The user no longer exist! Like wtf ?
So I decompile the app and review the source code, the code is not even properly obfuscated(That's why I can read it). There's a part of the code on a for loop went
```
for (int i = 3; i < array.length(); i++)
{
for (int j = 2; i > array.length() *2; j ++ )
{
onScan();
}
}
```
Which is unacceptable!
First , why nested for loops?
Second, instead of declare 'array.length()' multiple times why not declared it global for once?
No wonder the initial state of the app is buggy as hell.8 -
You ever want to keep figuring out a nested loop solution so it executes beautifully, but a deadline forces you to use a cheap solution outside the loop (module import) instead?
-
So for the past two days I had to deal with a problem where I have to do a nested query with sequelize, pretty straight forward reading the documentation, or that was I think. I implemented everything according to the docs but the query stills fails, why ? I had no idea, I double check my implementation, I googled the error, no luck, after a day searching like crazy I talked with the backend lead about this and he help me to realize that the naming convention was changing because sequelize is creating a nested (SELECT * FROM) because one of the relations has a one-to-many realtion with the root model and I'm why the heck is doing that? But we both didn't know, and the problem was solved by just modifying the names, so we let it through, and sent it to QA. The next day I see the task rejected by QA and the reason was after the changes were merged another part of the app was broken, ok np, I'll fix it right away, and oh God I found the error was caused by another query that was including the first query we fix yesterday ! It was a nested query with 3 lvls! And the names became even more complex ( like `model1->model2.colum1`), goddamit, ok, I spent most of the day searching again, nothing, read the specification of the findAll function, nope, tried to put that name in the ON clause as the docs suggested, still an error, shit, then the lead helps me again and creates a literal which can hold that name and voila! Everything is happiness, at least for that moment, but I was still curious about this behavior, so I keep digging on it and I've just found an issue where a great guy posted an option to the findAll method that is not documented in any version of sequelize ! WTF ! And this option was "subQuery" which if you set it to false it won't create that additional (SELECT * FROM) from before, FUUUCK! I can't believe it, I know that all the effort works in my favor because I learn more about sequelize, but FFS I'm still angry because this shit shouldn't happen, you need to update the god damn docs, it's just adding a row and telling the people what it does. Well to end this, after putting that in the query and replacing all the workarounds with the expected syntaxis everything works like charm.1
-
Thanks vscode devs for the feature where they automatically map the local ports to remote port that are needed to run the node based application and also to the devs those who write such a great extensions (remote development, gitlens, docker and kubernetes)
No more ng serve -host 0.0.0.0
No more remote_ip:4200 in browser.
These two steps were so much frustrating whole pulling or checking out another branch.
I just need to learn how to run maven from vscode where I have to add another project in dependency.(never worked on maven before and hate long nested xml). AFTER that never booting vm in GUI.4 -
I had a mandate to help bring a couple of fellow QA testers up to speed on basic automated test code, fill in any knowledge gaps and answer questions.
Met with one co-worker and figured I'd start with his questions and work from there. He opened his test code and said he focused on learning 'if statements' last week but his test isn't running and just throwing errors.
Upon inspection, I realized it was a deeply nested (sometimes 10 or more conditions) single method soup that had never been run through even a syntax check. I blinked... *coughed* and spent the next few hours trying to "port the desired functionality" to a new file while he watched. -
I’ve been doing a lot of solidity development lately in my professional life.
Now I get that nested arrays aren’t implemented yet. But it is still weird not being able to have an array of strings.
(Strings are arrays of characters and that would be a meted array) -
You have an array of objects with a startIndex and endIndex representing their position in a string & you want to end up with a nested structure to represent their relation in the string (i.e., A is from 1 to 10, B from 3 to 5, C from 4 to 5, D from 7 to 9). How would you do it?
Input array looks like: https://gist.github.com/AmyShackles...
Desired output looks like: https://gist.github.com/AmyShackles...
(Though what I really have to start with is an object whose keys are the start index and whose values are values of each element in the above input array, so if you can think of a way to morph it without needing to turn it into an array first that’d also be cool)
Figured I’ve been stuck on this part of my side project for long enough that I really should just make a desperate cry for help. ❤️question please help with a little help from my friends man i hate data structures regex parser still killing me5 -
!rant
so, I somehow got an interview with NASDAQ for the summer internship this year. somehow it was the only company that had cleared my resume for the interview process, other companies didn't even scheduled one.
and I messed up the first technical interview.
the interviewer asked me to find the largest element in a nested list in python.
for ex [[3,4],[5,2,9],[1,7]] would return [4,9,7]
it was a verbal interview on call and he asked what would I use? Lambda function or list comprehension.
I said lambda function. (I knew it was list comprehension, if I had to code I wouldn't have got confused between the two)
later he asked a couple of questions about linux and boot processes, I could answer some of the basic ones but not after 3rd or 4th question.
now I don't think I have anything to do for summer, as it's a little too late for finding the internships.
any advice?10 -
When you want to investigate what a function does, you read the name and say "ok, seems reasonable what it should be doing" ... and then you encounter an adventure of if-else's, nested if's and else's, some promises here and there (with more nested if's and else's) and also a bunch of dispatches sprinkled all over the place. You want to refactor it into tinier functions but can't because you don't know what happens where ... help ... 🙄😩
-
Recently joined new Android app (product) based project & got source code of existing prod app version.
Product source code must be easy to understand so that it could be supported for long term. In contrast to that, existing source structure is much difficult to understand.
Package structure is flat only 3 packages ui, service, utils. No module based grouped classes.
No memory release is done. So on each screen launch new memory leaks keep going on & on.
Too much duplication of code. Some lazy developer in the past had not even made wrappers to avoid direct usage of core classes like Shared Preference etc. So at each place same 4-5 lines were written.
Too much if-else ladders (4-5 blocks) & unnecessary repetitions of outer if condition in inner if condition. It looks like the owner of this nested if block implementation has trust issues, like that person thought computer 'forgets' about outer if when inside inner if.
Too much misuse of broadcast receiver to track activities' state in the era of activity, apપ life cycle related Android library.
Sometimes I think why people waste soooo... much efforts in the wrong direction & why can't just use library?!!
These things are found without even deep diving into the code, I don't know how much horrific things may come out of the closet.
This same app is being used by many companies in many different fields like banking, finance, insurance, govt. agencies etc.
Sometimes I surprise how this source passed review & reached the production. -
Try creating a Java multi-dependency project without Maven and just manually adding the jars. It's super annoying as nested dependencies will arise and sometimes conflicts. :P9
-
Hi guys, If you are front end dev (especially react dev) please read this and share your thoughts.
I recently started with react.js. But I didn't like the idea of nesting components. I know this is too early to talk about it. I'm not halfway through tutorials. But I'm loosing motivation to learn react.js
This never happened to me. I learned few frameworks in past. Django and codeigniter. They follow MVC/MVT architecture. And writing code in it looks cleaner and simpler.
In react JSX is confusing at first. You have to read same line twice or thrice to understand. I'm not saying JSX is bad, but it's not readable enough.
In early lessons I learnt that in react everything is component. And every component comes under one root component. Don't you guys think this well get messy for large application. You are dealing with number of nested components from one file into another.
I'm not against react. But the way react is forcing you to write code, is not something I enjoy. Let me know your thoughts. Maybe I'll get some kinda booster to continue react.1 -
WSL seems really cool from what i've been toying with it. WSL2 seems like it'll be even better and the integration with docker(another thing i'm toying with) looks interesting. as far as i can find though it's only on windows insider for now, and I don't like having telemetry on my main machine.
So i spent a good chuck of my day just setting up Hyper-v, learning about nested virtualization (so docker will work), setting up a win10pro vm, and i'm now in the process of setting this up to be a virtualized dev machine (not gonna be a one use only system cause i spent way too long on this shit) and setting up docker and wsl
I don't know much about docker or WSL beyond just some random stuff i've learned to toy with to simplify some things i do. but maybe this will give me a cool way to actively learn more about them and maybe use them as more than just boredom toys3 -
Wordpress is the most stupid thing to use. Yet alone their look of nested sides is the dumbest way to do.
landingpage
- vehicles
- - cars
- - - porsche
- - skateboards
F this shit! -
I need just a bit of advice.
I am working with node.js and React and mongoDb
I just want that please take a look at my schema architecture (Specially for address) for profile and suggest me which is better
Approach 1 :
https://paste.centos.org/view/...
The things that scared me with this approach. I tried this also But it become unnecessary headaches to insert address and then query address as it is nested schema .
Also if you check this out
https://stackoverflow.com/questions...
[Answer by Konstantin Smolyanin (Long Version))]
One must not considered nested state in react.
Approach 2
https://paste.centos.org/view/...
I can store address into another collection
Also is there any reference sites where I can learn about schema architecture or database design with practical scenarios.
Thanks for reading out.4 -
i have this js object containing an array with about 7000 values. firefox, chrome and even ie11 need about 1.5 to 2 seconds to process it.
but edge takes 10 times longer! does anybody know about this behaviour? i could not find anything.
so, serious question. i just find results for ie being slow but THIS time it does its work properly. console shows no errors. is there information about edge-specific issues with javascript?9 -
Profile (1, 1) --- (1, 1) User
Right?
- A single user *must* have *exactly* 1 profile.
- A single profile *must* belong to *exactly* 1 user.
Makes sense?
I did this because i moved user profile image and user banner image into Profile entity
So now i can easily join tables and fetch user profile image based on username or user ID
By deeply thinking like an asshole and overengineering, i stumbled upon a confusion
If i can join tables and get ALL fields (assuming its a left or full outer join) from both entities...
What is the difference between choosing which entity to fetch on the frontend?
For example if i want to fetch users, inversely, i can fetch Profile entity, which has User entity as a nested object, and that way access users. Now i have access to each user's profile image, banner image, bio etc aside from the entire user object
If the user navigates to a profile page, inversely, i can fetch User entity which will have a Profile entity as a nested object, and that way show the remaining necessary fields that the profile page needs to show
I gave these inverse examples because if i want to fetch users, surely enough i can simply fetch from User entity, and if i want to fetch someones profile data i can fetch from Profile entity directly
So if this is the case, when am i supposed to fetch one over the other?
You tell me. For simplicity lets focus on these two examples. Consider this as an exam question:
1) user navigates to home page. Now paginated users with role X need to be shown, but also their profile image. Do you fetch from User or Profile entity? If you use joins which ones and why?
2) user navigates to their or someone elses profile page. Now profile-based data needs to be shown, but also the user's username and full name need to be shown. Do you fetch from User or Profile entity? If you use joins which ones and why?21 -
It's so frustrating to explain rxjs pitfalls to the manager.
To avoid the diamond problems and glitches caused by combineLatest and debounceTime(0), I decided to use single stream with nested reactivity.
Then the manager asked me to use withLatestFrom instead of combineLatest.
Sure withLatestFrom makes sense to the original author, when the original author is able to remember the reactive graph and put proper dependencies to combineLasted/withLatestFrom accordingly, but anyone else who touches the component later needs to retrace the reactive graph to avoid the glitch. Sometimes it's just impossible when many dependencies are derived from combineLatest+debounceTime(0). When no one is trained to code reactively, I don't expect people to know where to put a dependency. After many trials and errors, the only way to avoid the diamond problem is to use nested reactivity where child streams are created within root stream each time root stream emits.
The mentioned manager put all sorts of side effects in observable chains. The manager keeps saying the stream is too large when their subscription functions (sometimes nested) are way worse with litered mutations everywhere. Anything in observable can be traced by go to definition but tracing side effects usually requires global searches.
Recently, he put startWith to the end of a synced stream to fix a bug where button would collapse when there is no content (initial null emission). Rather than fixing the default height, he thinks using startWith(defaultLabel) is a good idea. Of course, he doesn't know that a synced stream should only emit 1 value on new subscription and that extra emitted value will cause rxjs glich down the pipe.
I hate corporate jobs -
I have to reimplement a couple of complicated OOXML parsers (docx, pptx, vsdx, etc). Actually, I’ve implemented them in Python ~5 years ago but now I have to improve them and add support for nested/embedded formats and some other stuff. As you could expect, none of the OOXML validators are valid themselves, so it's better to have an MS product installed locally, just to get reassured that everything works fine and the parser produces the format that's recognizable by M$.
So I’ve bought a key on eBay (yep, I’m not paying full price for this shit: release valid validators first, bitches; don't make me buy things I don't need). The key is valid, everything is fine. But no, you just cannot have a link to download this fucking installer, no-no-no-no. We won't give you a link until after you enter a key. FEEL DEPENDENT. OBEY.
But I digress. Here's their MANUAL about DOWNLOADING the INSTALLER:
https://support.office.com/en-us/...
So, what's wrong with it? Oh, just a minor misunderstanding. They always give you a link to download an exe-installer. Even if you use Safari.
Why everything is so fucked?2 -
.net js developer for just over a decade. What other backend language/framework should I learn to get a cool job in sf
-
Can you recommend a design pattern for dealing with workflows?
I am wondering how to represent a decision tree while also making it easy to maintain and each step should be unit-testable on its own.
I want to avoid a big if-else-block, but I am also unsure what design pattern to apply here.
Basically, there a bunch of yes-no-question (though some conditions may be more complex) that can be nested very deeply, and depending on a certain set of requirements we want to display different actions.
(The workflow is fixed, there is only 1 at at time yet it may change a lot over the next iterations until we figure out what our userbase wants.)4 -
Default dict that returns default dict on configparser to replace "if/try/nested .get()" to just "or"
In the end I had just
data = source or source1 or source2 or source3 -
I had spent all night writing a series of nested loops, my dream was me circling in an old above ground pool like I would as a child. We used to try to make a whirlpool by trying to run along the wall.